commit 02a8739c56e0e7ae8b7bdca2498ba1e8c4b33a7e Author: Jenkins Date: Mon Feb 19 14:17:18 2024 +0000 Update documentation diff --git a/404.html b/404.html new file mode 100644 index 00000000..ff091a0d --- /dev/null +++ b/404.html @@ -0,0 +1,21 @@ + + + + + +Page Not Found | Waku + + + + + +
+
Skip to main content

Page Not Found

We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

+ + + + \ No newline at end of file diff --git a/CNAME b/CNAME new file mode 100644 index 00000000..bd2d203b --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +dev.waku.org \ No newline at end of file diff --git a/_og/2e30be3dda3aea2356b19ac58b5a297a5b8fee5f.png b/_og/2e30be3dda3aea2356b19ac58b5a297a5b8fee5f.png new file mode 100644 index 00000000..9e17bebb Binary files /dev/null and b/_og/2e30be3dda3aea2356b19ac58b5a297a5b8fee5f.png differ diff --git a/_og/2e37e42633c49384d420a08c4ff3989d37ad1c15.png b/_og/2e37e42633c49384d420a08c4ff3989d37ad1c15.png new file mode 100644 index 00000000..62555db1 Binary files /dev/null and b/_og/2e37e42633c49384d420a08c4ff3989d37ad1c15.png differ diff --git a/_og/44d1f81079fae70ec7fde0be255ab9811bc27dc2.png b/_og/44d1f81079fae70ec7fde0be255ab9811bc27dc2.png new file mode 100644 index 00000000..1f4b678c Binary files /dev/null and b/_og/44d1f81079fae70ec7fde0be255ab9811bc27dc2.png differ diff --git a/_og/5e9adec12ce06533711a21f611ae74846fddc80a.png b/_og/5e9adec12ce06533711a21f611ae74846fddc80a.png new file mode 100644 index 00000000..b19302ea Binary files /dev/null and b/_og/5e9adec12ce06533711a21f611ae74846fddc80a.png differ diff --git a/_og/6df1fa093c7334273930a36e7c21f7b2360e927b.png b/_og/6df1fa093c7334273930a36e7c21f7b2360e927b.png new file mode 100644 index 00000000..5a944d2e Binary files /dev/null and b/_og/6df1fa093c7334273930a36e7c21f7b2360e927b.png differ diff --git a/_og/7c0de34d9a19954998771beab3959d3b6df232d2.png b/_og/7c0de34d9a19954998771beab3959d3b6df232d2.png new file mode 100644 index 00000000..f3e15e23 Binary files /dev/null and b/_og/7c0de34d9a19954998771beab3959d3b6df232d2.png differ diff --git a/_og/8214b030a5cdfe40509f6aa171c7ac77ea7e919b.png b/_og/8214b030a5cdfe40509f6aa171c7ac77ea7e919b.png new file mode 100644 index 00000000..63da91dd Binary files /dev/null and b/_og/8214b030a5cdfe40509f6aa171c7ac77ea7e919b.png differ diff --git a/_og/9a4eac585ac268b49f21d44420d231bf7adf742a.png b/_og/9a4eac585ac268b49f21d44420d231bf7adf742a.png new file mode 100644 index 00000000..6fc97e3b Binary files /dev/null and b/_og/9a4eac585ac268b49f21d44420d231bf7adf742a.png differ diff --git a/_og/b1a911529ffb1c28ace071828396b999c147e910.png b/_og/b1a911529ffb1c28ace071828396b999c147e910.png new file mode 100644 index 00000000..d9d5b0ad Binary files /dev/null and b/_og/b1a911529ffb1c28ace071828396b999c147e910.png differ diff --git a/_og/b52e58c24e10292c08d8cccdb517163dd0036c0b.png b/_og/b52e58c24e10292c08d8cccdb517163dd0036c0b.png new file mode 100644 index 00000000..73e98a2b Binary files /dev/null and b/_og/b52e58c24e10292c08d8cccdb517163dd0036c0b.png differ diff --git a/_og/c8de41bcfba32b115f4184e2b3523a3e12ea6d91.png b/_og/c8de41bcfba32b115f4184e2b3523a3e12ea6d91.png new file mode 100644 index 00000000..fa80acf9 Binary files /dev/null and b/_og/c8de41bcfba32b115f4184e2b3523a3e12ea6d91.png differ diff --git a/_og/cd064a9e5880dc48da56f702516d843ed8fb196b.png b/_og/cd064a9e5880dc48da56f702516d843ed8fb196b.png new file mode 100644 index 00000000..6f881959 Binary files /dev/null and b/_og/cd064a9e5880dc48da56f702516d843ed8fb196b.png differ diff --git a/_og/dbf972ffe6ca5ddf8ac2f83514fd14fa5c7db7d5.png b/_og/dbf972ffe6ca5ddf8ac2f83514fd14fa5c7db7d5.png new file mode 100644 index 00000000..84c6ffd1 Binary files /dev/null and b/_og/dbf972ffe6ca5ddf8ac2f83514fd14fa5c7db7d5.png differ diff --git a/_og/f6eb6fa78c9d98d219be88144ee241e936c77c47.png b/_og/f6eb6fa78c9d98d219be88144ee241e936c77c47.png new file mode 100644 index 00000000..96d3c423 Binary files /dev/null and b/_og/f6eb6fa78c9d98d219be88144ee241e936c77c47.png differ diff --git a/about/architect/index.html b/about/architect/index.html new file mode 100644 index 00000000..c6c12604 --- /dev/null +++ b/about/architect/index.html @@ -0,0 +1,21 @@ + + + + + +Description and architecture | Waku + + + + + +
+
Skip to main content

Description and architecture

Waku is a family of protocols that enable private, censorship-resistant communications over an open-source, decentralised network. By communications, we mean the exchange of data or messages between two or more entities, whether they are users, devices, or nodes.

Waku was built as open-source public goods infrastructure to serve as the communications layer of the decentralised web. As such, its development focuses on the following:

  • Generalised: Waku's focus on generalised and ephemeral messaging facilitates communication between users, subsystems, or nodes according to developers' needs.

  • Peer-to-peer: The Waku network has a decentralised peer-to-peer topology, preventing censorship and providing surveillance resistance. It is composed of adaptive nodes and is designed to scale to millions of users.

  • Runs anywhere: Waku was designed to run in resource-restricted environments like phones and browsers, enabling users operating lower-spec hardware or with limited bandwidth to participate as peers.

  • Privacy first: Waku empowers developers to build apps that cannot harvest users' metadata, removing the need for them to trust that their data is not used maliciously or without their consent.

  • Modular: Waku's modularity enables developers to make tradeoffs according to their users' privacy expectations and performance demands, by implementing only those protocols that are relevant to their applications. For example, while one app might value privacy above all else, another may be willing to make compromises to deliver a more frictionless UX.

  • Platform agnostic: Waku can run on any platform or in any environment, making it a suitable messaging solution for decentralised applications regardless of the network on which they're deployed.


Network architecture

The Waku team has developed three clients to run in different environments along with a range of SDKs in Rust, React Native, Kotlin, and Swift:

  • nwaku: Waku's reference implementation written in Nim.

  • go-waku: An implementation for native integration with Golang applications.

  • js-waku: Waku's JavaScript implementation for browser environments.

Waku is best thought of as a cohesive whole in terms of its capabilities. However, under the hood are three distinct network interaction domains: gossip, discovery, and request/response.

Waku protocols

Waku consists of multiple protocols, including but not limited to the following:

Waku Relay: Waku Relay is the backbone of the Waku network. It specifies a pub/sub approach to P2P messaging with a focus on privacy, censorship resistance, and security, and is currently implemented as a minor extension of the libp2p GossipSub protocol.

Waku Filter: A lighter-weight version of the relay protocol for resource-restricted devices, Waku Filter enables light nodes to only receive the messages they want from full nodes.

Waku Store: Enables devices that cannot participate in the Waku Relay network to retrieve messages they missed while being offline.

Waku Light Push: A request/response protocol that enables nodes with short connection windows or limited bandwidth to publish messages to the Waku network.


architect


Dive into the docs

+ + + + \ No newline at end of file diff --git a/about/index.html b/about/index.html new file mode 100644 index 00000000..b8b31231 --- /dev/null +++ b/about/index.html @@ -0,0 +1,21 @@ + + + + + +About | Waku + + + + + +
+
Skip to main content

About

Waku is a suite of generalised messaging protocols aiming to be the communication standard for the decentralised web. It enables private and secure human-to-human, machine-to-machine, and human-to-machine communication without reliance on centralised intermediaries. Messaging through Waku is possible from one-to-one to many-to-many.

Waku serves as the communications layer of the Logos tech stack. Alongside the trustless agreement layer, Nomos, and the storage layer, Codex, it is one of the Logos Collective's foundational projects.


Motive

Today's internet is increasingly controlled by a small number of tech giants. Google, Amazon, Meta, and a few others dictate what we see and with whom we can communicate. Their influence is almost limitless, and their actions shape global public opinion and even geopolitics.

To anyone that understands the internet's present architecture, this outcome should be expected. The centralised entities through which we communicate have privileged access to reams of data that we, as internet users, produce daily, presenting an opportunity for the kind of surveillance that was once confined to the pages of science-fiction literature. Thinking that the most powerful commercial and political institutions would not leverage this would be naive.

Yet, it doesn't have to be this way. Advances in cryptography, peer-to-peer networking, and decentralised technologies provide an alternate path forward.


(Slowly) moving toward a decentralised web

The early Ethereum community realised this. Initially, the plan was to rebuild the web's architecture along decentralised lines by developing the so-called Holy Trinity of the Decentralised Web: computation, storage, and communication. Ethereum itself would handle computation, Swarm was the reimagined web's storage layer, and Whisper would take care of messaging.


history


Whisper was a promising start but scalability shortcomings quickly became apparent. Meanwhile, the development of Swarm and Whisper was seemingly relegated to a backseat while Ethereum took centre stage. Yet, without adequate communication and storage layers, the decentralised web's potential for disrupting human coordination remained severely encumbered.

Status, the decentralised messaging application, was built to leverage Whisper but because of Whisper’s development delays, the team decided to build their own communication protocol. Consequently, the R&D group Vac was put together in 2018 to research solutions to Whisper's scaling woes.


The birth of Waku

In 2020, Waku v1 was released. As a fork of the Whisper codebase, this initial version introduced various Vac-proposed optimizations, resulting in a better performing messaging protocol. Yet, it was clear that further changes were needed for Waku to be able to handle the volume of messages an application like Status would produce.

The following year, work on a complete protocol rewrite began. Waku v2, as the version under development today is known, introduced a relay protocol that implements pub/sub over libp2p. Additionally, further capabilities were included to make Waku more useful, including historic message retrieval for mostly-offline devices, adaptive nodes to make participation more accessible to users with limited or intermittent connections and lower-spec hardware, and various bandwidth preservation techniques.

Waku was first announced as a core Logos project in June 2023.

+ + + + \ No newline at end of file diff --git a/about/roadmap/index.html b/about/roadmap/index.html new file mode 100644 index 00000000..44c485b9 --- /dev/null +++ b/about/roadmap/index.html @@ -0,0 +1,21 @@ + + + + + +Development roadmap | Waku + + + + + +
+
Skip to main content

Development roadmap

Waku v1 is in production and was quickly adopted by the Status Mobile application. Yet, this initial version was unable to handle the scale required to support popular applications, prompting the v2 rewrite. Waku v2 has seen encouraging initial adoption beyond Status by projects such as Railgun's private transaction system and The Graph's indexer communication network Graphcast.

Given Waku v1's scaling difficulties, the team behind Waku is primarily focused on ensuring v2 scales securely. By the end of Q3 2023, we aim to support one million users.

Meanwhile, the team is also working on ensuring production readiness alongside network and development sustainability. Though work on these areas is already underway, our efforts will intensify as we progress toward our million-user-milestone. Finally, Waku aims to promote itself among developers looking to add decentralised communications to their applications.


Secure scalability

Alongside Vac researchers, Waku is producing and implementing various RFCs to define the protocols and application guidelines required to serve more than one million simultaneous users. We then aim to study Waku's capacity through network simulations before designing and implementing scalability risk-mitigation strategies.

Production readiness

We will consider Waku v2 production ready when it's performant, stable, and bug-free while satisfying user requirements. This process will involve collaboration with Status teams to test the protocols, as well as further simulations to assess future updates' expected performances. Ensuring that Waku has adequate protection against spam and DoS attacks is critically important to this milestone.

Network sustainability

Many of Waku's core value propositions (privacy and resistance to censorship, for example) are reliant on its decentralisation. While our most passionate users may well operate network infrastructure altruistically, incentivization mechanisms will ensure a wider node distribution, and strengthen Waku's disruptive properties.

This process will involve defining a viable incentivization structure via RFC and studying its efficacy to tweak parameters through test net simulations, before implementation on the main net.

Development sustainability

We believe Waku will only realise its true potential if its community and users believe in its longevity. As such, Waku's development must remain funded. Again, arriving at a suitable funding mechanism will involve several RFCs to define how much of the network's extractable value can be diverted toward R&D efforts.

Growth

After achieving the above milestones, we will be in a position to aggressively market Waku to potential contributors and developers within the web3 sector and beyond. As a piece of public goods infrastructure, we encourage the wider community to help improve the protocols by contributing to our R&D efforts.

Promotion is an ongoing process that is already underway, involving conference attendance and sponsorship, hosting developer workshops, producing promotional material, and appearing on industry-focused podcasts.

Contribute to Waku

+ + + + \ No newline at end of file diff --git a/about/team/index.html b/about/team/index.html new file mode 100644 index 00000000..5e15d129 --- /dev/null +++ b/about/team/index.html @@ -0,0 +1,21 @@ + + + + + +Core contributors | Waku + + + + + +
+
Skip to main content

Core contributors

Leading Waku's R&D efforts is Franck Royer. Franck draws on more than five years of experience within the blockchain and crypto ecosystem, and over 13 years as a software engineer and team lead with a primary focus on backend development for mission-critical applications.

The core contributors building Waku are split into three subgroups:

  • Waku Research

  • Waku Development

  • Waku Eco Dev

Waku Research

Our research efforts are led by a former telecoms engineer with almost a decade of experience, and supported by a post-doctoral research engineer who specialises in communications networks.

Waku Development

Waku's development arm is broken down by client implementation.

  • nwaku: The team building nwaku, our implementation in Nim, consists of three software engineers with more than two decades of combined experience in backend development, open-source development, artificial intelligence, and finance.

  • js-waku: Our JavaScript implementation is developed by a senior and intermediate software engineer, one with extensive experience in the web3 sector and another who previously worked with renowned tech companies, such as Microsoft and Ubisoft.

  • go-waku: Building Waku's Golang implementation are two senior software engineers with over 25 years of combined experience, including significant experience in web3.

Waku Eco Dev

Ensuring that Waku attracts developers and users is the Waku Outreach team. It comprises a developer relations engineer and a technical writer. Both members are steeped in web3, having previously worked with Wallet Connect and Unstoppable Domains, and regularly presenting on the crypto conference circuit.

Waku is looking to expand the above structure and currently has openings for core contributors. As an open-source public goods project, Waku also welcomes community contributions. Please check out our Github repo here.

Work with us

+ + + + \ No newline at end of file diff --git a/about/waku-network/index.html b/about/waku-network/index.html new file mode 100644 index 00000000..1250e421 --- /dev/null +++ b/about/waku-network/index.html @@ -0,0 +1,21 @@ + + + + + +The Waku Network | Waku + + + + + +
+
Skip to main content

The Waku Network

The Waku Network Gen 0 is the first iteration of a public network for peer-to-peer messaging built on the Waku protocol stack. Its goal is to offer a permissionless, auto-scalable, DoS protected shared messaging layer for the decentralized web.

Motive

The Waku Network is a solution to achieve scalability and reasonable Denial of Service (DoS) protection, even when sharing a decentralised message routing layer with other applications. The Waku Network is actively addressing the challenge of scaling a shared routing layer, where each user participates in relaying traffic for all applications. As the adoption of Waku continues to grow, the bandwidth consumption skyrockets. Users with limited bandwidth capabilities are becoming increasingly marginalised and unable to participate fully in the Waku Relay network.

The Waku Network also aims to mitigate the risk of users being susceptible to spam or DoS attacks that may occur when the network is fully accessible to all users and applications.

Waku’s mission is to enable anyone across the globe to opt out of using applications built on centralised communication components, that’s why Waku protocols are designed to work on even resource-restricted devices. Without finding a way to limit bandwidth consumption, the protocol would be at risk of not enabling this mission.

Sharding and rate limiting

There are two main technological advances that the Waku Network Gen 0 introduces which enable the public network:

  1. Sharding;

Instead of having one relay network, the Waku Network is split into several GossipSub topics so that the application user is not required to relay all of the applications’ traffic but rather just the subset of traffic on the same shard. Auto-sharding will automatically allocate messages for an application and does not require a centralised allocator.

  1. Rate limiting.

Rate limiting prevents attackers from flooding the network beyond the maximum expected bandwidth usage. The RLN DoS protection caps publishers to 1 message per second with a 20-second grace period before additional messages are restricted. In the future, a dimensioning mechanism will give publishers a maximum allocation of messages per day, limiting the maximum rate of these messages within the overall network.

+ + + + \ No newline at end of file diff --git a/assets/css/styles.822f0079.css b/assets/css/styles.822f0079.css new file mode 100644 index 00000000..ac3e7384 --- /dev/null +++ b/assets/css/styles.822f0079.css @@ -0,0 +1 @@ +.col,.container{padding:0 var(--ifm-spacing-horizontal);width:100%}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}blockquote,pre{margin:0 0 var(--ifm-spacing-vertical)}.breadcrumbs__link,.button{transition-timing-function:var(--ifm-transition-timing-default)}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}[data-theme=dark],html[data-theme=dark]{--ifm-color-scheme:dark}:root,[data-theme=light]{--ifm-color-scheme:light}.menu,.navbar-sidebar,body,html{overflow-x:hidden}code,pre code{--lsd-typography-generic-font-family:monospace}.button,.dropdown__link,.footer__item,.text--truncate{white-space:nowrap}.toggleButton_dl49,html{-webkit-tap-highlight-color:transparent}*,.buttonGroup_Qu4e button,.dropdownNavbarItem_o23I,.events .theme-doc-breadcrumbs .breadcrumbs__item--active,.mdx-event-info__container,.root_xZfc,.toggle_K23S{box-sizing:border-box}.clean-list,.containsTaskList_mC6p,.dropdown__menu,.menu__list,.root_N57j ul li{list-style:none}:root{--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:#0000;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-radius:0.4rem;--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-weight-light:300;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 #0000001a;--ifm-global-shadow-md:0 5px 40px #0003;--ifm-global-shadow-tl:0 12px 28px 0 #0003,0 2px 4px 0 #0000001a;--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-table-cell-padding:0.75rem;--ifm-table-background:#0000;--ifm-table-stripe-background:#00000008;--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-color:var(--ifm-font-color-base);--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-color:var(--ifm-color-white);--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-sidebar-width:83vw;--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active)}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:#0000}html{-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;text-size-adjust:100%;background-color:var(--ifm-background-color);color:var(--ifm-font-color-base);color-scheme:var(--ifm-color-scheme);font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);text-rendering:optimizelegibility}body{background-color:rgb(var(--lsd-surface-primary));height:auto!important}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:var(--ifm-container-width)}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.blog-archive-page .main-wrapper main>section,.margin-top--none,.margin-vert--none{margin-top:0!important}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:var(--ifm-col-width)}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid #0000001a;border-radius:var(--ifm-code-border-radius);font-family:var(--ifm-font-family-monospace);font-size:var(--ifm-code-font-size);padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}a code{color:inherit;color:rgb(var(--lsd-text-primary))}pre{background-color:var(--ifm-pre-background);border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);overflow:auto;padding:var(--ifm-pre-padding)}pre code{background-color:initial;border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:var(--ifm-color-emphasis-800);font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:var(--ifm-heading-color);font-family:var(--ifm-heading-font-family);font-weight:var(--ifm-heading-font-weight);line-height:var(--ifm-heading-line-height);margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}.sub1,h1{font-size:var(--ifm-h1-font-size)}.sub2,h2{font-size:var(--ifm-h2-font-size)}.sub3,h3{font-size:var(--ifm-h3-font-size)}.sub4,h4{font-size:var(--ifm-h4-font-size)}.sub5,h5{font-size:var(--ifm-h5-font-size)}.sub6,h6,small{font-size:var(--ifm-h6-font-size)}.container_lyt7,.container_lyt7>svg,img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading));letter-spacing:-1.5px}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul{margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:var(--ifm-list-paragraph-margin)}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table thead tr{border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:var(--ifm-table-cell-padding)}table th{background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}a:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){text-decoration:none}p{margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:var(--ifm-blockquote-shadow);color:var(--ifm-blockquote-color);font-size:var(--ifm-blockquote-font-size);padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:var(--ifm-hr-background-color);border:0;height:var(--ifm-hr-height);margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary,.wordWrapButtonEnabled_EoeP .wordWrapButtonIcon_Bwma{color:var(--ifm-color-primary)}.text--secondary,[data-theme=dark] .root_JWD1>div>div{color:var(--ifm-color-secondary)}.text--success{color:var(--ifm-color-success)}.text--info{color:var(--ifm-color-info)}.text--warning{color:var(--ifm-color-warning)}.text--danger{color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.alert__heading,.mdx-hero-title--uppercase,.text--uppercase,table td strong,table th{text-transform:uppercase}.text--light{font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:#3578e526;--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:#ebedf026;--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:#00a40026;--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:#54c7ec26;--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:#ffba0026;--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:#fa383e26;--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:var(--ifm-alert-border-left-width);border-radius:var(--ifm-alert-border-radius);box-shadow:var(--ifm-alert-shadow);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.admonitionHeading_JPfy,.events .theme-doc-breadcrumbs .breadcrumbs__link{text-transform:capitalize}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:var(--ifm-avatar-photo-size);overflow:hidden;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:var(--ifm-avatar-intro-alignment)}.badge,.breadcrumbs__item,.breadcrumbs__link,.button{display:inline-block}.avatar__name{font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.avatar__subtitle{margin-top:.25rem}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:var(--ifm-badge-border-radius);color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:var(--ifm-color-black)}.breadcrumbs__link,.button.button--secondary.button--outline:not(.button--active):not(:hover){color:var(--ifm-font-color-base)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item:not(:last-child):after{background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:var(--ifm-breadcrumb-separator-filter);height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:var(--ifm-breadcrumb-item-background-active);color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:var(--ifm-breadcrumb-border-radius);font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:var(--ifm-transition-fast);transition-property:background,color}.breadcrumbs__link:any-link:hover,.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:var(--ifm-breadcrumb-item-background-active);text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:var(--ifm-button-background-color);border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;-webkit-user-select:none;user-select:none}.button,.button:hover{color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:#0000;color:var(--ifm-link-color);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:var(--ifm-link-hover-color);text-decoration:var(--ifm-link-hover-decoration)}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:var(--ifm-color-gray-900)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:var(--ifm-card-border-radius);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer,.mdx-timeline-item__description{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:var(--ifm-color-primary);text-decoration:none}.close{color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.breadcrumbs__item,.close:hover,.table-of-contents__link--active code{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.admonitionIcon_BGV6,.root_JWD1>span svg{vertical-align:middle}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.mdx-hero-video,.navWrapper_ybYI,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:var(--ifm-dropdown-background-color);border-radius:var(--ifm-global-radius);box-shadow:var(--ifm-global-shadow-md);left:0;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;position:absolute;top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:var(--ifm-z-index-dropdown)}.menu__caret,.menu__link,.menu__list-item-collapsible{border-radius:.25rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown__link{color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem}.dropdown__link--active,.dropdown__link:hover{background-color:var(--ifm-dropdown-hover-background-color);color:var(--ifm-dropdown-link-color);text-decoration:none}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor #0000;border-style:solid;border-width:.4em .4em 0;content:"";margin-left:.3em;position:relative;top:2px;transform:translateY(-50%);display:none}.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after,.menu__list-item-collapsible>a[aria-expanded=false]>svg{transform:rotate(90deg)}.footer{background-color:var(--ifm-footer-background-color);color:var(--ifm-footer-color);padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__title{color:var(--ifm-footer-title-color);font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:var(--ifm-heading-margin-bottom)}.menu,.navbar__link{font-weight:var(--ifm-font-weight-semibold)}.docItemContainer_hrrU article>:first-child,.docItemContainer_hrrU header+*,.footer__item{margin-top:0}.admonitionContent_iozl>:last-child,.footer__items{margin-bottom:0}.main-wrapper>main,.table-of-contents,[type=checkbox]{padding:0}.hero{align-items:center;background-color:var(--ifm-hero-background-color);color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu__list{margin:0;padding-left:0}.menu__caret,.menu__link{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.menu__list-item-collapsible{display:flex;flex-wrap:wrap;position:relative}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;display:flex}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-duration:var(--ifm-transition-fast);transition-timing-function:ease-in-out;left:0;top:0}.menu__link{color:var(--ifm-menu-color);flex:1;line-height:1.25}.menu__link:hover{color:var(--ifm-menu-color);text-decoration:none}.menu__caret:before,.menu__link--sublist-caret:after{content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast) linear;width:1.25rem}.menu__link--sublist-caret:after{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;margin-left:auto;min-width:1.25rem}.menu__link--active,.menu__link--active:hover{color:var(--ifm-menu-color-active)}.navbar__brand,.navbar__link{color:var(--ifm-navbar-link-color)}.menu__link--active:not(.menu__link--sublist){background-color:var(--ifm-menu-color-background-active)}.menu__caret:before{background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-navbar-shadow);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.icon_S7Kx,.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.blog-wrapper>.container>.row>aside>nav>ul li,.navbar__items--center .navbar__brand,a[class^=sidebarLogo_]{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__items--right>:last-child{padding-right:0}.navbar__item{display:inline-block;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link--active,.navbar__link:hover{color:var(--ifm-navbar-link-hover-color);text-decoration:none}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:#ffffff1a;--ifm-navbar-search-input-placeholder-color:#ffffff80;color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:#ffffff0d;--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;appearance:none;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:.9rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.cursor-pointer,.mdx-accordion-item__header,.mdx-accordion-item__header *,.pills__item,.tabs__item{cursor:pointer}.navbar__search-input::placeholder{color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:var(--ifm-navbar-background-color);box-shadow:var(--ifm-global-shadow-md);position:fixed;transform:translate3d(-100%,0,0);transition-property:opacity,visibility,transform;visibility:hidden;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:#0009;position:fixed;right:0;transition-property:opacity,visibility;visibility:hidden}.footer,.row{position:relative}.navbar-sidebar__brand{align-items:center;box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:var(--ifm-navbar-height);padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - var(--ifm-navbar-height));transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:var(--ifm-button-font-weight);position:relative;text-align:left;top:-.5rem}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:var(--ifm-pagination-border-radius);color:var(--ifm-font-color-base);display:inline-block;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination__link:hover{text-decoration:none}.pagination-nav{grid-gap:var(--ifm-spacing-horizontal);display:grid;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.footer>div,.grid{grid-template-columns:repeat(24,1fr)}.pagination-nav__link{border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:var(--ifm-heading-line-height);padding:var(--ifm-global-spacing);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:var(--ifm-pagination-nav-color-hover);text-decoration:none}.blog-wrapper>.container>.row>aside>nav>div:first-child,.blog-wrapper>.container>.row>aside>nav>ul li a{border-left:1px solid #0000;font-size:var(--lsd-subtitle2-fontSize)!important;font-weight:var(--lsd-subtitle2-fontWeight)!important;line-height:var(--lsd-subtitle2-lineHeight)!important}.dropdown__link:hover,.footer__item a{text-decoration:underline}.pagination-nav__label{font-size:var(--ifm-h4-font-size);font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:var(--ifm-color-content-secondary);font-size:var(--ifm-h5-font-size);font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills__item,.tabs{font-weight:var(--ifm-font-weight-bold)}.pills{display:flex;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;display:inline-block;padding:.25rem 1rem;transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar__left-items>.navbar__item:first-of-type,.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:var(--ifm-tabs-color);display:flex;margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid #0000;border-radius:var(--ifm-global-radius);display:inline-flex;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:#ffffff0d;--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:#ffffff1a;--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:#ffffff12;--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec}:root{--docusaurus-progress-bar-color:var(--ifm-color-primary);--content-padding:16px;--container-max-width:1440px;--pagination-nav-margin-top:96px;--ifm-navbar-link-color:rgb(var(--lsd-text-primary));--ifm-navbar-background-color:rgb(var(--lsd-surface-primary));--ifm-dropdown-link-color:rgb(var(--lsd-text-primary));--ifm-dropdown-hover-background-color:rgb(var(--lsd-surface-secondary));--ifm-background-color:rgb(var(--lsd-surface-primary));--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-primary:rgb(var(--lsd-theme-primary));--ifm-color-secondary:rgb(var(--lsd-theme-secondary));--prism-background-color:rgb(var(--lsd-theme-primary));--ifm-color-gray-0:rgb(var(--lsd-surface-primary));--ifm-color-gray-100:#f8f8fa;--ifm-color-gray-200:#f7f7f8;--ifm-color-gray-300:#eeeef0;--ifm-color-gray-400:#c0c0c2;--ifm-color-gray-500:#828285;--ifm-color-gray-600:#474747;--ifm-color-gray-700:#373738;--ifm-color-gray-800:#1a1a1a;--ifm-color-gray-900:#151515;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-font-color-base-inverse:var(--ifm-color-black);--docusaurus-highlighted-code-line-bg:#ffffff26;--ifm-card-background-color:var(--ifm-color-gray-100)!important;--ifm-alert-foreground-color:var(--ifm-color-gray-700);--ifm-button-background-color:rgb(var(--lsd-surface-primary));--ifm-global-border-width:1px;--ifm-global-radius:0.6rem;--ifm-hover-overlay:#0000000d;--ifm-font-family-base:var(--lsd-typography-generic-font-family);--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--lgs-font-family-secondary:Georgia,"Times New Roman",serif;--ifm-font-size-base:100%;--ifm-line-height-base:1.625;--ifm-font-size-secondary:100%;--ifm-line-height-secondary:1.5;--ifm-font-weight-light:400;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:400;--ifm-font-weight-bold:600;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-h1-font-size:var(--lsd-h1-fontSize);--ifm-h2-font-size:var(--lsd-h2-fontSize);--ifm-h3-font-size:var(--lsd-h3-fontSize);--ifm-h4-font-size:var(--lsd-h4-fontSize);--ifm-h5-font-size:var(--lsd-h5-fontSize);--ifm-h6-font-size:var(--lsd-h6-fontSize);--ifm-global-spacing:24px;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:0.75rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:24px;--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-code-background:rgb(var(--lsd-text-primary))!important;--ifm-pre-padding:1.125rem;--ifm-link-decoration:none;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-border-left-width:3px;--ifm-blockquote-shadow:none;--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-button-padding-vertical:0.4rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-border-radius:var(--ifm-global-radius);--ifm-card-horizontal-spacing:var(--ifm-spacing-horizontal);--ifm-card-vertical-spacing:var(--ifm-spacing-vertical);--ifm-footer-link-horizontal-spacing:0;--ifm-footer-padding-horizontal:var(--content-padding);--ifm-footer-padding-vertical:24px;--ifm-footer-background-color:#0000;--ifm-menu-link-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-color:rgb(var(--lsd-text-primary),0.6);--ifm-menu-color-background-active:#0000;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-height:64px;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-padding-horizontal:var(--content-padding);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)/3);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:100vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pills-spacing:0.125rem;--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem;--ifm-alert-background-color:#0000;--ifm-color-secondary-contrast-background:#0000;--ifm-color-success-contrast-background:#0000;--ifm-color-info-contrast-background:#0000;--ifm-color-warning-contrast-background:#0000;--ifm-color-danger-contrast-background:#0000;--ifm-alert-border-radius:none;--note:#d4d5d8;--tip:#6ace4b;--caution:#ddaa39;--danger:#e46967;--info:#68b1d0;--ifm-color-secondary-dark:var(--note);--ifm-color-secondary-light:var(--note);--ifm-color-success-dark:var(--tip);--ifm-color-success-light:var(--tip);--ifm-color-info-dark:var(--info);--ifm-color-info-light:var(--info);--ifm-color-warning-dark:var(--caution);--ifm-color-warning-light:var(--caution);--ifm-color-danger-dark:var(--danger);--ifm-color-danger-light:var(--danger);--ifm-footer-link-color:rgb(var(--lsd-text-primary));--ifm-color-content-secondary:rgb(var(--lsd-text-primary));--ifm-hero-background-color:#f8f8fa;--ifm-hero-text-color:var(--ifm-color-black);--desktop-footer-gap:200px;--mobile-footer-gap:144px;--doc-grid-gap:16px;--ifm-table-background:#0000!important;--ifm-table-stripe-background:#0000!important;--ifm-pre-border-radius:0!important;--ifm-code-font-size:100%!important;background-color:#0000!important;--doc-sidebar-width:16.66vw!important;--doc-sidebar-max-width:320px;--ifm-navbar-item-padding-vertical:8px;--ifm-navbar-item-padding-horizontal:12px;--docusaurus-announcement-bar-height:auto;--card-height:188px;--mobile-width:253px;--mobile-height:176px;--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}body,html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:100%}.theme-admonition,table{overflow:auto}main{min-height:calc(100vh - var(--ifm-navbar-height) - var(--content-padding))}svg *{fill:rgb(var(--lsd-text-primary))}.grid{display:grid;gap:16px}.table-of-contents__link--active,.table-of-contents__link:hover{color:rgb(var(--lsd-text-primary))!important}h1{font-size:var(--lsd-h1-fontSize);font-weight:var(--lsd-h1-fontWeight);line-height:var(--lsd-h1-lineHeight)}h1,h2,h3,h4{font-family:var(--lsd-typography-generic-font-family)}h2{font-size:var(--lsd-h2-fontSize);font-weight:var(--lsd-h2-fontWeight);line-height:var(--lsd-h2-lineHeight)}h3{font-size:var(--lsd-h3-fontSize);font-weight:var(--lsd-h3-fontWeight);line-height:var(--lsd-h3-lineHeight)}h4{font-size:var(--lsd-h4-fontSize);font-weight:var(--lsd-h4-fontWeight);line-height:var(--lsd-h4-lineHeight)}code{background:#ffffff26;border-radius:0;color:rgb(var(--lsd-text-primary));background:rgba(var(--lsd-theme-primary),.1)}pre code{font-family:var(--lsd-typography-generic-font-family)!important;font-size:var(--lsd-body1-fontSize)!important;font-weight:var(--lsd-body1-fontWeight)!important;line-height:var(--lsd-body1-lineHeight)!important}.theme-doc-footer-edit-meta-row div[class*=lastUpdated_] b,table td strong,table th{font-weight:400!important}.alert,.card,.theme-code-block{box-shadow:none!important}.menu__list-item-collapsible>a,.navbar{box-shadow:none}.sans{font-family:var(--lgs-font-family-secondary);line-height:var(--ifm-line-height-secondary)}.blog-wrapper--index [itemprop=blogPost] .markdown,.external-link,.footer__bottom,.footer__copyright,.menu__list-item .menu__link,.theme-doc-footer-edit-meta-row div[class*=lastUpdated_],table{font-size:var(--lsd-body2-fontSize)!important;font-weight:var(--lsd-body2-fontWeight)!important;line-height:var(--lsd-body2-lineHeight)!important;font-family:var(--lsd-typography-generic-font-family)!important}.markdown a,.markdown a:hover,article a,article a:hover{text-decoration:underline;text-decoration-color:inherit;text-decoration-color:rgba(var(--lsd-text-primary),.6);text-underline-offset:.3rem}.card{padding:var(--ifm-spacing-vertical) var(--ifm-spacing-horizontal);padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.table-of-contents__left-border{border:none!important}.menu__link{align-items:center;display:flex;justify-content:space-between}.menu__link span{color:rgba(var(--lsd-text-primary),.6)}.theme-edit-this-page{align-items:center;display:flex;gap:12px}.menuExternalLink_NmtK,.navbar__inner,.navbar__item{align-items:center}.dropdown__link:hover{color:rgb(var(--lsd-text-secondary))}.blog-wrapper>.container>.row>aside>nav>ul li a:hover,.breadcrumbs__item--active,.footerLogoLink_BH7S:hover,.hash-link:focus,.theme-code-block:hover .buttonGroup_Qu4e button,:hover>.hash-link{opacity:1}.breadcrumbs__item:not(:last-child):after{background:none;content:"/";opacity:1}.breadcrumbs__link{background:#0000!important;padding:0}.navbar{height:var(--ifm-navbar-height)}.menu__link--active,.menu__list-item-collapsible--active>:not(a[href="#"]){box-shadow:inset 1px 0 0 rgb(var(--lsd-border-primary))}.navbar__logo,a[class^=sidebarLogo_] img{height:40px}.header-github-link:hover,.mdx-event-card__info>span:first-of-type,.mdx-event-card__label,.mdx-event-info__label{opacity:.6}.header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat;content:"";display:flex;height:16px;width:16px}html[data-theme=dark] .header-github-link:before{background:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat}.dropdown__link--active{color:rgb(var(--lsd-text-secondary))!important;background-color:#0000}.row{margin:0}.theme-doc-version-banner *,.theme-doc-version-banner:hover *{color:#fff;text-decoration-color:#fff!important}.blog-wrapper main>section article ul li .lsd-tag>span,.blog-wrapper main>section article ul li .lsd-tag>span>span,.menu__link--active span,.theme-doc-version-badge{color:rgb(var(--lsd-text-primary))}.navbar__left-items>a:not(:last-child){margin-right:1.25rem}.navbar__left-items>a:not(:last-child)[href^="/"]{margin-right:1.75rem}.menu__link--sublist-caret:after{background:none;content:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTQgOS41My45NC45NEw4IDcuNDE3bDMuMDYgMy4wNTMuOTQtLjk0LTQtNC00IDRaIiBmaWxsPSIjZmZmIi8+PC9zdmc+);filter:unset;height:unset;min-width:unset;width:unset}.menu__list-item--collapsed>.menu__link--sublist-caret:after{transform:rotate(0)!important}.menu__link--active{border-radius:0}.dropdown__menu,.pagination-nav__link{border:1px solid rgb(var(--lsd-border-primary))}.table-of-contents a{padding-left:16px}.table-of-contents__link--active{border-left:1px solid rgb(var(--lsd-border-primary));padding-left:16px}.navbar__item{display:inline-flex;padding:0}.mdx-accordion-item,.navbar__link--active{border-bottom:1px solid rgb(var(--lsd-border-primary))}.dropdown__menu{background:rgb(var(--lsd-surface-primary));border-radius:0;margin-right:-1px;margin-top:6px;padding:0;transition-duration:0ms}.dropdown__link{background-color:#0000;border-radius:0;margin:0;padding:5px 11px;text-decoration:none}.dropdown__link *{text-decoration:inherit!important}.dropdown__link:hover{background-color:#0000}.blog-wrapper .breadcrumbs__item,.blog-wrapper--index h2[itemprop=headline]>a,.breadcrumbs__item,.breadcrumbs__link,.events .breadcrumbs__item,.events .breadcrumbs__link{text-decoration:none}.margin-left-8,.mdx-jpd__external-link-icon{margin-left:8px}.pagination-nav{margin-top:var(--pagination-nav-margin-top)!important}.pagination-nav__link{align-items:center;border-radius:0;display:flex;gap:18px;padding:10px 14px}.theme-doc-version-badge,table td,table th,table thead>tr{border:1px solid rgb(var(--lsd-border-primary))}.pagination-nav__link--next{grid-column:2/3;text-align:right;justify-content:flex-end}.events .pagination-nav,.events aside,.footer__item a svg,.menu__caret,.pagination-nav__label:after,.pagination-nav__label:before,.theme-doc-footer-edit-meta-row div[class*=lastUpdated_] small{display:none}.theme-back-to-top-button{display:none!important}.footer__link-item,.tag_NdBD{display:inline-block}.lsd-collapse__content{padding:24px}.theme-doc-version-badge{background:#0000;margin-bottom:16px;padding:4px 8px}.navbar__right-items{align-items:center;display:flex}table{border-collapse:collapse;margin-bottom:var(--ifm-spacing-vertical);display:table;table-layout:fixed;width:100%}table th{text-align:left}table td{color:var(--ifm-table-cell-color)}.theme-doc-footer{margin-bottom:96px}.theme-doc-footer-edit-meta-row div[class*=lastUpdated_]{font-style:normal;opacity:.7}.navbar-sidebar__item{padding-block:0;padding-inline:var(--content-padding)}.navbar-sidebar__back{align-items:center;display:flex;gap:16px;margin:24px 0!important;padding:0;width:100%!important}.theme-doc-sidebar-menu .menu__link{padding-left:var(--content-padding);padding-right:0}.menu__list-item-collapsible>a[aria-expanded=true]>svg{transform:rotate(180deg)}main[itemtype*=Blog]{margin-left:0}.mdx-ghc-subheader-text,main[itemtype*=Blog] .theme-doc-breadcrumbs{margin-bottom:40px}main[itemtype*=Blog] .blog-divider{background:rgb(var(--lsd-theme-primary));margin-block:40px}.events .theme-doc-markdown>h1{margin-bottom:16px!important}.events .theme-doc-breadcrumbs{display:block}.container{padding-inline:var(--content-padding)}.main-wrapper>.container{margin-bottom:80px!important;margin-top:0!important}.main-wrapper>main,.main-wrapper>main>.row,.main-wrapper>main>.row>.col{--ifm-spacing-horizontal:var(--content-padding);flex-basis:100%!important;flex:unset;margin:0;max-width:unset;width:100%!important}.footer{margin-bottom:18px;width:100%!important}.footer>div{display:grid;gap:1rem;margin:unset;max-width:unset;padding:16px 0}.footer__bottom{grid-column:1/12;grid-row:1/1;text-align:unset}.blog-archive-page .main-wrapper header .container p,.blog-wrapper main>section article ul li a:after,.blog-wrapper main>section article ul li a:before,.footer__bottom>div:first-of-type,.mdx-accordion-item>input,.modal_kLVz .closeButton_Rr0e,.theme-doc-breadcrumbs,.themedImage_kfRS,.toast_C8x1 .lsd-toast__close-button,[data-hidden-doc-sidebar=true] .theme-doc-sidebar-container,[data-theme=dark] .lightToggleIcon_K4TL,[data-theme=light] .darkToggleIcon_lKkA,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.footer__title{font-family:var(--lsd-typography-generic-font-family)!important;font-size:var(--lsd-label1-fontSize)!important;font-weight:var(--lsd-label1-fontWeight)!important;font-weight:var(--ifm-font-weight-normal);line-height:var(--lsd-label1-lineHeight)!important;margin-bottom:4px}.blog-wrapper main>section article ul li .lsd-tag>span,.blog-wrapper main>section article ul li .lsd-tag>span>span,.footer__item,.footer__item a{font-family:var(--lsd-typography-generic-font-family)!important;font-size:var(--lsd-label1-fontSize)!important;font-weight:var(--lsd-label1-fontWeight)!important;line-height:var(--lsd-label1-lineHeight)!important}.footer>div:first-child>.footer__links{display:grid;gap:12px;grid-column:13/25;grid-row:1/1;margin-bottom:0}.footer>div:nth-child(2)>.footer__links{display:grid;gap:2rem 1rem;grid-column:13/25;grid-row:1/1;grid-template-columns:repeat(2,1fr);margin-bottom:0}.footer__col{grid-template-columns:span 1}.blog-wrapper main>section article ul li a,.codeBlockStandalone_BRZX,.codeBlockStandalone_MEMb,.col.footer__col,.modal_kLVz>div>div:first-child,.noResults_mD2O,.root_N57j ul,.root_ONDG.empty_a7qb{padding:0}.footer__items{display:flex;flex-direction:row;flex-wrap:wrap;gap:.5rem}.footer__item{display:inline-flex}.footer__item:not(:last-child):after{content:"•";display:inline-block;margin-left:8px;text-decoration:none}.footer__logo{max-width:var(--ifm-footer-logo-max-width);margin:0!important}.navbar__inner{flex-direction:row}.hero--primary{--ifm-hero-background-color:rgb(var(--lsd-surface-primary));--ifm-hero-text-color:rgb(var(--lsd-text-primary))}.docusaurus-mermaid-container{margin-block:40px}.overflow-hidden{overflow:hidden}.hidden-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.hidden-scrollbar::-webkit-scrollbar{display:none;width:0}[class^=mdx-]{--lsd-h1-fontWeight:100;--lsd-h2-fontWeight:300;--lsd-h3-fontWeight:300;--lsd-h4-fontWeight:300;--lsd-h5-fontWeight:300;--lsd-h6-fontWeight:300;--lsd-subtitle1-fontWeight:300}.hidden,.mdx-hero-video .mdx-hero-video__placeholder{opacity:0;visibility:hidden}.blog-wrapper h1[itemprop=headline]{font-family:var(--lsd-typography-generic-font-family)!important;font-size:var(--lsd-h1-fontSize)!important;font-weight:var(--lsd-h1-fontWeight)!important;line-height:var(--lsd-h1-lineHeight)!important}.blog-wrapper>.container{display:flex;margin:0;max-width:unset;padding-inline:0;width:100%}.blog-wrapper>.container>.row,.form_lk4c .inputs_dj3Q>*,.mdx-roadmap,.mdx-scroll-buttons,.root_lcb5>*{width:100%}.blog-wrapper main>header h1{font-family:var(--lsd-typography-generic-font-family)!important;font-size:var(--lsd-h3-fontSize)!important;font-weight:var(--lsd-h3-fontWeight)!important;line-height:var(--lsd-h3-lineHeight)!important;margin-bottom:.5rem}.blog-wrapper>.container>.row>aside{max-width:unset}.blog-wrapper>.container>.row>aside>nav{padding-top:16px;top:var(--ifm-navbar-height)}.blog-wrapper>.container>.row>aside>nav>div:first-child{font-family:var(--lsd-typography-generic-font-family)!important;margin-bottom:0!important;padding:4px 0 4px 15px}.blog-wrapper>.container>.row>aside>nav>ul li a{box-sizing:border-box;display:block;font-family:var(--lsd-typography-generic-font-family)!important;opacity:.6;padding:4px 0 4px 2rem}.blog-wrapper--index>.container>.row>aside>nav>div:first-child,.blog-wrapper>.container>.row>aside>nav>ul li a[class*=sidebarItemLinkActive_]{border-color:rgb(var(--lsd-border-primary))}.blog-wrapper main article,.mdx-asset-card:not(.mdx-asset-card--downloadable) .mdx-asset-card__inner,.mdx-erc--with-preview .mdx-erc__preview-image{border-bottom:1px solid rgb(var(--lsd-border-primary))}.blog-wrapper--index h2[itemprop=headline]{font-family:var(--lsd-typography-generic-font-family)!important;font-size:var(--lsd-h4-fontSize)!important;font-weight:var(--lsd-h4-fontWeight)!important;line-height:var(--lsd-h4-lineHeight)!important}.blog-wrapper>.container>.row>main{margin-top:16px;max-width:unset}.blog-archive-page .main-wrapper header .container h1,.blog-wrapper article header h2,.blog-wrapper main>section article h2{font-family:var(--lsd-typography-generic-font-family)!important;font-size:var(--lsd-h3-fontSize)!important;font-weight:var(--lsd-h3-fontWeight)!important;line-height:var(--lsd-h3-lineHeight)!important}.blog-wrapper article footer{align-items:center;display:flex;flex-direction:row;justify-content:space-between;margin-top:24px!important}.blog-wrapper main article{margin-bottom:34px!important;padding-bottom:34px}.blog-wrapper main article:last-of-type{border-bottom:none!important}.blog-archive-page .main-wrapper{padding:2rem var(--content-padding)}.blog-archive-page .main-wrapper header{border-bottom:1px solid var(--ifm-hero-text-color);margin:0;padding:0 0 1rem}.blog-archive-page .main-wrapper header .container{margin:0;padding:0!important}.blog-archive-page .main-wrapper main>section .container{margin:0;max-width:unset;padding:0}.blog-archive-page .main-wrapper main>section .container>.row{margin-top:64px}.blog-archive-page .main-wrapper main>section .container>.row>.col{margin:0!important;max-width:unset;padding:0}.blog-archive-page .main-wrapper main>section .container>.row>.col h3{font-family:var(--lsd-typography-generic-font-family)!important;font-size:var(--lsd-h5-fontSize)!important;font-weight:var(--lsd-h5-fontWeight)!important;line-height:var(--lsd-h5-lineHeight)!important}.blog-archive-page .main-wrapper main>section .container>.row>.col a{font-family:var(--lsd-typography-generic-font-family)!important;font-size:var(--lsd-body1-fontSize)!important;font-weight:var(--lsd-body1-fontWeight)!important;line-height:var(--lsd-body1-lineHeight)!important}.blog-archive-page .main-wrapper main>section .container>.row>.col ul{margin:1rem 0 0;padding:0 0 0 1.5rem}.blog-wrapper main>section article{border-bottom:none;padding:0}.blog-wrapper main>section article ul,.mdx-app-card__name{margin-top:1rem}.blog-wrapper main>section article ul li{margin:0 .5rem 0 0!important;padding:0!important}.blog-wrapper main>section article ul li .lsd-tag{height:28px;padding:3px 11px}.community-container article{margin:16px auto 0;max-width:796px}div:has(.community-container)>.container{margin-bottom:0!important;padding-bottom:0!important}.breadcrumbs__item--active{border:none!important}.breadcrumbs__item--active>span{padding:unset!important}.mdx-event-cta-section__form .lsd-typography--body2{margin-left:16px}.mdx-accordion-item__header{align-items:center;display:flex;flex-direction:row;gap:0 16px;justify-content:space-between;min-height:88px;padding:16px 0}.mdx-accordion-item__content-wrapper{height:auto;overflow:hidden}.mdx-accordion-item__content{height:0}.mdx-accordion-item--open .mdx-accordion-item__content{height:auto;padding-bottom:1.875rem;padding-top:6px}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit;text-decoration:underline}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:var(--docusaurus-announcement-bar-height)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}.breadcrumbsContainer_RLvU{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:24px}.iconExternalLink_nPIU{margin-left:.3rem}[data-theme=dark] .themedImage--dark_OvIx,[data-theme=light] .themedImage--light_BL8e,html:not([data-theme]) .themedComponent--light_NU7w,html:not([data-theme]) .themedImage--light_BL8e{display:initial}.container_YAWF,.form_lk4c .inputs_dj3Q,.form_lk4c .submit_J_94,.header_Gr5N,.root_lcb5,.toHome_tEiU{align-items:center;display:flex;flex-direction:column;justify-content:center}.container_YAWF{display:flex!important;min-height:calc(100vh - var(--ifm-navbar-height))}.root_lcb5{max-width:448px;width:90%}.header_Gr5N{gap:4px;padding-bottom:56px}.header_Gr5N p{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.toast_C8x1{margin-bottom:32px;margin-top:-24px;width:100%!important}.form_lk4c .inputs_dj3Q{gap:24px;width:100%}.form_lk4c .submit_J_94{padding:48px 0;width:100%}.form_lk4c .submit_J_94 button{font-size:14px;font-style:normal;font-weight:400;line-height:20px;padding:6px 24px}.toHome_tEiU{padding:48px 0}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.copyButtonCopied_YovB .copyButtonIcon_ZL7v,.l-modal,.mdx-hero-video--loading .mdx-hero-video__video{opacity:0}.firstRow_ar1q{border-top:1px solid rgb(var(--lsd-text-primary));margin-bottom:96px!important}.mdx-cta-section,.mdx-cta-section--list .mdx-cta-section__list>:not(:first-child),.mdx-feature-list__feature,.mdx-showcase-card,.secondRow__ww3{border-top:1px solid rgb(var(--lsd-border-primary))}.firstRow_ar1q,.secondRow__ww3{display:flex;flex-direction:row}.backToTop_wDfN{bottom:16px;left:16px;position:absolute}.l-modal,.l-modal__backdrop{position:fixed;top:0;left:0}.backToTop_wDfN,.footerLink_sh7M{width:-moz-fit-content;width:fit-content}.footerLink_sh7M{height:-moz-fit-content;height:fit-content;text-decoration:underline}.mdx-asset-card,.mdx-cta-button:hover,.mdx-cta-button:hover *{text-decoration:none!important}.toggle_K23S{border:1px solid rgb(var(--lsd-border-primary));height:32px;width:32px}.toggle_K23S svg{height:14px;width:14px}.toggleButton_dl49{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.l-modal__content,.mdx-asset-card{border:1px solid rgb(var(--lsd-border-primary))}.toggleButton_dl49:hover{background:var(--ifm-color-emphasis-200)}.toggleButtonDisabled_AAS_{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}.l-modal{height:100vh;transition:.3s;visibility:hidden;width:100%;z-index:9999}.l-modal__container{display:grid;gap:1rem;grid-template-columns:repeat(24,1fr);margin:0 auto;max-width:1376px;overflow:auto}.l-modal--open{opacity:1;visibility:visible}.l-modal__content{background:rgb(var(--lsd-surface-primary));grid-column:8/19;height:-moz-fit-content;height:fit-content;margin:64px 0;max-height:80vh;padding:7px;z-index:9998}.l-modal__backdrop{background-color:rgba(var(--lsd-surface-primary),.6);height:100%;width:100%;z-index:9997}.modal_kLVz .header_QwCa{align-items:center;display:flex;flex-direction:row;gap:.5rem}.icon_S7Kx.s_AZDZ svg{width:10px}.icon_S7Kx.m_thRi svg{width:20px}.icon_S7Kx.l_WHPt svg{width:40px}[data-theme=dark] .icon_S7Kx.fill_hNhN,[data-theme=dark] .icon_S7Kx.fill_hNhN *{fill:var(--ifm-color-white)}[data-theme=dark] .icon_S7Kx.stroke_N8dm svg,[data-theme=dark] .icon_S7Kx.stroke_N8dm svg *{stroke:var(--ifm-color-white)}[data-theme=light] .icon_S7Kx.fill_hNhN,[data-theme=light] .icon_S7Kx.fill_hNhN *{fill:var(--ifm-color-black)}[data-theme=light] .icon_S7Kx.stroke_N8dm svg,[data-theme=light] .icon_S7Kx.stroke_N8dm svg *{stroke:var(--ifm-color-black)}.mdx-app-card{align-items:flex-start;display:flex;flex-direction:column;padding:1.5rem 0}.mdx-app-card__logo{height:40px;width:auto}.mdx-app-card__description{margin-top:1.5rem}.mdx-app-card__link{margin-top:1.5rem;width:100%}.mdx-app-card__link button{padding:10px 16px;width:100%}.mdx-app-card__link button>span{align-items:center;display:block;display:flex;flex-direction:row;justify-content:space-between;width:100%}.root_TTsz{display:inline-block;font-size:0!important;position:relative}.externalLinkIcon_Qfue svg,.root_TTsz.fullWidth_HBtH{height:auto;width:100%}.root_TTsz.fullHeight_ls1u{height:100%;width:auto}.root_TTsz .content_feMR{height:100%;left:0;position:absolute;top:0;width:100%}.root_TTsz:not(.keep_Y9Ea) .root_TTsz{height:auto;width:auto}.root_TTsz:not(.keep_Y9Ea) .content_feMR{height:100%;left:unset;position:relative;top:unset;width:100%}.mdx-asset-card{align-items:flex-start;border-bottom:none;display:flex;flex-direction:column;min-height:144px;width:216px}.mdx-asset-card__inner{padding:16px 16px 32px;width:100%}.mdx-asset-card__title,.mdx-event-profile-list__container h2,.mdx-event-profile__role,.mdx-ghc__challenge-labels,.mdx-ghc__issue-title{margin-bottom:16px}.mdx-asset-card__image img{height:100%;object-fit:contain;object-position:center center;width:100%}.mdx-asset-card__downloadables{align-items:flex-start;display:flex;flex-direction:row;justify-content:stretch;width:100%}.mdx-asset-card__downloadables>*{flex-grow:1;font-size:12px;text-decoration:none!important;text-underline-offset:unset!important}.mdx-asset-card__downloadables>* button{justify-content:space-between;text-decoration:none;width:100%}.mdx-asset-card__downloadables>:first-child button{border-left:none}.mdx-asset-card__downloadables>:last-child button,.mdx-asset-card__downloadables>:not(:last-child) button{border-right:none}.mdx-box{padding-bottom:var(--mdx-box-bottom);padding-top:var(--mdx-box-top)}.mdx-cta-button,.mdx-section-header--with-description .mdx-section-header__extra{margin-top:2rem}.mdx-cta-button button,.mdx-cta-button button span{font-size:inherit;font-weight:inherit;line-height:inherit}.mdx-cta-button .lsd-button--large{padding:9px 39px}.mdx-cta-button .lsd-button--small{padding:5px 11px}.mdx-cta-section{display:grid;padding:24px 0 0}.mdx-cta-section .mdx-cta-section__link,.mdx-jpd__job-link{display:block;width:-moz-fit-content;width:fit-content}.mdx-cta-section--title-only .mdx-cta-section__title{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-h5-fontSize);font-weight:var(--lsd-h5-fontWeight);font-weight:300;line-height:var(--lsd-h5-lineHeight);max-width:886px}.mdx-cta-section--title-button .mdx-cta-section__title{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-display4-fontSize);font-weight:var(--lsd-display4-fontWeight);font-weight:300;line-height:var(--lsd-display4-lineHeight);max-width:886px}.mdx-cta-section--full-width .mdx-cta-section__container{display:grid;gap:0 1rem;grid-template-columns:repeat(2,1fr)}.mdx-cta-section--full-width .mdx-cta-section__title{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-h5-fontSize);font-weight:var(--lsd-h5-fontWeight);line-height:var(--lsd-h5-lineHeight)}.mdx-cta-section--full-width .mdx-cta-section__description,.mdx-ns__description{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-h3-fontSize);font-weight:var(--lsd-h3-fontWeight);line-height:var(--lsd-h3-lineHeight)}.mdx-cta-section--full-width .mdx-cta-section__link{grid-area:2/2/3/3}.mdx-cta-section--simple .mdx-cta-section__title{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-h5-fontSize);font-weight:var(--lsd-h5-fontWeight);line-height:var(--lsd-h5-lineHeight)}.mdx-cta-section--simple .mdx-cta-section__description{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-h2-fontSize);font-weight:var(--lsd-h2-fontWeight);line-height:var(--lsd-h2-lineHeight);margin-top:2rem}.mdx-cta-section--list{display:grid;gap:0 1rem;grid-template-columns:1fr 1fr}.mdx-cta-section--list .mdx-cta-section__container{grid-column:1/2}.mdx-cta-section--list .mdx-cta-section__title{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-h5-fontSize);font-weight:var(--lsd-h5-fontWeight);line-height:var(--lsd-h5-lineHeight)}.mdx-cta-section--list .mdx-cta-section__description{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-h1-fontSize);font-weight:var(--lsd-h1-fontWeight);line-height:var(--lsd-h1-lineHeight);margin-top:2rem}.mdx-cta-section--list .mdx-cta-section__list{display:flex;flex-direction:column;gap:1.5rem 0;grid-column:2/3}.mdx-erc--with-preview .mdx-erc__icon,.mdx-ns__inner .mdx-ns__toast .lsd-toast__close-button{display:none}.mdx-cta-section--list .mdx-cta-section__list>a{display:block;text-decoration:none}.mdx-erc,.mdx-ghc__issue-title-link,.mdx-ghc__view-on-github-link,.mdx-hero-action button:hover,.mdx-hero-action button:hover *,.mdx-hero-action:hover,.mdx-hero-action:hover *{text-decoration:none!important}.mdx-cta-section--list .mdx-cta-section__list .mdx-cta-section__list-item>.mdx-cta-section__item-title{background-color:rgb(var(--lsd-surface-secondary));border-radius:1rem;color:rgb(var(--lsd-text-secondary));display:inline-block;margin-top:1.5rem;padding:3px 11px}.mdx-cta-section--list .mdx-cta-section__list .mdx-cta-section__list-item>.mdx-cta-section__item-description{margin-top:1rem}.mdx-doc-metadata{display:flex;flex-direction:row;line-height:0;margin-bottom:2.5rem}.mdx-doc-metadata>span:not(:last-child):after{content:"•";display:inline-block;margin-inline:.75rem}.markdown h1+.mdx-doc-metadata,.markdown header+.mdx-doc-metadata{margin-top:calc(var(--ifm-h1-vertical-rhythm-bottom)*-1*var(--ifm-leading) + 1rem)}.mdx-erc{align-items:flex-start;border:1px solid rgb(var(--lsd-border-primary));display:flex;flex-direction:row;min-height:144px}.mdx-erc__icon{padding:16px 16px 16px 8px}.mdx-erc__inner{flex-grow:1;padding:16px}.mdx-erc:hover .mdx-erc__title{text-decoration:underline!important}.mdx-erc__logo,.mdx-erc__logo svg{height:32px!important;width:32px!important}.mdx-erc__title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;margin-top:32px;max-height:calc(var(--lsd-body1-lineHeight)*2);overflow:hidden}.mdx-erc__description{margin-top:8px}.mdx-erc--with-preview{display:flex;flex-direction:column}.mdx-erc--with-preview .mdx-erc__preview-image{height:100%;object-fit:cover;width:100%}.mdx-erc--with-preview .mdx-erc__inner{display:grid;gap:0 16px;grid-template-columns:32px auto;grid-template-rows:auto auto;padding:16px}.mdx-erc--with-preview .mdx-erc__logo{align-self:center;grid-column:1;grid-row:1/span 2}.mdx-erc--with-preview .mdx-erc__title{-webkit-line-clamp:1;-webkit-box-orient:vertical;margin-top:0;max-height:calc(var(--lsd-body1-lineHeight)*1)}.mdx-erc--with-preview .mdx-erc__description{margin-top:4px}.mdx-feature-list{border-top:1px solid rgb(var(--lsd-surface-secondary));position:relative}.mdx-feature-list__title,.root_ltHz{padding:24px 0}.mdx-feature-list__feature-index{align-items:center;background:rgb(var(--lsd-surface-secondary));border-radius:100%;color:rgb(var(--lsd-text-secondary))!important;display:inline-flex;height:1.875rem;justify-content:center;padding:.5rem;width:1.875rem}.mdx-feature-list__list{display:grid;grid-template-columns:repeat(2,1fr)}.mdx-event-profile__info,.mdx-feature-list__feature-inner{display:flex;flex-direction:column}.mdx-feature-list__feature-title{margin-top:1rem}.mdx-feature-list__header{align-items:center;display:flex;flex-direction:row;gap:2rem}.mdx-feature-list--cta-bottom .mdx-feature-list__extra{margin-top:3.5rem;padding:0 1rem}.mdx-event-cta-section__container,.mdx-ghc__container{border-top:1px solid rgb(var(--lsd-border-primary));padding-top:24px}.mdx-ghc__issue-title-link:hover,.mdx-ghc__view-on-github-link:hover{text-decoration:underline!important}.mdx-ghc__header,.mdx-jpd__header{margin-bottom:40px;margin-top:16px}.mdx-ghc__challenge-label{border:1px solid rgb(var(--lsd-border-primary));border-radius:20px;margin-right:8px;padding:4px 8px}.mdx-ghc__view-on-github-link{display:block;margin-bottom:56px;margin-top:40px;width:-moz-fit-content;width:fit-content}.mdx-ghc__participant-photo{border:1px solid rgb(var(--lsd-border-secondary));border-radius:100%;margin-left:-4px;width:24px}.mdx-ghc__participant-photo-container{align-items:center;direction:rtl;display:flex;justify-content:flex-end;padding-left:4px}.mdx-ghc__comment-count{margin-left:4px}.mdx-ghc__issue-content-grid{align-items:center;display:grid;grid-template-columns:82px 135px 82px 1fr;margin-top:24px;row-gap:12px}.mdx-scroll-buttons>div{display:flex;flex-direction:row;justify-content:flex-end;width:100%}.mdx-hero{--hero-max-height:1080px;display:flex;flex-direction:column;height:calc(100vh - var(--ifm-navbar-height) - 8px);max-height:var(--hero-max-height);position:relative}.groups_p1lF,.root_ONDG{max-height:60vh;overflow-y:auto}.mdx-hero-action--large button{padding:10px 64px}.mdx-hero-actions{align-items:center;display:flex;flex-direction:row;gap:0 1rem;margin-top:2rem;position:relative;z-index:98}.mdx-hero-description{margin-top:18px;max-width:1260px;position:relative;text-shadow:1px 1px 6px rgba(var(--lsd-surface-primary),1);z-index:-2}.mdx-hero-info{border-bottom:1px solid rgb(var(--lsd-surface-secondary));display:flex;flex-direction:column;justify-content:end;padding:32px 0;transition:margin-bottom .05s ease-in-out}.mdx-profile-card,.mdx-profile-card__avatar{border:1px solid rgb(var(--lsd-border-primary))}.mdx-timeline-item,.mdx-timeline-item__border{border-bottom:1px solid rgb(var(--lsd-border-primary))}.mdx-hero-model{--mdx-hero-model-wrapper-scale:1;position:absolute;transform:translateX(calc(-50vw - var(--container-max-width)*-1/2 + (var(--content-padding))*4*-1/2));width:100vw;z-index:0}.mdx-hero-model .mdx-hero-model--inner{left:0;position:relative;top:0;width:100%;z-index:0}.mdx-hero-model .mdx-hero-model--inner canvas{pointer-events:unset!important}.mdx-hero-model--top{top:300px}.mdx-hero-model--bottom{top:calc(var(--logos-hero-info-height) - 10px)}.mdx-hero-model--bottom .mdx-hero-model--shade{bottom:10vh;height:40vh}.mdx-hero-model--ascii{filter:grayscale(100%);opacity:.65}.mdx-hero-model--ascii table,.mdx-hero-model--ascii table *{border:none!important;color:rgb(var(--lsd-text-primary));font-family:monospace}.mdx-hero-model--shade{background:linear-gradient(0deg,rgb(var(--lsd-surface-primary)) 37%,rgb(var(--lsd-surface-primary)) 0,rgba(var(--lsd-surface-primary),0) 100%);bottom:0;height:30vh;left:0;position:absolute;width:100%}.mdx-hero-title{font-size:70px!important;line-height:100%!important}.mdx-hero-video{--hero-video-height:120%;--hero-video-min-height:100vh;--hero-video-offset-y:-150px;--hero-video-scale:1.70951586;--hero-video-height-mobile:120%;--hero-video-min-height-mobile:100vh;--hero-video-offset-y-mobile:-50px;--hero-video-scale-mobile:1.70951586;display:grid;flex-grow:1;grid-template-columns:1fr;grid-template-rows:1fr;position:relative}.mdx-hero-video>*{align-items:center;display:flex;flex-direction:column;grid-column:1/1;grid-row:1/1;height:var(--hero-video-height);justify-content:center;left:0;min-height:var(--hero-video-min-height);position:absolute;top:0;transform:translateY(var(--hero-video-offset-y));width:100%}.mdx-hero-video img{object-fit:contain}.mdx-hero-video img,.mdx-hero-video video{height:100%;max-width:calc(var(--container-max-width)*var(--hero-video-scale));object-position:top;transform-origin:top center;width:auto}.mdx-hero-video--loading .mdx-hero-video__placeholder{opacity:1;visibility:visible}.mdx-jpd__single-job-department-container{border-top:1px solid rgb(var(--lsd-border-primary));padding-top:8px}.mdx-jpd__department-title{font-size:12px!important;line-height:16px!important}.mdx-jpd__job-title-container{align-items:center;display:flex;padding-bottom:8px}.mdx-jpd__job-list{list-style-type:none;margin:0;padding:8px 0 24px}.mdx-jpd__job-list-item{padding:14px 0}.mdx-jpd__job-link,.mdx-jpd__job-link:hover,.root_Ooa0{text-decoration:none!important}.mdx-event-card__title:hover,.mdx-jpd__job-link:hover .mdx-jpd__job-title,.mdx-social-card:hover{text-decoration:underline!important}.mdx-logo-carousel .mdx-section-header__title{flex-basis:100%}.mdx-logo-carousel .mdx-section-header__extra{margin-left:auto}.mdx-logo-carousel .mdx-logo-carousel__inner{margin-top:100px}.mdx-logo-carousel .mdx-logo-carousel__item{flex-shrink:0}.mdx-logo-carousel .mdx-logo-carousel__logo{height:56px;width:auto}.mdx-ns__inner form{margin-top:40px;width:100%}.mdx-ns__inner .mdx-ns__inputs{align-items:center;display:flex;flex-direction:row;gap:16px;width:100%}.mdx-ns__inner .mdx-ns__inputs>*{flex-grow:1}.mdx-ns__inner .mdx-ns__submit-button{margin-top:40px}.mdx-ns__inner .mdx-ns__toast{margin-bottom:24px;margin-top:-16px;width:100%}.mdx-profile-card{align-items:flex-start;display:flex;flex-direction:column;height:var(--card-height);justify-content:space-between;padding:1rem}.mdx-profile-card__profile{display:flex;flex-direction:column;gap:20px}.mdx-profile-card__avatar{border-radius:50%}.mdx-profile-card__avatar,.mdx-profile-card__avatar svg,.mdx-social-card__logo,.mdx-social-card__logo svg{height:40px!important;width:40px!important}.mdx-profile-card__avatar svg rect{fill:unset!important}.mdx-profile-card__buttons{display:flex;flex-direction:row;gap:8px;width:100%}.mdx-profile-card__link{height:-moz-fit-content;height:fit-content;max-width:calc(50% - 4px);position:relative;text-decoration:none}.mdx-event-card,.mdx-event-profile,.mdx-social-card{text-decoration:none!important}.mdx-timeline-item{display:flex;flex:0 0 auto;flex-direction:column;gap:1rem;justify-content:space-between;min-height:306px;padding-bottom:23px;scroll-snap-align:start!important;width:236px}.mdx-timeline-item__header{align-items:flex-start;display:flex;flex-direction:column;gap:1rem}.mdx-timeline-item__period-container{position:relative;width:100%}.mdx-timeline-item__border{height:50%;left:0;position:absolute;top:0;width:calc(100% + 1rem);z-index:-1}.mdx-timeline-item--border-dashed .mdx-timeline-item__border{border-bottom-style:dashed}.mdx-timeline-item__period{border-radius:10rem;display:inline-block;padding:3px 12px}#__docusaurus-base-url-issue-banner-container,.docItemContainer_hrrU .tocMobile_imaF:not(:first-of-type),.docSidebarContainer_b6E3,.groups_p1lF .divider_eGUz:last-child,.mdx-roadmap__timeline .mdx-grid-item:last-child .mdx-timeline-item__border,.mdx-timeline-item__item:last-child .mdx-timeline-item__border,.sidebarLogo_Ydl9,.wrapper_SWrM .fullscreenButton_Bocn{display:none}.mdx-timeline-item__period--filled{background-color:rgb(var(--lsd-surface-secondary));border:1px solid rgb(var(--lsd-border-secondary));color:rgb(var(--lsd-text-secondary))!important}.mdx-timeline-item__period--transparent{background-color:rgb(var(--lsd-surface-primary));border:1px solid rgb(var(--lsd-border-primary));color:rgb(var(--lsd-text-primary))!important}.mdx-roadmap__timeline{margin-top:6.25rem}.mdx-roadmap__timeline-item{height:100%}.scrollToBottom_NE5w{--offset-y:-2rem;background:rgb(var(--lsd-surface-primary))!important;opacity:1;position:absolute;top:min(100*var(--vh) - var(--ifm-navbar-height),var(--maxTop) - var(--ifm-navbar-height));transform:translateY(-2rem);transform:translateY(calc(-100% + var(--offset-y)));transition:.2s ease-in-out;z-index:100}.scrollToBottom_NE5w.hide_q_kn{opacity:0;transform:translateY(calc(-100% + var(--offset-y) - .625rem))}.mdx-section-header{border-top:1px solid rgb(var(--lsd-border-primary));display:flex;flex-direction:row;gap:1rem;padding-top:24px;width:100%}.mdx-section-header>*{flex-basis:50%}.mdx-section-header__title{display:flex;flex-direction:row;gap:2rem}.mdx-showcase-card__inner{display:flex;flex-direction:column;gap:1.5rem;padding-top:1.5rem}.mdx-showcase-card__logo{height:auto;width:58px}.mdx-showcase-card__index{align-items:center;background-color:rgb(var(--lsd-surface-secondary));border-radius:50%;color:rgb(var(--lsd-text-secondary))!important;display:flex;flex-direction:row;height:30px;justify-content:center;width:30px}.mdx-showcase-card__description{margin-top:-.125rem;padding-top:.5rem}.mdx-showcase-card--large .mdx-showcase-card__logo{width:58px}.mdx-showcase-card--small .mdx-showcase-card__logo{width:34px}.mdx-showcase-card--border-solid .mdx-showcase-card__description{border-top:1px solid rgb(var(--lsd-border-primary));padding-top:1rem}.mdx-social-card{align-items:flex-start;border:1px solid rgb(var(--lsd-border-primary));display:flex;flex-direction:column;justify-content:space-between;min-height:144px;padding:1rem}.mdx-event-banner__thumbnail,.mdx-event-card__thumbnail{aspect-ratio:5/1;border:1px solid rgba(var(--lsd-border-primary),.2)}.mdx-social-card__row{display:flex;justify-content:space-between;width:100%}.mdx-event-card{display:flex;flex-direction:column;gap:24px}.mdx-event-card__row,.mdx-event-profile__row{display:flex;gap:8px;justify-content:space-between;width:100%}.mdx-event-card__info{border-top:1px solid rgba(var(--lsd-border-primary),.2);display:flex;flex-direction:column;gap:16px;padding:16px 16px 16px 0;width:100%}.mdx-event-card__info *,.mdx-event-info__content{white-space:pre-wrap}.mdx-event-card-list__button{display:block;margin:0 auto}.mdx-event-banner__thumbnail{margin-bottom:32px}.mdx-event-info__container{align-self:stretch;background:rgba(var(--lsd-theme-primary),.05);border-top:1px solid rgba(var(--lsd-border-primary));display:flex;flex:1 0 0;flex-direction:column;gap:16px;height:100%;padding:16px}.mdx-event-about__container{display:grid;gap:16px;grid-template-columns:repeat(12,1fr)}.mdx-event-about__container h2{grid-column:1/2;margin-top:0!important}.mdx-event-about__container span{grid-column:5/13}.mdx-event-profile{display:flex;flex-direction:column;gap:16px}.mdx-event-profile__image{aspect-ratio:1/1}.mdx-event-profile__title{margin-bottom:8px}.mdx-event-profile__social{align-items:center;display:flex;gap:8px}.mdx-event-cta__container h2{margin-bottom:32px;margin-top:0!important}.mdx-event-cta__button{height:70px!important;width:100%!important}.mdx-event-cta__button>span{align-items:center;display:flex;height:100%;justify-content:space-between}.mdx-event-cta-section__container h2{margin-bottom:16px;margin-top:0!important}.mdx-event-cta-section__container h3{margin-top:24px!important}.mdx-event-cta-section__cta{height:40px!important;width:160px!important}.mdx-event-cta-section__description{margin-bottom:32px!important;white-space:pre-wrap}.mdx-event-cta-section__form{display:flex;flex-direction:column;gap:40px}.mdx-event-cta-section__input-fields{display:flex;gap:16px}.mdx-event-header__container{display:flex;flex-direction:column;gap:24px}.mdx-event-header__container h1{margin-bottom:0!important}.root_EFVO{padding:32px;text-align:center}.root_ONDG{padding:24px}.title_uwS_{font-size:.75rem!important}.item_RHYF{align-items:center;display:flex;flex-direction:row;margin-top:1rem}.item_RHYF .itemTitle_jtAv{flex-grow:1;overflow:hidden;padding-left:1rem;text-overflow:ellipsis;white-space:nowrap}.linkContent__x3v,.root_JWD1{align-items:center;display:flex}.item_RHYF .itemTitle_jtAv mark,.root_JWD1 mark{background:none;color:inherit}.root_xZfc{padding:8px 8px 0;position:relative;width:100%}.collapse_LWBd button,.textField_af43{width:100%!important}.textField_af43 button svg{height:auto;max-height:100%!important;width:14px}.root_N57j>div:first-child{color:#828285;padding:0 24px}.root_N57j>div:first-child,.root_N57j>div:first-child *{font-size:.75rem}.root_N57j ul li{margin-top:1rem}.root_JWD1{padding:0 24px}.root_JWD1>div{margin-left:1rem}.root_Ooa0.level1_fpUf{display:block;padding-left:32px}.icon_sZn2{height:auto;width:16px}.icon_sZn2.fill_fkan,.icon_sZn2.fill_fkan *{fill:currentColor}.icon_sZn2.stroke_j3wH,.icon_sZn2.stroke_j3wH *{stroke:currentColor}[data-theme=light] .icon_sZn2{color:#000}[data-theme=dark] .icon_sZn2{color:#fff}.groups_p1lF{display:flex;flex-direction:column;gap:16px}[data-theme=dark] .divider_eGUz>div{opacity:.1}[data-theme=dark] .topBar_Dtew button{background-color:var(--ifm-button-color)}.linkContent__x3v{gap:6px;text-decoration:none}.linkContent__x3v:hover{text-decoration:underline;text-decoration-color:rgba(var(--lsd-text-primary),.6);text-underline-offset:.3rem}.externalLinkIcon_Qfue{width:8px}.dropdownNavbarItem_o23I{border:1px solid rgb(var(--lsd-border-primary));height:28px;padding:6px 12px}.navbarHideable_OoEf{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_zoxl{transform:translate3d(0,calc(-100% - 2px),0)}.codeBlockContainer_Ckt0{background:var(--prism-background-color);border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw)}.codeBlockContainer_Ckt0,.codeBlockContainer_EB2s{color:var(--prism-color);margin-bottom:var(--ifm-leading)}.codeBlockContainer_EB2s{background:#0000;border-radius:0}.codeBlockContent_biex{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Ktv7{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlock_TWhw,.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockTitle_Ktv7+.codeBlockContent_biex .codeBlock_bY9V,.codeBlockTitle_sjMo+.codeBlockContent_ugSV .codeBlock_TWhw{border-top-left-radius:0;border-top-right-radius:0}.codeBlockLines_LDrR,.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.buttonGroup_Qu4e button,.buttonGroup__atx button{color:var(--prism-color);line-height:0;transition:opacity var(--ifm-transition-fast) ease-in-out}.codeBlockLinesWithNumbering_bsRF,.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}.buttonGroup_Qu4e,.buttonGroup__atx{column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup__atx button{align-items:center;background:var(--prism-background-color);border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;opacity:0;padding:.4rem}.buttonGroup__atx button:focus-visible,.buttonGroup__atx button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup__atx button{opacity:.4}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.nav_cMpg,.root_QACb{margin:0 auto;max-width:var(--container-max-width)}.codeLine_lJS_{counter-increment:a;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;overflow-wrap:normal;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%}.codeLineNumber_Tfdd:before{content:counter(a);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_YovB{opacity:1!important}.copyButtonIcons_an20{align-items:center;display:flex;justify-content:center;position:relative}.copyButtonIcon_ZL7v,.copyButtonSuccessIcon_P2h8{fill:currentColor;height:14px;opacity:inherit;transition:all var(--ifm-transition-fast) ease;width:14px}.copyButtonSuccessIcon_P2h8{color:#00d600;opacity:0}.copyButtonCopied_YovB .copyButtonSuccessIcon_P2h8{opacity:1;transition-delay:75ms}.wordWrapButtonIcon_Bwma{height:1.2rem;width:1.2rem}.codeBlockContent_ugSV,.wrapper_SWrM{position:relative}.codeBlockTitle_sjMo{background:var(--prism-background-color);border-bottom:1px solid var(--ifm-color-primary);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.buttonGroup_Qu4e button{align-items:center;background:var(--prism-background-color);border:1px solid rgb(var(--lsd-border-primary));display:flex;height:28px;justify-content:center;opacity:0;width:28px}.buttonGroup_Qu4e button:focus-visible,.buttonGroup_Qu4e button:hover{opacity:1!important}.anchorWithStickyNavbar_LWe7{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorWithHideOnScrollNavbar_WYt5{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;user-select:none}.hash-link:before{content:"#"}.img_ev3q{height:auto}.backdrop_Ifvc{background:rgb(var(--lsd-surface-primary));z-index:201}.backdrop_Ifvc,.navWrapper_ybYI{height:100%;left:0;opacity:0;position:fixed;top:0;visibility:hidden;width:100%}.navWrapper_ybYI{background:#0000;z-index:203}.navWrapper_ybYI>*{pointer-events:auto}.nav_cMpg{align-items:center;background:rgb(var(--lsd-surface-primary));display:flex;flex-direction:row;height:var(--ifm-navbar-height);justify-content:space-between;padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.visible_ynAX{opacity:1!important;visibility:visible!important}.wrapper_SWrM:not(.active_qZD5) .fullscreenButton_Bocn{background:rgb(var(--lsd-surface-primary));bottom:8px;position:absolute;right:8px;transition:.3s}.root_QACb{padding:0;width:100%}.rightSection_CLeF{align-items:center;display:flex;justify-content:flex-end;white-space:nowrap}.iconButtonGroup_ktNv button:not(:last-child){border-right:1px solid!important;margin-right:-1px!important}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.admonition_ntHH{border:1px solid var(--ifm-alert-border-color);display:flex;gap:18px;margin-bottom:24px;padding:18px}.admonitionHeading_JPfy{font-size:1.25rem!important;font-weight:400;line-height:1.5rem!important;margin-bottom:.3rem}.admonitionHeading_JPfy code{text-transform:none}.admonitionIcon_BGV6{display:inline-block}.admonitionIcon_BGV6 svg{display:inline-block;height:16px;width:16px}.admonitionIcon_BGV6 svg *{stroke:none!important;fill:var(--ifm-alert-border-color)}.admonitionContent_iozl{display:block;margin-top:12px}.root_UH70,.tagWithCount_gIvh{align-items:center;display:flex}.tag_dtsN{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_dtsN:hover{--docusaurus-tag-list-border:var(--ifm-link-color);text-decoration:none}.tagRegular_SGIC{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_gIvh{border-left:0;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_gIvh:after,.tagWithCount_gIvh:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_gIvh:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_gIvh:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_gIvh span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.root_UH70{flex-direction:row}.tags_LT8x{display:inline;margin:0 0 0 1rem!important;padding:0!important}.tag_NdBD:not(:first-child){margin-left:.5rem}.tag_NdBD a{margin:0!important;padding:0!important}.lastUpdated_vwxv{font-size:smaller;font-style:italic;margin-top:.2rem}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.tocCollapsibleButton_dxRj{align-items:center;border:1px solid rgb(var(--lsd-border-primary));display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButtonExpanded_TSyC:after,.tocCollapsibleExpanded_zTjk{transform:none}.tocCollapsible_ROek{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_Qsjj>ul{border-left:none;border:1px solid rgb(var(--lsd-border-primary))!important;border-top:none!important;font-size:15px;padding:.2rem 0}.tocCollapsibleContent_Qsjj ul li{margin:.4rem .8rem}.tocCollapsibleContent_Qsjj a{display:block;-webkit-text-decoration:var(--ifm-link-text-decoration);text-decoration:var(--ifm-link-text-decoration)}.badge_AsjZ{background:#0000}.docItemGrid_SzoZ{display:grid;gap:16px;grid-template-columns:repeat(14,1fr)}.gap1_XuuQ{grid-column:span 1}.toc_pP_5{grid-column:span 4}.tocMobile_imaF{margin-bottom:2rem;margin-top:-.5rem}.tocMobile_imaF>div{display:block!important;margin:0}.docItemContainer_hrrU h1{margin-bottom:40px!important}.docItemContainer_hrrU h2,.docItemContainer_hrrU h3{margin-top:32px!important}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}.docMainContainer_gTbr,.docPage__5DB{display:flex;width:100%}.docPage__5DB{flex:1 0}.docsWrapper_BCFX{display:flex;flex:1 0 auto}.root_jG9K{align-items:center;display:flex;flex-direction:column;padding:1rem!important;width:100%}.root_jG9K>div{max-width:796px!important;width:100%}.root_jG9K>div>div{align-items:flex-start;display:flex;flex-direction:column;gap:1rem;padding:0!important}.root_jG9K a{margin-top:2.5rem}.mdxPageWrapper_j9I6{justify-content:center}@media (min-width:0px){.mdx-box{--mdx-box-top:var(--mdx-box-top-xs);--mdx-box-bottom:var(--mdx-box-bottom-xs)}}@media (min-width:576px){.mdx-box{--mdx-box-top:var(--mdx-box-top-sm);--mdx-box-bottom:var(--mdx-box-bottom-sm)}}@media (min-width:768px){.blog-archive-page .main-wrapper main>section .container>.row{display:grid;gap:64px 24px;grid-template-columns:repeat(24,1fr)}.blog-archive-page .main-wrapper main>section .container>.row>.col{grid-column:span 12;margin:0!important;max-width:unset;padding:0 8.3333333333% 0 0}.mdx-box{--mdx-box-top:var(--mdx-box-top-md);--mdx-box-bottom:var(--mdx-box-bottom-md)}.mdx-scroll-buttons__button--with-label{gap:12px;min-width:83px;padding:5px 11px 5px 9px!important;width:auto!important}.mdx-scroll-buttons__button--with-label:first-of-type,.mdx-scroll-buttons__button--with-label:last-of-type{justify-content:flex-start}.mdx-scroll-buttons--spaced>div{gap:0 1rem;justify-content:space-between}.mdx-scroll-buttons--spaced>div>button:not(:last-child){border-right:1px solid rgb(var(--lsd-border-primary))!important}}@media (min-width:997px){.main-wrapper .container{padding-bottom:calc(var(--desktop-footer-gap) - var(--ifm-footer-padding-vertical))!important}.main-wrapper>div{display:grid;gap:1rem;grid-template-columns:repeat(16,42px)}.main-wrapper>div aside{border:none;grid-column:1/5;padding-left:var(--content-padding);width:auto}.main-wrapper>div main{grid-column:6/17;max-width:none}.navbar__inner{display:flex;flex-direction:row;justify-content:flex-start}.navbar__left{flex-basis:8.3333333333%;flex:0 1 auto}.navbar__left-items{flex:1 0;margin:auto}nav.menu{padding-top:16px}.navbar .lsd-icon-button--medium{height:28px!important;width:28px!important}.blog-wrapper>.container>.row{display:grid;gap:16px;grid-template-columns:repeat(24,1fr)}.blog-wrapper>.container>.row>aside{grid-column:1/5}.blog-wrapper>.container>.row>main{grid-column:6/20}.blog-wrapper:not(.blog-wrapper--index)>.container>.row>div:last-child{grid-column:21/25;max-width:unset}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.mdx-box{--mdx-box-top:var(--mdx-box-top-lg);--mdx-box-bottom:var(--mdx-box-bottom-lg)}.mdx-feature-list--bottom-aligned .mdx-feature-list__feature{min-height:332px}.mdx-feature-list--bottom-aligned .mdx-feature-list__feature-description{display:flex;flex:1 0;flex-direction:column;justify-content:flex-end}.mdx-feature-list--top-aligned .mdx-feature-list__feature-description{margin-top:136px}.mdx-feature-list__feature{padding:1rem;position:relative}.mdx-feature-list__feature-inner{height:100%;padding:.5rem}.mdx-feature-list__feature-border{background:rgb(var(--lsd-border-primary));height:calc(100% - 2rem);position:absolute;right:0;top:1rem;width:1px}.mdx-feature-list__feature:nth-child(odd){padding-left:0}.mdx-feature-list__feature:nth-child(2n){padding-right:0}.mdx-feature-list__feature:nth-child(2n) .mdx-feature-list__feature-border,.tocMobile_ITEo{display:none}.searchBox_ZlJk{padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.wrapper_SWrM:not(.active_qZD5) .fullscreenButton_Bocn{background:rgb(var(--lsd-surface-primary));bottom:8px;display:flex;opacity:0;position:absolute;right:8px;transition:.3s;visibility:hidden}.wrapper_SWrM:not(.active_qZD5):hover .fullscreenButton_Bocn{opacity:1;visibility:visible}.lastUpdated_vwxv{text-align:right}.docItemGrid_SzoZ{display:grid;gap:var(--doc-grid-gap);grid-template-columns:repeat(11,1fr)}.docItemCol_F52z{grid-column:span 11}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_NjKY{flex-grow:1;padding-top:16px}@supports (scrollbar-gutter:stable){.menu_NjKY{scrollbar-gutter:stable}}.menuWithAnnouncementBar_U5pk{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_UEyd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height)}.sidebarWithHideableNavbar__00c{padding-top:0!important}.sidebarHidden_F1ZE{opacity:0;visibility:hidden}.sidebarLogo_Ydl9{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);text-decoration:none!important}.sidebarLogo_Ydl9 img{height:2rem;margin-right:.5rem}.expandButton_m80_{align-items:center;background-color:var(--docusaurus-collapse-button-bg);display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}.expandButton_m80_:focus,.expandButton_m80_:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}.expandButtonIcon_BlDH{transform:rotate(0)}[dir=rtl] .expandButtonIcon_BlDH{transform:rotate(180deg)}.docSidebarContainer_b6E3{border-right:1px solid var(--ifm-toc-border-color);-webkit-clip-path:inset(0);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_b3ry{cursor:pointer;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_Xe31{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_gTbr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_Uz_u{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_czyv{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}}@media (min-width:997px)and (max-width:1199px){.events .main-wrapper>div aside{grid-column:1/1}.events .main-wrapper>div main{grid-column:1/17}}@media (min-width:1200px){.main-wrapper>div,.navbar__inner{display:grid;grid-template-columns:repeat(24,1fr);grid-template-columns:repeat(24,1fr)}.main-wrapper>div{gap:1rem}.main-wrapper>div aside{border:none;grid-column:1/5;width:auto}.main-wrapper>div main{grid-column:6/25;max-width:none}.theme-doc-toc-desktop{top:calc(var(--ifm-navbar-height))!important}.navbar__inner{gap:16px;padding:0}.navbar__left{align-items:center;display:flex;flex-direction:row;grid-column:1/6}.navbar__left-items{grid-column:6/20}.navbar__right-items{flex-direction:row;gap:16px;grid-column:20/25;justify-content:flex-end}.blog-archive-page .main-wrapper main>section .container>.row{display:grid;gap:64px 24px;grid-template-columns:repeat(24,1fr)}.blog-archive-page .main-wrapper main>section .container>.row>.col{grid-column:span 8;margin:0!important;max-width:unset;padding:0 12.5% 0 0}.mdx-box{--mdx-box-top:var(--mdx-box-top-xl);--mdx-box-bottom:var(--mdx-box-bottom-xl)}.docItemGrid_SzoZ{display:grid;gap:var(--doc-grid-gap);grid-template-columns:repeat(19,1fr)}.docItemCol_F52z{grid-column:span 14}.tocMobile_imaF{display:none}}@media (min-width:1440px){.container{max-width:var(--ifm-container-width-xl)}}@media (max-width:1440px)and (min-width:992px){.mdx-hero-model{transform:translateX(calc((var(--content-padding) + 0)*-3));width:calc(100vw + var(--content-padding))}}@media (max-width:1199px){:root{--container-max-width:912px}.main-wrapper main>.container{padding-bottom:calc(var(--desktop-footer-gap) - var(--ifm-footer-padding-vertical) - var(--doc-grid-gap))!important}.header-github-link:before{margin-right:16px}.toc_pP_5{display:none}}@media (max-width:997px);@media (max-width:996px){.navbar-sidebar__close,.navbar__toggle{border:1px solid rgb(var(--lsd-border-primary))}.mdx-cta-section__title,.mdx-section-header__title,.navbar-sidebar:not(.navbar-sidebar--show-secondary) .menu__link>div{font-size:var(--lsd-subtitle2-fontSize)!important;font-weight:var(--lsd-subtitle2-fontWeight)!important;line-height:var(--lsd-subtitle2-lineHeight)!important}.blog-wrapper h1[itemprop=headline],.mdx-cta-button .lsd-button--large,.mdx-cta-section__description,.mdx-cta-section__title,.mdx-hero-description,.mdx-section-header__description,.mdx-section-header__title,.navbar-sidebar:not(.navbar-sidebar--show-secondary) .menu__link>div{font-family:var(--lsd-typography-generic-font-family)!important}.col{--ifm-col-width:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0;padding-bottom:0!important;--ifm-footer-padding-horizontal:var(--content-padding)}.desktop,.footer__link-separator,.navbar__item,.navbar__left-items{display:none}.footer__col{margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item,.main-wrapper>div,.mdx-cta-section--full-width .mdx-cta-section__container,.mdx-cta-section--list,.tocMobile_imaF{display:block}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid,.root_xZfc{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.mdx-section-header,.pills--block,.tabs--block{flex-direction:column}:root{--ifm-background-color:rgb(var(--lsd-surface-primary))}.navbar__color-mode-toggle{display:none!important}.main-wrapper main>.container{padding-bottom:calc(var(--mobile-footer-gap) - var(--ifm-footer-padding-vertical) - var(--doc-grid-gap))!important}.grid{grid-template-columns:repeat(2,1fr)}.footer-grid,.l-modal__container,.mdx-feature-list__list,.mdx-profile-card{grid-template-columns:1fr}.navbar{display:flex;height:56px}.navbar__toggle{align-items:center;box-sizing:border-box;display:flex;height:32px;justify-content:center;margin:0;width:32px}.navbar__toggle svg{height:14px;width:14px}.theme-admonition{display:block!important}.navbar-sidebar:not(.navbar-sidebar--show-secondary) .menu{padding-inline:0}.navbar-sidebar:not(.navbar-sidebar--show-secondary) .menu__list{display:flex;flex-direction:column;gap:8px;padding:var(--content-padding)}.navbar-sidebar:not(.navbar-sidebar--show-secondary) .menu__link{border-left:none;padding-left:0}.navbar-sidebar:not(.navbar-sidebar--show-secondary) .menu__link>div{text-decoration:none}.navbar-sidebar:not(.navbar-sidebar--show-secondary) .footer{margin-top:3rem;padding:0!important}.navbar-sidebar:not(.navbar-sidebar--show-secondary) .footer>div{display:flex!important;flex-direction:column!important;gap:32px!important}.colorModeToggle_GSaI,.dropdownNavbarItem_o23I,.l-modal__backdrop,.navbar-sidebar:not(.navbar-sidebar--show-secondary) .footer>button,.tableOfContents_bqdL{display:none}.navbar-sidebar:not(.navbar-sidebar--show-secondary) .footer .container.container-fluid{margin-bottom:16px!important;padding-inline:var(--content-padding)}.navbar-sidebar:not(.navbar-sidebar--show-secondary) .footer .container.container-fluid>.footer__links{gap:0!important}.navbar-sidebar:not(.navbar-sidebar--show-secondary) .footer>div[class*=secondRow]{margin:var(--content-padding)}.navbar-sidebar:not(.navbar-sidebar--show-secondary) .footer .footer__links{gap:16px!important}.navbar-sidebar__brand{height:60px;padding-block:0}.navbar-sidebar__brand>button{height:32px;width:32px}.navbar-sidebar__brand>button:first-of-type{margin-left:auto;margin-right:0!important}.navbar-sidebar__brand>button:not(:last-of-type){border-right:none}.navbar-sidebar__close{align-items:center;display:flex;justify-content:center;margin-left:unset}.blog-divider{margin-block:32px!important}.blog-wrapper main{padding-inline:var(--content-padding)}.blog-wrapper article footer{align-items:flex-start;flex-direction:column}.blog-wrapper article footer .read-more-link{margin-top:24px}.blog-wrapper article footer .read-more-link,.blog-wrapper article footer .read-more-link button{flex-basis:100%;width:100%}.blog-wrapper h1[itemprop=headline]{font-size:var(--lsd-h2-fontSize)!important;font-weight:var(--lsd-h2-fontWeight)!important;line-height:var(--lsd-h2-lineHeight)!important}.backToTop_wDfN{bottom:16px;left:16px;margin-top:76px!important;position:relative}.l-modal{overflow:hidden;width:100vw}.l-modal__container{display:grid;height:100vh;max-width:unset;min-height:-webkit-fill-available;width:100%}.docItemGrid_SzoZ,.mdx-showcase{grid-template-columns:repeat(2,1fr)}.l-modal__content{border:none;grid-column:1/2;grid-row:1/2;height:100%;margin:0;max-height:100vh;overflow:hidden}.modal_kLVz .header_QwCa{padding:12px 16px}.modal_kLVz .closeButton_Rr0e{display:block;height:2rem;width:2rem}.mdx-cta-button .lsd-button--large{font-size:var(--lsd-label2-fontSize)!important;font-weight:var(--lsd-label2-fontWeight)!important;line-height:var(--lsd-label2-lineHeight)!important;padding:5px 11px}.mdx-cta-section{padding:16px 0 0}.mdx-cta-section--title-button .mdx-cta-section__title{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-h4-fontSize);font-weight:var(--lsd-h4-fontWeight);line-height:var(--lsd-h4-lineHeight)}.mdx-feature-list .mdx-feature-list__title,.mdx-feature-list__feature .mdx-feature-list__feature-index{font-size:var(--lsd-subtitle2-fontSize);font-weight:var(--lsd-subtitle2-fontWeight);line-height:var(--lsd-subtitle2-lineHeight);font-family:var(--lsd-typography-generic-font-family)}.mdx-cta-section--full-width .mdx-cta-section__description,.mdx-cta-section--simple .mdx-cta-section__description{margin-top:1.5rem}.mdx-cta-section--list .mdx-cta-section__list,.mdx-roadmap__timeline{margin-top:4rem}.mdx-cta-section--list .mdx-cta-section__list>*{border-top:1px solid rgb(var(--lsd-border-primary))}.mdx-cta-section--list .mdx-cta-section__list .mdx-cta-section__list-item>.mdx-cta-section__item-title{font-size:.875rem!important;line-height:1.25rem!important}.mdx-cta-section--list .mdx-cta-section__list .mdx-cta-section__list-item>.mdx-cta-section__item-description{font-family:var(--lsd-typography-generic-font-family)!important;font-size:var(--lsd-h4-fontSize)!important;font-weight:var(--lsd-h4-fontWeight)!important;line-height:var(--lsd-h4-lineHeight)!important}.mdx-cta-section__description{font-size:var(--lsd-h4-fontSize)!important;font-weight:var(--lsd-h4-fontWeight)!important;line-height:var(--lsd-h4-lineHeight)!important}.mdx-feature-list .mdx-feature-list__title{padding:1rem 0}.mdx-feature-list--cta-bottom .mdx-feature-list__extra{margin-top:2rem;padding:0}.mdx-feature-list__feature{border:none;border-top:1px solid rgb(var(--lsd-border-primary));padding:1.5rem 0}.mdx-feature-list__feature .mdx-feature-list__feature-index{height:1.625rem;width:1.625rem}.mdx-feature-list__feature .mdx-feature-list__feature-title{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-h4-fontSize);font-weight:var(--lsd-h4-fontWeight);line-height:var(--lsd-h4-lineHeight);margin-top:1rem}.mdx-feature-list__feature .mdx-feature-list__feature-description{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-body1-fontSize);font-weight:var(--lsd-body1-fontWeight);line-height:var(--lsd-body1-lineHeight);margin-top:3rem}.mdx-feature-list__feature:nth-child(odd) .mdx-feature-list__feature-inner{border:none}.mdx-hero-action{text-decoration:none!important}.mdx-hero-action button{padding:6px 12px!important}.mdx-hero-actions{align-items:center;display:flex;flex-direction:row;justify-content:stretch;margin-top:1.5rem;width:100%;z-index:0}.mdx-hero-actions>*{flex-basis:50%}.mdx-hero-actions>a,.mdx-hero-actions>a>button{display:block;width:100%}.mdx-hero-description{font-size:var(--lsd-subtitle1-fontSize)!important;font-weight:var(--lsd-subtitle1-fontWeight)!important;line-height:var(--lsd-subtitle1-lineHeight)!important;margin-top:12px}.mdx-hero-info{padding:24px 0}.mdx-hero-model--top{top:calc(var(--logos-hero-info-height)/ 1 - 10px)}.mdx-hero-model{transform:translate(-12px);width:calc(100vw - 20px)}.mdx-hero-model--shade{bottom:0;height:90vh!important}.mdx-hero-title{font-size:28px!important}.mdx-hero-video>*{height:var(--hero-video-height-mobile);min-height:var(--hero-video-min-height-mobile);transform:translateY(var(--hero-video-offset-y-mobile))}.mdx-hero-video img,.mdx-hero-video video{max-width:calc((100vw - 32px)*var(--hero-video-scale-mobile))}.mdx-logo-carousel .mdx-logo-carousel__inner{margin-top:64px}.mdx-timeline-item{width:204px}.scrollToBottom_NE5w{--offset-y:-1rem}.mdx-section-header__description{font-size:var(--lsd-h4-fontSize)!important;font-weight:var(--lsd-h4-fontWeight)!important;line-height:var(--lsd-h4-lineHeight)!important}.mdx-showcase{gap:1.5rem 1rem}.mdx-showcase-card__name{font-size:1.375rem!important;line-height:1.75rem!important}.mdx-showcase-card__description{margin-top:1rem}.mdx-showcase-card__logo{height:auto;width:34px}.root_ONDG,.root_ltHz{height:100%;overflow:auto}.root_EFVO{padding:40px 24px}.root_ONDG{max-height:100%;padding:24px 24px 64px}.groups_p1lF{max-height:unset;overflow:auto}.root_ltHz{padding:24px 0 64px}.searchBox_ZlJk{position:absolute;right:var(--ifm-navbar-padding-horizontal)}.wrapper_SWrM>div{overflow:visible!important}.nav_cMpg{height:56px}.docItemContainer_F8PC{padding:0 .3rem}.docItemGrid_SzoZ{display:grid;padding-left:0}.docItemCol_F52z{grid-column:span 2}}@media (max-width:767px){.blog-archive-page .main-wrapper main>section .container>.row{margin-top:0}.blog-archive-page .main-wrapper main>section .container>.row .col{margin-top:40px!important}.mdx-scroll-buttons>div{justify-content:flex-end}.mdx-scroll-buttons>div>button:not(:last-child){border-right:none!important}.mdx-scroll-buttons .mdx-scroll-buttons__label{display:none}.mdx-ns__description{font-family:var(--lsd-typography-generic-font-family);font-size:var(--lsd-h4-fontSize);font-weight:var(--lsd-h4-fontWeight);line-height:var(--lsd-h4-lineHeight)}.mdx-ns__inner form{margin-top:40px}.mdx-ns__inner .mdx-ns__inputs{flex-direction:column;gap:24px}.mdx-ns__inner .mdx-ns__inputs>*{width:100%}.mdx-ns__inner .mdx-ns__submit-button{margin-top:24px}.mdx-profile-card{flex:0 0 var(--mobile-width);height:var(--mobile-height);scroll-snap-align:start!important;width:var(--mobile-width)}.mdx-profile-card__profile{gap:16px}.mdx-profile-card__name{font-family:var(--lsd-typography-generic-font-family)!important;font-size:var(--lsd-h5-fontSize)!important;font-weight:var(--lsd-h5-fontWeight)!important;line-height:var(--lsd-h5-lineHeight)!important}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media (max-width:575px){.footer__links,.mdx-event-profile-list__container .mdx-grid>.mdx-grid__content{gap:24px!important}:root{--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-button-size-multiplier:1.25;--ifm-button-padding-horizontal:calc(var(--ifm-button-size-multiplier)*var(--ifm-spacing-horizontal));--ifm-button-padding-vertical:calc(var(--ifm-button-size-multiplier)*var(--ifm-spacing-vertical));--ifm-alert-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-alert-padding-vertical:calc(var(--ifm-spacing-vertical)*2)}.markdown>h2{--ifm-h2-font-size:1.75rem}.markdown h4{--ifm-h4-font-size:1.25rem!important}.footer>div{display:flex!important;flex-direction:column;gap:72px!important}.footer__links{display:flex!important;flex-direction:column!important}.col.footer__col{margin-bottom:0!important}.navbar__left{display:flex}.events-cta-sections .mdx-grid__content{gap:64px!important}.footer{--ifm-footer-padding-horizontal:0}.firstRow_ar1q{padding-inline:var(--content-padding)!important}.secondRow__ww3{margin-inline:var(--content-padding)!important}.mdx-event-card-list__container{margin-bottom:48px}.mdx-event-about__container,.mdx-event-cta-section__input-fields{display:flex;flex-direction:column;gap:32px}.mdx-event-about__container span,.mdx-event-header__container p{font-size:14px!important;line-height:20px!important}.mdx-event-cta-section__input-fields>div{width:100%!important}.mdx-event-cta-section__container .mdx-event-cta-section__input-fields{margin-bottom:16px}.mdx-event-cta-section__container .mdx-event-cta-section__cta{margin-top:8px}.mdx-event-cta-section__container .mdx-event-cta-section__form{margin-bottom:-24px}.mdx-event-header__container h1{font-size:24px!important;line-height:32px!important}}@media (max-width:574px){.mdx-ghc__issue-content-grid{grid-template-columns:82px 1fr}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:var(--ifm-scrollbar-size);width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_LDrR,.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/images/architect-c96184127d80feae83e3f85471c5112a.png b/assets/images/architect-c96184127d80feae83e3f85471c5112a.png new file mode 100644 index 00000000..0730811d Binary files /dev/null and b/assets/images/architect-c96184127d80feae83e3f85471c5112a.png differ diff --git a/assets/images/history-7650f3989c187c17359f1c0d5596fa69.png b/assets/images/history-7650f3989c187c17359f1c0d5596fa69.png new file mode 100644 index 00000000..1b74ee81 Binary files /dev/null and b/assets/images/history-7650f3989c187c17359f1c0d5596fa69.png differ diff --git a/assets/js/13b4f215.3249fbb4.js b/assets/js/13b4f215.3249fbb4.js new file mode 100644 index 00000000..5382f848 --- /dev/null +++ b/assets/js/13b4f215.3249fbb4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[180],{95788:(e,t,r)=>{r.d(t,{Iu:()=>u,yg:()=>y});var n=r(11504);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),l=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=c(e,["components","mdxType","originalType","parentName"]),p=l(r),d=a,y=p["".concat(s,".").concat(d)]||p[d]||m[d]||o;return r?n.createElement(y,i(i({ref:t},u),{},{components:r})):n.createElement(y,i({ref:t},u))}));function y(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=d;var c={};for(var s in t)hasOwnProperty.call(t,s)&&(c[s]=t[s]);c.originalType=e,c[p]="string"==typeof e?e:a,i[1]=c;for(var l=2;l{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>m,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var n=r(45072),a=(r(11504),r(95788));const o={title:"Core contributors",sidebar_position:4},i=void 0,c={unversionedId:"team",id:"team",title:"Core contributors",description:"Leading Waku's R&D efforts is Franck Royer. Franck draws on more than five years of experience within the blockchain and crypto ecosystem, and over 13 years as a software engineer and team lead with a primary focus on backend development for mission-critical applications.",source:"@site/about/team.md",sourceDirName:".",slug:"/team",permalink:"/about/team",draft:!1,tags:[],version:"current",sidebarPosition:4,frontMatter:{title:"Core contributors",sidebar_position:4},sidebar:"defaultSidebar",previous:{title:"Development roadmap",permalink:"/about/roadmap"},next:{title:"The Waku Network",permalink:"/about/waku-network"}},s={},l=[{value:"Waku Research",id:"waku-research",level:2},{value:"Waku Development",id:"waku-development",level:2},{value:"Waku Eco Dev",id:"waku-eco-dev",level:2}],u={toc:l},p="wrapper";function m(e){let{components:t,...r}=e;return(0,a.yg)(p,(0,n.c)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.yg)("p",null,"Leading Waku's R&D efforts is Franck Royer. Franck draws on more than five years of experience within the blockchain and crypto ecosystem, and over 13 years as a software engineer and team lead with a primary focus on backend development for mission-critical applications."),(0,a.yg)("p",null,"The core contributors building Waku are split into three subgroups:"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"Waku Research")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"Waku Development")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"Waku Eco Dev"))),(0,a.yg)("h2",{id:"waku-research"},"Waku Research"),(0,a.yg)("p",null,"Our research efforts are led by a former telecoms engineer with almost a decade of experience, and supported by a post-doctoral research engineer who specialises in communications networks."),(0,a.yg)("h2",{id:"waku-development"},"Waku Development"),(0,a.yg)("p",null,"Waku's development arm is broken down by client implementation."),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"nwaku: The team building nwaku, our implementation in Nim, consists of three software engineers with more than two decades of combined experience in backend development, open-source development, artificial intelligence, and finance.")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"js-waku: Our JavaScript implementation is developed by a senior and intermediate software engineer, one with extensive experience in the web3 sector and another who previously worked with renowned tech companies, such as Microsoft and Ubisoft.")),(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("p",{parentName:"li"},"go-waku: Building Waku's Golang implementation are two senior software engineers with over 25 years of combined experience, including significant experience in web3."))),(0,a.yg)("h2",{id:"waku-eco-dev"},"Waku Eco Dev"),(0,a.yg)("p",null,"Ensuring that Waku attracts developers and users is the Waku Outreach team. It comprises a developer relations engineer and a technical writer. Both members are steeped in web3, having previously worked with Wallet Connect and Unstoppable Domains, and regularly presenting on the crypto conference circuit."),(0,a.yg)("p",null,"Waku is looking to expand the above structure and currently has openings for core contributors. As an open-source public goods project, Waku also welcomes community contributions. Please check out our ",(0,a.yg)("a",{parentName:"p",href:"https://github.com/waku-org"},"Github repo here"),"."),(0,a.yg)("p",null,(0,a.yg)("a",{parentName:"p",href:"https://jobs.status.im/"},"Work with us")))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/17896441.5e794701.js b/assets/js/17896441.5e794701.js new file mode 100644 index 00000000..82158bb8 --- /dev/null +++ b/assets/js/17896441.5e794701.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[752],{79864:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BreadcrumbsBase=void 0;const l=a(81316),n=a(81595),o=l.__importDefault(a(76016)),r=a(62840),d=a(77956),s=a(49784),i=a(84357),u=l.__importDefault(a(14971)),c=l.__importDefault(a(11504)),m=l.__importDefault(a(1100));function f(e){let{children:t,href:a,isLast:l}=e;const r="breadcrumbs__link";return l?c.default.createElement(n.Typography,{variant:"body3",component:"span",className:r,itemProp:"name"},t):a?c.default.createElement(o.default,{className:r,href:a,itemProp:"item"},c.default.createElement(n.Typography,{variant:"body3",component:"span",itemProp:"name"},t)):c.default.createElement(n.Typography,{variant:"body3",component:"span",className:r},t)}function p(e){let{children:t,active:a,index:l,addMicrodata:n}=e;return c.default.createElement("li",{...n&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,u.default)("breadcrumbs__item",{"breadcrumbs__item--active":a})},t,c.default.createElement("meta",{itemProp:"position",content:String(l+1)}))}t.BreadcrumbsBase=e=>{let{homePage:t,homePageLink:a,breadcrumbs:l}=e;if(!l)return null;const r=["events"];return c.default.createElement("nav",{className:(0,u.default)(d.ThemeClassNames.docs.docBreadcrumbs,m.default.breadcrumbsContainer),"aria-label":(0,i.translate)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},c.default.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},!!t&&c.default.createElement(o.default,{to:a,className:(0,u.default)("breadcrumbs__item")},c.default.createElement(n.Typography,{variant:"body3",component:"span"},t)),l.map(((e,t)=>{const a=t===l.length-1,n=r.includes(e.label);return c.default.createElement(p,{key:t,active:a,index:t,addMicrodata:!!e.href},n?c.default.createElement(o.default,{to:`/${e.label}`},c.default.createElement(f,{href:e.href,isLast:a},e.label)):c.default.createElement(f,{href:e.href,isLast:a},e.label))}))))},t.default=function(){const e=(0,s.useSidebarBreadcrumbs)(),a=(0,s.useHomePageRoute)(),l=(0,r.useActivePlugin)();if(!e)return null;const n=l?.pluginData.path;return c.default.createElement(t.BreadcrumbsBase,{homePage:a&&(0,i.translate)({id:"theme.docs.breadcrumbs.homePageLabel",message:"Home"}),breadcrumbs:e,homePageLink:n})}},58088:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=a(81316),n=l.__importDefault(a(11504)),o=l.__importDefault(a(14971)),r=a(77956),d=a(49784),s=l.__importDefault(a(2616)),i=l.__importDefault(a(57484));t.default=function(e){let{children:t}=e;const a=function(){const{metadata:e,frontMatter:t,contentTitle:a}=(0,d.useDoc)();return t.hide_title||void 0!==a?null:e.title}();return n.default.createElement("div",{className:(0,o.default)(r.ThemeClassNames.docs.docMarkdown,"markdown")},a&&n.default.createElement("header",null,n.default.createElement(i.default,{as:"h1"},a)),n.default.createElement(s.default,null,t))}},66888:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useDocTOC=void 0;const l=a(81316),n=a(77956),o=a(49784),r=l.__importDefault(a(79864)),d=l.__importDefault(a(58088)),s=l.__importDefault(a(71424)),i=l.__importDefault(a(12004)),u=l.__importDefault(a(29117)),c=l.__importDefault(a(51712)),m=l.__importDefault(a(67e3)),f=l.__importDefault(a(2136)),p=l.__importDefault(a(14971)),_=l.__importDefault(a(11504)),b=a(56429),g=a(14720),v=l.__importDefault(a(14384));function h(){const{frontMatter:e,toc:t}=(0,o.useDoc)(),a=(0,n.useWindowSize)(),l=(0,b.useMedia)("(min-width: 1200px)"),r=e.hide_table_of_contents,d=!r&&t.length>0;return{hidden:r,mobile:d?_.default.createElement("div",{className:v.default.tocMobile},_.default.createElement(c.default,null)):void 0,desktop:d&&(l||"ssr"===a)?_.default.createElement(u.default,null):void 0}}t.useDocTOC=h,t.default=function(e){let{children:t}=e;const a=h();return _.default.createElement("div",{className:(0,p.default)("row",v.default.docItemGrid)},_.default.createElement("div",{className:(0,p.default)(v.default.docItemCol)},_.default.createElement(f.default,null),_.default.createElement("div",{className:v.default.docItemContainer},_.default.createElement("article",null,_.default.createElement(r.default,null),_.default.createElement(m.default,null),_.default.createElement(g.MDXEnhancementContext.Provider,{value:{items:[{component:"heading",position:"after",render:e=>"h1"===e.as&&a.mobile}]}},_.default.createElement(d.default,null,t)),_.default.createElement(s.default,null)),_.default.createElement(i.default,null))),_.default.createElement("div",{className:v.default.gap1}),a.desktop&&_.default.createElement("div",{className:(0,p.default)(v.default.toc)},a.desktop))}},36304:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=a(81316),n=l.__importDefault(a(11504)),o=a(77956),r=a(49784),d=l.__importDefault(a(25984)),s=l.__importDefault(a(66888));t.default=function(e){const t=`docs-doc-id-${e.content.metadata.unversionedId}`,a=e.content;return n.default.createElement(r.DocProvider,{content:e.content},n.default.createElement(o.HtmlClassNameProvider,{className:t},n.default.createElement(d.default,null),n.default.createElement(s.default,null,n.default.createElement(a,null))))}},67e3:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=a(81316),n=l.__importDefault(a(11504)),o=l.__importDefault(a(14971)),r=l.__importDefault(a(84357)),d=a(77956),s=a(49784),i=l.__importDefault(a(63052)),u=a(81595);t.default=function(e){let{className:t}=e;const a=(0,s.useDocsVersion)();return a.badge?n.default.createElement("span",{className:(0,o.default)(t,d.ThemeClassNames.docs.docVersionBadge,"badge badge--secondary",i.default.badge)},n.default.createElement(u.Typography,{variant:"body3"},n.default.createElement(r.default,{id:"theme.docs.versionBadge.label",values:{versionLabel:a.label}},"Version: {versionLabel}"))):null}},42660:(e,t,a)=>{const l=a(81316),n=l.__importDefault(a(11504)),o=l.__importDefault(a(84357)),r=a(77956),d=a(34640),s=a(81595);t.c=function(e){let{editUrl:t}=e;return n.default.createElement("a",{href:t,target:"_blank",rel:"noreferrer noopener",className:r.ThemeClassNames.common.editThisPage},n.default.createElement(d.IconEdit,null),n.default.createElement(s.Typography,{variant:"body2"},n.default.createElement(o.default,{id:"theme.common.editThisPage",description:"The link label to edit the current page"},"Edit this page")))}},63872:(e,t,a)=>{const l=a(81316),n=a(81595),o=l.__importDefault(a(76016)),r=a(34640),d=l.__importDefault(a(14971)),s=l.__importDefault(a(11504));t.c=function(e){const{permalink:t,title:a,subLabel:l,isNext:i}=e;return s.default.createElement(o.default,{className:(0,d.default)("pagination-nav__link",i?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},i?null:s.default.createElement(r.IconArrowLeft,null),s.default.createElement(n.Typography,{variant:"body2",className:"pagination-nav__label"},a),i?s.default.createElement(r.IconArrowRight,null):null)}},42572:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=a(81316),n=a(81595),o=l.__importDefault(a(84357)),r=l.__importDefault(a(14971)),d=l.__importDefault(a(11504)),s=l.__importDefault(a(416));t.default=function(e){let{collapsed:t,...a}=e;return d.default.createElement("button",{type:"button",...a,className:(0,r.default)("clean-btn",s.default.tocCollapsibleButton,!t&&s.default.tocCollapsibleButtonExpanded,a.className)},d.default.createElement("div",null),d.default.createElement(n.Typography,{variant:"body2"},d.default.createElement(o.default,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page")),t?d.default.createElement(n.ChevronDownIcon,null):d.default.createElement(n.ChevronUpIcon,null))}},97444:(e,t,a)=>{const l=a(81316),n=l.__importDefault(a(11504)),o=l.__importDefault(a(14971)),r=a(77956),d=l.__importDefault(a(39176)),s=l.__importDefault(a(42572)),i=l.__importDefault(a(3068));t.c=function(e){let{toc:t,className:a,minHeadingLevel:l,maxHeadingLevel:u}=e;const{collapsed:c,toggleCollapsed:m}=(0,r.useCollapsible)({initialState:!0});return n.default.createElement("div",{className:(0,o.default)(i.default.tocCollapsible,!c&&i.default.tocCollapsibleExpanded,a)},n.default.createElement(s.default,{collapsed:c,onClick:m}),n.default.createElement(r.Collapsible,{lazy:!0,className:i.default.tocCollapsibleContent,collapsed:c},n.default.createElement(d.default,{toc:t,minHeadingLevel:l,maxHeadingLevel:u})))}},88064:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=a(81316),n=l.__importDefault(a(11504)),o=l.__importDefault(a(14971)),r=l.__importDefault(a(76016)),d=l.__importDefault(a(75276)),s=a(81595);t.default=function(e){let{permalink:t,label:a,count:l}=e;return n.default.createElement(r.default,{href:t,className:(0,o.default)(l?d.default.tagWithCount:d.default.tagRegular)},n.default.createElement(s.Tag,{disabled:!1,size:"small"},a,l&&n.default.createElement("span",null,l)))}},1440:(e,t,a)=>{const l=a(81316),n=l.__importDefault(a(11504)),o=l.__importDefault(a(14971)),r=l.__importDefault(a(84357)),d=l.__importDefault(a(88064)),s=l.__importDefault(a(78936)),i=a(81595);t.c=function(e){let{tags:t}=e;return n.default.createElement("div",{className:s.default.root},n.default.createElement(i.Typography,{variant:"body2",component:"div"},n.default.createElement(r.default,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),n.default.createElement("ul",{className:(0,o.default)(s.default.tags,"padding--none","margin-left--sm")},t.map((e=>{let{label:t,permalink:a}=e;return n.default.createElement("li",{key:a,className:s.default.tag},n.default.createElement(d.default,{label:t,permalink:a}))}))))}},71424:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b});var l=a(11504),n=a(14971),o=a(45864),r=a(61262),d=a(84357);function s(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:a}=e;return l.createElement(d.default,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:l.createElement("b",null,l.createElement("time",{dateTime:new Date(1e3*t).toISOString()},a))}}," on {date}")}function i(e){let{lastUpdatedBy:t}=e;return l.createElement(d.default,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:l.createElement("b",null,t)}}," by {user}")}function u(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:a,lastUpdatedBy:n}=e;return l.createElement("span",{className:o.W.common.lastUpdated},l.createElement(d.default,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&a?l.createElement(s,{lastUpdatedAt:t,formattedLastUpdatedAt:a}):"",byUser:n?l.createElement(i,{lastUpdatedBy:n}):""}},"Last updated{atDate}{byUser}"),!1)}var c=a(42660),m=a(1440);const f={lastUpdated:"lastUpdated_vwxv"};function p(e){return l.createElement("div",{className:(0,n.default)(o.W.docs.docFooterTagsRow,"row margin-bottom--sm")},l.createElement("div",{className:"col"},l.createElement(m.c,e)))}function _(e){let{editUrl:t,lastUpdatedAt:a,lastUpdatedBy:r,formattedLastUpdatedAt:d}=e;return l.createElement("div",{className:(0,n.default)(o.W.docs.docFooterEditMetaRow,"row")},l.createElement("div",{className:"col"},t&&l.createElement(c.c,{editUrl:t})),l.createElement("div",{className:(0,n.default)("col",f.lastUpdated)},(a||r)&&l.createElement(u,{lastUpdatedAt:a,formattedLastUpdatedAt:d,lastUpdatedBy:r})))}function b(){const{metadata:e}=(0,r.G)(),{editUrl:t,lastUpdatedAt:a,formattedLastUpdatedAt:d,lastUpdatedBy:s,tags:i}=e,u=i.length>0,c=!!(t||a||s);return u||c?l.createElement("footer",{className:(0,n.default)(o.W.docs.docFooter,"docusaurus-mt-lg")},u&&l.createElement(p,{tags:i}),c&&l.createElement(_,{editUrl:t,lastUpdatedAt:a,lastUpdatedBy:s,formattedLastUpdatedAt:d})):null}},25984:(e,t,a)=>{a.r(t),a.d(t,{default:()=>r});var l=a(11504),n=a(85008),o=a(61262);function r(){const{metadata:e,frontMatter:t,assets:a}=(0,o.G)();return l.createElement(n.U7,{title:e.title,description:e.description,keywords:t.keywords,image:a.image??t.image})}},12004:(e,t,a)=>{a.r(t),a.d(t,{default:()=>i});var l=a(11504),n=a(61262),o=a(45072),r=a(84357),d=a(63872);function s(e){const{previous:t,next:a}=e;return l.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,r.translate)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"})},t&&l.createElement(d.c,(0,o.c)({},t,{subLabel:l.createElement(r.default,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),a&&l.createElement(d.c,(0,o.c)({},a,{subLabel:l.createElement(r.default,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}function i(){const{metadata:e}=(0,n.G)();return l.createElement(s,{previous:e.previous,next:e.next})}},29117:(e,t,a)=>{a.r(t),a.d(t,{default:()=>d});var l=a(11504),n=a(45864),o=a(61262),r=a(75124);function d(){const{toc:e,frontMatter:t}=(0,o.G)();return l.createElement(r.c,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:n.W.docs.docTocDesktop})}},51712:(e,t,a)=>{a.r(t),a.d(t,{default:()=>i});var l=a(11504),n=a(14971),o=a(45864),r=a(61262),d=a(97444);const s={tocMobile:"tocMobile_ITEo"};function i(){const{toc:e,frontMatter:t}=(0,r.G)();return l.createElement(d.c,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,n.default)(o.W.docs.docTocMobile,s.tocMobile)})}},2136:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b});var l=a(11504),n=a(14971),o=a(28264),r=a(76016),d=a(84357),s=a(62840),i=a(45864),u=a(94592),c=a(69920);const m={unreleased:function(e){let{siteTitle:t,versionMetadata:a}=e;return l.createElement(d.default,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:l.createElement("b",null,a.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){let{siteTitle:t,versionMetadata:a}=e;return l.createElement(d.default,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:l.createElement("b",null,a.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function f(e){const t=m[e.versionMetadata.banner];return l.createElement(t,e)}function p(e){let{versionLabel:t,to:a,onClick:n}=e;return l.createElement(d.default,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:l.createElement("b",null,l.createElement(r.default,{to:a,onClick:n},l.createElement(d.default,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function _(e){let{className:t,versionMetadata:a}=e;const{siteConfig:{title:r}}=(0,o.default)(),{pluginId:d}=(0,s.useActivePlugin)({failfast:!0}),{savePreferredVersionName:c}=(0,u.iy)(d),{latestDocSuggestion:m,latestVersionSuggestion:_}=(0,s.useDocVersionSuggestions)(d),b=m??(g=_).docs.find((e=>e.id===g.mainDocId));var g;return l.createElement("div",{className:(0,n.default)(t,i.W.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},l.createElement("div",null,l.createElement(f,{siteTitle:r,versionMetadata:a})),l.createElement("div",{className:"margin-top--md"},l.createElement(p,{versionLabel:_.label,to:b.path,onClick:()=>c(_.name)})))}function b(e){let{className:t}=e;const a=(0,c.E)();return a.banner?l.createElement(_,{className:t,versionMetadata:a}):null}},14384:(e,t,a)=>{a.r(t),a.d(t,{default:()=>l});const l={docItemContainer:"docItemContainer_hrrU",docItemGrid:"docItemGrid_SzoZ",gap1:"gap1_XuuQ",toc:"toc_pP_5",tocMobile:"tocMobile_imaF",docItemCol:"docItemCol_F52z"}},63052:(e,t,a)=>{a.r(t),a.d(t,{default:()=>l});const l={badge:"badge_AsjZ"}},1100:(e,t,a)=>{a.r(t),a.d(t,{default:()=>l});const l={breadcrumbsContainer:"breadcrumbsContainer_RLvU"}},416:(e,t,a)=>{a.r(t),a.d(t,{default:()=>l});const l={tocCollapsibleButton:"tocCollapsibleButton_dxRj",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_TSyC"}},3068:(e,t,a)=>{a.r(t),a.d(t,{default:()=>l});const l={tocCollapsible:"tocCollapsible_ROek",tocCollapsibleContent:"tocCollapsibleContent_Qsjj",tocCollapsibleExpanded:"tocCollapsibleExpanded_zTjk"}},75276:(e,t,a)=>{a.r(t),a.d(t,{default:()=>l});const l={tag:"tag_dtsN",tagRegular:"tagRegular_SGIC",tagWithCount:"tagWithCount_gIvh"}},78936:(e,t,a)=>{a.r(t),a.d(t,{default:()=>l});const l={root:"root_UH70",tags:"tags_LT8x",tag:"tag_NdBD"}}}]); \ No newline at end of file diff --git a/assets/js/1be78505.4969ef38.js b/assets/js/1be78505.4969ef38.js new file mode 100644 index 00000000..b66933d6 --- /dev/null +++ b/assets/js/1be78505.4969ef38.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[656,460],{10756:(e,t,a)=>{a.r(t),a.d(t,{default:()=>u});var n=a(11504),l=a(14971),o=a(45864),r=a(43868),i=a(53943),d=a(84357),c=a(2240);const s={menu:"menu_NjKY",menuWithAnnouncementBar:"menuWithAnnouncementBar_U5pk"};function u(e){let{path:t,sidebar:a,className:u}=e;const m=function(){const{isActive:e}=(0,r.el)(),[t,a]=(0,n.useState)(e);return(0,i.SM)((t=>{let{scrollY:n}=t;e&&a(0===n)}),[e]),e&&t}();return n.createElement("nav",{"aria-label":(0,d.translate)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,l.default)("menu thin-scrollbar",s.menu,m&&s.menuWithAnnouncementBar,u)},n.createElement("ul",{className:(0,l.default)(o.W.docs.docSidebarMenu,"menu__list")},n.createElement(c.default,{items:a,activePath:t,level:1})))}},55916:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=a(81316),l=n.__importDefault(a(11504)),o=n.__importDefault(a(14971)),r=a(77956),i=n.__importDefault(a(2184)),d=n.__importDefault(a(10756)),c=n.__importDefault(a(352));t.default=l.default.memo((function(e){let{path:t,sidebar:a,onCollapse:n,isHidden:s}=e;const{navbar:{hideOnScroll:u},docs:{sidebar:{hideable:m}}}=(0,r.useThemeConfig)();return l.default.createElement("div",{className:(0,o.default)(c.default.sidebar,u&&c.default.sidebarWithHideableNavbar,s&&c.default.sidebarHidden)},u&&l.default.createElement(i.default,{tabIndex:-1,className:c.default.sidebarLogo}),l.default.createElement(d.default,{path:t,sidebar:a}))}))},87744:(e,t,a)=>{const n=a(81316),l=n.__importDefault(a(11504)),o=a(77956),r=n.__importDefault(a(55916)),i=n.__importDefault(a(72212));t.c=function(e){const t=(0,o.useWindowSize)(),a="desktop"===t||"ssr"===t,n="mobile"===t;return l.default.createElement(l.default.Fragment,null,a&&l.default.createElement(r.default,{...e}),n&&l.default.createElement(i.default,{...e}))}},72192:(e,t,a)=>{const n=a(81316),l=a(81595),o=n.__importDefault(a(76016)),r=a(84357),i=a(77956),d=a(49784),c=n.__importDefault(a(93664)),s=n.__importDefault(a(2240)),u=n.__importDefault(a(14971)),m=n.__importStar(a(11504));function f(e){let{categoryLabel:t,onClick:a}=e;return m.default.createElement("button",{"aria-label":(0,r.translate)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:a})}t.c=function(e){let{item:t,onItemClick:a,activePath:n,level:r,index:p,...b}=e;const{items:h,label:_,collapsible:E,className:g,href:v}=t,{docs:{sidebar:{autoCollapseCategories:k}}}=(0,i.useThemeConfig)(),C=function(e){const t=(0,c.default)();return(0,m.useMemo)((()=>e.href?e.href:!t&&e.collapsible?(0,d.findFirstCategoryLink)(e):void 0),[e,t])}(t),N=(0,d.isActiveSidebarItem)(t,n),S=(0,d.isSamePath)(v,n),{collapsed:T,setCollapsed:y}=(0,i.useCollapsible)({initialState:()=>!!E&&(!N&&t.collapsed)}),{expandedItem:I,setExpandedItem:x}=(0,d.useDocSidebarItemsExpandedState)(),B=function(e){void 0===e&&(e=!T),x(e?null:p),y(e)};return function(e){let{isActive:t,collapsed:a,updateCollapsed:n}=e;const l=(0,i.usePrevious)(t);(0,m.useEffect)((()=>{t&&!l&&a&&n(!1)}),[t,l,a,n])}({isActive:N,collapsed:T,updateCollapsed:B}),(0,m.useEffect)((()=>{E&&null!=I&&I!==p&&k&&y(!0)}),[E,I,p,y,k]),m.default.createElement("li",{className:(0,u.default)(i.ThemeClassNames.docs.docSidebarItemCategory,i.ThemeClassNames.docs.docSidebarItemCategoryLevel(r),"menu__list-item",{"menu__list-item--collapsed":T},g)},m.default.createElement("div",{className:(0,u.default)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":S})},m.default.createElement(o.default,{className:(0,u.default)("menu__link",{"menu__link--sublist":E,"menu__link--active":N}),onClick:E?e=>{a?.(t),v||e.preventDefault(),B()}:()=>{a?.(t)},"aria-current":S?"page":void 0,"aria-expanded":E?!T:void 0,href:E?C??"#":C,...b},m.default.createElement(l.Typography,{variant:"body2",color:"primary"},_),E&&m.default.createElement(l.ChevronUpIcon,null)),v&&E&&m.default.createElement(f,{categoryLabel:_,onClick:e=>{e.preventDefault(),B()}})),m.default.createElement(i.Collapsible,{lazy:!0,as:"ul",className:"menu__list",collapsed:T},m.default.createElement(s.default,{items:h,tabIndex:T?-1:0,onItemClick:a,activePath:n,level:r+1})))}},49460:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0});const n=a(81316),l=n.__importDefault(a(11504)),o=n.__importStar(a(84357)),r=a(77956),i=n.__importDefault(a(59252)),d=n.__importDefault(a(93252)),c=n.__importDefault(a(14971)),s=a(81595),u=n.__importDefault(a(76016));t.default=function(){return l.default.createElement(l.default.Fragment,null,l.default.createElement(r.PageMetadata,{title:(0,o.translate)({id:"theme.NotFound.title",message:"Page Not Found"})}),l.default.createElement(i.default,null,l.default.createElement("main",{className:(0,c.default)("container margin-vert--xl",d.default.root)},l.default.createElement("div",{className:"row"},l.default.createElement("div",{className:"col col--6 col--offset-3"},l.default.createElement(s.Typography,{variant:"h1"},l.default.createElement(o.default,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),l.default.createElement(s.Typography,{variant:"body1",component:"p"},l.default.createElement(o.default,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for."),l.default.createElement("br",null),l.default.createElement(o.default,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."))),l.default.createElement(u.default,{to:"/"},l.default.createElement(s.Button,{size:"large",variant:"outlined"},l.default.createElement(o.default,{id:"theme.NotFound.backToHome",description:"The label of the back to home link on the 404 page"},"Back to home")))))))}},82728:(e,t,a)=>{a.r(t),a.d(t,{default:()=>L});var n=a(11504),l=a(14971),o=a(85008),r=a(45864),i=a(14456),d=a(35492),c=a(69920),s=a(46192),u=a(59252),m=a(84357),f=a(68860);const p={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};function b(){const{shown:e,scrollToTop:t}=(0,f.O)({threshold:300});return n.createElement("button",{"aria-label":(0,m.translate)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,l.default)("clean-btn",r.W.common.backToTopButton,p.backToTopButton,e&&p.backToTopButtonShow),type:"button",onClick:t})}var h=a(13856),_=a(55592),E=a(87744),g=a(45072);function v(e){return n.createElement("svg",(0,g.c)({width:"20",height:"20","aria-hidden":"true"},e),n.createElement("g",{fill:"#7a7a7a"},n.createElement("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),n.createElement("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}const k={expandButton:"expandButton_m80_",expandButtonIcon:"expandButtonIcon_BlDH"};function C(e){let{toggleSidebar:t}=e;return n.createElement("div",{className:k.expandButton,title:(0,m.translate)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,m.translate)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t},n.createElement(v,{className:k.expandButtonIcon}))}const N={docSidebarContainer:"docSidebarContainer_b6E3",docSidebarContainerHidden:"docSidebarContainerHidden_b3ry",sidebarViewport:"sidebarViewport_Xe31"};function S(e){let{children:t}=e;const a=(0,s.m)();return n.createElement(n.Fragment,{key:a?.name??"noSidebar"},t)}function T(e){let{sidebar:t,hiddenSidebarContainer:a,setHiddenSidebarContainer:o}=e;const{pathname:i}=(0,_.IT)(),[d,c]=(0,n.useState)(!1),s=(0,n.useCallback)((()=>{d&&c(!1),!d&&(0,h.I)()&&c(!0),o((e=>!e))}),[o,d]);return n.createElement("aside",{className:(0,l.default)(r.W.docs.docSidebarContainer,N.docSidebarContainer,a&&N.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(N.docSidebarContainer)&&a&&c(!0)}},n.createElement(S,null,n.createElement("div",{className:(0,l.default)(N.sidebarViewport,d&&N.sidebarViewportHidden)},n.createElement(E.c,{sidebar:t,path:i,onCollapse:s,isHidden:d}),d&&n.createElement(C,{toggleSidebar:s}))))}const y={docMainContainer:"docMainContainer_gTbr",docMainContainerEnhanced:"docMainContainerEnhanced_Uz_u",docItemWrapperEnhanced:"docItemWrapperEnhanced_czyv"};function I(e){let{hiddenSidebarContainer:t,children:a}=e;const o=(0,s.m)();return n.createElement("main",{className:(0,l.default)(y.docMainContainer,(t||!o)&&y.docMainContainerEnhanced)},n.createElement("div",{className:(0,l.default)("container padding-top--md padding-bottom--lg",y.docItemWrapper,t&&y.docItemWrapperEnhanced)},a))}const x={docPage:"docPage__5DB",docsWrapper:"docsWrapper_BCFX","themedComponent--light":"themedComponent--light_NU7w"};function B(e){let{children:t}=e;const a=(0,s.m)(),[l,o]=(0,n.useState)(!1);return n.createElement(u.default,{wrapperClassName:x.docsWrapper},n.createElement(b,null),n.createElement("div",{className:x.docPage},a&&n.createElement(T,{sidebar:a.items,hiddenSidebarContainer:l,setHiddenSidebarContainer:o}),n.createElement(I,{hiddenSidebarContainer:l},t)))}var D=a(49460),W=a(48712);function w(e){const{versionMetadata:t}=e;return n.createElement(n.Fragment,null,n.createElement(W.c,{version:t.version,tag:(0,i.SE)(t.pluginId,t.version)}),n.createElement(o.U7,null,t.noIndex&&n.createElement("meta",{name:"robots",content:"noindex, nofollow"})))}function L(e){const{versionMetadata:t}=e,a=(0,d.sr)(e);if(!a)return n.createElement(D.default,null);const{docElement:i,sidebarName:u,sidebarItems:m}=a;return n.createElement(n.Fragment,null,n.createElement(w,e),n.createElement(o.cr,{className:(0,l.default)(r.W.wrapper.docsPages,r.W.page.docsDocPage,e.versionMetadata.className)},n.createElement(c.Q,{version:t},n.createElement(s.y,{name:u,items:m},n.createElement(B,null,i)))))}},72212:(e,t,a)=>{a.r(t),a.d(t,{default:()=>u});var n=a(11504),l=a(14971),o=a(45864),r=a(45168),i=a(18200),d=a(2240);const c=e=>{let{sidebar:t,path:a}=e;const r=(0,i.q)();return n.createElement("ul",{className:(0,l.default)(o.W.docs.docSidebarMenu,"menu__list")},n.createElement(d.default,{items:t,activePath:a,onItemClick:e=>{"category"===e.type&&e.href&&r.toggle(),"link"===e.type&&r.toggle()},level:1}))};function s(e){return n.createElement(r.Mx,{component:c,props:e})}const u=n.memo(s)},2240:(e,t,a)=>{a.r(t),a.d(t,{default:()=>g});var n=a(45072),l=a(11504),o=a(73764),r=a(72192),i=a(14971),d=a(45864),c=a(35492),s=a(76016),u=a(18136),m=a(3232);const f={menuExternalLink:"menuExternalLink_NmtK"};function p(e){let{item:t,onItemClick:a,activePath:o,level:r,index:p,...b}=e;const{href:h,label:_,className:E,autoAddBaseUrl:g}=t,v=(0,c.Md)(t,o),k=(0,u.default)(h);return l.createElement("li",{className:(0,i.default)(d.W.docs.docSidebarItemLink,d.W.docs.docSidebarItemLinkLevel(r),"menu__list-item",E),key:_},l.createElement(s.default,(0,n.c)({className:(0,i.default)("menu__link",!k&&f.menuExternalLink,{"menu__link--active":v}),autoAddBaseUrl:g,"aria-current":v?"page":void 0,to:h},k&&{onClick:a?()=>a(t):void 0},b),_,!k&&l.createElement(m.c,null)))}const b={menuHtmlItem:"menuHtmlItem_M9Kj"};function h(e){let{item:t,level:a,index:n}=e;const{value:o,defaultStyle:r,className:c}=t;return l.createElement("li",{className:(0,i.default)(d.W.docs.docSidebarItemLink,d.W.docs.docSidebarItemLinkLevel(a),r&&[b.menuHtmlItem,"menu__list-item"],c),key:n,dangerouslySetInnerHTML:{__html:o}})}function _(e){let{item:t,...a}=e;switch(t.type){case"category":return l.createElement(r.c,(0,n.c)({item:t},a));case"html":return l.createElement(h,(0,n.c)({item:t},a));default:return l.createElement(p,(0,n.c)({item:t},a))}}function E(e){let{items:t,...a}=e;return l.createElement(o.g,null,t.map(((e,t)=>l.createElement(_,(0,n.c)({key:t,item:e,index:t},a)))))}const g=(0,l.memo)(E)},93252:(e,t,a)=>{a.r(t),a.d(t,{default:()=>n});const n={root:"root_jG9K"}},352:(e,t,a)=>{a.r(t),a.d(t,{default:()=>n});const n={sidebar:"sidebar_UEyd",sidebarWithHideableNavbar:"sidebarWithHideableNavbar__00c",sidebarHidden:"sidebarHidden_F1ZE",sidebarLogo:"sidebarLogo_Ydl9"}}}]); \ No newline at end of file diff --git a/assets/js/1f391b9e.d439662c.js b/assets/js/1f391b9e.d439662c.js new file mode 100644 index 00000000..583c7b56 --- /dev/null +++ b/assets/js/1f391b9e.d439662c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[204],{46728:(e,a,t)=>{t.r(a),t.d(a,{default:()=>i});var l=t(11504),c=t(14971),n=t(85008),r=t(45864),m=t(59252),s=t(2616),d=t(75124);const u={mdxPageWrapper:"mdxPageWrapper_j9I6"};function i(e){const{content:a}=e,{metadata:{title:t,description:i,frontMatter:o}}=a,{wrapperClassName:p,hide_table_of_contents:_}=o;return l.createElement(n.cr,{className:(0,c.default)(p??r.W.wrapper.mdxPages,r.W.page.mdxPage)},l.createElement(n.U7,{title:t,description:i}),l.createElement(m.default,null,l.createElement("main",{className:"container container--fluid margin-vert--lg"},l.createElement("div",{className:(0,c.default)("row",u.mdxPageWrapper)},l.createElement("div",{className:(0,c.default)("col",!_&&"col--8")},l.createElement("article",null,l.createElement(s.default,null,l.createElement(a,null)))),!_&&a.toc.length>0&&l.createElement("div",{className:"col col--2"},l.createElement(d.c,{toc:a.toc,minHeadingLevel:o.toc_min_heading_level,maxHeadingLevel:o.toc_max_heading_level}))))))}}}]); \ No newline at end of file diff --git a/assets/js/230402f8.8f6f108c.js b/assets/js/230402f8.8f6f108c.js new file mode 100644 index 00000000..4d187f34 --- /dev/null +++ b/assets/js/230402f8.8f6f108c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[464],{95788:(e,t,n)=>{n.d(t,{Iu:()=>u,yg:()=>m});var a=n(11504);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),c=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},h=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),d=c(n),h=o,m=d["".concat(l,".").concat(h)]||d[h]||p[h]||r;return n?a.createElement(m,i(i({ref:t},u),{},{components:n})):a.createElement(m,i({ref:t},u))}));function m(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=h;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:o,i[1]=s;for(var c=2;c{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>s,toc:()=>c});var a=n(45072),o=(n(11504),n(95788));const r={title:"About",sidebar_position:1},i=void 0,s={unversionedId:"index",id:"index",title:"About",description:"Waku is a suite of generalised messaging protocols aiming to be the communication standard for the decentralised web. It enables private and secure human-to-human, machine-to-machine, and human-to-machine communication without reliance on centralised intermediaries. Messaging through Waku is possible from one-to-one to many-to-many.",source:"@site/about/index.md",sourceDirName:".",slug:"/",permalink:"/about/",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{title:"About",sidebar_position:1},sidebar:"defaultSidebar",next:{title:"Description and architecture",permalink:"/about/architect"}},l={},c=[{value:"Motive",id:"motive",level:3},{value:"(Slowly) moving toward a decentralised web",id:"slowly-moving-toward-a-decentralised-web",level:3},{value:"The birth of Waku",id:"the-birth-of-waku",level:3}],u={toc:c},d="wrapper";function p(e){let{components:t,...r}=e;return(0,o.yg)(d,(0,a.c)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("p",null,"Waku is a suite of generalised messaging protocols aiming to be the communication standard for the decentralised web. It enables private and secure human-to-human, machine-to-machine, and human-to-machine communication without reliance on centralised intermediaries. Messaging through Waku is possible from one-to-one to many-to-many."),(0,o.yg)("p",null,"Waku serves as the communications layer of the ",(0,o.yg)("a",{parentName:"p",href:"https://logos.co/"},"Logos")," tech stack. Alongside the trustless agreement layer, ",(0,o.yg)("a",{parentName:"p",href:"http://www.nomos.tech"},"Nomos"),", and the storage layer, ",(0,o.yg)("a",{parentName:"p",href:"http://www.codex.storage"},"Codex"),", it is one of the Logos Collective's foundational projects. "),(0,o.yg)("br",null),(0,o.yg)("h3",{id:"motive"},"Motive"),(0,o.yg)("p",null,"Today's internet is increasingly controlled by a small number of tech giants. Google, Amazon, Meta, and a few others dictate what we see and with whom we can communicate. Their influence is almost limitless, and their actions shape global public opinion and even geopolitics. "),(0,o.yg)("p",null,"To anyone that understands the internet's present architecture, this outcome should be expected. The centralised entities through which we communicate have privileged access to reams of data that we, as internet users, produce daily, presenting an opportunity for the kind of surveillance that was once confined to the pages of science-fiction literature. Thinking that the most powerful commercial and political institutions would not leverage this would be naive. "),(0,o.yg)("p",null,"Yet, it doesn't have to be this way. Advances in cryptography, peer-to-peer networking, and decentralised technologies provide an alternate path forward."),(0,o.yg)("br",null),(0,o.yg)("h3",{id:"slowly-moving-toward-a-decentralised-web"},"(Slowly) moving toward a decentralised web"),(0,o.yg)("p",null,"The early Ethereum community realised this. Initially, the plan was to rebuild the web's architecture along decentralised lines by developing the so-called Holy Trinity of the Decentralised Web: computation, storage, and communication. Ethereum itself would handle computation, Swarm was the reimagined web's storage layer, and Whisper would take care of messaging."),(0,o.yg)("br",null),(0,o.yg)("p",null,(0,o.yg)("img",{alt:"history",src:n(82667).c,width:"1376",height:"894"})),(0,o.yg)("br",null),(0,o.yg)("p",null,"Whisper was a promising start but scalability shortcomings quickly became apparent. Meanwhile, the development of Swarm and Whisper was seemingly relegated to a backseat while Ethereum took centre stage. Yet, without adequate communication and storage layers, the decentralised web's potential for disrupting human coordination remained severely encumbered."),(0,o.yg)("p",null,"Status, the decentralised messaging application, was built to leverage Whisper but because of Whisper\u2019s development delays, the team decided to build their own communication protocol. Consequently, the R&D group ",(0,o.yg)("a",{parentName:"p",href:"https://vac.dev/"},"Vac")," was put together in 2018 to research solutions to Whisper's scaling woes."),(0,o.yg)("br",null),(0,o.yg)("h3",{id:"the-birth-of-waku"},"The birth of Waku"),(0,o.yg)("p",null,"In 2020, Waku v1 was released. As a fork of the Whisper codebase, this initial version introduced various Vac-proposed optimizations, resulting in a better performing messaging protocol. Yet, it was clear that further changes were needed for Waku to be able to handle the volume of messages an application like Status would produce. "),(0,o.yg)("p",null,"The following year, work on a complete protocol rewrite began. Waku v2, as the version under development today is known, introduced a relay protocol that implements pub/sub over libp2p. Additionally, further capabilities were included to make Waku more useful, including historic message retrieval for mostly-offline devices, adaptive nodes to make participation more accessible to users with limited or intermittent connections and lower-spec hardware, and various bandwidth preservation techniques. "),(0,o.yg)("p",null,"Waku was first announced as a core Logos project in June 2023."))}p.isMDXComponent=!0},82667:(e,t,n)=>{n.d(t,{c:()=>a});const a=n.p+"assets/images/history-7650f3989c187c17359f1c0d5596fa69.png"}}]); \ No newline at end of file diff --git a/assets/js/460.0b65f78d.js b/assets/js/460.0b65f78d.js new file mode 100644 index 00000000..d2931ae1 --- /dev/null +++ b/assets/js/460.0b65f78d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[460],{49460:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0});const l=a(81316),o=l.__importDefault(a(11504)),n=l.__importStar(a(84357)),u=a(77956),r=l.__importDefault(a(59252)),d=l.__importDefault(a(93252)),i=l.__importDefault(a(14971)),f=a(81595),c=l.__importDefault(a(76016));t.default=function(){return o.default.createElement(o.default.Fragment,null,o.default.createElement(u.PageMetadata,{title:(0,n.translate)({id:"theme.NotFound.title",message:"Page Not Found"})}),o.default.createElement(r.default,null,o.default.createElement("main",{className:(0,i.default)("container margin-vert--xl",d.default.root)},o.default.createElement("div",{className:"row"},o.default.createElement("div",{className:"col col--6 col--offset-3"},o.default.createElement(f.Typography,{variant:"h1"},o.default.createElement(n.default,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),o.default.createElement(f.Typography,{variant:"body1",component:"p"},o.default.createElement(n.default,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for."),o.default.createElement("br",null),o.default.createElement(n.default,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."))),o.default.createElement(c.default,{to:"/"},o.default.createElement(f.Button,{size:"large",variant:"outlined"},o.default.createElement(n.default,{id:"theme.NotFound.backToHome",description:"The label of the back to home link on the 404 page"},"Back to home")))))))}},93252:(e,t,a)=>{a.r(t),a.d(t,{default:()=>l});const l={root:"root_jG9K"}}}]); \ No newline at end of file diff --git a/assets/js/4c51782d.4d7f47ea.js b/assets/js/4c51782d.4d7f47ea.js new file mode 100644 index 00000000..f3330dc7 --- /dev/null +++ b/assets/js/4c51782d.4d7f47ea.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[364],{65912:(e,n,i)=>{var t=i(39160);i.o(t,"Box")&&i.d(n,{Box:function(){return t.Box}}),i.o(t,"CallToActionButton")&&i.d(n,{CallToActionButton:function(){return t.CallToActionButton}}),i.o(t,"CallToActionSection")&&i.d(n,{CallToActionSection:function(){return t.CallToActionSection}}),i.o(t,"EventAbout")&&i.d(n,{EventAbout:function(){return t.EventAbout}}),i.o(t,"EventBanner")&&i.d(n,{EventBanner:function(){return t.EventBanner}}),i.o(t,"EventCTASection")&&i.d(n,{EventCTASection:function(){return t.EventCTASection}}),i.o(t,"EventCardList")&&i.d(n,{EventCardList:function(){return t.EventCardList}}),i.o(t,"EventHeader")&&i.d(n,{EventHeader:function(){return t.EventHeader}}),i.o(t,"EventInfo")&&i.d(n,{EventInfo:function(){return t.EventInfo}}),i.o(t,"EventProfileList")&&i.d(n,{EventProfileList:function(){return t.EventProfileList}}),i.o(t,"FeatureList")&&i.d(n,{FeatureList:function(){return t.FeatureList}}),i.o(t,"Grid")&&i.d(n,{Grid:function(){return t.Grid}}),i.o(t,"Hero")&&i.d(n,{Hero:function(){return t.Hero}}),i.o(t,"HeroAction")&&i.d(n,{HeroAction:function(){return t.HeroAction}}),i.o(t,"HeroActions")&&i.d(n,{HeroActions:function(){return t.HeroActions}}),i.o(t,"HeroDescription")&&i.d(n,{HeroDescription:function(){return t.HeroDescription}}),i.o(t,"HeroInfo")&&i.d(n,{HeroInfo:function(){return t.HeroInfo}}),i.o(t,"HeroTitle")&&i.d(n,{HeroTitle:function(){return t.HeroTitle}}),i.o(t,"HeroVideo")&&i.d(n,{HeroVideo:function(){return t.HeroVideo}}),i.o(t,"JobsPerDepartment")&&i.d(n,{JobsPerDepartment:function(){return t.JobsPerDepartment}}),i.o(t,"NewsletterSubscription")&&i.d(n,{NewsletterSubscription:function(){return t.NewsletterSubscription}}),i.o(t,"Roadmap")&&i.d(n,{Roadmap:function(){return t.Roadmap}}),i.o(t,"ShowcaseCard")&&i.d(n,{ShowcaseCard:function(){return t.ShowcaseCard}}),i.o(t,"SocialCard")&&i.d(n,{SocialCard:function(){return t.SocialCard}})},23516:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>b,frontMatter:()=>s,metadata:()=>u,toc:()=>_});var t=i(45072),o=(i(11504),i(95788));const r=JSON.parse('{"departments":[{"id":87842,"name":"App","parent_id":43806,"child_ids":[87847,87852,87850,87848,45530,87849],"jobs":[]},{"id":54504,"name":"Brand Design Studio","parent_id":null,"child_ids":[],"jobs":[]},{"id":45532,"name":"Business Development","parent_id":null,"child_ids":[],"jobs":[]},{"id":87841,"name":"Codex","parent_id":43806,"child_ids":[],"jobs":[]},{"id":84549,"name":"Communications","parent_id":null,"child_ids":[],"jobs":[]},{"id":45531,"name":"Design","parent_id":null,"child_ids":[],"jobs":[]},{"id":87847,"name":"Desktop","parent_id":87842,"child_ids":[],"jobs":[]},{"id":87852,"name":"Documentation","parent_id":87842,"child_ids":[],"jobs":[]},{"id":45547,"name":"Engineering ","parent_id":null,"child_ids":[],"jobs":[]},{"id":49925,"name":"Finance","parent_id":87845,"child_ids":[],"jobs":[]},{"id":87854,"name":"Infrastructure","parent_id":43806,"child_ids":[],"jobs":[]},{"id":87853,"name":"Insights","parent_id":87845,"child_ids":[],"jobs":[]},{"id":87850,"name":"Keycard","parent_id":87842,"child_ids":[],"jobs":[]},{"id":145838,"name":"Leadership","parent_id":null,"child_ids":[],"jobs":[]},{"id":74156,"name":"Legal","parent_id":87845,"child_ids":[],"jobs":[]},{"id":91698,"name":"Logos","parent_id":null,"child_ids":[],"jobs":[]},{"id":43807,"name":"Marketing","parent_id":null,"child_ids":[],"jobs":[]},{"id":87848,"name":"Mobile","parent_id":87842,"child_ids":[],"jobs":[]},{"id":87843,"name":"Nimbus","parent_id":43806,"child_ids":[],"jobs":[]},{"id":144866,"name":"Nomos","parent_id":43806,"child_ids":[],"jobs":[]},{"id":45548,"name":"People Operations","parent_id":87845,"child_ids":[],"jobs":[]},{"id":45530,"name":"Product Design","parent_id":87842,"child_ids":[],"jobs":[]},{"id":90941,"name":"Program Management","parent_id":null,"child_ids":[],"jobs":[]},{"id":43806,"name":"Research & Development","parent_id":null,"child_ids":[87842,87841,87854,87843,144866,87846,87981,87847,87852,87850,87848,45530,87849],"jobs":[]},{"id":87851,"name":"Security","parent_id":87845,"child_ids":[],"jobs":[]},{"id":87845,"name":"Services","parent_id":null,"child_ids":[49925,87853,74156,45548,87851],"jobs":[]},{"id":91697,"name":"Status App ","parent_id":null,"child_ids":[],"jobs":[]},{"id":54783,"name":"Technical Writing ","parent_id":null,"child_ids":[],"jobs":[]},{"id":87846,"name":"Vac","parent_id":43806,"child_ids":[],"jobs":[]},{"id":87981,"name":"Waku","parent_id":43806,"child_ids":[],"jobs":[{"absolute_url":"https://boards.greenhouse.io/waku/jobs/5681154","data_compliance":[{"type":"gdpr","requires_consent":false,"requires_processing_consent":false,"requires_retention_consent":false,"retention_period":null}],"internal_job_id":2781376,"location":{"name":"Remote (Worldwide)"},"metadata":null,"id":5681154,"updated_at":"2024-02-12T06:08:49-05:00","requisition_id":"PROV-Wak-10","title":"Protocol Engineer (nwaku)"},{"absolute_url":"https://boards.greenhouse.io/waku/jobs/5673113","data_compliance":[{"type":"gdpr","requires_consent":false,"requires_processing_consent":false,"requires_retention_consent":false,"retention_period":null}],"internal_job_id":2768386,"location":{"name":"Remote (Worldwide)"},"metadata":null,"id":5673113,"updated_at":"2024-02-05T16:27:24-05:00","requisition_id":"BACK-1405","title":"Protocol Research Engineer"},{"absolute_url":"https://boards.greenhouse.io/waku/jobs/5607301","data_compliance":[{"type":"gdpr","requires_consent":false,"requires_processing_consent":false,"requires_retention_consent":false,"retention_period":null}],"internal_job_id":2756104,"location":{"name":"Remote (Worldwide)"},"metadata":null,"id":5607301,"updated_at":"2024-01-26T04:38:24-05:00","requisition_id":"BACK-1397","title":"Software Engineer (Waku Chat SDK)"}]},{"id":87849,"name":"Web","parent_id":87842,"child_ids":[],"jobs":[]},{"id":0,"name":"No Department","parent_id":null,"child_ids":[],"jobs":[]}]}');var d=i.t(r,2),a=i(65912);const s={title:"Join Us",hide_title:!0,pagination_prev:null,pagination_next:null,displayed_sidebar:null,hide_table_of_contents:!0},l=void 0,u={unversionedId:"join-us",id:"join-us",title:"Join Us",description:"",source:"@site/root-pages/join-us.mdx",sourceDirName:".",slug:"/join-us",permalink:"/join-us",draft:!1,tags:[],version:"current",frontMatter:{title:"Join Us",hide_title:!0,pagination_prev:null,pagination_next:null,displayed_sidebar:null,hide_table_of_contents:!0}},c={},_=[],p={toc:_},m="wrapper";function b(e){let{components:n,...i}=e;return(0,o.yg)(m,(0,t.c)({},p,i,{components:n,mdxType:"MDXLayout"}),(0,o.yg)(a.JobsPerDepartment,{jobData:d,mdxType:"JobsPerDepartment"}))}b.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/5086c83f.1eaca7e8.js b/assets/js/5086c83f.1eaca7e8.js new file mode 100644 index 00000000..ef6a545d --- /dev/null +++ b/assets/js/5086c83f.1eaca7e8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[216],{65912:(o,t,e)=>{var n=e(39160);e.o(n,"Box")&&e.d(t,{Box:function(){return n.Box}}),e.o(n,"CallToActionButton")&&e.d(t,{CallToActionButton:function(){return n.CallToActionButton}}),e.o(n,"CallToActionSection")&&e.d(t,{CallToActionSection:function(){return n.CallToActionSection}}),e.o(n,"EventAbout")&&e.d(t,{EventAbout:function(){return n.EventAbout}}),e.o(n,"EventBanner")&&e.d(t,{EventBanner:function(){return n.EventBanner}}),e.o(n,"EventCTASection")&&e.d(t,{EventCTASection:function(){return n.EventCTASection}}),e.o(n,"EventCardList")&&e.d(t,{EventCardList:function(){return n.EventCardList}}),e.o(n,"EventHeader")&&e.d(t,{EventHeader:function(){return n.EventHeader}}),e.o(n,"EventInfo")&&e.d(t,{EventInfo:function(){return n.EventInfo}}),e.o(n,"EventProfileList")&&e.d(t,{EventProfileList:function(){return n.EventProfileList}}),e.o(n,"FeatureList")&&e.d(t,{FeatureList:function(){return n.FeatureList}}),e.o(n,"Grid")&&e.d(t,{Grid:function(){return n.Grid}}),e.o(n,"Hero")&&e.d(t,{Hero:function(){return n.Hero}}),e.o(n,"HeroAction")&&e.d(t,{HeroAction:function(){return n.HeroAction}}),e.o(n,"HeroActions")&&e.d(t,{HeroActions:function(){return n.HeroActions}}),e.o(n,"HeroDescription")&&e.d(t,{HeroDescription:function(){return n.HeroDescription}}),e.o(n,"HeroInfo")&&e.d(t,{HeroInfo:function(){return n.HeroInfo}}),e.o(n,"HeroTitle")&&e.d(t,{HeroTitle:function(){return n.HeroTitle}}),e.o(n,"HeroVideo")&&e.d(t,{HeroVideo:function(){return n.HeroVideo}}),e.o(n,"JobsPerDepartment")&&e.d(t,{JobsPerDepartment:function(){return n.JobsPerDepartment}}),e.o(n,"NewsletterSubscription")&&e.d(t,{NewsletterSubscription:function(){return n.NewsletterSubscription}}),e.o(n,"Roadmap")&&e.d(t,{Roadmap:function(){return n.Roadmap}}),e.o(n,"ShowcaseCard")&&e.d(t,{ShowcaseCard:function(){return n.ShowcaseCard}}),e.o(n,"SocialCard")&&e.d(t,{SocialCard:function(){return n.SocialCard}})},95716:(o,t,e)=>{e.r(t),e.d(t,{assets:()=>s,contentTitle:()=>a,default:()=>g,frontMatter:()=>c,metadata:()=>u,toc:()=>d});var n=e(45072),r=(e(11504),e(95788)),i=e(65912);const c={title:"Join the community",pagination_prev:null,pagination_next:null,displayed_sidebar:null,sidebar_class_name:"hidden"},a="Join the community",u={unversionedId:"community",id:"community",title:"Join the community",description:"Welcome to the Waku Community!",source:"@site/root-pages/community.mdx",sourceDirName:".",slug:"/community",permalink:"/community",draft:!1,tags:[],version:"current",frontMatter:{title:"Join the community",pagination_prev:null,pagination_next:null,displayed_sidebar:null,sidebar_class_name:"hidden"}},s={},d=[],l={toc:d},m="wrapper";function g(o){let{components:t,...e}=o;return(0,r.yg)(m,(0,n.c)({},l,e,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"join-the-community"},"Join the community"),(0,r.yg)(i.Box,{top:24,bottom:24,mdxType:"Box"},"Welcome to the Waku Community!",(0,r.yg)("p",null," Whether you are interested in building with Waku, contributing to the network, expanding your knowledge, or staying abreast of our progress, we have something for everyone.")),(0,r.yg)(i.Box,{top:56,bottom:56,mdxType:"Box"},(0,r.yg)(i.Grid,{xs:{cols:1,gap:"1rem"},md:{cols:2},mdxType:"Grid"},(0,r.yg)(i.Grid.Item,{xs:1},(0,r.yg)(i.SocialCard,{href:"https://twitter.com/waku_org",logoSrc:"/icons/x-black.svg",logoSrcDark:"/icons/x-white.svg",description:"Follow us on X",mdxType:"SocialCard"})),(0,r.yg)(i.Grid.Item,{xs:1},(0,r.yg)(i.SocialCard,{href:"https://discord.waku.org",logoSrc:"/icons/discord-black.svg",logoSrcDark:"/icons/discord-white.svg",description:"Join the community on Discord",mdxType:"SocialCard"})),(0,r.yg)(i.Grid.Item,{xs:1},(0,r.yg)(i.SocialCard,{href:"https://t.me/waku_org",logoSrc:"/icons/telegram-black.svg",logoSrcDark:"/icons/telegram-white.svg",description:"Jump in the conversation on Telegram",mdxType:"SocialCard"})),(0,r.yg)(i.Grid.Item,{xs:1},(0,r.yg)(i.SocialCard,{href:"https://forum.vac.dev/",logoSrcDark:"/vac.svg",description:"Share your thoughts on the latest research on the Vac research forum",mdxType:"SocialCard"})),(0,r.yg)(i.Grid.Item,{xs:1},(0,r.yg)(i.SocialCard,{href:"https://github.com/waku-org/bounties/issues",logoSrc:"/icons/github-black.svg",logoSrcDark:"/icons/github-white.svg",description:"Work on an open bounty",mdxType:"SocialCard"})))))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/546e778e.c57814db.js b/assets/js/546e778e.c57814db.js new file mode 100644 index 00000000..fd2d6458 --- /dev/null +++ b/assets/js/546e778e.c57814db.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[344],{33732:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.useNewsletterApi=void 0;const r=a(11504);t.useNewsletterApi=()=>{const[e,t]=(0,r.useState)(!1),[a,l]=(0,r.useState)({error:!1,message:""});return{busy:e,error:a.error,message:a.message,subscribe:async(e,a,r)=>{t(!0);try{const t=await fetch("https://odoo.logos.co/website_mass_mailing/subscribe2",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",method:"call",params:{name:r,value:a,list_id:e,subscription_type:"email"}})}),s=await t.json();l({error:!1,message:s.result.message})}catch(s){l({error:!0,message:"Something went wrong!"})}t(!1)}}}},53580:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionPage=void 0;const r=a(81316),l=a(81595),s=r.__importDefault(a(76016)),u=r.__importDefault(a(74012)),o=r.__importDefault(a(11504)),n=a(33732),i=a(56644),m=r.__importDefault(a(12448));t.SubscriptionPage=e=>{let{}=e;const t=(0,i.useThemeOptions)(),a=(0,n.useNewsletterApi)(),r=!a.message||a.error;return o.default.createElement("div",{className:m.default.container},o.default.createElement("div",{className:m.default.root},o.default.createElement("div",{className:m.default.header},o.default.createElement(u.default,{sources:{dark:"/theme/image/horizontal_lockup_small_white.svg",light:"/theme/image/horizontal_lockup_small_black.svg"},height:88}),o.default.createElement(l.Typography,{component:"p"},"Subscribe to our newsletter")),a.message&&o.default.createElement(l.Toast,{size:"medium",title:a.message,icon:a.error?l.ErrorIcon:l.CheckIcon,className:m.default.toast}),a.error&&a.message&&o.default.createElement("div",null),r&&o.default.createElement("form",{className:m.default.form,onSubmit:e=>{e.preventDefault();const r=e.target,l=r.elements.namedItem("name").value,s=r.elements.namedItem("email").value;a.subscribe(t.newsletterSubscription.mailingListId,s,l)}},o.default.createElement("div",{className:m.default.inputs},o.default.createElement(l.TextField,{inputProps:{name:"name",type:"text",required:!1},size:"medium",variant:"underlined",placeholder:"First name or pseudonym"}),o.default.createElement(l.TextField,{inputProps:{name:"email",type:"email",required:!0},size:"medium",variant:"underlined",placeholder:"Email address (required)"})),o.default.createElement("div",{className:m.default.submit},o.default.createElement(l.Button,{variant:"filled",disabled:a.busy},"Subscribe"))),!r&&o.default.createElement("div",{className:m.default.toHome},o.default.createElement(s.default,{href:"/"},o.default.createElement(l.Button,{variant:"filled"},"To home page")))))},t.default=t.SubscriptionPage},68652:(e,t,a)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;a(81316).__exportStar(a(53580),t);var r=a(53580);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.SubscriptionPage}})},67228:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});var r=a(68652),l=a(56952),s=a(59252),u=a(11504);const o=()=>u.createElement(s.default,{title:"Subscribe to our newsletter"},u.createElement(l.c,null,u.createElement("meta",{name:"og:image_title",content:"Subscribe to our newsletter"})),u.createElement(r.SubscriptionPage,null))},12448:(e,t,a)=>{a.r(t),a.d(t,{default:()=>r});const r={toHome:"toHome_tEiU",form:"form_lk4c",submit:"submit_J_94",inputs:"inputs_dj3Q",header:"header_Gr5N",root:"root_lcb5",container:"container_YAWF",toast:"toast_C8x1"}}}]); \ No newline at end of file diff --git a/assets/js/579.748c70f6.js b/assets/js/579.748c70f6.js new file mode 100644 index 00000000..f7f33f2a --- /dev/null +++ b/assets/js/579.748c70f6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[579],{46579:(t,e,n)=>{n.d(e,{diagram:()=>A});var i=n(43900),s=n(2588),r=n(34176),a=n(67612),c=n(85219),o=(n(62264),n(86208),n(24300),n(1488),n(95536),n(58408),n(128),n(18268),n(75816),n(27280),function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[1,2],n=[1,5],i=[6,9,11,17,18,20,22,23,26,27,28],s=[1,15],r=[1,16],a=[1,17],c=[1,18],o=[1,19],l=[1,23],h=[1,24],d=[1,27],u=[4,6,9,11,17,18,20,22,23,26,27,28],p={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,period_statement:24,event_statement:25,period:26,event:27,open_directive:28,type_directive:29,arg_directive:30,close_directive:31,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",26:"period",27:"event",28:"open_directive",29:"type_directive",30:"arg_directive",31:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[24,1],[25,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,i,s,r,a){var c=r.length-1;switch(s){case 1:return r[c-1];case 3:case 7:case 8:this.$=[];break;case 4:r[c-1].push(r[c]),this.$=r[c-1];break;case 5:case 6:this.$=r[c];break;case 11:i.getCommonDb().setDiagramTitle(r[c].substr(6)),this.$=r[c].substr(6);break;case 12:this.$=r[c].trim(),i.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=r[c].trim(),i.getCommonDb().setAccDescription(this.$);break;case 15:i.addSection(r[c].substr(8)),this.$=r[c].substr(8);break;case 19:i.addTask(r[c],0,""),this.$=r[c];break;case 20:i.addEvent(r[c].substr(2)),this.$=r[c];break;case 21:i.parseDirective("%%{","open_directive");break;case 22:i.parseDirective(r[c],"type_directive");break;case 23:r[c]=r[c].trim().replace(/'/g,'"'),i.parseDirective(r[c],"arg_directive");break;case 24:i.parseDirective("}%%","close_directive","timeline")}},table:[{3:1,4:e,7:3,12:4,28:n},{1:[3]},t(i,[2,3],{5:6}),{3:7,4:e,7:3,12:4,28:n},{13:8,29:[1,9]},{29:[2,21]},{6:[1,10],7:22,8:11,9:[1,12],10:13,11:[1,14],12:4,17:s,18:r,20:a,22:c,23:o,24:20,25:21,26:l,27:h,28:n},{1:[2,2]},{14:25,15:[1,26],31:d},t([15,31],[2,22]),t(i,[2,8],{1:[2,1]}),t(i,[2,4]),{7:22,10:28,12:4,17:s,18:r,20:a,22:c,23:o,24:20,25:21,26:l,27:h,28:n},t(i,[2,6]),t(i,[2,7]),t(i,[2,11]),{19:[1,29]},{21:[1,30]},t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),t(i,[2,17]),t(i,[2,18]),t(i,[2,19]),t(i,[2,20]),{11:[1,31]},{16:32,30:[1,33]},{11:[2,24]},t(i,[2,5]),t(i,[2,12]),t(i,[2,13]),t(u,[2,9]),{14:34,31:d},{31:[2,23]},{11:[1,35]},t(u,[2,10])],defaultActions:{5:[2,21],7:[2,2],27:[2,24],33:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],i=[],s=[null],r=[],a=this.table,c="",o=0,l=0,h=r.slice.call(arguments,1),d=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);d.setInput(t,u.yy),u.yy.lexer=d,u.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;r.push(y);var g=d.options&&d.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var f,m,_,b,k,x,v,w,S,$={};;){if(m=n[n.length-1],this.defaultActions[m]?_=this.defaultActions[m]:(null==f&&(S=void 0,"number"!=typeof(S=i.pop()||d.lex()||1)&&(S instanceof Array&&(S=(i=S).pop()),S=e.symbols_[S]||S),f=S),_=a[m]&&a[m][f]),void 0===_||!_.length||!_[0]){var E="";for(k in w=[],a[m])this.terminals_[k]&&k>2&&w.push("'"+this.terminals_[k]+"'");E=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(E,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:y,expected:w})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+f);switch(_[0]){case 1:n.push(f),s.push(d.yytext),r.push(d.yylloc),n.push(_[1]),f=null,l=d.yyleng,c=d.yytext,o=d.yylineno,y=d.yylloc;break;case 2:if(x=this.productions_[_[1]][1],$.$=s[s.length-x],$._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},g&&($._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply($,[c,l,o,u.yy,_[1],s,r].concat(h))))return b;x&&(n=n.slice(0,-1*x*2),s=s.slice(0,-1*x),r=r.slice(0,-1*x)),n.push(this.productions_[_[1]][0]),s.push($.$),r.push($._$),v=a[n[n.length-2]][n[n.length-1]],n.push(v);break;case 3:return!0}}return!0}},y={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),28;case 1:return this.begin("type_directive"),29;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),31;case 4:return 30;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 27;case 21:return 26;case 22:return 6;case 23:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?::\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23],inclusive:!0}}};function g(){this.yy={}}return p.lexer=y,g.prototype=p,p.Parser=g,new g}());o.parser=o;const l=o;let h="",d=0;const u=[],p=[],y=[],g=()=>i.j,f=(t,e,n)=>{(0,i.k)(globalThis,t,e,n)},m=function(){u.length=0,p.length=0,h="",y.length=0,(0,i.m)()},_=function(t){h=t,u.push(t)},b=function(){return u},k=function(){let t=S();let e=0;for(;!t&&e<100;)t=S(),e++;return p.push(...y),p},x=function(t,e,n){const i={id:d++,section:h,type:h,task:t,score:e||0,events:n?[n]:[]};y.push(i)},v=function(t){y.find((t=>t.id===d-1)).events.push(t)},w=function(t){const e={section:h,type:h,description:t,task:t,classes:[]};p.push(e)},S=function(){let t=!0;for(const[e,n]of y.entries())y[e].processed,t=t&&n.processed;return t},$={clear:m,getCommonDb:g,addSection:_,getSections:b,getTasks:k,addTask:x,addTaskOrg:w,addEvent:v,parseDirective:f},E=Object.freeze(Object.defineProperty({__proto__:null,addEvent:v,addSection:_,addTask:x,addTaskOrg:w,clear:m,default:$,getCommonDb:g,getSections:b,getTasks:k,parseDirective:f},Symbol.toStringTag,{value:"Module"}));!function(){function t(t,e,n,s,r,a,c,o){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),c)}function e(t,e,n,s,r,a,c,o,l){const{taskFontSize:h,taskFontFamily:d}=o,u=t.split(//gi);for(let p=0;p)/).reverse(),r=[],a=n.attr("y"),c=parseFloat(n.attr("dy")),o=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",c+"em");for(let s=0;se||"
"===t)&&(r.pop(),o.text(r.join(" ").trim()),r="
"===t?[""]:[t],o=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))}))}const D=function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},M=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},T=function(t,e,n,i){const s=n%12-1,r=t.append("g");e.section=s,r.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+s);const a=r.append("g"),c=r.append("g"),o=c.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(I,e.width).node().getBBox(),l=i.fontSize&&i.fontSize.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=o.height+1.1*l*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,c.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),D(a,e,s),e},L=function(t,e,n){const i=t.append("g"),s=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(I,e.width).node().getBBox(),r=n.fontSize&&n.fontSize.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),s.height+1.1*r*.5+e.padding},C=function(t,e,n,s,r,a,c,o,l,h,d){for(const u of e){const e={descr:u.task,section:n,number:n,width:150,padding:20,maxHeight:a};i.l.debug("taskNode",e);const o=t.append("g").attr("class","taskWrapper"),p=T(o,e,n,c).height;if(i.l.debug("taskHeight after draw",p),o.attr("transform",`translate(${s}, ${r})`),a=Math.max(a,p),u.events){const e=t.append("g").attr("class","lineWrapper");let i=a;r+=100,i+=O(t,u.events,n,s,r,c),r-=100,e.append("line").attr("x1",s+95).attr("y1",r+a).attr("x2",s+95).attr("y2",r+a+(d?a:h)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s+=200,d&&!(0,i.g)().timeline.disableMulticolor&&n++}r-=10},O=function(t,e,n,s,r,a){let c=0;const o=r;r+=100;for(const l of e){const e={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50};i.l.debug("eventNode",e);const o=t.append("g").attr("class","eventWrapper"),h=T(o,e,n,a).height;c+=h,o.attr("transform",`translate(${s}, ${r})`),r=r+10+h}return r=o,c},A={db:E,renderer:{setConf:function(t){Object.keys(t).forEach((function(e){conf[e]=t[e]}))},draw:function(t,e,n,r){const a=(0,i.g)(),c=a.leftMargin?a.leftMargin:50;r.db.clear(),r.parser.parse(t+"\n"),i.l.debug("timeline",r.db);const o=a.securityLevel;let l;"sandbox"===o&&(l=(0,s.MlD)("#i"+e));const h=("sandbox"===o?(0,s.MlD)(l.nodes()[0].contentDocument.body):(0,s.MlD)("body")).select("#"+e);h.append("g");const d=r.db.getTasks(),u=r.db.getCommonDb().getDiagramTitle();i.l.debug("task",d),M(h);const p=r.db.getSections();i.l.debug("sections",p);let y=0,g=0,f=0,m=0,_=50+c,b=50;m=50;let k=0,x=!0;p.forEach((function(t){const e=L(h,{number:k,descr:t,section:k,width:150,padding:20,maxHeight:y},a);i.l.debug("sectionHeight before draw",e),y=Math.max(y,e+20)}));let v=0,w=0;i.l.debug("tasks.length",d.length);for(const[s,$]of d.entries()){const t={number:s,descr:$,section:$.section,width:150,padding:20,maxHeight:g},e=L(h,t,a);i.l.debug("taskHeight before draw",e),g=Math.max(g,e+20),v=Math.max(v,$.events.length);let n=0;for(let i=0;i<$.events.length;i++){const t={descr:$.events[i],section:$.section,number:$.section,width:150,padding:20,maxHeight:50};n+=L(h,t,a)}w=Math.max(w,n)}i.l.debug("maxSectionHeight before draw",y),i.l.debug("maxTaskHeight before draw",g),p&&p.length>0?p.forEach((t=>{const e={number:k,descr:t,section:k,width:150,padding:20,maxHeight:y};i.l.debug("sectionNode",e);const n=h.append("g"),s=T(n,e,k,a);i.l.debug("sectionNode output",s),n.attr("transform",`translate(${_}, 50)`),b+=y+50;const r=d.filter((e=>e.section===t));r.length>0&&C(h,r,k,_,b,g,a,v,w,y,!1),_+=200*Math.max(r.length,1),b=50,k++})):(x=!1,C(h,d,k,_,b,g,a,v,w,y,!0));const S=h.node().getBBox();i.l.debug("bounds",S),u&&h.append("text").text(u).attr("x",S.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),f=x?y+g+150:g+100;h.append("g").attr("class","lineWrapper").append("line").attr("x1",c).attr("y1",f).attr("x2",S.width+3*c).attr("y2",f).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,i.s)(void 0,h,a.timeline.padding?a.timeline.padding:50,!!a.timeline.useMaxWidth&&a.timeline.useMaxWidth)}},parser:l,styles:t=>`\n .edge {\n stroke-width: 3;\n }\n ${(t=>{let e="";for(let n=0;n{n.d(e,{c:()=>c});var i=n(89612),s=n(72120);const r=t=>{const{r:e,g:n,b:r}=s.c.parse(t),a=.2126*i.c.channel.toLinear(e)+.7152*i.c.channel.toLinear(n)+.0722*i.c.channel.toLinear(r);return i.c.lang.round(a)},a=t=>r(t)>=.5,c=t=>!a(t)}}]); \ No newline at end of file diff --git a/assets/js/579.a0849ebd.js b/assets/js/579.a0849ebd.js new file mode 100644 index 00000000..9b307864 --- /dev/null +++ b/assets/js/579.a0849ebd.js @@ -0,0 +1,1354 @@ +"use strict"; +exports.id = 579; +exports.ids = [579]; +exports.modules = { + +/***/ 46579: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(99968); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2588); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(34176); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(67612); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(85219); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62264); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86208); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66296); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1488); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95536); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(58408); +/* harmony import */ var dagre_d3_es__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(128); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(18268); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(75816); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(27280); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_10__); + + + + + + + + + + + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 2], $V1 = [1, 5], $V2 = [6, 9, 11, 17, 18, 20, 22, 23, 26, 27, 28], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 17], $V6 = [1, 18], $V7 = [1, 19], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 27], $Vb = [4, 6, 9, 11, 17, 18, 20, 22, 23, 26, 27, 28]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "timeline": 4, "document": 5, "EOF": 6, "directive": 7, "line": 8, "SPACE": 9, "statement": 10, "NEWLINE": 11, "openDirective": 12, "typeDirective": 13, "closeDirective": 14, ":": 15, "argDirective": 16, "title": 17, "acc_title": 18, "acc_title_value": 19, "acc_descr": 20, "acc_descr_value": 21, "acc_descr_multiline_value": 22, "section": 23, "period_statement": 24, "event_statement": 25, "period": 26, "event": 27, "open_directive": 28, "type_directive": 29, "arg_directive": 30, "close_directive": 31, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 4: "timeline", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 17: "title", 18: "acc_title", 19: "acc_title_value", 20: "acc_descr", 21: "acc_descr_value", 22: "acc_descr_multiline_value", 23: "section", 26: "period", 27: "event", 28: "open_directive", 29: "type_directive", 30: "arg_directive", 31: "close_directive" }, + productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [24, 1], [25, 1], [12, 1], [13, 1], [16, 1], [14, 1]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + case 3: + this.$ = []; + break; + case 4: + $$[$0 - 1].push($$[$0]); + this.$ = $$[$0 - 1]; + break; + case 5: + case 6: + this.$ = $$[$0]; + break; + case 7: + case 8: + this.$ = []; + break; + case 11: + yy.getCommonDb().setDiagramTitle($$[$0].substr(6)); + this.$ = $$[$0].substr(6); + break; + case 12: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccTitle(this.$); + break; + case 13: + case 14: + this.$ = $$[$0].trim(); + yy.getCommonDb().setAccDescription(this.$); + break; + case 15: + yy.addSection($$[$0].substr(8)); + this.$ = $$[$0].substr(8); + break; + case 19: + yy.addTask($$[$0], 0, ""); + this.$ = $$[$0]; + break; + case 20: + yy.addEvent($$[$0].substr(2)); + this.$ = $$[$0]; + break; + case 21: + yy.parseDirective("%%{", "open_directive"); + break; + case 22: + yy.parseDirective($$[$0], "type_directive"); + break; + case 23: + $$[$0] = $$[$0].trim().replace(/'/g, '"'); + yy.parseDirective($$[$0], "arg_directive"); + break; + case 24: + yy.parseDirective("}%%", "close_directive", "timeline"); + break; + } + }, + table: [{ 3: 1, 4: $V0, 7: 3, 12: 4, 28: $V1 }, { 1: [3] }, o($V2, [2, 3], { 5: 6 }), { 3: 7, 4: $V0, 7: 3, 12: 4, 28: $V1 }, { 13: 8, 29: [1, 9] }, { 29: [2, 21] }, { 6: [1, 10], 7: 22, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: $V3, 18: $V4, 20: $V5, 22: $V6, 23: $V7, 24: 20, 25: 21, 26: $V8, 27: $V9, 28: $V1 }, { 1: [2, 2] }, { 14: 25, 15: [1, 26], 31: $Va }, o([15, 31], [2, 22]), o($V2, [2, 8], { 1: [2, 1] }), o($V2, [2, 4]), { 7: 22, 10: 28, 12: 4, 17: $V3, 18: $V4, 20: $V5, 22: $V6, 23: $V7, 24: 20, 25: 21, 26: $V8, 27: $V9, 28: $V1 }, o($V2, [2, 6]), o($V2, [2, 7]), o($V2, [2, 11]), { 19: [1, 29] }, { 21: [1, 30] }, o($V2, [2, 14]), o($V2, [2, 15]), o($V2, [2, 16]), o($V2, [2, 17]), o($V2, [2, 18]), o($V2, [2, 19]), o($V2, [2, 20]), { 11: [1, 31] }, { 16: 32, 30: [1, 33] }, { 11: [2, 24] }, o($V2, [2, 5]), o($V2, [2, 12]), o($V2, [2, 13]), o($Vb, [2, 9]), { 14: 34, 31: $Va }, { 31: [2, 23] }, { 11: [1, 35] }, o($Vb, [2, 10])], + defaultActions: { 5: [2, 21], 7: [2, 2], 27: [2, 24], 33: [2, 23] }, + parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + this.begin("open_directive"); + return 28; + case 1: + this.begin("type_directive"); + return 29; + case 2: + this.popState(); + this.begin("arg_directive"); + return 15; + case 3: + this.popState(); + this.popState(); + return 31; + case 4: + return 30; + case 5: + break; + case 6: + break; + case 7: + return 11; + case 8: + break; + case 9: + break; + case 10: + return 4; + case 11: + return 17; + case 12: + this.begin("acc_title"); + return 18; + case 13: + this.popState(); + return "acc_title_value"; + case 14: + this.begin("acc_descr"); + return 20; + case 15: + this.popState(); + return "acc_descr_value"; + case 16: + this.begin("acc_descr_multiline"); + break; + case 17: + this.popState(); + break; + case 18: + return "acc_descr_multiline_value"; + case 19: + return 23; + case 20: + return 27; + case 21: + return 26; + case 22: + return 6; + case 23: + return "INVALID"; + } + }, + rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?::\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i], + conditions: { "open_directive": { "rules": [1], "inclusive": false }, "type_directive": { "rules": [2, 3], "inclusive": false }, "arg_directive": { "rules": [3, 4], "inclusive": false }, "acc_descr_multiline": { "rules": [17, 18], "inclusive": false }, "acc_descr": { "rules": [15], "inclusive": false }, "acc_title": { "rules": [13], "inclusive": false }, "INITIAL": { "rules": [0, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 19, 20, 21, 22, 23], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const parser$1 = parser; +let currentSection = ""; +let currentTaskId = 0; +const sections = []; +const tasks = []; +const rawTasks = []; +const getCommonDb = () => _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.j; +const parseDirective = (statement, context, type) => { + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.k)(globalThis, statement, context, type); +}; +const clear = function() { + sections.length = 0; + tasks.length = 0; + currentSection = ""; + rawTasks.length = 0; + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.m)(); +}; +const addSection = function(txt) { + currentSection = txt; + sections.push(txt); +}; +const getSections = function() { + return sections; +}; +const getTasks = function() { + let allItemsProcessed = compileTasks(); + const maxDepth = 100; + let iterationCount = 0; + while (!allItemsProcessed && iterationCount < maxDepth) { + allItemsProcessed = compileTasks(); + iterationCount++; + } + tasks.push(...rawTasks); + return tasks; +}; +const addTask = function(period, length, event) { + const rawTask = { + id: currentTaskId++, + section: currentSection, + type: currentSection, + task: period, + score: length ? length : 0, + //if event is defined, then add it the events array + events: event ? [event] : [] + }; + rawTasks.push(rawTask); +}; +const addEvent = function(event) { + const currentTask = rawTasks.find((task) => task.id === currentTaskId - 1); + currentTask.events.push(event); +}; +const addTaskOrg = function(descr) { + const newTask = { + section: currentSection, + type: currentSection, + description: descr, + task: descr, + classes: [] + }; + tasks.push(newTask); +}; +const compileTasks = function() { + const compileTask = function(pos) { + return rawTasks[pos].processed; + }; + let allProcessed = true; + for (const [i, rawTask] of rawTasks.entries()) { + compileTask(i); + allProcessed = allProcessed && rawTask.processed; + } + return allProcessed; +}; +const timelineDb = { + clear, + getCommonDb, + addSection, + getSections, + getTasks, + addTask, + addTaskOrg, + addEvent, + parseDirective +}; +const db = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addEvent, + addSection, + addTask, + addTaskOrg, + clear, + default: timelineDb, + getCommonDb, + getSections, + getTasks, + parseDirective +}, Symbol.toStringTag, { value: "Module" })); +const MAX_SECTIONS = 12; +const drawRect = function(elem, rectData) { + const rectElem = elem.append("rect"); + rectElem.attr("x", rectData.x); + rectElem.attr("y", rectData.y); + rectElem.attr("fill", rectData.fill); + rectElem.attr("stroke", rectData.stroke); + rectElem.attr("width", rectData.width); + rectElem.attr("height", rectData.height); + rectElem.attr("rx", rectData.rx); + rectElem.attr("ry", rectData.ry); + if (rectData.class !== void 0) { + rectElem.attr("class", rectData.class); + } + return rectElem; +}; +const drawFace = function(element, faceData) { + const radius = 15; + const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible"); + const face = element.append("g"); + face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"); + function smile(face2) { + const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .qoN)().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")"); + } + function sad(face2) { + const arc$1 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .arc */ .qoN)().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2); + face2.append("path").attr("class", "mouth").attr("d", arc$1).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")"); + } + function ambivalent(face2) { + face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666"); + } + if (faceData.score > 3) { + smile(face); + } else if (faceData.score < 3) { + sad(face); + } else { + ambivalent(face); + } + return circleElement; +}; +const drawCircle = function(element, circleData) { + const circleElement = element.append("circle"); + circleElement.attr("cx", circleData.cx); + circleElement.attr("cy", circleData.cy); + circleElement.attr("class", "actor-" + circleData.pos); + circleElement.attr("fill", circleData.fill); + circleElement.attr("stroke", circleData.stroke); + circleElement.attr("r", circleData.r); + if (circleElement.class !== void 0) { + circleElement.attr("class", circleElement.class); + } + if (circleData.title !== void 0) { + circleElement.append("title").text(circleData.title); + } + return circleElement; +}; +const drawText = function(elem, textData) { + const nText = textData.text.replace(//gi, " "); + const textElem = elem.append("text"); + textElem.attr("x", textData.x); + textElem.attr("y", textData.y); + textElem.attr("class", "legend"); + textElem.style("text-anchor", textData.anchor); + if (textData.class !== void 0) { + textElem.attr("class", textData.class); + } + const span = textElem.append("tspan"); + span.attr("x", textData.x + textData.textMargin * 2); + span.text(nText); + return textElem; +}; +const drawLabel = function(elem, txtObject) { + function genPoints(x, y, width, height, cut) { + return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height); + } + const polygon = elem.append("polygon"); + polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7)); + polygon.attr("class", "labelBox"); + txtObject.y = txtObject.y + txtObject.labelMargin; + txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin; + drawText(elem, txtObject); +}; +const drawSection = function(elem, section, conf2) { + const g = elem.append("g"); + const rect = getNoteRect(); + rect.x = section.x; + rect.y = section.y; + rect.fill = section.fill; + rect.width = conf2.width; + rect.height = conf2.height; + rect.class = "journey-section section-type-" + section.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + _drawTextCandidateFunc(conf2)( + section.text, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "journey-section section-type-" + section.num }, + conf2, + section.colour + ); +}; +let taskCount = -1; +const drawTask = function(elem, task, conf2) { + const center = task.x + conf2.width / 2; + const g = elem.append("g"); + taskCount++; + const maxHeight = 300 + 5 * 30; + g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"); + drawFace(g, { + cx: center, + cy: 300 + (5 - task.score) * 30, + score: task.score + }); + const rect = getNoteRect(); + rect.x = task.x; + rect.y = task.y; + rect.fill = task.fill; + rect.width = conf2.width; + rect.height = conf2.height; + rect.class = "task task-type-" + task.num; + rect.rx = 3; + rect.ry = 3; + drawRect(g, rect); + task.x + 14; + _drawTextCandidateFunc(conf2)( + task.task, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "task" }, + conf2, + task.colour + ); +}; +const drawBackgroundRect = function(elem, bounds) { + const rectElem = drawRect(elem, { + x: bounds.startx, + y: bounds.starty, + width: bounds.stopx - bounds.startx, + height: bounds.stopy - bounds.starty, + fill: bounds.fill, + class: "rect" + }); + rectElem.lower(); +}; +const getTextObj = function() { + return { + x: 0, + y: 0, + fill: void 0, + "text-anchor": "start", + width: 100, + height: 100, + textMargin: 0, + rx: 0, + ry: 0 + }; +}; +const getNoteRect = function() { + return { + x: 0, + y: 0, + width: 100, + anchor: "start", + height: 100, + rx: 0, + ry: 0 + }; +}; +const _drawTextCandidateFunc = function() { + function byText(content, g, x, y, width, height, textAttrs, colour) { + const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content); + _setTextAttrs(text, textAttrs); + } + function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) { + const { taskFontSize, taskFontFamily } = conf2; + const lines = content.split(//gi); + for (let i = 0; i < lines.length; i++) { + const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2; + const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily); + text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]); + text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"); + _setTextAttrs(text, textAttrs); + } + } + function byFo(content, g, x, y, width, height, textAttrs, conf2) { + const body = g.append("switch"); + const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed"); + const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%"); + text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content); + byTspan(content, body, x, y, width, height, textAttrs, conf2); + _setTextAttrs(text, textAttrs); + } + function _setTextAttrs(toText, fromTextAttrsDict) { + for (const key in fromTextAttrsDict) { + if (key in fromTextAttrsDict) { + toText.attr(key, fromTextAttrsDict[key]); + } + } + } + return function(conf2) { + return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan; + }; +}(); +const initGraphics = function(graphics) { + graphics.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z"); +}; +function wrap(text, width) { + text.each(function() { + var text2 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)(this), words = text2.text().split(/(\s+|
)/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr("y"), dy = parseFloat(text2.attr("dy")), tspan = text2.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em"); + for (let j = 0; j < words.length; j++) { + word = words[words.length - 1 - j]; + line.push(word); + tspan.text(line.join(" ").trim()); + if (tspan.node().getComputedTextLength() > width || word === "
") { + line.pop(); + tspan.text(line.join(" ").trim()); + if (word === "
") { + line = [""]; + } else { + line = [word]; + } + tspan = text2.append("tspan").attr("x", 0).attr("y", y).attr("dy", lineHeight + "em").text(word); + } + } + }); +} +const drawNode = function(elem, node, fullSection, conf2) { + const section = fullSection % MAX_SECTIONS - 1; + const nodeElem = elem.append("g"); + node.section = section; + nodeElem.attr( + "class", + (node.class ? node.class + " " : "") + "timeline-node " + ("section-" + section) + ); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf2.fontSize && conf2.fontSize.replace ? conf2.fontSize.replace("px", "") : conf2.fontSize; + node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; + node.height = Math.max(node.height, node.maxHeight); + node.width = node.width + 2 * node.padding; + textElem.attr("transform", "translate(" + node.width / 2 + ", " + node.padding / 2 + ")"); + defaultBkg(bkgElem, node, section); + return node; +}; +const getVirtualNodeHeight = function(elem, node, conf2) { + const textElem = elem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf2.fontSize && conf2.fontSize.replace ? conf2.fontSize.replace("px", "") : conf2.fontSize; + textElem.remove(); + return bbox.height + fontSize * 1.1 * 0.5 + node.padding; +}; +const defaultBkg = function(elem, node, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + node.type).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); +}; +const svgDraw = { + drawRect, + drawCircle, + drawSection, + drawText, + drawLabel, + drawTask, + drawBackgroundRect, + getTextObj, + getNoteRect, + initGraphics, + drawNode, + getVirtualNodeHeight +}; +const setConf = function(cnf) { + const keys = Object.keys(cnf); + keys.forEach(function(key) { + conf[key] = cnf[key]; + }); +}; +const draw = function(text, id, version, diagObj) { + const conf2 = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.g)(); + const LEFT_MARGIN = conf2.leftMargin ? conf2.leftMargin : 50; + diagObj.db.clear(); + diagObj.parser.parse(text + "\n"); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("timeline", diagObj.db); + const securityLevel = conf2.securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)("body"); + const svg = root.select("#" + id); + svg.append("g"); + const tasks2 = diagObj.db.getTasks(); + const title = diagObj.db.getCommonDb().getDiagramTitle(); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("task", tasks2); + svgDraw.initGraphics(svg); + const sections2 = diagObj.db.getSections(); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("sections", sections2); + let maxSectionHeight = 0; + let maxTaskHeight = 0; + let depthY = 0; + let sectionBeginY = 0; + let masterX = 50 + LEFT_MARGIN; + let masterY = 50; + sectionBeginY = 50; + let sectionNumber = 0; + let hasSections = true; + sections2.forEach(function(section) { + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 150, + padding: 20, + maxHeight: maxSectionHeight + }; + const sectionHeight = svgDraw.getVirtualNodeHeight(svg, sectionNode, conf2); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("sectionHeight before draw", sectionHeight); + maxSectionHeight = Math.max(maxSectionHeight, sectionHeight + 20); + }); + let maxEventCount = 0; + let maxEventLineLength = 0; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("tasks.length", tasks2.length); + for (const [i, task] of tasks2.entries()) { + const taskNode = { + number: i, + descr: task, + section: task.section, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + const taskHeight = svgDraw.getVirtualNodeHeight(svg, taskNode, conf2); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("taskHeight before draw", taskHeight); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight + 20); + maxEventCount = Math.max(maxEventCount, task.events.length); + let maxEventLineLengthTemp = 0; + for (let j = 0; j < task.events.length; j++) { + const event = task.events[j]; + const eventNode = { + descr: event, + section: task.section, + number: task.section, + width: 150, + padding: 20, + maxHeight: 50 + }; + maxEventLineLengthTemp += svgDraw.getVirtualNodeHeight(svg, eventNode, conf2); + } + maxEventLineLength = Math.max(maxEventLineLength, maxEventLineLengthTemp); + } + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("maxSectionHeight before draw", maxSectionHeight); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("maxTaskHeight before draw", maxTaskHeight); + if (sections2 && sections2.length > 0) { + sections2.forEach((section) => { + const sectionNode = { + number: sectionNumber, + descr: section, + section: sectionNumber, + width: 150, + padding: 20, + maxHeight: maxSectionHeight + }; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("sectionNode", sectionNode); + const sectionNodeWrapper = svg.append("g"); + const node = svgDraw.drawNode(sectionNodeWrapper, sectionNode, sectionNumber, conf2); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("sectionNode output", node); + sectionNodeWrapper.attr("transform", `translate(${masterX}, ${sectionBeginY})`); + masterY += maxSectionHeight + 50; + const tasksForSection = tasks2.filter((task) => task.section === section); + if (tasksForSection.length > 0) { + drawTasks( + svg, + tasksForSection, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf2, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + false + ); + } + masterX += 200 * Math.max(tasksForSection.length, 1); + masterY = sectionBeginY; + sectionNumber++; + }); + } else { + hasSections = false; + drawTasks( + svg, + tasks2, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf2, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + true + ); + } + const box = svg.node().getBBox(); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("bounds", box); + if (title) { + svg.append("text").text(title).attr("x", box.width / 2 - LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20); + } + depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100; + const lineWrapper = svg.append("g").attr("class", "lineWrapper"); + lineWrapper.append("line").attr("x1", LEFT_MARGIN).attr("y1", depthY).attr("x2", box.width + 3 * LEFT_MARGIN).attr("y2", depthY).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.s)( + void 0, + svg, + conf2.timeline.padding ? conf2.timeline.padding : 50, + conf2.timeline.useMaxWidth ? conf2.timeline.useMaxWidth : false + ); +}; +const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf2, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) { + for (const task of tasks2) { + const taskNode = { + descr: task.task, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: maxTaskHeight + }; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("taskNode", taskNode); + const taskWrapper = diagram2.append("g").attr("class", "taskWrapper"); + const node = svgDraw.drawNode(taskWrapper, taskNode, sectionColor, conf2); + const taskHeight = node.height; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("taskHeight after draw", taskHeight); + taskWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + maxTaskHeight = Math.max(maxTaskHeight, taskHeight); + if (task.events) { + const lineWrapper = diagram2.append("g").attr("class", "lineWrapper"); + let linelength = maxTaskHeight; + masterY += 100; + linelength = linelength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf2); + masterY -= 100; + lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr( + "y2", + masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120 + ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"); + } + masterX = masterX + 200; + if (isWithoutSections && !(0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.g)().timeline.disableMulticolor) { + sectionColor++; + } + } + masterY = masterY - 10; +}; +const drawEvents = function(diagram2, events, sectionColor, masterX, masterY, conf2) { + let maxEventHeight = 0; + const eventBeginY = masterY; + masterY = masterY + 100; + for (const event of events) { + const eventNode = { + descr: event, + section: sectionColor, + number: sectionColor, + width: 150, + padding: 20, + maxHeight: 50 + }; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_11__.l.debug("eventNode", eventNode); + const eventWrapper = diagram2.append("g").attr("class", "eventWrapper"); + const node = svgDraw.drawNode(eventWrapper, eventNode, sectionColor, conf2); + const eventHeight = node.height; + maxEventHeight = maxEventHeight + eventHeight; + eventWrapper.attr("transform", `translate(${masterX}, ${masterY})`); + masterY = masterY + 10 + eventHeight; + } + masterY = eventBeginY; + return maxEventHeight; +}; +const renderer = { + setConf, + draw +}; +const genSections = (options) => { + let sections2 = ""; + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; + if ((0,khroma__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .c)(options["lineColor" + i])) { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .c)(options["lineColor" + i], 20); + } else { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .c)(options["lineColor" + i], 20); + } + } + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + const sw = "" + (17 - 3 * i); + sections2 += ` + .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} path { + fill: ${options["cScale" + i]}; + } + .section-${i - 1} text { + fill: ${options["cScaleLabel" + i]}; + } + .node-icon-${i - 1} { + font-size: 40px; + color: ${options["cScaleLabel" + i]}; + } + .section-edge-${i - 1}{ + stroke: ${options["cScale" + i]}; + } + .edge-depth-${i - 1}{ + stroke-width: ${sw}; + } + .section-${i - 1} line { + stroke: ${options["cScaleInv" + i]} ; + stroke-width: 3; + } + + .lineWrapper line{ + stroke: ${options["cScaleLabel" + i]} ; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections2; +}; +const getStyles = (options) => ` + .edge { + stroke-width: 3; + } + ${genSections(options)} + .section-root rect, .section-root path, .section-root circle { + fill: ${options.git0}; + } + .section-root text { + fill: ${options.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`; +const styles = getStyles; +const diagram = { + db, + renderer, + parser: parser$1, + styles +}; + +//# sourceMappingURL=timeline-definition-8e5a9bc6.js.map + + +/***/ }), + +/***/ 34176: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + c: () => (/* binding */ is_dark) +}); + +// EXTERNAL MODULE: ./node_modules/khroma/dist/utils/index.js + 3 modules +var utils = __webpack_require__(89612); +// EXTERNAL MODULE: ./node_modules/khroma/dist/color/index.js + 4 modules +var dist_color = __webpack_require__(72120); +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/luminance.js +/* IMPORT */ + + +/* MAIN */ +//SOURCE: https://planetcalc.com/7779 +const luminance = (color) => { + const { r, g, b } = dist_color/* default */.c.parse(color); + const luminance = .2126 * utils/* default */.c.channel.toLinear(r) + .7152 * utils/* default */.c.channel.toLinear(g) + .0722 * utils/* default */.c.channel.toLinear(b); + return utils/* default */.c.lang.round(luminance); +}; +/* EXPORT */ +/* harmony default export */ const methods_luminance = (luminance); + +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/is_light.js +/* IMPORT */ + +/* MAIN */ +const isLight = (color) => { + return methods_luminance(color) >= .5; +}; +/* EXPORT */ +/* harmony default export */ const is_light = (isLight); + +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/is_dark.js +/* IMPORT */ + +/* MAIN */ +const isDark = (color) => { + return !is_light(color); +}; +/* EXPORT */ +/* harmony default export */ const is_dark = (isDark); + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/592.14f0d762.js b/assets/js/592.14f0d762.js new file mode 100644 index 00000000..489d2421 --- /dev/null +++ b/assets/js/592.14f0d762.js @@ -0,0 +1,38485 @@ +exports.id = 592; +exports.ids = [592]; +exports.modules = { + +/***/ 75352: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(__webpack_require__(8744)); + else {} +})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __nested_webpack_require_643__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_643__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __nested_webpack_require_643__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __nested_webpack_require_643__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __nested_webpack_require_643__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __nested_webpack_require_643__.d = function(exports, name, getter) { +/******/ if(!__nested_webpack_require_643__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nested_webpack_require_643__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __nested_webpack_require_643__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __nested_webpack_require_643__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __nested_webpack_require_643__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __nested_webpack_require_643__(__nested_webpack_require_643__.s = 7); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_0__; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __nested_webpack_require_3185__) { + +"use strict"; + + +var FDLayoutConstants = __nested_webpack_require_3185__(0).FDLayoutConstants; + +function CoSEConstants() {} + +//CoSEConstants inherits static props in FDLayoutConstants +for (var prop in FDLayoutConstants) { + CoSEConstants[prop] = FDLayoutConstants[prop]; +} + +CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false; +CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; +CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60; +CoSEConstants.TILE = true; +CoSEConstants.TILING_PADDING_VERTICAL = 10; +CoSEConstants.TILING_PADDING_HORIZONTAL = 10; +CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false; // make this true when cose is used incrementally as a part of other non-incremental layout + +module.exports = CoSEConstants; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __nested_webpack_require_4002__) { + +"use strict"; + + +var FDLayoutEdge = __nested_webpack_require_4002__(0).FDLayoutEdge; + +function CoSEEdge(source, target, vEdge) { + FDLayoutEdge.call(this, source, target, vEdge); +} + +CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype); +for (var prop in FDLayoutEdge) { + CoSEEdge[prop] = FDLayoutEdge[prop]; +} + +module.exports = CoSEEdge; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __nested_webpack_require_4409__) { + +"use strict"; + + +var LGraph = __nested_webpack_require_4409__(0).LGraph; + +function CoSEGraph(parent, graphMgr, vGraph) { + LGraph.call(this, parent, graphMgr, vGraph); +} + +CoSEGraph.prototype = Object.create(LGraph.prototype); +for (var prop in LGraph) { + CoSEGraph[prop] = LGraph[prop]; +} + +module.exports = CoSEGraph; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __nested_webpack_require_4790__) { + +"use strict"; + + +var LGraphManager = __nested_webpack_require_4790__(0).LGraphManager; + +function CoSEGraphManager(layout) { + LGraphManager.call(this, layout); +} + +CoSEGraphManager.prototype = Object.create(LGraphManager.prototype); +for (var prop in LGraphManager) { + CoSEGraphManager[prop] = LGraphManager[prop]; +} + +module.exports = CoSEGraphManager; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __nested_webpack_require_5205__) { + +"use strict"; + + +var FDLayoutNode = __nested_webpack_require_5205__(0).FDLayoutNode; +var IMath = __nested_webpack_require_5205__(0).IMath; + +function CoSENode(gm, loc, size, vNode) { + FDLayoutNode.call(this, gm, loc, size, vNode); +} + +CoSENode.prototype = Object.create(FDLayoutNode.prototype); +for (var prop in FDLayoutNode) { + CoSENode[prop] = FDLayoutNode[prop]; +} + +CoSENode.prototype.move = function () { + var layout = this.graphManager.getLayout(); + this.displacementX = layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren; + this.displacementY = layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren; + + if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) { + this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX); + } + + if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) { + this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY); + } + + // a simple node, just move it + if (this.child == null) { + this.moveBy(this.displacementX, this.displacementY); + } + // an empty compound node, again just move it + else if (this.child.getNodes().length == 0) { + this.moveBy(this.displacementX, this.displacementY); + } + // non-empty compound node, propogate movement to children as well + else { + this.propogateDisplacementToChildren(this.displacementX, this.displacementY); + } + + layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY); + + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + this.displacementX = 0; + this.displacementY = 0; +}; + +CoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) { + var nodes = this.getChild().getNodes(); + var node; + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + if (node.getChild() == null) { + node.moveBy(dX, dY); + node.displacementX += dX; + node.displacementY += dY; + } else { + node.propogateDisplacementToChildren(dX, dY); + } + } +}; + +CoSENode.prototype.setPred1 = function (pred1) { + this.pred1 = pred1; +}; + +CoSENode.prototype.getPred1 = function () { + return pred1; +}; + +CoSENode.prototype.getPred2 = function () { + return pred2; +}; + +CoSENode.prototype.setNext = function (next) { + this.next = next; +}; + +CoSENode.prototype.getNext = function () { + return next; +}; + +CoSENode.prototype.setProcessed = function (processed) { + this.processed = processed; +}; + +CoSENode.prototype.isProcessed = function () { + return processed; +}; + +module.exports = CoSENode; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __nested_webpack_require_8085__) { + +"use strict"; + + +var FDLayout = __nested_webpack_require_8085__(0).FDLayout; +var CoSEGraphManager = __nested_webpack_require_8085__(4); +var CoSEGraph = __nested_webpack_require_8085__(3); +var CoSENode = __nested_webpack_require_8085__(5); +var CoSEEdge = __nested_webpack_require_8085__(2); +var CoSEConstants = __nested_webpack_require_8085__(1); +var FDLayoutConstants = __nested_webpack_require_8085__(0).FDLayoutConstants; +var LayoutConstants = __nested_webpack_require_8085__(0).LayoutConstants; +var Point = __nested_webpack_require_8085__(0).Point; +var PointD = __nested_webpack_require_8085__(0).PointD; +var Layout = __nested_webpack_require_8085__(0).Layout; +var Integer = __nested_webpack_require_8085__(0).Integer; +var IGeometry = __nested_webpack_require_8085__(0).IGeometry; +var LGraph = __nested_webpack_require_8085__(0).LGraph; +var Transform = __nested_webpack_require_8085__(0).Transform; + +function CoSELayout() { + FDLayout.call(this); + + this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled +} + +CoSELayout.prototype = Object.create(FDLayout.prototype); + +for (var prop in FDLayout) { + CoSELayout[prop] = FDLayout[prop]; +} + +CoSELayout.prototype.newGraphManager = function () { + var gm = new CoSEGraphManager(this); + this.graphManager = gm; + return gm; +}; + +CoSELayout.prototype.newGraph = function (vGraph) { + return new CoSEGraph(null, this.graphManager, vGraph); +}; + +CoSELayout.prototype.newNode = function (vNode) { + return new CoSENode(this.graphManager, vNode); +}; + +CoSELayout.prototype.newEdge = function (vEdge) { + return new CoSEEdge(null, null, vEdge); +}; + +CoSELayout.prototype.initParameters = function () { + FDLayout.prototype.initParameters.call(this, arguments); + if (!this.isSubLayout) { + if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) { + this.idealEdgeLength = 10; + } else { + this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH; + } + + this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; + this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + + // variables for tree reduction support + this.prunedNodesAll = []; + this.growTreeIterations = 0; + this.afterGrowthIterations = 0; + this.isTreeGrowing = false; + this.isGrowthFinished = false; + + // variables for cooling + this.coolingCycle = 0; + this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD; + this.finalTemperature = FDLayoutConstants.CONVERGENCE_CHECK_PERIOD / this.maxIterations; + this.coolingAdjuster = 1; + } +}; + +CoSELayout.prototype.layout = function () { + var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + if (createBendsAsNeeded) { + this.createBendpoints(); + this.graphManager.resetAllEdges(); + } + + this.level = 0; + return this.classicLayout(); +}; + +CoSELayout.prototype.classicLayout = function () { + this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(); + this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity); + this.calcNoOfChildrenForAllNodes(); + this.graphManager.calcLowestCommonAncestors(); + this.graphManager.calcInclusionTreeDepths(); + this.graphManager.getRoot().calcEstimatedSize(); + this.calcIdealEdgeLengths(); + + if (!this.incremental) { + var forest = this.getFlatForest(); + + // The graph associated with this layout is flat and a forest + if (forest.length > 0) { + this.positionNodesRadially(forest); + } + // The graph associated with this layout is not flat or a forest + else { + // Reduce the trees when incremental mode is not enabled and graph is not a forest + this.reduceTrees(); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + + this.positionNodesRandomly(); + } + } else { + if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) { + // Reduce the trees in incremental mode if only this constant is set to true + this.reduceTrees(); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + } + } + + this.initSpringEmbedder(); + this.runSpringEmbedder(); + + return true; +}; + +CoSELayout.prototype.tick = function () { + this.totalIterations++; + + if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + + if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) { + if (this.isConverged()) { + if (this.prunedNodesAll.length > 0) { + this.isTreeGrowing = true; + } else { + return true; + } + } + + this.coolingCycle++; + + if (this.layoutQuality == 0) { + // quality - "draft" + this.coolingAdjuster = this.coolingCycle; + } else if (this.layoutQuality == 1) { + // quality - "default" + this.coolingAdjuster = this.coolingCycle / 3; + } + + // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3 + this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature); + this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor)); + } + // Operations while tree is growing again + if (this.isTreeGrowing) { + if (this.growTreeIterations % 10 == 0) { + if (this.prunedNodesAll.length > 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + this.growTree(this.prunedNodesAll); + // Update nodes that gravity will be applied + this.graphManager.resetAllNodesToApplyGravitation(); + var allNodes = new Set(this.getAllNodes()); + var intersection = this.nodesWithGravity.filter(function (x) { + return allNodes.has(x); + }); + this.graphManager.setAllNodesToApplyGravitation(intersection); + + this.graphManager.updateBounds(); + this.updateGrid(); + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + } else { + this.isTreeGrowing = false; + this.isGrowthFinished = true; + } + } + this.growTreeIterations++; + } + // Operations after growth is finished + if (this.isGrowthFinished) { + if (this.isConverged()) { + return true; + } + if (this.afterGrowthIterations % 10 == 0) { + this.graphManager.updateBounds(); + this.updateGrid(); + } + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100); + this.afterGrowthIterations++; + } + + var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished; + var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished; + + this.totalDisplacement = 0; + this.graphManager.updateBounds(); + this.calcSpringForces(); + this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate); + this.calcGravitationalForces(); + this.moveNodes(); + this.animate(); + + return false; // Layout is not ended yet return false +}; + +CoSELayout.prototype.getPositionsData = function () { + var allNodes = this.graphManager.getAllNodes(); + var pData = {}; + for (var i = 0; i < allNodes.length; i++) { + var rect = allNodes[i].rect; + var id = allNodes[i].id; + pData[id] = { + id: id, + x: rect.getCenterX(), + y: rect.getCenterY(), + w: rect.width, + h: rect.height + }; + } + + return pData; +}; + +CoSELayout.prototype.runSpringEmbedder = function () { + this.initialAnimationPeriod = 25; + this.animationPeriod = this.initialAnimationPeriod; + var layoutEnded = false; + + // If aminate option is 'during' signal that layout is supposed to start iterating + if (FDLayoutConstants.ANIMATE === 'during') { + this.emit('layoutstarted'); + } else { + // If aminate option is 'during' tick() function will be called on index.js + while (!layoutEnded) { + layoutEnded = this.tick(); + } + + this.graphManager.updateBounds(); + } +}; + +CoSELayout.prototype.calculateNodesToApplyGravitationTo = function () { + var nodeList = []; + var graph; + + var graphs = this.graphManager.getGraphs(); + var size = graphs.length; + var i; + for (i = 0; i < size; i++) { + graph = graphs[i]; + + graph.updateConnected(); + + if (!graph.isConnected) { + nodeList = nodeList.concat(graph.getNodes()); + } + } + + return nodeList; +}; + +CoSELayout.prototype.createBendpoints = function () { + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + var visited = new Set(); + var i; + for (i = 0; i < edges.length; i++) { + var edge = edges[i]; + + if (!visited.has(edge)) { + var source = edge.getSource(); + var target = edge.getTarget(); + + if (source == target) { + edge.getBendpoints().push(new PointD()); + edge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(edge); + visited.add(edge); + } else { + var edgeList = []; + + edgeList = edgeList.concat(source.getEdgeListToNode(target)); + edgeList = edgeList.concat(target.getEdgeListToNode(source)); + + if (!visited.has(edgeList[0])) { + if (edgeList.length > 1) { + var k; + for (k = 0; k < edgeList.length; k++) { + var multiEdge = edgeList[k]; + multiEdge.getBendpoints().push(new PointD()); + this.createDummyNodesForBendpoints(multiEdge); + } + } + edgeList.forEach(function (edge) { + visited.add(edge); + }); + } + } + } + + if (visited.size == edges.length) { + break; + } + } +}; + +CoSELayout.prototype.positionNodesRadially = function (forest) { + // We tile the trees to a grid row by row; first tree starts at (0,0) + var currentStartingPoint = new Point(0, 0); + var numberOfColumns = Math.ceil(Math.sqrt(forest.length)); + var height = 0; + var currentY = 0; + var currentX = 0; + var point = new PointD(0, 0); + + for (var i = 0; i < forest.length; i++) { + if (i % numberOfColumns == 0) { + // Start of a new row, make the x coordinate 0, increment the + // y coordinate with the max height of the previous row + currentX = 0; + currentY = height; + + if (i != 0) { + currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION; + } + + height = 0; + } + + var tree = forest[i]; + + // Find the center of the tree + var centerNode = Layout.findCenterOfTree(tree); + + // Set the staring point of the next tree + currentStartingPoint.x = currentX; + currentStartingPoint.y = currentY; + + // Do a radial layout starting with the center + point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint); + + if (point.y > height) { + height = Math.floor(point.y); + } + + currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION); + } + + this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2)); +}; + +CoSELayout.radialLayout = function (tree, centerNode, startingPoint) { + var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION); + CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep); + var bounds = LGraph.calculateBounds(tree); + + var transform = new Transform(); + transform.setDeviceOrgX(bounds.getMinX()); + transform.setDeviceOrgY(bounds.getMinY()); + transform.setWorldOrgX(startingPoint.x); + transform.setWorldOrgY(startingPoint.y); + + for (var i = 0; i < tree.length; i++) { + var node = tree[i]; + node.transform(transform); + } + + var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY()); + + return transform.inverseTransformPoint(bottomRight); +}; + +CoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) { + // First, position this node by finding its angle. + var halfInterval = (endAngle - startAngle + 1) / 2; + + if (halfInterval < 0) { + halfInterval += 180; + } + + var nodeAngle = (halfInterval + startAngle) % 360; + var teta = nodeAngle * IGeometry.TWO_PI / 360; + + // Make polar to java cordinate conversion. + var cos_teta = Math.cos(teta); + var x_ = distance * Math.cos(teta); + var y_ = distance * Math.sin(teta); + + node.setCenter(x_, y_); + + // Traverse all neighbors of this node and recursively call this + // function. + var neighborEdges = []; + neighborEdges = neighborEdges.concat(node.getEdges()); + var childCount = neighborEdges.length; + + if (parentOfNode != null) { + childCount--; + } + + var branchCount = 0; + + var incEdgesCount = neighborEdges.length; + var startIndex; + + var edges = node.getEdgesBetween(parentOfNode); + + // If there are multiple edges, prune them until there remains only one + // edge. + while (edges.length > 1) { + //neighborEdges.remove(edges.remove(0)); + var temp = edges[0]; + edges.splice(0, 1); + var index = neighborEdges.indexOf(temp); + if (index >= 0) { + neighborEdges.splice(index, 1); + } + incEdgesCount--; + childCount--; + } + + if (parentOfNode != null) { + //assert edges.length == 1; + startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount; + } else { + startIndex = 0; + } + + var stepAngle = Math.abs(endAngle - startAngle) / childCount; + + for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) { + var currentNeighbor = neighborEdges[i].getOtherEnd(node); + + // Don't back traverse to root node in current tree. + if (currentNeighbor == parentOfNode) { + continue; + } + + var childStartAngle = (startAngle + branchCount * stepAngle) % 360; + var childEndAngle = (childStartAngle + stepAngle) % 360; + + CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation); + + branchCount++; + } +}; + +CoSELayout.maxDiagonalInTree = function (tree) { + var maxDiagonal = Integer.MIN_VALUE; + + for (var i = 0; i < tree.length; i++) { + var node = tree[i]; + var diagonal = node.getDiagonal(); + + if (diagonal > maxDiagonal) { + maxDiagonal = diagonal; + } + } + + return maxDiagonal; +}; + +CoSELayout.prototype.calcRepulsionRange = function () { + // formula is 2 x (level + 1) x idealEdgeLength + return 2 * (this.level + 1) * this.idealEdgeLength; +}; + +// Tiling methods + +// Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's +CoSELayout.prototype.groupZeroDegreeMembers = function () { + var self = this; + // array of [parent_id x oneDegreeNode_id] + var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members + this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled + this.idToDummyNode = {}; // A map of id to dummy node + + var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled + var allNodes = this.graphManager.getAllNodes(); + + // Fill zero degree list + for (var i = 0; i < allNodes.length; i++) { + var node = allNodes[i]; + var parent = node.getParent(); + // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list + if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == undefined || !this.getToBeTiled(parent))) { + zeroDegree.push(node); + } + } + + // Create a map of parent node and its zero degree members + for (var i = 0; i < zeroDegree.length; i++) { + var node = zeroDegree[i]; // Zero degree node itself + var p_id = node.getParent().id; // Parent id + + if (typeof tempMemberGroups[p_id] === "undefined") tempMemberGroups[p_id] = []; + + tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups + } + + // If there are at least two nodes at a level, create a dummy compound for them + Object.keys(tempMemberGroups).forEach(function (p_id) { + if (tempMemberGroups[p_id].length > 1) { + var dummyCompoundId = "DummyCompound_" + p_id; // The id of dummy compound which will be created soon + self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups + + var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound + + // Create a dummy compound with calculated id + var dummyCompound = new CoSENode(self.graphManager); + dummyCompound.id = dummyCompoundId; + dummyCompound.paddingLeft = parent.paddingLeft || 0; + dummyCompound.paddingRight = parent.paddingRight || 0; + dummyCompound.paddingBottom = parent.paddingBottom || 0; + dummyCompound.paddingTop = parent.paddingTop || 0; + + self.idToDummyNode[dummyCompoundId] = dummyCompound; + + var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound); + var parentGraph = parent.getChild(); + + // Add dummy compound to parent the graph + parentGraph.add(dummyCompound); + + // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent + for (var i = 0; i < tempMemberGroups[p_id].length; i++) { + var node = tempMemberGroups[p_id][i]; + + parentGraph.remove(node); + dummyParentGraph.add(node); + } + } + }); +}; + +CoSELayout.prototype.clearCompounds = function () { + var childGraphMap = {}; + var idToNode = {}; + + // Get compound ordering by finding the inner one first + this.performDFSOnCompounds(); + + for (var i = 0; i < this.compoundOrder.length; i++) { + + idToNode[this.compoundOrder[i].id] = this.compoundOrder[i]; + childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes()); + + // Remove children of compounds + this.graphManager.remove(this.compoundOrder[i].getChild()); + this.compoundOrder[i].child = null; + } + + this.graphManager.resetAllNodes(); + + // Tile the removed children + this.tileCompoundMembers(childGraphMap, idToNode); +}; + +CoSELayout.prototype.clearZeroDegreeMembers = function () { + var self = this; + var tiledZeroDegreePack = this.tiledZeroDegreePack = []; + + Object.keys(this.memberGroups).forEach(function (id) { + var compoundNode = self.idToDummyNode[id]; // Get the dummy compound + + tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight); + + // Set the width and height of the dummy compound as calculated + compoundNode.rect.width = tiledZeroDegreePack[id].width; + compoundNode.rect.height = tiledZeroDegreePack[id].height; + }); +}; + +CoSELayout.prototype.repopulateCompounds = function () { + for (var i = this.compoundOrder.length - 1; i >= 0; i--) { + var lCompoundNode = this.compoundOrder[i]; + var id = lCompoundNode.id; + var horizontalMargin = lCompoundNode.paddingLeft; + var verticalMargin = lCompoundNode.paddingTop; + + this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin); + } +}; + +CoSELayout.prototype.repopulateZeroDegreeMembers = function () { + var self = this; + var tiledPack = this.tiledZeroDegreePack; + + Object.keys(tiledPack).forEach(function (id) { + var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id + var horizontalMargin = compoundNode.paddingLeft; + var verticalMargin = compoundNode.paddingTop; + + // Adjust the positions of nodes wrt its compound + self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin); + }); +}; + +CoSELayout.prototype.getToBeTiled = function (node) { + var id = node.id; + //firstly check the previous results + if (this.toBeTiled[id] != null) { + return this.toBeTiled[id]; + } + + //only compound nodes are to be tiled + var childGraph = node.getChild(); + if (childGraph == null) { + this.toBeTiled[id] = false; + return false; + } + + var children = childGraph.getNodes(); // Get the children nodes + + //a compound node is not to be tiled if all of its compound children are not to be tiled + for (var i = 0; i < children.length; i++) { + var theChild = children[i]; + + if (this.getNodeDegree(theChild) > 0) { + this.toBeTiled[id] = false; + return false; + } + + //pass the children not having the compound structure + if (theChild.getChild() == null) { + this.toBeTiled[theChild.id] = false; + continue; + } + + if (!this.getToBeTiled(theChild)) { + this.toBeTiled[id] = false; + return false; + } + } + this.toBeTiled[id] = true; + return true; +}; + +// Get degree of a node depending of its edges and independent of its children +CoSELayout.prototype.getNodeDegree = function (node) { + var id = node.id; + var edges = node.getEdges(); + var degree = 0; + + // For the edges connected + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + if (edge.getSource().id !== edge.getTarget().id) { + degree = degree + 1; + } + } + return degree; +}; + +// Get degree of a node with its children +CoSELayout.prototype.getNodeDegreeWithChildren = function (node) { + var degree = this.getNodeDegree(node); + if (node.getChild() == null) { + return degree; + } + var children = node.getChild().getNodes(); + for (var i = 0; i < children.length; i++) { + var child = children[i]; + degree += this.getNodeDegreeWithChildren(child); + } + return degree; +}; + +CoSELayout.prototype.performDFSOnCompounds = function () { + this.compoundOrder = []; + this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes()); +}; + +CoSELayout.prototype.fillCompexOrderByDFS = function (children) { + for (var i = 0; i < children.length; i++) { + var child = children[i]; + if (child.getChild() != null) { + this.fillCompexOrderByDFS(child.getChild().getNodes()); + } + if (this.getToBeTiled(child)) { + this.compoundOrder.push(child); + } + } +}; + +/** +* This method places each zero degree member wrt given (x,y) coordinates (top left). +*/ +CoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin) { + x += compoundHorizontalMargin; + y += compoundVerticalMargin; + + var left = x; + + for (var i = 0; i < organization.rows.length; i++) { + var row = organization.rows[i]; + x = left; + var maxHeight = 0; + + for (var j = 0; j < row.length; j++) { + var lnode = row[j]; + + lnode.rect.x = x; // + lnode.rect.width / 2; + lnode.rect.y = y; // + lnode.rect.height / 2; + + x += lnode.rect.width + organization.horizontalPadding; + + if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height; + } + + y += maxHeight + organization.verticalPadding; + } +}; + +CoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) { + var self = this; + this.tiledMemberPack = []; + + Object.keys(childGraphMap).forEach(function (id) { + // Get the compound node + var compoundNode = idToNode[id]; + + self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight); + + compoundNode.rect.width = self.tiledMemberPack[id].width; + compoundNode.rect.height = self.tiledMemberPack[id].height; + }); +}; + +CoSELayout.prototype.tileNodes = function (nodes, minWidth) { + var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; + var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; + var organization = { + rows: [], + rowWidth: [], + rowHeight: [], + width: 0, + height: minWidth, // assume minHeight equals to minWidth + verticalPadding: verticalPadding, + horizontalPadding: horizontalPadding + }; + + // Sort the nodes in ascending order of their areas + nodes.sort(function (n1, n2) { + if (n1.rect.width * n1.rect.height > n2.rect.width * n2.rect.height) return -1; + if (n1.rect.width * n1.rect.height < n2.rect.width * n2.rect.height) return 1; + return 0; + }); + + // Create the organization -> tile members + for (var i = 0; i < nodes.length; i++) { + var lNode = nodes[i]; + + if (organization.rows.length == 0) { + this.insertNodeToRow(organization, lNode, 0, minWidth); + } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) { + this.insertNodeToRow(organization, lNode, this.getShortestRowIndex(organization), minWidth); + } else { + this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth); + } + + this.shiftToLastRow(organization); + } + + return organization; +}; + +CoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) { + var minCompoundSize = minWidth; + + // Add new row if needed + if (rowIndex == organization.rows.length) { + var secondDimension = []; + + organization.rows.push(secondDimension); + organization.rowWidth.push(minCompoundSize); + organization.rowHeight.push(0); + } + + // Update row width + var w = organization.rowWidth[rowIndex] + node.rect.width; + + if (organization.rows[rowIndex].length > 0) { + w += organization.horizontalPadding; + } + + organization.rowWidth[rowIndex] = w; + // Update compound width + if (organization.width < w) { + organization.width = w; + } + + // Update height + var h = node.rect.height; + if (rowIndex > 0) h += organization.verticalPadding; + + var extraHeight = 0; + if (h > organization.rowHeight[rowIndex]) { + extraHeight = organization.rowHeight[rowIndex]; + organization.rowHeight[rowIndex] = h; + extraHeight = organization.rowHeight[rowIndex] - extraHeight; + } + + organization.height += extraHeight; + + // Insert node + organization.rows[rowIndex].push(node); +}; + +//Scans the rows of an organization and returns the one with the min width +CoSELayout.prototype.getShortestRowIndex = function (organization) { + var r = -1; + var min = Number.MAX_VALUE; + + for (var i = 0; i < organization.rows.length; i++) { + if (organization.rowWidth[i] < min) { + r = i; + min = organization.rowWidth[i]; + } + } + return r; +}; + +//Scans the rows of an organization and returns the one with the max width +CoSELayout.prototype.getLongestRowIndex = function (organization) { + var r = -1; + var max = Number.MIN_VALUE; + + for (var i = 0; i < organization.rows.length; i++) { + + if (organization.rowWidth[i] > max) { + r = i; + max = organization.rowWidth[i]; + } + } + + return r; +}; + +/** +* This method checks whether adding extra width to the organization violates +* the aspect ratio(1) or not. +*/ +CoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) { + + var sri = this.getShortestRowIndex(organization); + + if (sri < 0) { + return true; + } + + var min = organization.rowWidth[sri]; + + if (min + organization.horizontalPadding + extraWidth <= organization.width) return true; + + var hDiff = 0; + + // Adding to an existing row + if (organization.rowHeight[sri] < extraHeight) { + if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri]; + } + + var add_to_row_ratio; + if (organization.width - min >= extraWidth + organization.horizontalPadding) { + add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding); + } else { + add_to_row_ratio = (organization.height + hDiff) / organization.width; + } + + // Adding a new row for this node + hDiff = extraHeight + organization.verticalPadding; + var add_new_row_ratio; + if (organization.width < extraWidth) { + add_new_row_ratio = (organization.height + hDiff) / extraWidth; + } else { + add_new_row_ratio = (organization.height + hDiff) / organization.width; + } + + if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio; + + if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio; + + return add_to_row_ratio < add_new_row_ratio; +}; + +//If moving the last node from the longest row and adding it to the last +//row makes the bounding box smaller, do it. +CoSELayout.prototype.shiftToLastRow = function (organization) { + var longest = this.getLongestRowIndex(organization); + var last = organization.rowWidth.length - 1; + var row = organization.rows[longest]; + var node = row[row.length - 1]; + + var diff = node.width + organization.horizontalPadding; + + // Check if there is enough space on the last row + if (organization.width - organization.rowWidth[last] > diff && longest != last) { + // Remove the last element of the longest row + row.splice(-1, 1); + + // Push it to the last row + organization.rows[last].push(node); + + organization.rowWidth[longest] = organization.rowWidth[longest] - diff; + organization.rowWidth[last] = organization.rowWidth[last] + diff; + organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)]; + + // Update heights of the organization + var maxHeight = Number.MIN_VALUE; + for (var i = 0; i < row.length; i++) { + if (row[i].height > maxHeight) maxHeight = row[i].height; + } + if (longest > 0) maxHeight += organization.verticalPadding; + + var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + + organization.rowHeight[longest] = maxHeight; + if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding; + + var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last]; + organization.height += finalTotal - prevTotal; + + this.shiftToLastRow(organization); + } +}; + +CoSELayout.prototype.tilingPreLayout = function () { + if (CoSEConstants.TILE) { + // Find zero degree nodes and create a compound for each level + this.groupZeroDegreeMembers(); + // Tile and clear children of each compound + this.clearCompounds(); + // Separately tile and clear zero degree nodes for each level + this.clearZeroDegreeMembers(); + } +}; + +CoSELayout.prototype.tilingPostLayout = function () { + if (CoSEConstants.TILE) { + this.repopulateZeroDegreeMembers(); + this.repopulateCompounds(); + } +}; + +// ----------------------------------------------------------------------------- +// Section: Tree Reduction methods +// ----------------------------------------------------------------------------- +// Reduce trees +CoSELayout.prototype.reduceTrees = function () { + var prunedNodesAll = []; + var containsLeaf = true; + var node; + + while (containsLeaf) { + var allNodes = this.graphManager.getAllNodes(); + var prunedNodesInStepTemp = []; + containsLeaf = false; + + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) { + prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]); + containsLeaf = true; + } + } + if (containsLeaf == true) { + var prunedNodesInStep = []; + for (var j = 0; j < prunedNodesInStepTemp.length; j++) { + if (prunedNodesInStepTemp[j][0].getEdges().length == 1) { + prunedNodesInStep.push(prunedNodesInStepTemp[j]); + prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]); + } + } + prunedNodesAll.push(prunedNodesInStep); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); + } + } + this.prunedNodesAll = prunedNodesAll; +}; + +// Grow tree one step +CoSELayout.prototype.growTree = function (prunedNodesAll) { + var lengthOfPrunedNodesInStep = prunedNodesAll.length; + var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1]; + + var nodeData; + for (var i = 0; i < prunedNodesInStep.length; i++) { + nodeData = prunedNodesInStep[i]; + + this.findPlaceforPrunedNode(nodeData); + + nodeData[2].add(nodeData[0]); + nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target); + } + + prunedNodesAll.splice(prunedNodesAll.length - 1, 1); + this.graphManager.resetAllNodes(); + this.graphManager.resetAllEdges(); +}; + +// Find an appropriate position to replace pruned node, this method can be improved +CoSELayout.prototype.findPlaceforPrunedNode = function (nodeData) { + + var gridForPrunedNode; + var nodeToConnect; + var prunedNode = nodeData[0]; + if (prunedNode == nodeData[1].source) { + nodeToConnect = nodeData[1].target; + } else { + nodeToConnect = nodeData[1].source; + } + var startGridX = nodeToConnect.startX; + var finishGridX = nodeToConnect.finishX; + var startGridY = nodeToConnect.startY; + var finishGridY = nodeToConnect.finishY; + + var upNodeCount = 0; + var downNodeCount = 0; + var rightNodeCount = 0; + var leftNodeCount = 0; + var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount]; + + if (startGridY > 0) { + for (var i = startGridX; i <= finishGridX; i++) { + controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1; + } + } + if (finishGridX < this.grid.length - 1) { + for (var i = startGridY; i <= finishGridY; i++) { + controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1; + } + } + if (finishGridY < this.grid[0].length - 1) { + for (var i = startGridX; i <= finishGridX; i++) { + controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1; + } + } + if (startGridX > 0) { + for (var i = startGridY; i <= finishGridY; i++) { + controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1; + } + } + var min = Integer.MAX_VALUE; + var minCount; + var minIndex; + for (var j = 0; j < controlRegions.length; j++) { + if (controlRegions[j] < min) { + min = controlRegions[j]; + minCount = 1; + minIndex = j; + } else if (controlRegions[j] == min) { + minCount++; + } + } + + if (minCount == 3 && min == 0) { + if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) { + gridForPrunedNode = 1; + } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 0; + } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 3; + } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { + gridForPrunedNode = 2; + } + } else if (minCount == 2 && min == 0) { + var random = Math.floor(Math.random() * 2); + if (controlRegions[0] == 0 && controlRegions[1] == 0) { + ; + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 1; + } + } else if (controlRegions[0] == 0 && controlRegions[2] == 0) { + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[0] == 0 && controlRegions[3] == 0) { + if (random == 0) { + gridForPrunedNode = 0; + } else { + gridForPrunedNode = 3; + } + } else if (controlRegions[1] == 0 && controlRegions[2] == 0) { + if (random == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 2; + } + } else if (controlRegions[1] == 0 && controlRegions[3] == 0) { + if (random == 0) { + gridForPrunedNode = 1; + } else { + gridForPrunedNode = 3; + } + } else { + if (random == 0) { + gridForPrunedNode = 2; + } else { + gridForPrunedNode = 3; + } + } + } else if (minCount == 4 && min == 0) { + var random = Math.floor(Math.random() * 4); + gridForPrunedNode = random; + } else { + gridForPrunedNode = minIndex; + } + + if (gridForPrunedNode == 0) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2); + } else if (gridForPrunedNode == 1) { + prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } else if (gridForPrunedNode == 2) { + prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2); + } else { + prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); + } +}; + +module.exports = CoSELayout; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __nested_webpack_require_45620__) { + +"use strict"; + + +var coseBase = {}; + +coseBase.layoutBase = __nested_webpack_require_45620__(0); +coseBase.CoSEConstants = __nested_webpack_require_45620__(1); +coseBase.CoSEEdge = __nested_webpack_require_45620__(2); +coseBase.CoSEGraph = __nested_webpack_require_45620__(3); +coseBase.CoSEGraphManager = __nested_webpack_require_45620__(4); +coseBase.CoSELayout = __nested_webpack_require_45620__(6); +coseBase.CoSENode = __nested_webpack_require_45620__(5); + +module.exports = coseBase; + +/***/ }) +/******/ ]); +}); + +/***/ }), + +/***/ 81176: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(__webpack_require__(75352)); + else {} +})(this, function(__WEBPACK_EXTERNAL_MODULE_0__) { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __nested_webpack_require_659__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_659__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __nested_webpack_require_659__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __nested_webpack_require_659__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __nested_webpack_require_659__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __nested_webpack_require_659__.d = function(exports, name, getter) { +/******/ if(!__nested_webpack_require_659__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nested_webpack_require_659__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __nested_webpack_require_659__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __nested_webpack_require_659__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __nested_webpack_require_659__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __nested_webpack_require_659__(__nested_webpack_require_659__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_0__; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __nested_webpack_require_3201__) { + +"use strict"; + + +var LayoutConstants = __nested_webpack_require_3201__(0).layoutBase.LayoutConstants; +var FDLayoutConstants = __nested_webpack_require_3201__(0).layoutBase.FDLayoutConstants; +var CoSEConstants = __nested_webpack_require_3201__(0).CoSEConstants; +var CoSELayout = __nested_webpack_require_3201__(0).CoSELayout; +var CoSENode = __nested_webpack_require_3201__(0).CoSENode; +var PointD = __nested_webpack_require_3201__(0).layoutBase.PointD; +var DimensionD = __nested_webpack_require_3201__(0).layoutBase.DimensionD; + +var defaults = { + // Called on `layoutready` + ready: function ready() {}, + // Called on `layoutstop` + stop: function stop() {}, + // 'draft', 'default' or 'proof" + // - 'draft' fast cooling rate + // - 'default' moderate cooling rate + // - "proof" slow cooling rate + quality: 'default', + // include labels in node dimensions + nodeDimensionsIncludeLabels: false, + // number of ticks per frame; higher is faster but more jerky + refresh: 30, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 10, + // Whether to enable incremental mode + randomize: true, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: 4500, + // Ideal edge (non nested) length + idealEdgeLength: 50, + // Divisor to compute edge forces + edgeElasticity: 0.45, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 0.1, + // Gravity force (constant) + gravity: 0.25, + // Maximum number of iterations to perform + numIter: 2500, + // For enabling tiling + tile: true, + // Type of layout animation. The option set is {'during', 'end', false} + animate: 'end', + // Duration for animate:end + animationDuration: 500, + // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingVertical: 10, + // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) + tilingPaddingHorizontal: 10, + // Gravity range (constant) for compounds + gravityRangeCompound: 1.5, + // Gravity force (constant) for compounds + gravityCompound: 1.0, + // Gravity range (constant) + gravityRange: 3.8, + // Initial cooling factor for incremental layout + initialEnergyOnIncremental: 0.5 +}; + +function extend(defaults, options) { + var obj = {}; + + for (var i in defaults) { + obj[i] = defaults[i]; + } + + for (var i in options) { + obj[i] = options[i]; + } + + return obj; +}; + +function _CoSELayout(_options) { + this.options = extend(defaults, _options); + getUserOptions(this.options); +} + +var getUserOptions = function getUserOptions(options) { + if (options.nodeRepulsion != null) CoSEConstants.DEFAULT_REPULSION_STRENGTH = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = options.nodeRepulsion; + if (options.idealEdgeLength != null) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength; + if (options.edgeElasticity != null) CoSEConstants.DEFAULT_SPRING_STRENGTH = FDLayoutConstants.DEFAULT_SPRING_STRENGTH = options.edgeElasticity; + if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor; + if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity; + if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter; + if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange; + if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound; + if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound; + if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental; + + if (options.quality == 'draft') LayoutConstants.QUALITY = 0;else if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 1; + + CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels; + CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize; + CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate; + CoSEConstants.TILE = options.tile; + CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical; + CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal; +}; + +_CoSELayout.prototype.run = function () { + var ready; + var frameId; + var options = this.options; + var idToLNode = this.idToLNode = {}; + var layout = this.layout = new CoSELayout(); + var self = this; + + self.stopped = false; + + this.cy = this.options.cy; + + this.cy.trigger({ type: 'layoutstart', layout: this }); + + var gm = layout.newGraphManager(); + this.gm = gm; + + var nodes = this.options.eles.nodes(); + var edges = this.options.eles.edges(); + + this.root = gm.addRoot(); + this.processChildrenList(this.root, this.getTopMostNodes(nodes), layout); + + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var sourceNode = this.idToLNode[edge.data("source")]; + var targetNode = this.idToLNode[edge.data("target")]; + if (sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) { + var e1 = gm.add(layout.newEdge(), sourceNode, targetNode); + e1.id = edge.id(); + } + } + + var getPositions = function getPositions(ele, i) { + if (typeof ele === "number") { + ele = i; + } + var theId = ele.data('id'); + var lNode = self.idToLNode[theId]; + + return { + x: lNode.getRect().getCenterX(), + y: lNode.getRect().getCenterY() + }; + }; + + /* + * Reposition nodes in iterations animatedly + */ + var iterateAnimated = function iterateAnimated() { + // Thigs to perform after nodes are repositioned on screen + var afterReposition = function afterReposition() { + if (options.fit) { + options.cy.fit(options.eles, options.padding); + } + + if (!ready) { + ready = true; + self.cy.one('layoutready', options.ready); + self.cy.trigger({ type: 'layoutready', layout: self }); + } + }; + + var ticksPerFrame = self.options.refresh; + var isDone; + + for (var i = 0; i < ticksPerFrame && !isDone; i++) { + isDone = self.stopped || self.layout.tick(); + } + + // If layout is done + if (isDone) { + // If the layout is not a sublayout and it is successful perform post layout. + if (layout.checkLayoutSuccess() && !layout.isSubLayout) { + layout.doPostLayout(); + } + + // If layout has a tilingPostLayout function property call it. + if (layout.tilingPostLayout) { + layout.tilingPostLayout(); + } + + layout.isLayoutFinished = true; + + self.options.eles.nodes().positions(getPositions); + + afterReposition(); + + // trigger layoutstop when the layout stops (e.g. finishes) + self.cy.one('layoutstop', self.options.stop); + self.cy.trigger({ type: 'layoutstop', layout: self }); + + if (frameId) { + cancelAnimationFrame(frameId); + } + + ready = false; + return; + } + + var animationData = self.layout.getPositionsData(); // Get positions of layout nodes note that all nodes may not be layout nodes because of tiling + + // Position nodes, for the nodes whose id does not included in data (because they are removed from their parents and included in dummy compounds) + // use position of their ancestors or dummy ancestors + options.eles.nodes().positions(function (ele, i) { + if (typeof ele === "number") { + ele = i; + } + // If ele is a compound node, then its position will be defined by its children + if (!ele.isParent()) { + var theId = ele.id(); + var pNode = animationData[theId]; + var temp = ele; + // If pNode is undefined search until finding position data of its first ancestor (It may be dummy as well) + while (pNode == null) { + pNode = animationData[temp.data('parent')] || animationData['DummyCompound_' + temp.data('parent')]; + animationData[theId] = pNode; + temp = temp.parent()[0]; + if (temp == undefined) { + break; + } + } + if (pNode != null) { + return { + x: pNode.x, + y: pNode.y + }; + } else { + return { + x: ele.position('x'), + y: ele.position('y') + }; + } + } + }); + + afterReposition(); + + frameId = requestAnimationFrame(iterateAnimated); + }; + + /* + * Listen 'layoutstarted' event and start animated iteration if animate option is 'during' + */ + layout.addListener('layoutstarted', function () { + if (self.options.animate === 'during') { + frameId = requestAnimationFrame(iterateAnimated); + } + }); + + layout.runLayout(); // Run cose layout + + /* + * If animate option is not 'during' ('end' or false) perform these here (If it is 'during' similar things are already performed) + */ + if (this.options.animate !== "during") { + self.options.eles.nodes().not(":parent").layoutPositions(self, self.options, getPositions); // Use layout positions to reposition the nodes it considers the options parameter + ready = false; + } + + return this; // chaining +}; + +//Get the top most ones of a list of nodes +_CoSELayout.prototype.getTopMostNodes = function (nodes) { + var nodesMap = {}; + for (var i = 0; i < nodes.length; i++) { + nodesMap[nodes[i].id()] = true; + } + var roots = nodes.filter(function (ele, i) { + if (typeof ele === "number") { + ele = i; + } + var parent = ele.parent()[0]; + while (parent != null) { + if (nodesMap[parent.id()]) { + return false; + } + parent = parent.parent()[0]; + } + return true; + }); + + return roots; +}; + +_CoSELayout.prototype.processChildrenList = function (parent, children, layout) { + var size = children.length; + for (var i = 0; i < size; i++) { + var theChild = children[i]; + var children_of_children = theChild.children(); + var theNode; + + var dimensions = theChild.layoutDimensions({ + nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels + }); + + if (theChild.outerWidth() != null && theChild.outerHeight() != null) { + theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); + } else { + theNode = parent.add(new CoSENode(this.graphManager)); + } + // Attach id to the layout node + theNode.id = theChild.data("id"); + // Attach the paddings of cy node to layout node + theNode.paddingLeft = parseInt(theChild.css('padding')); + theNode.paddingTop = parseInt(theChild.css('padding')); + theNode.paddingRight = parseInt(theChild.css('padding')); + theNode.paddingBottom = parseInt(theChild.css('padding')); + + //Attach the label properties to compound if labels will be included in node dimensions + if (this.options.nodeDimensionsIncludeLabels) { + if (theChild.isParent()) { + var labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false }).w; + var labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false }).h; + var labelPos = theChild.css("text-halign"); + theNode.labelWidth = labelWidth; + theNode.labelHeight = labelHeight; + theNode.labelPos = labelPos; + } + } + + // Map the layout node + this.idToLNode[theChild.data("id")] = theNode; + + if (isNaN(theNode.rect.x)) { + theNode.rect.x = 0; + } + + if (isNaN(theNode.rect.y)) { + theNode.rect.y = 0; + } + + if (children_of_children != null && children_of_children.length > 0) { + var theNewGraph; + theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode); + this.processChildrenList(theNewGraph, children_of_children, layout); + } + } +}; + +/** + * @brief : called on continuous layouts to stop them before they finish + */ +_CoSELayout.prototype.stop = function () { + this.stopped = true; + + return this; // chaining +}; + +var register = function register(cytoscape) { + // var Layout = getLayout( cytoscape ); + + cytoscape('layout', 'cose-bilkent', _CoSELayout); +}; + +// auto reg for globals +if (typeof cytoscape !== 'undefined') { + register(cytoscape); +} + +module.exports = register; + +/***/ }) +/******/ ]); +}); + +/***/ }), + +/***/ 65500: +/***/ (function(module) { + +/** + * Copyright (c) 2016-2023, The Cytoscape Consortium. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the “Software”), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is furnished to do + * so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +(function (global, factory) { + true ? module.exports = factory() : + 0; +})(this, (function () { 'use strict'; + + function _typeof(obj) { + "@babel/helpers - typeof"; + + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }, _typeof(obj); + } + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + function _defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + function _createClass(Constructor, protoProps, staticProps) { + if (protoProps) _defineProperties(Constructor.prototype, protoProps); + if (staticProps) _defineProperties(Constructor, staticProps); + Object.defineProperty(Constructor, "prototype", { + writable: false + }); + return Constructor; + } + function _defineProperty$1(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + } else { + obj[key] = value; + } + return obj; + } + function _slicedToArray(arr, i) { + return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); + } + function _arrayWithHoles(arr) { + if (Array.isArray(arr)) return arr; + } + function _iterableToArrayLimit(arr, i) { + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; + if (_i == null) return; + var _arr = []; + var _n = true; + var _d = false; + var _s, _e; + try { + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { + _arr.push(_s.value); + if (i && _arr.length === i) break; + } + } catch (err) { + _d = true; + _e = err; + } finally { + try { + if (!_n && _i["return"] != null) _i["return"](); + } finally { + if (_d) throw _e; + } + } + return _arr; + } + function _unsupportedIterableToArray(o, minLen) { + if (!o) return; + if (typeof o === "string") return _arrayLikeToArray(o, minLen); + var n = Object.prototype.toString.call(o).slice(8, -1); + if (n === "Object" && o.constructor) n = o.constructor.name; + if (n === "Map" || n === "Set") return Array.from(o); + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); + } + function _arrayLikeToArray(arr, len) { + if (len == null || len > arr.length) len = arr.length; + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; + return arr2; + } + function _nonIterableRest() { + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); + } + + var _window = typeof window === 'undefined' ? null : window; // eslint-disable-line no-undef + + var navigator = _window ? _window.navigator : null; + _window ? _window.document : null; + var typeofstr = _typeof(''); + var typeofobj = _typeof({}); + var typeoffn = _typeof(function () {}); + var typeofhtmlele = typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement); + var instanceStr = function instanceStr(obj) { + return obj && obj.instanceString && fn$6(obj.instanceString) ? obj.instanceString() : null; + }; + + var string = function string(obj) { + return obj != null && _typeof(obj) == typeofstr; + }; + var fn$6 = function fn(obj) { + return obj != null && _typeof(obj) === typeoffn; + }; + var array = function array(obj) { + return !elementOrCollection(obj) && (Array.isArray ? Array.isArray(obj) : obj != null && obj instanceof Array); + }; + var plainObject = function plainObject(obj) { + return obj != null && _typeof(obj) === typeofobj && !array(obj) && obj.constructor === Object; + }; + var object = function object(obj) { + return obj != null && _typeof(obj) === typeofobj; + }; + var number$1 = function number(obj) { + return obj != null && _typeof(obj) === _typeof(1) && !isNaN(obj); + }; + var integer = function integer(obj) { + return number$1(obj) && Math.floor(obj) === obj; + }; + var htmlElement = function htmlElement(obj) { + if ('undefined' === typeofhtmlele) { + return undefined; + } else { + return null != obj && obj instanceof HTMLElement; + } + }; + var elementOrCollection = function elementOrCollection(obj) { + return element(obj) || collection(obj); + }; + var element = function element(obj) { + return instanceStr(obj) === 'collection' && obj._private.single; + }; + var collection = function collection(obj) { + return instanceStr(obj) === 'collection' && !obj._private.single; + }; + var core = function core(obj) { + return instanceStr(obj) === 'core'; + }; + var stylesheet = function stylesheet(obj) { + return instanceStr(obj) === 'stylesheet'; + }; + var event = function event(obj) { + return instanceStr(obj) === 'event'; + }; + var emptyString = function emptyString(obj) { + if (obj === undefined || obj === null) { + // null is empty + return true; + } else if (obj === '' || obj.match(/^\s+$/)) { + return true; // empty string is empty + } + + return false; // otherwise, we don't know what we've got + }; + var domElement = function domElement(obj) { + if (typeof HTMLElement === 'undefined') { + return false; // we're not in a browser so it doesn't matter + } else { + return obj instanceof HTMLElement; + } + }; + var boundingBox = function boundingBox(obj) { + return plainObject(obj) && number$1(obj.x1) && number$1(obj.x2) && number$1(obj.y1) && number$1(obj.y2); + }; + var promise = function promise(obj) { + return object(obj) && fn$6(obj.then); + }; + var ms = function ms() { + return navigator && navigator.userAgent.match(/msie|trident|edge/i); + }; // probably a better way to detect this... + + var memoize$1 = function memoize(fn, keyFn) { + if (!keyFn) { + keyFn = function keyFn() { + if (arguments.length === 1) { + return arguments[0]; + } else if (arguments.length === 0) { + return 'undefined'; + } + var args = []; + for (var i = 0; i < arguments.length; i++) { + args.push(arguments[i]); + } + return args.join('$'); + }; + } + var memoizedFn = function memoizedFn() { + var self = this; + var args = arguments; + var ret; + var k = keyFn.apply(self, args); + var cache = memoizedFn.cache; + if (!(ret = cache[k])) { + ret = cache[k] = fn.apply(self, args); + } + return ret; + }; + memoizedFn.cache = {}; + return memoizedFn; + }; + + var camel2dash = memoize$1(function (str) { + return str.replace(/([A-Z])/g, function (v) { + return '-' + v.toLowerCase(); + }); + }); + var dash2camel = memoize$1(function (str) { + return str.replace(/(-\w)/g, function (v) { + return v[1].toUpperCase(); + }); + }); + var prependCamel = memoize$1(function (prefix, str) { + return prefix + str[0].toUpperCase() + str.substring(1); + }, function (prefix, str) { + return prefix + '$' + str; + }); + var capitalize = function capitalize(str) { + if (emptyString(str)) { + return str; + } + return str.charAt(0).toUpperCase() + str.substring(1); + }; + + var number = '(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))'; + var rgba = 'rgb[a]?\\((' + number + '[%]?)\\s*,\\s*(' + number + '[%]?)\\s*,\\s*(' + number + '[%]?)(?:\\s*,\\s*(' + number + '))?\\)'; + var rgbaNoBackRefs = 'rgb[a]?\\((?:' + number + '[%]?)\\s*,\\s*(?:' + number + '[%]?)\\s*,\\s*(?:' + number + '[%]?)(?:\\s*,\\s*(?:' + number + '))?\\)'; + var hsla = 'hsl[a]?\\((' + number + ')\\s*,\\s*(' + number + '[%])\\s*,\\s*(' + number + '[%])(?:\\s*,\\s*(' + number + '))?\\)'; + var hslaNoBackRefs = 'hsl[a]?\\((?:' + number + ')\\s*,\\s*(?:' + number + '[%])\\s*,\\s*(?:' + number + '[%])(?:\\s*,\\s*(?:' + number + '))?\\)'; + var hex3 = '\\#[0-9a-fA-F]{3}'; + var hex6 = '\\#[0-9a-fA-F]{6}'; + + var ascending = function ascending(a, b) { + if (a < b) { + return -1; + } else if (a > b) { + return 1; + } else { + return 0; + } + }; + var descending = function descending(a, b) { + return -1 * ascending(a, b); + }; + + var extend = Object.assign != null ? Object.assign.bind(Object) : function (tgt) { + var args = arguments; + for (var i = 1; i < args.length; i++) { + var obj = args[i]; + if (obj == null) { + continue; + } + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; j++) { + var k = keys[j]; + tgt[k] = obj[k]; + } + } + return tgt; + }; + + // get [r, g, b] from #abc or #aabbcc + var hex2tuple = function hex2tuple(hex) { + if (!(hex.length === 4 || hex.length === 7) || hex[0] !== '#') { + return; + } + var shortHex = hex.length === 4; + var r, g, b; + var base = 16; + if (shortHex) { + r = parseInt(hex[1] + hex[1], base); + g = parseInt(hex[2] + hex[2], base); + b = parseInt(hex[3] + hex[3], base); + } else { + r = parseInt(hex[1] + hex[2], base); + g = parseInt(hex[3] + hex[4], base); + b = parseInt(hex[5] + hex[6], base); + } + return [r, g, b]; + }; + + // get [r, g, b, a] from hsl(0, 0, 0) or hsla(0, 0, 0, 0) + var hsl2tuple = function hsl2tuple(hsl) { + var ret; + var h, s, l, a, r, g, b; + function hue2rgb(p, q, t) { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1 / 6) return p + (q - p) * 6 * t; + if (t < 1 / 2) return q; + if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; + return p; + } + var m = new RegExp('^' + hsla + '$').exec(hsl); + if (m) { + // get hue + h = parseInt(m[1]); + if (h < 0) { + h = (360 - -1 * h % 360) % 360; + } else if (h > 360) { + h = h % 360; + } + h /= 360; // normalise on [0, 1] + + s = parseFloat(m[2]); + if (s < 0 || s > 100) { + return; + } // saturation is [0, 100] + s = s / 100; // normalise on [0, 1] + + l = parseFloat(m[3]); + if (l < 0 || l > 100) { + return; + } // lightness is [0, 100] + l = l / 100; // normalise on [0, 1] + + a = m[4]; + if (a !== undefined) { + a = parseFloat(a); + if (a < 0 || a > 1) { + return; + } // alpha is [0, 1] + } + + // now, convert to rgb + // code from http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript + if (s === 0) { + r = g = b = Math.round(l * 255); // achromatic + } else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = Math.round(255 * hue2rgb(p, q, h + 1 / 3)); + g = Math.round(255 * hue2rgb(p, q, h)); + b = Math.round(255 * hue2rgb(p, q, h - 1 / 3)); + } + ret = [r, g, b, a]; + } + return ret; + }; + + // get [r, g, b, a] from rgb(0, 0, 0) or rgba(0, 0, 0, 0) + var rgb2tuple = function rgb2tuple(rgb) { + var ret; + var m = new RegExp('^' + rgba + '$').exec(rgb); + if (m) { + ret = []; + var isPct = []; + for (var i = 1; i <= 3; i++) { + var channel = m[i]; + if (channel[channel.length - 1] === '%') { + isPct[i] = true; + } + channel = parseFloat(channel); + if (isPct[i]) { + channel = channel / 100 * 255; // normalise to [0, 255] + } + + if (channel < 0 || channel > 255) { + return; + } // invalid channel value + + ret.push(Math.floor(channel)); + } + var atLeastOneIsPct = isPct[1] || isPct[2] || isPct[3]; + var allArePct = isPct[1] && isPct[2] && isPct[3]; + if (atLeastOneIsPct && !allArePct) { + return; + } // must all be percent values if one is + + var alpha = m[4]; + if (alpha !== undefined) { + alpha = parseFloat(alpha); + if (alpha < 0 || alpha > 1) { + return; + } // invalid alpha value + + ret.push(alpha); + } + } + return ret; + }; + var colorname2tuple = function colorname2tuple(color) { + return colors[color.toLowerCase()]; + }; + var color2tuple = function color2tuple(color) { + return (array(color) ? color : null) || colorname2tuple(color) || hex2tuple(color) || rgb2tuple(color) || hsl2tuple(color); + }; + var colors = { + // special colour names + transparent: [0, 0, 0, 0], + // NB alpha === 0 + + // regular colours + aliceblue: [240, 248, 255], + antiquewhite: [250, 235, 215], + aqua: [0, 255, 255], + aquamarine: [127, 255, 212], + azure: [240, 255, 255], + beige: [245, 245, 220], + bisque: [255, 228, 196], + black: [0, 0, 0], + blanchedalmond: [255, 235, 205], + blue: [0, 0, 255], + blueviolet: [138, 43, 226], + brown: [165, 42, 42], + burlywood: [222, 184, 135], + cadetblue: [95, 158, 160], + chartreuse: [127, 255, 0], + chocolate: [210, 105, 30], + coral: [255, 127, 80], + cornflowerblue: [100, 149, 237], + cornsilk: [255, 248, 220], + crimson: [220, 20, 60], + cyan: [0, 255, 255], + darkblue: [0, 0, 139], + darkcyan: [0, 139, 139], + darkgoldenrod: [184, 134, 11], + darkgray: [169, 169, 169], + darkgreen: [0, 100, 0], + darkgrey: [169, 169, 169], + darkkhaki: [189, 183, 107], + darkmagenta: [139, 0, 139], + darkolivegreen: [85, 107, 47], + darkorange: [255, 140, 0], + darkorchid: [153, 50, 204], + darkred: [139, 0, 0], + darksalmon: [233, 150, 122], + darkseagreen: [143, 188, 143], + darkslateblue: [72, 61, 139], + darkslategray: [47, 79, 79], + darkslategrey: [47, 79, 79], + darkturquoise: [0, 206, 209], + darkviolet: [148, 0, 211], + deeppink: [255, 20, 147], + deepskyblue: [0, 191, 255], + dimgray: [105, 105, 105], + dimgrey: [105, 105, 105], + dodgerblue: [30, 144, 255], + firebrick: [178, 34, 34], + floralwhite: [255, 250, 240], + forestgreen: [34, 139, 34], + fuchsia: [255, 0, 255], + gainsboro: [220, 220, 220], + ghostwhite: [248, 248, 255], + gold: [255, 215, 0], + goldenrod: [218, 165, 32], + gray: [128, 128, 128], + grey: [128, 128, 128], + green: [0, 128, 0], + greenyellow: [173, 255, 47], + honeydew: [240, 255, 240], + hotpink: [255, 105, 180], + indianred: [205, 92, 92], + indigo: [75, 0, 130], + ivory: [255, 255, 240], + khaki: [240, 230, 140], + lavender: [230, 230, 250], + lavenderblush: [255, 240, 245], + lawngreen: [124, 252, 0], + lemonchiffon: [255, 250, 205], + lightblue: [173, 216, 230], + lightcoral: [240, 128, 128], + lightcyan: [224, 255, 255], + lightgoldenrodyellow: [250, 250, 210], + lightgray: [211, 211, 211], + lightgreen: [144, 238, 144], + lightgrey: [211, 211, 211], + lightpink: [255, 182, 193], + lightsalmon: [255, 160, 122], + lightseagreen: [32, 178, 170], + lightskyblue: [135, 206, 250], + lightslategray: [119, 136, 153], + lightslategrey: [119, 136, 153], + lightsteelblue: [176, 196, 222], + lightyellow: [255, 255, 224], + lime: [0, 255, 0], + limegreen: [50, 205, 50], + linen: [250, 240, 230], + magenta: [255, 0, 255], + maroon: [128, 0, 0], + mediumaquamarine: [102, 205, 170], + mediumblue: [0, 0, 205], + mediumorchid: [186, 85, 211], + mediumpurple: [147, 112, 219], + mediumseagreen: [60, 179, 113], + mediumslateblue: [123, 104, 238], + mediumspringgreen: [0, 250, 154], + mediumturquoise: [72, 209, 204], + mediumvioletred: [199, 21, 133], + midnightblue: [25, 25, 112], + mintcream: [245, 255, 250], + mistyrose: [255, 228, 225], + moccasin: [255, 228, 181], + navajowhite: [255, 222, 173], + navy: [0, 0, 128], + oldlace: [253, 245, 230], + olive: [128, 128, 0], + olivedrab: [107, 142, 35], + orange: [255, 165, 0], + orangered: [255, 69, 0], + orchid: [218, 112, 214], + palegoldenrod: [238, 232, 170], + palegreen: [152, 251, 152], + paleturquoise: [175, 238, 238], + palevioletred: [219, 112, 147], + papayawhip: [255, 239, 213], + peachpuff: [255, 218, 185], + peru: [205, 133, 63], + pink: [255, 192, 203], + plum: [221, 160, 221], + powderblue: [176, 224, 230], + purple: [128, 0, 128], + red: [255, 0, 0], + rosybrown: [188, 143, 143], + royalblue: [65, 105, 225], + saddlebrown: [139, 69, 19], + salmon: [250, 128, 114], + sandybrown: [244, 164, 96], + seagreen: [46, 139, 87], + seashell: [255, 245, 238], + sienna: [160, 82, 45], + silver: [192, 192, 192], + skyblue: [135, 206, 235], + slateblue: [106, 90, 205], + slategray: [112, 128, 144], + slategrey: [112, 128, 144], + snow: [255, 250, 250], + springgreen: [0, 255, 127], + steelblue: [70, 130, 180], + tan: [210, 180, 140], + teal: [0, 128, 128], + thistle: [216, 191, 216], + tomato: [255, 99, 71], + turquoise: [64, 224, 208], + violet: [238, 130, 238], + wheat: [245, 222, 179], + white: [255, 255, 255], + whitesmoke: [245, 245, 245], + yellow: [255, 255, 0], + yellowgreen: [154, 205, 50] + }; + + // sets the value in a map (map may not be built) + var setMap = function setMap(options) { + var obj = options.map; + var keys = options.keys; + var l = keys.length; + for (var i = 0; i < l; i++) { + var key = keys[i]; + if (plainObject(key)) { + throw Error('Tried to set map with object key'); + } + if (i < keys.length - 1) { + // extend the map if necessary + if (obj[key] == null) { + obj[key] = {}; + } + obj = obj[key]; + } else { + // set the value + obj[key] = options.value; + } + } + }; + + // gets the value in a map even if it's not built in places + var getMap = function getMap(options) { + var obj = options.map; + var keys = options.keys; + var l = keys.length; + for (var i = 0; i < l; i++) { + var key = keys[i]; + if (plainObject(key)) { + throw Error('Tried to get map with object key'); + } + obj = obj[key]; + if (obj == null) { + return obj; + } + } + return obj; + }; + + /** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); + } + + var isObject_1 = isObject; + + var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; + + function createCommonjsModule(fn, module) { + return module = { exports: {} }, fn(module, module.exports), module.exports; + } + + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; + + var _freeGlobal = freeGlobal; + + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + + /** Used as a reference to the global object. */ + var root = _freeGlobal || freeSelf || Function('return this')(); + + var _root = root; + + /** + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). + * + * @static + * @memberOf _ + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. + * @example + * + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. + */ + var now = function() { + return _root.Date.now(); + }; + + var now_1 = now; + + /** Used to match a single whitespace character. */ + var reWhitespace = /\s/; + + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedEndIndex(string) { + var index = string.length; + + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; + } + + var _trimmedEndIndex = trimmedEndIndex; + + /** Used to match leading whitespace. */ + var reTrimStart = /^\s+/; + + /** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ + function baseTrim(string) { + return string + ? string.slice(0, _trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; + } + + var _baseTrim = baseTrim; + + /** Built-in value references. */ + var Symbol$1 = _root.Symbol; + + var _Symbol = Symbol$1; + + /** Used for built-in method references. */ + var objectProto$5 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$4 = objectProto$5.hasOwnProperty; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString$1 = objectProto$5.toString; + + /** Built-in value references. */ + var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined; + + /** + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. + */ + function getRawTag(value) { + var isOwn = hasOwnProperty$4.call(value, symToStringTag$1), + tag = value[symToStringTag$1]; + + try { + value[symToStringTag$1] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString$1.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag$1] = tag; + } else { + delete value[symToStringTag$1]; + } + } + return result; + } + + var _getRawTag = getRawTag; + + /** Used for built-in method references. */ + var objectProto$4 = Object.prototype; + + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto$4.toString; + + /** + * Converts `value` to a string using `Object.prototype.toString`. + * + * @private + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + */ + function objectToString(value) { + return nativeObjectToString.call(value); + } + + var _objectToString = objectToString; + + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined; + + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? _getRawTag(value) + : _objectToString(value); + } + + var _baseGetTag = baseGetTag; + + /** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } + + var isObjectLike_1 = isObjectLike; + + /** `Object#toString` result references. */ + var symbolTag = '[object Symbol]'; + + /** + * Checks if `value` is classified as a `Symbol` primitive or object. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @example + * + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false + */ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike_1(value) && _baseGetTag(value) == symbolTag); + } + + var isSymbol_1 = isSymbol; + + /** Used as references for various `Number` constants. */ + var NAN = 0 / 0; + + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; + + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; + + /** Built-in method references without a dependency on `root`. */ + var freeParseInt = parseInt; + + /** + * Converts `value` to a number. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. + * @example + * + * _.toNumber(3.2); + * // => 3.2 + * + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 + */ + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol_1(value)) { + return NAN; + } + if (isObject_1(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject_1(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = _baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); + } + + var toNumber_1 = toNumber; + + /** Error message constants. */ + var FUNC_ERROR_TEXT$1 = 'Expected a function'; + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max, + nativeMin = Math.min; + + /** + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. + * @example + * + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); + */ + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT$1); + } + wait = toNumber_1(wait) || 0; + if (isObject_1(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber_1(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now_1(); + if (shouldInvoke(time)) { + return trailingEdge(time); + } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); + } + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now_1()); + } + + function debounced() { + var time = now_1(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; + } + + var debounce_1 = debounce; + + var performance = _window ? _window.performance : null; + var pnow = performance && performance.now ? function () { + return performance.now(); + } : function () { + return Date.now(); + }; + var raf = function () { + if (_window) { + if (_window.requestAnimationFrame) { + return function (fn) { + _window.requestAnimationFrame(fn); + }; + } else if (_window.mozRequestAnimationFrame) { + return function (fn) { + _window.mozRequestAnimationFrame(fn); + }; + } else if (_window.webkitRequestAnimationFrame) { + return function (fn) { + _window.webkitRequestAnimationFrame(fn); + }; + } else if (_window.msRequestAnimationFrame) { + return function (fn) { + _window.msRequestAnimationFrame(fn); + }; + } + } + return function (fn) { + if (fn) { + setTimeout(function () { + fn(pnow()); + }, 1000 / 60); + } + }; + }(); + var requestAnimationFrame = function requestAnimationFrame(fn) { + return raf(fn); + }; + var performanceNow = pnow; + + var DEFAULT_HASH_SEED = 9261; + var K = 65599; // 37 also works pretty well + var DEFAULT_HASH_SEED_ALT = 5381; + var hashIterableInts = function hashIterableInts(iterator) { + var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED; + // sdbm/string-hash + var hash = seed; + var entry; + for (;;) { + entry = iterator.next(); + if (entry.done) { + break; + } + hash = hash * K + entry.value | 0; + } + return hash; + }; + var hashInt = function hashInt(num) { + var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED; + // sdbm/string-hash + return seed * K + num | 0; + }; + var hashIntAlt = function hashIntAlt(num) { + var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED_ALT; + // djb2/string-hash + return (seed << 5) + seed + num | 0; + }; + var combineHashes = function combineHashes(hash1, hash2) { + return hash1 * 0x200000 + hash2; + }; + var combineHashesArray = function combineHashesArray(hashes) { + return hashes[0] * 0x200000 + hashes[1]; + }; + var hashArrays = function hashArrays(hashes1, hashes2) { + return [hashInt(hashes1[0], hashes2[0]), hashIntAlt(hashes1[1], hashes2[1])]; + }; + var hashIntsArray = function hashIntsArray(ints, seed) { + var entry = { + value: 0, + done: false + }; + var i = 0; + var length = ints.length; + var iterator = { + next: function next() { + if (i < length) { + entry.value = ints[i++]; + } else { + entry.done = true; + } + return entry; + } + }; + return hashIterableInts(iterator, seed); + }; + var hashString = function hashString(str, seed) { + var entry = { + value: 0, + done: false + }; + var i = 0; + var length = str.length; + var iterator = { + next: function next() { + if (i < length) { + entry.value = str.charCodeAt(i++); + } else { + entry.done = true; + } + return entry; + } + }; + return hashIterableInts(iterator, seed); + }; + var hashStrings = function hashStrings() { + return hashStringsArray(arguments); + }; + var hashStringsArray = function hashStringsArray(strs) { + var hash; + for (var i = 0; i < strs.length; i++) { + var str = strs[i]; + if (i === 0) { + hash = hashString(str); + } else { + hash = hashString(str, hash); + } + } + return hash; + }; + + /*global console */ + var warningsEnabled = true; + var warnSupported = console.warn != null; // eslint-disable-line no-console + var traceSupported = console.trace != null; // eslint-disable-line no-console + + var MAX_INT$1 = Number.MAX_SAFE_INTEGER || 9007199254740991; + var trueify = function trueify() { + return true; + }; + var falsify = function falsify() { + return false; + }; + var zeroify = function zeroify() { + return 0; + }; + var noop$1 = function noop() {}; + var error = function error(msg) { + throw new Error(msg); + }; + var warnings = function warnings(enabled) { + if (enabled !== undefined) { + warningsEnabled = !!enabled; + } else { + return warningsEnabled; + } + }; + var warn = function warn(msg) { + /* eslint-disable no-console */ + if (!warnings()) { + return; + } + if (warnSupported) { + console.warn(msg); + } else { + console.log(msg); + if (traceSupported) { + console.trace(); + } + } + }; /* eslint-enable */ + + var clone = function clone(obj) { + return extend({}, obj); + }; + + // gets a shallow copy of the argument + var copy = function copy(obj) { + if (obj == null) { + return obj; + } + if (array(obj)) { + return obj.slice(); + } else if (plainObject(obj)) { + return clone(obj); + } else { + return obj; + } + }; + var copyArray$1 = function copyArray(arr) { + return arr.slice(); + }; + var uuid = function uuid(a, b /* placeholders */) { + for ( + // loop :) + b = a = ''; + // b - result , a - numeric letiable + a++ < 36; + // + b += a * 51 & 52 // if "a" is not 9 or 14 or 19 or 24 + ? + // return a random number or 4 + (a ^ 15 // if "a" is not 15 + ? + // generate a random number from 0 to 15 + 8 ^ Math.random() * (a ^ 20 ? 16 : 4) // unless "a" is 20, in which case a random number from 8 to 11 + : 4 // otherwise 4 + ).toString(16) : '-' // in other cases (if "a" is 9,14,19,24) insert "-" + ) { + } + return b; + }; + var _staticEmptyObject = {}; + var staticEmptyObject = function staticEmptyObject() { + return _staticEmptyObject; + }; + var defaults$g = function defaults(_defaults) { + var keys = Object.keys(_defaults); + return function (opts) { + var filledOpts = {}; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var optVal = opts == null ? undefined : opts[key]; + filledOpts[key] = optVal === undefined ? _defaults[key] : optVal; + } + return filledOpts; + }; + }; + var removeFromArray = function removeFromArray(arr, ele, oneCopy) { + for (var i = arr.length - 1; i >= 0; i--) { + if (arr[i] === ele) { + arr.splice(i, 1); + if (oneCopy) { + break; + } + } + } + }; + var clearArray = function clearArray(arr) { + arr.splice(0, arr.length); + }; + var push = function push(arr, otherArr) { + for (var i = 0; i < otherArr.length; i++) { + var el = otherArr[i]; + arr.push(el); + } + }; + var getPrefixedProperty = function getPrefixedProperty(obj, propName, prefix) { + if (prefix) { + propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth + } + + return obj[propName]; + }; + var setPrefixedProperty = function setPrefixedProperty(obj, propName, prefix, value) { + if (prefix) { + propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth + } + + obj[propName] = value; + }; + + /* global Map */ + var ObjectMap = /*#__PURE__*/function () { + function ObjectMap() { + _classCallCheck(this, ObjectMap); + this._obj = {}; + } + _createClass(ObjectMap, [{ + key: "set", + value: function set(key, val) { + this._obj[key] = val; + return this; + } + }, { + key: "delete", + value: function _delete(key) { + this._obj[key] = undefined; + return this; + } + }, { + key: "clear", + value: function clear() { + this._obj = {}; + } + }, { + key: "has", + value: function has(key) { + return this._obj[key] !== undefined; + } + }, { + key: "get", + value: function get(key) { + return this._obj[key]; + } + }]); + return ObjectMap; + }(); + var Map$2 = typeof Map !== 'undefined' ? Map : ObjectMap; + + /* global Set */ + + var undef = "undefined" ; + var ObjectSet = /*#__PURE__*/function () { + function ObjectSet(arrayOrObjectSet) { + _classCallCheck(this, ObjectSet); + this._obj = Object.create(null); + this.size = 0; + if (arrayOrObjectSet != null) { + var arr; + if (arrayOrObjectSet.instanceString != null && arrayOrObjectSet.instanceString() === this.instanceString()) { + arr = arrayOrObjectSet.toArray(); + } else { + arr = arrayOrObjectSet; + } + for (var i = 0; i < arr.length; i++) { + this.add(arr[i]); + } + } + } + _createClass(ObjectSet, [{ + key: "instanceString", + value: function instanceString() { + return 'set'; + } + }, { + key: "add", + value: function add(val) { + var o = this._obj; + if (o[val] !== 1) { + o[val] = 1; + this.size++; + } + } + }, { + key: "delete", + value: function _delete(val) { + var o = this._obj; + if (o[val] === 1) { + o[val] = 0; + this.size--; + } + } + }, { + key: "clear", + value: function clear() { + this._obj = Object.create(null); + } + }, { + key: "has", + value: function has(val) { + return this._obj[val] === 1; + } + }, { + key: "toArray", + value: function toArray() { + var _this = this; + return Object.keys(this._obj).filter(function (key) { + return _this.has(key); + }); + } + }, { + key: "forEach", + value: function forEach(callback, thisArg) { + return this.toArray().forEach(callback, thisArg); + } + }]); + return ObjectSet; + }(); + var Set$1 = (typeof Set === "undefined" ? "undefined" : _typeof(Set)) !== undef ? Set : ObjectSet; + + // represents a node or an edge + var Element = function Element(cy, params) { + var restore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + if (cy === undefined || params === undefined || !core(cy)) { + error('An element must have a core reference and parameters set'); + return; + } + var group = params.group; + + // try to automatically infer the group if unspecified + if (group == null) { + if (params.data && params.data.source != null && params.data.target != null) { + group = 'edges'; + } else { + group = 'nodes'; + } + } + + // validate group + if (group !== 'nodes' && group !== 'edges') { + error('An element must be of type `nodes` or `edges`; you specified `' + group + '`'); + return; + } + + // make the element array-like, just like a collection + this.length = 1; + this[0] = this; + + // NOTE: when something is added here, add also to ele.json() + var _p = this._private = { + cy: cy, + single: true, + // indicates this is an element + data: params.data || {}, + // data object + position: params.position || { + x: 0, + y: 0 + }, + // (x, y) position pair + autoWidth: undefined, + // width and height of nodes calculated by the renderer when set to special 'auto' value + autoHeight: undefined, + autoPadding: undefined, + compoundBoundsClean: false, + // whether the compound dimensions need to be recalculated the next time dimensions are read + listeners: [], + // array of bound listeners + group: group, + // string; 'nodes' or 'edges' + style: {}, + // properties as set by the style + rstyle: {}, + // properties for style sent from the renderer to the core + styleCxts: [], + // applied style contexts from the styler + styleKeys: {}, + // per-group keys of style property values + removed: true, + // whether it's inside the vis; true if removed (set true here since we call restore) + selected: params.selected ? true : false, + // whether it's selected + selectable: params.selectable === undefined ? true : params.selectable ? true : false, + // whether it's selectable + locked: params.locked ? true : false, + // whether the element is locked (cannot be moved) + grabbed: false, + // whether the element is grabbed by the mouse; renderer sets this privately + grabbable: params.grabbable === undefined ? true : params.grabbable ? true : false, + // whether the element can be grabbed + pannable: params.pannable === undefined ? group === 'edges' ? true : false : params.pannable ? true : false, + // whether the element has passthrough panning enabled + active: false, + // whether the element is active from user interaction + classes: new Set$1(), + // map ( className => true ) + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + rscratch: {}, + // object in which the renderer can store information + scratch: params.scratch || {}, + // scratch objects + edges: [], + // array of connected edges + children: [], + // array of children + parent: params.parent && params.parent.isNode() ? params.parent : null, + // parent ref + traversalCache: {}, + // cache of output of traversal functions + backgrounding: false, + // whether background images are loading + bbCache: null, + // cache of the current bounding box + bbCacheShift: { + x: 0, + y: 0 + }, + // shift applied to cached bb to be applied on next get + bodyBounds: null, + // bounds cache of element body, w/o overlay + overlayBounds: null, + // bounds cache of element body, including overlay + labelBounds: { + // bounds cache of labels + all: null, + source: null, + target: null, + main: null + }, + arrowBounds: { + // bounds cache of edge arrows + source: null, + target: null, + 'mid-source': null, + 'mid-target': null + } + }; + if (_p.position.x == null) { + _p.position.x = 0; + } + if (_p.position.y == null) { + _p.position.y = 0; + } + + // renderedPosition overrides if specified + if (params.renderedPosition) { + var rpos = params.renderedPosition; + var pan = cy.pan(); + var zoom = cy.zoom(); + _p.position = { + x: (rpos.x - pan.x) / zoom, + y: (rpos.y - pan.y) / zoom + }; + } + var classes = []; + if (array(params.classes)) { + classes = params.classes; + } else if (string(params.classes)) { + classes = params.classes.split(/\s+/); + } + for (var i = 0, l = classes.length; i < l; i++) { + var cls = classes[i]; + if (!cls || cls === '') { + continue; + } + _p.classes.add(cls); + } + this.createEmitter(); + var bypass = params.style || params.css; + if (bypass) { + warn('Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead.'); + this.style(bypass); + } + if (restore === undefined || restore) { + this.restore(); + } + }; + + var defineSearch = function defineSearch(params) { + params = { + bfs: params.bfs || !params.dfs, + dfs: params.dfs || !params.bfs + }; + + // from pseudocode on wikipedia + return function searchFn(roots, fn, directed) { + var options; + if (plainObject(roots) && !elementOrCollection(roots)) { + options = roots; + roots = options.roots || options.root; + fn = options.visit; + directed = options.directed; + } + directed = arguments.length === 2 && !fn$6(fn) ? fn : directed; + fn = fn$6(fn) ? fn : function () {}; + var cy = this._private.cy; + var v = roots = string(roots) ? this.filter(roots) : roots; + var Q = []; + var connectedNodes = []; + var connectedBy = {}; + var id2depth = {}; + var V = {}; + var j = 0; + var found; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + + // enqueue v + for (var i = 0; i < v.length; i++) { + var vi = v[i]; + var viId = vi.id(); + if (vi.isNode()) { + Q.unshift(vi); + if (params.bfs) { + V[viId] = true; + connectedNodes.push(vi); + } + id2depth[viId] = 0; + } + } + var _loop = function _loop() { + var v = params.bfs ? Q.shift() : Q.pop(); + var vId = v.id(); + if (params.dfs) { + if (V[vId]) { + return "continue"; + } + V[vId] = true; + connectedNodes.push(v); + } + var depth = id2depth[vId]; + var prevEdge = connectedBy[vId]; + var src = prevEdge != null ? prevEdge.source() : null; + var tgt = prevEdge != null ? prevEdge.target() : null; + var prevNode = prevEdge == null ? undefined : v.same(src) ? tgt[0] : src[0]; + var ret = void 0; + ret = fn(v, prevEdge, prevNode, j++, depth); + if (ret === true) { + found = v; + return "break"; + } + if (ret === false) { + return "break"; + } + var vwEdges = v.connectedEdges().filter(function (e) { + return (!directed || e.source().same(v)) && edges.has(e); + }); + for (var _i2 = 0; _i2 < vwEdges.length; _i2++) { + var e = vwEdges[_i2]; + var w = e.connectedNodes().filter(function (n) { + return !n.same(v) && nodes.has(n); + }); + var wId = w.id(); + if (w.length !== 0 && !V[wId]) { + w = w[0]; + Q.push(w); + if (params.bfs) { + V[wId] = true; + connectedNodes.push(w); + } + connectedBy[wId] = e; + id2depth[wId] = id2depth[vId] + 1; + } + } + }; + while (Q.length !== 0) { + var _ret = _loop(); + if (_ret === "continue") continue; + if (_ret === "break") break; + } + var connectedEles = cy.collection(); + for (var _i = 0; _i < connectedNodes.length; _i++) { + var node = connectedNodes[_i]; + var edge = connectedBy[node.id()]; + if (edge != null) { + connectedEles.push(edge); + } + connectedEles.push(node); + } + return { + path: cy.collection(connectedEles), + found: cy.collection(found) + }; + }; + }; + + // search, spanning trees, etc + var elesfn$v = { + breadthFirstSearch: defineSearch({ + bfs: true + }), + depthFirstSearch: defineSearch({ + dfs: true + }) + }; + + // nice, short mathematical alias + elesfn$v.bfs = elesfn$v.breadthFirstSearch; + elesfn$v.dfs = elesfn$v.depthFirstSearch; + + var heap$1 = createCommonjsModule(function (module, exports) { + // Generated by CoffeeScript 1.8.0 + (function() { + var Heap, defaultCmp, floor, heapify, heappop, heappush, heappushpop, heapreplace, insort, min, nlargest, nsmallest, updateItem, _siftdown, _siftup; + + floor = Math.floor, min = Math.min; + + + /* + Default comparison function to be used + */ + + defaultCmp = function(x, y) { + if (x < y) { + return -1; + } + if (x > y) { + return 1; + } + return 0; + }; + + + /* + Insert item x in list a, and keep it sorted assuming a is sorted. + + If x is already in a, insert it to the right of the rightmost x. + + Optional args lo (default 0) and hi (default a.length) bound the slice + of a to be searched. + */ + + insort = function(a, x, lo, hi, cmp) { + var mid; + if (lo == null) { + lo = 0; + } + if (cmp == null) { + cmp = defaultCmp; + } + if (lo < 0) { + throw new Error('lo must be non-negative'); + } + if (hi == null) { + hi = a.length; + } + while (lo < hi) { + mid = floor((lo + hi) / 2); + if (cmp(x, a[mid]) < 0) { + hi = mid; + } else { + lo = mid + 1; + } + } + return ([].splice.apply(a, [lo, lo - lo].concat(x)), x); + }; + + + /* + Push item onto heap, maintaining the heap invariant. + */ + + heappush = function(array, item, cmp) { + if (cmp == null) { + cmp = defaultCmp; + } + array.push(item); + return _siftdown(array, 0, array.length - 1, cmp); + }; + + + /* + Pop the smallest item off the heap, maintaining the heap invariant. + */ + + heappop = function(array, cmp) { + var lastelt, returnitem; + if (cmp == null) { + cmp = defaultCmp; + } + lastelt = array.pop(); + if (array.length) { + returnitem = array[0]; + array[0] = lastelt; + _siftup(array, 0, cmp); + } else { + returnitem = lastelt; + } + return returnitem; + }; + + + /* + Pop and return the current smallest value, and add the new item. + + This is more efficient than heappop() followed by heappush(), and can be + more appropriate when using a fixed size heap. Note that the value + returned may be larger than item! That constrains reasonable use of + this routine unless written as part of a conditional replacement: + if item > array[0] + item = heapreplace(array, item) + */ + + heapreplace = function(array, item, cmp) { + var returnitem; + if (cmp == null) { + cmp = defaultCmp; + } + returnitem = array[0]; + array[0] = item; + _siftup(array, 0, cmp); + return returnitem; + }; + + + /* + Fast version of a heappush followed by a heappop. + */ + + heappushpop = function(array, item, cmp) { + var _ref; + if (cmp == null) { + cmp = defaultCmp; + } + if (array.length && cmp(array[0], item) < 0) { + _ref = [array[0], item], item = _ref[0], array[0] = _ref[1]; + _siftup(array, 0, cmp); + } + return item; + }; + + + /* + Transform list into a heap, in-place, in O(array.length) time. + */ + + heapify = function(array, cmp) { + var i, _i, _len, _ref1, _results, _results1; + if (cmp == null) { + cmp = defaultCmp; + } + _ref1 = (function() { + _results1 = []; + for (var _j = 0, _ref = floor(array.length / 2); 0 <= _ref ? _j < _ref : _j > _ref; 0 <= _ref ? _j++ : _j--){ _results1.push(_j); } + return _results1; + }).apply(this).reverse(); + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + i = _ref1[_i]; + _results.push(_siftup(array, i, cmp)); + } + return _results; + }; + + + /* + Update the position of the given item in the heap. + This function should be called every time the item is being modified. + */ + + updateItem = function(array, item, cmp) { + var pos; + if (cmp == null) { + cmp = defaultCmp; + } + pos = array.indexOf(item); + if (pos === -1) { + return; + } + _siftdown(array, 0, pos, cmp); + return _siftup(array, pos, cmp); + }; + + + /* + Find the n largest elements in a dataset. + */ + + nlargest = function(array, n, cmp) { + var elem, result, _i, _len, _ref; + if (cmp == null) { + cmp = defaultCmp; + } + result = array.slice(0, n); + if (!result.length) { + return result; + } + heapify(result, cmp); + _ref = array.slice(n); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + heappushpop(result, elem, cmp); + } + return result.sort(cmp).reverse(); + }; + + + /* + Find the n smallest elements in a dataset. + */ + + nsmallest = function(array, n, cmp) { + var elem, los, result, _i, _j, _len, _ref, _ref1, _results; + if (cmp == null) { + cmp = defaultCmp; + } + if (n * 10 <= array.length) { + result = array.slice(0, n).sort(cmp); + if (!result.length) { + return result; + } + los = result[result.length - 1]; + _ref = array.slice(n); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + elem = _ref[_i]; + if (cmp(elem, los) < 0) { + insort(result, elem, 0, null, cmp); + result.pop(); + los = result[result.length - 1]; + } + } + return result; + } + heapify(array, cmp); + _results = []; + for (_j = 0, _ref1 = min(n, array.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; 0 <= _ref1 ? ++_j : --_j) { + _results.push(heappop(array, cmp)); + } + return _results; + }; + + _siftdown = function(array, startpos, pos, cmp) { + var newitem, parent, parentpos; + if (cmp == null) { + cmp = defaultCmp; + } + newitem = array[pos]; + while (pos > startpos) { + parentpos = (pos - 1) >> 1; + parent = array[parentpos]; + if (cmp(newitem, parent) < 0) { + array[pos] = parent; + pos = parentpos; + continue; + } + break; + } + return array[pos] = newitem; + }; + + _siftup = function(array, pos, cmp) { + var childpos, endpos, newitem, rightpos, startpos; + if (cmp == null) { + cmp = defaultCmp; + } + endpos = array.length; + startpos = pos; + newitem = array[pos]; + childpos = 2 * pos + 1; + while (childpos < endpos) { + rightpos = childpos + 1; + if (rightpos < endpos && !(cmp(array[childpos], array[rightpos]) < 0)) { + childpos = rightpos; + } + array[pos] = array[childpos]; + pos = childpos; + childpos = 2 * pos + 1; + } + array[pos] = newitem; + return _siftdown(array, startpos, pos, cmp); + }; + + Heap = (function() { + Heap.push = heappush; + + Heap.pop = heappop; + + Heap.replace = heapreplace; + + Heap.pushpop = heappushpop; + + Heap.heapify = heapify; + + Heap.updateItem = updateItem; + + Heap.nlargest = nlargest; + + Heap.nsmallest = nsmallest; + + function Heap(cmp) { + this.cmp = cmp != null ? cmp : defaultCmp; + this.nodes = []; + } + + Heap.prototype.push = function(x) { + return heappush(this.nodes, x, this.cmp); + }; + + Heap.prototype.pop = function() { + return heappop(this.nodes, this.cmp); + }; + + Heap.prototype.peek = function() { + return this.nodes[0]; + }; + + Heap.prototype.contains = function(x) { + return this.nodes.indexOf(x) !== -1; + }; + + Heap.prototype.replace = function(x) { + return heapreplace(this.nodes, x, this.cmp); + }; + + Heap.prototype.pushpop = function(x) { + return heappushpop(this.nodes, x, this.cmp); + }; + + Heap.prototype.heapify = function() { + return heapify(this.nodes, this.cmp); + }; + + Heap.prototype.updateItem = function(x) { + return updateItem(this.nodes, x, this.cmp); + }; + + Heap.prototype.clear = function() { + return this.nodes = []; + }; + + Heap.prototype.empty = function() { + return this.nodes.length === 0; + }; + + Heap.prototype.size = function() { + return this.nodes.length; + }; + + Heap.prototype.clone = function() { + var heap; + heap = new Heap(); + heap.nodes = this.nodes.slice(0); + return heap; + }; + + Heap.prototype.toArray = function() { + return this.nodes.slice(0); + }; + + Heap.prototype.insert = Heap.prototype.push; + + Heap.prototype.top = Heap.prototype.peek; + + Heap.prototype.front = Heap.prototype.peek; + + Heap.prototype.has = Heap.prototype.contains; + + Heap.prototype.copy = Heap.prototype.clone; + + return Heap; + + })(); + + (function(root, factory) { + { + return module.exports = factory(); + } + })(this, function() { + return Heap; + }); + + }).call(commonjsGlobal); + }); + + var heap = heap$1; + + var dijkstraDefaults = defaults$g({ + root: null, + weight: function weight(edge) { + return 1; + }, + directed: false + }); + var elesfn$u = { + dijkstra: function dijkstra(options) { + if (!plainObject(options)) { + var args = arguments; + options = { + root: args[0], + weight: args[1], + directed: args[2] + }; + } + var _dijkstraDefaults = dijkstraDefaults(options), + root = _dijkstraDefaults.root, + weight = _dijkstraDefaults.weight, + directed = _dijkstraDefaults.directed; + var eles = this; + var weightFn = weight; + var source = string(root) ? this.filter(root)[0] : root[0]; + var dist = {}; + var prev = {}; + var knownDist = {}; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + edges.unmergeBy(function (ele) { + return ele.isLoop(); + }); + var getDist = function getDist(node) { + return dist[node.id()]; + }; + var setDist = function setDist(node, d) { + dist[node.id()] = d; + Q.updateItem(node); + }; + var Q = new heap(function (a, b) { + return getDist(a) - getDist(b); + }); + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + dist[node.id()] = node.same(source) ? 0 : Infinity; + Q.push(node); + } + var distBetween = function distBetween(u, v) { + var uvs = (directed ? u.edgesTo(v) : u.edgesWith(v)).intersect(edges); + var smallestDistance = Infinity; + var smallestEdge; + for (var _i = 0; _i < uvs.length; _i++) { + var edge = uvs[_i]; + var _weight = weightFn(edge); + if (_weight < smallestDistance || !smallestEdge) { + smallestDistance = _weight; + smallestEdge = edge; + } + } + return { + edge: smallestEdge, + dist: smallestDistance + }; + }; + while (Q.size() > 0) { + var u = Q.pop(); + var smalletsDist = getDist(u); + var uid = u.id(); + knownDist[uid] = smalletsDist; + if (smalletsDist === Infinity) { + continue; + } + var neighbors = u.neighborhood().intersect(nodes); + for (var _i2 = 0; _i2 < neighbors.length; _i2++) { + var v = neighbors[_i2]; + var vid = v.id(); + var vDist = distBetween(u, v); + var alt = smalletsDist + vDist.dist; + if (alt < getDist(v)) { + setDist(v, alt); + prev[vid] = { + node: u, + edge: vDist.edge + }; + } + } // for + } // while + + return { + distanceTo: function distanceTo(node) { + var target = string(node) ? nodes.filter(node)[0] : node[0]; + return knownDist[target.id()]; + }, + pathTo: function pathTo(node) { + var target = string(node) ? nodes.filter(node)[0] : node[0]; + var S = []; + var u = target; + var uid = u.id(); + if (target.length > 0) { + S.unshift(target); + while (prev[uid]) { + var p = prev[uid]; + S.unshift(p.edge); + S.unshift(p.node); + u = p.node; + uid = u.id(); + } + } + return eles.spawn(S); + } + }; + } + }; + + var elesfn$t = { + // kruskal's algorithm (finds min spanning tree, assuming undirected graph) + // implemented from pseudocode from wikipedia + kruskal: function kruskal(weightFn) { + weightFn = weightFn || function (edge) { + return 1; + }; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + var numNodes = nodes.length; + var forest = new Array(numNodes); + var A = nodes; // assumes byGroup() creates new collections that can be safely mutated + + var findSetIndex = function findSetIndex(ele) { + for (var i = 0; i < forest.length; i++) { + var eles = forest[i]; + if (eles.has(ele)) { + return i; + } + } + }; + + // start with one forest per node + for (var i = 0; i < numNodes; i++) { + forest[i] = this.spawn(nodes[i]); + } + var S = edges.sort(function (a, b) { + return weightFn(a) - weightFn(b); + }); + for (var _i = 0; _i < S.length; _i++) { + var edge = S[_i]; + var u = edge.source()[0]; + var v = edge.target()[0]; + var setUIndex = findSetIndex(u); + var setVIndex = findSetIndex(v); + var setU = forest[setUIndex]; + var setV = forest[setVIndex]; + if (setUIndex !== setVIndex) { + A.merge(edge); + + // combine forests for u and v + setU.merge(setV); + forest.splice(setVIndex, 1); + } + } + return A; + } + }; + + var aStarDefaults = defaults$g({ + root: null, + goal: null, + weight: function weight(edge) { + return 1; + }, + heuristic: function heuristic(edge) { + return 0; + }, + directed: false + }); + var elesfn$s = { + // Implemented from pseudocode from wikipedia + aStar: function aStar(options) { + var cy = this.cy(); + var _aStarDefaults = aStarDefaults(options), + root = _aStarDefaults.root, + goal = _aStarDefaults.goal, + heuristic = _aStarDefaults.heuristic, + directed = _aStarDefaults.directed, + weight = _aStarDefaults.weight; + root = cy.collection(root)[0]; + goal = cy.collection(goal)[0]; + var sid = root.id(); + var tid = goal.id(); + var gScore = {}; + var fScore = {}; + var closedSetIds = {}; + var openSet = new heap(function (a, b) { + return fScore[a.id()] - fScore[b.id()]; + }); + var openSetIds = new Set$1(); + var cameFrom = {}; + var cameFromEdge = {}; + var addToOpenSet = function addToOpenSet(ele, id) { + openSet.push(ele); + openSetIds.add(id); + }; + var cMin, cMinId; + var popFromOpenSet = function popFromOpenSet() { + cMin = openSet.pop(); + cMinId = cMin.id(); + openSetIds["delete"](cMinId); + }; + var isInOpenSet = function isInOpenSet(id) { + return openSetIds.has(id); + }; + addToOpenSet(root, sid); + gScore[sid] = 0; + fScore[sid] = heuristic(root); + + // Counter + var steps = 0; + + // Main loop + while (openSet.size() > 0) { + popFromOpenSet(); + steps++; + + // If we've found our goal, then we are done + if (cMinId === tid) { + var path = []; + var pathNode = goal; + var pathNodeId = tid; + var pathEdge = cameFromEdge[pathNodeId]; + for (;;) { + path.unshift(pathNode); + if (pathEdge != null) { + path.unshift(pathEdge); + } + pathNode = cameFrom[pathNodeId]; + if (pathNode == null) { + break; + } + pathNodeId = pathNode.id(); + pathEdge = cameFromEdge[pathNodeId]; + } + return { + found: true, + distance: gScore[cMinId], + path: this.spawn(path), + steps: steps + }; + } + + // Add cMin to processed nodes + closedSetIds[cMinId] = true; + + // Update scores for neighbors of cMin + // Take into account if graph is directed or not + var vwEdges = cMin._private.edges; + for (var i = 0; i < vwEdges.length; i++) { + var e = vwEdges[i]; + + // edge must be in set of calling eles + if (!this.hasElementWithId(e.id())) { + continue; + } + + // cMin must be the source of edge if directed + if (directed && e.data('source') !== cMinId) { + continue; + } + var wSrc = e.source(); + var wTgt = e.target(); + var w = wSrc.id() !== cMinId ? wSrc : wTgt; + var wid = w.id(); + + // node must be in set of calling eles + if (!this.hasElementWithId(wid)) { + continue; + } + + // if node is in closedSet, ignore it + if (closedSetIds[wid]) { + continue; + } + + // New tentative score for node w + var tempScore = gScore[cMinId] + weight(e); + + // Update gScore for node w if: + // w not present in openSet + // OR + // tentative gScore is less than previous value + + // w not in openSet + if (!isInOpenSet(wid)) { + gScore[wid] = tempScore; + fScore[wid] = tempScore + heuristic(w); + addToOpenSet(w, wid); + cameFrom[wid] = cMin; + cameFromEdge[wid] = e; + continue; + } + + // w already in openSet, but with greater gScore + if (tempScore < gScore[wid]) { + gScore[wid] = tempScore; + fScore[wid] = tempScore + heuristic(w); + cameFrom[wid] = cMin; + cameFromEdge[wid] = e; + } + } // End of neighbors update + } // End of main loop + + // If we've reached here, then we've not reached our goal + return { + found: false, + distance: undefined, + path: undefined, + steps: steps + }; + } + }; // elesfn + + var floydWarshallDefaults = defaults$g({ + weight: function weight(edge) { + return 1; + }, + directed: false + }); + var elesfn$r = { + // Implemented from pseudocode from wikipedia + floydWarshall: function floydWarshall(options) { + var cy = this.cy(); + var _floydWarshallDefault = floydWarshallDefaults(options), + weight = _floydWarshallDefault.weight, + directed = _floydWarshallDefault.directed; + var weightFn = weight; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + var N = nodes.length; + var Nsq = N * N; + var indexOf = function indexOf(node) { + return nodes.indexOf(node); + }; + var atIndex = function atIndex(i) { + return nodes[i]; + }; + + // Initialize distance matrix + var dist = new Array(Nsq); + for (var n = 0; n < Nsq; n++) { + var j = n % N; + var i = (n - j) / N; + if (i === j) { + dist[n] = 0; + } else { + dist[n] = Infinity; + } + } + + // Initialize matrix used for path reconstruction + // Initialize distance matrix + var next = new Array(Nsq); + var edgeNext = new Array(Nsq); + + // Process edges + for (var _i = 0; _i < edges.length; _i++) { + var edge = edges[_i]; + var src = edge.source()[0]; + var tgt = edge.target()[0]; + if (src === tgt) { + continue; + } // exclude loops + + var s = indexOf(src); + var t = indexOf(tgt); + var st = s * N + t; // source to target index + var _weight = weightFn(edge); + + // Check if already process another edge between same 2 nodes + if (dist[st] > _weight) { + dist[st] = _weight; + next[st] = t; + edgeNext[st] = edge; + } + + // If undirected graph, process 'reversed' edge + if (!directed) { + var ts = t * N + s; // target to source index + + if (!directed && dist[ts] > _weight) { + dist[ts] = _weight; + next[ts] = s; + edgeNext[ts] = edge; + } + } + } + + // Main loop + for (var k = 0; k < N; k++) { + for (var _i2 = 0; _i2 < N; _i2++) { + var ik = _i2 * N + k; + for (var _j = 0; _j < N; _j++) { + var ij = _i2 * N + _j; + var kj = k * N + _j; + if (dist[ik] + dist[kj] < dist[ij]) { + dist[ij] = dist[ik] + dist[kj]; + next[ij] = next[ik]; + } + } + } + } + var getArgEle = function getArgEle(ele) { + return (string(ele) ? cy.filter(ele) : ele)[0]; + }; + var indexOfArgEle = function indexOfArgEle(ele) { + return indexOf(getArgEle(ele)); + }; + var res = { + distance: function distance(from, to) { + var i = indexOfArgEle(from); + var j = indexOfArgEle(to); + return dist[i * N + j]; + }, + path: function path(from, to) { + var i = indexOfArgEle(from); + var j = indexOfArgEle(to); + var fromNode = atIndex(i); + if (i === j) { + return fromNode.collection(); + } + if (next[i * N + j] == null) { + return cy.collection(); + } + var path = cy.collection(); + var prev = i; + var edge; + path.merge(fromNode); + while (i !== j) { + prev = i; + i = next[i * N + j]; + edge = edgeNext[prev * N + i]; + path.merge(edge); + path.merge(atIndex(i)); + } + return path; + } + }; + return res; + } // floydWarshall + }; // elesfn + + var bellmanFordDefaults = defaults$g({ + weight: function weight(edge) { + return 1; + }, + directed: false, + root: null + }); + var elesfn$q = { + // Implemented from pseudocode from wikipedia + bellmanFord: function bellmanFord(options) { + var _this = this; + var _bellmanFordDefaults = bellmanFordDefaults(options), + weight = _bellmanFordDefaults.weight, + directed = _bellmanFordDefaults.directed, + root = _bellmanFordDefaults.root; + var weightFn = weight; + var eles = this; + var cy = this.cy(); + var _this$byGroup = this.byGroup(), + edges = _this$byGroup.edges, + nodes = _this$byGroup.nodes; + var numNodes = nodes.length; + var infoMap = new Map$2(); + var hasNegativeWeightCycle = false; + var negativeWeightCycles = []; + root = cy.collection(root)[0]; // in case selector passed + + edges.unmergeBy(function (edge) { + return edge.isLoop(); + }); + var numEdges = edges.length; + var getInfo = function getInfo(node) { + var obj = infoMap.get(node.id()); + if (!obj) { + obj = {}; + infoMap.set(node.id(), obj); + } + return obj; + }; + var getNodeFromTo = function getNodeFromTo(to) { + return (string(to) ? cy.$(to) : to)[0]; + }; + var distanceTo = function distanceTo(to) { + return getInfo(getNodeFromTo(to)).dist; + }; + var pathTo = function pathTo(to) { + var thisStart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : root; + var end = getNodeFromTo(to); + var path = []; + var node = end; + for (;;) { + if (node == null) { + return _this.spawn(); + } + var _getInfo = getInfo(node), + edge = _getInfo.edge, + pred = _getInfo.pred; + path.unshift(node[0]); + if (node.same(thisStart) && path.length > 0) { + break; + } + if (edge != null) { + path.unshift(edge); + } + node = pred; + } + return eles.spawn(path); + }; + + // Initializations { dist, pred, edge } + for (var i = 0; i < numNodes; i++) { + var node = nodes[i]; + var info = getInfo(node); + if (node.same(root)) { + info.dist = 0; + } else { + info.dist = Infinity; + } + info.pred = null; + info.edge = null; + } + + // Edges relaxation + var replacedEdge = false; + var checkForEdgeReplacement = function checkForEdgeReplacement(node1, node2, edge, info1, info2, weight) { + var dist = info1.dist + weight; + if (dist < info2.dist && !edge.same(info1.edge)) { + info2.dist = dist; + info2.pred = node1; + info2.edge = edge; + replacedEdge = true; + } + }; + for (var _i = 1; _i < numNodes; _i++) { + replacedEdge = false; + for (var e = 0; e < numEdges; e++) { + var edge = edges[e]; + var src = edge.source(); + var tgt = edge.target(); + var _weight = weightFn(edge); + var srcInfo = getInfo(src); + var tgtInfo = getInfo(tgt); + checkForEdgeReplacement(src, tgt, edge, srcInfo, tgtInfo, _weight); + + // If undirected graph, we need to take into account the 'reverse' edge + if (!directed) { + checkForEdgeReplacement(tgt, src, edge, tgtInfo, srcInfo, _weight); + } + } + if (!replacedEdge) { + break; + } + } + if (replacedEdge) { + // Check for negative weight cycles + var negativeWeightCycleIds = []; + for (var _e = 0; _e < numEdges; _e++) { + var _edge = edges[_e]; + var _src = _edge.source(); + var _tgt = _edge.target(); + var _weight2 = weightFn(_edge); + var srcDist = getInfo(_src).dist; + var tgtDist = getInfo(_tgt).dist; + if (srcDist + _weight2 < tgtDist || !directed && tgtDist + _weight2 < srcDist) { + if (!hasNegativeWeightCycle) { + warn('Graph contains a negative weight cycle for Bellman-Ford'); + hasNegativeWeightCycle = true; + } + if (options.findNegativeWeightCycles !== false) { + var negativeNodes = []; + if (srcDist + _weight2 < tgtDist) { + negativeNodes.push(_src); + } + if (!directed && tgtDist + _weight2 < srcDist) { + negativeNodes.push(_tgt); + } + var numNegativeNodes = negativeNodes.length; + for (var n = 0; n < numNegativeNodes; n++) { + var start = negativeNodes[n]; + var cycle = [start]; + cycle.push(getInfo(start).edge); + var _node = getInfo(start).pred; + while (cycle.indexOf(_node) === -1) { + cycle.push(_node); + cycle.push(getInfo(_node).edge); + _node = getInfo(_node).pred; + } + cycle = cycle.slice(cycle.indexOf(_node)); + var smallestId = cycle[0].id(); + var smallestIndex = 0; + for (var c = 2; c < cycle.length; c += 2) { + if (cycle[c].id() < smallestId) { + smallestId = cycle[c].id(); + smallestIndex = c; + } + } + cycle = cycle.slice(smallestIndex).concat(cycle.slice(0, smallestIndex)); + cycle.push(cycle[0]); + var cycleId = cycle.map(function (el) { + return el.id(); + }).join(","); + if (negativeWeightCycleIds.indexOf(cycleId) === -1) { + negativeWeightCycles.push(eles.spawn(cycle)); + negativeWeightCycleIds.push(cycleId); + } + } + } else { + break; + } + } + } + } + return { + distanceTo: distanceTo, + pathTo: pathTo, + hasNegativeWeightCycle: hasNegativeWeightCycle, + negativeWeightCycles: negativeWeightCycles + }; + } // bellmanFord + }; // elesfn + + var sqrt2 = Math.sqrt(2); + + // Function which colapses 2 (meta) nodes into one + // Updates the remaining edge lists + // Receives as a paramater the edge which causes the collapse + var collapse = function collapse(edgeIndex, nodeMap, remainingEdges) { + if (remainingEdges.length === 0) { + error("Karger-Stein must be run on a connected (sub)graph"); + } + var edgeInfo = remainingEdges[edgeIndex]; + var sourceIn = edgeInfo[1]; + var targetIn = edgeInfo[2]; + var partition1 = nodeMap[sourceIn]; + var partition2 = nodeMap[targetIn]; + var newEdges = remainingEdges; // re-use array + + // Delete all edges between partition1 and partition2 + for (var i = newEdges.length - 1; i >= 0; i--) { + var edge = newEdges[i]; + var src = edge[1]; + var tgt = edge[2]; + if (nodeMap[src] === partition1 && nodeMap[tgt] === partition2 || nodeMap[src] === partition2 && nodeMap[tgt] === partition1) { + newEdges.splice(i, 1); + } + } + + // All edges pointing to partition2 should now point to partition1 + for (var _i = 0; _i < newEdges.length; _i++) { + var _edge = newEdges[_i]; + if (_edge[1] === partition2) { + // Check source + newEdges[_i] = _edge.slice(); // copy + newEdges[_i][1] = partition1; + } else if (_edge[2] === partition2) { + // Check target + newEdges[_i] = _edge.slice(); // copy + newEdges[_i][2] = partition1; + } + } + + // Move all nodes from partition2 to partition1 + for (var _i2 = 0; _i2 < nodeMap.length; _i2++) { + if (nodeMap[_i2] === partition2) { + nodeMap[_i2] = partition1; + } + } + return newEdges; + }; + + // Contracts a graph until we reach a certain number of meta nodes + var contractUntil = function contractUntil(metaNodeMap, remainingEdges, size, sizeLimit) { + while (size > sizeLimit) { + // Choose an edge randomly + var edgeIndex = Math.floor(Math.random() * remainingEdges.length); + + // Collapse graph based on edge + remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges); + size--; + } + return remainingEdges; + }; + var elesfn$p = { + // Computes the minimum cut of an undirected graph + // Returns the correct answer with high probability + kargerStein: function kargerStein() { + var _this = this; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + edges.unmergeBy(function (edge) { + return edge.isLoop(); + }); + var numNodes = nodes.length; + var numEdges = edges.length; + var numIter = Math.ceil(Math.pow(Math.log(numNodes) / Math.LN2, 2)); + var stopSize = Math.floor(numNodes / sqrt2); + if (numNodes < 2) { + error('At least 2 nodes are required for Karger-Stein algorithm'); + return undefined; + } + + // Now store edge destination as indexes + // Format for each edge (edge index, source node index, target node index) + var edgeIndexes = []; + for (var i = 0; i < numEdges; i++) { + var e = edges[i]; + edgeIndexes.push([i, nodes.indexOf(e.source()), nodes.indexOf(e.target())]); + } + + // We will store the best cut found here + var minCutSize = Infinity; + var minCutEdgeIndexes = []; + var minCutNodeMap = new Array(numNodes); + + // Initial meta node partition + var metaNodeMap = new Array(numNodes); + var metaNodeMap2 = new Array(numNodes); + var copyNodesMap = function copyNodesMap(from, to) { + for (var _i3 = 0; _i3 < numNodes; _i3++) { + to[_i3] = from[_i3]; + } + }; + + // Main loop + for (var iter = 0; iter <= numIter; iter++) { + // Reset meta node partition + for (var _i4 = 0; _i4 < numNodes; _i4++) { + metaNodeMap[_i4] = _i4; + } + + // Contract until stop point (stopSize nodes) + var edgesState = contractUntil(metaNodeMap, edgeIndexes.slice(), numNodes, stopSize); + var edgesState2 = edgesState.slice(); // copy + + // Create a copy of the colapsed nodes state + copyNodesMap(metaNodeMap, metaNodeMap2); + + // Run 2 iterations starting in the stop state + var res1 = contractUntil(metaNodeMap, edgesState, stopSize, 2); + var res2 = contractUntil(metaNodeMap2, edgesState2, stopSize, 2); + + // Is any of the 2 results the best cut so far? + if (res1.length <= res2.length && res1.length < minCutSize) { + minCutSize = res1.length; + minCutEdgeIndexes = res1; + copyNodesMap(metaNodeMap, minCutNodeMap); + } else if (res2.length <= res1.length && res2.length < minCutSize) { + minCutSize = res2.length; + minCutEdgeIndexes = res2; + copyNodesMap(metaNodeMap2, minCutNodeMap); + } + } // end of main loop + + // Construct result + var cut = this.spawn(minCutEdgeIndexes.map(function (e) { + return edges[e[0]]; + })); + var partition1 = this.spawn(); + var partition2 = this.spawn(); + + // traverse metaNodeMap for best cut + var witnessNodePartition = minCutNodeMap[0]; + for (var _i5 = 0; _i5 < minCutNodeMap.length; _i5++) { + var partitionId = minCutNodeMap[_i5]; + var node = nodes[_i5]; + if (partitionId === witnessNodePartition) { + partition1.merge(node); + } else { + partition2.merge(node); + } + } + + // construct components corresponding to each disjoint subset of nodes + var constructComponent = function constructComponent(subset) { + var component = _this.spawn(); + subset.forEach(function (node) { + component.merge(node); + node.connectedEdges().forEach(function (edge) { + // ensure edge is within calling collection and edge is not in cut + if (_this.contains(edge) && !cut.contains(edge)) { + component.merge(edge); + } + }); + }); + return component; + }; + var components = [constructComponent(partition1), constructComponent(partition2)]; + var ret = { + cut: cut, + components: components, + // n.b. partitions are included to be compatible with the old api spec + // (could be removed in a future major version) + partition1: partition1, + partition2: partition2 + }; + return ret; + } + }; // elesfn + + var copyPosition = function copyPosition(p) { + return { + x: p.x, + y: p.y + }; + }; + var modelToRenderedPosition = function modelToRenderedPosition(p, zoom, pan) { + return { + x: p.x * zoom + pan.x, + y: p.y * zoom + pan.y + }; + }; + var renderedToModelPosition = function renderedToModelPosition(p, zoom, pan) { + return { + x: (p.x - pan.x) / zoom, + y: (p.y - pan.y) / zoom + }; + }; + var array2point = function array2point(arr) { + return { + x: arr[0], + y: arr[1] + }; + }; + var min = function min(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var min = Infinity; + for (var i = begin; i < end; i++) { + var val = arr[i]; + if (isFinite(val)) { + min = Math.min(val, min); + } + } + return min; + }; + var max = function max(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var max = -Infinity; + for (var i = begin; i < end; i++) { + var val = arr[i]; + if (isFinite(val)) { + max = Math.max(val, max); + } + } + return max; + }; + var mean = function mean(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var total = 0; + var n = 0; + for (var i = begin; i < end; i++) { + var val = arr[i]; + if (isFinite(val)) { + total += val; + n++; + } + } + return total / n; + }; + var median = function median(arr) { + var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; + var copy = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var sort = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var includeHoles = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + if (copy) { + arr = arr.slice(begin, end); + } else { + if (end < arr.length) { + arr.splice(end, arr.length - end); + } + if (begin > 0) { + arr.splice(0, begin); + } + } + + // all non finite (e.g. Infinity, NaN) elements must be -Infinity so they go to the start + var off = 0; // offset from non-finite values + for (var i = arr.length - 1; i >= 0; i--) { + var v = arr[i]; + if (includeHoles) { + if (!isFinite(v)) { + arr[i] = -Infinity; + off++; + } + } else { + // just remove it if we don't want to consider holes + arr.splice(i, 1); + } + } + if (sort) { + arr.sort(function (a, b) { + return a - b; + }); // requires copy = true if you don't want to change the orig + } + + var len = arr.length; + var mid = Math.floor(len / 2); + if (len % 2 !== 0) { + return arr[mid + 1 + off]; + } else { + return (arr[mid - 1 + off] + arr[mid + off]) / 2; + } + }; + var deg2rad = function deg2rad(deg) { + return Math.PI * deg / 180; + }; + var getAngleFromDisp = function getAngleFromDisp(dispX, dispY) { + return Math.atan2(dispY, dispX) - Math.PI / 2; + }; + var log2 = Math.log2 || function (n) { + return Math.log(n) / Math.log(2); + }; + var signum = function signum(x) { + if (x > 0) { + return 1; + } else if (x < 0) { + return -1; + } else { + return 0; + } + }; + var dist = function dist(p1, p2) { + return Math.sqrt(sqdist(p1, p2)); + }; + var sqdist = function sqdist(p1, p2) { + var dx = p2.x - p1.x; + var dy = p2.y - p1.y; + return dx * dx + dy * dy; + }; + var inPlaceSumNormalize = function inPlaceSumNormalize(v) { + var length = v.length; + + // First, get sum of all elements + var total = 0; + for (var i = 0; i < length; i++) { + total += v[i]; + } + + // Now, divide each by the sum of all elements + for (var _i = 0; _i < length; _i++) { + v[_i] = v[_i] / total; + } + return v; + }; + + // from http://en.wikipedia.org/wiki/Bézier_curve#Quadratic_curves + var qbezierAt = function qbezierAt(p0, p1, p2, t) { + return (1 - t) * (1 - t) * p0 + 2 * (1 - t) * t * p1 + t * t * p2; + }; + var qbezierPtAt = function qbezierPtAt(p0, p1, p2, t) { + return { + x: qbezierAt(p0.x, p1.x, p2.x, t), + y: qbezierAt(p0.y, p1.y, p2.y, t) + }; + }; + var lineAt = function lineAt(p0, p1, t, d) { + var vec = { + x: p1.x - p0.x, + y: p1.y - p0.y + }; + var vecDist = dist(p0, p1); + var normVec = { + x: vec.x / vecDist, + y: vec.y / vecDist + }; + t = t == null ? 0 : t; + d = d != null ? d : t * vecDist; + return { + x: p0.x + normVec.x * d, + y: p0.y + normVec.y * d + }; + }; + var bound = function bound(min, val, max) { + return Math.max(min, Math.min(max, val)); + }; + + // makes a full bb (x1, y1, x2, y2, w, h) from implicit params + var makeBoundingBox = function makeBoundingBox(bb) { + if (bb == null) { + return { + x1: Infinity, + y1: Infinity, + x2: -Infinity, + y2: -Infinity, + w: 0, + h: 0 + }; + } else if (bb.x1 != null && bb.y1 != null) { + if (bb.x2 != null && bb.y2 != null && bb.x2 >= bb.x1 && bb.y2 >= bb.y1) { + return { + x1: bb.x1, + y1: bb.y1, + x2: bb.x2, + y2: bb.y2, + w: bb.x2 - bb.x1, + h: bb.y2 - bb.y1 + }; + } else if (bb.w != null && bb.h != null && bb.w >= 0 && bb.h >= 0) { + return { + x1: bb.x1, + y1: bb.y1, + x2: bb.x1 + bb.w, + y2: bb.y1 + bb.h, + w: bb.w, + h: bb.h + }; + } + } + }; + var copyBoundingBox = function copyBoundingBox(bb) { + return { + x1: bb.x1, + x2: bb.x2, + w: bb.w, + y1: bb.y1, + y2: bb.y2, + h: bb.h + }; + }; + var clearBoundingBox = function clearBoundingBox(bb) { + bb.x1 = Infinity; + bb.y1 = Infinity; + bb.x2 = -Infinity; + bb.y2 = -Infinity; + bb.w = 0; + bb.h = 0; + }; + var shiftBoundingBox = function shiftBoundingBox(bb, dx, dy) { + return { + x1: bb.x1 + dx, + x2: bb.x2 + dx, + y1: bb.y1 + dy, + y2: bb.y2 + dy, + w: bb.w, + h: bb.h + }; + }; + var updateBoundingBox = function updateBoundingBox(bb1, bb2) { + // update bb1 with bb2 bounds + + bb1.x1 = Math.min(bb1.x1, bb2.x1); + bb1.x2 = Math.max(bb1.x2, bb2.x2); + bb1.w = bb1.x2 - bb1.x1; + bb1.y1 = Math.min(bb1.y1, bb2.y1); + bb1.y2 = Math.max(bb1.y2, bb2.y2); + bb1.h = bb1.y2 - bb1.y1; + }; + var expandBoundingBoxByPoint = function expandBoundingBoxByPoint(bb, x, y) { + bb.x1 = Math.min(bb.x1, x); + bb.x2 = Math.max(bb.x2, x); + bb.w = bb.x2 - bb.x1; + bb.y1 = Math.min(bb.y1, y); + bb.y2 = Math.max(bb.y2, y); + bb.h = bb.y2 - bb.y1; + }; + var expandBoundingBox = function expandBoundingBox(bb) { + var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + bb.x1 -= padding; + bb.x2 += padding; + bb.y1 -= padding; + bb.y2 += padding; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + return bb; + }; + var expandBoundingBoxSides = function expandBoundingBoxSides(bb) { + var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0]; + var top, right, bottom, left; + if (padding.length === 1) { + top = right = bottom = left = padding[0]; + } else if (padding.length === 2) { + top = bottom = padding[0]; + left = right = padding[1]; + } else if (padding.length === 4) { + var _padding = _slicedToArray(padding, 4); + top = _padding[0]; + right = _padding[1]; + bottom = _padding[2]; + left = _padding[3]; + } + bb.x1 -= left; + bb.x2 += right; + bb.y1 -= top; + bb.y2 += bottom; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + return bb; + }; + + // assign the values of bb2 into bb1 + var assignBoundingBox = function assignBoundingBox(bb1, bb2) { + bb1.x1 = bb2.x1; + bb1.y1 = bb2.y1; + bb1.x2 = bb2.x2; + bb1.y2 = bb2.y2; + bb1.w = bb1.x2 - bb1.x1; + bb1.h = bb1.y2 - bb1.y1; + }; + var boundingBoxesIntersect = function boundingBoxesIntersect(bb1, bb2) { + // case: one bb to right of other + if (bb1.x1 > bb2.x2) { + return false; + } + if (bb2.x1 > bb1.x2) { + return false; + } + + // case: one bb to left of other + if (bb1.x2 < bb2.x1) { + return false; + } + if (bb2.x2 < bb1.x1) { + return false; + } + + // case: one bb above other + if (bb1.y2 < bb2.y1) { + return false; + } + if (bb2.y2 < bb1.y1) { + return false; + } + + // case: one bb below other + if (bb1.y1 > bb2.y2) { + return false; + } + if (bb2.y1 > bb1.y2) { + return false; + } + + // otherwise, must have some overlap + return true; + }; + var inBoundingBox = function inBoundingBox(bb, x, y) { + return bb.x1 <= x && x <= bb.x2 && bb.y1 <= y && y <= bb.y2; + }; + var pointInBoundingBox = function pointInBoundingBox(bb, pt) { + return inBoundingBox(bb, pt.x, pt.y); + }; + var boundingBoxInBoundingBox = function boundingBoxInBoundingBox(bb1, bb2) { + return inBoundingBox(bb1, bb2.x1, bb2.y1) && inBoundingBox(bb1, bb2.x2, bb2.y2); + }; + var roundRectangleIntersectLine = function roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding) { + var cornerRadius = getRoundRectangleRadius(width, height); + var halfWidth = width / 2; + var halfHeight = height / 2; + + // Check intersections with straight line segments + var straightLineIntersections; + + // Top segment, left to right + { + var topStartX = nodeX - halfWidth + cornerRadius - padding; + var topStartY = nodeY - halfHeight - padding; + var topEndX = nodeX + halfWidth - cornerRadius + padding; + var topEndY = topStartY; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + + // Right segment, top to bottom + { + var rightStartX = nodeX + halfWidth + padding; + var rightStartY = nodeY - halfHeight + cornerRadius - padding; + var rightEndX = rightStartX; + var rightEndY = nodeY + halfHeight - cornerRadius + padding; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, rightStartX, rightStartY, rightEndX, rightEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + + // Bottom segment, left to right + { + var bottomStartX = nodeX - halfWidth + cornerRadius - padding; + var bottomStartY = nodeY + halfHeight + padding; + var bottomEndX = nodeX + halfWidth - cornerRadius + padding; + var bottomEndY = bottomStartY; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, bottomStartX, bottomStartY, bottomEndX, bottomEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + + // Left segment, top to bottom + { + var leftStartX = nodeX - halfWidth - padding; + var leftStartY = nodeY - halfHeight + cornerRadius - padding; + var leftEndX = leftStartX; + var leftEndY = nodeY + halfHeight - cornerRadius + padding; + straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, leftStartX, leftStartY, leftEndX, leftEndY, false); + if (straightLineIntersections.length > 0) { + return straightLineIntersections; + } + } + + // Check intersections with arc segments + var arcIntersections; + + // Top Left + { + var topLeftCenterX = nodeX - halfWidth + cornerRadius; + var topLeftCenterY = nodeY - halfHeight + cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topLeftCenterX, topLeftCenterY, cornerRadius + padding); + + // Ensure the intersection is on the desired quarter of the circle + if (arcIntersections.length > 0 && arcIntersections[0] <= topLeftCenterX && arcIntersections[1] <= topLeftCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + + // Top Right + { + var topRightCenterX = nodeX + halfWidth - cornerRadius; + var topRightCenterY = nodeY - halfHeight + cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topRightCenterX, topRightCenterY, cornerRadius + padding); + + // Ensure the intersection is on the desired quarter of the circle + if (arcIntersections.length > 0 && arcIntersections[0] >= topRightCenterX && arcIntersections[1] <= topRightCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + + // Bottom Right + { + var bottomRightCenterX = nodeX + halfWidth - cornerRadius; + var bottomRightCenterY = nodeY + halfHeight - cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomRightCenterX, bottomRightCenterY, cornerRadius + padding); + + // Ensure the intersection is on the desired quarter of the circle + if (arcIntersections.length > 0 && arcIntersections[0] >= bottomRightCenterX && arcIntersections[1] >= bottomRightCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + + // Bottom Left + { + var bottomLeftCenterX = nodeX - halfWidth + cornerRadius; + var bottomLeftCenterY = nodeY + halfHeight - cornerRadius; + arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomLeftCenterX, bottomLeftCenterY, cornerRadius + padding); + + // Ensure the intersection is on the desired quarter of the circle + if (arcIntersections.length > 0 && arcIntersections[0] <= bottomLeftCenterX && arcIntersections[1] >= bottomLeftCenterY) { + return [arcIntersections[0], arcIntersections[1]]; + } + } + return []; // if nothing + }; + + var inLineVicinity = function inLineVicinity(x, y, lx1, ly1, lx2, ly2, tolerance) { + var t = tolerance; + var x1 = Math.min(lx1, lx2); + var x2 = Math.max(lx1, lx2); + var y1 = Math.min(ly1, ly2); + var y2 = Math.max(ly1, ly2); + return x1 - t <= x && x <= x2 + t && y1 - t <= y && y <= y2 + t; + }; + var inBezierVicinity = function inBezierVicinity(x, y, x1, y1, x2, y2, x3, y3, tolerance) { + var bb = { + x1: Math.min(x1, x3, x2) - tolerance, + x2: Math.max(x1, x3, x2) + tolerance, + y1: Math.min(y1, y3, y2) - tolerance, + y2: Math.max(y1, y3, y2) + tolerance + }; + + // if outside the rough bounding box for the bezier, then it can't be a hit + if (x < bb.x1 || x > bb.x2 || y < bb.y1 || y > bb.y2) { + // console.log('bezier out of rough bb') + return false; + } else { + // console.log('do more expensive check'); + return true; + } + }; + var solveQuadratic = function solveQuadratic(a, b, c, val) { + c -= val; + var r = b * b - 4 * a * c; + if (r < 0) { + return []; + } + var sqrtR = Math.sqrt(r); + var denom = 2 * a; + var root1 = (-b + sqrtR) / denom; + var root2 = (-b - sqrtR) / denom; + return [root1, root2]; + }; + var solveCubic = function solveCubic(a, b, c, d, result) { + // Solves a cubic function, returns root in form [r1, i1, r2, i2, r3, i3], where + // r is the real component, i is the imaginary component + + // An implementation of the Cardano method from the year 1545 + // http://en.wikipedia.org/wiki/Cubic_function#The_nature_of_the_roots + + var epsilon = 0.00001; + + // avoid division by zero while keeping the overall expression close in value + if (a === 0) { + a = epsilon; + } + b /= a; + c /= a; + d /= a; + var discriminant, q, r, dum1, s, t, term1, r13; + q = (3.0 * c - b * b) / 9.0; + r = -(27.0 * d) + b * (9.0 * c - 2.0 * (b * b)); + r /= 54.0; + discriminant = q * q * q + r * r; + result[1] = 0; + term1 = b / 3.0; + if (discriminant > 0) { + s = r + Math.sqrt(discriminant); + s = s < 0 ? -Math.pow(-s, 1.0 / 3.0) : Math.pow(s, 1.0 / 3.0); + t = r - Math.sqrt(discriminant); + t = t < 0 ? -Math.pow(-t, 1.0 / 3.0) : Math.pow(t, 1.0 / 3.0); + result[0] = -term1 + s + t; + term1 += (s + t) / 2.0; + result[4] = result[2] = -term1; + term1 = Math.sqrt(3.0) * (-t + s) / 2; + result[3] = term1; + result[5] = -term1; + return; + } + result[5] = result[3] = 0; + if (discriminant === 0) { + r13 = r < 0 ? -Math.pow(-r, 1.0 / 3.0) : Math.pow(r, 1.0 / 3.0); + result[0] = -term1 + 2.0 * r13; + result[4] = result[2] = -(r13 + term1); + return; + } + q = -q; + dum1 = q * q * q; + dum1 = Math.acos(r / Math.sqrt(dum1)); + r13 = 2.0 * Math.sqrt(q); + result[0] = -term1 + r13 * Math.cos(dum1 / 3.0); + result[2] = -term1 + r13 * Math.cos((dum1 + 2.0 * Math.PI) / 3.0); + result[4] = -term1 + r13 * Math.cos((dum1 + 4.0 * Math.PI) / 3.0); + return; + }; + var sqdistToQuadraticBezier = function sqdistToQuadraticBezier(x, y, x1, y1, x2, y2, x3, y3) { + // Find minimum distance by using the minimum of the distance + // function between the given point and the curve + + // This gives the coefficients of the resulting cubic equation + // whose roots tell us where a possible minimum is + // (Coefficients are divided by 4) + + var a = 1.0 * x1 * x1 - 4 * x1 * x2 + 2 * x1 * x3 + 4 * x2 * x2 - 4 * x2 * x3 + x3 * x3 + y1 * y1 - 4 * y1 * y2 + 2 * y1 * y3 + 4 * y2 * y2 - 4 * y2 * y3 + y3 * y3; + var b = 1.0 * 9 * x1 * x2 - 3 * x1 * x1 - 3 * x1 * x3 - 6 * x2 * x2 + 3 * x2 * x3 + 9 * y1 * y2 - 3 * y1 * y1 - 3 * y1 * y3 - 6 * y2 * y2 + 3 * y2 * y3; + var c = 1.0 * 3 * x1 * x1 - 6 * x1 * x2 + x1 * x3 - x1 * x + 2 * x2 * x2 + 2 * x2 * x - x3 * x + 3 * y1 * y1 - 6 * y1 * y2 + y1 * y3 - y1 * y + 2 * y2 * y2 + 2 * y2 * y - y3 * y; + var d = 1.0 * x1 * x2 - x1 * x1 + x1 * x - x2 * x + y1 * y2 - y1 * y1 + y1 * y - y2 * y; + + // debug("coefficients: " + a / a + ", " + b / a + ", " + c / a + ", " + d / a); + + var roots = []; + + // Use the cubic solving algorithm + solveCubic(a, b, c, d, roots); + var zeroThreshold = 0.0000001; + var params = []; + for (var index = 0; index < 6; index += 2) { + if (Math.abs(roots[index + 1]) < zeroThreshold && roots[index] >= 0 && roots[index] <= 1.0) { + params.push(roots[index]); + } + } + params.push(1.0); + params.push(0.0); + var minDistanceSquared = -1; + var curX, curY, distSquared; + for (var i = 0; i < params.length; i++) { + curX = Math.pow(1.0 - params[i], 2.0) * x1 + 2.0 * (1 - params[i]) * params[i] * x2 + params[i] * params[i] * x3; + curY = Math.pow(1 - params[i], 2.0) * y1 + 2 * (1.0 - params[i]) * params[i] * y2 + params[i] * params[i] * y3; + distSquared = Math.pow(curX - x, 2) + Math.pow(curY - y, 2); + // debug('distance for param ' + params[i] + ": " + Math.sqrt(distSquared)); + if (minDistanceSquared >= 0) { + if (distSquared < minDistanceSquared) { + minDistanceSquared = distSquared; + } + } else { + minDistanceSquared = distSquared; + } + } + return minDistanceSquared; + }; + var sqdistToFiniteLine = function sqdistToFiniteLine(x, y, x1, y1, x2, y2) { + var offset = [x - x1, y - y1]; + var line = [x2 - x1, y2 - y1]; + var lineSq = line[0] * line[0] + line[1] * line[1]; + var hypSq = offset[0] * offset[0] + offset[1] * offset[1]; + var dotProduct = offset[0] * line[0] + offset[1] * line[1]; + var adjSq = dotProduct * dotProduct / lineSq; + if (dotProduct < 0) { + return hypSq; + } + if (adjSq > lineSq) { + return (x - x2) * (x - x2) + (y - y2) * (y - y2); + } + return hypSq - adjSq; + }; + var pointInsidePolygonPoints = function pointInsidePolygonPoints(x, y, points) { + var x1, y1, x2, y2; + var y3; + + // Intersect with vertical line through (x, y) + var up = 0; + // let down = 0; + for (var i = 0; i < points.length / 2; i++) { + x1 = points[i * 2]; + y1 = points[i * 2 + 1]; + if (i + 1 < points.length / 2) { + x2 = points[(i + 1) * 2]; + y2 = points[(i + 1) * 2 + 1]; + } else { + x2 = points[(i + 1 - points.length / 2) * 2]; + y2 = points[(i + 1 - points.length / 2) * 2 + 1]; + } + if (x1 == x && x2 == x) ; else if (x1 >= x && x >= x2 || x1 <= x && x <= x2) { + y3 = (x - x1) / (x2 - x1) * (y2 - y1) + y1; + if (y3 > y) { + up++; + } + + // if( y3 < y ){ + // down++; + // } + } else { + continue; + } + } + if (up % 2 === 0) { + return false; + } else { + return true; + } + }; + var pointInsidePolygon = function pointInsidePolygon(x, y, basePoints, centerX, centerY, width, height, direction, padding) { + var transformedPoints = new Array(basePoints.length); + + // Gives negative angle + var angle; + if (direction[0] != null) { + angle = Math.atan(direction[1] / direction[0]); + if (direction[0] < 0) { + angle = angle + Math.PI / 2; + } else { + angle = -angle - Math.PI / 2; + } + } else { + angle = direction; + } + var cos = Math.cos(-angle); + var sin = Math.sin(-angle); + + // console.log("base: " + basePoints); + for (var i = 0; i < transformedPoints.length / 2; i++) { + transformedPoints[i * 2] = width / 2 * (basePoints[i * 2] * cos - basePoints[i * 2 + 1] * sin); + transformedPoints[i * 2 + 1] = height / 2 * (basePoints[i * 2 + 1] * cos + basePoints[i * 2] * sin); + transformedPoints[i * 2] += centerX; + transformedPoints[i * 2 + 1] += centerY; + } + var points; + if (padding > 0) { + var expandedLineSet = expandPolygon(transformedPoints, -padding); + points = joinLines(expandedLineSet); + } else { + points = transformedPoints; + } + return pointInsidePolygonPoints(x, y, points); + }; + var pointInsideRoundPolygon = function pointInsideRoundPolygon(x, y, basePoints, centerX, centerY, width, height) { + var cutPolygonPoints = new Array(basePoints.length); + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + var squaredCornerRadius = cornerRadius * cornerRadius; + for (var i = 0; i < basePoints.length / 4; i++) { + var sourceUv = void 0, + destUv = void 0; + if (i === 0) { + sourceUv = basePoints.length - 2; + } else { + sourceUv = i * 4 - 2; + } + destUv = i * 4 + 2; + var px = centerX + halfW * basePoints[i * 4]; + var py = centerY + halfH * basePoints[i * 4 + 1]; + var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * basePoints[sourceUv]; + var cp0y = py - offset * basePoints[sourceUv + 1]; + var cp1x = px + offset * basePoints[destUv]; + var cp1y = py + offset * basePoints[destUv + 1]; + cutPolygonPoints[i * 4] = cp0x; + cutPolygonPoints[i * 4 + 1] = cp0y; + cutPolygonPoints[i * 4 + 2] = cp1x; + cutPolygonPoints[i * 4 + 3] = cp1y; + var orthx = basePoints[sourceUv + 1]; + var orthy = -basePoints[sourceUv]; + var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; + if (cosAlpha < 0) { + orthx *= -1; + orthy *= -1; + } + var cx = cp0x + orthx * cornerRadius; + var cy = cp0y + orthy * cornerRadius; + var squaredDistance = Math.pow(cx - x, 2) + Math.pow(cy - y, 2); + if (squaredDistance <= squaredCornerRadius) { + return true; + } + } + return pointInsidePolygonPoints(x, y, cutPolygonPoints); + }; + var joinLines = function joinLines(lineSet) { + var vertices = new Array(lineSet.length / 2); + var currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY; + var nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY; + for (var i = 0; i < lineSet.length / 4; i++) { + currentLineStartX = lineSet[i * 4]; + currentLineStartY = lineSet[i * 4 + 1]; + currentLineEndX = lineSet[i * 4 + 2]; + currentLineEndY = lineSet[i * 4 + 3]; + if (i < lineSet.length / 4 - 1) { + nextLineStartX = lineSet[(i + 1) * 4]; + nextLineStartY = lineSet[(i + 1) * 4 + 1]; + nextLineEndX = lineSet[(i + 1) * 4 + 2]; + nextLineEndY = lineSet[(i + 1) * 4 + 3]; + } else { + nextLineStartX = lineSet[0]; + nextLineStartY = lineSet[1]; + nextLineEndX = lineSet[2]; + nextLineEndY = lineSet[3]; + } + var intersection = finiteLinesIntersect(currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY, nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY, true); + vertices[i * 2] = intersection[0]; + vertices[i * 2 + 1] = intersection[1]; + } + return vertices; + }; + var expandPolygon = function expandPolygon(points, pad) { + var expandedLineSet = new Array(points.length * 2); + var currentPointX, currentPointY, nextPointX, nextPointY; + for (var i = 0; i < points.length / 2; i++) { + currentPointX = points[i * 2]; + currentPointY = points[i * 2 + 1]; + if (i < points.length / 2 - 1) { + nextPointX = points[(i + 1) * 2]; + nextPointY = points[(i + 1) * 2 + 1]; + } else { + nextPointX = points[0]; + nextPointY = points[1]; + } + + // Current line: [currentPointX, currentPointY] to [nextPointX, nextPointY] + + // Assume CCW polygon winding + + var offsetX = nextPointY - currentPointY; + var offsetY = -(nextPointX - currentPointX); + + // Normalize + var offsetLength = Math.sqrt(offsetX * offsetX + offsetY * offsetY); + var normalizedOffsetX = offsetX / offsetLength; + var normalizedOffsetY = offsetY / offsetLength; + expandedLineSet[i * 4] = currentPointX + normalizedOffsetX * pad; + expandedLineSet[i * 4 + 1] = currentPointY + normalizedOffsetY * pad; + expandedLineSet[i * 4 + 2] = nextPointX + normalizedOffsetX * pad; + expandedLineSet[i * 4 + 3] = nextPointY + normalizedOffsetY * pad; + } + return expandedLineSet; + }; + var intersectLineEllipse = function intersectLineEllipse(x, y, centerX, centerY, ellipseWradius, ellipseHradius) { + var dispX = centerX - x; + var dispY = centerY - y; + dispX /= ellipseWradius; + dispY /= ellipseHradius; + var len = Math.sqrt(dispX * dispX + dispY * dispY); + var newLength = len - 1; + if (newLength < 0) { + return []; + } + var lenProportion = newLength / len; + return [(centerX - x) * lenProportion + x, (centerY - y) * lenProportion + y]; + }; + var checkInEllipse = function checkInEllipse(x, y, width, height, centerX, centerY, padding) { + x -= centerX; + y -= centerY; + x /= width / 2 + padding; + y /= height / 2 + padding; + return x * x + y * y <= 1; + }; + + // Returns intersections of increasing distance from line's start point + var intersectLineCircle = function intersectLineCircle(x1, y1, x2, y2, centerX, centerY, radius) { + // Calculate d, direction vector of line + var d = [x2 - x1, y2 - y1]; // Direction vector of line + var f = [x1 - centerX, y1 - centerY]; + var a = d[0] * d[0] + d[1] * d[1]; + var b = 2 * (f[0] * d[0] + f[1] * d[1]); + var c = f[0] * f[0] + f[1] * f[1] - radius * radius; + var discriminant = b * b - 4 * a * c; + if (discriminant < 0) { + return []; + } + var t1 = (-b + Math.sqrt(discriminant)) / (2 * a); + var t2 = (-b - Math.sqrt(discriminant)) / (2 * a); + var tMin = Math.min(t1, t2); + var tMax = Math.max(t1, t2); + var inRangeParams = []; + if (tMin >= 0 && tMin <= 1) { + inRangeParams.push(tMin); + } + if (tMax >= 0 && tMax <= 1) { + inRangeParams.push(tMax); + } + if (inRangeParams.length === 0) { + return []; + } + var nearIntersectionX = inRangeParams[0] * d[0] + x1; + var nearIntersectionY = inRangeParams[0] * d[1] + y1; + if (inRangeParams.length > 1) { + if (inRangeParams[0] == inRangeParams[1]) { + return [nearIntersectionX, nearIntersectionY]; + } else { + var farIntersectionX = inRangeParams[1] * d[0] + x1; + var farIntersectionY = inRangeParams[1] * d[1] + y1; + return [nearIntersectionX, nearIntersectionY, farIntersectionX, farIntersectionY]; + } + } else { + return [nearIntersectionX, nearIntersectionY]; + } + }; + var midOfThree = function midOfThree(a, b, c) { + if (b <= a && a <= c || c <= a && a <= b) { + return a; + } else if (a <= b && b <= c || c <= b && b <= a) { + return b; + } else { + return c; + } + }; + + // (x1,y1)=>(x2,y2) intersect with (x3,y3)=>(x4,y4) + var finiteLinesIntersect = function finiteLinesIntersect(x1, y1, x2, y2, x3, y3, x4, y4, infiniteLines) { + var dx13 = x1 - x3; + var dx21 = x2 - x1; + var dx43 = x4 - x3; + var dy13 = y1 - y3; + var dy21 = y2 - y1; + var dy43 = y4 - y3; + var ua_t = dx43 * dy13 - dy43 * dx13; + var ub_t = dx21 * dy13 - dy21 * dx13; + var u_b = dy43 * dx21 - dx43 * dy21; + if (u_b !== 0) { + var ua = ua_t / u_b; + var ub = ub_t / u_b; + var flptThreshold = 0.001; + var _min = 0 - flptThreshold; + var _max = 1 + flptThreshold; + if (_min <= ua && ua <= _max && _min <= ub && ub <= _max) { + return [x1 + ua * dx21, y1 + ua * dy21]; + } else { + if (!infiniteLines) { + return []; + } else { + return [x1 + ua * dx21, y1 + ua * dy21]; + } + } + } else { + if (ua_t === 0 || ub_t === 0) { + // Parallel, coincident lines. Check if overlap + + // Check endpoint of second line + if (midOfThree(x1, x2, x4) === x4) { + return [x4, y4]; + } + + // Check start point of second line + if (midOfThree(x1, x2, x3) === x3) { + return [x3, y3]; + } + + // Endpoint of first line + if (midOfThree(x3, x4, x2) === x2) { + return [x2, y2]; + } + return []; + } else { + // Parallel, non-coincident + return []; + } + } + }; + + // math.polygonIntersectLine( x, y, basePoints, centerX, centerY, width, height, padding ) + // intersect a node polygon (pts transformed) + // + // math.polygonIntersectLine( x, y, basePoints, centerX, centerY ) + // intersect the points (no transform) + var polygonIntersectLine = function polygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding) { + var intersections = []; + var intersection; + var transformedPoints = new Array(basePoints.length); + var doTransform = true; + if (width == null) { + doTransform = false; + } + var points; + if (doTransform) { + for (var i = 0; i < transformedPoints.length / 2; i++) { + transformedPoints[i * 2] = basePoints[i * 2] * width + centerX; + transformedPoints[i * 2 + 1] = basePoints[i * 2 + 1] * height + centerY; + } + if (padding > 0) { + var expandedLineSet = expandPolygon(transformedPoints, -padding); + points = joinLines(expandedLineSet); + } else { + points = transformedPoints; + } + } else { + points = basePoints; + } + var currentX, currentY, nextX, nextY; + for (var _i2 = 0; _i2 < points.length / 2; _i2++) { + currentX = points[_i2 * 2]; + currentY = points[_i2 * 2 + 1]; + if (_i2 < points.length / 2 - 1) { + nextX = points[(_i2 + 1) * 2]; + nextY = points[(_i2 + 1) * 2 + 1]; + } else { + nextX = points[0]; + nextY = points[1]; + } + intersection = finiteLinesIntersect(x, y, centerX, centerY, currentX, currentY, nextX, nextY); + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + return intersections; + }; + var roundPolygonIntersectLine = function roundPolygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding) { + var intersections = []; + var intersection; + var lines = new Array(basePoints.length); + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + for (var i = 0; i < basePoints.length / 4; i++) { + var sourceUv = void 0, + destUv = void 0; + if (i === 0) { + sourceUv = basePoints.length - 2; + } else { + sourceUv = i * 4 - 2; + } + destUv = i * 4 + 2; + var px = centerX + halfW * basePoints[i * 4]; + var py = centerY + halfH * basePoints[i * 4 + 1]; + var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * basePoints[sourceUv]; + var cp0y = py - offset * basePoints[sourceUv + 1]; + var cp1x = px + offset * basePoints[destUv]; + var cp1y = py + offset * basePoints[destUv + 1]; + if (i === 0) { + lines[basePoints.length - 2] = cp0x; + lines[basePoints.length - 1] = cp0y; + } else { + lines[i * 4 - 2] = cp0x; + lines[i * 4 - 1] = cp0y; + } + lines[i * 4] = cp1x; + lines[i * 4 + 1] = cp1y; + var orthx = basePoints[sourceUv + 1]; + var orthy = -basePoints[sourceUv]; + var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; + if (cosAlpha < 0) { + orthx *= -1; + orthy *= -1; + } + var cx = cp0x + orthx * cornerRadius; + var cy = cp0y + orthy * cornerRadius; + intersection = intersectLineCircle(x, y, centerX, centerY, cx, cy, cornerRadius); + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + for (var _i3 = 0; _i3 < lines.length / 4; _i3++) { + intersection = finiteLinesIntersect(x, y, centerX, centerY, lines[_i3 * 4], lines[_i3 * 4 + 1], lines[_i3 * 4 + 2], lines[_i3 * 4 + 3], false); + if (intersection.length !== 0) { + intersections.push(intersection[0], intersection[1]); + } + } + if (intersections.length > 2) { + var lowestIntersection = [intersections[0], intersections[1]]; + var lowestSquaredDistance = Math.pow(lowestIntersection[0] - x, 2) + Math.pow(lowestIntersection[1] - y, 2); + for (var _i4 = 1; _i4 < intersections.length / 2; _i4++) { + var squaredDistance = Math.pow(intersections[_i4 * 2] - x, 2) + Math.pow(intersections[_i4 * 2 + 1] - y, 2); + if (squaredDistance <= lowestSquaredDistance) { + lowestIntersection[0] = intersections[_i4 * 2]; + lowestIntersection[1] = intersections[_i4 * 2 + 1]; + lowestSquaredDistance = squaredDistance; + } + } + return lowestIntersection; + } + return intersections; + }; + var shortenIntersection = function shortenIntersection(intersection, offset, amount) { + var disp = [intersection[0] - offset[0], intersection[1] - offset[1]]; + var length = Math.sqrt(disp[0] * disp[0] + disp[1] * disp[1]); + var lenRatio = (length - amount) / length; + if (lenRatio < 0) { + lenRatio = 0.00001; + } + return [offset[0] + lenRatio * disp[0], offset[1] + lenRatio * disp[1]]; + }; + var generateUnitNgonPointsFitToSquare = function generateUnitNgonPointsFitToSquare(sides, rotationRadians) { + var points = generateUnitNgonPoints(sides, rotationRadians); + points = fitPolygonToSquare(points); + return points; + }; + var fitPolygonToSquare = function fitPolygonToSquare(points) { + var x, y; + var sides = points.length / 2; + var minX = Infinity, + minY = Infinity, + maxX = -Infinity, + maxY = -Infinity; + for (var i = 0; i < sides; i++) { + x = points[2 * i]; + y = points[2 * i + 1]; + minX = Math.min(minX, x); + maxX = Math.max(maxX, x); + minY = Math.min(minY, y); + maxY = Math.max(maxY, y); + } + + // stretch factors + var sx = 2 / (maxX - minX); + var sy = 2 / (maxY - minY); + for (var _i5 = 0; _i5 < sides; _i5++) { + x = points[2 * _i5] = points[2 * _i5] * sx; + y = points[2 * _i5 + 1] = points[2 * _i5 + 1] * sy; + minX = Math.min(minX, x); + maxX = Math.max(maxX, x); + minY = Math.min(minY, y); + maxY = Math.max(maxY, y); + } + if (minY < -1) { + for (var _i6 = 0; _i6 < sides; _i6++) { + y = points[2 * _i6 + 1] = points[2 * _i6 + 1] + (-1 - minY); + } + } + return points; + }; + var generateUnitNgonPoints = function generateUnitNgonPoints(sides, rotationRadians) { + var increment = 1.0 / sides * 2 * Math.PI; + var startAngle = sides % 2 === 0 ? Math.PI / 2.0 + increment / 2.0 : Math.PI / 2.0; + startAngle += rotationRadians; + var points = new Array(sides * 2); + var currentAngle; + for (var i = 0; i < sides; i++) { + currentAngle = i * increment + startAngle; + points[2 * i] = Math.cos(currentAngle); // x + points[2 * i + 1] = Math.sin(-currentAngle); // y + } + + return points; + }; + + // Set the default radius, unless half of width or height is smaller than default + var getRoundRectangleRadius = function getRoundRectangleRadius(width, height) { + return Math.min(width / 4, height / 4, 8); + }; + + // Set the default radius + var getRoundPolygonRadius = function getRoundPolygonRadius(width, height) { + return Math.min(width / 10, height / 10, 8); + }; + var getCutRectangleCornerLength = function getCutRectangleCornerLength() { + return 8; + }; + var bezierPtsToQuadCoeff = function bezierPtsToQuadCoeff(p0, p1, p2) { + return [p0 - 2 * p1 + p2, 2 * (p1 - p0), p0]; + }; + + // get curve width, height, and control point position offsets as a percentage of node height / width + var getBarrelCurveConstants = function getBarrelCurveConstants(width, height) { + return { + heightOffset: Math.min(15, 0.05 * height), + widthOffset: Math.min(100, 0.25 * width), + ctrlPtOffsetPct: 0.05 + }; + }; + + var pageRankDefaults = defaults$g({ + dampingFactor: 0.8, + precision: 0.000001, + iterations: 200, + weight: function weight(edge) { + return 1; + } + }); + var elesfn$o = { + pageRank: function pageRank(options) { + var _pageRankDefaults = pageRankDefaults(options), + dampingFactor = _pageRankDefaults.dampingFactor, + precision = _pageRankDefaults.precision, + iterations = _pageRankDefaults.iterations, + weight = _pageRankDefaults.weight; + var cy = this._private.cy; + var _this$byGroup = this.byGroup(), + nodes = _this$byGroup.nodes, + edges = _this$byGroup.edges; + var numNodes = nodes.length; + var numNodesSqd = numNodes * numNodes; + var numEdges = edges.length; + + // Construct transposed adjacency matrix + // First lets have a zeroed matrix of the right size + // We'll also keep track of the sum of each column + var matrix = new Array(numNodesSqd); + var columnSum = new Array(numNodes); + var additionalProb = (1 - dampingFactor) / numNodes; + + // Create null matrix + for (var i = 0; i < numNodes; i++) { + for (var j = 0; j < numNodes; j++) { + var n = i * numNodes + j; + matrix[n] = 0; + } + columnSum[i] = 0; + } + + // Now, process edges + for (var _i = 0; _i < numEdges; _i++) { + var edge = edges[_i]; + var srcId = edge.data('source'); + var tgtId = edge.data('target'); + + // Don't include loops in the matrix + if (srcId === tgtId) { + continue; + } + var s = nodes.indexOfId(srcId); + var t = nodes.indexOfId(tgtId); + var w = weight(edge); + var _n = t * numNodes + s; + + // Update matrix + matrix[_n] += w; + + // Update column sum + columnSum[s] += w; + } + + // Add additional probability based on damping factor + // Also, take into account columns that have sum = 0 + var p = 1.0 / numNodes + additionalProb; // Shorthand + + // Traverse matrix, column by column + for (var _j = 0; _j < numNodes; _j++) { + if (columnSum[_j] === 0) { + // No 'links' out from node jth, assume equal probability for each possible node + for (var _i2 = 0; _i2 < numNodes; _i2++) { + var _n2 = _i2 * numNodes + _j; + matrix[_n2] = p; + } + } else { + // Node jth has outgoing link, compute normalized probabilities + for (var _i3 = 0; _i3 < numNodes; _i3++) { + var _n3 = _i3 * numNodes + _j; + matrix[_n3] = matrix[_n3] / columnSum[_j] + additionalProb; + } + } + } + + // Compute dominant eigenvector using power method + var eigenvector = new Array(numNodes); + var temp = new Array(numNodes); + var previous; + + // Start with a vector of all 1's + // Also, initialize a null vector which will be used as shorthand + for (var _i4 = 0; _i4 < numNodes; _i4++) { + eigenvector[_i4] = 1; + } + for (var iter = 0; iter < iterations; iter++) { + // Temp array with all 0's + for (var _i5 = 0; _i5 < numNodes; _i5++) { + temp[_i5] = 0; + } + + // Multiply matrix with previous result + for (var _i6 = 0; _i6 < numNodes; _i6++) { + for (var _j2 = 0; _j2 < numNodes; _j2++) { + var _n4 = _i6 * numNodes + _j2; + temp[_i6] += matrix[_n4] * eigenvector[_j2]; + } + } + inPlaceSumNormalize(temp); + previous = eigenvector; + eigenvector = temp; + temp = previous; + var diff = 0; + // Compute difference (squared module) of both vectors + for (var _i7 = 0; _i7 < numNodes; _i7++) { + var delta = previous[_i7] - eigenvector[_i7]; + diff += delta * delta; + } + + // If difference is less than the desired threshold, stop iterating + if (diff < precision) { + break; + } + } + + // Construct result + var res = { + rank: function rank(node) { + node = cy.collection(node)[0]; + return eigenvector[nodes.indexOf(node)]; + } + }; + return res; + } // pageRank + }; // elesfn + + var defaults$f = defaults$g({ + root: null, + weight: function weight(edge) { + return 1; + }, + directed: false, + alpha: 0 + }); + var elesfn$n = { + degreeCentralityNormalized: function degreeCentralityNormalized(options) { + options = defaults$f(options); + var cy = this.cy(); + var nodes = this.nodes(); + var numNodes = nodes.length; + if (!options.directed) { + var degrees = {}; + var maxDegree = 0; + for (var i = 0; i < numNodes; i++) { + var node = nodes[i]; + + // add current node to the current options object and call degreeCentrality + options.root = node; + var currDegree = this.degreeCentrality(options); + if (maxDegree < currDegree.degree) { + maxDegree = currDegree.degree; + } + degrees[node.id()] = currDegree.degree; + } + return { + degree: function degree(node) { + if (maxDegree === 0) { + return 0; + } + if (string(node)) { + // from is a selector string + node = cy.filter(node); + } + return degrees[node.id()] / maxDegree; + } + }; + } else { + var indegrees = {}; + var outdegrees = {}; + var maxIndegree = 0; + var maxOutdegree = 0; + for (var _i = 0; _i < numNodes; _i++) { + var _node = nodes[_i]; + var id = _node.id(); + + // add current node to the current options object and call degreeCentrality + options.root = _node; + var _currDegree = this.degreeCentrality(options); + if (maxIndegree < _currDegree.indegree) maxIndegree = _currDegree.indegree; + if (maxOutdegree < _currDegree.outdegree) maxOutdegree = _currDegree.outdegree; + indegrees[id] = _currDegree.indegree; + outdegrees[id] = _currDegree.outdegree; + } + return { + indegree: function indegree(node) { + if (maxIndegree == 0) { + return 0; + } + if (string(node)) { + // from is a selector string + node = cy.filter(node); + } + return indegrees[node.id()] / maxIndegree; + }, + outdegree: function outdegree(node) { + if (maxOutdegree === 0) { + return 0; + } + if (string(node)) { + // from is a selector string + node = cy.filter(node); + } + return outdegrees[node.id()] / maxOutdegree; + } + }; + } + }, + // degreeCentralityNormalized + + // Implemented from the algorithm in Opsahl's paper + // "Node centrality in weighted networks: Generalizing degree and shortest paths" + // check the heading 2 "Degree" + degreeCentrality: function degreeCentrality(options) { + options = defaults$f(options); + var cy = this.cy(); + var callingEles = this; + var _options = options, + root = _options.root, + weight = _options.weight, + directed = _options.directed, + alpha = _options.alpha; + root = cy.collection(root)[0]; + if (!directed) { + var connEdges = root.connectedEdges().intersection(callingEles); + var k = connEdges.length; + var s = 0; + + // Now, sum edge weights + for (var i = 0; i < connEdges.length; i++) { + s += weight(connEdges[i]); + } + return { + degree: Math.pow(k, 1 - alpha) * Math.pow(s, alpha) + }; + } else { + var edges = root.connectedEdges(); + var incoming = edges.filter(function (edge) { + return edge.target().same(root) && callingEles.has(edge); + }); + var outgoing = edges.filter(function (edge) { + return edge.source().same(root) && callingEles.has(edge); + }); + var k_in = incoming.length; + var k_out = outgoing.length; + var s_in = 0; + var s_out = 0; + + // Now, sum incoming edge weights + for (var _i2 = 0; _i2 < incoming.length; _i2++) { + s_in += weight(incoming[_i2]); + } + + // Now, sum outgoing edge weights + for (var _i3 = 0; _i3 < outgoing.length; _i3++) { + s_out += weight(outgoing[_i3]); + } + return { + indegree: Math.pow(k_in, 1 - alpha) * Math.pow(s_in, alpha), + outdegree: Math.pow(k_out, 1 - alpha) * Math.pow(s_out, alpha) + }; + } + } // degreeCentrality + }; // elesfn + + // nice, short mathematical alias + elesfn$n.dc = elesfn$n.degreeCentrality; + elesfn$n.dcn = elesfn$n.degreeCentralityNormalised = elesfn$n.degreeCentralityNormalized; + + var defaults$e = defaults$g({ + harmonic: true, + weight: function weight() { + return 1; + }, + directed: false, + root: null + }); + var elesfn$m = { + closenessCentralityNormalized: function closenessCentralityNormalized(options) { + var _defaults = defaults$e(options), + harmonic = _defaults.harmonic, + weight = _defaults.weight, + directed = _defaults.directed; + var cy = this.cy(); + var closenesses = {}; + var maxCloseness = 0; + var nodes = this.nodes(); + var fw = this.floydWarshall({ + weight: weight, + directed: directed + }); + + // Compute closeness for every node and find the maximum closeness + for (var i = 0; i < nodes.length; i++) { + var currCloseness = 0; + var node_i = nodes[i]; + for (var j = 0; j < nodes.length; j++) { + if (i !== j) { + var d = fw.distance(node_i, nodes[j]); + if (harmonic) { + currCloseness += 1 / d; + } else { + currCloseness += d; + } + } + } + if (!harmonic) { + currCloseness = 1 / currCloseness; + } + if (maxCloseness < currCloseness) { + maxCloseness = currCloseness; + } + closenesses[node_i.id()] = currCloseness; + } + return { + closeness: function closeness(node) { + if (maxCloseness == 0) { + return 0; + } + if (string(node)) { + // from is a selector string + node = cy.filter(node)[0].id(); + } else { + // from is a node + node = node.id(); + } + return closenesses[node] / maxCloseness; + } + }; + }, + // Implemented from pseudocode from wikipedia + closenessCentrality: function closenessCentrality(options) { + var _defaults2 = defaults$e(options), + root = _defaults2.root, + weight = _defaults2.weight, + directed = _defaults2.directed, + harmonic = _defaults2.harmonic; + root = this.filter(root)[0]; + + // we need distance from this node to every other node + var dijkstra = this.dijkstra({ + root: root, + weight: weight, + directed: directed + }); + var totalDistance = 0; + var nodes = this.nodes(); + for (var i = 0; i < nodes.length; i++) { + var n = nodes[i]; + if (!n.same(root)) { + var d = dijkstra.distanceTo(n); + if (harmonic) { + totalDistance += 1 / d; + } else { + totalDistance += d; + } + } + } + return harmonic ? totalDistance : 1 / totalDistance; + } // closenessCentrality + }; // elesfn + + // nice, short mathematical alias + elesfn$m.cc = elesfn$m.closenessCentrality; + elesfn$m.ccn = elesfn$m.closenessCentralityNormalised = elesfn$m.closenessCentralityNormalized; + + var defaults$d = defaults$g({ + weight: null, + directed: false + }); + var elesfn$l = { + // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes + betweennessCentrality: function betweennessCentrality(options) { + var _defaults = defaults$d(options), + directed = _defaults.directed, + weight = _defaults.weight; + var weighted = weight != null; + var cy = this.cy(); + + // starting + var V = this.nodes(); + var A = {}; + var _C = {}; + var max = 0; + var C = { + set: function set(key, val) { + _C[key] = val; + if (val > max) { + max = val; + } + }, + get: function get(key) { + return _C[key]; + } + }; + + // A contains the neighborhoods of every node + for (var i = 0; i < V.length; i++) { + var v = V[i]; + var vid = v.id(); + if (directed) { + A[vid] = v.outgoers().nodes(); // get outgoers of every node + } else { + A[vid] = v.openNeighborhood().nodes(); // get neighbors of every node + } + + C.set(vid, 0); + } + var _loop = function _loop(s) { + var sid = V[s].id(); + var S = []; // stack + var P = {}; + var g = {}; + var d = {}; + var Q = new heap(function (a, b) { + return d[a] - d[b]; + }); // queue + + // init dictionaries + for (var _i = 0; _i < V.length; _i++) { + var _vid = V[_i].id(); + P[_vid] = []; + g[_vid] = 0; + d[_vid] = Infinity; + } + g[sid] = 1; // sigma + d[sid] = 0; // distance to s + + Q.push(sid); + while (!Q.empty()) { + var _v = Q.pop(); + S.push(_v); + if (weighted) { + for (var j = 0; j < A[_v].length; j++) { + var w = A[_v][j]; + var vEle = cy.getElementById(_v); + var edge = void 0; + if (vEle.edgesTo(w).length > 0) { + edge = vEle.edgesTo(w)[0]; + } else { + edge = w.edgesTo(vEle)[0]; + } + var edgeWeight = weight(edge); + w = w.id(); + if (d[w] > d[_v] + edgeWeight) { + d[w] = d[_v] + edgeWeight; + if (Q.nodes.indexOf(w) < 0) { + //if w is not in Q + Q.push(w); + } else { + // update position if w is in Q + Q.updateItem(w); + } + g[w] = 0; + P[w] = []; + } + if (d[w] == d[_v] + edgeWeight) { + g[w] = g[w] + g[_v]; + P[w].push(_v); + } + } + } else { + for (var _j = 0; _j < A[_v].length; _j++) { + var _w = A[_v][_j].id(); + if (d[_w] == Infinity) { + Q.push(_w); + d[_w] = d[_v] + 1; + } + if (d[_w] == d[_v] + 1) { + g[_w] = g[_w] + g[_v]; + P[_w].push(_v); + } + } + } + } + var e = {}; + for (var _i2 = 0; _i2 < V.length; _i2++) { + e[V[_i2].id()] = 0; + } + while (S.length > 0) { + var _w2 = S.pop(); + for (var _j2 = 0; _j2 < P[_w2].length; _j2++) { + var _v2 = P[_w2][_j2]; + e[_v2] = e[_v2] + g[_v2] / g[_w2] * (1 + e[_w2]); + } + if (_w2 != V[s].id()) { + C.set(_w2, C.get(_w2) + e[_w2]); + } + } + }; + for (var s = 0; s < V.length; s++) { + _loop(s); + } + var ret = { + betweenness: function betweenness(node) { + var id = cy.collection(node).id(); + return C.get(id); + }, + betweennessNormalized: function betweennessNormalized(node) { + if (max == 0) { + return 0; + } + var id = cy.collection(node).id(); + return C.get(id) / max; + } + }; + + // alias + ret.betweennessNormalised = ret.betweennessNormalized; + return ret; + } // betweennessCentrality + }; // elesfn + + // nice, short mathematical alias + elesfn$l.bc = elesfn$l.betweennessCentrality; + + // Implemented by Zoe Xi @zoexi for GSOC 2016 + + /* eslint-disable no-unused-vars */ + var defaults$c = defaults$g({ + expandFactor: 2, + // affects time of computation and cluster granularity to some extent: M * M + inflateFactor: 2, + // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j) + multFactor: 1, + // optional self loops for each node. Use a neutral value to improve cluster computations. + maxIterations: 20, + // maximum number of iterations of the MCL algorithm in a single run + attributes: [ + // attributes/features used to group nodes, ie. similarity values between nodes + function (edge) { + return 1; + }] + }); + /* eslint-enable */ + + var setOptions$3 = function setOptions(options) { + return defaults$c(options); + }; + /* eslint-enable */ + + var getSimilarity$1 = function getSimilarity(edge, attributes) { + var total = 0; + for (var i = 0; i < attributes.length; i++) { + total += attributes[i](edge); + } + return total; + }; + var addLoops = function addLoops(M, n, val) { + for (var i = 0; i < n; i++) { + M[i * n + i] = val; + } + }; + var normalize = function normalize(M, n) { + var sum; + for (var col = 0; col < n; col++) { + sum = 0; + for (var row = 0; row < n; row++) { + sum += M[row * n + col]; + } + for (var _row = 0; _row < n; _row++) { + M[_row * n + col] = M[_row * n + col] / sum; + } + } + }; + + // TODO: blocked matrix multiplication? + var mmult = function mmult(A, B, n) { + var C = new Array(n * n); + for (var i = 0; i < n; i++) { + for (var j = 0; j < n; j++) { + C[i * n + j] = 0; + } + for (var k = 0; k < n; k++) { + for (var _j = 0; _j < n; _j++) { + C[i * n + _j] += A[i * n + k] * B[k * n + _j]; + } + } + } + return C; + }; + var expand = function expand(M, n, expandFactor /** power **/) { + var _M = M.slice(0); + for (var p = 1; p < expandFactor; p++) { + M = mmult(M, _M, n); + } + return M; + }; + var inflate = function inflate(M, n, inflateFactor /** r **/) { + var _M = new Array(n * n); + + // M(i,j) ^ inflatePower + for (var i = 0; i < n * n; i++) { + _M[i] = Math.pow(M[i], inflateFactor); + } + normalize(_M, n); + return _M; + }; + var hasConverged = function hasConverged(M, _M, n2, roundFactor) { + // Check that both matrices have the same elements (i,j) + for (var i = 0; i < n2; i++) { + var v1 = Math.round(M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); // truncate to 'roundFactor' decimal places + var v2 = Math.round(_M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); + if (v1 !== v2) { + return false; + } + } + return true; + }; + var assign$2 = function assign(M, n, nodes, cy) { + var clusters = []; + for (var i = 0; i < n; i++) { + var cluster = []; + for (var j = 0; j < n; j++) { + // Row-wise attractors and elements that they attract belong in same cluster + if (Math.round(M[i * n + j] * 1000) / 1000 > 0) { + cluster.push(nodes[j]); + } + } + if (cluster.length !== 0) { + clusters.push(cy.collection(cluster)); + } + } + return clusters; + }; + var isDuplicate = function isDuplicate(c1, c2) { + for (var i = 0; i < c1.length; i++) { + if (!c2[i] || c1[i].id() !== c2[i].id()) { + return false; + } + } + return true; + }; + var removeDuplicates = function removeDuplicates(clusters) { + for (var i = 0; i < clusters.length; i++) { + for (var j = 0; j < clusters.length; j++) { + if (i != j && isDuplicate(clusters[i], clusters[j])) { + clusters.splice(j, 1); + } + } + } + return clusters; + }; + var markovClustering = function markovClustering(options) { + var nodes = this.nodes(); + var edges = this.edges(); + var cy = this.cy(); + + // Set parameters of algorithm: + var opts = setOptions$3(options); + + // Map each node to its position in node array + var id2position = {}; + for (var i = 0; i < nodes.length; i++) { + id2position[nodes[i].id()] = i; + } + + // Generate stochastic matrix M from input graph G (should be symmetric/undirected) + var n = nodes.length, + n2 = n * n; + var M = new Array(n2), + _M; + for (var _i = 0; _i < n2; _i++) { + M[_i] = 0; + } + for (var e = 0; e < edges.length; e++) { + var edge = edges[e]; + var _i2 = id2position[edge.source().id()]; + var j = id2position[edge.target().id()]; + var sim = getSimilarity$1(edge, opts.attributes); + M[_i2 * n + j] += sim; // G should be symmetric and undirected + M[j * n + _i2] += sim; + } + + // Begin Markov cluster algorithm + + // Step 1: Add self loops to each node, ie. add multFactor to matrix diagonal + addLoops(M, n, opts.multFactor); + + // Step 2: M = normalize( M ); + normalize(M, n); + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + isStillMoving = false; + + // Step 3: + _M = expand(M, n, opts.expandFactor); + + // Step 4: + M = inflate(_M, n, opts.inflateFactor); + + // Step 5: check to see if ~steady state has been reached + if (!hasConverged(M, _M, n2, 4)) { + isStillMoving = true; + } + iterations++; + } + + // Build clusters from matrix + var clusters = assign$2(M, n, nodes, cy); + + // Remove duplicate clusters due to symmetry of graph and M matrix + clusters = removeDuplicates(clusters); + return clusters; + }; + var markovClustering$1 = { + markovClustering: markovClustering, + mcl: markovClustering + }; + + // Common distance metrics for clustering algorithms + var identity = function identity(x) { + return x; + }; + var absDiff = function absDiff(p, q) { + return Math.abs(q - p); + }; + var addAbsDiff = function addAbsDiff(total, p, q) { + return total + absDiff(p, q); + }; + var addSquaredDiff = function addSquaredDiff(total, p, q) { + return total + Math.pow(q - p, 2); + }; + var sqrt = function sqrt(x) { + return Math.sqrt(x); + }; + var maxAbsDiff = function maxAbsDiff(currentMax, p, q) { + return Math.max(currentMax, absDiff(p, q)); + }; + var getDistance = function getDistance(length, getP, getQ, init, visit) { + var post = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : identity; + var ret = init; + var p, q; + for (var dim = 0; dim < length; dim++) { + p = getP(dim); + q = getQ(dim); + ret = visit(ret, p, q); + } + return post(ret); + }; + var distances = { + euclidean: function euclidean(length, getP, getQ) { + if (length >= 2) { + return getDistance(length, getP, getQ, 0, addSquaredDiff, sqrt); + } else { + // for single attr case, more efficient to avoid sqrt + return getDistance(length, getP, getQ, 0, addAbsDiff); + } + }, + squaredEuclidean: function squaredEuclidean(length, getP, getQ) { + return getDistance(length, getP, getQ, 0, addSquaredDiff); + }, + manhattan: function manhattan(length, getP, getQ) { + return getDistance(length, getP, getQ, 0, addAbsDiff); + }, + max: function max(length, getP, getQ) { + return getDistance(length, getP, getQ, -Infinity, maxAbsDiff); + } + }; + + // in case the user accidentally doesn't use camel case + distances['squared-euclidean'] = distances['squaredEuclidean']; + distances['squaredeuclidean'] = distances['squaredEuclidean']; + function clusteringDistance (method, length, getP, getQ, nodeP, nodeQ) { + var impl; + if (fn$6(method)) { + impl = method; + } else { + impl = distances[method] || distances.euclidean; + } + if (length === 0 && fn$6(method)) { + return impl(nodeP, nodeQ); + } else { + return impl(length, getP, getQ, nodeP, nodeQ); + } + } + + var defaults$b = defaults$g({ + k: 2, + m: 2, + sensitivityThreshold: 0.0001, + distance: 'euclidean', + maxIterations: 10, + attributes: [], + testMode: false, + testCentroids: null + }); + var setOptions$2 = function setOptions(options) { + return defaults$b(options); + }; + + var getDist = function getDist(type, node, centroid, attributes, mode) { + var noNodeP = mode !== 'kMedoids'; + var getP = noNodeP ? function (i) { + return centroid[i]; + } : function (i) { + return attributes[i](centroid); + }; + var getQ = function getQ(i) { + return attributes[i](node); + }; + var nodeP = centroid; + var nodeQ = node; + return clusteringDistance(type, attributes.length, getP, getQ, nodeP, nodeQ); + }; + var randomCentroids = function randomCentroids(nodes, k, attributes) { + var ndim = attributes.length; + var min = new Array(ndim); + var max = new Array(ndim); + var centroids = new Array(k); + var centroid = null; + + // Find min, max values for each attribute dimension + for (var i = 0; i < ndim; i++) { + min[i] = nodes.min(attributes[i]).value; + max[i] = nodes.max(attributes[i]).value; + } + + // Build k centroids, each represented as an n-dim feature vector + for (var c = 0; c < k; c++) { + centroid = []; + for (var _i = 0; _i < ndim; _i++) { + centroid[_i] = Math.random() * (max[_i] - min[_i]) + min[_i]; // random initial value + } + + centroids[c] = centroid; + } + return centroids; + }; + var classify = function classify(node, centroids, distance, attributes, type) { + var min = Infinity; + var index = 0; + for (var i = 0; i < centroids.length; i++) { + var dist = getDist(distance, node, centroids[i], attributes, type); + if (dist < min) { + min = dist; + index = i; + } + } + return index; + }; + var buildCluster = function buildCluster(centroid, nodes, assignment) { + var cluster = []; + var node = null; + for (var n = 0; n < nodes.length; n++) { + node = nodes[n]; + if (assignment[node.id()] === centroid) { + //console.log("Node " + node.id() + " is associated with medoid #: " + m); + cluster.push(node); + } + } + return cluster; + }; + var haveValuesConverged = function haveValuesConverged(v1, v2, sensitivityThreshold) { + return Math.abs(v2 - v1) <= sensitivityThreshold; + }; + var haveMatricesConverged = function haveMatricesConverged(v1, v2, sensitivityThreshold) { + for (var i = 0; i < v1.length; i++) { + for (var j = 0; j < v1[i].length; j++) { + var diff = Math.abs(v1[i][j] - v2[i][j]); + if (diff > sensitivityThreshold) { + return false; + } + } + } + return true; + }; + var seenBefore = function seenBefore(node, medoids, n) { + for (var i = 0; i < n; i++) { + if (node === medoids[i]) return true; + } + return false; + }; + var randomMedoids = function randomMedoids(nodes, k) { + var medoids = new Array(k); + + // For small data sets, the probability of medoid conflict is greater, + // so we need to check to see if we've already seen or chose this node before. + if (nodes.length < 50) { + // Randomly select k medoids from the n nodes + for (var i = 0; i < k; i++) { + var node = nodes[Math.floor(Math.random() * nodes.length)]; + + // If we've already chosen this node to be a medoid, don't choose it again (for small data sets). + // Instead choose a different random node. + while (seenBefore(node, medoids, i)) { + node = nodes[Math.floor(Math.random() * nodes.length)]; + } + medoids[i] = node; + } + } else { + // Relatively large data set, so pretty safe to not check and just select random nodes + for (var _i2 = 0; _i2 < k; _i2++) { + medoids[_i2] = nodes[Math.floor(Math.random() * nodes.length)]; + } + } + return medoids; + }; + var findCost = function findCost(potentialNewMedoid, cluster, attributes) { + var cost = 0; + for (var n = 0; n < cluster.length; n++) { + cost += getDist('manhattan', cluster[n], potentialNewMedoid, attributes, 'kMedoids'); + } + return cost; + }; + var kMeans = function kMeans(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var node = null; + + // Set parameters of algorithm: # of clusters, distance metric, etc. + var opts = setOptions$2(options); + + // Begin k-means algorithm + var clusters = new Array(opts.k); + var assignment = {}; + var centroids; + + // Step 1: Initialize centroid positions + if (opts.testMode) { + if (typeof opts.testCentroids === 'number') { + // TODO: implement a seeded random number generator. + opts.testCentroids; + centroids = randomCentroids(nodes, opts.k, opts.attributes); + } else if (_typeof(opts.testCentroids) === 'object') { + centroids = opts.testCentroids; + } else { + centroids = randomCentroids(nodes, opts.k, opts.attributes); + } + } else { + centroids = randomCentroids(nodes, opts.k, opts.attributes); + } + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + // Step 2: Assign nodes to the nearest centroid + for (var n = 0; n < nodes.length; n++) { + node = nodes[n]; + // Determine which cluster this node belongs to: node id => cluster # + assignment[node.id()] = classify(node, centroids, opts.distance, opts.attributes, 'kMeans'); + } + + // Step 3: For each of the k clusters, update its centroid + isStillMoving = false; + for (var c = 0; c < opts.k; c++) { + // Get all nodes that belong to this cluster + var cluster = buildCluster(c, nodes, assignment); + if (cluster.length === 0) { + // If cluster is empty, break out early & move to next cluster + continue; + } + + // Update centroids by calculating avg of all nodes within the cluster. + var ndim = opts.attributes.length; + var centroid = centroids[c]; // [ dim_1, dim_2, dim_3, ... , dim_n ] + var newCentroid = new Array(ndim); + var sum = new Array(ndim); + for (var d = 0; d < ndim; d++) { + sum[d] = 0.0; + for (var i = 0; i < cluster.length; i++) { + node = cluster[i]; + sum[d] += opts.attributes[d](node); + } + newCentroid[d] = sum[d] / cluster.length; + + // Check to see if algorithm has converged, i.e. when centroids no longer change + if (!haveValuesConverged(newCentroid[d], centroid[d], opts.sensitivityThreshold)) { + isStillMoving = true; + } + } + centroids[c] = newCentroid; + clusters[c] = cy.collection(cluster); + } + iterations++; + } + return clusters; + }; + var kMedoids = function kMedoids(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var node = null; + var opts = setOptions$2(options); + + // Begin k-medoids algorithm + var clusters = new Array(opts.k); + var medoids; + var assignment = {}; + var curCost; + var minCosts = new Array(opts.k); // minimum cost configuration for each cluster + + // Step 1: Initialize k medoids + if (opts.testMode) { + if (typeof opts.testCentroids === 'number') ; else if (_typeof(opts.testCentroids) === 'object') { + medoids = opts.testCentroids; + } else { + medoids = randomMedoids(nodes, opts.k); + } + } else { + medoids = randomMedoids(nodes, opts.k); + } + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + // Step 2: Assign nodes to the nearest medoid + for (var n = 0; n < nodes.length; n++) { + node = nodes[n]; + // Determine which cluster this node belongs to: node id => cluster # + assignment[node.id()] = classify(node, medoids, opts.distance, opts.attributes, 'kMedoids'); + } + isStillMoving = false; + // Step 3: For each medoid m, and for each node associated with mediod m, + // select the node with the lowest configuration cost as new medoid. + for (var m = 0; m < medoids.length; m++) { + // Get all nodes that belong to this medoid + var cluster = buildCluster(m, nodes, assignment); + if (cluster.length === 0) { + // If cluster is empty, break out early & move to next cluster + continue; + } + minCosts[m] = findCost(medoids[m], cluster, opts.attributes); // original cost + + // Select different medoid if its configuration has the lowest cost + for (var _n = 0; _n < cluster.length; _n++) { + curCost = findCost(cluster[_n], cluster, opts.attributes); + if (curCost < minCosts[m]) { + minCosts[m] = curCost; + medoids[m] = cluster[_n]; + isStillMoving = true; + } + } + clusters[m] = cy.collection(cluster); + } + iterations++; + } + return clusters; + }; + var updateCentroids = function updateCentroids(centroids, nodes, U, weight, opts) { + var numerator, denominator; + for (var n = 0; n < nodes.length; n++) { + for (var c = 0; c < centroids.length; c++) { + weight[n][c] = Math.pow(U[n][c], opts.m); + } + } + for (var _c = 0; _c < centroids.length; _c++) { + for (var dim = 0; dim < opts.attributes.length; dim++) { + numerator = 0; + denominator = 0; + for (var _n2 = 0; _n2 < nodes.length; _n2++) { + numerator += weight[_n2][_c] * opts.attributes[dim](nodes[_n2]); + denominator += weight[_n2][_c]; + } + centroids[_c][dim] = numerator / denominator; + } + } + }; + var updateMembership = function updateMembership(U, _U, centroids, nodes, opts) { + // Save previous step + for (var i = 0; i < U.length; i++) { + _U[i] = U[i].slice(); + } + var sum, numerator, denominator; + var pow = 2 / (opts.m - 1); + for (var c = 0; c < centroids.length; c++) { + for (var n = 0; n < nodes.length; n++) { + sum = 0; + for (var k = 0; k < centroids.length; k++) { + // against all other centroids + numerator = getDist(opts.distance, nodes[n], centroids[c], opts.attributes, 'cmeans'); + denominator = getDist(opts.distance, nodes[n], centroids[k], opts.attributes, 'cmeans'); + sum += Math.pow(numerator / denominator, pow); + } + U[n][c] = 1 / sum; + } + } + }; + var assign$1 = function assign(nodes, U, opts, cy) { + var clusters = new Array(opts.k); + for (var c = 0; c < clusters.length; c++) { + clusters[c] = []; + } + var max; + var index; + for (var n = 0; n < U.length; n++) { + // for each node (U is N x C matrix) + max = -Infinity; + index = -1; + // Determine which cluster the node is most likely to belong in + for (var _c2 = 0; _c2 < U[0].length; _c2++) { + if (U[n][_c2] > max) { + max = U[n][_c2]; + index = _c2; + } + } + clusters[index].push(nodes[n]); + } + + // Turn every array into a collection of nodes + for (var _c3 = 0; _c3 < clusters.length; _c3++) { + clusters[_c3] = cy.collection(clusters[_c3]); + } + return clusters; + }; + var fuzzyCMeans = function fuzzyCMeans(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var opts = setOptions$2(options); + + // Begin fuzzy c-means algorithm + var clusters; + var centroids; + var U; + var _U; + var weight; + + // Step 1: Initialize letiables. + _U = new Array(nodes.length); + for (var i = 0; i < nodes.length; i++) { + // N x C matrix + _U[i] = new Array(opts.k); + } + U = new Array(nodes.length); + for (var _i3 = 0; _i3 < nodes.length; _i3++) { + // N x C matrix + U[_i3] = new Array(opts.k); + } + for (var _i4 = 0; _i4 < nodes.length; _i4++) { + var total = 0; + for (var j = 0; j < opts.k; j++) { + U[_i4][j] = Math.random(); + total += U[_i4][j]; + } + for (var _j = 0; _j < opts.k; _j++) { + U[_i4][_j] = U[_i4][_j] / total; + } + } + centroids = new Array(opts.k); + for (var _i5 = 0; _i5 < opts.k; _i5++) { + centroids[_i5] = new Array(opts.attributes.length); + } + weight = new Array(nodes.length); + for (var _i6 = 0; _i6 < nodes.length; _i6++) { + // N x C matrix + weight[_i6] = new Array(opts.k); + } + // end init FCM + + var isStillMoving = true; + var iterations = 0; + while (isStillMoving && iterations < opts.maxIterations) { + isStillMoving = false; + + // Step 2: Calculate the centroids for each step. + updateCentroids(centroids, nodes, U, weight, opts); + + // Step 3: Update the partition matrix U. + updateMembership(U, _U, centroids, nodes, opts); + + // Step 4: Check for convergence. + if (!haveMatricesConverged(U, _U, opts.sensitivityThreshold)) { + isStillMoving = true; + } + iterations++; + } + + // Assign nodes to clusters with highest probability. + clusters = assign$1(nodes, U, opts, cy); + return { + clusters: clusters, + degreeOfMembership: U + }; + }; + var kClustering = { + kMeans: kMeans, + kMedoids: kMedoids, + fuzzyCMeans: fuzzyCMeans, + fcm: fuzzyCMeans + }; + + // Implemented by Zoe Xi @zoexi for GSOC 2016 + var defaults$a = defaults$g({ + distance: 'euclidean', + // distance metric to compare nodes + linkage: 'min', + // linkage criterion : how to determine the distance between clusters of nodes + mode: 'threshold', + // mode:'threshold' => clusters must be threshold distance apart + threshold: Infinity, + // the distance threshold + // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters + addDendrogram: false, + // whether to add the dendrogram to the graph for viz + dendrogramDepth: 0, + // depth at which dendrogram branches are merged into the returned clusters + attributes: [] // array of attr functions + }); + + var linkageAliases = { + 'single': 'min', + 'complete': 'max' + }; + var setOptions$1 = function setOptions(options) { + var opts = defaults$a(options); + var preferredAlias = linkageAliases[opts.linkage]; + if (preferredAlias != null) { + opts.linkage = preferredAlias; + } + return opts; + }; + var mergeClosest = function mergeClosest(clusters, index, dists, mins, opts) { + // Find two closest clusters from cached mins + var minKey = 0; + var min = Infinity; + var dist; + var attrs = opts.attributes; + var getDist = function getDist(n1, n2) { + return clusteringDistance(opts.distance, attrs.length, function (i) { + return attrs[i](n1); + }, function (i) { + return attrs[i](n2); + }, n1, n2); + }; + for (var i = 0; i < clusters.length; i++) { + var key = clusters[i].key; + var _dist = dists[key][mins[key]]; + if (_dist < min) { + minKey = key; + min = _dist; + } + } + if (opts.mode === 'threshold' && min >= opts.threshold || opts.mode === 'dendrogram' && clusters.length === 1) { + return false; + } + var c1 = index[minKey]; + var c2 = index[mins[minKey]]; + var merged; + + // Merge two closest clusters + if (opts.mode === 'dendrogram') { + merged = { + left: c1, + right: c2, + key: c1.key + }; + } else { + merged = { + value: c1.value.concat(c2.value), + key: c1.key + }; + } + clusters[c1.index] = merged; + clusters.splice(c2.index, 1); + index[c1.key] = merged; + + // Update distances with new merged cluster + for (var _i = 0; _i < clusters.length; _i++) { + var cur = clusters[_i]; + if (c1.key === cur.key) { + dist = Infinity; + } else if (opts.linkage === 'min') { + dist = dists[c1.key][cur.key]; + if (dists[c1.key][cur.key] > dists[c2.key][cur.key]) { + dist = dists[c2.key][cur.key]; + } + } else if (opts.linkage === 'max') { + dist = dists[c1.key][cur.key]; + if (dists[c1.key][cur.key] < dists[c2.key][cur.key]) { + dist = dists[c2.key][cur.key]; + } + } else if (opts.linkage === 'mean') { + dist = (dists[c1.key][cur.key] * c1.size + dists[c2.key][cur.key] * c2.size) / (c1.size + c2.size); + } else { + if (opts.mode === 'dendrogram') dist = getDist(cur.value, c1.value);else dist = getDist(cur.value[0], c1.value[0]); + } + dists[c1.key][cur.key] = dists[cur.key][c1.key] = dist; // distance matrix is symmetric + } + + // Update cached mins + for (var _i2 = 0; _i2 < clusters.length; _i2++) { + var key1 = clusters[_i2].key; + if (mins[key1] === c1.key || mins[key1] === c2.key) { + var _min = key1; + for (var j = 0; j < clusters.length; j++) { + var key2 = clusters[j].key; + if (dists[key1][key2] < dists[key1][_min]) { + _min = key2; + } + } + mins[key1] = _min; + } + clusters[_i2].index = _i2; + } + + // Clean up meta data used for clustering + c1.key = c2.key = c1.index = c2.index = null; + return true; + }; + var getAllChildren = function getAllChildren(root, arr, cy) { + if (!root) return; + if (root.value) { + arr.push(root.value); + } else { + if (root.left) getAllChildren(root.left, arr); + if (root.right) getAllChildren(root.right, arr); + } + }; + var buildDendrogram = function buildDendrogram(root, cy) { + if (!root) return ''; + if (root.left && root.right) { + var leftStr = buildDendrogram(root.left, cy); + var rightStr = buildDendrogram(root.right, cy); + var node = cy.add({ + group: 'nodes', + data: { + id: leftStr + ',' + rightStr + } + }); + cy.add({ + group: 'edges', + data: { + source: leftStr, + target: node.id() + } + }); + cy.add({ + group: 'edges', + data: { + source: rightStr, + target: node.id() + } + }); + return node.id(); + } else if (root.value) { + return root.value.id(); + } + }; + var buildClustersFromTree = function buildClustersFromTree(root, k, cy) { + if (!root) return []; + var left = [], + right = [], + leaves = []; + if (k === 0) { + // don't cut tree, simply return all nodes as 1 single cluster + if (root.left) getAllChildren(root.left, left); + if (root.right) getAllChildren(root.right, right); + leaves = left.concat(right); + return [cy.collection(leaves)]; + } else if (k === 1) { + // cut at root + + if (root.value) { + // leaf node + return [cy.collection(root.value)]; + } else { + if (root.left) getAllChildren(root.left, left); + if (root.right) getAllChildren(root.right, right); + return [cy.collection(left), cy.collection(right)]; + } + } else { + if (root.value) { + return [cy.collection(root.value)]; + } else { + if (root.left) left = buildClustersFromTree(root.left, k - 1, cy); + if (root.right) right = buildClustersFromTree(root.right, k - 1, cy); + return left.concat(right); + } + } + }; + + var hierarchicalClustering = function hierarchicalClustering(options) { + var cy = this.cy(); + var nodes = this.nodes(); + + // Set parameters of algorithm: linkage type, distance metric, etc. + var opts = setOptions$1(options); + var attrs = opts.attributes; + var getDist = function getDist(n1, n2) { + return clusteringDistance(opts.distance, attrs.length, function (i) { + return attrs[i](n1); + }, function (i) { + return attrs[i](n2); + }, n1, n2); + }; + + // Begin hierarchical algorithm + var clusters = []; + var dists = []; // distances between each pair of clusters + var mins = []; // closest cluster for each cluster + var index = []; // hash of all clusters by key + + // In agglomerative (bottom-up) clustering, each node starts as its own cluster + for (var n = 0; n < nodes.length; n++) { + var cluster = { + value: opts.mode === 'dendrogram' ? nodes[n] : [nodes[n]], + key: n, + index: n + }; + clusters[n] = cluster; + index[n] = cluster; + dists[n] = []; + mins[n] = 0; + } + + // Calculate the distance between each pair of clusters + for (var i = 0; i < clusters.length; i++) { + for (var j = 0; j <= i; j++) { + var dist = void 0; + if (opts.mode === 'dendrogram') { + // modes store cluster values differently + dist = i === j ? Infinity : getDist(clusters[i].value, clusters[j].value); + } else { + dist = i === j ? Infinity : getDist(clusters[i].value[0], clusters[j].value[0]); + } + dists[i][j] = dist; + dists[j][i] = dist; + if (dist < dists[i][mins[i]]) { + mins[i] = j; // Cache mins: closest cluster to cluster i is cluster j + } + } + } + + // Find the closest pair of clusters and merge them into a single cluster. + // Update distances between new cluster and each of the old clusters, and loop until threshold reached. + var merged = mergeClosest(clusters, index, dists, mins, opts); + while (merged) { + merged = mergeClosest(clusters, index, dists, mins, opts); + } + var retClusters; + + // Dendrogram mode builds the hierarchy and adds intermediary nodes + edges + // in addition to returning the clusters. + if (opts.mode === 'dendrogram') { + retClusters = buildClustersFromTree(clusters[0], opts.dendrogramDepth, cy); + if (opts.addDendrogram) buildDendrogram(clusters[0], cy); + } else { + // Regular mode simply returns the clusters + + retClusters = new Array(clusters.length); + clusters.forEach(function (cluster, i) { + // Clean up meta data used for clustering + cluster.key = cluster.index = null; + retClusters[i] = cy.collection(cluster.value); + }); + } + return retClusters; + }; + var hierarchicalClustering$1 = { + hierarchicalClustering: hierarchicalClustering, + hca: hierarchicalClustering + }; + + // Implemented by Zoe Xi @zoexi for GSOC 2016 + var defaults$9 = defaults$g({ + distance: 'euclidean', + // distance metric to compare attributes between two nodes + preference: 'median', + // suitability of a data point to serve as an exemplar + damping: 0.8, + // damping factor between [0.5, 1) + maxIterations: 1000, + // max number of iterations to run + minIterations: 100, + // min number of iterations to run in order for clustering to stop + attributes: [// functions to quantify the similarity between any two points + // e.g. node => node.data('weight') + ] + }); + var setOptions = function setOptions(options) { + var dmp = options.damping; + var pref = options.preference; + if (!(0.5 <= dmp && dmp < 1)) { + error("Damping must range on [0.5, 1). Got: ".concat(dmp)); + } + var validPrefs = ['median', 'mean', 'min', 'max']; + if (!(validPrefs.some(function (v) { + return v === pref; + }) || number$1(pref))) { + error("Preference must be one of [".concat(validPrefs.map(function (p) { + return "'".concat(p, "'"); + }).join(', '), "] or a number. Got: ").concat(pref)); + } + return defaults$9(options); + }; + + var getSimilarity = function getSimilarity(type, n1, n2, attributes) { + var attr = function attr(n, i) { + return attributes[i](n); + }; + + // nb negative because similarity should have an inverse relationship to distance + return -clusteringDistance(type, attributes.length, function (i) { + return attr(n1, i); + }, function (i) { + return attr(n2, i); + }, n1, n2); + }; + var getPreference = function getPreference(S, preference) { + // larger preference = greater # of clusters + var p = null; + if (preference === 'median') { + p = median(S); + } else if (preference === 'mean') { + p = mean(S); + } else if (preference === 'min') { + p = min(S); + } else if (preference === 'max') { + p = max(S); + } else { + // Custom preference number, as set by user + p = preference; + } + return p; + }; + var findExemplars = function findExemplars(n, R, A) { + var indices = []; + for (var i = 0; i < n; i++) { + if (R[i * n + i] + A[i * n + i] > 0) { + indices.push(i); + } + } + return indices; + }; + var assignClusters = function assignClusters(n, S, exemplars) { + var clusters = []; + for (var i = 0; i < n; i++) { + var index = -1; + var max = -Infinity; + for (var ei = 0; ei < exemplars.length; ei++) { + var e = exemplars[ei]; + if (S[i * n + e] > max) { + index = e; + max = S[i * n + e]; + } + } + if (index > 0) { + clusters.push(index); + } + } + for (var _ei = 0; _ei < exemplars.length; _ei++) { + clusters[exemplars[_ei]] = exemplars[_ei]; + } + return clusters; + }; + var assign = function assign(n, S, exemplars) { + var clusters = assignClusters(n, S, exemplars); + for (var ei = 0; ei < exemplars.length; ei++) { + var ii = []; + for (var c = 0; c < clusters.length; c++) { + if (clusters[c] === exemplars[ei]) { + ii.push(c); + } + } + var maxI = -1; + var maxSum = -Infinity; + for (var i = 0; i < ii.length; i++) { + var sum = 0; + for (var j = 0; j < ii.length; j++) { + sum += S[ii[j] * n + ii[i]]; + } + if (sum > maxSum) { + maxI = i; + maxSum = sum; + } + } + exemplars[ei] = ii[maxI]; + } + clusters = assignClusters(n, S, exemplars); + return clusters; + }; + var affinityPropagation = function affinityPropagation(options) { + var cy = this.cy(); + var nodes = this.nodes(); + var opts = setOptions(options); + + // Map each node to its position in node array + var id2position = {}; + for (var i = 0; i < nodes.length; i++) { + id2position[nodes[i].id()] = i; + } + + // Begin affinity propagation algorithm + + var n; // number of data points + var n2; // size of matrices + var S; // similarity matrix (1D array) + var p; // preference/suitability of a data point to serve as an exemplar + var R; // responsibility matrix (1D array) + var A; // availability matrix (1D array) + + n = nodes.length; + n2 = n * n; + + // Initialize and build S similarity matrix + S = new Array(n2); + for (var _i = 0; _i < n2; _i++) { + S[_i] = -Infinity; // for cases where two data points shouldn't be linked together + } + + for (var _i2 = 0; _i2 < n; _i2++) { + for (var j = 0; j < n; j++) { + if (_i2 !== j) { + S[_i2 * n + j] = getSimilarity(opts.distance, nodes[_i2], nodes[j], opts.attributes); + } + } + } + + // Place preferences on the diagonal of S + p = getPreference(S, opts.preference); + for (var _i3 = 0; _i3 < n; _i3++) { + S[_i3 * n + _i3] = p; + } + + // Initialize R responsibility matrix + R = new Array(n2); + for (var _i4 = 0; _i4 < n2; _i4++) { + R[_i4] = 0.0; + } + + // Initialize A availability matrix + A = new Array(n2); + for (var _i5 = 0; _i5 < n2; _i5++) { + A[_i5] = 0.0; + } + var old = new Array(n); + var Rp = new Array(n); + var se = new Array(n); + for (var _i6 = 0; _i6 < n; _i6++) { + old[_i6] = 0.0; + Rp[_i6] = 0.0; + se[_i6] = 0; + } + var e = new Array(n * opts.minIterations); + for (var _i7 = 0; _i7 < e.length; _i7++) { + e[_i7] = 0; + } + var iter; + for (iter = 0; iter < opts.maxIterations; iter++) { + // main algorithmic loop + + // Update R responsibility matrix + for (var _i8 = 0; _i8 < n; _i8++) { + var max = -Infinity, + max2 = -Infinity, + maxI = -1, + AS = 0.0; + for (var _j = 0; _j < n; _j++) { + old[_j] = R[_i8 * n + _j]; + AS = A[_i8 * n + _j] + S[_i8 * n + _j]; + if (AS >= max) { + max2 = max; + max = AS; + maxI = _j; + } else if (AS > max2) { + max2 = AS; + } + } + for (var _j2 = 0; _j2 < n; _j2++) { + R[_i8 * n + _j2] = (1 - opts.damping) * (S[_i8 * n + _j2] - max) + opts.damping * old[_j2]; + } + R[_i8 * n + maxI] = (1 - opts.damping) * (S[_i8 * n + maxI] - max2) + opts.damping * old[maxI]; + } + + // Update A availability matrix + for (var _i9 = 0; _i9 < n; _i9++) { + var sum = 0; + for (var _j3 = 0; _j3 < n; _j3++) { + old[_j3] = A[_j3 * n + _i9]; + Rp[_j3] = Math.max(0, R[_j3 * n + _i9]); + sum += Rp[_j3]; + } + sum -= Rp[_i9]; + Rp[_i9] = R[_i9 * n + _i9]; + sum += Rp[_i9]; + for (var _j4 = 0; _j4 < n; _j4++) { + A[_j4 * n + _i9] = (1 - opts.damping) * Math.min(0, sum - Rp[_j4]) + opts.damping * old[_j4]; + } + A[_i9 * n + _i9] = (1 - opts.damping) * (sum - Rp[_i9]) + opts.damping * old[_i9]; + } + + // Check for convergence + var K = 0; + for (var _i10 = 0; _i10 < n; _i10++) { + var E = A[_i10 * n + _i10] + R[_i10 * n + _i10] > 0 ? 1 : 0; + e[iter % opts.minIterations * n + _i10] = E; + K += E; + } + if (K > 0 && (iter >= opts.minIterations - 1 || iter == opts.maxIterations - 1)) { + var _sum = 0; + for (var _i11 = 0; _i11 < n; _i11++) { + se[_i11] = 0; + for (var _j5 = 0; _j5 < opts.minIterations; _j5++) { + se[_i11] += e[_j5 * n + _i11]; + } + if (se[_i11] === 0 || se[_i11] === opts.minIterations) { + _sum++; + } + } + if (_sum === n) { + // then we have convergence + break; + } + } + } + + // Identify exemplars (cluster centers) + var exemplarsIndices = findExemplars(n, R, A); + + // Assign nodes to clusters + var clusterIndices = assign(n, S, exemplarsIndices); + var clusters = {}; + for (var c = 0; c < exemplarsIndices.length; c++) { + clusters[exemplarsIndices[c]] = []; + } + for (var _i12 = 0; _i12 < nodes.length; _i12++) { + var pos = id2position[nodes[_i12].id()]; + var clusterIndex = clusterIndices[pos]; + if (clusterIndex != null) { + // the node may have not been assigned a cluster if no valid attributes were specified + clusters[clusterIndex].push(nodes[_i12]); + } + } + var retClusters = new Array(exemplarsIndices.length); + for (var _c = 0; _c < exemplarsIndices.length; _c++) { + retClusters[_c] = cy.collection(clusters[exemplarsIndices[_c]]); + } + return retClusters; + }; + var affinityPropagation$1 = { + affinityPropagation: affinityPropagation, + ap: affinityPropagation + }; + + var hierholzerDefaults = defaults$g({ + root: undefined, + directed: false + }); + var elesfn$k = { + hierholzer: function hierholzer(options) { + if (!plainObject(options)) { + var args = arguments; + options = { + root: args[0], + directed: args[1] + }; + } + var _hierholzerDefaults = hierholzerDefaults(options), + root = _hierholzerDefaults.root, + directed = _hierholzerDefaults.directed; + var eles = this; + var dflag = false; + var oddIn; + var oddOut; + var startVertex; + if (root) startVertex = string(root) ? this.filter(root)[0].id() : root[0].id(); + var nodes = {}; + var edges = {}; + if (directed) { + eles.forEach(function (ele) { + var id = ele.id(); + if (ele.isNode()) { + var ind = ele.indegree(true); + var outd = ele.outdegree(true); + var d1 = ind - outd; + var d2 = outd - ind; + if (d1 == 1) { + if (oddIn) dflag = true;else oddIn = id; + } else if (d2 == 1) { + if (oddOut) dflag = true;else oddOut = id; + } else if (d2 > 1 || d1 > 1) { + dflag = true; + } + nodes[id] = []; + ele.outgoers().forEach(function (e) { + if (e.isEdge()) nodes[id].push(e.id()); + }); + } else { + edges[id] = [undefined, ele.target().id()]; + } + }); + } else { + eles.forEach(function (ele) { + var id = ele.id(); + if (ele.isNode()) { + var d = ele.degree(true); + if (d % 2) { + if (!oddIn) oddIn = id;else if (!oddOut) oddOut = id;else dflag = true; + } + nodes[id] = []; + ele.connectedEdges().forEach(function (e) { + return nodes[id].push(e.id()); + }); + } else { + edges[id] = [ele.source().id(), ele.target().id()]; + } + }); + } + var result = { + found: false, + trail: undefined + }; + if (dflag) return result;else if (oddOut && oddIn) { + if (directed) { + if (startVertex && oddOut != startVertex) { + return result; + } + startVertex = oddOut; + } else { + if (startVertex && oddOut != startVertex && oddIn != startVertex) { + return result; + } else if (!startVertex) { + startVertex = oddOut; + } + } + } else { + if (!startVertex) startVertex = eles[0].id(); + } + var walk = function walk(v) { + var currentNode = v; + var subtour = [v]; + var adj, adjTail, adjHead; + while (nodes[currentNode].length) { + adj = nodes[currentNode].shift(); + adjTail = edges[adj][0]; + adjHead = edges[adj][1]; + if (currentNode != adjHead) { + nodes[adjHead] = nodes[adjHead].filter(function (e) { + return e != adj; + }); + currentNode = adjHead; + } else if (!directed && currentNode != adjTail) { + nodes[adjTail] = nodes[adjTail].filter(function (e) { + return e != adj; + }); + currentNode = adjTail; + } + subtour.unshift(adj); + subtour.unshift(currentNode); + } + return subtour; + }; + var trail = []; + var subtour = []; + subtour = walk(startVertex); + while (subtour.length != 1) { + if (nodes[subtour[0]].length == 0) { + trail.unshift(eles.getElementById(subtour.shift())); + trail.unshift(eles.getElementById(subtour.shift())); + } else { + subtour = walk(subtour.shift()).concat(subtour); + } + } + trail.unshift(eles.getElementById(subtour.shift())); // final node + + for (var d in nodes) { + if (nodes[d].length) { + return result; + } + } + result.found = true; + result.trail = this.spawn(trail, true); + return result; + } + }; + + var hopcroftTarjanBiconnected = function hopcroftTarjanBiconnected() { + var eles = this; + var nodes = {}; + var id = 0; + var edgeCount = 0; + var components = []; + var stack = []; + var visitedEdges = {}; + var buildComponent = function buildComponent(x, y) { + var i = stack.length - 1; + var cutset = []; + var component = eles.spawn(); + while (stack[i].x != x || stack[i].y != y) { + cutset.push(stack.pop().edge); + i--; + } + cutset.push(stack.pop().edge); + cutset.forEach(function (edge) { + var connectedNodes = edge.connectedNodes().intersection(eles); + component.merge(edge); + connectedNodes.forEach(function (node) { + var nodeId = node.id(); + var connectedEdges = node.connectedEdges().intersection(eles); + component.merge(node); + if (!nodes[nodeId].cutVertex) { + component.merge(connectedEdges); + } else { + component.merge(connectedEdges.filter(function (edge) { + return edge.isLoop(); + })); + } + }); + }); + components.push(component); + }; + var biconnectedSearch = function biconnectedSearch(root, currentNode, parent) { + if (root === parent) edgeCount += 1; + nodes[currentNode] = { + id: id, + low: id++, + cutVertex: false + }; + var edges = eles.getElementById(currentNode).connectedEdges().intersection(eles); + if (edges.size() === 0) { + components.push(eles.spawn(eles.getElementById(currentNode))); + } else { + var sourceId, targetId, otherNodeId, edgeId; + edges.forEach(function (edge) { + sourceId = edge.source().id(); + targetId = edge.target().id(); + otherNodeId = sourceId === currentNode ? targetId : sourceId; + if (otherNodeId !== parent) { + edgeId = edge.id(); + if (!visitedEdges[edgeId]) { + visitedEdges[edgeId] = true; + stack.push({ + x: currentNode, + y: otherNodeId, + edge: edge + }); + } + if (!(otherNodeId in nodes)) { + biconnectedSearch(root, otherNodeId, currentNode); + nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].low); + if (nodes[currentNode].id <= nodes[otherNodeId].low) { + nodes[currentNode].cutVertex = true; + buildComponent(currentNode, otherNodeId); + } + } else { + nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].id); + } + } + }); + } + }; + eles.forEach(function (ele) { + if (ele.isNode()) { + var nodeId = ele.id(); + if (!(nodeId in nodes)) { + edgeCount = 0; + biconnectedSearch(nodeId, nodeId); + nodes[nodeId].cutVertex = edgeCount > 1; + } + } + }); + var cutVertices = Object.keys(nodes).filter(function (id) { + return nodes[id].cutVertex; + }).map(function (id) { + return eles.getElementById(id); + }); + return { + cut: eles.spawn(cutVertices), + components: components + }; + }; + var hopcroftTarjanBiconnected$1 = { + hopcroftTarjanBiconnected: hopcroftTarjanBiconnected, + htbc: hopcroftTarjanBiconnected, + htb: hopcroftTarjanBiconnected, + hopcroftTarjanBiconnectedComponents: hopcroftTarjanBiconnected + }; + + var tarjanStronglyConnected = function tarjanStronglyConnected() { + var eles = this; + var nodes = {}; + var index = 0; + var components = []; + var stack = []; + var cut = eles.spawn(eles); + var stronglyConnectedSearch = function stronglyConnectedSearch(sourceNodeId) { + stack.push(sourceNodeId); + nodes[sourceNodeId] = { + index: index, + low: index++, + explored: false + }; + var connectedEdges = eles.getElementById(sourceNodeId).connectedEdges().intersection(eles); + connectedEdges.forEach(function (edge) { + var targetNodeId = edge.target().id(); + if (targetNodeId !== sourceNodeId) { + if (!(targetNodeId in nodes)) { + stronglyConnectedSearch(targetNodeId); + } + if (!nodes[targetNodeId].explored) { + nodes[sourceNodeId].low = Math.min(nodes[sourceNodeId].low, nodes[targetNodeId].low); + } + } + }); + if (nodes[sourceNodeId].index === nodes[sourceNodeId].low) { + var componentNodes = eles.spawn(); + for (;;) { + var nodeId = stack.pop(); + componentNodes.merge(eles.getElementById(nodeId)); + nodes[nodeId].low = nodes[sourceNodeId].index; + nodes[nodeId].explored = true; + if (nodeId === sourceNodeId) { + break; + } + } + var componentEdges = componentNodes.edgesWith(componentNodes); + var component = componentNodes.merge(componentEdges); + components.push(component); + cut = cut.difference(component); + } + }; + eles.forEach(function (ele) { + if (ele.isNode()) { + var nodeId = ele.id(); + if (!(nodeId in nodes)) { + stronglyConnectedSearch(nodeId); + } + } + }); + return { + cut: cut, + components: components + }; + }; + var tarjanStronglyConnected$1 = { + tarjanStronglyConnected: tarjanStronglyConnected, + tsc: tarjanStronglyConnected, + tscc: tarjanStronglyConnected, + tarjanStronglyConnectedComponents: tarjanStronglyConnected + }; + + var elesfn$j = {}; + [elesfn$v, elesfn$u, elesfn$t, elesfn$s, elesfn$r, elesfn$q, elesfn$p, elesfn$o, elesfn$n, elesfn$m, elesfn$l, markovClustering$1, kClustering, hierarchicalClustering$1, affinityPropagation$1, elesfn$k, hopcroftTarjanBiconnected$1, tarjanStronglyConnected$1].forEach(function (props) { + extend(elesfn$j, props); + }); + + /*! + Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable + Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) + Licensed under The MIT License (http://opensource.org/licenses/MIT) + */ + + /* promise states [Promises/A+ 2.1] */ + var STATE_PENDING = 0; /* [Promises/A+ 2.1.1] */ + var STATE_FULFILLED = 1; /* [Promises/A+ 2.1.2] */ + var STATE_REJECTED = 2; /* [Promises/A+ 2.1.3] */ + + /* promise object constructor */ + var api = function api(executor) { + /* optionally support non-constructor/plain-function call */ + if (!(this instanceof api)) return new api(executor); + + /* initialize object */ + this.id = 'Thenable/1.0.7'; + this.state = STATE_PENDING; /* initial state */ + this.fulfillValue = undefined; /* initial value */ /* [Promises/A+ 1.3, 2.1.2.2] */ + this.rejectReason = undefined; /* initial reason */ /* [Promises/A+ 1.5, 2.1.3.2] */ + this.onFulfilled = []; /* initial handlers */ + this.onRejected = []; /* initial handlers */ + + /* provide optional information-hiding proxy */ + this.proxy = { + then: this.then.bind(this) + }; + + /* support optional executor function */ + if (typeof executor === 'function') executor.call(this, this.fulfill.bind(this), this.reject.bind(this)); + }; + + /* promise API methods */ + api.prototype = { + /* promise resolving methods */ + fulfill: function fulfill(value) { + return deliver(this, STATE_FULFILLED, 'fulfillValue', value); + }, + reject: function reject(value) { + return deliver(this, STATE_REJECTED, 'rejectReason', value); + }, + /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ + then: function then(onFulfilled, onRejected) { + var curr = this; + var next = new api(); /* [Promises/A+ 2.2.7] */ + curr.onFulfilled.push(resolver(onFulfilled, next, 'fulfill')); /* [Promises/A+ 2.2.2/2.2.6] */ + curr.onRejected.push(resolver(onRejected, next, 'reject')); /* [Promises/A+ 2.2.3/2.2.6] */ + execute(curr); + return next.proxy; /* [Promises/A+ 2.2.7, 3.3] */ + } + }; + + /* deliver an action */ + var deliver = function deliver(curr, state, name, value) { + if (curr.state === STATE_PENDING) { + curr.state = state; /* [Promises/A+ 2.1.2.1, 2.1.3.1] */ + curr[name] = value; /* [Promises/A+ 2.1.2.2, 2.1.3.2] */ + execute(curr); + } + return curr; + }; + + /* execute all handlers */ + var execute = function execute(curr) { + if (curr.state === STATE_FULFILLED) execute_handlers(curr, 'onFulfilled', curr.fulfillValue);else if (curr.state === STATE_REJECTED) execute_handlers(curr, 'onRejected', curr.rejectReason); + }; + + /* execute particular set of handlers */ + var execute_handlers = function execute_handlers(curr, name, value) { + /* global setImmediate: true */ + /* global setTimeout: true */ + + /* short-circuit processing */ + if (curr[name].length === 0) return; + + /* iterate over all handlers, exactly once */ + var handlers = curr[name]; + curr[name] = []; /* [Promises/A+ 2.2.2.3, 2.2.3.3] */ + var func = function func() { + for (var i = 0; i < handlers.length; i++) { + handlers[i](value); + } /* [Promises/A+ 2.2.5] */ + }; + + /* execute procedure asynchronously */ /* [Promises/A+ 2.2.4, 3.1] */ + if (typeof setImmediate === 'function') setImmediate(func);else setTimeout(func, 0); + }; + + /* generate a resolver function */ + var resolver = function resolver(cb, next, method) { + return function (value) { + if (typeof cb !== 'function') /* [Promises/A+ 2.2.1, 2.2.7.3, 2.2.7.4] */ + next[method].call(next, value); /* [Promises/A+ 2.2.7.3, 2.2.7.4] */else { + var result; + try { + result = cb(value); + } /* [Promises/A+ 2.2.2.1, 2.2.3.1, 2.2.5, 3.2] */ catch (e) { + next.reject(e); /* [Promises/A+ 2.2.7.2] */ + return; + } + resolve(next, result); /* [Promises/A+ 2.2.7.1] */ + } + }; + }; + + /* "Promise Resolution Procedure" */ /* [Promises/A+ 2.3] */ + var resolve = function resolve(promise, x) { + /* sanity check arguments */ /* [Promises/A+ 2.3.1] */ + if (promise === x || promise.proxy === x) { + promise.reject(new TypeError('cannot resolve promise with itself')); + return; + } + + /* surgically check for a "then" method + (mainly to just call the "getter" of "then" only once) */ + var then; + if (_typeof(x) === 'object' && x !== null || typeof x === 'function') { + try { + then = x.then; + } /* [Promises/A+ 2.3.3.1, 3.5] */ catch (e) { + promise.reject(e); /* [Promises/A+ 2.3.3.2] */ + return; + } + } + + /* handle own Thenables [Promises/A+ 2.3.2] + and similar "thenables" [Promises/A+ 2.3.3] */ + if (typeof then === 'function') { + var resolved = false; + try { + /* call retrieved "then" method */ /* [Promises/A+ 2.3.3.3] */ + then.call(x, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */ + function (y) { + if (resolved) return; + resolved = true; /* [Promises/A+ 2.3.3.3.3] */ + if (y === x) /* [Promises/A+ 3.6] */ + promise.reject(new TypeError('circular thenable chain'));else resolve(promise, y); + }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */ + function (r) { + if (resolved) return; + resolved = true; /* [Promises/A+ 2.3.3.3.3] */ + promise.reject(r); + }); + } catch (e) { + if (!resolved) /* [Promises/A+ 2.3.3.3.3] */ + promise.reject(e); /* [Promises/A+ 2.3.3.3.4] */ + } + + return; + } + + /* handle other values */ + promise.fulfill(x); /* [Promises/A+ 2.3.4, 2.3.3.4] */ + }; + + // so we always have Promise.all() + api.all = function (ps) { + return new api(function (resolveAll, rejectAll) { + var vals = new Array(ps.length); + var doneCount = 0; + var fulfill = function fulfill(i, val) { + vals[i] = val; + doneCount++; + if (doneCount === ps.length) { + resolveAll(vals); + } + }; + for (var i = 0; i < ps.length; i++) { + (function (i) { + var p = ps[i]; + var isPromise = p != null && p.then != null; + if (isPromise) { + p.then(function (val) { + fulfill(i, val); + }, function (err) { + rejectAll(err); + }); + } else { + var val = p; + fulfill(i, val); + } + })(i); + } + }); + }; + api.resolve = function (val) { + return new api(function (resolve, reject) { + resolve(val); + }); + }; + api.reject = function (val) { + return new api(function (resolve, reject) { + reject(val); + }); + }; + var Promise$1 = typeof Promise !== 'undefined' ? Promise : api; // eslint-disable-line no-undef + + var Animation = function Animation(target, opts, opts2) { + var isCore = core(target); + var isEle = !isCore; + var _p = this._private = extend({ + duration: 1000 + }, opts, opts2); + _p.target = target; + _p.style = _p.style || _p.css; + _p.started = false; + _p.playing = false; + _p.hooked = false; + _p.applying = false; + _p.progress = 0; + _p.completes = []; + _p.frames = []; + if (_p.complete && fn$6(_p.complete)) { + _p.completes.push(_p.complete); + } + if (isEle) { + var pos = target.position(); + _p.startPosition = _p.startPosition || { + x: pos.x, + y: pos.y + }; + _p.startStyle = _p.startStyle || target.cy().style().getAnimationStartStyle(target, _p.style); + } + if (isCore) { + var pan = target.pan(); + _p.startPan = { + x: pan.x, + y: pan.y + }; + _p.startZoom = target.zoom(); + } + + // for future timeline/animations impl + this.length = 1; + this[0] = this; + }; + var anifn = Animation.prototype; + extend(anifn, { + instanceString: function instanceString() { + return 'animation'; + }, + hook: function hook() { + var _p = this._private; + if (!_p.hooked) { + // add to target's animation queue + var q; + var tAni = _p.target._private.animation; + if (_p.queue) { + q = tAni.queue; + } else { + q = tAni.current; + } + q.push(this); + + // add to the animation loop pool + if (elementOrCollection(_p.target)) { + _p.target.cy().addToAnimationPool(_p.target); + } + _p.hooked = true; + } + return this; + }, + play: function play() { + var _p = this._private; + + // autorewind + if (_p.progress === 1) { + _p.progress = 0; + } + _p.playing = true; + _p.started = false; // needs to be started by animation loop + _p.stopped = false; + this.hook(); + + // the animation loop will start the animation... + + return this; + }, + playing: function playing() { + return this._private.playing; + }, + apply: function apply() { + var _p = this._private; + _p.applying = true; + _p.started = false; // needs to be started by animation loop + _p.stopped = false; + this.hook(); + + // the animation loop will apply the animation at this progress + + return this; + }, + applying: function applying() { + return this._private.applying; + }, + pause: function pause() { + var _p = this._private; + _p.playing = false; + _p.started = false; + return this; + }, + stop: function stop() { + var _p = this._private; + _p.playing = false; + _p.started = false; + _p.stopped = true; // to be removed from animation queues + + return this; + }, + rewind: function rewind() { + return this.progress(0); + }, + fastforward: function fastforward() { + return this.progress(1); + }, + time: function time(t) { + var _p = this._private; + if (t === undefined) { + return _p.progress * _p.duration; + } else { + return this.progress(t / _p.duration); + } + }, + progress: function progress(p) { + var _p = this._private; + var wasPlaying = _p.playing; + if (p === undefined) { + return _p.progress; + } else { + if (wasPlaying) { + this.pause(); + } + _p.progress = p; + _p.started = false; + if (wasPlaying) { + this.play(); + } + } + return this; + }, + completed: function completed() { + return this._private.progress === 1; + }, + reverse: function reverse() { + var _p = this._private; + var wasPlaying = _p.playing; + if (wasPlaying) { + this.pause(); + } + _p.progress = 1 - _p.progress; + _p.started = false; + var swap = function swap(a, b) { + var _pa = _p[a]; + if (_pa == null) { + return; + } + _p[a] = _p[b]; + _p[b] = _pa; + }; + swap('zoom', 'startZoom'); + swap('pan', 'startPan'); + swap('position', 'startPosition'); + + // swap styles + if (_p.style) { + for (var i = 0; i < _p.style.length; i++) { + var prop = _p.style[i]; + var name = prop.name; + var startStyleProp = _p.startStyle[name]; + _p.startStyle[name] = prop; + _p.style[i] = startStyleProp; + } + } + if (wasPlaying) { + this.play(); + } + return this; + }, + promise: function promise(type) { + var _p = this._private; + var arr; + switch (type) { + case 'frame': + arr = _p.frames; + break; + default: + case 'complete': + case 'completed': + arr = _p.completes; + } + return new Promise$1(function (resolve, reject) { + arr.push(function () { + resolve(); + }); + }); + } + }); + anifn.complete = anifn.completed; + anifn.run = anifn.play; + anifn.running = anifn.playing; + + var define$3 = { + animated: function animated() { + return function animatedImpl() { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return false; + } + var ele = all[0]; + if (ele) { + return ele._private.animation.current.length > 0; + } + }; + }, + // animated + + clearQueue: function clearQueue() { + return function clearQueueImpl() { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + for (var i = 0; i < all.length; i++) { + var ele = all[i]; + ele._private.animation.queue = []; + } + return this; + }; + }, + // clearQueue + + delay: function delay() { + return function delayImpl(time, complete) { + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + return this.animate({ + delay: time, + duration: time, + complete: complete + }); + }; + }, + // delay + + delayAnimation: function delayAnimation() { + return function delayAnimationImpl(time, complete) { + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + return this.animation({ + delay: time, + duration: time, + complete: complete + }); + }; + }, + // delay + + animation: function animation() { + return function animationImpl(properties, params) { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var cy = this._private.cy || this; + var isCore = !selfIsArrayLike; + var isEles = !isCore; + if (!cy.styleEnabled()) { + return this; + } + var style = cy.style(); + properties = extend({}, properties, params); + var propertiesEmpty = Object.keys(properties).length === 0; + if (propertiesEmpty) { + return new Animation(all[0], properties); // nothing to animate + } + + if (properties.duration === undefined) { + properties.duration = 400; + } + switch (properties.duration) { + case 'slow': + properties.duration = 600; + break; + case 'fast': + properties.duration = 200; + break; + } + if (isEles) { + properties.style = style.getPropsList(properties.style || properties.css); + properties.css = undefined; + } + if (isEles && properties.renderedPosition != null) { + var rpos = properties.renderedPosition; + var pan = cy.pan(); + var zoom = cy.zoom(); + properties.position = renderedToModelPosition(rpos, zoom, pan); + } + + // override pan w/ panBy if set + if (isCore && properties.panBy != null) { + var panBy = properties.panBy; + var cyPan = cy.pan(); + properties.pan = { + x: cyPan.x + panBy.x, + y: cyPan.y + panBy.y + }; + } + + // override pan w/ center if set + var center = properties.center || properties.centre; + if (isCore && center != null) { + var centerPan = cy.getCenterPan(center.eles, properties.zoom); + if (centerPan != null) { + properties.pan = centerPan; + } + } + + // override pan & zoom w/ fit if set + if (isCore && properties.fit != null) { + var fit = properties.fit; + var fitVp = cy.getFitViewport(fit.eles || fit.boundingBox, fit.padding); + if (fitVp != null) { + properties.pan = fitVp.pan; + properties.zoom = fitVp.zoom; + } + } + + // override zoom (& potentially pan) w/ zoom obj if set + if (isCore && plainObject(properties.zoom)) { + var vp = cy.getZoomedViewport(properties.zoom); + if (vp != null) { + if (vp.zoomed) { + properties.zoom = vp.zoom; + } + if (vp.panned) { + properties.pan = vp.pan; + } + } else { + properties.zoom = null; // an inavalid zoom (e.g. no delta) gets automatically destroyed + } + } + + return new Animation(all[0], properties); + }; + }, + // animate + + animate: function animate() { + return function animateImpl(properties, params) { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + if (params) { + properties = extend({}, properties, params); + } + + // manually hook and run the animation + for (var i = 0; i < all.length; i++) { + var ele = all[i]; + var queue = ele.animated() && (properties.queue === undefined || properties.queue); + var ani = ele.animation(properties, queue ? { + queue: true + } : undefined); + ani.play(); + } + return this; // chaining + }; + }, + + // animate + + stop: function stop() { + return function stopImpl(clearQueue, jumpToEnd) { + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var cy = this._private.cy || this; + if (!cy.styleEnabled()) { + return this; + } + for (var i = 0; i < all.length; i++) { + var ele = all[i]; + var _p = ele._private; + var anis = _p.animation.current; + for (var j = 0; j < anis.length; j++) { + var ani = anis[j]; + var ani_p = ani._private; + if (jumpToEnd) { + // next iteration of the animation loop, the animation + // will go straight to the end and be removed + ani_p.duration = 0; + } + } + + // clear the queue of future animations + if (clearQueue) { + _p.animation.queue = []; + } + if (!jumpToEnd) { + _p.animation.current = []; + } + } + + // we have to notify (the animation loop doesn't do it for us on `stop`) + cy.notify('draw'); + return this; + }; + } // stop + }; // define + + /** + * Checks if `value` is classified as an `Array` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @example + * + * _.isArray([1, 2, 3]); + * // => true + * + * _.isArray(document.body.children); + * // => false + * + * _.isArray('abc'); + * // => false + * + * _.isArray(_.noop); + * // => false + */ + var isArray = Array.isArray; + + var isArray_1 = isArray; + + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/; + + /** + * Checks if `value` is a property name and not a property path. + * + * @private + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + */ + function isKey(value, object) { + if (isArray_1(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol_1(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); + } + + var _isKey = isKey; + + /** `Object#toString` result references. */ + var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; + + /** + * Checks if `value` is classified as a `Function` object. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @example + * + * _.isFunction(_); + * // => true + * + * _.isFunction(/abc/); + * // => false + */ + function isFunction(value) { + if (!isObject_1(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = _baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + + var isFunction_1 = isFunction; + + /** Used to detect overreaching core-js shims. */ + var coreJsData = _root['__core-js_shared__']; + + var _coreJsData = coreJsData; + + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); + + /** + * Checks if `func` has its source masked. + * + * @private + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. + */ + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); + } + + var _isMasked = isMasked; + + /** Used for built-in method references. */ + var funcProto$1 = Function.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString$1 = funcProto$1.toString; + + /** + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. + */ + function toSource(func) { + if (func != null) { + try { + return funcToString$1.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } + + var _toSource = toSource; + + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; + + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto$3 = Object.prototype; + + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; + + /** Used to check objects for own properties. */ + var hasOwnProperty$3 = objectProto$3.hasOwnProperty; + + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty$3).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); + + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject_1(value) || _isMasked(value)) { + return false; + } + var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor; + return pattern.test(_toSource(value)); + } + + var _baseIsNative = baseIsNative; + + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue$1(object, key) { + return object == null ? undefined : object[key]; + } + + var _getValue = getValue$1; + + /** + * Gets the native function at `key` of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. + */ + function getNative(object, key) { + var value = _getValue(object, key); + return _baseIsNative(value) ? value : undefined; + } + + var _getNative = getNative; + + /* Built-in method references that are verified to be native. */ + var nativeCreate = _getNative(Object, 'create'); + + var _nativeCreate = nativeCreate; + + /** + * Removes all key-value entries from the hash. + * + * @private + * @name clear + * @memberOf Hash + */ + function hashClear() { + this.__data__ = _nativeCreate ? _nativeCreate(null) : {}; + this.size = 0; + } + + var _hashClear = hashClear; + + /** + * Removes `key` and its value from the hash. + * + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + + var _hashDelete = hashDelete; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED$1 = '__lodash_hash_undefined__'; + + /** Used for built-in method references. */ + var objectProto$2 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$2 = objectProto$2.hasOwnProperty; + + /** + * Gets the hash value for `key`. + * + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function hashGet(key) { + var data = this.__data__; + if (_nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED$1 ? undefined : result; + } + return hasOwnProperty$2.call(data, key) ? data[key] : undefined; + } + + var _hashGet = hashGet; + + /** Used for built-in method references. */ + var objectProto$1 = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty$1 = objectProto$1.hasOwnProperty; + + /** + * Checks if a hash value for `key` exists. + * + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function hashHas(key) { + var data = this.__data__; + return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$1.call(data, key); + } + + var _hashHas = hashHas; + + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; + + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (_nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; + } + + var _hashSet = hashSet; + + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + // Add methods to `Hash`. + Hash.prototype.clear = _hashClear; + Hash.prototype['delete'] = _hashDelete; + Hash.prototype.get = _hashGet; + Hash.prototype.has = _hashHas; + Hash.prototype.set = _hashSet; + + var _Hash = Hash; + + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + + var _listCacheClear = listCacheClear; + + /** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ + function eq(value, other) { + return value === other || (value !== value && other !== other); + } + + var eq_1 = eq; + + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq_1(array[length][0], key)) { + return length; + } + } + return -1; + } + + var _assocIndexOf = assocIndexOf; + + /** Used for built-in method references. */ + var arrayProto = Array.prototype; + + /** Built-in value references. */ + var splice = arrayProto.splice; + + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + + var _listCacheDelete = listCacheDelete; + + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; + } + + var _listCacheGet = listCacheGet; + + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return _assocIndexOf(this.__data__, key) > -1; + } + + var _listCacheHas = listCacheHas; + + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = _assocIndexOf(data, key); + + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + + var _listCacheSet = listCacheSet; + + /** + * Creates an list cache object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + // Add methods to `ListCache`. + ListCache.prototype.clear = _listCacheClear; + ListCache.prototype['delete'] = _listCacheDelete; + ListCache.prototype.get = _listCacheGet; + ListCache.prototype.has = _listCacheHas; + ListCache.prototype.set = _listCacheSet; + + var _ListCache = ListCache; + + /* Built-in method references that are verified to be native. */ + var Map$1 = _getNative(_root, 'Map'); + + var _Map = Map$1; + + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new _Hash, + 'map': new (_Map || _ListCache), + 'string': new _Hash + }; + } + + var _mapCacheClear = mapCacheClear; + + /** + * Checks if `value` is suitable for use as unique object key. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + */ + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); + } + + var _isKeyable = isKeyable; + + /** + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. + */ + function getMapData(map, key) { + var data = map.__data__; + return _isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } + + var _getMapData = getMapData; + + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = _getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } + + var _mapCacheDelete = mapCacheDelete; + + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return _getMapData(this, key).get(key); + } + + var _mapCacheGet = mapCacheGet; + + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return _getMapData(this, key).has(key); + } + + var _mapCacheHas = mapCacheHas; + + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = _getMapData(this, key), + size = data.size; + + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + + var _mapCacheSet = mapCacheSet; + + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; + + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + + // Add methods to `MapCache`. + MapCache.prototype.clear = _mapCacheClear; + MapCache.prototype['delete'] = _mapCacheDelete; + MapCache.prototype.get = _mapCacheGet; + MapCache.prototype.has = _mapCacheHas; + MapCache.prototype.set = _mapCacheSet; + + var _MapCache = MapCache; + + /** Error message constants. */ + var FUNC_ERROR_TEXT = 'Expected a function'; + + /** + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. + * @example + * + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; + * + * var values = _.memoize(_.values); + * values(object); + * // => [1, 2] + * + * values(other); + * // => [3, 4] + * + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; + */ + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || _MapCache); + return memoized; + } + + // Expose `MapCache`. + memoize.Cache = _MapCache; + + var memoize_1 = memoize; + + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; + + /** + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * + * @private + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. + */ + function memoizeCapped(func) { + var result = memoize_1(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; + }); + + var cache = result.cache; + return result; + } + + var _memoizeCapped = memoizeCapped; + + /** Used to match property names within property paths. */ + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; + + /** + * Converts `string` to a property path array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. + */ + var stringToPath = _memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); + + var _stringToPath = stringToPath; + + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); + + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + + var _arrayMap = arrayMap; + + /** Used as references for various `Number` constants. */ + var INFINITY$1 = 1 / 0; + + /** Used to convert symbols to primitives and strings. */ + var symbolProto = _Symbol ? _Symbol.prototype : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; + + /** + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. + * + * @private + * @param {*} value The value to process. + * @returns {string} Returns the string. + */ + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; + } + if (isArray_1(value)) { + // Recursively convert values (susceptible to call stack limits). + return _arrayMap(value, baseToString) + ''; + } + if (isSymbol_1(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result; + } + + var _baseToString = baseToString; + + /** + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. + * @example + * + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' + */ + function toString$1(value) { + return value == null ? '' : _baseToString(value); + } + + var toString_1 = toString$1; + + /** + * Casts `value` to a path array if it's not one. + * + * @private + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. + */ + function castPath(value, object) { + if (isArray_1(value)) { + return value; + } + return _isKey(value, object) ? [value] : _stringToPath(toString_1(value)); + } + + var _castPath = castPath; + + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0; + + /** + * Converts `value` to a string key if it's not a string or symbol. + * + * @private + * @param {*} value The value to inspect. + * @returns {string|symbol} Returns the key. + */ + function toKey(value) { + if (typeof value == 'string' || isSymbol_1(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + } + + var _toKey = toKey; + + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = _castPath(path, object); + + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[_toKey(path[index++])]; + } + return (index && index == length) ? object : undefined; + } + + var _baseGet = baseGet; + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' + */ + function get(object, path, defaultValue) { + var result = object == null ? undefined : _baseGet(object, path); + return result === undefined ? defaultValue : result; + } + + var get_1 = get; + + var defineProperty = (function() { + try { + var func = _getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + var _defineProperty = defineProperty; + + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && _defineProperty) { + _defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } + + var _baseAssignValue = baseAssignValue; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; + + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq_1(objValue, value)) || + (value === undefined && !(key in object))) { + _baseAssignValue(object, key, value); + } + } + + var _assignValue = assignValue; + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; + + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; + + /** + * Checks if `value` is a valid array-like index. + * + * @private + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + */ + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; + + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); + } + + var _isIndex = isIndex; + + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject_1(object)) { + return object; + } + path = _castPath(path, object); + + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; + + while (nested != null && ++index < length) { + var key = _toKey(path[index]), + newValue = value; + + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } + + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject_1(objValue) + ? objValue + : (_isIndex(path[index + 1]) ? [] : {}); + } + } + _assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } + + var _baseSet = baseSet; + + /** + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. + * + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 + */ + function set(object, path, value) { + return object == null ? object : _baseSet(object, path, value); + } + + var set_1 = set; + + /** + * Copies the values of `source` to `array`. + * + * @private + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. + */ + function copyArray(source, array) { + var index = -1, + length = source.length; + + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; + } + + var _copyArray = copyArray; + + /** + * Converts `value` to a property path array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. + * @example + * + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] + * + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] + */ + function toPath(value) { + if (isArray_1(value)) { + return _arrayMap(value, _toKey); + } + return isSymbol_1(value) ? [value] : _copyArray(_stringToPath(toString_1(value))); + } + + var toPath_1 = toPath; + + var define$2 = { + // access data field + data: function data(params) { + var defaults = { + field: 'data', + bindingEvent: 'data', + allowBinding: false, + allowSetting: false, + allowGetting: false, + settingEvent: 'data', + settingTriggersEvent: false, + triggerFnName: 'trigger', + immutableKeys: {}, + // key => true if immutable + updateStyle: false, + beforeGet: function beforeGet(self) {}, + beforeSet: function beforeSet(self, obj) {}, + onSet: function onSet(self) {}, + canSet: function canSet(self) { + return true; + } + }; + params = extend({}, defaults, params); + return function dataImpl(name, value) { + var p = params; + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + var single = selfIsArrayLike ? self[0] : self; + + // .data('foo', ...) + if (string(name)) { + // set or get property + var isPathLike = name.indexOf('.') !== -1; // there might be a normal field with a dot + var path = isPathLike && toPath_1(name); + + // .data('foo') + if (p.allowGetting && value === undefined) { + // get + + var ret; + if (single) { + p.beforeGet(single); + + // check if it's path and a field with the same name doesn't exist + if (path && single._private[p.field][name] === undefined) { + ret = get_1(single._private[p.field], path); + } else { + ret = single._private[p.field][name]; + } + } + return ret; + + // .data('foo', 'bar') + } else if (p.allowSetting && value !== undefined) { + // set + var valid = !p.immutableKeys[name]; + if (valid) { + var change = _defineProperty$1({}, name, value); + p.beforeSet(self, change); + for (var i = 0, l = all.length; i < l; i++) { + var ele = all[i]; + if (p.canSet(ele)) { + if (path && single._private[p.field][name] === undefined) { + set_1(ele._private[p.field], path, value); + } else { + ele._private[p.field][name] = value; + } + } + } + + // update mappers if asked + if (p.updateStyle) { + self.updateStyle(); + } + + // call onSet callback + p.onSet(self); + if (p.settingTriggersEvent) { + self[p.triggerFnName](p.settingEvent); + } + } + } + + // .data({ 'foo': 'bar' }) + } else if (p.allowSetting && plainObject(name)) { + // extend + var obj = name; + var k, v; + var keys = Object.keys(obj); + p.beforeSet(self, obj); + for (var _i = 0; _i < keys.length; _i++) { + k = keys[_i]; + v = obj[k]; + var _valid = !p.immutableKeys[k]; + if (_valid) { + for (var j = 0; j < all.length; j++) { + var _ele = all[j]; + if (p.canSet(_ele)) { + _ele._private[p.field][k] = v; + } + } + } + } + + // update mappers if asked + if (p.updateStyle) { + self.updateStyle(); + } + + // call onSet callback + p.onSet(self); + if (p.settingTriggersEvent) { + self[p.triggerFnName](p.settingEvent); + } + + // .data(function(){ ... }) + } else if (p.allowBinding && fn$6(name)) { + // bind to event + var fn = name; + self.on(p.bindingEvent, fn); + + // .data() + } else if (p.allowGetting && name === undefined) { + // get whole object + var _ret; + if (single) { + p.beforeGet(single); + _ret = single._private[p.field]; + } + return _ret; + } + return self; // maintain chainability + }; // function + }, + + // data + + // remove data field + removeData: function removeData(params) { + var defaults = { + field: 'data', + event: 'data', + triggerFnName: 'trigger', + triggerEvent: false, + immutableKeys: {} // key => true if immutable + }; + + params = extend({}, defaults, params); + return function removeDataImpl(names) { + var p = params; + var self = this; + var selfIsArrayLike = self.length !== undefined; + var all = selfIsArrayLike ? self : [self]; // put in array if not array-like + + // .removeData('foo bar') + if (string(names)) { + // then get the list of keys, and delete them + var keys = names.split(/\s+/); + var l = keys.length; + for (var i = 0; i < l; i++) { + // delete each non-empty key + var key = keys[i]; + if (emptyString(key)) { + continue; + } + var valid = !p.immutableKeys[key]; // not valid if immutable + if (valid) { + for (var i_a = 0, l_a = all.length; i_a < l_a; i_a++) { + all[i_a]._private[p.field][key] = undefined; + } + } + } + if (p.triggerEvent) { + self[p.triggerFnName](p.event); + } + + // .removeData() + } else if (names === undefined) { + // then delete all keys + + for (var _i_a = 0, _l_a = all.length; _i_a < _l_a; _i_a++) { + var _privateFields = all[_i_a]._private[p.field]; + var _keys = Object.keys(_privateFields); + for (var _i2 = 0; _i2 < _keys.length; _i2++) { + var _key = _keys[_i2]; + var validKeyToDelete = !p.immutableKeys[_key]; + if (validKeyToDelete) { + _privateFields[_key] = undefined; + } + } + } + if (p.triggerEvent) { + self[p.triggerFnName](p.event); + } + } + return self; // maintain chaining + }; // function + } // removeData + }; // define + + var define$1 = { + eventAliasesOn: function eventAliasesOn(proto) { + var p = proto; + p.addListener = p.listen = p.bind = p.on; + p.unlisten = p.unbind = p.off = p.removeListener; + p.trigger = p.emit; + + // this is just a wrapper alias of .on() + p.pon = p.promiseOn = function (events, selector) { + var self = this; + var args = Array.prototype.slice.call(arguments, 0); + return new Promise$1(function (resolve, reject) { + var callback = function callback(e) { + self.off.apply(self, offArgs); + resolve(e); + }; + var onArgs = args.concat([callback]); + var offArgs = onArgs.concat([]); + self.on.apply(self, onArgs); + }); + }; + } + }; // define + + // use this module to cherry pick functions into your prototype + var define = {}; + [define$3, define$2, define$1].forEach(function (m) { + extend(define, m); + }); + + var elesfn$i = { + animate: define.animate(), + animation: define.animation(), + animated: define.animated(), + clearQueue: define.clearQueue(), + delay: define.delay(), + delayAnimation: define.delayAnimation(), + stop: define.stop() + }; + + var elesfn$h = { + classes: function classes(_classes) { + var self = this; + if (_classes === undefined) { + var ret = []; + self[0]._private.classes.forEach(function (cls) { + return ret.push(cls); + }); + return ret; + } else if (!array(_classes)) { + // extract classes from string + _classes = (_classes || '').match(/\S+/g) || []; + } + var changed = []; + var classesSet = new Set$1(_classes); + + // check and update each ele + for (var j = 0; j < self.length; j++) { + var ele = self[j]; + var _p = ele._private; + var eleClasses = _p.classes; + var changedEle = false; + + // check if ele has all of the passed classes + for (var i = 0; i < _classes.length; i++) { + var cls = _classes[i]; + var eleHasClass = eleClasses.has(cls); + if (!eleHasClass) { + changedEle = true; + break; + } + } + + // check if ele has classes outside of those passed + if (!changedEle) { + changedEle = eleClasses.size !== _classes.length; + } + if (changedEle) { + _p.classes = classesSet; + changed.push(ele); + } + } + + // trigger update style on those eles that had class changes + if (changed.length > 0) { + this.spawn(changed).updateStyle().emit('class'); + } + return self; + }, + addClass: function addClass(classes) { + return this.toggleClass(classes, true); + }, + hasClass: function hasClass(className) { + var ele = this[0]; + return ele != null && ele._private.classes.has(className); + }, + toggleClass: function toggleClass(classes, toggle) { + if (!array(classes)) { + // extract classes from string + classes = classes.match(/\S+/g) || []; + } + var self = this; + var toggleUndefd = toggle === undefined; + var changed = []; // eles who had classes changed + + for (var i = 0, il = self.length; i < il; i++) { + var ele = self[i]; + var eleClasses = ele._private.classes; + var changedEle = false; + for (var j = 0; j < classes.length; j++) { + var cls = classes[j]; + var hasClass = eleClasses.has(cls); + var changedNow = false; + if (toggle || toggleUndefd && !hasClass) { + eleClasses.add(cls); + changedNow = true; + } else if (!toggle || toggleUndefd && hasClass) { + eleClasses["delete"](cls); + changedNow = true; + } + if (!changedEle && changedNow) { + changed.push(ele); + changedEle = true; + } + } // for j classes + } // for i eles + + // trigger update style on those eles that had class changes + if (changed.length > 0) { + this.spawn(changed).updateStyle().emit('class'); + } + return self; + }, + removeClass: function removeClass(classes) { + return this.toggleClass(classes, false); + }, + flashClass: function flashClass(classes, duration) { + var self = this; + if (duration == null) { + duration = 250; + } else if (duration === 0) { + return self; // nothing to do really + } + + self.addClass(classes); + setTimeout(function () { + self.removeClass(classes); + }, duration); + return self; + } + }; + elesfn$h.className = elesfn$h.classNames = elesfn$h.classes; + + // tokens in the query language + var tokens = { + metaChar: '[\\!\\"\\#\\$\\%\\&\\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]', + // chars we need to escape in let names, etc + comparatorOp: '=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=', + // binary comparison op (used in data selectors) + boolOp: '\\?|\\!|\\^', + // boolean (unary) operators (used in data selectors) + string: '"(?:\\\\"|[^"])*"' + '|' + "'(?:\\\\'|[^'])*'", + // string literals (used in data selectors) -- doublequotes | singlequotes + number: number, + // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123 + meta: 'degree|indegree|outdegree', + // allowed metadata fields (i.e. allowed functions to use from Collection) + separator: '\\s*,\\s*', + // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass + descendant: '\\s+', + child: '\\s+>\\s+', + subject: '\\$', + group: 'node|edge|\\*', + directedEdge: '\\s+->\\s+', + undirectedEdge: '\\s+<->\\s+' + }; + tokens.variable = '(?:[\\w-.]|(?:\\\\' + tokens.metaChar + '))+'; // a variable name can have letters, numbers, dashes, and periods + tokens.className = '(?:[\\w-]|(?:\\\\' + tokens.metaChar + '))+'; // a class name has the same rules as a variable except it can't have a '.' in the name + tokens.value = tokens.string + '|' + tokens.number; // a value literal, either a string or number + tokens.id = tokens.variable; // an element id (follows variable conventions) + + (function () { + var ops, op, i; + + // add @ variants to comparatorOp + ops = tokens.comparatorOp.split('|'); + for (i = 0; i < ops.length; i++) { + op = ops[i]; + tokens.comparatorOp += '|@' + op; + } + + // add ! variants to comparatorOp + ops = tokens.comparatorOp.split('|'); + for (i = 0; i < ops.length; i++) { + op = ops[i]; + if (op.indexOf('!') >= 0) { + continue; + } // skip ops that explicitly contain ! + if (op === '=') { + continue; + } // skip = b/c != is explicitly defined + + tokens.comparatorOp += '|\\!' + op; + } + })(); + + /** + * Make a new query object + * + * @prop type {Type} The type enum (int) of the query + * @prop checks List of checks to make against an ele to test for a match + */ + var newQuery = function newQuery() { + return { + checks: [] + }; + }; + + /** + * A check type enum-like object. Uses integer values for fast match() lookup. + * The ordering does not matter as long as the ints are unique. + */ + var Type = { + /** E.g. node */ + GROUP: 0, + /** A collection of elements */ + COLLECTION: 1, + /** A filter(ele) function */ + FILTER: 2, + /** E.g. [foo > 1] */ + DATA_COMPARE: 3, + /** E.g. [foo] */ + DATA_EXIST: 4, + /** E.g. [?foo] */ + DATA_BOOL: 5, + /** E.g. [[degree > 2]] */ + META_COMPARE: 6, + /** E.g. :selected */ + STATE: 7, + /** E.g. #foo */ + ID: 8, + /** E.g. .foo */ + CLASS: 9, + /** E.g. #foo <-> #bar */ + UNDIRECTED_EDGE: 10, + /** E.g. #foo -> #bar */ + DIRECTED_EDGE: 11, + /** E.g. $#foo -> #bar */ + NODE_SOURCE: 12, + /** E.g. #foo -> $#bar */ + NODE_TARGET: 13, + /** E.g. $#foo <-> #bar */ + NODE_NEIGHBOR: 14, + /** E.g. #foo > #bar */ + CHILD: 15, + /** E.g. #foo #bar */ + DESCENDANT: 16, + /** E.g. $#foo > #bar */ + PARENT: 17, + /** E.g. $#foo #bar */ + ANCESTOR: 18, + /** E.g. #foo > $bar > #baz */ + COMPOUND_SPLIT: 19, + /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */ + TRUE: 20 + }; + + var stateSelectors = [{ + selector: ':selected', + matches: function matches(ele) { + return ele.selected(); + } + }, { + selector: ':unselected', + matches: function matches(ele) { + return !ele.selected(); + } + }, { + selector: ':selectable', + matches: function matches(ele) { + return ele.selectable(); + } + }, { + selector: ':unselectable', + matches: function matches(ele) { + return !ele.selectable(); + } + }, { + selector: ':locked', + matches: function matches(ele) { + return ele.locked(); + } + }, { + selector: ':unlocked', + matches: function matches(ele) { + return !ele.locked(); + } + }, { + selector: ':visible', + matches: function matches(ele) { + return ele.visible(); + } + }, { + selector: ':hidden', + matches: function matches(ele) { + return !ele.visible(); + } + }, { + selector: ':transparent', + matches: function matches(ele) { + return ele.transparent(); + } + }, { + selector: ':grabbed', + matches: function matches(ele) { + return ele.grabbed(); + } + }, { + selector: ':free', + matches: function matches(ele) { + return !ele.grabbed(); + } + }, { + selector: ':removed', + matches: function matches(ele) { + return ele.removed(); + } + }, { + selector: ':inside', + matches: function matches(ele) { + return !ele.removed(); + } + }, { + selector: ':grabbable', + matches: function matches(ele) { + return ele.grabbable(); + } + }, { + selector: ':ungrabbable', + matches: function matches(ele) { + return !ele.grabbable(); + } + }, { + selector: ':animated', + matches: function matches(ele) { + return ele.animated(); + } + }, { + selector: ':unanimated', + matches: function matches(ele) { + return !ele.animated(); + } + }, { + selector: ':parent', + matches: function matches(ele) { + return ele.isParent(); + } + }, { + selector: ':childless', + matches: function matches(ele) { + return ele.isChildless(); + } + }, { + selector: ':child', + matches: function matches(ele) { + return ele.isChild(); + } + }, { + selector: ':orphan', + matches: function matches(ele) { + return ele.isOrphan(); + } + }, { + selector: ':nonorphan', + matches: function matches(ele) { + return ele.isChild(); + } + }, { + selector: ':compound', + matches: function matches(ele) { + if (ele.isNode()) { + return ele.isParent(); + } else { + return ele.source().isParent() || ele.target().isParent(); + } + } + }, { + selector: ':loop', + matches: function matches(ele) { + return ele.isLoop(); + } + }, { + selector: ':simple', + matches: function matches(ele) { + return ele.isSimple(); + } + }, { + selector: ':active', + matches: function matches(ele) { + return ele.active(); + } + }, { + selector: ':inactive', + matches: function matches(ele) { + return !ele.active(); + } + }, { + selector: ':backgrounding', + matches: function matches(ele) { + return ele.backgrounding(); + } + }, { + selector: ':nonbackgrounding', + matches: function matches(ele) { + return !ele.backgrounding(); + } + }].sort(function (a, b) { + // n.b. selectors that are starting substrings of others must have the longer ones first + return descending(a.selector, b.selector); + }); + var lookup = function () { + var selToFn = {}; + var s; + for (var i = 0; i < stateSelectors.length; i++) { + s = stateSelectors[i]; + selToFn[s.selector] = s.matches; + } + return selToFn; + }(); + var stateSelectorMatches = function stateSelectorMatches(sel, ele) { + return lookup[sel](ele); + }; + var stateSelectorRegex = '(' + stateSelectors.map(function (s) { + return s.selector; + }).join('|') + ')'; + + // when a token like a variable has escaped meta characters, we need to clean the backslashes out + // so that values get compared properly in Selector.filter() + var cleanMetaChars = function cleanMetaChars(str) { + return str.replace(new RegExp('\\\\(' + tokens.metaChar + ')', 'g'), function (match, $1) { + return $1; + }); + }; + var replaceLastQuery = function replaceLastQuery(selector, examiningQuery, replacementQuery) { + selector[selector.length - 1] = replacementQuery; + }; + + // NOTE: add new expression syntax here to have it recognised by the parser; + // - a query contains all adjacent (i.e. no separator in between) expressions; + // - the current query is stored in selector[i] + // - you need to check the query objects in match() for it actually filter properly, but that's pretty straight forward + var exprs = [{ + name: 'group', + // just used for identifying when debugging + query: true, + regex: '(' + tokens.group + ')', + populate: function populate(selector, query, _ref) { + var _ref2 = _slicedToArray(_ref, 1), + group = _ref2[0]; + query.checks.push({ + type: Type.GROUP, + value: group === '*' ? group : group + 's' + }); + } + }, { + name: 'state', + query: true, + regex: stateSelectorRegex, + populate: function populate(selector, query, _ref3) { + var _ref4 = _slicedToArray(_ref3, 1), + state = _ref4[0]; + query.checks.push({ + type: Type.STATE, + value: state + }); + } + }, { + name: 'id', + query: true, + regex: '\\#(' + tokens.id + ')', + populate: function populate(selector, query, _ref5) { + var _ref6 = _slicedToArray(_ref5, 1), + id = _ref6[0]; + query.checks.push({ + type: Type.ID, + value: cleanMetaChars(id) + }); + } + }, { + name: 'className', + query: true, + regex: '\\.(' + tokens.className + ')', + populate: function populate(selector, query, _ref7) { + var _ref8 = _slicedToArray(_ref7, 1), + className = _ref8[0]; + query.checks.push({ + type: Type.CLASS, + value: cleanMetaChars(className) + }); + } + }, { + name: 'dataExists', + query: true, + regex: '\\[\\s*(' + tokens.variable + ')\\s*\\]', + populate: function populate(selector, query, _ref9) { + var _ref10 = _slicedToArray(_ref9, 1), + variable = _ref10[0]; + query.checks.push({ + type: Type.DATA_EXIST, + field: cleanMetaChars(variable) + }); + } + }, { + name: 'dataCompare', + query: true, + regex: '\\[\\s*(' + tokens.variable + ')\\s*(' + tokens.comparatorOp + ')\\s*(' + tokens.value + ')\\s*\\]', + populate: function populate(selector, query, _ref11) { + var _ref12 = _slicedToArray(_ref11, 3), + variable = _ref12[0], + comparatorOp = _ref12[1], + value = _ref12[2]; + var valueIsString = new RegExp('^' + tokens.string + '$').exec(value) != null; + if (valueIsString) { + value = value.substring(1, value.length - 1); + } else { + value = parseFloat(value); + } + query.checks.push({ + type: Type.DATA_COMPARE, + field: cleanMetaChars(variable), + operator: comparatorOp, + value: value + }); + } + }, { + name: 'dataBool', + query: true, + regex: '\\[\\s*(' + tokens.boolOp + ')\\s*(' + tokens.variable + ')\\s*\\]', + populate: function populate(selector, query, _ref13) { + var _ref14 = _slicedToArray(_ref13, 2), + boolOp = _ref14[0], + variable = _ref14[1]; + query.checks.push({ + type: Type.DATA_BOOL, + field: cleanMetaChars(variable), + operator: boolOp + }); + } + }, { + name: 'metaCompare', + query: true, + regex: '\\[\\[\\s*(' + tokens.meta + ')\\s*(' + tokens.comparatorOp + ')\\s*(' + tokens.number + ')\\s*\\]\\]', + populate: function populate(selector, query, _ref15) { + var _ref16 = _slicedToArray(_ref15, 3), + meta = _ref16[0], + comparatorOp = _ref16[1], + number = _ref16[2]; + query.checks.push({ + type: Type.META_COMPARE, + field: cleanMetaChars(meta), + operator: comparatorOp, + value: parseFloat(number) + }); + } + }, { + name: 'nextQuery', + separator: true, + regex: tokens.separator, + populate: function populate(selector, query) { + var currentSubject = selector.currentSubject; + var edgeCount = selector.edgeCount; + var compoundCount = selector.compoundCount; + var lastQ = selector[selector.length - 1]; + if (currentSubject != null) { + lastQ.subject = currentSubject; + selector.currentSubject = null; + } + lastQ.edgeCount = edgeCount; + lastQ.compoundCount = compoundCount; + selector.edgeCount = 0; + selector.compoundCount = 0; + + // go on to next query + var nextQuery = selector[selector.length++] = newQuery(); + return nextQuery; // this is the new query to be filled by the following exprs + } + }, { + name: 'directedEdge', + separator: true, + regex: tokens.directedEdge, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // undirected edge + var edgeQuery = newQuery(); + var source = query; + var target = newQuery(); + edgeQuery.checks.push({ + type: Type.DIRECTED_EDGE, + source: source, + target: target + }); + + // the query in the selector should be the edge rather than the source + replaceLastQuery(selector, query, edgeQuery); + selector.edgeCount++; + + // we're now populating the target query with expressions that follow + return target; + } else { + // source/target + var srcTgtQ = newQuery(); + var _source = query; + var _target = newQuery(); + srcTgtQ.checks.push({ + type: Type.NODE_SOURCE, + source: _source, + target: _target + }); + + // the query in the selector should be the neighbourhood rather than the node + replaceLastQuery(selector, query, srcTgtQ); + selector.edgeCount++; + return _target; // now populating the target with the following expressions + } + } + }, { + name: 'undirectedEdge', + separator: true, + regex: tokens.undirectedEdge, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // undirected edge + var edgeQuery = newQuery(); + var source = query; + var target = newQuery(); + edgeQuery.checks.push({ + type: Type.UNDIRECTED_EDGE, + nodes: [source, target] + }); + + // the query in the selector should be the edge rather than the source + replaceLastQuery(selector, query, edgeQuery); + selector.edgeCount++; + + // we're now populating the target query with expressions that follow + return target; + } else { + // neighbourhood + var nhoodQ = newQuery(); + var node = query; + var neighbor = newQuery(); + nhoodQ.checks.push({ + type: Type.NODE_NEIGHBOR, + node: node, + neighbor: neighbor + }); + + // the query in the selector should be the neighbourhood rather than the node + replaceLastQuery(selector, query, nhoodQ); + return neighbor; // now populating the neighbor with following expressions + } + } + }, { + name: 'child', + separator: true, + regex: tokens.child, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // default: child query + var parentChildQuery = newQuery(); + var child = newQuery(); + var parent = selector[selector.length - 1]; + parentChildQuery.checks.push({ + type: Type.CHILD, + parent: parent, + child: child + }); + + // the query in the selector should be the '>' itself + replaceLastQuery(selector, query, parentChildQuery); + selector.compoundCount++; + + // we're now populating the child query with expressions that follow + return child; + } else if (selector.currentSubject === query) { + // compound split query + var compound = newQuery(); + var left = selector[selector.length - 1]; + var right = newQuery(); + var subject = newQuery(); + var _child = newQuery(); + var _parent = newQuery(); + + // set up the root compound q + compound.checks.push({ + type: Type.COMPOUND_SPLIT, + left: left, + right: right, + subject: subject + }); + + // populate the subject and replace the q at the old spot (within left) with TRUE + subject.checks = query.checks; // take the checks from the left + query.checks = [{ + type: Type.TRUE + }]; // checks under left refs the subject implicitly + + // set up the right q + _parent.checks.push({ + type: Type.TRUE + }); // parent implicitly refs the subject + right.checks.push({ + type: Type.PARENT, + // type is swapped on right side queries + parent: _parent, + child: _child // empty for now + }); + + replaceLastQuery(selector, left, compound); + + // update the ref since we moved things around for `query` + selector.currentSubject = subject; + selector.compoundCount++; + return _child; // now populating the right side's child + } else { + // parent query + // info for parent query + var _parent2 = newQuery(); + var _child2 = newQuery(); + var pcQChecks = [{ + type: Type.PARENT, + parent: _parent2, + child: _child2 + }]; + + // the parent-child query takes the place of the query previously being populated + _parent2.checks = query.checks; // the previous query contains the checks for the parent + query.checks = pcQChecks; // pc query takes over + + selector.compoundCount++; + return _child2; // we're now populating the child + } + } + }, { + name: 'descendant', + separator: true, + regex: tokens.descendant, + populate: function populate(selector, query) { + if (selector.currentSubject == null) { + // default: descendant query + var ancChQuery = newQuery(); + var descendant = newQuery(); + var ancestor = selector[selector.length - 1]; + ancChQuery.checks.push({ + type: Type.DESCENDANT, + ancestor: ancestor, + descendant: descendant + }); + + // the query in the selector should be the '>' itself + replaceLastQuery(selector, query, ancChQuery); + selector.compoundCount++; + + // we're now populating the descendant query with expressions that follow + return descendant; + } else if (selector.currentSubject === query) { + // compound split query + var compound = newQuery(); + var left = selector[selector.length - 1]; + var right = newQuery(); + var subject = newQuery(); + var _descendant = newQuery(); + var _ancestor = newQuery(); + + // set up the root compound q + compound.checks.push({ + type: Type.COMPOUND_SPLIT, + left: left, + right: right, + subject: subject + }); + + // populate the subject and replace the q at the old spot (within left) with TRUE + subject.checks = query.checks; // take the checks from the left + query.checks = [{ + type: Type.TRUE + }]; // checks under left refs the subject implicitly + + // set up the right q + _ancestor.checks.push({ + type: Type.TRUE + }); // ancestor implicitly refs the subject + right.checks.push({ + type: Type.ANCESTOR, + // type is swapped on right side queries + ancestor: _ancestor, + descendant: _descendant // empty for now + }); + + replaceLastQuery(selector, left, compound); + + // update the ref since we moved things around for `query` + selector.currentSubject = subject; + selector.compoundCount++; + return _descendant; // now populating the right side's descendant + } else { + // ancestor query + // info for parent query + var _ancestor2 = newQuery(); + var _descendant2 = newQuery(); + var adQChecks = [{ + type: Type.ANCESTOR, + ancestor: _ancestor2, + descendant: _descendant2 + }]; + + // the parent-child query takes the place of the query previously being populated + _ancestor2.checks = query.checks; // the previous query contains the checks for the parent + query.checks = adQChecks; // pc query takes over + + selector.compoundCount++; + return _descendant2; // we're now populating the child + } + } + }, { + name: 'subject', + modifier: true, + regex: tokens.subject, + populate: function populate(selector, query) { + if (selector.currentSubject != null && selector.currentSubject !== query) { + warn('Redefinition of subject in selector `' + selector.toString() + '`'); + return false; + } + selector.currentSubject = query; + var topQ = selector[selector.length - 1]; + var topChk = topQ.checks[0]; + var topType = topChk == null ? null : topChk.type; + if (topType === Type.DIRECTED_EDGE) { + // directed edge with subject on the target + + // change to target node check + topChk.type = Type.NODE_TARGET; + } else if (topType === Type.UNDIRECTED_EDGE) { + // undirected edge with subject on the second node + + // change to neighbor check + topChk.type = Type.NODE_NEIGHBOR; + topChk.node = topChk.nodes[1]; // second node is subject + topChk.neighbor = topChk.nodes[0]; + + // clean up unused fields for new type + topChk.nodes = null; + } + } + }]; + exprs.forEach(function (e) { + return e.regexObj = new RegExp('^' + e.regex); + }); + + /** + * Of all the expressions, find the first match in the remaining text. + * @param {string} remaining The remaining text to parse + * @returns The matched expression and the newly remaining text `{ expr, match, name, remaining }` + */ + var consumeExpr = function consumeExpr(remaining) { + var expr; + var match; + var name; + for (var j = 0; j < exprs.length; j++) { + var e = exprs[j]; + var n = e.name; + var m = remaining.match(e.regexObj); + if (m != null) { + match = m; + expr = e; + name = n; + var consumed = m[0]; + remaining = remaining.substring(consumed.length); + break; // we've consumed one expr, so we can return now + } + } + + return { + expr: expr, + match: match, + name: name, + remaining: remaining + }; + }; + + /** + * Consume all the leading whitespace + * @param {string} remaining The text to consume + * @returns The text with the leading whitespace removed + */ + var consumeWhitespace = function consumeWhitespace(remaining) { + var match = remaining.match(/^\s+/); + if (match) { + var consumed = match[0]; + remaining = remaining.substring(consumed.length); + } + return remaining; + }; + + /** + * Parse the string and store the parsed representation in the Selector. + * @param {string} selector The selector string + * @returns `true` if the selector was successfully parsed, `false` otherwise + */ + var parse = function parse(selector) { + var self = this; + var remaining = self.inputText = selector; + var currentQuery = self[0] = newQuery(); + self.length = 1; + remaining = consumeWhitespace(remaining); // get rid of leading whitespace + + for (;;) { + var exprInfo = consumeExpr(remaining); + if (exprInfo.expr == null) { + warn('The selector `' + selector + '`is invalid'); + return false; + } else { + var args = exprInfo.match.slice(1); + + // let the token populate the selector object in currentQuery + var ret = exprInfo.expr.populate(self, currentQuery, args); + if (ret === false) { + return false; // exit if population failed + } else if (ret != null) { + currentQuery = ret; // change the current query to be filled if the expr specifies + } + } + + remaining = exprInfo.remaining; + + // we're done when there's nothing left to parse + if (remaining.match(/^\s*$/)) { + break; + } + } + var lastQ = self[self.length - 1]; + if (self.currentSubject != null) { + lastQ.subject = self.currentSubject; + } + lastQ.edgeCount = self.edgeCount; + lastQ.compoundCount = self.compoundCount; + for (var i = 0; i < self.length; i++) { + var q = self[i]; + + // in future, this could potentially be allowed if there were operator precedence and detection of invalid combinations + if (q.compoundCount > 0 && q.edgeCount > 0) { + warn('The selector `' + selector + '` is invalid because it uses both a compound selector and an edge selector'); + return false; + } + if (q.edgeCount > 1) { + warn('The selector `' + selector + '` is invalid because it uses multiple edge selectors'); + return false; + } else if (q.edgeCount === 1) { + warn('The selector `' + selector + '` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.'); + } + } + return true; // success + }; + + /** + * Get the selector represented as a string. This value uses default formatting, + * so things like spacing may differ from the input text passed to the constructor. + * @returns {string} The selector string + */ + var toString = function toString() { + if (this.toStringCache != null) { + return this.toStringCache; + } + var clean = function clean(obj) { + if (obj == null) { + return ''; + } else { + return obj; + } + }; + var cleanVal = function cleanVal(val) { + if (string(val)) { + return '"' + val + '"'; + } else { + return clean(val); + } + }; + var space = function space(val) { + return ' ' + val + ' '; + }; + var checkToString = function checkToString(check, subject) { + var type = check.type, + value = check.value; + switch (type) { + case Type.GROUP: + { + var group = clean(value); + return group.substring(0, group.length - 1); + } + case Type.DATA_COMPARE: + { + var field = check.field, + operator = check.operator; + return '[' + field + space(clean(operator)) + cleanVal(value) + ']'; + } + case Type.DATA_BOOL: + { + var _operator = check.operator, + _field = check.field; + return '[' + clean(_operator) + _field + ']'; + } + case Type.DATA_EXIST: + { + var _field2 = check.field; + return '[' + _field2 + ']'; + } + case Type.META_COMPARE: + { + var _operator2 = check.operator, + _field3 = check.field; + return '[[' + _field3 + space(clean(_operator2)) + cleanVal(value) + ']]'; + } + case Type.STATE: + { + return value; + } + case Type.ID: + { + return '#' + value; + } + case Type.CLASS: + { + return '.' + value; + } + case Type.PARENT: + case Type.CHILD: + { + return queryToString(check.parent, subject) + space('>') + queryToString(check.child, subject); + } + case Type.ANCESTOR: + case Type.DESCENDANT: + { + return queryToString(check.ancestor, subject) + ' ' + queryToString(check.descendant, subject); + } + case Type.COMPOUND_SPLIT: + { + var lhs = queryToString(check.left, subject); + var sub = queryToString(check.subject, subject); + var rhs = queryToString(check.right, subject); + return lhs + (lhs.length > 0 ? ' ' : '') + sub + rhs; + } + case Type.TRUE: + { + return ''; + } + } + }; + var queryToString = function queryToString(query, subject) { + return query.checks.reduce(function (str, chk, i) { + return str + (subject === query && i === 0 ? '$' : '') + checkToString(chk, subject); + }, ''); + }; + var str = ''; + for (var i = 0; i < this.length; i++) { + var query = this[i]; + str += queryToString(query, query.subject); + if (this.length > 1 && i < this.length - 1) { + str += ', '; + } + } + this.toStringCache = str; + return str; + }; + var parse$1 = { + parse: parse, + toString: toString + }; + + var valCmp = function valCmp(fieldVal, operator, value) { + var matches; + var isFieldStr = string(fieldVal); + var isFieldNum = number$1(fieldVal); + var isValStr = string(value); + var fieldStr, valStr; + var caseInsensitive = false; + var notExpr = false; + var isIneqCmp = false; + if (operator.indexOf('!') >= 0) { + operator = operator.replace('!', ''); + notExpr = true; + } + if (operator.indexOf('@') >= 0) { + operator = operator.replace('@', ''); + caseInsensitive = true; + } + if (isFieldStr || isValStr || caseInsensitive) { + fieldStr = !isFieldStr && !isFieldNum ? '' : '' + fieldVal; + valStr = '' + value; + } + + // if we're doing a case insensitive comparison, then we're using a STRING comparison + // even if we're comparing numbers + if (caseInsensitive) { + fieldVal = fieldStr = fieldStr.toLowerCase(); + value = valStr = valStr.toLowerCase(); + } + switch (operator) { + case '*=': + matches = fieldStr.indexOf(valStr) >= 0; + break; + case '$=': + matches = fieldStr.indexOf(valStr, fieldStr.length - valStr.length) >= 0; + break; + case '^=': + matches = fieldStr.indexOf(valStr) === 0; + break; + case '=': + matches = fieldVal === value; + break; + case '>': + isIneqCmp = true; + matches = fieldVal > value; + break; + case '>=': + isIneqCmp = true; + matches = fieldVal >= value; + break; + case '<': + isIneqCmp = true; + matches = fieldVal < value; + break; + case '<=': + isIneqCmp = true; + matches = fieldVal <= value; + break; + default: + matches = false; + break; + } + + // apply the not op, but null vals for inequalities should always stay non-matching + if (notExpr && (fieldVal != null || !isIneqCmp)) { + matches = !matches; + } + return matches; + }; + var boolCmp = function boolCmp(fieldVal, operator) { + switch (operator) { + case '?': + return fieldVal ? true : false; + case '!': + return fieldVal ? false : true; + case '^': + return fieldVal === undefined; + } + }; + var existCmp = function existCmp(fieldVal) { + return fieldVal !== undefined; + }; + var data$1 = function data(ele, field) { + return ele.data(field); + }; + var meta = function meta(ele, field) { + return ele[field](); + }; + + /** A lookup of `match(check, ele)` functions by `Type` int */ + var match = []; + + /** + * Returns whether the query matches for the element + * @param query The `{ type, value, ... }` query object + * @param ele The element to compare against + */ + var matches$1 = function matches(query, ele) { + return query.checks.every(function (chk) { + return match[chk.type](chk, ele); + }); + }; + match[Type.GROUP] = function (check, ele) { + var group = check.value; + return group === '*' || group === ele.group(); + }; + match[Type.STATE] = function (check, ele) { + var stateSelector = check.value; + return stateSelectorMatches(stateSelector, ele); + }; + match[Type.ID] = function (check, ele) { + var id = check.value; + return ele.id() === id; + }; + match[Type.CLASS] = function (check, ele) { + var cls = check.value; + return ele.hasClass(cls); + }; + match[Type.META_COMPARE] = function (check, ele) { + var field = check.field, + operator = check.operator, + value = check.value; + return valCmp(meta(ele, field), operator, value); + }; + match[Type.DATA_COMPARE] = function (check, ele) { + var field = check.field, + operator = check.operator, + value = check.value; + return valCmp(data$1(ele, field), operator, value); + }; + match[Type.DATA_BOOL] = function (check, ele) { + var field = check.field, + operator = check.operator; + return boolCmp(data$1(ele, field), operator); + }; + match[Type.DATA_EXIST] = function (check, ele) { + var field = check.field; + check.operator; + return existCmp(data$1(ele, field)); + }; + match[Type.UNDIRECTED_EDGE] = function (check, ele) { + var qA = check.nodes[0]; + var qB = check.nodes[1]; + var src = ele.source(); + var tgt = ele.target(); + return matches$1(qA, src) && matches$1(qB, tgt) || matches$1(qB, src) && matches$1(qA, tgt); + }; + match[Type.NODE_NEIGHBOR] = function (check, ele) { + return matches$1(check.node, ele) && ele.neighborhood().some(function (n) { + return n.isNode() && matches$1(check.neighbor, n); + }); + }; + match[Type.DIRECTED_EDGE] = function (check, ele) { + return matches$1(check.source, ele.source()) && matches$1(check.target, ele.target()); + }; + match[Type.NODE_SOURCE] = function (check, ele) { + return matches$1(check.source, ele) && ele.outgoers().some(function (n) { + return n.isNode() && matches$1(check.target, n); + }); + }; + match[Type.NODE_TARGET] = function (check, ele) { + return matches$1(check.target, ele) && ele.incomers().some(function (n) { + return n.isNode() && matches$1(check.source, n); + }); + }; + match[Type.CHILD] = function (check, ele) { + return matches$1(check.child, ele) && matches$1(check.parent, ele.parent()); + }; + match[Type.PARENT] = function (check, ele) { + return matches$1(check.parent, ele) && ele.children().some(function (c) { + return matches$1(check.child, c); + }); + }; + match[Type.DESCENDANT] = function (check, ele) { + return matches$1(check.descendant, ele) && ele.ancestors().some(function (a) { + return matches$1(check.ancestor, a); + }); + }; + match[Type.ANCESTOR] = function (check, ele) { + return matches$1(check.ancestor, ele) && ele.descendants().some(function (d) { + return matches$1(check.descendant, d); + }); + }; + match[Type.COMPOUND_SPLIT] = function (check, ele) { + return matches$1(check.subject, ele) && matches$1(check.left, ele) && matches$1(check.right, ele); + }; + match[Type.TRUE] = function () { + return true; + }; + match[Type.COLLECTION] = function (check, ele) { + var collection = check.value; + return collection.has(ele); + }; + match[Type.FILTER] = function (check, ele) { + var filter = check.value; + return filter(ele); + }; + + // filter an existing collection + var filter = function filter(collection) { + var self = this; + + // for 1 id #foo queries, just get the element + if (self.length === 1 && self[0].checks.length === 1 && self[0].checks[0].type === Type.ID) { + return collection.getElementById(self[0].checks[0].value).collection(); + } + var selectorFunction = function selectorFunction(element) { + for (var j = 0; j < self.length; j++) { + var query = self[j]; + if (matches$1(query, element)) { + return true; + } + } + return false; + }; + if (self.text() == null) { + selectorFunction = function selectorFunction() { + return true; + }; + } + return collection.filter(selectorFunction); + }; // filter + + // does selector match a single element? + var matches = function matches(ele) { + var self = this; + for (var j = 0; j < self.length; j++) { + var query = self[j]; + if (matches$1(query, ele)) { + return true; + } + } + return false; + }; // matches + + var matching = { + matches: matches, + filter: filter + }; + + var Selector = function Selector(selector) { + this.inputText = selector; + this.currentSubject = null; + this.compoundCount = 0; + this.edgeCount = 0; + this.length = 0; + if (selector == null || string(selector) && selector.match(/^\s*$/)) ; else if (elementOrCollection(selector)) { + this.addQuery({ + checks: [{ + type: Type.COLLECTION, + value: selector.collection() + }] + }); + } else if (fn$6(selector)) { + this.addQuery({ + checks: [{ + type: Type.FILTER, + value: selector + }] + }); + } else if (string(selector)) { + if (!this.parse(selector)) { + this.invalid = true; + } + } else { + error('A selector must be created from a string; found '); + } + }; + var selfn = Selector.prototype; + [parse$1, matching].forEach(function (p) { + return extend(selfn, p); + }); + selfn.text = function () { + return this.inputText; + }; + selfn.size = function () { + return this.length; + }; + selfn.eq = function (i) { + return this[i]; + }; + selfn.sameText = function (otherSel) { + return !this.invalid && !otherSel.invalid && this.text() === otherSel.text(); + }; + selfn.addQuery = function (q) { + this[this.length++] = q; + }; + selfn.selector = selfn.toString; + + var elesfn$g = { + allAre: function allAre(selector) { + var selObj = new Selector(selector); + return this.every(function (ele) { + return selObj.matches(ele); + }); + }, + is: function is(selector) { + var selObj = new Selector(selector); + return this.some(function (ele) { + return selObj.matches(ele); + }); + }, + some: function some(fn, thisArg) { + for (var i = 0; i < this.length; i++) { + var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]); + if (ret) { + return true; + } + } + return false; + }, + every: function every(fn, thisArg) { + for (var i = 0; i < this.length; i++) { + var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]); + if (!ret) { + return false; + } + } + return true; + }, + same: function same(collection) { + // cheap collection ref check + if (this === collection) { + return true; + } + collection = this.cy().collection(collection); + var thisLength = this.length; + var collectionLength = collection.length; + + // cheap length check + if (thisLength !== collectionLength) { + return false; + } + + // cheap element ref check + if (thisLength === 1) { + return this[0] === collection[0]; + } + return this.every(function (ele) { + return collection.hasElementWithId(ele.id()); + }); + }, + anySame: function anySame(collection) { + collection = this.cy().collection(collection); + return this.some(function (ele) { + return collection.hasElementWithId(ele.id()); + }); + }, + allAreNeighbors: function allAreNeighbors(collection) { + collection = this.cy().collection(collection); + var nhood = this.neighborhood(); + return collection.every(function (ele) { + return nhood.hasElementWithId(ele.id()); + }); + }, + contains: function contains(collection) { + collection = this.cy().collection(collection); + var self = this; + return collection.every(function (ele) { + return self.hasElementWithId(ele.id()); + }); + } + }; + elesfn$g.allAreNeighbours = elesfn$g.allAreNeighbors; + elesfn$g.has = elesfn$g.contains; + elesfn$g.equal = elesfn$g.equals = elesfn$g.same; + + var cache = function cache(fn, name) { + return function traversalCache(arg1, arg2, arg3, arg4) { + var selectorOrEles = arg1; + var eles = this; + var key; + if (selectorOrEles == null) { + key = ''; + } else if (elementOrCollection(selectorOrEles) && selectorOrEles.length === 1) { + key = selectorOrEles.id(); + } + if (eles.length === 1 && key) { + var _p = eles[0]._private; + var tch = _p.traversalCache = _p.traversalCache || {}; + var ch = tch[name] = tch[name] || []; + var hash = hashString(key); + var cacheHit = ch[hash]; + if (cacheHit) { + return cacheHit; + } else { + return ch[hash] = fn.call(eles, arg1, arg2, arg3, arg4); + } + } else { + return fn.call(eles, arg1, arg2, arg3, arg4); + } + }; + }; + + var elesfn$f = { + parent: function parent(selector) { + var parents = []; + + // optimisation for single ele call + if (this.length === 1) { + var parent = this[0]._private.parent; + if (parent) { + return parent; + } + } + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var _parent = ele._private.parent; + if (_parent) { + parents.push(_parent); + } + } + return this.spawn(parents, true).filter(selector); + }, + parents: function parents(selector) { + var parents = []; + var eles = this.parent(); + while (eles.nonempty()) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + parents.push(ele); + } + eles = eles.parent(); + } + return this.spawn(parents, true).filter(selector); + }, + commonAncestors: function commonAncestors(selector) { + var ancestors; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var parents = ele.parents(); + ancestors = ancestors || parents; + ancestors = ancestors.intersect(parents); // current list must be common with current ele parents set + } + + return ancestors.filter(selector); + }, + orphans: function orphans(selector) { + return this.stdFilter(function (ele) { + return ele.isOrphan(); + }).filter(selector); + }, + nonorphans: function nonorphans(selector) { + return this.stdFilter(function (ele) { + return ele.isChild(); + }).filter(selector); + }, + children: cache(function (selector) { + var children = []; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var eleChildren = ele._private.children; + for (var j = 0; j < eleChildren.length; j++) { + children.push(eleChildren[j]); + } + } + return this.spawn(children, true).filter(selector); + }, 'children'), + siblings: function siblings(selector) { + return this.parent().children().not(this).filter(selector); + }, + isParent: function isParent() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.children.length !== 0; + } + }, + isChildless: function isChildless() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.children.length === 0; + } + }, + isChild: function isChild() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.parent != null; + } + }, + isOrphan: function isOrphan() { + var ele = this[0]; + if (ele) { + return ele.isNode() && ele._private.parent == null; + } + }, + descendants: function descendants(selector) { + var elements = []; + function add(eles) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + elements.push(ele); + if (ele.children().nonempty()) { + add(ele.children()); + } + } + } + add(this.children()); + return this.spawn(elements, true).filter(selector); + } + }; + function forEachCompound(eles, fn, includeSelf, recursiveStep) { + var q = []; + var did = new Set$1(); + var cy = eles.cy(); + var hasCompounds = cy.hasCompoundNodes(); + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + if (includeSelf) { + q.push(ele); + } else if (hasCompounds) { + recursiveStep(q, did, ele); + } + } + while (q.length > 0) { + var _ele = q.shift(); + fn(_ele); + did.add(_ele.id()); + if (hasCompounds) { + recursiveStep(q, did, _ele); + } + } + return eles; + } + function addChildren(q, did, ele) { + if (ele.isParent()) { + var children = ele._private.children; + for (var i = 0; i < children.length; i++) { + var child = children[i]; + if (!did.has(child.id())) { + q.push(child); + } + } + } + } + + // very efficient version of eles.add( eles.descendants() ).forEach() + // for internal use + elesfn$f.forEachDown = function (fn) { + var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return forEachCompound(this, fn, includeSelf, addChildren); + }; + function addParent(q, did, ele) { + if (ele.isChild()) { + var parent = ele._private.parent; + if (!did.has(parent.id())) { + q.push(parent); + } + } + } + elesfn$f.forEachUp = function (fn) { + var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return forEachCompound(this, fn, includeSelf, addParent); + }; + function addParentAndChildren(q, did, ele) { + addParent(q, did, ele); + addChildren(q, did, ele); + } + elesfn$f.forEachUpAndDown = function (fn) { + var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + return forEachCompound(this, fn, includeSelf, addParentAndChildren); + }; + + // aliases + elesfn$f.ancestors = elesfn$f.parents; + + var fn$5, elesfn$e; + fn$5 = elesfn$e = { + data: define.data({ + field: 'data', + bindingEvent: 'data', + allowBinding: true, + allowSetting: true, + settingEvent: 'data', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + immutableKeys: { + 'id': true, + 'source': true, + 'target': true, + 'parent': true + }, + updateStyle: true + }), + removeData: define.removeData({ + field: 'data', + event: 'data', + triggerFnName: 'trigger', + triggerEvent: true, + immutableKeys: { + 'id': true, + 'source': true, + 'target': true, + 'parent': true + }, + updateStyle: true + }), + scratch: define.data({ + field: 'scratch', + bindingEvent: 'scratch', + allowBinding: true, + allowSetting: true, + settingEvent: 'scratch', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + updateStyle: true + }), + removeScratch: define.removeData({ + field: 'scratch', + event: 'scratch', + triggerFnName: 'trigger', + triggerEvent: true, + updateStyle: true + }), + rscratch: define.data({ + field: 'rscratch', + allowBinding: false, + allowSetting: true, + settingTriggersEvent: false, + allowGetting: true + }), + removeRscratch: define.removeData({ + field: 'rscratch', + triggerEvent: false + }), + id: function id() { + var ele = this[0]; + if (ele) { + return ele._private.data.id; + } + } + }; + + // aliases + fn$5.attr = fn$5.data; + fn$5.removeAttr = fn$5.removeData; + var data = elesfn$e; + + var elesfn$d = {}; + function defineDegreeFunction(callback) { + return function (includeLoops) { + var self = this; + if (includeLoops === undefined) { + includeLoops = true; + } + if (self.length === 0) { + return; + } + if (self.isNode() && !self.removed()) { + var degree = 0; + var node = self[0]; + var connectedEdges = node._private.edges; + for (var i = 0; i < connectedEdges.length; i++) { + var edge = connectedEdges[i]; + if (!includeLoops && edge.isLoop()) { + continue; + } + degree += callback(node, edge); + } + return degree; + } else { + return; + } + }; + } + extend(elesfn$d, { + degree: defineDegreeFunction(function (node, edge) { + if (edge.source().same(edge.target())) { + return 2; + } else { + return 1; + } + }), + indegree: defineDegreeFunction(function (node, edge) { + if (edge.target().same(node)) { + return 1; + } else { + return 0; + } + }), + outdegree: defineDegreeFunction(function (node, edge) { + if (edge.source().same(node)) { + return 1; + } else { + return 0; + } + }) + }); + function defineDegreeBoundsFunction(degreeFn, callback) { + return function (includeLoops) { + var ret; + var nodes = this.nodes(); + for (var i = 0; i < nodes.length; i++) { + var ele = nodes[i]; + var degree = ele[degreeFn](includeLoops); + if (degree !== undefined && (ret === undefined || callback(degree, ret))) { + ret = degree; + } + } + return ret; + }; + } + extend(elesfn$d, { + minDegree: defineDegreeBoundsFunction('degree', function (degree, min) { + return degree < min; + }), + maxDegree: defineDegreeBoundsFunction('degree', function (degree, max) { + return degree > max; + }), + minIndegree: defineDegreeBoundsFunction('indegree', function (degree, min) { + return degree < min; + }), + maxIndegree: defineDegreeBoundsFunction('indegree', function (degree, max) { + return degree > max; + }), + minOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, min) { + return degree < min; + }), + maxOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, max) { + return degree > max; + }) + }); + extend(elesfn$d, { + totalDegree: function totalDegree(includeLoops) { + var total = 0; + var nodes = this.nodes(); + for (var i = 0; i < nodes.length; i++) { + total += nodes[i].degree(includeLoops); + } + return total; + } + }); + + var fn$4, elesfn$c; + var beforePositionSet = function beforePositionSet(eles, newPos, silent) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + if (!ele.locked()) { + var oldPos = ele._private.position; + var delta = { + x: newPos.x != null ? newPos.x - oldPos.x : 0, + y: newPos.y != null ? newPos.y - oldPos.y : 0 + }; + if (ele.isParent() && !(delta.x === 0 && delta.y === 0)) { + ele.children().shift(delta, silent); + } + ele.dirtyBoundingBoxCache(); + } + } + }; + var positionDef = { + field: 'position', + bindingEvent: 'position', + allowBinding: true, + allowSetting: true, + settingEvent: 'position', + settingTriggersEvent: true, + triggerFnName: 'emitAndNotify', + allowGetting: true, + validKeys: ['x', 'y'], + beforeGet: function beforeGet(ele) { + ele.updateCompoundBounds(); + }, + beforeSet: function beforeSet(eles, newPos) { + beforePositionSet(eles, newPos, false); + }, + onSet: function onSet(eles) { + eles.dirtyCompoundBoundsCache(); + }, + canSet: function canSet(ele) { + return !ele.locked(); + } + }; + fn$4 = elesfn$c = { + position: define.data(positionDef), + // position but no notification to renderer + silentPosition: define.data(extend({}, positionDef, { + allowBinding: false, + allowSetting: true, + settingTriggersEvent: false, + allowGetting: false, + beforeSet: function beforeSet(eles, newPos) { + beforePositionSet(eles, newPos, true); + }, + onSet: function onSet(eles) { + eles.dirtyCompoundBoundsCache(); + } + })), + positions: function positions(pos, silent) { + if (plainObject(pos)) { + if (silent) { + this.silentPosition(pos); + } else { + this.position(pos); + } + } else if (fn$6(pos)) { + var _fn = pos; + var cy = this.cy(); + cy.startBatch(); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var _pos = void 0; + if (_pos = _fn(ele, i)) { + if (silent) { + ele.silentPosition(_pos); + } else { + ele.position(_pos); + } + } + } + cy.endBatch(); + } + return this; // chaining + }, + + silentPositions: function silentPositions(pos) { + return this.positions(pos, true); + }, + shift: function shift(dim, val, silent) { + var delta; + if (plainObject(dim)) { + delta = { + x: number$1(dim.x) ? dim.x : 0, + y: number$1(dim.y) ? dim.y : 0 + }; + silent = val; + } else if (string(dim) && number$1(val)) { + delta = { + x: 0, + y: 0 + }; + delta[dim] = val; + } + if (delta != null) { + var cy = this.cy(); + cy.startBatch(); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + + // exclude any node that is a descendant of the calling collection + if (cy.hasCompoundNodes() && ele.isChild() && ele.ancestors().anySame(this)) { + continue; + } + var pos = ele.position(); + var newPos = { + x: pos.x + delta.x, + y: pos.y + delta.y + }; + if (silent) { + ele.silentPosition(newPos); + } else { + ele.position(newPos); + } + } + cy.endBatch(); + } + return this; + }, + silentShift: function silentShift(dim, val) { + if (plainObject(dim)) { + this.shift(dim, true); + } else if (string(dim) && number$1(val)) { + this.shift(dim, val, true); + } + return this; + }, + // get/set the rendered (i.e. on screen) positon of the element + renderedPosition: function renderedPosition(dim, val) { + var ele = this[0]; + var cy = this.cy(); + var zoom = cy.zoom(); + var pan = cy.pan(); + var rpos = plainObject(dim) ? dim : undefined; + var setting = rpos !== undefined || val !== undefined && string(dim); + if (ele && ele.isNode()) { + // must have an element and must be a node to return position + if (setting) { + for (var i = 0; i < this.length; i++) { + var _ele = this[i]; + if (val !== undefined) { + // set one dimension + _ele.position(dim, (val - pan[dim]) / zoom); + } else if (rpos !== undefined) { + // set whole position + _ele.position(renderedToModelPosition(rpos, zoom, pan)); + } + } + } else { + // getting + var pos = ele.position(); + rpos = modelToRenderedPosition(pos, zoom, pan); + if (dim === undefined) { + // then return the whole rendered position + return rpos; + } else { + // then return the specified dimension + return rpos[dim]; + } + } + } else if (!setting) { + return undefined; // for empty collection case + } + + return this; // chaining + }, + + // get/set the position relative to the parent + relativePosition: function relativePosition(dim, val) { + var ele = this[0]; + var cy = this.cy(); + var ppos = plainObject(dim) ? dim : undefined; + var setting = ppos !== undefined || val !== undefined && string(dim); + var hasCompoundNodes = cy.hasCompoundNodes(); + if (ele && ele.isNode()) { + // must have an element and must be a node to return position + if (setting) { + for (var i = 0; i < this.length; i++) { + var _ele2 = this[i]; + var parent = hasCompoundNodes ? _ele2.parent() : null; + var hasParent = parent && parent.length > 0; + var relativeToParent = hasParent; + if (hasParent) { + parent = parent[0]; + } + var origin = relativeToParent ? parent.position() : { + x: 0, + y: 0 + }; + if (val !== undefined) { + // set one dimension + _ele2.position(dim, val + origin[dim]); + } else if (ppos !== undefined) { + // set whole position + _ele2.position({ + x: ppos.x + origin.x, + y: ppos.y + origin.y + }); + } + } + } else { + // getting + var pos = ele.position(); + var _parent = hasCompoundNodes ? ele.parent() : null; + var _hasParent = _parent && _parent.length > 0; + var _relativeToParent = _hasParent; + if (_hasParent) { + _parent = _parent[0]; + } + var _origin = _relativeToParent ? _parent.position() : { + x: 0, + y: 0 + }; + ppos = { + x: pos.x - _origin.x, + y: pos.y - _origin.y + }; + if (dim === undefined) { + // then return the whole rendered position + return ppos; + } else { + // then return the specified dimension + return ppos[dim]; + } + } + } else if (!setting) { + return undefined; // for empty collection case + } + + return this; // chaining + } + }; + + // aliases + fn$4.modelPosition = fn$4.point = fn$4.position; + fn$4.modelPositions = fn$4.points = fn$4.positions; + fn$4.renderedPoint = fn$4.renderedPosition; + fn$4.relativePoint = fn$4.relativePosition; + var position = elesfn$c; + + var fn$3, elesfn$b; + fn$3 = elesfn$b = {}; + elesfn$b.renderedBoundingBox = function (options) { + var bb = this.boundingBox(options); + var cy = this.cy(); + var zoom = cy.zoom(); + var pan = cy.pan(); + var x1 = bb.x1 * zoom + pan.x; + var x2 = bb.x2 * zoom + pan.x; + var y1 = bb.y1 * zoom + pan.y; + var y2 = bb.y2 * zoom + pan.y; + return { + x1: x1, + x2: x2, + y1: y1, + y2: y2, + w: x2 - x1, + h: y2 - y1 + }; + }; + elesfn$b.dirtyCompoundBoundsCache = function () { + var silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var cy = this.cy(); + if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { + return this; + } + this.forEachUp(function (ele) { + if (ele.isParent()) { + var _p = ele._private; + _p.compoundBoundsClean = false; + _p.bbCache = null; + if (!silent) { + ele.emitAndNotify('bounds'); + } + } + }); + return this; + }; + elesfn$b.updateCompoundBounds = function () { + var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var cy = this.cy(); + + // not possible to do on non-compound graphs or with the style disabled + if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { + return this; + } + + // save cycles when batching -- but bounds will be stale (or not exist yet) + if (!force && cy.batching()) { + return this; + } + function update(parent) { + if (!parent.isParent()) { + return; + } + var _p = parent._private; + var children = parent.children(); + var includeLabels = parent.pstyle('compound-sizing-wrt-labels').value === 'include'; + var min = { + width: { + val: parent.pstyle('min-width').pfValue, + left: parent.pstyle('min-width-bias-left'), + right: parent.pstyle('min-width-bias-right') + }, + height: { + val: parent.pstyle('min-height').pfValue, + top: parent.pstyle('min-height-bias-top'), + bottom: parent.pstyle('min-height-bias-bottom') + } + }; + var bb = children.boundingBox({ + includeLabels: includeLabels, + includeOverlays: false, + // updating the compound bounds happens outside of the regular + // cache cycle (i.e. before fired events) + useCache: false + }); + var pos = _p.position; + + // if children take up zero area then keep position and fall back on stylesheet w/h + if (bb.w === 0 || bb.h === 0) { + bb = { + w: parent.pstyle('width').pfValue, + h: parent.pstyle('height').pfValue + }; + bb.x1 = pos.x - bb.w / 2; + bb.x2 = pos.x + bb.w / 2; + bb.y1 = pos.y - bb.h / 2; + bb.y2 = pos.y + bb.h / 2; + } + function computeBiasValues(propDiff, propBias, propBiasComplement) { + var biasDiff = 0; + var biasComplementDiff = 0; + var biasTotal = propBias + propBiasComplement; + if (propDiff > 0 && biasTotal > 0) { + biasDiff = propBias / biasTotal * propDiff; + biasComplementDiff = propBiasComplement / biasTotal * propDiff; + } + return { + biasDiff: biasDiff, + biasComplementDiff: biasComplementDiff + }; + } + function computePaddingValues(width, height, paddingObject, relativeTo) { + // Assuming percentage is number from 0 to 1 + if (paddingObject.units === '%') { + switch (relativeTo) { + case 'width': + return width > 0 ? paddingObject.pfValue * width : 0; + case 'height': + return height > 0 ? paddingObject.pfValue * height : 0; + case 'average': + return width > 0 && height > 0 ? paddingObject.pfValue * (width + height) / 2 : 0; + case 'min': + return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * height : paddingObject.pfValue * width : 0; + case 'max': + return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * width : paddingObject.pfValue * height : 0; + default: + return 0; + } + } else if (paddingObject.units === 'px') { + return paddingObject.pfValue; + } else { + return 0; + } + } + var leftVal = min.width.left.value; + if (min.width.left.units === 'px' && min.width.val > 0) { + leftVal = leftVal * 100 / min.width.val; + } + var rightVal = min.width.right.value; + if (min.width.right.units === 'px' && min.width.val > 0) { + rightVal = rightVal * 100 / min.width.val; + } + var topVal = min.height.top.value; + if (min.height.top.units === 'px' && min.height.val > 0) { + topVal = topVal * 100 / min.height.val; + } + var bottomVal = min.height.bottom.value; + if (min.height.bottom.units === 'px' && min.height.val > 0) { + bottomVal = bottomVal * 100 / min.height.val; + } + var widthBiasDiffs = computeBiasValues(min.width.val - bb.w, leftVal, rightVal); + var diffLeft = widthBiasDiffs.biasDiff; + var diffRight = widthBiasDiffs.biasComplementDiff; + var heightBiasDiffs = computeBiasValues(min.height.val - bb.h, topVal, bottomVal); + var diffTop = heightBiasDiffs.biasDiff; + var diffBottom = heightBiasDiffs.biasComplementDiff; + _p.autoPadding = computePaddingValues(bb.w, bb.h, parent.pstyle('padding'), parent.pstyle('padding-relative-to').value); + _p.autoWidth = Math.max(bb.w, min.width.val); + pos.x = (-diffLeft + bb.x1 + bb.x2 + diffRight) / 2; + _p.autoHeight = Math.max(bb.h, min.height.val); + pos.y = (-diffTop + bb.y1 + bb.y2 + diffBottom) / 2; + } + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var _p = ele._private; + if (!_p.compoundBoundsClean || force) { + update(ele); + if (!cy.batching()) { + _p.compoundBoundsClean = true; + } + } + } + return this; + }; + var noninf = function noninf(x) { + if (x === Infinity || x === -Infinity) { + return 0; + } + return x; + }; + var updateBounds = function updateBounds(b, x1, y1, x2, y2) { + // don't update with zero area boxes + if (x2 - x1 === 0 || y2 - y1 === 0) { + return; + } + + // don't update with null dim + if (x1 == null || y1 == null || x2 == null || y2 == null) { + return; + } + b.x1 = x1 < b.x1 ? x1 : b.x1; + b.x2 = x2 > b.x2 ? x2 : b.x2; + b.y1 = y1 < b.y1 ? y1 : b.y1; + b.y2 = y2 > b.y2 ? y2 : b.y2; + b.w = b.x2 - b.x1; + b.h = b.y2 - b.y1; + }; + var updateBoundsFromBox = function updateBoundsFromBox(b, b2) { + if (b2 == null) { + return b; + } + return updateBounds(b, b2.x1, b2.y1, b2.x2, b2.y2); + }; + var prefixedProperty = function prefixedProperty(obj, field, prefix) { + return getPrefixedProperty(obj, field, prefix); + }; + var updateBoundsFromArrow = function updateBoundsFromArrow(bounds, ele, prefix) { + if (ele.cy().headless()) { + return; + } + var _p = ele._private; + var rstyle = _p.rstyle; + var halfArW = rstyle.arrowWidth / 2; + var arrowType = ele.pstyle(prefix + '-arrow-shape').value; + var x; + var y; + if (arrowType !== 'none') { + if (prefix === 'source') { + x = rstyle.srcX; + y = rstyle.srcY; + } else if (prefix === 'target') { + x = rstyle.tgtX; + y = rstyle.tgtY; + } else { + x = rstyle.midX; + y = rstyle.midY; + } + + // always store the individual arrow bounds + var bbs = _p.arrowBounds = _p.arrowBounds || {}; + var bb = bbs[prefix] = bbs[prefix] || {}; + bb.x1 = x - halfArW; + bb.y1 = y - halfArW; + bb.x2 = x + halfArW; + bb.y2 = y + halfArW; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + expandBoundingBox(bb, 1); + updateBounds(bounds, bb.x1, bb.y1, bb.x2, bb.y2); + } + }; + var updateBoundsFromLabel = function updateBoundsFromLabel(bounds, ele, prefix) { + if (ele.cy().headless()) { + return; + } + var prefixDash; + if (prefix) { + prefixDash = prefix + '-'; + } else { + prefixDash = ''; + } + var _p = ele._private; + var rstyle = _p.rstyle; + var label = ele.pstyle(prefixDash + 'label').strValue; + if (label) { + var halign = ele.pstyle('text-halign'); + var valign = ele.pstyle('text-valign'); + var labelWidth = prefixedProperty(rstyle, 'labelWidth', prefix); + var labelHeight = prefixedProperty(rstyle, 'labelHeight', prefix); + var labelX = prefixedProperty(rstyle, 'labelX', prefix); + var labelY = prefixedProperty(rstyle, 'labelY', prefix); + var marginX = ele.pstyle(prefixDash + 'text-margin-x').pfValue; + var marginY = ele.pstyle(prefixDash + 'text-margin-y').pfValue; + var isEdge = ele.isEdge(); + var rotation = ele.pstyle(prefixDash + 'text-rotation'); + var outlineWidth = ele.pstyle('text-outline-width').pfValue; + var borderWidth = ele.pstyle('text-border-width').pfValue; + var halfBorderWidth = borderWidth / 2; + var padding = ele.pstyle('text-background-padding').pfValue; + var marginOfError = 2; // expand to work around browser dimension inaccuracies + + var lh = labelHeight; + var lw = labelWidth; + var lw_2 = lw / 2; + var lh_2 = lh / 2; + var lx1, lx2, ly1, ly2; + if (isEdge) { + lx1 = labelX - lw_2; + lx2 = labelX + lw_2; + ly1 = labelY - lh_2; + ly2 = labelY + lh_2; + } else { + switch (halign.value) { + case 'left': + lx1 = labelX - lw; + lx2 = labelX; + break; + case 'center': + lx1 = labelX - lw_2; + lx2 = labelX + lw_2; + break; + case 'right': + lx1 = labelX; + lx2 = labelX + lw; + break; + } + switch (valign.value) { + case 'top': + ly1 = labelY - lh; + ly2 = labelY; + break; + case 'center': + ly1 = labelY - lh_2; + ly2 = labelY + lh_2; + break; + case 'bottom': + ly1 = labelY; + ly2 = labelY + lh; + break; + } + } + + // shift by margin and expand by outline and border + lx1 += marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; + lx2 += marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; + ly1 += marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; + ly2 += marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; + + // always store the unrotated label bounds separately + var bbPrefix = prefix || 'main'; + var bbs = _p.labelBounds; + var bb = bbs[bbPrefix] = bbs[bbPrefix] || {}; + bb.x1 = lx1; + bb.y1 = ly1; + bb.x2 = lx2; + bb.y2 = ly2; + bb.w = lx2 - lx1; + bb.h = ly2 - ly1; + var isAutorotate = isEdge && rotation.strValue === 'autorotate'; + var isPfValue = rotation.pfValue != null && rotation.pfValue !== 0; + if (isAutorotate || isPfValue) { + var theta = isAutorotate ? prefixedProperty(_p.rstyle, 'labelAngle', prefix) : rotation.pfValue; + var cos = Math.cos(theta); + var sin = Math.sin(theta); + + // rotation point (default value for center-center) + var xo = (lx1 + lx2) / 2; + var yo = (ly1 + ly2) / 2; + if (!isEdge) { + switch (halign.value) { + case 'left': + xo = lx2; + break; + case 'right': + xo = lx1; + break; + } + switch (valign.value) { + case 'top': + yo = ly2; + break; + case 'bottom': + yo = ly1; + break; + } + } + var rotate = function rotate(x, y) { + x = x - xo; + y = y - yo; + return { + x: x * cos - y * sin + xo, + y: x * sin + y * cos + yo + }; + }; + var px1y1 = rotate(lx1, ly1); + var px1y2 = rotate(lx1, ly2); + var px2y1 = rotate(lx2, ly1); + var px2y2 = rotate(lx2, ly2); + lx1 = Math.min(px1y1.x, px1y2.x, px2y1.x, px2y2.x); + lx2 = Math.max(px1y1.x, px1y2.x, px2y1.x, px2y2.x); + ly1 = Math.min(px1y1.y, px1y2.y, px2y1.y, px2y2.y); + ly2 = Math.max(px1y1.y, px1y2.y, px2y1.y, px2y2.y); + } + var bbPrefixRot = bbPrefix + 'Rot'; + var bbRot = bbs[bbPrefixRot] = bbs[bbPrefixRot] || {}; + bbRot.x1 = lx1; + bbRot.y1 = ly1; + bbRot.x2 = lx2; + bbRot.y2 = ly2; + bbRot.w = lx2 - lx1; + bbRot.h = ly2 - ly1; + updateBounds(bounds, lx1, ly1, lx2, ly2); + updateBounds(_p.labelBounds.all, lx1, ly1, lx2, ly2); + } + return bounds; + }; + var updateBoundsFromOutline = function updateBoundsFromOutline(bounds, ele) { + if (ele.cy().headless()) { + return; + } + var outlineOpacity = ele.pstyle('outline-opacity').value; + var outlineWidth = ele.pstyle('outline-width').value; + if (outlineOpacity > 0 && outlineWidth > 0) { + var outlineOffset = ele.pstyle('outline-offset').value; + var nodeShape = ele.pstyle('shape').value; + var outlineSize = outlineWidth + outlineOffset; + var scaleX = (bounds.w + outlineSize * 2) / bounds.w; + var scaleY = (bounds.h + outlineSize * 2) / bounds.h; + var xOffset = 0; + var yOffset = 0; + if (["diamond", "pentagon", "round-triangle"].includes(nodeShape)) { + scaleX = (bounds.w + outlineSize * 2.4) / bounds.w; + yOffset = -outlineSize / 3.6; + } else if (["concave-hexagon", "rhomboid", "right-rhomboid"].includes(nodeShape)) { + scaleX = (bounds.w + outlineSize * 2.4) / bounds.w; + } else if (nodeShape === "star") { + scaleX = (bounds.w + outlineSize * 2.8) / bounds.w; + scaleY = (bounds.h + outlineSize * 2.6) / bounds.h; + yOffset = -outlineSize / 3.8; + } else if (nodeShape === "triangle") { + scaleX = (bounds.w + outlineSize * 2.8) / bounds.w; + scaleY = (bounds.h + outlineSize * 2.4) / bounds.h; + yOffset = -outlineSize / 1.4; + } else if (nodeShape === "vee") { + scaleX = (bounds.w + outlineSize * 4.4) / bounds.w; + scaleY = (bounds.h + outlineSize * 3.8) / bounds.h; + yOffset = -outlineSize * .5; + } + var hDelta = bounds.h * scaleY - bounds.h; + var wDelta = bounds.w * scaleX - bounds.w; + expandBoundingBoxSides(bounds, [Math.ceil(hDelta / 2), Math.ceil(wDelta / 2)]); + if (xOffset != 0 || yOffset !== 0) { + var oBounds = shiftBoundingBox(bounds, xOffset, yOffset); + updateBoundingBox(bounds, oBounds); + } + } + }; + + // get the bounding box of the elements (in raw model position) + var boundingBoxImpl = function boundingBoxImpl(ele, options) { + var cy = ele._private.cy; + var styleEnabled = cy.styleEnabled(); + var headless = cy.headless(); + var bounds = makeBoundingBox(); + var _p = ele._private; + var isNode = ele.isNode(); + var isEdge = ele.isEdge(); + var ex1, ex2, ey1, ey2; // extrema of body / lines + var x, y; // node pos + var rstyle = _p.rstyle; + var manualExpansion = isNode && styleEnabled ? ele.pstyle('bounds-expansion').pfValue : [0]; + + // must use `display` prop only, as reading `compound.width()` causes recursion + // (other factors like width values will be considered later in this function anyway) + var isDisplayed = function isDisplayed(ele) { + return ele.pstyle('display').value !== 'none'; + }; + var displayed = !styleEnabled || isDisplayed(ele) + + // must take into account connected nodes b/c of implicit edge hiding on display:none node + && (!isEdge || isDisplayed(ele.source()) && isDisplayed(ele.target())); + if (displayed) { + // displayed suffices, since we will find zero area eles anyway + var overlayOpacity = 0; + var overlayPadding = 0; + if (styleEnabled && options.includeOverlays) { + overlayOpacity = ele.pstyle('overlay-opacity').value; + if (overlayOpacity !== 0) { + overlayPadding = ele.pstyle('overlay-padding').value; + } + } + var underlayOpacity = 0; + var underlayPadding = 0; + if (styleEnabled && options.includeUnderlays) { + underlayOpacity = ele.pstyle('underlay-opacity').value; + if (underlayOpacity !== 0) { + underlayPadding = ele.pstyle('underlay-padding').value; + } + } + var padding = Math.max(overlayPadding, underlayPadding); + var w = 0; + var wHalf = 0; + if (styleEnabled) { + w = ele.pstyle('width').pfValue; + wHalf = w / 2; + } + if (isNode && options.includeNodes) { + var pos = ele.position(); + x = pos.x; + y = pos.y; + var _w = ele.outerWidth(); + var halfW = _w / 2; + var h = ele.outerHeight(); + var halfH = h / 2; + + // handle node dimensions + ///////////////////////// + + ex1 = x - halfW; + ex2 = x + halfW; + ey1 = y - halfH; + ey2 = y + halfH; + updateBounds(bounds, ex1, ey1, ex2, ey2); + if (styleEnabled && options.includeOutlines) { + updateBoundsFromOutline(bounds, ele); + } + } else if (isEdge && options.includeEdges) { + if (styleEnabled && !headless) { + var curveStyle = ele.pstyle('curve-style').strValue; + + // handle edge dimensions (rough box estimate) + ////////////////////////////////////////////// + + ex1 = Math.min(rstyle.srcX, rstyle.midX, rstyle.tgtX); + ex2 = Math.max(rstyle.srcX, rstyle.midX, rstyle.tgtX); + ey1 = Math.min(rstyle.srcY, rstyle.midY, rstyle.tgtY); + ey2 = Math.max(rstyle.srcY, rstyle.midY, rstyle.tgtY); + + // take into account edge width + ex1 -= wHalf; + ex2 += wHalf; + ey1 -= wHalf; + ey2 += wHalf; + updateBounds(bounds, ex1, ey1, ex2, ey2); + + // precise edges + //////////////// + + if (curveStyle === 'haystack') { + var hpts = rstyle.haystackPts; + if (hpts && hpts.length === 2) { + ex1 = hpts[0].x; + ey1 = hpts[0].y; + ex2 = hpts[1].x; + ey2 = hpts[1].y; + if (ex1 > ex2) { + var temp = ex1; + ex1 = ex2; + ex2 = temp; + } + if (ey1 > ey2) { + var _temp = ey1; + ey1 = ey2; + ey2 = _temp; + } + updateBounds(bounds, ex1 - wHalf, ey1 - wHalf, ex2 + wHalf, ey2 + wHalf); + } + } else if (curveStyle === 'bezier' || curveStyle === 'unbundled-bezier' || curveStyle === 'segments' || curveStyle === 'taxi') { + var pts; + switch (curveStyle) { + case 'bezier': + case 'unbundled-bezier': + pts = rstyle.bezierPts; + break; + case 'segments': + case 'taxi': + pts = rstyle.linePts; + break; + } + if (pts != null) { + for (var j = 0; j < pts.length; j++) { + var pt = pts[j]; + ex1 = pt.x - wHalf; + ex2 = pt.x + wHalf; + ey1 = pt.y - wHalf; + ey2 = pt.y + wHalf; + updateBounds(bounds, ex1, ey1, ex2, ey2); + } + } + } // bezier-like or segment-like edge + } else { + // headless or style disabled + + // fallback on source and target positions + ////////////////////////////////////////// + + var n1 = ele.source(); + var n1pos = n1.position(); + var n2 = ele.target(); + var n2pos = n2.position(); + ex1 = n1pos.x; + ex2 = n2pos.x; + ey1 = n1pos.y; + ey2 = n2pos.y; + if (ex1 > ex2) { + var _temp2 = ex1; + ex1 = ex2; + ex2 = _temp2; + } + if (ey1 > ey2) { + var _temp3 = ey1; + ey1 = ey2; + ey2 = _temp3; + } + + // take into account edge width + ex1 -= wHalf; + ex2 += wHalf; + ey1 -= wHalf; + ey2 += wHalf; + updateBounds(bounds, ex1, ey1, ex2, ey2); + } // headless or style disabled + } // edges + + // handle edge arrow size + ///////////////////////// + + if (styleEnabled && options.includeEdges && isEdge) { + updateBoundsFromArrow(bounds, ele, 'mid-source'); + updateBoundsFromArrow(bounds, ele, 'mid-target'); + updateBoundsFromArrow(bounds, ele, 'source'); + updateBoundsFromArrow(bounds, ele, 'target'); + } + + // ghost + //////// + + if (styleEnabled) { + var ghost = ele.pstyle('ghost').value === 'yes'; + if (ghost) { + var gx = ele.pstyle('ghost-offset-x').pfValue; + var gy = ele.pstyle('ghost-offset-y').pfValue; + updateBounds(bounds, bounds.x1 + gx, bounds.y1 + gy, bounds.x2 + gx, bounds.y2 + gy); + } + } + + // always store the body bounds separately from the labels + var bbBody = _p.bodyBounds = _p.bodyBounds || {}; + assignBoundingBox(bbBody, bounds); + expandBoundingBoxSides(bbBody, manualExpansion); + expandBoundingBox(bbBody, 1); // expand to work around browser dimension inaccuracies + + // overlay + ////////// + + if (styleEnabled) { + ex1 = bounds.x1; + ex2 = bounds.x2; + ey1 = bounds.y1; + ey2 = bounds.y2; + updateBounds(bounds, ex1 - padding, ey1 - padding, ex2 + padding, ey2 + padding); + } + + // always store the body bounds separately from the labels + var bbOverlay = _p.overlayBounds = _p.overlayBounds || {}; + assignBoundingBox(bbOverlay, bounds); + expandBoundingBoxSides(bbOverlay, manualExpansion); + expandBoundingBox(bbOverlay, 1); // expand to work around browser dimension inaccuracies + + // handle label dimensions + ////////////////////////// + + var bbLabels = _p.labelBounds = _p.labelBounds || {}; + if (bbLabels.all != null) { + clearBoundingBox(bbLabels.all); + } else { + bbLabels.all = makeBoundingBox(); + } + if (styleEnabled && options.includeLabels) { + if (options.includeMainLabels) { + updateBoundsFromLabel(bounds, ele, null); + } + if (isEdge) { + if (options.includeSourceLabels) { + updateBoundsFromLabel(bounds, ele, 'source'); + } + if (options.includeTargetLabels) { + updateBoundsFromLabel(bounds, ele, 'target'); + } + } + } // style enabled for labels + } // if displayed + + bounds.x1 = noninf(bounds.x1); + bounds.y1 = noninf(bounds.y1); + bounds.x2 = noninf(bounds.x2); + bounds.y2 = noninf(bounds.y2); + bounds.w = noninf(bounds.x2 - bounds.x1); + bounds.h = noninf(bounds.y2 - bounds.y1); + if (bounds.w > 0 && bounds.h > 0 && displayed) { + expandBoundingBoxSides(bounds, manualExpansion); + + // expand bounds by 1 because antialiasing can increase the visual/effective size by 1 on all sides + expandBoundingBox(bounds, 1); + } + return bounds; + }; + var getKey = function getKey(opts) { + var i = 0; + var tf = function tf(val) { + return (val ? 1 : 0) << i++; + }; + var key = 0; + key += tf(opts.incudeNodes); + key += tf(opts.includeEdges); + key += tf(opts.includeLabels); + key += tf(opts.includeMainLabels); + key += tf(opts.includeSourceLabels); + key += tf(opts.includeTargetLabels); + key += tf(opts.includeOverlays); + key += tf(opts.includeOutlines); + return key; + }; + var getBoundingBoxPosKey = function getBoundingBoxPosKey(ele) { + if (ele.isEdge()) { + var p1 = ele.source().position(); + var p2 = ele.target().position(); + var r = function r(x) { + return Math.round(x); + }; + return hashIntsArray([r(p1.x), r(p1.y), r(p2.x), r(p2.y)]); + } else { + return 0; + } + }; + var cachedBoundingBoxImpl = function cachedBoundingBoxImpl(ele, opts) { + var _p = ele._private; + var bb; + var isEdge = ele.isEdge(); + var key = opts == null ? defBbOptsKey : getKey(opts); + var usingDefOpts = key === defBbOptsKey; + var currPosKey = getBoundingBoxPosKey(ele); + var isPosKeySame = _p.bbCachePosKey === currPosKey; + var useCache = opts.useCache && isPosKeySame; + var isDirty = function isDirty(ele) { + return ele._private.bbCache == null || ele._private.styleDirty; + }; + var needRecalc = !useCache || isDirty(ele) || isEdge && isDirty(ele.source()) || isDirty(ele.target()); + if (needRecalc) { + if (!isPosKeySame) { + ele.recalculateRenderedStyle(useCache); + } + bb = boundingBoxImpl(ele, defBbOpts); + _p.bbCache = bb; + _p.bbCachePosKey = currPosKey; + } else { + bb = _p.bbCache; + } + + // not using def opts => need to build up bb from combination of sub bbs + if (!usingDefOpts) { + var isNode = ele.isNode(); + bb = makeBoundingBox(); + if (opts.includeNodes && isNode || opts.includeEdges && !isNode) { + if (opts.includeOverlays) { + updateBoundsFromBox(bb, _p.overlayBounds); + } else { + updateBoundsFromBox(bb, _p.bodyBounds); + } + } + if (opts.includeLabels) { + if (opts.includeMainLabels && (!isEdge || opts.includeSourceLabels && opts.includeTargetLabels)) { + updateBoundsFromBox(bb, _p.labelBounds.all); + } else { + if (opts.includeMainLabels) { + updateBoundsFromBox(bb, _p.labelBounds.mainRot); + } + if (opts.includeSourceLabels) { + updateBoundsFromBox(bb, _p.labelBounds.sourceRot); + } + if (opts.includeTargetLabels) { + updateBoundsFromBox(bb, _p.labelBounds.targetRot); + } + } + } + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + } + return bb; + }; + var defBbOpts = { + includeNodes: true, + includeEdges: true, + includeLabels: true, + includeMainLabels: true, + includeSourceLabels: true, + includeTargetLabels: true, + includeOverlays: true, + includeUnderlays: true, + includeOutlines: true, + useCache: true + }; + var defBbOptsKey = getKey(defBbOpts); + var filledBbOpts = defaults$g(defBbOpts); + elesfn$b.boundingBox = function (options) { + var bounds; + + // the main usecase is ele.boundingBox() for a single element with no/def options + // specified s.t. the cache is used, so check for this case to make it faster by + // avoiding the overhead of the rest of the function + if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (options === undefined || options.useCache === undefined || options.useCache === true)) { + if (options === undefined) { + options = defBbOpts; + } else { + options = filledBbOpts(options); + } + bounds = cachedBoundingBoxImpl(this[0], options); + } else { + bounds = makeBoundingBox(); + options = options || defBbOpts; + var opts = filledBbOpts(options); + var eles = this; + var cy = eles.cy(); + var styleEnabled = cy.styleEnabled(); + if (styleEnabled) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _p = ele._private; + var currPosKey = getBoundingBoxPosKey(ele); + var isPosKeySame = _p.bbCachePosKey === currPosKey; + var useCache = opts.useCache && isPosKeySame && !_p.styleDirty; + ele.recalculateRenderedStyle(useCache); + } + } + this.updateCompoundBounds(!options.useCache); + for (var _i = 0; _i < eles.length; _i++) { + var _ele = eles[_i]; + updateBoundsFromBox(bounds, cachedBoundingBoxImpl(_ele, opts)); + } + } + bounds.x1 = noninf(bounds.x1); + bounds.y1 = noninf(bounds.y1); + bounds.x2 = noninf(bounds.x2); + bounds.y2 = noninf(bounds.y2); + bounds.w = noninf(bounds.x2 - bounds.x1); + bounds.h = noninf(bounds.y2 - bounds.y1); + return bounds; + }; + elesfn$b.dirtyBoundingBoxCache = function () { + for (var i = 0; i < this.length; i++) { + var _p = this[i]._private; + _p.bbCache = null; + _p.bbCachePosKey = null; + _p.bodyBounds = null; + _p.overlayBounds = null; + _p.labelBounds.all = null; + _p.labelBounds.source = null; + _p.labelBounds.target = null; + _p.labelBounds.main = null; + _p.labelBounds.sourceRot = null; + _p.labelBounds.targetRot = null; + _p.labelBounds.mainRot = null; + _p.arrowBounds.source = null; + _p.arrowBounds.target = null; + _p.arrowBounds['mid-source'] = null; + _p.arrowBounds['mid-target'] = null; + } + this.emitAndNotify('bounds'); + return this; + }; + + // private helper to get bounding box for custom node positions + // - good for perf in certain cases but currently requires dirtying the rendered style + // - would be better to not modify the nodes but the nodes are read directly everywhere in the renderer... + // - try to use for only things like discrete layouts where the node position would change anyway + elesfn$b.boundingBoxAt = function (fn) { + var nodes = this.nodes(); + var cy = this.cy(); + var hasCompoundNodes = cy.hasCompoundNodes(); + var parents = cy.collection(); + if (hasCompoundNodes) { + parents = nodes.filter(function (node) { + return node.isParent(); + }); + nodes = nodes.not(parents); + } + if (plainObject(fn)) { + var obj = fn; + fn = function fn() { + return obj; + }; + } + var storeOldPos = function storeOldPos(node, i) { + return node._private.bbAtOldPos = fn(node, i); + }; + var getOldPos = function getOldPos(node) { + return node._private.bbAtOldPos; + }; + cy.startBatch(); + nodes.forEach(storeOldPos).silentPositions(fn); + if (hasCompoundNodes) { + parents.dirtyCompoundBoundsCache(); + parents.dirtyBoundingBoxCache(); + parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle + } + + var bb = copyBoundingBox(this.boundingBox({ + useCache: false + })); + nodes.silentPositions(getOldPos); + if (hasCompoundNodes) { + parents.dirtyCompoundBoundsCache(); + parents.dirtyBoundingBoxCache(); + parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle + } + + cy.endBatch(); + return bb; + }; + fn$3.boundingbox = fn$3.bb = fn$3.boundingBox; + fn$3.renderedBoundingbox = fn$3.renderedBoundingBox; + var bounds = elesfn$b; + + var fn$2, elesfn$a; + fn$2 = elesfn$a = {}; + var defineDimFns = function defineDimFns(opts) { + opts.uppercaseName = capitalize(opts.name); + opts.autoName = 'auto' + opts.uppercaseName; + opts.labelName = 'label' + opts.uppercaseName; + opts.outerName = 'outer' + opts.uppercaseName; + opts.uppercaseOuterName = capitalize(opts.outerName); + fn$2[opts.name] = function dimImpl() { + var ele = this[0]; + var _p = ele._private; + var cy = _p.cy; + var styleEnabled = cy._private.styleEnabled; + if (ele) { + if (styleEnabled) { + if (ele.isParent()) { + ele.updateCompoundBounds(); + return _p[opts.autoName] || 0; + } + var d = ele.pstyle(opts.name); + switch (d.strValue) { + case 'label': + ele.recalculateRenderedStyle(); + return _p.rstyle[opts.labelName] || 0; + default: + return d.pfValue; + } + } else { + return 1; + } + } + }; + fn$2['outer' + opts.uppercaseName] = function outerDimImpl() { + var ele = this[0]; + var _p = ele._private; + var cy = _p.cy; + var styleEnabled = cy._private.styleEnabled; + if (ele) { + if (styleEnabled) { + var dim = ele[opts.name](); + var border = ele.pstyle('border-width').pfValue; // n.b. 1/2 each side + var padding = 2 * ele.padding(); + return dim + border + padding; + } else { + return 1; + } + } + }; + fn$2['rendered' + opts.uppercaseName] = function renderedDimImpl() { + var ele = this[0]; + if (ele) { + var d = ele[opts.name](); + return d * this.cy().zoom(); + } + }; + fn$2['rendered' + opts.uppercaseOuterName] = function renderedOuterDimImpl() { + var ele = this[0]; + if (ele) { + var od = ele[opts.outerName](); + return od * this.cy().zoom(); + } + }; + }; + defineDimFns({ + name: 'width' + }); + defineDimFns({ + name: 'height' + }); + elesfn$a.padding = function () { + var ele = this[0]; + var _p = ele._private; + if (ele.isParent()) { + ele.updateCompoundBounds(); + if (_p.autoPadding !== undefined) { + return _p.autoPadding; + } else { + return ele.pstyle('padding').pfValue; + } + } else { + return ele.pstyle('padding').pfValue; + } + }; + elesfn$a.paddedHeight = function () { + var ele = this[0]; + return ele.height() + 2 * ele.padding(); + }; + elesfn$a.paddedWidth = function () { + var ele = this[0]; + return ele.width() + 2 * ele.padding(); + }; + var widthHeight = elesfn$a; + + var ifEdge = function ifEdge(ele, getValue) { + if (ele.isEdge()) { + return getValue(ele); + } + }; + var ifEdgeRenderedPosition = function ifEdgeRenderedPosition(ele, getPoint) { + if (ele.isEdge()) { + var cy = ele.cy(); + return modelToRenderedPosition(getPoint(ele), cy.zoom(), cy.pan()); + } + }; + var ifEdgeRenderedPositions = function ifEdgeRenderedPositions(ele, getPoints) { + if (ele.isEdge()) { + var cy = ele.cy(); + var pan = cy.pan(); + var zoom = cy.zoom(); + return getPoints(ele).map(function (p) { + return modelToRenderedPosition(p, zoom, pan); + }); + } + }; + var controlPoints = function controlPoints(ele) { + return ele.renderer().getControlPoints(ele); + }; + var segmentPoints = function segmentPoints(ele) { + return ele.renderer().getSegmentPoints(ele); + }; + var sourceEndpoint = function sourceEndpoint(ele) { + return ele.renderer().getSourceEndpoint(ele); + }; + var targetEndpoint = function targetEndpoint(ele) { + return ele.renderer().getTargetEndpoint(ele); + }; + var midpoint = function midpoint(ele) { + return ele.renderer().getEdgeMidpoint(ele); + }; + var pts = { + controlPoints: { + get: controlPoints, + mult: true + }, + segmentPoints: { + get: segmentPoints, + mult: true + }, + sourceEndpoint: { + get: sourceEndpoint + }, + targetEndpoint: { + get: targetEndpoint + }, + midpoint: { + get: midpoint + } + }; + var renderedName = function renderedName(name) { + return 'rendered' + name[0].toUpperCase() + name.substr(1); + }; + var edgePoints = Object.keys(pts).reduce(function (obj, name) { + var spec = pts[name]; + var rName = renderedName(name); + obj[name] = function () { + return ifEdge(this, spec.get); + }; + if (spec.mult) { + obj[rName] = function () { + return ifEdgeRenderedPositions(this, spec.get); + }; + } else { + obj[rName] = function () { + return ifEdgeRenderedPosition(this, spec.get); + }; + } + return obj; + }, {}); + + var dimensions = extend({}, position, bounds, widthHeight, edgePoints); + + /*! + Event object based on jQuery events, MIT license + + https://jquery.org/license/ + https://tldrlegal.com/license/mit-license + https://github.com/jquery/jquery/blob/master/src/event.js + */ + + var Event = function Event(src, props) { + this.recycle(src, props); + }; + function returnFalse() { + return false; + } + function returnTrue() { + return true; + } + + // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html + Event.prototype = { + instanceString: function instanceString() { + return 'event'; + }, + recycle: function recycle(src, props) { + this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = returnFalse; + if (src != null && src.preventDefault) { + // Browser Event object + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented ? returnTrue : returnFalse; + } else if (src != null && src.type) { + // Plain object containing all event details + props = src; + } else { + // Event string + this.type = src; + } + + // Put explicitly provided properties onto the event object + if (props != null) { + // more efficient to manually copy fields we use + this.originalEvent = props.originalEvent; + this.type = props.type != null ? props.type : this.type; + this.cy = props.cy; + this.target = props.target; + this.position = props.position; + this.renderedPosition = props.renderedPosition; + this.namespace = props.namespace; + this.layout = props.layout; + } + if (this.cy != null && this.position != null && this.renderedPosition == null) { + // create a rendered position based on the passed position + var pos = this.position; + var zoom = this.cy.zoom(); + var pan = this.cy.pan(); + this.renderedPosition = { + x: pos.x * zoom + pan.x, + y: pos.y * zoom + pan.y + }; + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + }, + preventDefault: function preventDefault() { + this.isDefaultPrevented = returnTrue; + var e = this.originalEvent; + if (!e) { + return; + } + + // if preventDefault exists run it on the original event + if (e.preventDefault) { + e.preventDefault(); + } + }, + stopPropagation: function stopPropagation() { + this.isPropagationStopped = returnTrue; + var e = this.originalEvent; + if (!e) { + return; + } + + // if stopPropagation exists run it on the original event + if (e.stopPropagation) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function stopImmediatePropagation() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + }, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse + }; + + var eventRegex = /^([^.]+)(\.(?:[^.]+))?$/; // regex for matching event strings (e.g. "click.namespace") + var universalNamespace = '.*'; // matches as if no namespace specified and prevents users from unbinding accidentally + + var defaults$8 = { + qualifierCompare: function qualifierCompare(q1, q2) { + return q1 === q2; + }, + eventMatches: function eventMatches( /*context, listener, eventObj*/ + ) { + return true; + }, + addEventFields: function addEventFields( /*context, evt*/ + ) {}, + callbackContext: function callbackContext(context /*, listener, eventObj*/) { + return context; + }, + beforeEmit: function beforeEmit( /* context, listener, eventObj */ + ) {}, + afterEmit: function afterEmit( /* context, listener, eventObj */ + ) {}, + bubble: function bubble( /*context*/ + ) { + return false; + }, + parent: function parent( /*context*/ + ) { + return null; + }, + context: null + }; + var defaultsKeys = Object.keys(defaults$8); + var emptyOpts = {}; + function Emitter() { + var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyOpts; + var context = arguments.length > 1 ? arguments[1] : undefined; + // micro-optimisation vs Object.assign() -- reduces Element instantiation time + for (var i = 0; i < defaultsKeys.length; i++) { + var key = defaultsKeys[i]; + this[key] = opts[key] || defaults$8[key]; + } + this.context = context || this.context; + this.listeners = []; + this.emitting = 0; + } + var p = Emitter.prototype; + var forEachEvent = function forEachEvent(self, handler, events, qualifier, callback, conf, confOverrides) { + if (fn$6(qualifier)) { + callback = qualifier; + qualifier = null; + } + if (confOverrides) { + if (conf == null) { + conf = confOverrides; + } else { + conf = extend({}, conf, confOverrides); + } + } + var eventList = array(events) ? events : events.split(/\s+/); + for (var i = 0; i < eventList.length; i++) { + var evt = eventList[i]; + if (emptyString(evt)) { + continue; + } + var match = evt.match(eventRegex); // type[.namespace] + + if (match) { + var type = match[1]; + var namespace = match[2] ? match[2] : null; + var ret = handler(self, evt, type, namespace, qualifier, callback, conf); + if (ret === false) { + break; + } // allow exiting early + } + } + }; + + var makeEventObj = function makeEventObj(self, obj) { + self.addEventFields(self.context, obj); + return new Event(obj.type, obj); + }; + var forEachEventObj = function forEachEventObj(self, handler, events) { + if (event(events)) { + handler(self, events); + return; + } else if (plainObject(events)) { + handler(self, makeEventObj(self, events)); + return; + } + var eventList = array(events) ? events : events.split(/\s+/); + for (var i = 0; i < eventList.length; i++) { + var evt = eventList[i]; + if (emptyString(evt)) { + continue; + } + var match = evt.match(eventRegex); // type[.namespace] + + if (match) { + var type = match[1]; + var namespace = match[2] ? match[2] : null; + var eventObj = makeEventObj(self, { + type: type, + namespace: namespace, + target: self.context + }); + handler(self, eventObj); + } + } + }; + p.on = p.addListener = function (events, qualifier, callback, conf, confOverrides) { + forEachEvent(this, function (self, event, type, namespace, qualifier, callback, conf) { + if (fn$6(callback)) { + self.listeners.push({ + event: event, + // full event string + callback: callback, + // callback to run + type: type, + // the event type (e.g. 'click') + namespace: namespace, + // the event namespace (e.g. ".foo") + qualifier: qualifier, + // a restriction on whether to match this emitter + conf: conf // additional configuration + }); + } + }, events, qualifier, callback, conf, confOverrides); + return this; + }; + p.one = function (events, qualifier, callback, conf) { + return this.on(events, qualifier, callback, conf, { + one: true + }); + }; + p.removeListener = p.off = function (events, qualifier, callback, conf) { + var _this = this; + if (this.emitting !== 0) { + this.listeners = copyArray$1(this.listeners); + } + var listeners = this.listeners; + var _loop = function _loop(i) { + var listener = listeners[i]; + forEachEvent(_this, function (self, event, type, namespace, qualifier, callback /*, conf*/) { + if ((listener.type === type || events === '*') && (!namespace && listener.namespace !== '.*' || listener.namespace === namespace) && (!qualifier || self.qualifierCompare(listener.qualifier, qualifier)) && (!callback || listener.callback === callback)) { + listeners.splice(i, 1); + return false; + } + }, events, qualifier, callback, conf); + }; + for (var i = listeners.length - 1; i >= 0; i--) { + _loop(i); + } + return this; + }; + p.removeAllListeners = function () { + return this.removeListener('*'); + }; + p.emit = p.trigger = function (events, extraParams, manualCallback) { + var listeners = this.listeners; + var numListenersBeforeEmit = listeners.length; + this.emitting++; + if (!array(extraParams)) { + extraParams = [extraParams]; + } + forEachEventObj(this, function (self, eventObj) { + if (manualCallback != null) { + listeners = [{ + event: eventObj.event, + type: eventObj.type, + namespace: eventObj.namespace, + callback: manualCallback + }]; + numListenersBeforeEmit = listeners.length; + } + var _loop2 = function _loop2(i) { + var listener = listeners[i]; + if (listener.type === eventObj.type && (!listener.namespace || listener.namespace === eventObj.namespace || listener.namespace === universalNamespace) && self.eventMatches(self.context, listener, eventObj)) { + var args = [eventObj]; + if (extraParams != null) { + push(args, extraParams); + } + self.beforeEmit(self.context, listener, eventObj); + if (listener.conf && listener.conf.one) { + self.listeners = self.listeners.filter(function (l) { + return l !== listener; + }); + } + var context = self.callbackContext(self.context, listener, eventObj); + var ret = listener.callback.apply(context, args); + self.afterEmit(self.context, listener, eventObj); + if (ret === false) { + eventObj.stopPropagation(); + eventObj.preventDefault(); + } + } // if listener matches + }; + for (var i = 0; i < numListenersBeforeEmit; i++) { + _loop2(i); + } // for listener + + if (self.bubble(self.context) && !eventObj.isPropagationStopped()) { + self.parent(self.context).emit(eventObj, extraParams); + } + }, events); + this.emitting--; + return this; + }; + + var emitterOptions$1 = { + qualifierCompare: function qualifierCompare(selector1, selector2) { + if (selector1 == null || selector2 == null) { + return selector1 == null && selector2 == null; + } else { + return selector1.sameText(selector2); + } + }, + eventMatches: function eventMatches(ele, listener, eventObj) { + var selector = listener.qualifier; + if (selector != null) { + return ele !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target); + } + return true; + }, + addEventFields: function addEventFields(ele, evt) { + evt.cy = ele.cy(); + evt.target = ele; + }, + callbackContext: function callbackContext(ele, listener, eventObj) { + return listener.qualifier != null ? eventObj.target : ele; + }, + beforeEmit: function beforeEmit(context, listener /*, eventObj*/) { + if (listener.conf && listener.conf.once) { + listener.conf.onceCollection.removeListener(listener.event, listener.qualifier, listener.callback); + } + }, + bubble: function bubble() { + return true; + }, + parent: function parent(ele) { + return ele.isChild() ? ele.parent() : ele.cy(); + } + }; + var argSelector$1 = function argSelector(arg) { + if (string(arg)) { + return new Selector(arg); + } else { + return arg; + } + }; + var elesfn$9 = { + createEmitter: function createEmitter() { + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var _p = ele._private; + if (!_p.emitter) { + _p.emitter = new Emitter(emitterOptions$1, ele); + } + } + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().on(events, argSel, callback); + } + return this; + }, + removeListener: function removeListener(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().removeListener(events, argSel, callback); + } + return this; + }, + removeAllListeners: function removeAllListeners() { + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().removeAllListeners(); + } + return this; + }, + one: function one(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().one(events, argSel, callback); + } + return this; + }, + once: function once(events, selector, callback) { + var argSel = argSelector$1(selector); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().on(events, argSel, callback, { + once: true, + onceCollection: this + }); + } + }, + emit: function emit(events, extraParams) { + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + ele.emitter().emit(events, extraParams); + } + return this; + }, + emitAndNotify: function emitAndNotify(event, extraParams) { + // for internal use only + if (this.length === 0) { + return; + } // empty collections don't need to notify anything + + // notify renderer + this.cy().notify(event, this); + this.emit(event, extraParams); + return this; + } + }; + define.eventAliasesOn(elesfn$9); + + var elesfn$8 = { + nodes: function nodes(selector) { + return this.filter(function (ele) { + return ele.isNode(); + }).filter(selector); + }, + edges: function edges(selector) { + return this.filter(function (ele) { + return ele.isEdge(); + }).filter(selector); + }, + // internal helper to get nodes and edges as separate collections with single iteration over elements + byGroup: function byGroup() { + var nodes = this.spawn(); + var edges = this.spawn(); + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + if (ele.isNode()) { + nodes.push(ele); + } else { + edges.push(ele); + } + } + return { + nodes: nodes, + edges: edges + }; + }, + filter: function filter(_filter, thisArg) { + if (_filter === undefined) { + // check this first b/c it's the most common/performant case + return this; + } else if (string(_filter) || elementOrCollection(_filter)) { + return new Selector(_filter).filter(this); + } else if (fn$6(_filter)) { + var filterEles = this.spawn(); + var eles = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var include = thisArg ? _filter.apply(thisArg, [ele, i, eles]) : _filter(ele, i, eles); + if (include) { + filterEles.push(ele); + } + } + return filterEles; + } + return this.spawn(); // if not handled by above, give 'em an empty collection + }, + + not: function not(toRemove) { + if (!toRemove) { + return this; + } else { + if (string(toRemove)) { + toRemove = this.filter(toRemove); + } + var elements = this.spawn(); + for (var i = 0; i < this.length; i++) { + var element = this[i]; + var remove = toRemove.has(element); + if (!remove) { + elements.push(element); + } + } + return elements; + } + }, + absoluteComplement: function absoluteComplement() { + var cy = this.cy(); + return cy.mutableElements().not(this); + }, + intersect: function intersect(other) { + // if a selector is specified, then filter by it instead + if (string(other)) { + var selector = other; + return this.filter(selector); + } + var elements = this.spawn(); + var col1 = this; + var col2 = other; + var col1Smaller = this.length < other.length; + var colS = col1Smaller ? col1 : col2; + var colL = col1Smaller ? col2 : col1; + for (var i = 0; i < colS.length; i++) { + var ele = colS[i]; + if (colL.has(ele)) { + elements.push(ele); + } + } + return elements; + }, + xor: function xor(other) { + var cy = this._private.cy; + if (string(other)) { + other = cy.$(other); + } + var elements = this.spawn(); + var col1 = this; + var col2 = other; + var add = function add(col, other) { + for (var i = 0; i < col.length; i++) { + var ele = col[i]; + var id = ele._private.data.id; + var inOther = other.hasElementWithId(id); + if (!inOther) { + elements.push(ele); + } + } + }; + add(col1, col2); + add(col2, col1); + return elements; + }, + diff: function diff(other) { + var cy = this._private.cy; + if (string(other)) { + other = cy.$(other); + } + var left = this.spawn(); + var right = this.spawn(); + var both = this.spawn(); + var col1 = this; + var col2 = other; + var add = function add(col, other, retEles) { + for (var i = 0; i < col.length; i++) { + var ele = col[i]; + var id = ele._private.data.id; + var inOther = other.hasElementWithId(id); + if (inOther) { + both.merge(ele); + } else { + retEles.push(ele); + } + } + }; + add(col1, col2, left); + add(col2, col1, right); + return { + left: left, + right: right, + both: both + }; + }, + add: function add(toAdd) { + var cy = this._private.cy; + if (!toAdd) { + return this; + } + if (string(toAdd)) { + var selector = toAdd; + toAdd = cy.mutableElements().filter(selector); + } + var elements = this.spawnSelf(); + for (var i = 0; i < toAdd.length; i++) { + var ele = toAdd[i]; + var add = !this.has(ele); + if (add) { + elements.push(ele); + } + } + return elements; + }, + // in place merge on calling collection + merge: function merge(toAdd) { + var _p = this._private; + var cy = _p.cy; + if (!toAdd) { + return this; + } + if (toAdd && string(toAdd)) { + var selector = toAdd; + toAdd = cy.mutableElements().filter(selector); + } + var map = _p.map; + for (var i = 0; i < toAdd.length; i++) { + var toAddEle = toAdd[i]; + var id = toAddEle._private.data.id; + var add = !map.has(id); + if (add) { + var index = this.length++; + this[index] = toAddEle; + map.set(id, { + ele: toAddEle, + index: index + }); + } + } + return this; // chaining + }, + + unmergeAt: function unmergeAt(i) { + var ele = this[i]; + var id = ele.id(); + var _p = this._private; + var map = _p.map; + + // remove ele + this[i] = undefined; + map["delete"](id); + var unmergedLastEle = i === this.length - 1; + + // replace empty spot with last ele in collection + if (this.length > 1 && !unmergedLastEle) { + var lastEleI = this.length - 1; + var lastEle = this[lastEleI]; + var lastEleId = lastEle._private.data.id; + this[lastEleI] = undefined; + this[i] = lastEle; + map.set(lastEleId, { + ele: lastEle, + index: i + }); + } + + // the collection is now 1 ele smaller + this.length--; + return this; + }, + // remove single ele in place in calling collection + unmergeOne: function unmergeOne(ele) { + ele = ele[0]; + var _p = this._private; + var id = ele._private.data.id; + var map = _p.map; + var entry = map.get(id); + if (!entry) { + return this; // no need to remove + } + + var i = entry.index; + this.unmergeAt(i); + return this; + }, + // remove eles in place on calling collection + unmerge: function unmerge(toRemove) { + var cy = this._private.cy; + if (!toRemove) { + return this; + } + if (toRemove && string(toRemove)) { + var selector = toRemove; + toRemove = cy.mutableElements().filter(selector); + } + for (var i = 0; i < toRemove.length; i++) { + this.unmergeOne(toRemove[i]); + } + return this; // chaining + }, + + unmergeBy: function unmergeBy(toRmFn) { + for (var i = this.length - 1; i >= 0; i--) { + var ele = this[i]; + if (toRmFn(ele)) { + this.unmergeAt(i); + } + } + return this; + }, + map: function map(mapFn, thisArg) { + var arr = []; + var eles = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var ret = thisArg ? mapFn.apply(thisArg, [ele, i, eles]) : mapFn(ele, i, eles); + arr.push(ret); + } + return arr; + }, + reduce: function reduce(fn, initialValue) { + var val = initialValue; + var eles = this; + for (var i = 0; i < eles.length; i++) { + val = fn(val, eles[i], i, eles); + } + return val; + }, + max: function max(valFn, thisArg) { + var max = -Infinity; + var maxEle; + var eles = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles); + if (val > max) { + max = val; + maxEle = ele; + } + } + return { + value: max, + ele: maxEle + }; + }, + min: function min(valFn, thisArg) { + var min = Infinity; + var minEle; + var eles = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles); + if (val < min) { + min = val; + minEle = ele; + } + } + return { + value: min, + ele: minEle + }; + } + }; + + // aliases + var fn$1 = elesfn$8; + fn$1['u'] = fn$1['|'] = fn$1['+'] = fn$1.union = fn$1.or = fn$1.add; + fn$1['\\'] = fn$1['!'] = fn$1['-'] = fn$1.difference = fn$1.relativeComplement = fn$1.subtract = fn$1.not; + fn$1['n'] = fn$1['&'] = fn$1['.'] = fn$1.and = fn$1.intersection = fn$1.intersect; + fn$1['^'] = fn$1['(+)'] = fn$1['(-)'] = fn$1.symmetricDifference = fn$1.symdiff = fn$1.xor; + fn$1.fnFilter = fn$1.filterFn = fn$1.stdFilter = fn$1.filter; + fn$1.complement = fn$1.abscomp = fn$1.absoluteComplement; + + var elesfn$7 = { + isNode: function isNode() { + return this.group() === 'nodes'; + }, + isEdge: function isEdge() { + return this.group() === 'edges'; + }, + isLoop: function isLoop() { + return this.isEdge() && this.source()[0] === this.target()[0]; + }, + isSimple: function isSimple() { + return this.isEdge() && this.source()[0] !== this.target()[0]; + }, + group: function group() { + var ele = this[0]; + if (ele) { + return ele._private.group; + } + } + }; + + /** + * Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), + * and z-index (low to high). These styles affect how this applies: + * + * z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the + * same depth as the root of the compound graph, followed by the default value `auto` which draws in order from + * root to leaves of the compound graph. The last drawn is `top`. + * z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. + * `manual` ignores this convention and draws based on the `z-index` value setting. + * z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher + * `z-index` will be drawn on top of an element with a lower `z-index`. + */ + var zIndexSort = function zIndexSort(a, b) { + var cy = a.cy(); + var hasCompoundNodes = cy.hasCompoundNodes(); + function getDepth(ele) { + var style = ele.pstyle('z-compound-depth'); + if (style.value === 'auto') { + return hasCompoundNodes ? ele.zDepth() : 0; + } else if (style.value === 'bottom') { + return -1; + } else if (style.value === 'top') { + return MAX_INT$1; + } + // 'orphan' + return 0; + } + var depthDiff = getDepth(a) - getDepth(b); + if (depthDiff !== 0) { + return depthDiff; + } + function getEleDepth(ele) { + var style = ele.pstyle('z-index-compare'); + if (style.value === 'auto') { + return ele.isNode() ? 1 : 0; + } + // 'manual' + return 0; + } + var eleDiff = getEleDepth(a) - getEleDepth(b); + if (eleDiff !== 0) { + return eleDiff; + } + var zDiff = a.pstyle('z-index').value - b.pstyle('z-index').value; + if (zDiff !== 0) { + return zDiff; + } + // compare indices in the core (order added to graph w/ last on top) + return a.poolIndex() - b.poolIndex(); + }; + + var elesfn$6 = { + forEach: function forEach(fn, thisArg) { + if (fn$6(fn)) { + var N = this.length; + for (var i = 0; i < N; i++) { + var ele = this[i]; + var ret = thisArg ? fn.apply(thisArg, [ele, i, this]) : fn(ele, i, this); + if (ret === false) { + break; + } // exit each early on return false + } + } + + return this; + }, + toArray: function toArray() { + var array = []; + for (var i = 0; i < this.length; i++) { + array.push(this[i]); + } + return array; + }, + slice: function slice(start, end) { + var array = []; + var thisSize = this.length; + if (end == null) { + end = thisSize; + } + if (start == null) { + start = 0; + } + if (start < 0) { + start = thisSize + start; + } + if (end < 0) { + end = thisSize + end; + } + for (var i = start; i >= 0 && i < end && i < thisSize; i++) { + array.push(this[i]); + } + return this.spawn(array); + }, + size: function size() { + return this.length; + }, + eq: function eq(i) { + return this[i] || this.spawn(); + }, + first: function first() { + return this[0] || this.spawn(); + }, + last: function last() { + return this[this.length - 1] || this.spawn(); + }, + empty: function empty() { + return this.length === 0; + }, + nonempty: function nonempty() { + return !this.empty(); + }, + sort: function sort(sortFn) { + if (!fn$6(sortFn)) { + return this; + } + var sorted = this.toArray().sort(sortFn); + return this.spawn(sorted); + }, + sortByZIndex: function sortByZIndex() { + return this.sort(zIndexSort); + }, + zDepth: function zDepth() { + var ele = this[0]; + if (!ele) { + return undefined; + } + + // let cy = ele.cy(); + var _p = ele._private; + var group = _p.group; + if (group === 'nodes') { + var depth = _p.data.parent ? ele.parents().size() : 0; + if (!ele.isParent()) { + return MAX_INT$1 - 1; // childless nodes always on top + } + + return depth; + } else { + var src = _p.source; + var tgt = _p.target; + var srcDepth = src.zDepth(); + var tgtDepth = tgt.zDepth(); + return Math.max(srcDepth, tgtDepth, 0); // depth of deepest parent + } + } + }; + + elesfn$6.each = elesfn$6.forEach; + var defineSymbolIterator = function defineSymbolIterator() { + var typeofUndef = "undefined" ; + var isIteratorSupported = (typeof Symbol === "undefined" ? "undefined" : _typeof(Symbol)) != typeofUndef && _typeof(Symbol.iterator) != typeofUndef; // eslint-disable-line no-undef + + if (isIteratorSupported) { + elesfn$6[Symbol.iterator] = function () { + var _this = this; + // eslint-disable-line no-undef + var entry = { + value: undefined, + done: false + }; + var i = 0; + var length = this.length; + return _defineProperty$1({ + next: function next() { + if (i < length) { + entry.value = _this[i++]; + } else { + entry.value = undefined; + entry.done = true; + } + return entry; + } + }, Symbol.iterator, function () { + // eslint-disable-line no-undef + return this; + }); + }; + } + }; + defineSymbolIterator(); + + var getLayoutDimensionOptions = defaults$g({ + nodeDimensionsIncludeLabels: false + }); + var elesfn$5 = { + // Calculates and returns node dimensions { x, y } based on options given + layoutDimensions: function layoutDimensions(options) { + options = getLayoutDimensionOptions(options); + var dims; + if (!this.takesUpSpace()) { + dims = { + w: 0, + h: 0 + }; + } else if (options.nodeDimensionsIncludeLabels) { + var bbDim = this.boundingBox(); + dims = { + w: bbDim.w, + h: bbDim.h + }; + } else { + dims = { + w: this.outerWidth(), + h: this.outerHeight() + }; + } + + // sanitise the dimensions for external layouts (avoid division by zero) + if (dims.w === 0 || dims.h === 0) { + dims.w = dims.h = 1; + } + return dims; + }, + // using standard layout options, apply position function (w/ or w/o animation) + layoutPositions: function layoutPositions(layout, options, fn) { + var nodes = this.nodes().filter(function (n) { + return !n.isParent(); + }); + var cy = this.cy(); + var layoutEles = options.eles; // nodes & edges + var getMemoizeKey = function getMemoizeKey(node) { + return node.id(); + }; + var fnMem = memoize$1(fn, getMemoizeKey); // memoized version of position function + + layout.emit({ + type: 'layoutstart', + layout: layout + }); + layout.animations = []; + var calculateSpacing = function calculateSpacing(spacing, nodesBb, pos) { + var center = { + x: nodesBb.x1 + nodesBb.w / 2, + y: nodesBb.y1 + nodesBb.h / 2 + }; + var spacingVector = { + // scale from center of bounding box (not necessarily 0,0) + x: (pos.x - center.x) * spacing, + y: (pos.y - center.y) * spacing + }; + return { + x: center.x + spacingVector.x, + y: center.y + spacingVector.y + }; + }; + var useSpacingFactor = options.spacingFactor && options.spacingFactor !== 1; + var spacingBb = function spacingBb() { + if (!useSpacingFactor) { + return null; + } + var bb = makeBoundingBox(); + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var pos = fnMem(node, i); + expandBoundingBoxByPoint(bb, pos.x, pos.y); + } + return bb; + }; + var bb = spacingBb(); + var getFinalPos = memoize$1(function (node, i) { + var newPos = fnMem(node, i); + if (useSpacingFactor) { + var spacing = Math.abs(options.spacingFactor); + newPos = calculateSpacing(spacing, bb, newPos); + } + if (options.transform != null) { + newPos = options.transform(node, newPos); + } + return newPos; + }, getMemoizeKey); + if (options.animate) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var newPos = getFinalPos(node, i); + var animateNode = options.animateFilter == null || options.animateFilter(node, i); + if (animateNode) { + var ani = node.animation({ + position: newPos, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout.animations.push(ani); + } else { + node.position(newPos); + } + } + if (options.fit) { + var fitAni = cy.animation({ + fit: { + boundingBox: layoutEles.boundingBoxAt(getFinalPos), + padding: options.padding + }, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout.animations.push(fitAni); + } else if (options.zoom !== undefined && options.pan !== undefined) { + var zoomPanAni = cy.animation({ + zoom: options.zoom, + pan: options.pan, + duration: options.animationDuration, + easing: options.animationEasing + }); + layout.animations.push(zoomPanAni); + } + layout.animations.forEach(function (ani) { + return ani.play(); + }); + layout.one('layoutready', options.ready); + layout.emit({ + type: 'layoutready', + layout: layout + }); + Promise$1.all(layout.animations.map(function (ani) { + return ani.promise(); + })).then(function () { + layout.one('layoutstop', options.stop); + layout.emit({ + type: 'layoutstop', + layout: layout + }); + }); + } else { + nodes.positions(getFinalPos); + if (options.fit) { + cy.fit(options.eles, options.padding); + } + if (options.zoom != null) { + cy.zoom(options.zoom); + } + if (options.pan) { + cy.pan(options.pan); + } + layout.one('layoutready', options.ready); + layout.emit({ + type: 'layoutready', + layout: layout + }); + layout.one('layoutstop', options.stop); + layout.emit({ + type: 'layoutstop', + layout: layout + }); + } + return this; // chaining + }, + + layout: function layout(options) { + var cy = this.cy(); + return cy.makeLayout(extend({}, options, { + eles: this + })); + } + }; + + // aliases: + elesfn$5.createLayout = elesfn$5.makeLayout = elesfn$5.layout; + + function styleCache(key, fn, ele) { + var _p = ele._private; + var cache = _p.styleCache = _p.styleCache || []; + var val; + if ((val = cache[key]) != null) { + return val; + } else { + val = cache[key] = fn(ele); + return val; + } + } + function cacheStyleFunction(key, fn) { + key = hashString(key); + return function cachedStyleFunction(ele) { + return styleCache(key, fn, ele); + }; + } + function cachePrototypeStyleFunction(key, fn) { + key = hashString(key); + var selfFn = function selfFn(ele) { + return fn.call(ele); + }; + return function cachedPrototypeStyleFunction() { + var ele = this[0]; + if (ele) { + return styleCache(key, selfFn, ele); + } + }; + } + var elesfn$4 = { + recalculateRenderedStyle: function recalculateRenderedStyle(useCache) { + var cy = this.cy(); + var renderer = cy.renderer(); + var styleEnabled = cy.styleEnabled(); + if (renderer && styleEnabled) { + renderer.recalculateRenderedStyle(this, useCache); + } + return this; + }, + dirtyStyleCache: function dirtyStyleCache() { + var cy = this.cy(); + var dirty = function dirty(ele) { + return ele._private.styleCache = null; + }; + if (cy.hasCompoundNodes()) { + var eles; + eles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); + eles.merge(eles.connectedEdges()); + eles.forEach(dirty); + } else { + this.forEach(function (ele) { + dirty(ele); + ele.connectedEdges().forEach(dirty); + }); + } + return this; + }, + // fully updates (recalculates) the style for the elements + updateStyle: function updateStyle(notifyRenderer) { + var cy = this._private.cy; + if (!cy.styleEnabled()) { + return this; + } + if (cy.batching()) { + var bEles = cy._private.batchStyleEles; + bEles.merge(this); + return this; // chaining and exit early when batching + } + + var hasCompounds = cy.hasCompoundNodes(); + var updatedEles = this; + notifyRenderer = notifyRenderer || notifyRenderer === undefined ? true : false; + if (hasCompounds) { + // then add everything up and down for compound selector checks + updatedEles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); + } + + // let changedEles = style.apply( updatedEles ); + var changedEles = updatedEles; + if (notifyRenderer) { + changedEles.emitAndNotify('style'); // let renderer know we changed style + } else { + changedEles.emit('style'); // just fire the event + } + + updatedEles.forEach(function (ele) { + return ele._private.styleDirty = true; + }); + return this; // chaining + }, + + // private: clears dirty flag and recalculates style + cleanStyle: function cleanStyle() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return; + } + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + if (ele._private.styleDirty) { + // n.b. this flag should be set before apply() to avoid potential infinite recursion + ele._private.styleDirty = false; + cy.style().apply(ele); + } + } + }, + // get the internal parsed style object for the specified property + parsedStyle: function parsedStyle(property) { + var includeNonDefault = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var ele = this[0]; + var cy = ele.cy(); + if (!cy.styleEnabled()) { + return; + } + if (ele) { + this.cleanStyle(); + var overriddenStyle = ele._private.style[property]; + if (overriddenStyle != null) { + return overriddenStyle; + } else if (includeNonDefault) { + return cy.style().getDefaultProperty(property); + } else { + return null; + } + } + }, + numericStyle: function numericStyle(property) { + var ele = this[0]; + if (!ele.cy().styleEnabled()) { + return; + } + if (ele) { + var pstyle = ele.pstyle(property); + return pstyle.pfValue !== undefined ? pstyle.pfValue : pstyle.value; + } + }, + numericStyleUnits: function numericStyleUnits(property) { + var ele = this[0]; + if (!ele.cy().styleEnabled()) { + return; + } + if (ele) { + return ele.pstyle(property).units; + } + }, + // get the specified css property as a rendered value (i.e. on-screen value) + // or get the whole rendered style if no property specified (NB doesn't allow setting) + renderedStyle: function renderedStyle(property) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var ele = this[0]; + if (ele) { + return cy.style().getRenderedStyle(ele, property); + } + }, + // read the calculated css style of the element or override the style (via a bypass) + style: function style(name, value) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var updateTransitions = false; + var style = cy.style(); + if (plainObject(name)) { + // then extend the bypass + var props = name; + style.applyBypass(this, props, updateTransitions); + this.emitAndNotify('style'); // let the renderer know we've updated style + } else if (string(name)) { + if (value === undefined) { + // then get the property from the style + var ele = this[0]; + if (ele) { + return style.getStylePropertyValue(ele, name); + } else { + // empty collection => can't get any value + return; + } + } else { + // then set the bypass with the property value + style.applyBypass(this, name, value, updateTransitions); + this.emitAndNotify('style'); // let the renderer know we've updated style + } + } else if (name === undefined) { + var _ele = this[0]; + if (_ele) { + return style.getRawStyle(_ele); + } else { + // empty collection => can't get any value + return; + } + } + return this; // chaining + }, + + removeStyle: function removeStyle(names) { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return this; + } + var updateTransitions = false; + var style = cy.style(); + var eles = this; + if (names === undefined) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + style.removeAllBypasses(ele, updateTransitions); + } + } else { + names = names.split(/\s+/); + for (var _i = 0; _i < eles.length; _i++) { + var _ele2 = eles[_i]; + style.removeBypasses(_ele2, names, updateTransitions); + } + } + this.emitAndNotify('style'); // let the renderer know we've updated style + + return this; // chaining + }, + + show: function show() { + this.css('display', 'element'); + return this; // chaining + }, + + hide: function hide() { + this.css('display', 'none'); + return this; // chaining + }, + + effectiveOpacity: function effectiveOpacity() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return 1; + } + var hasCompoundNodes = cy.hasCompoundNodes(); + var ele = this[0]; + if (ele) { + var _p = ele._private; + var parentOpacity = ele.pstyle('opacity').value; + if (!hasCompoundNodes) { + return parentOpacity; + } + var parents = !_p.data.parent ? null : ele.parents(); + if (parents) { + for (var i = 0; i < parents.length; i++) { + var parent = parents[i]; + var opacity = parent.pstyle('opacity').value; + parentOpacity = opacity * parentOpacity; + } + } + return parentOpacity; + } + }, + transparent: function transparent() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return false; + } + var ele = this[0]; + var hasCompoundNodes = ele.cy().hasCompoundNodes(); + if (ele) { + if (!hasCompoundNodes) { + return ele.pstyle('opacity').value === 0; + } else { + return ele.effectiveOpacity() === 0; + } + } + }, + backgrounding: function backgrounding() { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return false; + } + var ele = this[0]; + return ele._private.backgrounding ? true : false; + } + }; + function checkCompound(ele, parentOk) { + var _p = ele._private; + var parents = _p.data.parent ? ele.parents() : null; + if (parents) { + for (var i = 0; i < parents.length; i++) { + var parent = parents[i]; + if (!parentOk(parent)) { + return false; + } + } + } + return true; + } + function defineDerivedStateFunction(specs) { + var ok = specs.ok; + var edgeOkViaNode = specs.edgeOkViaNode || specs.ok; + var parentOk = specs.parentOk || specs.ok; + return function () { + var cy = this.cy(); + if (!cy.styleEnabled()) { + return true; + } + var ele = this[0]; + var hasCompoundNodes = cy.hasCompoundNodes(); + if (ele) { + var _p = ele._private; + if (!ok(ele)) { + return false; + } + if (ele.isNode()) { + return !hasCompoundNodes || checkCompound(ele, parentOk); + } else { + var src = _p.source; + var tgt = _p.target; + return edgeOkViaNode(src) && (!hasCompoundNodes || checkCompound(src, edgeOkViaNode)) && (src === tgt || edgeOkViaNode(tgt) && (!hasCompoundNodes || checkCompound(tgt, edgeOkViaNode))); + } + } + }; + } + var eleTakesUpSpace = cacheStyleFunction('eleTakesUpSpace', function (ele) { + return ele.pstyle('display').value === 'element' && ele.width() !== 0 && (ele.isNode() ? ele.height() !== 0 : true); + }); + elesfn$4.takesUpSpace = cachePrototypeStyleFunction('takesUpSpace', defineDerivedStateFunction({ + ok: eleTakesUpSpace + })); + var eleInteractive = cacheStyleFunction('eleInteractive', function (ele) { + return ele.pstyle('events').value === 'yes' && ele.pstyle('visibility').value === 'visible' && eleTakesUpSpace(ele); + }); + var parentInteractive = cacheStyleFunction('parentInteractive', function (parent) { + return parent.pstyle('visibility').value === 'visible' && eleTakesUpSpace(parent); + }); + elesfn$4.interactive = cachePrototypeStyleFunction('interactive', defineDerivedStateFunction({ + ok: eleInteractive, + parentOk: parentInteractive, + edgeOkViaNode: eleTakesUpSpace + })); + elesfn$4.noninteractive = function () { + var ele = this[0]; + if (ele) { + return !ele.interactive(); + } + }; + var eleVisible = cacheStyleFunction('eleVisible', function (ele) { + return ele.pstyle('visibility').value === 'visible' && ele.pstyle('opacity').pfValue !== 0 && eleTakesUpSpace(ele); + }); + var edgeVisibleViaNode = eleTakesUpSpace; + elesfn$4.visible = cachePrototypeStyleFunction('visible', defineDerivedStateFunction({ + ok: eleVisible, + edgeOkViaNode: edgeVisibleViaNode + })); + elesfn$4.hidden = function () { + var ele = this[0]; + if (ele) { + return !ele.visible(); + } + }; + elesfn$4.isBundledBezier = cachePrototypeStyleFunction('isBundledBezier', function () { + if (!this.cy().styleEnabled()) { + return false; + } + return !this.removed() && this.pstyle('curve-style').value === 'bezier' && this.takesUpSpace(); + }); + elesfn$4.bypass = elesfn$4.css = elesfn$4.style; + elesfn$4.renderedCss = elesfn$4.renderedStyle; + elesfn$4.removeBypass = elesfn$4.removeCss = elesfn$4.removeStyle; + elesfn$4.pstyle = elesfn$4.parsedStyle; + + var elesfn$3 = {}; + function defineSwitchFunction(params) { + return function () { + var args = arguments; + var changedEles = []; + + // e.g. cy.nodes().select( data, handler ) + if (args.length === 2) { + var data = args[0]; + var handler = args[1]; + this.on(params.event, data, handler); + } + + // e.g. cy.nodes().select( handler ) + else if (args.length === 1 && fn$6(args[0])) { + var _handler = args[0]; + this.on(params.event, _handler); + } + + // e.g. cy.nodes().select() + // e.g. (private) cy.nodes().select(['tapselect']) + else if (args.length === 0 || args.length === 1 && array(args[0])) { + var addlEvents = args.length === 1 ? args[0] : null; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var able = !params.ableField || ele._private[params.ableField]; + var changed = ele._private[params.field] != params.value; + if (params.overrideAble) { + var overrideAble = params.overrideAble(ele); + if (overrideAble !== undefined) { + able = overrideAble; + if (!overrideAble) { + return this; + } // to save cycles assume not able for all on override + } + } + + if (able) { + ele._private[params.field] = params.value; + if (changed) { + changedEles.push(ele); + } + } + } + var changedColl = this.spawn(changedEles); + changedColl.updateStyle(); // change of state => possible change of style + changedColl.emit(params.event); + if (addlEvents) { + changedColl.emit(addlEvents); + } + } + return this; + }; + } + function defineSwitchSet(params) { + elesfn$3[params.field] = function () { + var ele = this[0]; + if (ele) { + if (params.overrideField) { + var val = params.overrideField(ele); + if (val !== undefined) { + return val; + } + } + return ele._private[params.field]; + } + }; + elesfn$3[params.on] = defineSwitchFunction({ + event: params.on, + field: params.field, + ableField: params.ableField, + overrideAble: params.overrideAble, + value: true + }); + elesfn$3[params.off] = defineSwitchFunction({ + event: params.off, + field: params.field, + ableField: params.ableField, + overrideAble: params.overrideAble, + value: false + }); + } + defineSwitchSet({ + field: 'locked', + overrideField: function overrideField(ele) { + return ele.cy().autolock() ? true : undefined; + }, + on: 'lock', + off: 'unlock' + }); + defineSwitchSet({ + field: 'grabbable', + overrideField: function overrideField(ele) { + return ele.cy().autoungrabify() || ele.pannable() ? false : undefined; + }, + on: 'grabify', + off: 'ungrabify' + }); + defineSwitchSet({ + field: 'selected', + ableField: 'selectable', + overrideAble: function overrideAble(ele) { + return ele.cy().autounselectify() ? false : undefined; + }, + on: 'select', + off: 'unselect' + }); + defineSwitchSet({ + field: 'selectable', + overrideField: function overrideField(ele) { + return ele.cy().autounselectify() ? false : undefined; + }, + on: 'selectify', + off: 'unselectify' + }); + elesfn$3.deselect = elesfn$3.unselect; + elesfn$3.grabbed = function () { + var ele = this[0]; + if (ele) { + return ele._private.grabbed; + } + }; + defineSwitchSet({ + field: 'active', + on: 'activate', + off: 'unactivate' + }); + defineSwitchSet({ + field: 'pannable', + on: 'panify', + off: 'unpanify' + }); + elesfn$3.inactive = function () { + var ele = this[0]; + if (ele) { + return !ele._private.active; + } + }; + + var elesfn$2 = {}; + + // DAG functions + //////////////// + + var defineDagExtremity = function defineDagExtremity(params) { + return function dagExtremityImpl(selector) { + var eles = this; + var ret = []; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + if (!ele.isNode()) { + continue; + } + var disqualified = false; + var edges = ele.connectedEdges(); + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + var src = edge.source(); + var tgt = edge.target(); + if (params.noIncomingEdges && tgt === ele && src !== ele || params.noOutgoingEdges && src === ele && tgt !== ele) { + disqualified = true; + break; + } + } + if (!disqualified) { + ret.push(ele); + } + } + return this.spawn(ret, true).filter(selector); + }; + }; + var defineDagOneHop = function defineDagOneHop(params) { + return function (selector) { + var eles = this; + var oEles = []; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + if (!ele.isNode()) { + continue; + } + var edges = ele.connectedEdges(); + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + var src = edge.source(); + var tgt = edge.target(); + if (params.outgoing && src === ele) { + oEles.push(edge); + oEles.push(tgt); + } else if (params.incoming && tgt === ele) { + oEles.push(edge); + oEles.push(src); + } + } + } + return this.spawn(oEles, true).filter(selector); + }; + }; + var defineDagAllHops = function defineDagAllHops(params) { + return function (selector) { + var eles = this; + var sEles = []; + var sElesIds = {}; + for (;;) { + var next = params.outgoing ? eles.outgoers() : eles.incomers(); + if (next.length === 0) { + break; + } // done if none left + + var newNext = false; + for (var i = 0; i < next.length; i++) { + var n = next[i]; + var nid = n.id(); + if (!sElesIds[nid]) { + sElesIds[nid] = true; + sEles.push(n); + newNext = true; + } + } + if (!newNext) { + break; + } // done if touched all outgoers already + + eles = next; + } + return this.spawn(sEles, true).filter(selector); + }; + }; + elesfn$2.clearTraversalCache = function () { + for (var i = 0; i < this.length; i++) { + this[i]._private.traversalCache = null; + } + }; + extend(elesfn$2, { + // get the root nodes in the DAG + roots: defineDagExtremity({ + noIncomingEdges: true + }), + // get the leaf nodes in the DAG + leaves: defineDagExtremity({ + noOutgoingEdges: true + }), + // normally called children in graph theory + // these nodes =edges=> outgoing nodes + outgoers: cache(defineDagOneHop({ + outgoing: true + }), 'outgoers'), + // aka DAG descendants + successors: defineDagAllHops({ + outgoing: true + }), + // normally called parents in graph theory + // these nodes <=edges= incoming nodes + incomers: cache(defineDagOneHop({ + incoming: true + }), 'incomers'), + // aka DAG ancestors + predecessors: defineDagAllHops({ + incoming: true + }) + }); + + // Neighbourhood functions + ////////////////////////// + + extend(elesfn$2, { + neighborhood: cache(function (selector) { + var elements = []; + var nodes = this.nodes(); + for (var i = 0; i < nodes.length; i++) { + // for all nodes + var node = nodes[i]; + var connectedEdges = node.connectedEdges(); + + // for each connected edge, add the edge and the other node + for (var j = 0; j < connectedEdges.length; j++) { + var edge = connectedEdges[j]; + var src = edge.source(); + var tgt = edge.target(); + var otherNode = node === src ? tgt : src; + + // need check in case of loop + if (otherNode.length > 0) { + elements.push(otherNode[0]); // add node 1 hop away + } + + // add connected edge + elements.push(edge[0]); + } + } + return this.spawn(elements, true).filter(selector); + }, 'neighborhood'), + closedNeighborhood: function closedNeighborhood(selector) { + return this.neighborhood().add(this).filter(selector); + }, + openNeighborhood: function openNeighborhood(selector) { + return this.neighborhood(selector); + } + }); + + // aliases + elesfn$2.neighbourhood = elesfn$2.neighborhood; + elesfn$2.closedNeighbourhood = elesfn$2.closedNeighborhood; + elesfn$2.openNeighbourhood = elesfn$2.openNeighborhood; + + // Edge functions + ///////////////// + + extend(elesfn$2, { + source: cache(function sourceImpl(selector) { + var ele = this[0]; + var src; + if (ele) { + src = ele._private.source || ele.cy().collection(); + } + return src && selector ? src.filter(selector) : src; + }, 'source'), + target: cache(function targetImpl(selector) { + var ele = this[0]; + var tgt; + if (ele) { + tgt = ele._private.target || ele.cy().collection(); + } + return tgt && selector ? tgt.filter(selector) : tgt; + }, 'target'), + sources: defineSourceFunction({ + attr: 'source' + }), + targets: defineSourceFunction({ + attr: 'target' + }) + }); + function defineSourceFunction(params) { + return function sourceImpl(selector) { + var sources = []; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var src = ele._private[params.attr]; + if (src) { + sources.push(src); + } + } + return this.spawn(sources, true).filter(selector); + }; + } + extend(elesfn$2, { + edgesWith: cache(defineEdgesWithFunction(), 'edgesWith'), + edgesTo: cache(defineEdgesWithFunction({ + thisIsSrc: true + }), 'edgesTo') + }); + function defineEdgesWithFunction(params) { + return function edgesWithImpl(otherNodes) { + var elements = []; + var cy = this._private.cy; + var p = params || {}; + + // get elements if a selector is specified + if (string(otherNodes)) { + otherNodes = cy.$(otherNodes); + } + for (var h = 0; h < otherNodes.length; h++) { + var edges = otherNodes[h]._private.edges; + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var edgeData = edge._private.data; + var thisToOther = this.hasElementWithId(edgeData.source) && otherNodes.hasElementWithId(edgeData.target); + var otherToThis = otherNodes.hasElementWithId(edgeData.source) && this.hasElementWithId(edgeData.target); + var edgeConnectsThisAndOther = thisToOther || otherToThis; + if (!edgeConnectsThisAndOther) { + continue; + } + if (p.thisIsSrc || p.thisIsTgt) { + if (p.thisIsSrc && !thisToOther) { + continue; + } + if (p.thisIsTgt && !otherToThis) { + continue; + } + } + elements.push(edge); + } + } + return this.spawn(elements, true); + }; + } + extend(elesfn$2, { + connectedEdges: cache(function (selector) { + var retEles = []; + var eles = this; + for (var i = 0; i < eles.length; i++) { + var node = eles[i]; + if (!node.isNode()) { + continue; + } + var edges = node._private.edges; + for (var j = 0; j < edges.length; j++) { + var edge = edges[j]; + retEles.push(edge); + } + } + return this.spawn(retEles, true).filter(selector); + }, 'connectedEdges'), + connectedNodes: cache(function (selector) { + var retEles = []; + var eles = this; + for (var i = 0; i < eles.length; i++) { + var edge = eles[i]; + if (!edge.isEdge()) { + continue; + } + retEles.push(edge.source()[0]); + retEles.push(edge.target()[0]); + } + return this.spawn(retEles, true).filter(selector); + }, 'connectedNodes'), + parallelEdges: cache(defineParallelEdgesFunction(), 'parallelEdges'), + codirectedEdges: cache(defineParallelEdgesFunction({ + codirected: true + }), 'codirectedEdges') + }); + function defineParallelEdgesFunction(params) { + var defaults = { + codirected: false + }; + params = extend({}, defaults, params); + return function parallelEdgesImpl(selector) { + // micro-optimised for renderer + var elements = []; + var edges = this.edges(); + var p = params; + + // look at all the edges in the collection + for (var i = 0; i < edges.length; i++) { + var edge1 = edges[i]; + var edge1_p = edge1._private; + var src1 = edge1_p.source; + var srcid1 = src1._private.data.id; + var tgtid1 = edge1_p.data.target; + var srcEdges1 = src1._private.edges; + + // look at edges connected to the src node of this edge + for (var j = 0; j < srcEdges1.length; j++) { + var edge2 = srcEdges1[j]; + var edge2data = edge2._private.data; + var tgtid2 = edge2data.target; + var srcid2 = edge2data.source; + var codirected = tgtid2 === tgtid1 && srcid2 === srcid1; + var oppdirected = srcid1 === tgtid2 && tgtid1 === srcid2; + if (p.codirected && codirected || !p.codirected && (codirected || oppdirected)) { + elements.push(edge2); + } + } + } + return this.spawn(elements, true).filter(selector); + }; + } + + // Misc functions + ///////////////// + + extend(elesfn$2, { + components: function components(root) { + var self = this; + var cy = self.cy(); + var visited = cy.collection(); + var unvisited = root == null ? self.nodes() : root.nodes(); + var components = []; + if (root != null && unvisited.empty()) { + // root may contain only edges + unvisited = root.sources(); // doesn't matter which node to use (undirected), so just use the source sides + } + + var visitInComponent = function visitInComponent(node, component) { + visited.merge(node); + unvisited.unmerge(node); + component.merge(node); + }; + if (unvisited.empty()) { + return self.spawn(); + } + var _loop = function _loop() { + // each iteration yields a component + var cmpt = cy.collection(); + components.push(cmpt); + var root = unvisited[0]; + visitInComponent(root, cmpt); + self.bfs({ + directed: false, + roots: root, + visit: function visit(v) { + return visitInComponent(v, cmpt); + } + }); + cmpt.forEach(function (node) { + node.connectedEdges().forEach(function (e) { + // connectedEdges() usually cached + if (self.has(e) && cmpt.has(e.source()) && cmpt.has(e.target())) { + // has() is cheap + cmpt.merge(e); // forEach() only considers nodes -- sets N at call time + } + }); + }); + }; + do { + _loop(); + } while (unvisited.length > 0); + return components; + }, + component: function component() { + var ele = this[0]; + return ele.cy().mutableElements().components(ele)[0]; + } + }); + elesfn$2.componentsOf = elesfn$2.components; + + // represents a set of nodes, edges, or both together + var Collection = function Collection(cy, elements) { + var unique = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var removed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + if (cy === undefined) { + error('A collection must have a reference to the core'); + return; + } + var map = new Map$2(); + var createdElements = false; + if (!elements) { + elements = []; + } else if (elements.length > 0 && plainObject(elements[0]) && !element(elements[0])) { + createdElements = true; + + // make elements from json and restore all at once later + var eles = []; + var elesIds = new Set$1(); + for (var i = 0, l = elements.length; i < l; i++) { + var json = elements[i]; + if (json.data == null) { + json.data = {}; + } + var _data = json.data; + + // make sure newly created elements have valid ids + if (_data.id == null) { + _data.id = uuid(); + } else if (cy.hasElementWithId(_data.id) || elesIds.has(_data.id)) { + continue; // can't create element if prior id already exists + } + + var ele = new Element(cy, json, false); + eles.push(ele); + elesIds.add(_data.id); + } + elements = eles; + } + this.length = 0; + for (var _i = 0, _l = elements.length; _i < _l; _i++) { + var element$1 = elements[_i][0]; // [0] in case elements is an array of collections, rather than array of elements + if (element$1 == null) { + continue; + } + var id = element$1._private.data.id; + if (!unique || !map.has(id)) { + if (unique) { + map.set(id, { + index: this.length, + ele: element$1 + }); + } + this[this.length] = element$1; + this.length++; + } + } + this._private = { + eles: this, + cy: cy, + get map() { + if (this.lazyMap == null) { + this.rebuildMap(); + } + return this.lazyMap; + }, + set map(m) { + this.lazyMap = m; + }, + rebuildMap: function rebuildMap() { + var m = this.lazyMap = new Map$2(); + var eles = this.eles; + for (var _i2 = 0; _i2 < eles.length; _i2++) { + var _ele = eles[_i2]; + m.set(_ele.id(), { + index: _i2, + ele: _ele + }); + } + } + }; + if (unique) { + this._private.map = map; + } + + // restore the elements if we created them from json + if (createdElements && !removed) { + this.restore(); + } + }; + + // Functions + //////////////////////////////////////////////////////////////////////////////////////////////////// + + // keep the prototypes in sync (an element has the same functions as a collection) + // and use elefn and elesfn as shorthands to the prototypes + var elesfn$1 = Element.prototype = Collection.prototype = Object.create(Array.prototype); + elesfn$1.instanceString = function () { + return 'collection'; + }; + elesfn$1.spawn = function (eles, unique) { + return new Collection(this.cy(), eles, unique); + }; + elesfn$1.spawnSelf = function () { + return this.spawn(this); + }; + elesfn$1.cy = function () { + return this._private.cy; + }; + elesfn$1.renderer = function () { + return this._private.cy.renderer(); + }; + elesfn$1.element = function () { + return this[0]; + }; + elesfn$1.collection = function () { + if (collection(this)) { + return this; + } else { + // an element + return new Collection(this._private.cy, [this]); + } + }; + elesfn$1.unique = function () { + return new Collection(this._private.cy, this, true); + }; + elesfn$1.hasElementWithId = function (id) { + id = '' + id; // id must be string + + return this._private.map.has(id); + }; + elesfn$1.getElementById = function (id) { + id = '' + id; // id must be string + + var cy = this._private.cy; + var entry = this._private.map.get(id); + return entry ? entry.ele : new Collection(cy); // get ele or empty collection + }; + + elesfn$1.$id = elesfn$1.getElementById; + elesfn$1.poolIndex = function () { + var cy = this._private.cy; + var eles = cy._private.elements; + var id = this[0]._private.data.id; + return eles._private.map.get(id).index; + }; + elesfn$1.indexOf = function (ele) { + var id = ele[0]._private.data.id; + return this._private.map.get(id).index; + }; + elesfn$1.indexOfId = function (id) { + id = '' + id; // id must be string + + return this._private.map.get(id).index; + }; + elesfn$1.json = function (obj) { + var ele = this.element(); + var cy = this.cy(); + if (ele == null && obj) { + return this; + } // can't set to no eles + + if (ele == null) { + return undefined; + } // can't get from no eles + + var p = ele._private; + if (plainObject(obj)) { + // set + + cy.startBatch(); + if (obj.data) { + ele.data(obj.data); + var _data2 = p.data; + if (ele.isEdge()) { + // source and target are immutable via data() + var move = false; + var spec = {}; + var src = obj.data.source; + var tgt = obj.data.target; + if (src != null && src != _data2.source) { + spec.source = '' + src; // id must be string + move = true; + } + if (tgt != null && tgt != _data2.target) { + spec.target = '' + tgt; // id must be string + move = true; + } + if (move) { + ele = ele.move(spec); + } + } else { + // parent is immutable via data() + var newParentValSpecd = ('parent' in obj.data); + var parent = obj.data.parent; + if (newParentValSpecd && (parent != null || _data2.parent != null) && parent != _data2.parent) { + if (parent === undefined) { + // can't set undefined imperatively, so use null + parent = null; + } + if (parent != null) { + parent = '' + parent; // id must be string + } + + ele = ele.move({ + parent: parent + }); + } + } + } + if (obj.position) { + ele.position(obj.position); + } + + // ignore group -- immutable + + var checkSwitch = function checkSwitch(k, trueFnName, falseFnName) { + var obj_k = obj[k]; + if (obj_k != null && obj_k !== p[k]) { + if (obj_k) { + ele[trueFnName](); + } else { + ele[falseFnName](); + } + } + }; + checkSwitch('removed', 'remove', 'restore'); + checkSwitch('selected', 'select', 'unselect'); + checkSwitch('selectable', 'selectify', 'unselectify'); + checkSwitch('locked', 'lock', 'unlock'); + checkSwitch('grabbable', 'grabify', 'ungrabify'); + checkSwitch('pannable', 'panify', 'unpanify'); + if (obj.classes != null) { + ele.classes(obj.classes); + } + cy.endBatch(); + return this; + } else if (obj === undefined) { + // get + + var json = { + data: copy(p.data), + position: copy(p.position), + group: p.group, + removed: p.removed, + selected: p.selected, + selectable: p.selectable, + locked: p.locked, + grabbable: p.grabbable, + pannable: p.pannable, + classes: null + }; + json.classes = ''; + var i = 0; + p.classes.forEach(function (cls) { + return json.classes += i++ === 0 ? cls : ' ' + cls; + }); + return json; + } + }; + elesfn$1.jsons = function () { + var jsons = []; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var json = ele.json(); + jsons.push(json); + } + return jsons; + }; + elesfn$1.clone = function () { + var cy = this.cy(); + var elesArr = []; + for (var i = 0; i < this.length; i++) { + var ele = this[i]; + var json = ele.json(); + var clone = new Element(cy, json, false); // NB no restore + + elesArr.push(clone); + } + return new Collection(cy, elesArr); + }; + elesfn$1.copy = elesfn$1.clone; + elesfn$1.restore = function () { + var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var addToPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var self = this; + var cy = self.cy(); + var cy_p = cy._private; + + // create arrays of nodes and edges, since we need to + // restore the nodes first + var nodes = []; + var edges = []; + var elements; + for (var _i3 = 0, l = self.length; _i3 < l; _i3++) { + var ele = self[_i3]; + if (addToPool && !ele.removed()) { + // don't need to handle this ele + continue; + } + + // keep nodes first in the array and edges after + if (ele.isNode()) { + // put to front of array if node + nodes.push(ele); + } else { + // put to end of array if edge + edges.push(ele); + } + } + elements = nodes.concat(edges); + var i; + var removeFromElements = function removeFromElements() { + elements.splice(i, 1); + i--; + }; + + // now, restore each element + for (i = 0; i < elements.length; i++) { + var _ele2 = elements[i]; + var _private = _ele2._private; + var _data3 = _private.data; + + // the traversal cache should start fresh when ele is added + _ele2.clearTraversalCache(); + + // set id and validate + if (!addToPool && !_private.removed) ; else if (_data3.id === undefined) { + _data3.id = uuid(); + } else if (number$1(_data3.id)) { + _data3.id = '' + _data3.id; // now it's a string + } else if (emptyString(_data3.id) || !string(_data3.id)) { + error('Can not create element with invalid string ID `' + _data3.id + '`'); + + // can't create element if it has empty string as id or non-string id + removeFromElements(); + continue; + } else if (cy.hasElementWithId(_data3.id)) { + error('Can not create second element with ID `' + _data3.id + '`'); + + // can't create element if one already has that id + removeFromElements(); + continue; + } + var id = _data3.id; // id is finalised, now let's keep a ref + + if (_ele2.isNode()) { + // extra checks for nodes + var pos = _private.position; + + // make sure the nodes have a defined position + + if (pos.x == null) { + pos.x = 0; + } + if (pos.y == null) { + pos.y = 0; + } + } + if (_ele2.isEdge()) { + // extra checks for edges + + var edge = _ele2; + var fields = ['source', 'target']; + var fieldsLength = fields.length; + var badSourceOrTarget = false; + for (var j = 0; j < fieldsLength; j++) { + var field = fields[j]; + var val = _data3[field]; + if (number$1(val)) { + val = _data3[field] = '' + _data3[field]; // now string + } + + if (val == null || val === '') { + // can't create if source or target is not defined properly + error('Can not create edge `' + id + '` with unspecified ' + field); + badSourceOrTarget = true; + } else if (!cy.hasElementWithId(val)) { + // can't create edge if one of its nodes doesn't exist + error('Can not create edge `' + id + '` with nonexistant ' + field + ' `' + val + '`'); + badSourceOrTarget = true; + } + } + if (badSourceOrTarget) { + removeFromElements(); + continue; + } // can't create this + + var src = cy.getElementById(_data3.source); + var tgt = cy.getElementById(_data3.target); + + // only one edge in node if loop + if (src.same(tgt)) { + src._private.edges.push(edge); + } else { + src._private.edges.push(edge); + tgt._private.edges.push(edge); + } + edge._private.source = src; + edge._private.target = tgt; + } // if is edge + + // create mock ids / indexes maps for element so it can be used like collections + _private.map = new Map$2(); + _private.map.set(id, { + ele: _ele2, + index: 0 + }); + _private.removed = false; + if (addToPool) { + cy.addToPool(_ele2); + } + } // for each element + + // do compound node sanity checks + for (var _i4 = 0; _i4 < nodes.length; _i4++) { + // each node + var node = nodes[_i4]; + var _data4 = node._private.data; + if (number$1(_data4.parent)) { + // then automake string + _data4.parent = '' + _data4.parent; + } + var parentId = _data4.parent; + var specifiedParent = parentId != null; + if (specifiedParent || node._private.parent) { + var parent = node._private.parent ? cy.collection().merge(node._private.parent) : cy.getElementById(parentId); + if (parent.empty()) { + // non-existant parent; just remove it + _data4.parent = undefined; + } else if (parent[0].removed()) { + warn('Node added with missing parent, reference to parent removed'); + _data4.parent = undefined; + node._private.parent = null; + } else { + var selfAsParent = false; + var ancestor = parent; + while (!ancestor.empty()) { + if (node.same(ancestor)) { + // mark self as parent and remove from data + selfAsParent = true; + _data4.parent = undefined; // remove parent reference + + // exit or we loop forever + break; + } + ancestor = ancestor.parent(); + } + if (!selfAsParent) { + // connect with children + parent[0]._private.children.push(node); + node._private.parent = parent[0]; + + // let the core know we have a compound graph + cy_p.hasCompoundNodes = true; + } + } // else + } // if specified parent + } // for each node + + if (elements.length > 0) { + var restored = elements.length === self.length ? self : new Collection(cy, elements); + for (var _i5 = 0; _i5 < restored.length; _i5++) { + var _ele3 = restored[_i5]; + if (_ele3.isNode()) { + continue; + } + + // adding an edge invalidates the traversal caches for the parallel edges + _ele3.parallelEdges().clearTraversalCache(); + + // adding an edge invalidates the traversal cache for the connected nodes + _ele3.source().clearTraversalCache(); + _ele3.target().clearTraversalCache(); + } + var toUpdateStyle; + if (cy_p.hasCompoundNodes) { + toUpdateStyle = cy.collection().merge(restored).merge(restored.connectedNodes()).merge(restored.parent()); + } else { + toUpdateStyle = restored; + } + toUpdateStyle.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(notifyRenderer); + if (notifyRenderer) { + restored.emitAndNotify('add'); + } else if (addToPool) { + restored.emit('add'); + } + } + return self; // chainability + }; + + elesfn$1.removed = function () { + var ele = this[0]; + return ele && ele._private.removed; + }; + elesfn$1.inside = function () { + var ele = this[0]; + return ele && !ele._private.removed; + }; + elesfn$1.remove = function () { + var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var removeFromPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var self = this; + var elesToRemove = []; + var elesToRemoveIds = {}; + var cy = self._private.cy; + + // add connected edges + function addConnectedEdges(node) { + var edges = node._private.edges; + for (var i = 0; i < edges.length; i++) { + add(edges[i]); + } + } + + // add descendant nodes + function addChildren(node) { + var children = node._private.children; + for (var i = 0; i < children.length; i++) { + add(children[i]); + } + } + function add(ele) { + var alreadyAdded = elesToRemoveIds[ele.id()]; + if (removeFromPool && ele.removed() || alreadyAdded) { + return; + } else { + elesToRemoveIds[ele.id()] = true; + } + if (ele.isNode()) { + elesToRemove.push(ele); // nodes are removed last + + addConnectedEdges(ele); + addChildren(ele); + } else { + elesToRemove.unshift(ele); // edges are removed first + } + } + + // make the list of elements to remove + // (may be removing more than specified due to connected edges etc) + + for (var i = 0, l = self.length; i < l; i++) { + var ele = self[i]; + add(ele); + } + function removeEdgeRef(node, edge) { + var connectedEdges = node._private.edges; + removeFromArray(connectedEdges, edge); + + // removing an edges invalidates the traversal cache for its nodes + node.clearTraversalCache(); + } + function removeParallelRef(pllEdge) { + // removing an edge invalidates the traversal caches for the parallel edges + pllEdge.clearTraversalCache(); + } + var alteredParents = []; + alteredParents.ids = {}; + function removeChildRef(parent, ele) { + ele = ele[0]; + parent = parent[0]; + var children = parent._private.children; + var pid = parent.id(); + removeFromArray(children, ele); // remove parent => child ref + + ele._private.parent = null; // remove child => parent ref + + if (!alteredParents.ids[pid]) { + alteredParents.ids[pid] = true; + alteredParents.push(parent); + } + } + self.dirtyCompoundBoundsCache(); + if (removeFromPool) { + cy.removeFromPool(elesToRemove); // remove from core pool + } + + for (var _i6 = 0; _i6 < elesToRemove.length; _i6++) { + var _ele4 = elesToRemove[_i6]; + if (_ele4.isEdge()) { + // remove references to this edge in its connected nodes + var src = _ele4.source()[0]; + var tgt = _ele4.target()[0]; + removeEdgeRef(src, _ele4); + removeEdgeRef(tgt, _ele4); + var pllEdges = _ele4.parallelEdges(); + for (var j = 0; j < pllEdges.length; j++) { + var pllEdge = pllEdges[j]; + removeParallelRef(pllEdge); + if (pllEdge.isBundledBezier()) { + pllEdge.dirtyBoundingBoxCache(); + } + } + } else { + // remove reference to parent + var parent = _ele4.parent(); + if (parent.length !== 0) { + removeChildRef(parent, _ele4); + } + } + if (removeFromPool) { + // mark as removed + _ele4._private.removed = true; + } + } + + // check to see if we have a compound graph or not + var elesStillInside = cy._private.elements; + cy._private.hasCompoundNodes = false; + for (var _i7 = 0; _i7 < elesStillInside.length; _i7++) { + var _ele5 = elesStillInside[_i7]; + if (_ele5.isParent()) { + cy._private.hasCompoundNodes = true; + break; + } + } + var removedElements = new Collection(this.cy(), elesToRemove); + if (removedElements.size() > 0) { + // must manually notify since trigger won't do this automatically once removed + + if (notifyRenderer) { + removedElements.emitAndNotify('remove'); + } else if (removeFromPool) { + removedElements.emit('remove'); + } + } + + // the parents who were modified by the removal need their style updated + for (var _i8 = 0; _i8 < alteredParents.length; _i8++) { + var _ele6 = alteredParents[_i8]; + if (!removeFromPool || !_ele6.removed()) { + _ele6.updateStyle(); + } + } + return removedElements; + }; + elesfn$1.move = function (struct) { + var cy = this._private.cy; + var eles = this; + + // just clean up refs, caches, etc. in the same way as when removing and then restoring + // (our calls to remove/restore do not remove from the graph or make events) + var notifyRenderer = false; + var modifyPool = false; + var toString = function toString(id) { + return id == null ? id : '' + id; + }; // id must be string + + if (struct.source !== undefined || struct.target !== undefined) { + var srcId = toString(struct.source); + var tgtId = toString(struct.target); + var srcExists = srcId != null && cy.hasElementWithId(srcId); + var tgtExists = tgtId != null && cy.hasElementWithId(tgtId); + if (srcExists || tgtExists) { + cy.batch(function () { + // avoid duplicate style updates + eles.remove(notifyRenderer, modifyPool); // clean up refs etc. + eles.emitAndNotify('moveout'); + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _data5 = ele._private.data; + if (ele.isEdge()) { + if (srcExists) { + _data5.source = srcId; + } + if (tgtExists) { + _data5.target = tgtId; + } + } + } + eles.restore(notifyRenderer, modifyPool); // make new refs, style, etc. + }); + + eles.emitAndNotify('move'); + } + } else if (struct.parent !== undefined) { + // move node to new parent + var parentId = toString(struct.parent); + var parentExists = parentId === null || cy.hasElementWithId(parentId); + if (parentExists) { + var pidToAssign = parentId === null ? undefined : parentId; + cy.batch(function () { + // avoid duplicate style updates + var updated = eles.remove(notifyRenderer, modifyPool); // clean up refs etc. + updated.emitAndNotify('moveout'); + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _data6 = ele._private.data; + if (ele.isNode()) { + _data6.parent = pidToAssign; + } + } + updated.restore(notifyRenderer, modifyPool); // make new refs, style, etc. + }); + + eles.emitAndNotify('move'); + } + } + return this; + }; + [elesfn$j, elesfn$i, elesfn$h, elesfn$g, elesfn$f, data, elesfn$d, dimensions, elesfn$9, elesfn$8, elesfn$7, elesfn$6, elesfn$5, elesfn$4, elesfn$3, elesfn$2].forEach(function (props) { + extend(elesfn$1, props); + }); + + var corefn$9 = { + add: function add(opts) { + var elements; + var cy = this; + + // add the elements + if (elementOrCollection(opts)) { + var eles = opts; + if (eles._private.cy === cy) { + // same instance => just restore + elements = eles.restore(); + } else { + // otherwise, copy from json + var jsons = []; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + jsons.push(ele.json()); + } + elements = new Collection(cy, jsons); + } + } + + // specify an array of options + else if (array(opts)) { + var _jsons = opts; + elements = new Collection(cy, _jsons); + } + + // specify via opts.nodes and opts.edges + else if (plainObject(opts) && (array(opts.nodes) || array(opts.edges))) { + var elesByGroup = opts; + var _jsons2 = []; + var grs = ['nodes', 'edges']; + for (var _i = 0, il = grs.length; _i < il; _i++) { + var group = grs[_i]; + var elesArray = elesByGroup[group]; + if (array(elesArray)) { + for (var j = 0, jl = elesArray.length; j < jl; j++) { + var json = extend({ + group: group + }, elesArray[j]); + _jsons2.push(json); + } + } + } + elements = new Collection(cy, _jsons2); + } + + // specify options for one element + else { + var _json = opts; + elements = new Element(cy, _json).collection(); + } + return elements; + }, + remove: function remove(collection) { + if (elementOrCollection(collection)) ; else if (string(collection)) { + var selector = collection; + collection = this.$(selector); + } + return collection.remove(); + } + }; + + /* global Float32Array */ + + /*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + function generateCubicBezier(mX1, mY1, mX2, mY2) { + var NEWTON_ITERATIONS = 4, + NEWTON_MIN_SLOPE = 0.001, + SUBDIVISION_PRECISION = 0.0000001, + SUBDIVISION_MAX_ITERATIONS = 10, + kSplineTableSize = 11, + kSampleStepSize = 1.0 / (kSplineTableSize - 1.0), + float32ArraySupported = typeof Float32Array !== 'undefined'; + + /* Must contain four arguments. */ + if (arguments.length !== 4) { + return false; + } + + /* Arguments must be numbers. */ + for (var i = 0; i < 4; ++i) { + if (typeof arguments[i] !== "number" || isNaN(arguments[i]) || !isFinite(arguments[i])) { + return false; + } + } + + /* X values must be in the [0, 1] range. */ + mX1 = Math.min(mX1, 1); + mX2 = Math.min(mX2, 1); + mX1 = Math.max(mX1, 0); + mX2 = Math.max(mX2, 0); + var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); + function A(aA1, aA2) { + return 1.0 - 3.0 * aA2 + 3.0 * aA1; + } + function B(aA1, aA2) { + return 3.0 * aA2 - 6.0 * aA1; + } + function C(aA1) { + return 3.0 * aA1; + } + function calcBezier(aT, aA1, aA2) { + return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; + } + function getSlope(aT, aA1, aA2) { + return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); + } + function newtonRaphsonIterate(aX, aGuessT) { + for (var _i = 0; _i < NEWTON_ITERATIONS; ++_i) { + var currentSlope = getSlope(aGuessT, mX1, mX2); + if (currentSlope === 0.0) { + return aGuessT; + } + var currentX = calcBezier(aGuessT, mX1, mX2) - aX; + aGuessT -= currentX / currentSlope; + } + return aGuessT; + } + function calcSampleValues() { + for (var _i2 = 0; _i2 < kSplineTableSize; ++_i2) { + mSampleValues[_i2] = calcBezier(_i2 * kSampleStepSize, mX1, mX2); + } + } + function binarySubdivide(aX, aA, aB) { + var currentX, + currentT, + i = 0; + do { + currentT = aA + (aB - aA) / 2.0; + currentX = calcBezier(currentT, mX1, mX2) - aX; + if (currentX > 0.0) { + aB = currentT; + } else { + aA = currentT; + } + } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); + return currentT; + } + function getTForX(aX) { + var intervalStart = 0.0, + currentSample = 1, + lastSample = kSplineTableSize - 1; + for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { + intervalStart += kSampleStepSize; + } + --currentSample; + var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]), + guessForT = intervalStart + dist * kSampleStepSize, + initialSlope = getSlope(guessForT, mX1, mX2); + if (initialSlope >= NEWTON_MIN_SLOPE) { + return newtonRaphsonIterate(aX, guessForT); + } else if (initialSlope === 0.0) { + return guessForT; + } else { + return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize); + } + } + var _precomputed = false; + function precompute() { + _precomputed = true; + if (mX1 !== mY1 || mX2 !== mY2) { + calcSampleValues(); + } + } + var f = function f(aX) { + if (!_precomputed) { + precompute(); + } + if (mX1 === mY1 && mX2 === mY2) { + return aX; + } + if (aX === 0) { + return 0; + } + if (aX === 1) { + return 1; + } + return calcBezier(getTForX(aX), mY1, mY2); + }; + f.getControlPoints = function () { + return [{ + x: mX1, + y: mY1 + }, { + x: mX2, + y: mY2 + }]; + }; + var str = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")"; + f.toString = function () { + return str; + }; + return f; + } + + /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + /* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass + then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */ + var generateSpringRK4 = function () { + function springAccelerationForState(state) { + return -state.tension * state.x - state.friction * state.v; + } + function springEvaluateStateWithDerivative(initialState, dt, derivative) { + var state = { + x: initialState.x + derivative.dx * dt, + v: initialState.v + derivative.dv * dt, + tension: initialState.tension, + friction: initialState.friction + }; + return { + dx: state.v, + dv: springAccelerationForState(state) + }; + } + function springIntegrateState(state, dt) { + var a = { + dx: state.v, + dv: springAccelerationForState(state) + }, + b = springEvaluateStateWithDerivative(state, dt * 0.5, a), + c = springEvaluateStateWithDerivative(state, dt * 0.5, b), + d = springEvaluateStateWithDerivative(state, dt, c), + dxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx), + dvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv); + state.x = state.x + dxdt * dt; + state.v = state.v + dvdt * dt; + return state; + } + return function springRK4Factory(tension, friction, duration) { + var initState = { + x: -1, + v: 0, + tension: null, + friction: null + }, + path = [0], + time_lapsed = 0, + tolerance = 1 / 10000, + DT = 16 / 1000, + have_duration, + dt, + last_state; + tension = parseFloat(tension) || 500; + friction = parseFloat(friction) || 20; + duration = duration || null; + initState.tension = tension; + initState.friction = friction; + have_duration = duration !== null; + + /* Calculate the actual time it takes for this animation to complete with the provided conditions. */ + if (have_duration) { + /* Run the simulation without a duration. */ + time_lapsed = springRK4Factory(tension, friction); + /* Compute the adjusted time delta. */ + dt = time_lapsed / duration * DT; + } else { + dt = DT; + } + for (;;) { + /* Next/step function .*/ + last_state = springIntegrateState(last_state || initState, dt); + /* Store the position. */ + path.push(1 + last_state.x); + time_lapsed += 16; + /* If the change threshold is reached, break. */ + if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) { + break; + } + } + + /* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the + computed path and returns a snapshot of the position according to a given percentComplete. */ + return !have_duration ? time_lapsed : function (percentComplete) { + return path[percentComplete * (path.length - 1) | 0]; + }; + }; + }(); + + var cubicBezier = function cubicBezier(t1, p1, t2, p2) { + var bezier = generateCubicBezier(t1, p1, t2, p2); + return function (start, end, percent) { + return start + (end - start) * bezier(percent); + }; + }; + var easings = { + 'linear': function linear(start, end, percent) { + return start + (end - start) * percent; + }, + // default easings + 'ease': cubicBezier(0.25, 0.1, 0.25, 1), + 'ease-in': cubicBezier(0.42, 0, 1, 1), + 'ease-out': cubicBezier(0, 0, 0.58, 1), + 'ease-in-out': cubicBezier(0.42, 0, 0.58, 1), + // sine + 'ease-in-sine': cubicBezier(0.47, 0, 0.745, 0.715), + 'ease-out-sine': cubicBezier(0.39, 0.575, 0.565, 1), + 'ease-in-out-sine': cubicBezier(0.445, 0.05, 0.55, 0.95), + // quad + 'ease-in-quad': cubicBezier(0.55, 0.085, 0.68, 0.53), + 'ease-out-quad': cubicBezier(0.25, 0.46, 0.45, 0.94), + 'ease-in-out-quad': cubicBezier(0.455, 0.03, 0.515, 0.955), + // cubic + 'ease-in-cubic': cubicBezier(0.55, 0.055, 0.675, 0.19), + 'ease-out-cubic': cubicBezier(0.215, 0.61, 0.355, 1), + 'ease-in-out-cubic': cubicBezier(0.645, 0.045, 0.355, 1), + // quart + 'ease-in-quart': cubicBezier(0.895, 0.03, 0.685, 0.22), + 'ease-out-quart': cubicBezier(0.165, 0.84, 0.44, 1), + 'ease-in-out-quart': cubicBezier(0.77, 0, 0.175, 1), + // quint + 'ease-in-quint': cubicBezier(0.755, 0.05, 0.855, 0.06), + 'ease-out-quint': cubicBezier(0.23, 1, 0.32, 1), + 'ease-in-out-quint': cubicBezier(0.86, 0, 0.07, 1), + // expo + 'ease-in-expo': cubicBezier(0.95, 0.05, 0.795, 0.035), + 'ease-out-expo': cubicBezier(0.19, 1, 0.22, 1), + 'ease-in-out-expo': cubicBezier(1, 0, 0, 1), + // circ + 'ease-in-circ': cubicBezier(0.6, 0.04, 0.98, 0.335), + 'ease-out-circ': cubicBezier(0.075, 0.82, 0.165, 1), + 'ease-in-out-circ': cubicBezier(0.785, 0.135, 0.15, 0.86), + // user param easings... + + 'spring': function spring(tension, friction, duration) { + if (duration === 0) { + // can't get a spring w/ duration 0 + return easings.linear; // duration 0 => jump to end so impl doesn't matter + } + + var spring = generateSpringRK4(tension, friction, duration); + return function (start, end, percent) { + return start + (end - start) * spring(percent); + }; + }, + 'cubic-bezier': cubicBezier + }; + + function getEasedValue(type, start, end, percent, easingFn) { + if (percent === 1) { + return end; + } + if (start === end) { + return end; + } + var val = easingFn(start, end, percent); + if (type == null) { + return val; + } + if (type.roundValue || type.color) { + val = Math.round(val); + } + if (type.min !== undefined) { + val = Math.max(val, type.min); + } + if (type.max !== undefined) { + val = Math.min(val, type.max); + } + return val; + } + function getValue(prop, spec) { + if (prop.pfValue != null || prop.value != null) { + if (prop.pfValue != null && (spec == null || spec.type.units !== '%')) { + return prop.pfValue; + } else { + return prop.value; + } + } else { + return prop; + } + } + function ease(startProp, endProp, percent, easingFn, propSpec) { + var type = propSpec != null ? propSpec.type : null; + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + var start = getValue(startProp, propSpec); + var end = getValue(endProp, propSpec); + if (number$1(start) && number$1(end)) { + return getEasedValue(type, start, end, percent, easingFn); + } else if (array(start) && array(end)) { + var easedArr = []; + for (var i = 0; i < end.length; i++) { + var si = start[i]; + var ei = end[i]; + if (si != null && ei != null) { + var val = getEasedValue(type, si, ei, percent, easingFn); + easedArr.push(val); + } else { + easedArr.push(ei); + } + } + return easedArr; + } + return undefined; + } + + function step$1(self, ani, now, isCore) { + var isEles = !isCore; + var _p = self._private; + var ani_p = ani._private; + var pEasing = ani_p.easing; + var startTime = ani_p.startTime; + var cy = isCore ? self : self.cy(); + var style = cy.style(); + if (!ani_p.easingImpl) { + if (pEasing == null) { + // use default + ani_p.easingImpl = easings['linear']; + } else { + // then define w/ name + var easingVals; + if (string(pEasing)) { + var easingProp = style.parse('transition-timing-function', pEasing); + easingVals = easingProp.value; + } else { + // then assume preparsed array + easingVals = pEasing; + } + var name, args; + if (string(easingVals)) { + name = easingVals; + args = []; + } else { + name = easingVals[1]; + args = easingVals.slice(2).map(function (n) { + return +n; + }); + } + if (args.length > 0) { + // create with args + if (name === 'spring') { + args.push(ani_p.duration); // need duration to generate spring + } + + ani_p.easingImpl = easings[name].apply(null, args); + } else { + // static impl by name + ani_p.easingImpl = easings[name]; + } + } + } + var easing = ani_p.easingImpl; + var percent; + if (ani_p.duration === 0) { + percent = 1; + } else { + percent = (now - startTime) / ani_p.duration; + } + if (ani_p.applying) { + percent = ani_p.progress; + } + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + if (ani_p.delay == null) { + // then update + + var startPos = ani_p.startPosition; + var endPos = ani_p.position; + if (endPos && isEles && !self.locked()) { + var newPos = {}; + if (valid(startPos.x, endPos.x)) { + newPos.x = ease(startPos.x, endPos.x, percent, easing); + } + if (valid(startPos.y, endPos.y)) { + newPos.y = ease(startPos.y, endPos.y, percent, easing); + } + self.position(newPos); + } + var startPan = ani_p.startPan; + var endPan = ani_p.pan; + var pan = _p.pan; + var animatingPan = endPan != null && isCore; + if (animatingPan) { + if (valid(startPan.x, endPan.x)) { + pan.x = ease(startPan.x, endPan.x, percent, easing); + } + if (valid(startPan.y, endPan.y)) { + pan.y = ease(startPan.y, endPan.y, percent, easing); + } + self.emit('pan'); + } + var startZoom = ani_p.startZoom; + var endZoom = ani_p.zoom; + var animatingZoom = endZoom != null && isCore; + if (animatingZoom) { + if (valid(startZoom, endZoom)) { + _p.zoom = bound(_p.minZoom, ease(startZoom, endZoom, percent, easing), _p.maxZoom); + } + self.emit('zoom'); + } + if (animatingPan || animatingZoom) { + self.emit('viewport'); + } + var props = ani_p.style; + if (props && props.length > 0 && isEles) { + for (var i = 0; i < props.length; i++) { + var prop = props[i]; + var _name = prop.name; + var end = prop; + var start = ani_p.startStyle[_name]; + var propSpec = style.properties[start.name]; + var easedVal = ease(start, end, percent, easing, propSpec); + style.overrideBypass(self, _name, easedVal); + } // for props + + self.emit('style'); + } // if + } + + ani_p.progress = percent; + return percent; + } + function valid(start, end) { + if (start == null || end == null) { + return false; + } + if (number$1(start) && number$1(end)) { + return true; + } else if (start && end) { + return true; + } + return false; + } + + function startAnimation(self, ani, now, isCore) { + var ani_p = ani._private; + ani_p.started = true; + ani_p.startTime = now - ani_p.progress * ani_p.duration; + } + + function stepAll(now, cy) { + var eles = cy._private.aniEles; + var doneEles = []; + function stepOne(ele, isCore) { + var _p = ele._private; + var current = _p.animation.current; + var queue = _p.animation.queue; + var ranAnis = false; + + // if nothing currently animating, get something from the queue + if (current.length === 0) { + var next = queue.shift(); + if (next) { + current.push(next); + } + } + var callbacks = function callbacks(_callbacks) { + for (var j = _callbacks.length - 1; j >= 0; j--) { + var cb = _callbacks[j]; + cb(); + } + _callbacks.splice(0, _callbacks.length); + }; + + // step and remove if done + for (var i = current.length - 1; i >= 0; i--) { + var ani = current[i]; + var ani_p = ani._private; + if (ani_p.stopped) { + current.splice(i, 1); + ani_p.hooked = false; + ani_p.playing = false; + ani_p.started = false; + callbacks(ani_p.frames); + continue; + } + if (!ani_p.playing && !ani_p.applying) { + continue; + } + + // an apply() while playing shouldn't do anything + if (ani_p.playing && ani_p.applying) { + ani_p.applying = false; + } + if (!ani_p.started) { + startAnimation(ele, ani, now); + } + step$1(ele, ani, now, isCore); + if (ani_p.applying) { + ani_p.applying = false; + } + callbacks(ani_p.frames); + if (ani_p.step != null) { + ani_p.step(now); + } + if (ani.completed()) { + current.splice(i, 1); + ani_p.hooked = false; + ani_p.playing = false; + ani_p.started = false; + callbacks(ani_p.completes); + } + ranAnis = true; + } + if (!isCore && current.length === 0 && queue.length === 0) { + doneEles.push(ele); + } + return ranAnis; + } // stepElement + + // handle all eles + var ranEleAni = false; + for (var e = 0; e < eles.length; e++) { + var ele = eles[e]; + var handledThisEle = stepOne(ele); + ranEleAni = ranEleAni || handledThisEle; + } // each element + + var ranCoreAni = stepOne(cy, true); + + // notify renderer + if (ranEleAni || ranCoreAni) { + if (eles.length > 0) { + cy.notify('draw', eles); + } else { + cy.notify('draw'); + } + } + + // remove elements from list of currently animating if its queues are empty + eles.unmerge(doneEles); + cy.emit('step'); + } // stepAll + + var corefn$8 = { + // pull in animation functions + animate: define.animate(), + animation: define.animation(), + animated: define.animated(), + clearQueue: define.clearQueue(), + delay: define.delay(), + delayAnimation: define.delayAnimation(), + stop: define.stop(), + addToAnimationPool: function addToAnimationPool(eles) { + var cy = this; + if (!cy.styleEnabled()) { + return; + } // save cycles when no style used + + cy._private.aniEles.merge(eles); + }, + stopAnimationLoop: function stopAnimationLoop() { + this._private.animationsRunning = false; + }, + startAnimationLoop: function startAnimationLoop() { + var cy = this; + cy._private.animationsRunning = true; + if (!cy.styleEnabled()) { + return; + } // save cycles when no style used + + // NB the animation loop will exec in headless environments if style enabled + // and explicit cy.destroy() is necessary to stop the loop + + function headlessStep() { + if (!cy._private.animationsRunning) { + return; + } + requestAnimationFrame(function animationStep(now) { + stepAll(now, cy); + headlessStep(); + }); + } + var renderer = cy.renderer(); + if (renderer && renderer.beforeRender) { + // let the renderer schedule animations + renderer.beforeRender(function rendererAnimationStep(willDraw, now) { + stepAll(now, cy); + }, renderer.beforeRenderPriorities.animations); + } else { + // manage the animation loop ourselves + headlessStep(); // first call + } + } + }; + + var emitterOptions = { + qualifierCompare: function qualifierCompare(selector1, selector2) { + if (selector1 == null || selector2 == null) { + return selector1 == null && selector2 == null; + } else { + return selector1.sameText(selector2); + } + }, + eventMatches: function eventMatches(cy, listener, eventObj) { + var selector = listener.qualifier; + if (selector != null) { + return cy !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target); + } + return true; + }, + addEventFields: function addEventFields(cy, evt) { + evt.cy = cy; + evt.target = cy; + }, + callbackContext: function callbackContext(cy, listener, eventObj) { + return listener.qualifier != null ? eventObj.target : cy; + } + }; + var argSelector = function argSelector(arg) { + if (string(arg)) { + return new Selector(arg); + } else { + return arg; + } + }; + var elesfn = { + createEmitter: function createEmitter() { + var _p = this._private; + if (!_p.emitter) { + _p.emitter = new Emitter(emitterOptions, this); + } + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(events, selector, callback) { + this.emitter().on(events, argSelector(selector), callback); + return this; + }, + removeListener: function removeListener(events, selector, callback) { + this.emitter().removeListener(events, argSelector(selector), callback); + return this; + }, + removeAllListeners: function removeAllListeners() { + this.emitter().removeAllListeners(); + return this; + }, + one: function one(events, selector, callback) { + this.emitter().one(events, argSelector(selector), callback); + return this; + }, + once: function once(events, selector, callback) { + this.emitter().one(events, argSelector(selector), callback); + return this; + }, + emit: function emit(events, extraParams) { + this.emitter().emit(events, extraParams); + return this; + }, + emitAndNotify: function emitAndNotify(event, eles) { + this.emit(event); + this.notify(event, eles); + return this; + } + }; + define.eventAliasesOn(elesfn); + + var corefn$7 = { + png: function png(options) { + var renderer = this._private.renderer; + options = options || {}; + return renderer.png(options); + }, + jpg: function jpg(options) { + var renderer = this._private.renderer; + options = options || {}; + options.bg = options.bg || '#fff'; + return renderer.jpg(options); + } + }; + corefn$7.jpeg = corefn$7.jpg; + + var corefn$6 = { + layout: function layout(options) { + var cy = this; + if (options == null) { + error('Layout options must be specified to make a layout'); + return; + } + if (options.name == null) { + error('A `name` must be specified to make a layout'); + return; + } + var name = options.name; + var Layout = cy.extension('layout', name); + if (Layout == null) { + error('No such layout `' + name + '` found. Did you forget to import it and `cytoscape.use()` it?'); + return; + } + var eles; + if (string(options.eles)) { + eles = cy.$(options.eles); + } else { + eles = options.eles != null ? options.eles : cy.$(); + } + var layout = new Layout(extend({}, options, { + cy: cy, + eles: eles + })); + return layout; + } + }; + corefn$6.createLayout = corefn$6.makeLayout = corefn$6.layout; + + var corefn$5 = { + notify: function notify(eventName, eventEles) { + var _p = this._private; + if (this.batching()) { + _p.batchNotifications = _p.batchNotifications || {}; + var eles = _p.batchNotifications[eventName] = _p.batchNotifications[eventName] || this.collection(); + if (eventEles != null) { + eles.merge(eventEles); + } + return; // notifications are disabled during batching + } + + if (!_p.notificationsEnabled) { + return; + } // exit on disabled + + var renderer = this.renderer(); + + // exit if destroy() called on core or renderer in between frames #1499 #1528 + if (this.destroyed() || !renderer) { + return; + } + renderer.notify(eventName, eventEles); + }, + notifications: function notifications(bool) { + var p = this._private; + if (bool === undefined) { + return p.notificationsEnabled; + } else { + p.notificationsEnabled = bool ? true : false; + } + return this; + }, + noNotifications: function noNotifications(callback) { + this.notifications(false); + callback(); + this.notifications(true); + }, + batching: function batching() { + return this._private.batchCount > 0; + }, + startBatch: function startBatch() { + var _p = this._private; + if (_p.batchCount == null) { + _p.batchCount = 0; + } + if (_p.batchCount === 0) { + _p.batchStyleEles = this.collection(); + _p.batchNotifications = {}; + } + _p.batchCount++; + return this; + }, + endBatch: function endBatch() { + var _p = this._private; + if (_p.batchCount === 0) { + return this; + } + _p.batchCount--; + if (_p.batchCount === 0) { + // update style for dirty eles + _p.batchStyleEles.updateStyle(); + var renderer = this.renderer(); + + // notify the renderer of queued eles and event types + Object.keys(_p.batchNotifications).forEach(function (eventName) { + var eles = _p.batchNotifications[eventName]; + if (eles.empty()) { + renderer.notify(eventName); + } else { + renderer.notify(eventName, eles); + } + }); + } + return this; + }, + batch: function batch(callback) { + this.startBatch(); + callback(); + this.endBatch(); + return this; + }, + // for backwards compatibility + batchData: function batchData(map) { + var cy = this; + return this.batch(function () { + var ids = Object.keys(map); + for (var i = 0; i < ids.length; i++) { + var id = ids[i]; + var data = map[id]; + var ele = cy.getElementById(id); + ele.data(data); + } + }); + } + }; + + var rendererDefaults = defaults$g({ + hideEdgesOnViewport: false, + textureOnViewport: false, + motionBlur: false, + motionBlurOpacity: 0.05, + pixelRatio: undefined, + desktopTapThreshold: 4, + touchTapThreshold: 8, + wheelSensitivity: 1, + debug: false, + showFps: false + }); + var corefn$4 = { + renderTo: function renderTo(context, zoom, pan, pxRatio) { + var r = this._private.renderer; + r.renderTo(context, zoom, pan, pxRatio); + return this; + }, + renderer: function renderer() { + return this._private.renderer; + }, + forceRender: function forceRender() { + this.notify('draw'); + return this; + }, + resize: function resize() { + this.invalidateSize(); + this.emitAndNotify('resize'); + return this; + }, + initRenderer: function initRenderer(options) { + var cy = this; + var RendererProto = cy.extension('renderer', options.name); + if (RendererProto == null) { + error("Can not initialise: No such renderer `".concat(options.name, "` found. Did you forget to import it and `cytoscape.use()` it?")); + return; + } + if (options.wheelSensitivity !== undefined) { + warn("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."); + } + var rOpts = rendererDefaults(options); + rOpts.cy = cy; + cy._private.renderer = new RendererProto(rOpts); + this.notify('init'); + }, + destroyRenderer: function destroyRenderer() { + var cy = this; + cy.notify('destroy'); // destroy the renderer + + var domEle = cy.container(); + if (domEle) { + domEle._cyreg = null; + while (domEle.childNodes.length > 0) { + domEle.removeChild(domEle.childNodes[0]); + } + } + cy._private.renderer = null; // to be extra safe, remove the ref + cy.mutableElements().forEach(function (ele) { + var _p = ele._private; + _p.rscratch = {}; + _p.rstyle = {}; + _p.animation.current = []; + _p.animation.queue = []; + }); + }, + onRender: function onRender(fn) { + return this.on('render', fn); + }, + offRender: function offRender(fn) { + return this.off('render', fn); + } + }; + corefn$4.invalidateDimensions = corefn$4.resize; + + var corefn$3 = { + // get a collection + // - empty collection on no args + // - collection of elements in the graph on selector arg + // - guarantee a returned collection when elements or collection specified + collection: function collection(eles, opts) { + if (string(eles)) { + return this.$(eles); + } else if (elementOrCollection(eles)) { + return eles.collection(); + } else if (array(eles)) { + if (!opts) { + opts = {}; + } + return new Collection(this, eles, opts.unique, opts.removed); + } + return new Collection(this); + }, + nodes: function nodes(selector) { + var nodes = this.$(function (ele) { + return ele.isNode(); + }); + if (selector) { + return nodes.filter(selector); + } + return nodes; + }, + edges: function edges(selector) { + var edges = this.$(function (ele) { + return ele.isEdge(); + }); + if (selector) { + return edges.filter(selector); + } + return edges; + }, + // search the graph like jQuery + $: function $(selector) { + var eles = this._private.elements; + if (selector) { + return eles.filter(selector); + } else { + return eles.spawnSelf(); + } + }, + mutableElements: function mutableElements() { + return this._private.elements; + } + }; + + // aliases + corefn$3.elements = corefn$3.filter = corefn$3.$; + + var styfn$8 = {}; + + // keys for style blocks, e.g. ttfftt + var TRUE = 't'; + var FALSE = 'f'; + + // (potentially expensive calculation) + // apply the style to the element based on + // - its bypass + // - what selectors match it + styfn$8.apply = function (eles) { + var self = this; + var _p = self._private; + var cy = _p.cy; + var updatedEles = cy.collection(); + for (var ie = 0; ie < eles.length; ie++) { + var ele = eles[ie]; + var cxtMeta = self.getContextMeta(ele); + if (cxtMeta.empty) { + continue; + } + var cxtStyle = self.getContextStyle(cxtMeta); + var app = self.applyContextStyle(cxtMeta, cxtStyle, ele); + if (ele._private.appliedInitStyle) { + self.updateTransitions(ele, app.diffProps); + } else { + ele._private.appliedInitStyle = true; + } + var hintsDiff = self.updateStyleHints(ele); + if (hintsDiff) { + updatedEles.push(ele); + } + } // for elements + + return updatedEles; + }; + styfn$8.getPropertiesDiff = function (oldCxtKey, newCxtKey) { + var self = this; + var cache = self._private.propDiffs = self._private.propDiffs || {}; + var dualCxtKey = oldCxtKey + '-' + newCxtKey; + var cachedVal = cache[dualCxtKey]; + if (cachedVal) { + return cachedVal; + } + var diffProps = []; + var addedProp = {}; + for (var i = 0; i < self.length; i++) { + var cxt = self[i]; + var oldHasCxt = oldCxtKey[i] === TRUE; + var newHasCxt = newCxtKey[i] === TRUE; + var cxtHasDiffed = oldHasCxt !== newHasCxt; + var cxtHasMappedProps = cxt.mappedProperties.length > 0; + if (cxtHasDiffed || newHasCxt && cxtHasMappedProps) { + var props = void 0; + if (cxtHasDiffed && cxtHasMappedProps) { + props = cxt.properties; // suffices b/c mappedProperties is a subset of properties + } else if (cxtHasDiffed) { + props = cxt.properties; // need to check them all + } else if (cxtHasMappedProps) { + props = cxt.mappedProperties; // only need to check mapped + } + + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + var name = prop.name; + + // if a later context overrides this property, then the fact that this context has switched/diffed doesn't matter + // (semi expensive check since it makes this function O(n^2) on context length, but worth it since overall result + // is cached) + var laterCxtOverrides = false; + for (var k = i + 1; k < self.length; k++) { + var laterCxt = self[k]; + var hasLaterCxt = newCxtKey[k] === TRUE; + if (!hasLaterCxt) { + continue; + } // can't override unless the context is active + + laterCxtOverrides = laterCxt.properties[prop.name] != null; + if (laterCxtOverrides) { + break; + } // exit early as long as one later context overrides + } + + if (!addedProp[name] && !laterCxtOverrides) { + addedProp[name] = true; + diffProps.push(name); + } + } // for props + } // if + } // for contexts + + cache[dualCxtKey] = diffProps; + return diffProps; + }; + styfn$8.getContextMeta = function (ele) { + var self = this; + var cxtKey = ''; + var diffProps; + var prevKey = ele._private.styleCxtKey || ''; + + // get the cxt key + for (var i = 0; i < self.length; i++) { + var context = self[i]; + var contextSelectorMatches = context.selector && context.selector.matches(ele); // NB: context.selector may be null for 'core' + + if (contextSelectorMatches) { + cxtKey += TRUE; + } else { + cxtKey += FALSE; + } + } // for context + + diffProps = self.getPropertiesDiff(prevKey, cxtKey); + ele._private.styleCxtKey = cxtKey; + return { + key: cxtKey, + diffPropNames: diffProps, + empty: diffProps.length === 0 + }; + }; + + // gets a computed ele style object based on matched contexts + styfn$8.getContextStyle = function (cxtMeta) { + var cxtKey = cxtMeta.key; + var self = this; + var cxtStyles = this._private.contextStyles = this._private.contextStyles || {}; + + // if already computed style, returned cached copy + if (cxtStyles[cxtKey]) { + return cxtStyles[cxtKey]; + } + var style = { + _private: { + key: cxtKey + } + }; + for (var i = 0; i < self.length; i++) { + var cxt = self[i]; + var hasCxt = cxtKey[i] === TRUE; + if (!hasCxt) { + continue; + } + for (var j = 0; j < cxt.properties.length; j++) { + var prop = cxt.properties[j]; + style[prop.name] = prop; + } + } + cxtStyles[cxtKey] = style; + return style; + }; + styfn$8.applyContextStyle = function (cxtMeta, cxtStyle, ele) { + var self = this; + var diffProps = cxtMeta.diffPropNames; + var retDiffProps = {}; + var types = self.types; + for (var i = 0; i < diffProps.length; i++) { + var diffPropName = diffProps[i]; + var cxtProp = cxtStyle[diffPropName]; + var eleProp = ele.pstyle(diffPropName); + if (!cxtProp) { + // no context prop means delete + if (!eleProp) { + continue; // no existing prop means nothing needs to be removed + // nb affects initial application on mapped values like control-point-distances + } else if (eleProp.bypass) { + cxtProp = { + name: diffPropName, + deleteBypassed: true + }; + } else { + cxtProp = { + name: diffPropName, + "delete": true + }; + } + } + + // save cycles when the context prop doesn't need to be applied + if (eleProp === cxtProp) { + continue; + } + + // save cycles when a mapped context prop doesn't need to be applied + if (cxtProp.mapped === types.fn // context prop is function mapper + && eleProp != null // some props can be null even by default (e.g. a prop that overrides another one) + && eleProp.mapping != null // ele prop is a concrete value from from a mapper + && eleProp.mapping.value === cxtProp.value // the current prop on the ele is a flat prop value for the function mapper + ) { + // NB don't write to cxtProp, as it's shared among eles (stored in stylesheet) + var mapping = eleProp.mapping; // can write to mapping, as it's a per-ele copy + var fnValue = mapping.fnValue = cxtProp.value(ele); // temporarily cache the value in case of a miss + + if (fnValue === mapping.prevFnValue) { + continue; + } + } + var retDiffProp = retDiffProps[diffPropName] = { + prev: eleProp + }; + self.applyParsedProperty(ele, cxtProp); + retDiffProp.next = ele.pstyle(diffPropName); + if (retDiffProp.next && retDiffProp.next.bypass) { + retDiffProp.next = retDiffProp.next.bypassed; + } + } + return { + diffProps: retDiffProps + }; + }; + styfn$8.updateStyleHints = function (ele) { + var _p = ele._private; + var self = this; + var propNames = self.propertyGroupNames; + var propGrKeys = self.propertyGroupKeys; + var propHash = function propHash(ele, propNames, seedKey) { + return self.getPropertiesHash(ele, propNames, seedKey); + }; + var oldStyleKey = _p.styleKey; + if (ele.removed()) { + return false; + } + var isNode = _p.group === 'nodes'; + + // get the style key hashes per prop group + // but lazily -- only use non-default prop values to reduce the number of hashes + // + + var overriddenStyles = ele._private.style; + propNames = Object.keys(overriddenStyles); + for (var i = 0; i < propGrKeys.length; i++) { + var grKey = propGrKeys[i]; + _p.styleKeys[grKey] = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; + } + var updateGrKey1 = function updateGrKey1(val, grKey) { + return _p.styleKeys[grKey][0] = hashInt(val, _p.styleKeys[grKey][0]); + }; + var updateGrKey2 = function updateGrKey2(val, grKey) { + return _p.styleKeys[grKey][1] = hashIntAlt(val, _p.styleKeys[grKey][1]); + }; + var updateGrKey = function updateGrKey(val, grKey) { + updateGrKey1(val, grKey); + updateGrKey2(val, grKey); + }; + var updateGrKeyWStr = function updateGrKeyWStr(strVal, grKey) { + for (var j = 0; j < strVal.length; j++) { + var ch = strVal.charCodeAt(j); + updateGrKey1(ch, grKey); + updateGrKey2(ch, grKey); + } + }; + + // - hashing works on 32 bit ints b/c we use bitwise ops + // - small numbers get cut off (e.g. 0.123 is seen as 0 by the hashing function) + // - raise up small numbers so more significant digits are seen by hashing + // - make small numbers larger than a normal value to avoid collisions + // - works in practice and it's relatively cheap + var N = 2000000000; + var cleanNum = function cleanNum(val) { + return -128 < val && val < 128 && Math.floor(val) !== val ? N - (val * 1024 | 0) : val; + }; + for (var _i = 0; _i < propNames.length; _i++) { + var name = propNames[_i]; + var parsedProp = overriddenStyles[name]; + if (parsedProp == null) { + continue; + } + var propInfo = this.properties[name]; + var type = propInfo.type; + var _grKey = propInfo.groupKey; + var normalizedNumberVal = void 0; + if (propInfo.hashOverride != null) { + normalizedNumberVal = propInfo.hashOverride(ele, parsedProp); + } else if (parsedProp.pfValue != null) { + normalizedNumberVal = parsedProp.pfValue; + } + + // might not be a number if it allows enums + var numberVal = propInfo.enums == null ? parsedProp.value : null; + var haveNormNum = normalizedNumberVal != null; + var haveUnitedNum = numberVal != null; + var haveNum = haveNormNum || haveUnitedNum; + var units = parsedProp.units; + + // numbers are cheaper to hash than strings + // 1 hash op vs n hash ops (for length n string) + if (type.number && haveNum && !type.multiple) { + var v = haveNormNum ? normalizedNumberVal : numberVal; + updateGrKey(cleanNum(v), _grKey); + if (!haveNormNum && units != null) { + updateGrKeyWStr(units, _grKey); + } + } else { + updateGrKeyWStr(parsedProp.strValue, _grKey); + } + } + + // overall style key + // + + var hash = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; + for (var _i2 = 0; _i2 < propGrKeys.length; _i2++) { + var _grKey2 = propGrKeys[_i2]; + var grHash = _p.styleKeys[_grKey2]; + hash[0] = hashInt(grHash[0], hash[0]); + hash[1] = hashIntAlt(grHash[1], hash[1]); + } + _p.styleKey = combineHashes(hash[0], hash[1]); + + // label dims + // + + var sk = _p.styleKeys; + _p.labelDimsKey = combineHashesArray(sk.labelDimensions); + var labelKeys = propHash(ele, ['label'], sk.labelDimensions); + _p.labelKey = combineHashesArray(labelKeys); + _p.labelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, labelKeys)); + if (!isNode) { + var sourceLabelKeys = propHash(ele, ['source-label'], sk.labelDimensions); + _p.sourceLabelKey = combineHashesArray(sourceLabelKeys); + _p.sourceLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, sourceLabelKeys)); + var targetLabelKeys = propHash(ele, ['target-label'], sk.labelDimensions); + _p.targetLabelKey = combineHashesArray(targetLabelKeys); + _p.targetLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, targetLabelKeys)); + } + + // node + // + + if (isNode) { + var _p$styleKeys = _p.styleKeys, + nodeBody = _p$styleKeys.nodeBody, + nodeBorder = _p$styleKeys.nodeBorder, + nodeOutline = _p$styleKeys.nodeOutline, + backgroundImage = _p$styleKeys.backgroundImage, + compound = _p$styleKeys.compound, + pie = _p$styleKeys.pie; + var nodeKeys = [nodeBody, nodeBorder, nodeOutline, backgroundImage, compound, pie].filter(function (k) { + return k != null; + }).reduce(hashArrays, [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]); + _p.nodeKey = combineHashesArray(nodeKeys); + _p.hasPie = pie != null && pie[0] !== DEFAULT_HASH_SEED && pie[1] !== DEFAULT_HASH_SEED_ALT; + } + return oldStyleKey !== _p.styleKey; + }; + styfn$8.clearStyleHints = function (ele) { + var _p = ele._private; + _p.styleCxtKey = ''; + _p.styleKeys = {}; + _p.styleKey = null; + _p.labelKey = null; + _p.labelStyleKey = null; + _p.sourceLabelKey = null; + _p.sourceLabelStyleKey = null; + _p.targetLabelKey = null; + _p.targetLabelStyleKey = null; + _p.nodeKey = null; + _p.hasPie = null; + }; + + // apply a property to the style (for internal use) + // returns whether application was successful + // + // now, this function flattens the property, and here's how: + // + // for parsedProp:{ bypass: true, deleteBypass: true } + // no property is generated, instead the bypass property in the + // element's style is replaced by what's pointed to by the `bypassed` + // field in the bypass property (i.e. restoring the property the + // bypass was overriding) + // + // for parsedProp:{ mapped: truthy } + // the generated flattenedProp:{ mapping: prop } + // + // for parsedProp:{ bypass: true } + // the generated flattenedProp:{ bypassed: parsedProp } + styfn$8.applyParsedProperty = function (ele, parsedProp) { + var self = this; + var prop = parsedProp; + var style = ele._private.style; + var flatProp; + var types = self.types; + var type = self.properties[prop.name].type; + var propIsBypass = prop.bypass; + var origProp = style[prop.name]; + var origPropIsBypass = origProp && origProp.bypass; + var _p = ele._private; + var flatPropMapping = 'mapping'; + var getVal = function getVal(p) { + if (p == null) { + return null; + } else if (p.pfValue != null) { + return p.pfValue; + } else { + return p.value; + } + }; + var checkTriggers = function checkTriggers() { + var fromVal = getVal(origProp); + var toVal = getVal(prop); + self.checkTriggers(ele, prop.name, fromVal, toVal); + }; + + // edge sanity checks to prevent the client from making serious mistakes + if (parsedProp.name === 'curve-style' && ele.isEdge() && ( + // loops must be bundled beziers + parsedProp.value !== 'bezier' && ele.isLoop() || + // edges connected to compound nodes can not be haystacks + parsedProp.value === 'haystack' && (ele.source().isParent() || ele.target().isParent()))) { + prop = parsedProp = this.parse(parsedProp.name, 'bezier', propIsBypass); + } + if (prop["delete"]) { + // delete the property and use the default value on falsey value + style[prop.name] = undefined; + checkTriggers(); + return true; + } + if (prop.deleteBypassed) { + // delete the property that the + if (!origProp) { + checkTriggers(); + return true; // can't delete if no prop + } else if (origProp.bypass) { + // delete bypassed + origProp.bypassed = undefined; + checkTriggers(); + return true; + } else { + return false; // we're unsuccessful deleting the bypassed + } + } + + // check if we need to delete the current bypass + if (prop.deleteBypass) { + // then this property is just here to indicate we need to delete + if (!origProp) { + checkTriggers(); + return true; // property is already not defined + } else if (origProp.bypass) { + // then replace the bypass property with the original + // because the bypassed property was already applied (and therefore parsed), we can just replace it (no reapplying necessary) + style[prop.name] = origProp.bypassed; + checkTriggers(); + return true; + } else { + return false; // we're unsuccessful deleting the bypass + } + } + + var printMappingErr = function printMappingErr() { + warn('Do not assign mappings to elements without corresponding data (i.e. ele `' + ele.id() + '` has no mapping for property `' + prop.name + '` with data field `' + prop.field + '`); try a `[' + prop.field + ']` selector to limit scope to elements with `' + prop.field + '` defined'); + }; + + // put the property in the style objects + switch (prop.mapped) { + // flatten the property if mapped + case types.mapData: + { + // flatten the field (e.g. data.foo.bar) + var fields = prop.field.split('.'); + var fieldVal = _p.data; + for (var i = 0; i < fields.length && fieldVal; i++) { + var field = fields[i]; + fieldVal = fieldVal[field]; + } + if (fieldVal == null) { + printMappingErr(); + return false; + } + var percent; + if (!number$1(fieldVal)) { + // then don't apply and fall back on the existing style + warn('Do not use continuous mappers without specifying numeric data (i.e. `' + prop.field + ': ' + fieldVal + '` for `' + ele.id() + '` is non-numeric)'); + return false; + } else { + var fieldWidth = prop.fieldMax - prop.fieldMin; + if (fieldWidth === 0) { + // safety check -- not strictly necessary as no props of zero range should be passed here + percent = 0; + } else { + percent = (fieldVal - prop.fieldMin) / fieldWidth; + } + } + + // make sure to bound percent value + if (percent < 0) { + percent = 0; + } else if (percent > 1) { + percent = 1; + } + if (type.color) { + var r1 = prop.valueMin[0]; + var r2 = prop.valueMax[0]; + var g1 = prop.valueMin[1]; + var g2 = prop.valueMax[1]; + var b1 = prop.valueMin[2]; + var b2 = prop.valueMax[2]; + var a1 = prop.valueMin[3] == null ? 1 : prop.valueMin[3]; + var a2 = prop.valueMax[3] == null ? 1 : prop.valueMax[3]; + var clr = [Math.round(r1 + (r2 - r1) * percent), Math.round(g1 + (g2 - g1) * percent), Math.round(b1 + (b2 - b1) * percent), Math.round(a1 + (a2 - a1) * percent)]; + flatProp = { + // colours are simple, so just create the flat property instead of expensive string parsing + bypass: prop.bypass, + // we're a bypass if the mapping property is a bypass + name: prop.name, + value: clr, + strValue: 'rgb(' + clr[0] + ', ' + clr[1] + ', ' + clr[2] + ')' + }; + } else if (type.number) { + var calcValue = prop.valueMin + (prop.valueMax - prop.valueMin) * percent; + flatProp = this.parse(prop.name, calcValue, prop.bypass, flatPropMapping); + } else { + return false; // can only map to colours and numbers + } + + if (!flatProp) { + // if we can't flatten the property, then don't apply the property and fall back on the existing style + printMappingErr(); + return false; + } + flatProp.mapping = prop; // keep a reference to the mapping + prop = flatProp; // the flattened (mapped) property is the one we want + + break; + } + + // direct mapping + case types.data: + { + // flatten the field (e.g. data.foo.bar) + var _fields = prop.field.split('.'); + var _fieldVal = _p.data; + for (var _i3 = 0; _i3 < _fields.length && _fieldVal; _i3++) { + var _field = _fields[_i3]; + _fieldVal = _fieldVal[_field]; + } + if (_fieldVal != null) { + flatProp = this.parse(prop.name, _fieldVal, prop.bypass, flatPropMapping); + } + if (!flatProp) { + // if we can't flatten the property, then don't apply and fall back on the existing style + printMappingErr(); + return false; + } + flatProp.mapping = prop; // keep a reference to the mapping + prop = flatProp; // the flattened (mapped) property is the one we want + + break; + } + case types.fn: + { + var fn = prop.value; + var fnRetVal = prop.fnValue != null ? prop.fnValue : fn(ele); // check for cached value before calling function + + prop.prevFnValue = fnRetVal; + if (fnRetVal == null) { + warn('Custom function mappers may not return null (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is null)'); + return false; + } + flatProp = this.parse(prop.name, fnRetVal, prop.bypass, flatPropMapping); + if (!flatProp) { + warn('Custom function mappers may not return invalid values for the property type (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is invalid)'); + return false; + } + flatProp.mapping = copy(prop); // keep a reference to the mapping + prop = flatProp; // the flattened (mapped) property is the one we want + + break; + } + case undefined: + break; + // just set the property + + default: + return false; + // not a valid mapping + } + + // if the property is a bypass property, then link the resultant property to the original one + if (propIsBypass) { + if (origPropIsBypass) { + // then this bypass overrides the existing one + prop.bypassed = origProp.bypassed; // steal bypassed prop from old bypass + } else { + // then link the orig prop to the new bypass + prop.bypassed = origProp; + } + style[prop.name] = prop; // and set + } else { + // prop is not bypass + if (origPropIsBypass) { + // then keep the orig prop (since it's a bypass) and link to the new prop + origProp.bypassed = prop; + } else { + // then just replace the old prop with the new one + style[prop.name] = prop; + } + } + checkTriggers(); + return true; + }; + styfn$8.cleanElements = function (eles, keepBypasses) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + this.clearStyleHints(ele); + ele.dirtyCompoundBoundsCache(); + ele.dirtyBoundingBoxCache(); + if (!keepBypasses) { + ele._private.style = {}; + } else { + var style = ele._private.style; + var propNames = Object.keys(style); + for (var j = 0; j < propNames.length; j++) { + var propName = propNames[j]; + var eleProp = style[propName]; + if (eleProp != null) { + if (eleProp.bypass) { + eleProp.bypassed = null; + } else { + style[propName] = null; + } + } + } + } + } + }; + + // updates the visual style for all elements (useful for manual style modification after init) + styfn$8.update = function () { + var cy = this._private.cy; + var eles = cy.mutableElements(); + eles.updateStyle(); + }; + + // diffProps : { name => { prev, next } } + styfn$8.updateTransitions = function (ele, diffProps) { + var self = this; + var _p = ele._private; + var props = ele.pstyle('transition-property').value; + var duration = ele.pstyle('transition-duration').pfValue; + var delay = ele.pstyle('transition-delay').pfValue; + if (props.length > 0 && duration > 0) { + var style = {}; + + // build up the style to animate towards + var anyPrev = false; + for (var i = 0; i < props.length; i++) { + var prop = props[i]; + var styProp = ele.pstyle(prop); + var diffProp = diffProps[prop]; + if (!diffProp) { + continue; + } + var prevProp = diffProp.prev; + var fromProp = prevProp; + var toProp = diffProp.next != null ? diffProp.next : styProp; + var diff = false; + var initVal = void 0; + var initDt = 0.000001; // delta time % value for initVal (allows animating out of init zero opacity) + + if (!fromProp) { + continue; + } + + // consider px values + if (number$1(fromProp.pfValue) && number$1(toProp.pfValue)) { + diff = toProp.pfValue - fromProp.pfValue; // nonzero is truthy + initVal = fromProp.pfValue + initDt * diff; + + // consider numerical values + } else if (number$1(fromProp.value) && number$1(toProp.value)) { + diff = toProp.value - fromProp.value; // nonzero is truthy + initVal = fromProp.value + initDt * diff; + + // consider colour values + } else if (array(fromProp.value) && array(toProp.value)) { + diff = fromProp.value[0] !== toProp.value[0] || fromProp.value[1] !== toProp.value[1] || fromProp.value[2] !== toProp.value[2]; + initVal = fromProp.strValue; + } + + // the previous value is good for an animation only if it's different + if (diff) { + style[prop] = toProp.strValue; // to val + this.applyBypass(ele, prop, initVal); // from val + anyPrev = true; + } + } // end if props allow ani + + // can't transition if there's nothing previous to transition from + if (!anyPrev) { + return; + } + _p.transitioning = true; + new Promise$1(function (resolve) { + if (delay > 0) { + ele.delayAnimation(delay).play().promise().then(resolve); + } else { + resolve(); + } + }).then(function () { + return ele.animation({ + style: style, + duration: duration, + easing: ele.pstyle('transition-timing-function').value, + queue: false + }).play().promise(); + }).then(function () { + // if( !isBypass ){ + self.removeBypasses(ele, props); + ele.emitAndNotify('style'); + // } + + _p.transitioning = false; + }); + } else if (_p.transitioning) { + this.removeBypasses(ele, props); + ele.emitAndNotify('style'); + _p.transitioning = false; + } + }; + styfn$8.checkTrigger = function (ele, name, fromValue, toValue, getTrigger, onTrigger) { + var prop = this.properties[name]; + var triggerCheck = getTrigger(prop); + if (triggerCheck != null && triggerCheck(fromValue, toValue)) { + onTrigger(prop); + } + }; + styfn$8.checkZOrderTrigger = function (ele, name, fromValue, toValue) { + var _this = this; + this.checkTrigger(ele, name, fromValue, toValue, function (prop) { + return prop.triggersZOrder; + }, function () { + _this._private.cy.notify('zorder', ele); + }); + }; + styfn$8.checkBoundsTrigger = function (ele, name, fromValue, toValue) { + this.checkTrigger(ele, name, fromValue, toValue, function (prop) { + return prop.triggersBounds; + }, function (prop) { + ele.dirtyCompoundBoundsCache(); + ele.dirtyBoundingBoxCache(); + + // if the prop change makes the bb of pll bezier edges invalid, + // then dirty the pll edge bb cache as well + if ( + // only for beziers -- so performance of other edges isn't affected + prop.triggersBoundsOfParallelBeziers && name === 'curve-style' && (fromValue === 'bezier' || toValue === 'bezier')) { + ele.parallelEdges().forEach(function (pllEdge) { + if (pllEdge.isBundledBezier()) { + pllEdge.dirtyBoundingBoxCache(); + } + }); + } + if (prop.triggersBoundsOfConnectedEdges && name === 'display' && (fromValue === 'none' || toValue === 'none')) { + ele.connectedEdges().forEach(function (edge) { + edge.dirtyBoundingBoxCache(); + }); + } + }); + }; + styfn$8.checkTriggers = function (ele, name, fromValue, toValue) { + ele.dirtyStyleCache(); + this.checkZOrderTrigger(ele, name, fromValue, toValue); + this.checkBoundsTrigger(ele, name, fromValue, toValue); + }; + + var styfn$7 = {}; + + // bypasses are applied to an existing style on an element, and just tacked on temporarily + // returns true iff application was successful for at least 1 specified property + styfn$7.applyBypass = function (eles, name, value, updateTransitions) { + var self = this; + var props = []; + var isBypass = true; + + // put all the properties (can specify one or many) in an array after parsing them + if (name === '*' || name === '**') { + // apply to all property names + + if (value !== undefined) { + for (var i = 0; i < self.properties.length; i++) { + var prop = self.properties[i]; + var _name = prop.name; + var parsedProp = this.parse(_name, value, true); + if (parsedProp) { + props.push(parsedProp); + } + } + } + } else if (string(name)) { + // then parse the single property + var _parsedProp = this.parse(name, value, true); + if (_parsedProp) { + props.push(_parsedProp); + } + } else if (plainObject(name)) { + // then parse each property + var specifiedProps = name; + updateTransitions = value; + var names = Object.keys(specifiedProps); + for (var _i = 0; _i < names.length; _i++) { + var _name2 = names[_i]; + var _value = specifiedProps[_name2]; + if (_value === undefined) { + // try camel case name too + _value = specifiedProps[dash2camel(_name2)]; + } + if (_value !== undefined) { + var _parsedProp2 = this.parse(_name2, _value, true); + if (_parsedProp2) { + props.push(_parsedProp2); + } + } + } + } else { + // can't do anything without well defined properties + return false; + } + + // we've failed if there are no valid properties + if (props.length === 0) { + return false; + } + + // now, apply the bypass properties on the elements + var ret = false; // return true if at least one succesful bypass applied + for (var _i2 = 0; _i2 < eles.length; _i2++) { + // for each ele + var ele = eles[_i2]; + var diffProps = {}; + var diffProp = void 0; + for (var j = 0; j < props.length; j++) { + // for each prop + var _prop = props[j]; + if (updateTransitions) { + var prevProp = ele.pstyle(_prop.name); + diffProp = diffProps[_prop.name] = { + prev: prevProp + }; + } + ret = this.applyParsedProperty(ele, copy(_prop)) || ret; + if (updateTransitions) { + diffProp.next = ele.pstyle(_prop.name); + } + } // for props + + if (ret) { + this.updateStyleHints(ele); + } + if (updateTransitions) { + this.updateTransitions(ele, diffProps, isBypass); + } + } // for eles + + return ret; + }; + + // only useful in specific cases like animation + styfn$7.overrideBypass = function (eles, name, value) { + name = camel2dash(name); + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var prop = ele._private.style[name]; + var type = this.properties[name].type; + var isColor = type.color; + var isMulti = type.mutiple; + var oldValue = !prop ? null : prop.pfValue != null ? prop.pfValue : prop.value; + if (!prop || !prop.bypass) { + // need a bypass if one doesn't exist + this.applyBypass(ele, name, value); + } else { + prop.value = value; + if (prop.pfValue != null) { + prop.pfValue = value; + } + if (isColor) { + prop.strValue = 'rgb(' + value.join(',') + ')'; + } else if (isMulti) { + prop.strValue = value.join(' '); + } else { + prop.strValue = '' + value; + } + this.updateStyleHints(ele); + } + this.checkTriggers(ele, name, oldValue, value); + } + }; + styfn$7.removeAllBypasses = function (eles, updateTransitions) { + return this.removeBypasses(eles, this.propertyNames, updateTransitions); + }; + styfn$7.removeBypasses = function (eles, props, updateTransitions) { + var isBypass = true; + for (var j = 0; j < eles.length; j++) { + var ele = eles[j]; + var diffProps = {}; + for (var i = 0; i < props.length; i++) { + var name = props[i]; + var prop = this.properties[name]; + var prevProp = ele.pstyle(prop.name); + if (!prevProp || !prevProp.bypass) { + // if a bypass doesn't exist for the prop, nothing needs to be removed + continue; + } + var value = ''; // empty => remove bypass + var parsedProp = this.parse(name, value, true); + var diffProp = diffProps[prop.name] = { + prev: prevProp + }; + this.applyParsedProperty(ele, parsedProp); + diffProp.next = ele.pstyle(prop.name); + } // for props + + this.updateStyleHints(ele); + if (updateTransitions) { + this.updateTransitions(ele, diffProps, isBypass); + } + } // for eles + }; + + var styfn$6 = {}; + + // gets what an em size corresponds to in pixels relative to a dom element + styfn$6.getEmSizeInPixels = function () { + var px = this.containerCss('font-size'); + if (px != null) { + return parseFloat(px); + } else { + return 1; // for headless + } + }; + + // gets css property from the core container + styfn$6.containerCss = function (propName) { + var cy = this._private.cy; + var domElement = cy.container(); + var containerWindow = cy.window(); + if (containerWindow && domElement && containerWindow.getComputedStyle) { + return containerWindow.getComputedStyle(domElement).getPropertyValue(propName); + } + }; + + var styfn$5 = {}; + + // gets the rendered style for an element + styfn$5.getRenderedStyle = function (ele, prop) { + if (prop) { + return this.getStylePropertyValue(ele, prop, true); + } else { + return this.getRawStyle(ele, true); + } + }; + + // gets the raw style for an element + styfn$5.getRawStyle = function (ele, isRenderedVal) { + var self = this; + ele = ele[0]; // insure it's an element + + if (ele) { + var rstyle = {}; + for (var i = 0; i < self.properties.length; i++) { + var prop = self.properties[i]; + var val = self.getStylePropertyValue(ele, prop.name, isRenderedVal); + if (val != null) { + rstyle[prop.name] = val; + rstyle[dash2camel(prop.name)] = val; + } + } + return rstyle; + } + }; + styfn$5.getIndexedStyle = function (ele, property, subproperty, index) { + var pstyle = ele.pstyle(property)[subproperty][index]; + return pstyle != null ? pstyle : ele.cy().style().getDefaultProperty(property)[subproperty][0]; + }; + styfn$5.getStylePropertyValue = function (ele, propName, isRenderedVal) { + var self = this; + ele = ele[0]; // insure it's an element + + if (ele) { + var prop = self.properties[propName]; + if (prop.alias) { + prop = prop.pointsTo; + } + var type = prop.type; + var styleProp = ele.pstyle(prop.name); + if (styleProp) { + var value = styleProp.value, + units = styleProp.units, + strValue = styleProp.strValue; + if (isRenderedVal && type.number && value != null && number$1(value)) { + var zoom = ele.cy().zoom(); + var getRenderedValue = function getRenderedValue(val) { + return val * zoom; + }; + var getValueStringWithUnits = function getValueStringWithUnits(val, units) { + return getRenderedValue(val) + units; + }; + var isArrayValue = array(value); + var haveUnits = isArrayValue ? units.every(function (u) { + return u != null; + }) : units != null; + if (haveUnits) { + if (isArrayValue) { + return value.map(function (v, i) { + return getValueStringWithUnits(v, units[i]); + }).join(' '); + } else { + return getValueStringWithUnits(value, units); + } + } else { + if (isArrayValue) { + return value.map(function (v) { + return string(v) ? v : '' + getRenderedValue(v); + }).join(' '); + } else { + return '' + getRenderedValue(value); + } + } + } else if (strValue != null) { + return strValue; + } + } + return null; + } + }; + styfn$5.getAnimationStartStyle = function (ele, aniProps) { + var rstyle = {}; + for (var i = 0; i < aniProps.length; i++) { + var aniProp = aniProps[i]; + var name = aniProp.name; + var styleProp = ele.pstyle(name); + if (styleProp !== undefined) { + // then make a prop of it + if (plainObject(styleProp)) { + styleProp = this.parse(name, styleProp.strValue); + } else { + styleProp = this.parse(name, styleProp); + } + } + if (styleProp) { + rstyle[name] = styleProp; + } + } + return rstyle; + }; + styfn$5.getPropsList = function (propsObj) { + var self = this; + var rstyle = []; + var style = propsObj; + var props = self.properties; + if (style) { + var names = Object.keys(style); + for (var i = 0; i < names.length; i++) { + var name = names[i]; + var val = style[name]; + var prop = props[name] || props[camel2dash(name)]; + var styleProp = this.parse(prop.name, val); + if (styleProp) { + rstyle.push(styleProp); + } + } + } + return rstyle; + }; + styfn$5.getNonDefaultPropertiesHash = function (ele, propNames, seed) { + var hash = seed.slice(); + var name, val, strVal, chVal; + var i, j; + for (i = 0; i < propNames.length; i++) { + name = propNames[i]; + val = ele.pstyle(name, false); + if (val == null) { + continue; + } else if (val.pfValue != null) { + hash[0] = hashInt(chVal, hash[0]); + hash[1] = hashIntAlt(chVal, hash[1]); + } else { + strVal = val.strValue; + for (j = 0; j < strVal.length; j++) { + chVal = strVal.charCodeAt(j); + hash[0] = hashInt(chVal, hash[0]); + hash[1] = hashIntAlt(chVal, hash[1]); + } + } + } + return hash; + }; + styfn$5.getPropertiesHash = styfn$5.getNonDefaultPropertiesHash; + + var styfn$4 = {}; + styfn$4.appendFromJson = function (json) { + var style = this; + for (var i = 0; i < json.length; i++) { + var context = json[i]; + var selector = context.selector; + var props = context.style || context.css; + var names = Object.keys(props); + style.selector(selector); // apply selector + + for (var j = 0; j < names.length; j++) { + var name = names[j]; + var value = props[name]; + style.css(name, value); // apply property + } + } + + return style; + }; + + // accessible cy.style() function + styfn$4.fromJson = function (json) { + var style = this; + style.resetToDefault(); + style.appendFromJson(json); + return style; + }; + + // get json from cy.style() api + styfn$4.json = function () { + var json = []; + for (var i = this.defaultLength; i < this.length; i++) { + var cxt = this[i]; + var selector = cxt.selector; + var props = cxt.properties; + var css = {}; + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + css[prop.name] = prop.strValue; + } + json.push({ + selector: !selector ? 'core' : selector.toString(), + style: css + }); + } + return json; + }; + + var styfn$3 = {}; + styfn$3.appendFromString = function (string) { + var self = this; + var style = this; + var remaining = '' + string; + var selAndBlockStr; + var blockRem; + var propAndValStr; + + // remove comments from the style string + remaining = remaining.replace(/[/][*](\s|.)+?[*][/]/g, ''); + function removeSelAndBlockFromRemaining() { + // remove the parsed selector and block from the remaining text to parse + if (remaining.length > selAndBlockStr.length) { + remaining = remaining.substr(selAndBlockStr.length); + } else { + remaining = ''; + } + } + function removePropAndValFromRem() { + // remove the parsed property and value from the remaining block text to parse + if (blockRem.length > propAndValStr.length) { + blockRem = blockRem.substr(propAndValStr.length); + } else { + blockRem = ''; + } + } + for (;;) { + var nothingLeftToParse = remaining.match(/^\s*$/); + if (nothingLeftToParse) { + break; + } + var selAndBlock = remaining.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); + if (!selAndBlock) { + warn('Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: ' + remaining); + break; + } + selAndBlockStr = selAndBlock[0]; + + // parse the selector + var selectorStr = selAndBlock[1]; + if (selectorStr !== 'core') { + var selector = new Selector(selectorStr); + if (selector.invalid) { + warn('Skipping parsing of block: Invalid selector found in string stylesheet: ' + selectorStr); + + // skip this selector and block + removeSelAndBlockFromRemaining(); + continue; + } + } + + // parse the block of properties and values + var blockStr = selAndBlock[2]; + var invalidBlock = false; + blockRem = blockStr; + var props = []; + for (;;) { + var _nothingLeftToParse = blockRem.match(/^\s*$/); + if (_nothingLeftToParse) { + break; + } + var propAndVal = blockRem.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); + if (!propAndVal) { + warn('Skipping parsing of block: Invalid formatting of style property and value definitions found in:' + blockStr); + invalidBlock = true; + break; + } + propAndValStr = propAndVal[0]; + var propStr = propAndVal[1]; + var valStr = propAndVal[2]; + var prop = self.properties[propStr]; + if (!prop) { + warn('Skipping property: Invalid property name in: ' + propAndValStr); + + // skip this property in the block + removePropAndValFromRem(); + continue; + } + var parsedProp = style.parse(propStr, valStr); + if (!parsedProp) { + warn('Skipping property: Invalid property definition in: ' + propAndValStr); + + // skip this property in the block + removePropAndValFromRem(); + continue; + } + props.push({ + name: propStr, + val: valStr + }); + removePropAndValFromRem(); + } + if (invalidBlock) { + removeSelAndBlockFromRemaining(); + break; + } + + // put the parsed block in the style + style.selector(selectorStr); + for (var i = 0; i < props.length; i++) { + var _prop = props[i]; + style.css(_prop.name, _prop.val); + } + removeSelAndBlockFromRemaining(); + } + return style; + }; + styfn$3.fromString = function (string) { + var style = this; + style.resetToDefault(); + style.appendFromString(string); + return style; + }; + + var styfn$2 = {}; + (function () { + var number$1 = number; + var rgba = rgbaNoBackRefs; + var hsla = hslaNoBackRefs; + var hex3$1 = hex3; + var hex6$1 = hex6; + var data = function data(prefix) { + return '^' + prefix + '\\s*\\(\\s*([\\w\\.]+)\\s*\\)$'; + }; + var mapData = function mapData(prefix) { + var mapArg = number$1 + '|\\w+|' + rgba + '|' + hsla + '|' + hex3$1 + '|' + hex6$1; + return '^' + prefix + '\\s*\\(([\\w\\.]+)\\s*\\,\\s*(' + number$1 + ')\\s*\\,\\s*(' + number$1 + ')\\s*,\\s*(' + mapArg + ')\\s*\\,\\s*(' + mapArg + ')\\)$'; + }; + var urlRegexes = ['^url\\s*\\(\\s*[\'"]?(.+?)[\'"]?\\s*\\)$', '^(none)$', '^(.+)$']; + + // each visual style property has a type and needs to be validated according to it + styfn$2.types = { + time: { + number: true, + min: 0, + units: 's|ms', + implicitUnits: 'ms' + }, + percent: { + number: true, + min: 0, + max: 100, + units: '%', + implicitUnits: '%' + }, + percentages: { + number: true, + min: 0, + max: 100, + units: '%', + implicitUnits: '%', + multiple: true + }, + zeroOneNumber: { + number: true, + min: 0, + max: 1, + unitless: true + }, + zeroOneNumbers: { + number: true, + min: 0, + max: 1, + unitless: true, + multiple: true + }, + nOneOneNumber: { + number: true, + min: -1, + max: 1, + unitless: true + }, + nonNegativeInt: { + number: true, + min: 0, + integer: true, + unitless: true + }, + nonNegativeNumber: { + number: true, + min: 0, + unitless: true + }, + position: { + enums: ['parent', 'origin'] + }, + nodeSize: { + number: true, + min: 0, + enums: ['label'] + }, + number: { + number: true, + unitless: true + }, + numbers: { + number: true, + unitless: true, + multiple: true + }, + positiveNumber: { + number: true, + unitless: true, + min: 0, + strictMin: true + }, + size: { + number: true, + min: 0 + }, + bidirectionalSize: { + number: true + }, + // allows negative + bidirectionalSizeMaybePercent: { + number: true, + allowPercent: true + }, + // allows negative + bidirectionalSizes: { + number: true, + multiple: true + }, + // allows negative + sizeMaybePercent: { + number: true, + min: 0, + allowPercent: true + }, + axisDirection: { + enums: ['horizontal', 'leftward', 'rightward', 'vertical', 'upward', 'downward', 'auto'] + }, + paddingRelativeTo: { + enums: ['width', 'height', 'average', 'min', 'max'] + }, + bgWH: { + number: true, + min: 0, + allowPercent: true, + enums: ['auto'], + multiple: true + }, + bgPos: { + number: true, + allowPercent: true, + multiple: true + }, + bgRelativeTo: { + enums: ['inner', 'include-padding'], + multiple: true + }, + bgRepeat: { + enums: ['repeat', 'repeat-x', 'repeat-y', 'no-repeat'], + multiple: true + }, + bgFit: { + enums: ['none', 'contain', 'cover'], + multiple: true + }, + bgCrossOrigin: { + enums: ['anonymous', 'use-credentials', 'null'], + multiple: true + }, + bgClip: { + enums: ['none', 'node'], + multiple: true + }, + bgContainment: { + enums: ['inside', 'over'], + multiple: true + }, + color: { + color: true + }, + colors: { + color: true, + multiple: true + }, + fill: { + enums: ['solid', 'linear-gradient', 'radial-gradient'] + }, + bool: { + enums: ['yes', 'no'] + }, + bools: { + enums: ['yes', 'no'], + multiple: true + }, + lineStyle: { + enums: ['solid', 'dotted', 'dashed'] + }, + lineCap: { + enums: ['butt', 'round', 'square'] + }, + borderStyle: { + enums: ['solid', 'dotted', 'dashed', 'double'] + }, + curveStyle: { + enums: ['bezier', 'unbundled-bezier', 'haystack', 'segments', 'straight', 'straight-triangle', 'taxi'] + }, + fontFamily: { + regex: '^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$' + }, + fontStyle: { + enums: ['italic', 'normal', 'oblique'] + }, + fontWeight: { + enums: ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '800', '900', 100, 200, 300, 400, 500, 600, 700, 800, 900] + }, + textDecoration: { + enums: ['none', 'underline', 'overline', 'line-through'] + }, + textTransform: { + enums: ['none', 'uppercase', 'lowercase'] + }, + textWrap: { + enums: ['none', 'wrap', 'ellipsis'] + }, + textOverflowWrap: { + enums: ['whitespace', 'anywhere'] + }, + textBackgroundShape: { + enums: ['rectangle', 'roundrectangle', 'round-rectangle'] + }, + nodeShape: { + enums: ['rectangle', 'roundrectangle', 'round-rectangle', 'cutrectangle', 'cut-rectangle', 'bottomroundrectangle', 'bottom-round-rectangle', 'barrel', 'ellipse', 'triangle', 'round-triangle', 'square', 'pentagon', 'round-pentagon', 'hexagon', 'round-hexagon', 'concavehexagon', 'concave-hexagon', 'heptagon', 'round-heptagon', 'octagon', 'round-octagon', 'tag', 'round-tag', 'star', 'diamond', 'round-diamond', 'vee', 'rhomboid', 'right-rhomboid', 'polygon'] + }, + overlayShape: { + enums: ['roundrectangle', 'round-rectangle', 'ellipse'] + }, + compoundIncludeLabels: { + enums: ['include', 'exclude'] + }, + arrowShape: { + enums: ['tee', 'triangle', 'triangle-tee', 'circle-triangle', 'triangle-cross', 'triangle-backcurve', 'vee', 'square', 'circle', 'diamond', 'chevron', 'none'] + }, + arrowFill: { + enums: ['filled', 'hollow'] + }, + arrowWidth: { + number: true, + units: '%|px|em', + implicitUnits: 'px', + enums: ['match-line'] + }, + display: { + enums: ['element', 'none'] + }, + visibility: { + enums: ['hidden', 'visible'] + }, + zCompoundDepth: { + enums: ['bottom', 'orphan', 'auto', 'top'] + }, + zIndexCompare: { + enums: ['auto', 'manual'] + }, + valign: { + enums: ['top', 'center', 'bottom'] + }, + halign: { + enums: ['left', 'center', 'right'] + }, + justification: { + enums: ['left', 'center', 'right', 'auto'] + }, + text: { + string: true + }, + data: { + mapping: true, + regex: data('data') + }, + layoutData: { + mapping: true, + regex: data('layoutData') + }, + scratch: { + mapping: true, + regex: data('scratch') + }, + mapData: { + mapping: true, + regex: mapData('mapData') + }, + mapLayoutData: { + mapping: true, + regex: mapData('mapLayoutData') + }, + mapScratch: { + mapping: true, + regex: mapData('mapScratch') + }, + fn: { + mapping: true, + fn: true + }, + url: { + regexes: urlRegexes, + singleRegexMatchValue: true + }, + urls: { + regexes: urlRegexes, + singleRegexMatchValue: true, + multiple: true + }, + propList: { + propList: true + }, + angle: { + number: true, + units: 'deg|rad', + implicitUnits: 'rad' + }, + textRotation: { + number: true, + units: 'deg|rad', + implicitUnits: 'rad', + enums: ['none', 'autorotate'] + }, + polygonPointList: { + number: true, + multiple: true, + evenMultiple: true, + min: -1, + max: 1, + unitless: true + }, + edgeDistances: { + enums: ['intersection', 'node-position', 'endpoints'] + }, + edgeEndpoint: { + number: true, + multiple: true, + units: '%|px|em|deg|rad', + implicitUnits: 'px', + enums: ['inside-to-node', 'outside-to-node', 'outside-to-node-or-label', 'outside-to-line', 'outside-to-line-or-label'], + singleEnum: true, + validate: function validate(valArr, unitsArr) { + switch (valArr.length) { + case 2: + // can be % or px only + return unitsArr[0] !== 'deg' && unitsArr[0] !== 'rad' && unitsArr[1] !== 'deg' && unitsArr[1] !== 'rad'; + case 1: + // can be enum, deg, or rad only + return string(valArr[0]) || unitsArr[0] === 'deg' || unitsArr[0] === 'rad'; + default: + return false; + } + } + }, + easing: { + regexes: ['^(spring)\\s*\\(\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*\\)$', '^(cubic-bezier)\\s*\\(\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*\\)$'], + enums: ['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'ease-in-sine', 'ease-out-sine', 'ease-in-out-sine', 'ease-in-quad', 'ease-out-quad', 'ease-in-out-quad', 'ease-in-cubic', 'ease-out-cubic', 'ease-in-out-cubic', 'ease-in-quart', 'ease-out-quart', 'ease-in-out-quart', 'ease-in-quint', 'ease-out-quint', 'ease-in-out-quint', 'ease-in-expo', 'ease-out-expo', 'ease-in-out-expo', 'ease-in-circ', 'ease-out-circ', 'ease-in-out-circ'] + }, + gradientDirection: { + enums: ['to-bottom', 'to-top', 'to-left', 'to-right', 'to-bottom-right', 'to-bottom-left', 'to-top-right', 'to-top-left', 'to-right-bottom', 'to-left-bottom', 'to-right-top', 'to-left-top' // different order + ] + }, + + boundsExpansion: { + number: true, + multiple: true, + min: 0, + validate: function validate(valArr) { + var length = valArr.length; + return length === 1 || length === 2 || length === 4; + } + } + }; + var diff = { + zeroNonZero: function zeroNonZero(val1, val2) { + if ((val1 == null || val2 == null) && val1 !== val2) { + return true; // null cases could represent any value + } + if (val1 == 0 && val2 != 0) { + return true; + } else if (val1 != 0 && val2 == 0) { + return true; + } else { + return false; + } + }, + any: function any(val1, val2) { + return val1 != val2; + }, + emptyNonEmpty: function emptyNonEmpty(str1, str2) { + var empty1 = emptyString(str1); + var empty2 = emptyString(str2); + return empty1 && !empty2 || !empty1 && empty2; + } + }; + + // define visual style properties + // + // - n.b. adding a new group of props may require updates to updateStyleHints() + // - adding new props to an existing group gets handled automatically + + var t = styfn$2.types; + var mainLabel = [{ + name: 'label', + type: t.text, + triggersBounds: diff.any, + triggersZOrder: diff.emptyNonEmpty + }, { + name: 'text-rotation', + type: t.textRotation, + triggersBounds: diff.any + }, { + name: 'text-margin-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'text-margin-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }]; + var sourceLabel = [{ + name: 'source-label', + type: t.text, + triggersBounds: diff.any + }, { + name: 'source-text-rotation', + type: t.textRotation, + triggersBounds: diff.any + }, { + name: 'source-text-margin-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'source-text-margin-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'source-text-offset', + type: t.size, + triggersBounds: diff.any + }]; + var targetLabel = [{ + name: 'target-label', + type: t.text, + triggersBounds: diff.any + }, { + name: 'target-text-rotation', + type: t.textRotation, + triggersBounds: diff.any + }, { + name: 'target-text-margin-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'target-text-margin-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'target-text-offset', + type: t.size, + triggersBounds: diff.any + }]; + var labelDimensions = [{ + name: 'font-family', + type: t.fontFamily, + triggersBounds: diff.any + }, { + name: 'font-style', + type: t.fontStyle, + triggersBounds: diff.any + }, { + name: 'font-weight', + type: t.fontWeight, + triggersBounds: diff.any + }, { + name: 'font-size', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-transform', + type: t.textTransform, + triggersBounds: diff.any + }, { + name: 'text-wrap', + type: t.textWrap, + triggersBounds: diff.any + }, { + name: 'text-overflow-wrap', + type: t.textOverflowWrap, + triggersBounds: diff.any + }, { + name: 'text-max-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-outline-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'line-height', + type: t.positiveNumber, + triggersBounds: diff.any + }]; + var commonLabel = [{ + name: 'text-valign', + type: t.valign, + triggersBounds: diff.any + }, { + name: 'text-halign', + type: t.halign, + triggersBounds: diff.any + }, { + name: 'color', + type: t.color + }, { + name: 'text-outline-color', + type: t.color + }, { + name: 'text-outline-opacity', + type: t.zeroOneNumber + }, { + name: 'text-background-color', + type: t.color + }, { + name: 'text-background-opacity', + type: t.zeroOneNumber + }, { + name: 'text-background-padding', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-border-opacity', + type: t.zeroOneNumber + }, { + name: 'text-border-color', + type: t.color + }, { + name: 'text-border-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'text-border-style', + type: t.borderStyle, + triggersBounds: diff.any + }, { + name: 'text-background-shape', + type: t.textBackgroundShape, + triggersBounds: diff.any + }, { + name: 'text-justification', + type: t.justification + }]; + var behavior = [{ + name: 'events', + type: t.bool, + triggersZOrder: diff.any + }, { + name: 'text-events', + type: t.bool, + triggersZOrder: diff.any + }]; + var visibility = [{ + name: 'display', + type: t.display, + triggersZOrder: diff.any, + triggersBounds: diff.any, + triggersBoundsOfConnectedEdges: true + }, { + name: 'visibility', + type: t.visibility, + triggersZOrder: diff.any + }, { + name: 'opacity', + type: t.zeroOneNumber, + triggersZOrder: diff.zeroNonZero + }, { + name: 'text-opacity', + type: t.zeroOneNumber + }, { + name: 'min-zoomed-font-size', + type: t.size + }, { + name: 'z-compound-depth', + type: t.zCompoundDepth, + triggersZOrder: diff.any + }, { + name: 'z-index-compare', + type: t.zIndexCompare, + triggersZOrder: diff.any + }, { + name: 'z-index', + type: t.number, + triggersZOrder: diff.any + }]; + var overlay = [{ + name: 'overlay-padding', + type: t.size, + triggersBounds: diff.any + }, { + name: 'overlay-color', + type: t.color + }, { + name: 'overlay-opacity', + type: t.zeroOneNumber, + triggersBounds: diff.zeroNonZero + }, { + name: 'overlay-shape', + type: t.overlayShape, + triggersBounds: diff.any + }]; + var underlay = [{ + name: 'underlay-padding', + type: t.size, + triggersBounds: diff.any + }, { + name: 'underlay-color', + type: t.color + }, { + name: 'underlay-opacity', + type: t.zeroOneNumber, + triggersBounds: diff.zeroNonZero + }, { + name: 'underlay-shape', + type: t.overlayShape, + triggersBounds: diff.any + }]; + var transition = [{ + name: 'transition-property', + type: t.propList + }, { + name: 'transition-duration', + type: t.time + }, { + name: 'transition-delay', + type: t.time + }, { + name: 'transition-timing-function', + type: t.easing + }]; + var nodeSizeHashOverride = function nodeSizeHashOverride(ele, parsedProp) { + if (parsedProp.value === 'label') { + return -ele.poolIndex(); // no hash key hits is using label size (hitrate for perf probably low anyway) + } else { + return parsedProp.pfValue; + } + }; + var nodeBody = [{ + name: 'height', + type: t.nodeSize, + triggersBounds: diff.any, + hashOverride: nodeSizeHashOverride + }, { + name: 'width', + type: t.nodeSize, + triggersBounds: diff.any, + hashOverride: nodeSizeHashOverride + }, { + name: 'shape', + type: t.nodeShape, + triggersBounds: diff.any + }, { + name: 'shape-polygon-points', + type: t.polygonPointList, + triggersBounds: diff.any + }, { + name: 'background-color', + type: t.color + }, { + name: 'background-fill', + type: t.fill + }, { + name: 'background-opacity', + type: t.zeroOneNumber + }, { + name: 'background-blacken', + type: t.nOneOneNumber + }, { + name: 'background-gradient-stop-colors', + type: t.colors + }, { + name: 'background-gradient-stop-positions', + type: t.percentages + }, { + name: 'background-gradient-direction', + type: t.gradientDirection + }, { + name: 'padding', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'padding-relative-to', + type: t.paddingRelativeTo, + triggersBounds: diff.any + }, { + name: 'bounds-expansion', + type: t.boundsExpansion, + triggersBounds: diff.any + }]; + var nodeBorder = [{ + name: 'border-color', + type: t.color + }, { + name: 'border-opacity', + type: t.zeroOneNumber + }, { + name: 'border-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'border-style', + type: t.borderStyle + }]; + var nodeOutline = [{ + name: 'outline-color', + type: t.color + }, { + name: 'outline-opacity', + type: t.zeroOneNumber + }, { + name: 'outline-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'outline-style', + type: t.borderStyle + }, { + name: 'outline-offset', + type: t.size, + triggersBounds: diff.any + }]; + var backgroundImage = [{ + name: 'background-image', + type: t.urls + }, { + name: 'background-image-crossorigin', + type: t.bgCrossOrigin + }, { + name: 'background-image-opacity', + type: t.zeroOneNumbers + }, { + name: 'background-image-containment', + type: t.bgContainment + }, { + name: 'background-image-smoothing', + type: t.bools + }, { + name: 'background-position-x', + type: t.bgPos + }, { + name: 'background-position-y', + type: t.bgPos + }, { + name: 'background-width-relative-to', + type: t.bgRelativeTo + }, { + name: 'background-height-relative-to', + type: t.bgRelativeTo + }, { + name: 'background-repeat', + type: t.bgRepeat + }, { + name: 'background-fit', + type: t.bgFit + }, { + name: 'background-clip', + type: t.bgClip + }, { + name: 'background-width', + type: t.bgWH + }, { + name: 'background-height', + type: t.bgWH + }, { + name: 'background-offset-x', + type: t.bgPos + }, { + name: 'background-offset-y', + type: t.bgPos + }]; + var compound = [{ + name: 'position', + type: t.position, + triggersBounds: diff.any + }, { + name: 'compound-sizing-wrt-labels', + type: t.compoundIncludeLabels, + triggersBounds: diff.any + }, { + name: 'min-width', + type: t.size, + triggersBounds: diff.any + }, { + name: 'min-width-bias-left', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'min-width-bias-right', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'min-height', + type: t.size, + triggersBounds: diff.any + }, { + name: 'min-height-bias-top', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'min-height-bias-bottom', + type: t.sizeMaybePercent, + triggersBounds: diff.any + }]; + var edgeLine = [{ + name: 'line-style', + type: t.lineStyle + }, { + name: 'line-color', + type: t.color + }, { + name: 'line-fill', + type: t.fill + }, { + name: 'line-cap', + type: t.lineCap + }, { + name: 'line-opacity', + type: t.zeroOneNumber + }, { + name: 'line-dash-pattern', + type: t.numbers + }, { + name: 'line-dash-offset', + type: t.number + }, { + name: 'line-gradient-stop-colors', + type: t.colors + }, { + name: 'line-gradient-stop-positions', + type: t.percentages + }, { + name: 'curve-style', + type: t.curveStyle, + triggersBounds: diff.any, + triggersBoundsOfParallelBeziers: true + }, { + name: 'haystack-radius', + type: t.zeroOneNumber, + triggersBounds: diff.any + }, { + name: 'source-endpoint', + type: t.edgeEndpoint, + triggersBounds: diff.any + }, { + name: 'target-endpoint', + type: t.edgeEndpoint, + triggersBounds: diff.any + }, { + name: 'control-point-step-size', + type: t.size, + triggersBounds: diff.any + }, { + name: 'control-point-distances', + type: t.bidirectionalSizes, + triggersBounds: diff.any + }, { + name: 'control-point-weights', + type: t.numbers, + triggersBounds: diff.any + }, { + name: 'segment-distances', + type: t.bidirectionalSizes, + triggersBounds: diff.any + }, { + name: 'segment-weights', + type: t.numbers, + triggersBounds: diff.any + }, { + name: 'taxi-turn', + type: t.bidirectionalSizeMaybePercent, + triggersBounds: diff.any + }, { + name: 'taxi-turn-min-distance', + type: t.size, + triggersBounds: diff.any + }, { + name: 'taxi-direction', + type: t.axisDirection, + triggersBounds: diff.any + }, { + name: 'edge-distances', + type: t.edgeDistances, + triggersBounds: diff.any + }, { + name: 'arrow-scale', + type: t.positiveNumber, + triggersBounds: diff.any + }, { + name: 'loop-direction', + type: t.angle, + triggersBounds: diff.any + }, { + name: 'loop-sweep', + type: t.angle, + triggersBounds: diff.any + }, { + name: 'source-distance-from-node', + type: t.size, + triggersBounds: diff.any + }, { + name: 'target-distance-from-node', + type: t.size, + triggersBounds: diff.any + }]; + var ghost = [{ + name: 'ghost', + type: t.bool, + triggersBounds: diff.any + }, { + name: 'ghost-offset-x', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'ghost-offset-y', + type: t.bidirectionalSize, + triggersBounds: diff.any + }, { + name: 'ghost-opacity', + type: t.zeroOneNumber + }]; + var core = [{ + name: 'selection-box-color', + type: t.color + }, { + name: 'selection-box-opacity', + type: t.zeroOneNumber + }, { + name: 'selection-box-border-color', + type: t.color + }, { + name: 'selection-box-border-width', + type: t.size + }, { + name: 'active-bg-color', + type: t.color + }, { + name: 'active-bg-opacity', + type: t.zeroOneNumber + }, { + name: 'active-bg-size', + type: t.size + }, { + name: 'outside-texture-bg-color', + type: t.color + }, { + name: 'outside-texture-bg-opacity', + type: t.zeroOneNumber + }]; + + // pie backgrounds for nodes + var pie = []; + styfn$2.pieBackgroundN = 16; // because the pie properties are numbered, give access to a constant N (for renderer use) + pie.push({ + name: 'pie-size', + type: t.sizeMaybePercent + }); + for (var i = 1; i <= styfn$2.pieBackgroundN; i++) { + pie.push({ + name: 'pie-' + i + '-background-color', + type: t.color + }); + pie.push({ + name: 'pie-' + i + '-background-size', + type: t.percent + }); + pie.push({ + name: 'pie-' + i + '-background-opacity', + type: t.zeroOneNumber + }); + } + + // edge arrows + var edgeArrow = []; + var arrowPrefixes = styfn$2.arrowPrefixes = ['source', 'mid-source', 'target', 'mid-target']; + [{ + name: 'arrow-shape', + type: t.arrowShape, + triggersBounds: diff.any + }, { + name: 'arrow-color', + type: t.color + }, { + name: 'arrow-fill', + type: t.arrowFill + }, { + name: 'arrow-width', + type: t.arrowWidth + }].forEach(function (prop) { + arrowPrefixes.forEach(function (prefix) { + var name = prefix + '-' + prop.name; + var type = prop.type, + triggersBounds = prop.triggersBounds; + edgeArrow.push({ + name: name, + type: type, + triggersBounds: triggersBounds + }); + }); + }, {}); + var props = styfn$2.properties = [].concat(behavior, transition, visibility, overlay, underlay, ghost, commonLabel, labelDimensions, mainLabel, sourceLabel, targetLabel, nodeBody, nodeBorder, nodeOutline, backgroundImage, pie, compound, edgeLine, edgeArrow, core); + var propGroups = styfn$2.propertyGroups = { + // common to all eles + behavior: behavior, + transition: transition, + visibility: visibility, + overlay: overlay, + underlay: underlay, + ghost: ghost, + // labels + commonLabel: commonLabel, + labelDimensions: labelDimensions, + mainLabel: mainLabel, + sourceLabel: sourceLabel, + targetLabel: targetLabel, + // node props + nodeBody: nodeBody, + nodeBorder: nodeBorder, + nodeOutline: nodeOutline, + backgroundImage: backgroundImage, + pie: pie, + compound: compound, + // edge props + edgeLine: edgeLine, + edgeArrow: edgeArrow, + core: core + }; + var propGroupNames = styfn$2.propertyGroupNames = {}; + var propGroupKeys = styfn$2.propertyGroupKeys = Object.keys(propGroups); + propGroupKeys.forEach(function (key) { + propGroupNames[key] = propGroups[key].map(function (prop) { + return prop.name; + }); + propGroups[key].forEach(function (prop) { + return prop.groupKey = key; + }); + }); + + // define aliases + var aliases = styfn$2.aliases = [{ + name: 'content', + pointsTo: 'label' + }, { + name: 'control-point-distance', + pointsTo: 'control-point-distances' + }, { + name: 'control-point-weight', + pointsTo: 'control-point-weights' + }, { + name: 'edge-text-rotation', + pointsTo: 'text-rotation' + }, { + name: 'padding-left', + pointsTo: 'padding' + }, { + name: 'padding-right', + pointsTo: 'padding' + }, { + name: 'padding-top', + pointsTo: 'padding' + }, { + name: 'padding-bottom', + pointsTo: 'padding' + }]; + + // list of property names + styfn$2.propertyNames = props.map(function (p) { + return p.name; + }); + + // allow access of properties by name ( e.g. style.properties.height ) + for (var _i = 0; _i < props.length; _i++) { + var prop = props[_i]; + props[prop.name] = prop; // allow lookup by name + } + + // map aliases + for (var _i2 = 0; _i2 < aliases.length; _i2++) { + var alias = aliases[_i2]; + var pointsToProp = props[alias.pointsTo]; + var aliasProp = { + name: alias.name, + alias: true, + pointsTo: pointsToProp + }; + + // add alias prop for parsing + props.push(aliasProp); + props[alias.name] = aliasProp; // allow lookup by name + } + })(); + + styfn$2.getDefaultProperty = function (name) { + return this.getDefaultProperties()[name]; + }; + styfn$2.getDefaultProperties = function () { + var _p = this._private; + if (_p.defaultProperties != null) { + return _p.defaultProperties; + } + var rawProps = extend({ + // core props + 'selection-box-color': '#ddd', + 'selection-box-opacity': 0.65, + 'selection-box-border-color': '#aaa', + 'selection-box-border-width': 1, + 'active-bg-color': 'black', + 'active-bg-opacity': 0.15, + 'active-bg-size': 30, + 'outside-texture-bg-color': '#000', + 'outside-texture-bg-opacity': 0.125, + // common node/edge props + 'events': 'yes', + 'text-events': 'no', + 'text-valign': 'top', + 'text-halign': 'center', + 'text-justification': 'auto', + 'line-height': 1, + 'color': '#000', + 'text-outline-color': '#000', + 'text-outline-width': 0, + 'text-outline-opacity': 1, + 'text-opacity': 1, + 'text-decoration': 'none', + 'text-transform': 'none', + 'text-wrap': 'none', + 'text-overflow-wrap': 'whitespace', + 'text-max-width': 9999, + 'text-background-color': '#000', + 'text-background-opacity': 0, + 'text-background-shape': 'rectangle', + 'text-background-padding': 0, + 'text-border-opacity': 0, + 'text-border-width': 0, + 'text-border-style': 'solid', + 'text-border-color': '#000', + 'font-family': 'Helvetica Neue, Helvetica, sans-serif', + 'font-style': 'normal', + 'font-weight': 'normal', + 'font-size': 16, + 'min-zoomed-font-size': 0, + 'text-rotation': 'none', + 'source-text-rotation': 'none', + 'target-text-rotation': 'none', + 'visibility': 'visible', + 'display': 'element', + 'opacity': 1, + 'z-compound-depth': 'auto', + 'z-index-compare': 'auto', + 'z-index': 0, + 'label': '', + 'text-margin-x': 0, + 'text-margin-y': 0, + 'source-label': '', + 'source-text-offset': 0, + 'source-text-margin-x': 0, + 'source-text-margin-y': 0, + 'target-label': '', + 'target-text-offset': 0, + 'target-text-margin-x': 0, + 'target-text-margin-y': 0, + 'overlay-opacity': 0, + 'overlay-color': '#000', + 'overlay-padding': 10, + 'overlay-shape': 'round-rectangle', + 'underlay-opacity': 0, + 'underlay-color': '#000', + 'underlay-padding': 10, + 'underlay-shape': 'round-rectangle', + 'transition-property': 'none', + 'transition-duration': 0, + 'transition-delay': 0, + 'transition-timing-function': 'linear', + // node props + 'background-blacken': 0, + 'background-color': '#999', + 'background-fill': 'solid', + 'background-opacity': 1, + 'background-image': 'none', + 'background-image-crossorigin': 'anonymous', + 'background-image-opacity': 1, + 'background-image-containment': 'inside', + 'background-image-smoothing': 'yes', + 'background-position-x': '50%', + 'background-position-y': '50%', + 'background-offset-x': 0, + 'background-offset-y': 0, + 'background-width-relative-to': 'include-padding', + 'background-height-relative-to': 'include-padding', + 'background-repeat': 'no-repeat', + 'background-fit': 'none', + 'background-clip': 'node', + 'background-width': 'auto', + 'background-height': 'auto', + 'border-color': '#000', + 'border-opacity': 1, + 'border-width': 0, + 'border-style': 'solid', + 'outline-color': '#999', + 'outline-opacity': 1, + 'outline-width': 0, + 'outline-offset': 0, + 'outline-style': 'solid', + 'height': 30, + 'width': 30, + 'shape': 'ellipse', + 'shape-polygon-points': '-1, -1, 1, -1, 1, 1, -1, 1', + 'bounds-expansion': 0, + // node gradient + 'background-gradient-direction': 'to-bottom', + 'background-gradient-stop-colors': '#999', + 'background-gradient-stop-positions': '0%', + // ghost props + 'ghost': 'no', + 'ghost-offset-y': 0, + 'ghost-offset-x': 0, + 'ghost-opacity': 0, + // compound props + 'padding': 0, + 'padding-relative-to': 'width', + 'position': 'origin', + 'compound-sizing-wrt-labels': 'include', + 'min-width': 0, + 'min-width-bias-left': 0, + 'min-width-bias-right': 0, + 'min-height': 0, + 'min-height-bias-top': 0, + 'min-height-bias-bottom': 0 + }, { + // node pie bg + 'pie-size': '100%' + }, [{ + name: 'pie-{{i}}-background-color', + value: 'black' + }, { + name: 'pie-{{i}}-background-size', + value: '0%' + }, { + name: 'pie-{{i}}-background-opacity', + value: 1 + }].reduce(function (css, prop) { + for (var i = 1; i <= styfn$2.pieBackgroundN; i++) { + var name = prop.name.replace('{{i}}', i); + var val = prop.value; + css[name] = val; + } + return css; + }, {}), { + // edge props + 'line-style': 'solid', + 'line-color': '#999', + 'line-fill': 'solid', + 'line-cap': 'butt', + 'line-opacity': 1, + 'line-gradient-stop-colors': '#999', + 'line-gradient-stop-positions': '0%', + 'control-point-step-size': 40, + 'control-point-weights': 0.5, + 'segment-weights': 0.5, + 'segment-distances': 20, + 'taxi-turn': '50%', + 'taxi-turn-min-distance': 10, + 'taxi-direction': 'auto', + 'edge-distances': 'intersection', + 'curve-style': 'haystack', + 'haystack-radius': 0, + 'arrow-scale': 1, + 'loop-direction': '-45deg', + 'loop-sweep': '-90deg', + 'source-distance-from-node': 0, + 'target-distance-from-node': 0, + 'source-endpoint': 'outside-to-node', + 'target-endpoint': 'outside-to-node', + 'line-dash-pattern': [6, 3], + 'line-dash-offset': 0 + }, [{ + name: 'arrow-shape', + value: 'none' + }, { + name: 'arrow-color', + value: '#999' + }, { + name: 'arrow-fill', + value: 'filled' + }, { + name: 'arrow-width', + value: 1 + }].reduce(function (css, prop) { + styfn$2.arrowPrefixes.forEach(function (prefix) { + var name = prefix + '-' + prop.name; + var val = prop.value; + css[name] = val; + }); + return css; + }, {})); + var parsedProps = {}; + for (var i = 0; i < this.properties.length; i++) { + var prop = this.properties[i]; + if (prop.pointsTo) { + continue; + } + var name = prop.name; + var val = rawProps[name]; + var parsedProp = this.parse(name, val); + parsedProps[name] = parsedProp; + } + _p.defaultProperties = parsedProps; + return _p.defaultProperties; + }; + styfn$2.addDefaultStylesheet = function () { + this.selector(':parent').css({ + 'shape': 'rectangle', + 'padding': 10, + 'background-color': '#eee', + 'border-color': '#ccc', + 'border-width': 1 + }).selector('edge').css({ + 'width': 3 + }).selector(':loop').css({ + 'curve-style': 'bezier' + }).selector('edge:compound').css({ + 'curve-style': 'bezier', + 'source-endpoint': 'outside-to-line', + 'target-endpoint': 'outside-to-line' + }).selector(':selected').css({ + 'background-color': '#0169D9', + 'line-color': '#0169D9', + 'source-arrow-color': '#0169D9', + 'target-arrow-color': '#0169D9', + 'mid-source-arrow-color': '#0169D9', + 'mid-target-arrow-color': '#0169D9' + }).selector(':parent:selected').css({ + 'background-color': '#CCE1F9', + 'border-color': '#aec8e5' + }).selector(':active').css({ + 'overlay-color': 'black', + 'overlay-padding': 10, + 'overlay-opacity': 0.25 + }); + this.defaultLength = this.length; + }; + + var styfn$1 = {}; + + // a caching layer for property parsing + styfn$1.parse = function (name, value, propIsBypass, propIsFlat) { + var self = this; + + // function values can't be cached in all cases, and there isn't much benefit of caching them anyway + if (fn$6(value)) { + return self.parseImplWarn(name, value, propIsBypass, propIsFlat); + } + var flatKey = propIsFlat === 'mapping' || propIsFlat === true || propIsFlat === false || propIsFlat == null ? 'dontcare' : propIsFlat; + var bypassKey = propIsBypass ? 't' : 'f'; + var valueKey = '' + value; + var argHash = hashStrings(name, valueKey, bypassKey, flatKey); + var propCache = self.propCache = self.propCache || []; + var ret; + if (!(ret = propCache[argHash])) { + ret = propCache[argHash] = self.parseImplWarn(name, value, propIsBypass, propIsFlat); + } + + // - bypasses can't be shared b/c the value can be changed by animations or otherwise overridden + // - mappings can't be shared b/c mappings are per-element + if (propIsBypass || propIsFlat === 'mapping') { + // need a copy since props are mutated later in their lifecycles + ret = copy(ret); + if (ret) { + ret.value = copy(ret.value); // because it could be an array, e.g. colour + } + } + + return ret; + }; + styfn$1.parseImplWarn = function (name, value, propIsBypass, propIsFlat) { + var prop = this.parseImpl(name, value, propIsBypass, propIsFlat); + if (!prop && value != null) { + warn("The style property `".concat(name, ": ").concat(value, "` is invalid")); + } + if (prop && (prop.name === 'width' || prop.name === 'height') && value === 'label') { + warn('The style value of `label` is deprecated for `' + prop.name + '`'); + } + return prop; + }; + + // parse a property; return null on invalid; return parsed property otherwise + // fields : + // - name : the name of the property + // - value : the parsed, native-typed value of the property + // - strValue : a string value that represents the property value in valid css + // - bypass : true iff the property is a bypass property + styfn$1.parseImpl = function (name, value, propIsBypass, propIsFlat) { + var self = this; + name = camel2dash(name); // make sure the property name is in dash form (e.g. 'property-name' not 'propertyName') + + var property = self.properties[name]; + var passedValue = value; + var types = self.types; + if (!property) { + return null; + } // return null on property of unknown name + if (value === undefined) { + return null; + } // can't assign undefined + + // the property may be an alias + if (property.alias) { + property = property.pointsTo; + name = property.name; + } + var valueIsString = string(value); + if (valueIsString) { + // trim the value to make parsing easier + value = value.trim(); + } + var type = property.type; + if (!type) { + return null; + } // no type, no luck + + // check if bypass is null or empty string (i.e. indication to delete bypass property) + if (propIsBypass && (value === '' || value === null)) { + return { + name: name, + value: value, + bypass: true, + deleteBypass: true + }; + } + + // check if value is a function used as a mapper + if (fn$6(value)) { + return { + name: name, + value: value, + strValue: 'fn', + mapped: types.fn, + bypass: propIsBypass + }; + } + + // check if value is mapped + var data, mapData; + if (!valueIsString || propIsFlat || value.length < 7 || value[1] !== 'a') ; else if (value.length >= 7 && value[0] === 'd' && (data = new RegExp(types.data.regex).exec(value))) { + if (propIsBypass) { + return false; + } // mappers not allowed in bypass + + var mapped = types.data; + return { + name: name, + value: data, + strValue: '' + value, + mapped: mapped, + field: data[1], + bypass: propIsBypass + }; + } else if (value.length >= 10 && value[0] === 'm' && (mapData = new RegExp(types.mapData.regex).exec(value))) { + if (propIsBypass) { + return false; + } // mappers not allowed in bypass + if (type.multiple) { + return false; + } // impossible to map to num + + var _mapped = types.mapData; + + // we can map only if the type is a colour or a number + if (!(type.color || type.number)) { + return false; + } + var valueMin = this.parse(name, mapData[4]); // parse to validate + if (!valueMin || valueMin.mapped) { + return false; + } // can't be invalid or mapped + + var valueMax = this.parse(name, mapData[5]); // parse to validate + if (!valueMax || valueMax.mapped) { + return false; + } // can't be invalid or mapped + + // check if valueMin and valueMax are the same + if (valueMin.pfValue === valueMax.pfValue || valueMin.strValue === valueMax.strValue) { + warn('`' + name + ': ' + value + '` is not a valid mapper because the output range is zero; converting to `' + name + ': ' + valueMin.strValue + '`'); + return this.parse(name, valueMin.strValue); // can't make much of a mapper without a range + } else if (type.color) { + var c1 = valueMin.value; + var c2 = valueMax.value; + var same = c1[0] === c2[0] // red + && c1[1] === c2[1] // green + && c1[2] === c2[2] // blue + && ( + // optional alpha + c1[3] === c2[3] // same alpha outright + || (c1[3] == null || c1[3] === 1 // full opacity for colour 1? + ) && (c2[3] == null || c2[3] === 1) // full opacity for colour 2? + ); + + if (same) { + return false; + } // can't make a mapper without a range + } + + return { + name: name, + value: mapData, + strValue: '' + value, + mapped: _mapped, + field: mapData[1], + fieldMin: parseFloat(mapData[2]), + // min & max are numeric + fieldMax: parseFloat(mapData[3]), + valueMin: valueMin.value, + valueMax: valueMax.value, + bypass: propIsBypass + }; + } + if (type.multiple && propIsFlat !== 'multiple') { + var vals; + if (valueIsString) { + vals = value.split(/\s+/); + } else if (array(value)) { + vals = value; + } else { + vals = [value]; + } + if (type.evenMultiple && vals.length % 2 !== 0) { + return null; + } + var valArr = []; + var unitsArr = []; + var pfValArr = []; + var strVal = ''; + var hasEnum = false; + for (var i = 0; i < vals.length; i++) { + var p = self.parse(name, vals[i], propIsBypass, 'multiple'); + hasEnum = hasEnum || string(p.value); + valArr.push(p.value); + pfValArr.push(p.pfValue != null ? p.pfValue : p.value); + unitsArr.push(p.units); + strVal += (i > 0 ? ' ' : '') + p.strValue; + } + if (type.validate && !type.validate(valArr, unitsArr)) { + return null; + } + if (type.singleEnum && hasEnum) { + if (valArr.length === 1 && string(valArr[0])) { + return { + name: name, + value: valArr[0], + strValue: valArr[0], + bypass: propIsBypass + }; + } else { + return null; + } + } + return { + name: name, + value: valArr, + pfValue: pfValArr, + strValue: strVal, + bypass: propIsBypass, + units: unitsArr + }; + } + + // several types also allow enums + var checkEnums = function checkEnums() { + for (var _i = 0; _i < type.enums.length; _i++) { + var en = type.enums[_i]; + if (en === value) { + return { + name: name, + value: value, + strValue: '' + value, + bypass: propIsBypass + }; + } + } + return null; + }; + + // check the type and return the appropriate object + if (type.number) { + var units; + var implicitUnits = 'px'; // not set => px + + if (type.units) { + // use specified units if set + units = type.units; + } + if (type.implicitUnits) { + implicitUnits = type.implicitUnits; + } + if (!type.unitless) { + if (valueIsString) { + var unitsRegex = 'px|em' + (type.allowPercent ? '|\\%' : ''); + if (units) { + unitsRegex = units; + } // only allow explicit units if so set + var match = value.match('^(' + number + ')(' + unitsRegex + ')?' + '$'); + if (match) { + value = match[1]; + units = match[2] || implicitUnits; + } + } else if (!units || type.implicitUnits) { + units = implicitUnits; // implicitly px if unspecified + } + } + + value = parseFloat(value); + + // if not a number and enums not allowed, then the value is invalid + if (isNaN(value) && type.enums === undefined) { + return null; + } + + // check if this number type also accepts special keywords in place of numbers + // (i.e. `left`, `auto`, etc) + if (isNaN(value) && type.enums !== undefined) { + value = passedValue; + return checkEnums(); + } + + // check if value must be an integer + if (type.integer && !integer(value)) { + return null; + } + + // check value is within range + if (type.min !== undefined && (value < type.min || type.strictMin && value === type.min) || type.max !== undefined && (value > type.max || type.strictMax && value === type.max)) { + return null; + } + var ret = { + name: name, + value: value, + strValue: '' + value + (units ? units : ''), + units: units, + bypass: propIsBypass + }; + + // normalise value in pixels + if (type.unitless || units !== 'px' && units !== 'em') { + ret.pfValue = value; + } else { + ret.pfValue = units === 'px' || !units ? value : this.getEmSizeInPixels() * value; + } + + // normalise value in ms + if (units === 'ms' || units === 's') { + ret.pfValue = units === 'ms' ? value : 1000 * value; + } + + // normalise value in rad + if (units === 'deg' || units === 'rad') { + ret.pfValue = units === 'rad' ? value : deg2rad(value); + } + + // normalize value in % + if (units === '%') { + ret.pfValue = value / 100; + } + return ret; + } else if (type.propList) { + var props = []; + var propsStr = '' + value; + if (propsStr === 'none') ; else { + // go over each prop + + var propsSplit = propsStr.split(/\s*,\s*|\s+/); + for (var _i2 = 0; _i2 < propsSplit.length; _i2++) { + var propName = propsSplit[_i2].trim(); + if (self.properties[propName]) { + props.push(propName); + } else { + warn('`' + propName + '` is not a valid property name'); + } + } + if (props.length === 0) { + return null; + } + } + return { + name: name, + value: props, + strValue: props.length === 0 ? 'none' : props.join(' '), + bypass: propIsBypass + }; + } else if (type.color) { + var tuple = color2tuple(value); + if (!tuple) { + return null; + } + return { + name: name, + value: tuple, + pfValue: tuple, + strValue: 'rgb(' + tuple[0] + ',' + tuple[1] + ',' + tuple[2] + ')', + // n.b. no spaces b/c of multiple support + bypass: propIsBypass + }; + } else if (type.regex || type.regexes) { + // first check enums + if (type.enums) { + var enumProp = checkEnums(); + if (enumProp) { + return enumProp; + } + } + var regexes = type.regexes ? type.regexes : [type.regex]; + for (var _i3 = 0; _i3 < regexes.length; _i3++) { + var regex = new RegExp(regexes[_i3]); // make a regex from the type string + var m = regex.exec(value); + if (m) { + // regex matches + return { + name: name, + value: type.singleRegexMatchValue ? m[1] : m, + strValue: '' + value, + bypass: propIsBypass + }; + } + } + return null; // didn't match any + } else if (type.string) { + // just return + return { + name: name, + value: '' + value, + strValue: '' + value, + bypass: propIsBypass + }; + } else if (type.enums) { + // check enums last because it's a combo type in others + return checkEnums(); + } else { + return null; // not a type we can handle + } + }; + + var Style = function Style(cy) { + if (!(this instanceof Style)) { + return new Style(cy); + } + if (!core(cy)) { + error('A style must have a core reference'); + return; + } + this._private = { + cy: cy, + coreStyle: {} + }; + this.length = 0; + this.resetToDefault(); + }; + var styfn = Style.prototype; + styfn.instanceString = function () { + return 'style'; + }; + + // remove all contexts + styfn.clear = function () { + var _p = this._private; + var cy = _p.cy; + var eles = cy.elements(); + for (var i = 0; i < this.length; i++) { + this[i] = undefined; + } + this.length = 0; + _p.contextStyles = {}; + _p.propDiffs = {}; + this.cleanElements(eles, true); + eles.forEach(function (ele) { + var ele_p = ele[0]._private; + ele_p.styleDirty = true; + ele_p.appliedInitStyle = false; + }); + return this; // chaining + }; + + styfn.resetToDefault = function () { + this.clear(); + this.addDefaultStylesheet(); + return this; + }; + + // builds a style object for the 'core' selector + styfn.core = function (propName) { + return this._private.coreStyle[propName] || this.getDefaultProperty(propName); + }; + + // create a new context from the specified selector string and switch to that context + styfn.selector = function (selectorStr) { + // 'core' is a special case and does not need a selector + var selector = selectorStr === 'core' ? null : new Selector(selectorStr); + var i = this.length++; // new context means new index + this[i] = { + selector: selector, + properties: [], + mappedProperties: [], + index: i + }; + return this; // chaining + }; + + // add one or many css rules to the current context + styfn.css = function () { + var self = this; + var args = arguments; + if (args.length === 1) { + var map = args[0]; + for (var i = 0; i < self.properties.length; i++) { + var prop = self.properties[i]; + var mapVal = map[prop.name]; + if (mapVal === undefined) { + mapVal = map[dash2camel(prop.name)]; + } + if (mapVal !== undefined) { + this.cssRule(prop.name, mapVal); + } + } + } else if (args.length === 2) { + this.cssRule(args[0], args[1]); + } + + // do nothing if args are invalid + + return this; // chaining + }; + + styfn.style = styfn.css; + + // add a single css rule to the current context + styfn.cssRule = function (name, value) { + // name-value pair + var property = this.parse(name, value); + + // add property to current context if valid + if (property) { + var i = this.length - 1; + this[i].properties.push(property); + this[i].properties[property.name] = property; // allow access by name as well + + if (property.name.match(/pie-(\d+)-background-size/) && property.value) { + this._private.hasPie = true; + } + if (property.mapped) { + this[i].mappedProperties.push(property); + } + + // add to core style if necessary + var currentSelectorIsCore = !this[i].selector; + if (currentSelectorIsCore) { + this._private.coreStyle[property.name] = property; + } + } + return this; // chaining + }; + + styfn.append = function (style) { + if (stylesheet(style)) { + style.appendToStyle(this); + } else if (array(style)) { + this.appendFromJson(style); + } else if (string(style)) { + this.appendFromString(style); + } // you probably wouldn't want to append a Style, since you'd duplicate the default parts + + return this; + }; + + // static function + Style.fromJson = function (cy, json) { + var style = new Style(cy); + style.fromJson(json); + return style; + }; + Style.fromString = function (cy, string) { + return new Style(cy).fromString(string); + }; + [styfn$8, styfn$7, styfn$6, styfn$5, styfn$4, styfn$3, styfn$2, styfn$1].forEach(function (props) { + extend(styfn, props); + }); + Style.types = styfn.types; + Style.properties = styfn.properties; + Style.propertyGroups = styfn.propertyGroups; + Style.propertyGroupNames = styfn.propertyGroupNames; + Style.propertyGroupKeys = styfn.propertyGroupKeys; + + var corefn$2 = { + style: function style(newStyle) { + if (newStyle) { + var s = this.setStyle(newStyle); + s.update(); + } + return this._private.style; + }, + setStyle: function setStyle(style) { + var _p = this._private; + if (stylesheet(style)) { + _p.style = style.generateStyle(this); + } else if (array(style)) { + _p.style = Style.fromJson(this, style); + } else if (string(style)) { + _p.style = Style.fromString(this, style); + } else { + _p.style = Style(this); + } + return _p.style; + }, + // e.g. cy.data() changed => recalc ele mappers + updateStyle: function updateStyle() { + this.mutableElements().updateStyle(); // just send to all eles + } + }; + + var defaultSelectionType = 'single'; + var corefn$1 = { + autolock: function autolock(bool) { + if (bool !== undefined) { + this._private.autolock = bool ? true : false; + } else { + return this._private.autolock; + } + return this; // chaining + }, + + autoungrabify: function autoungrabify(bool) { + if (bool !== undefined) { + this._private.autoungrabify = bool ? true : false; + } else { + return this._private.autoungrabify; + } + return this; // chaining + }, + + autounselectify: function autounselectify(bool) { + if (bool !== undefined) { + this._private.autounselectify = bool ? true : false; + } else { + return this._private.autounselectify; + } + return this; // chaining + }, + + selectionType: function selectionType(selType) { + var _p = this._private; + if (_p.selectionType == null) { + _p.selectionType = defaultSelectionType; + } + if (selType !== undefined) { + if (selType === 'additive' || selType === 'single') { + _p.selectionType = selType; + } + } else { + return _p.selectionType; + } + return this; + }, + panningEnabled: function panningEnabled(bool) { + if (bool !== undefined) { + this._private.panningEnabled = bool ? true : false; + } else { + return this._private.panningEnabled; + } + return this; // chaining + }, + + userPanningEnabled: function userPanningEnabled(bool) { + if (bool !== undefined) { + this._private.userPanningEnabled = bool ? true : false; + } else { + return this._private.userPanningEnabled; + } + return this; // chaining + }, + + zoomingEnabled: function zoomingEnabled(bool) { + if (bool !== undefined) { + this._private.zoomingEnabled = bool ? true : false; + } else { + return this._private.zoomingEnabled; + } + return this; // chaining + }, + + userZoomingEnabled: function userZoomingEnabled(bool) { + if (bool !== undefined) { + this._private.userZoomingEnabled = bool ? true : false; + } else { + return this._private.userZoomingEnabled; + } + return this; // chaining + }, + + boxSelectionEnabled: function boxSelectionEnabled(bool) { + if (bool !== undefined) { + this._private.boxSelectionEnabled = bool ? true : false; + } else { + return this._private.boxSelectionEnabled; + } + return this; // chaining + }, + + pan: function pan() { + var args = arguments; + var pan = this._private.pan; + var dim, val, dims, x, y; + switch (args.length) { + case 0: + // .pan() + return pan; + case 1: + if (string(args[0])) { + // .pan('x') + dim = args[0]; + return pan[dim]; + } else if (plainObject(args[0])) { + // .pan({ x: 0, y: 100 }) + if (!this._private.panningEnabled) { + return this; + } + dims = args[0]; + x = dims.x; + y = dims.y; + if (number$1(x)) { + pan.x = x; + } + if (number$1(y)) { + pan.y = y; + } + this.emit('pan viewport'); + } + break; + case 2: + // .pan('x', 100) + if (!this._private.panningEnabled) { + return this; + } + dim = args[0]; + val = args[1]; + if ((dim === 'x' || dim === 'y') && number$1(val)) { + pan[dim] = val; + } + this.emit('pan viewport'); + break; + // invalid + } + + this.notify('viewport'); + return this; // chaining + }, + + panBy: function panBy(arg0, arg1) { + var args = arguments; + var pan = this._private.pan; + var dim, val, dims, x, y; + if (!this._private.panningEnabled) { + return this; + } + switch (args.length) { + case 1: + if (plainObject(arg0)) { + // .panBy({ x: 0, y: 100 }) + dims = args[0]; + x = dims.x; + y = dims.y; + if (number$1(x)) { + pan.x += x; + } + if (number$1(y)) { + pan.y += y; + } + this.emit('pan viewport'); + } + break; + case 2: + // .panBy('x', 100) + dim = arg0; + val = arg1; + if ((dim === 'x' || dim === 'y') && number$1(val)) { + pan[dim] += val; + } + this.emit('pan viewport'); + break; + // invalid + } + + this.notify('viewport'); + return this; // chaining + }, + + fit: function fit(elements, padding) { + var viewportState = this.getFitViewport(elements, padding); + if (viewportState) { + var _p = this._private; + _p.zoom = viewportState.zoom; + _p.pan = viewportState.pan; + this.emit('pan zoom viewport'); + this.notify('viewport'); + } + return this; // chaining + }, + + getFitViewport: function getFitViewport(elements, padding) { + if (number$1(elements) && padding === undefined) { + // elements is optional + padding = elements; + elements = undefined; + } + if (!this._private.panningEnabled || !this._private.zoomingEnabled) { + return; + } + var bb; + if (string(elements)) { + var sel = elements; + elements = this.$(sel); + } else if (boundingBox(elements)) { + // assume bb + var bbe = elements; + bb = { + x1: bbe.x1, + y1: bbe.y1, + x2: bbe.x2, + y2: bbe.y2 + }; + bb.w = bb.x2 - bb.x1; + bb.h = bb.y2 - bb.y1; + } else if (!elementOrCollection(elements)) { + elements = this.mutableElements(); + } + if (elementOrCollection(elements) && elements.empty()) { + return; + } // can't fit to nothing + + bb = bb || elements.boundingBox(); + var w = this.width(); + var h = this.height(); + var zoom; + padding = number$1(padding) ? padding : 0; + if (!isNaN(w) && !isNaN(h) && w > 0 && h > 0 && !isNaN(bb.w) && !isNaN(bb.h) && bb.w > 0 && bb.h > 0) { + zoom = Math.min((w - 2 * padding) / bb.w, (h - 2 * padding) / bb.h); + + // crop zoom + zoom = zoom > this._private.maxZoom ? this._private.maxZoom : zoom; + zoom = zoom < this._private.minZoom ? this._private.minZoom : zoom; + var pan = { + // now pan to middle + x: (w - zoom * (bb.x1 + bb.x2)) / 2, + y: (h - zoom * (bb.y1 + bb.y2)) / 2 + }; + return { + zoom: zoom, + pan: pan + }; + } + return; + }, + zoomRange: function zoomRange(min, max) { + var _p = this._private; + if (max == null) { + var opts = min; + min = opts.min; + max = opts.max; + } + if (number$1(min) && number$1(max) && min <= max) { + _p.minZoom = min; + _p.maxZoom = max; + } else if (number$1(min) && max === undefined && min <= _p.maxZoom) { + _p.minZoom = min; + } else if (number$1(max) && min === undefined && max >= _p.minZoom) { + _p.maxZoom = max; + } + return this; + }, + minZoom: function minZoom(zoom) { + if (zoom === undefined) { + return this._private.minZoom; + } else { + return this.zoomRange({ + min: zoom + }); + } + }, + maxZoom: function maxZoom(zoom) { + if (zoom === undefined) { + return this._private.maxZoom; + } else { + return this.zoomRange({ + max: zoom + }); + } + }, + getZoomedViewport: function getZoomedViewport(params) { + var _p = this._private; + var currentPan = _p.pan; + var currentZoom = _p.zoom; + var pos; // in rendered px + var zoom; + var bail = false; + if (!_p.zoomingEnabled) { + // zooming disabled + bail = true; + } + if (number$1(params)) { + // then set the zoom + zoom = params; + } else if (plainObject(params)) { + // then zoom about a point + zoom = params.level; + if (params.position != null) { + pos = modelToRenderedPosition(params.position, currentZoom, currentPan); + } else if (params.renderedPosition != null) { + pos = params.renderedPosition; + } + if (pos != null && !_p.panningEnabled) { + // panning disabled + bail = true; + } + } + + // crop zoom + zoom = zoom > _p.maxZoom ? _p.maxZoom : zoom; + zoom = zoom < _p.minZoom ? _p.minZoom : zoom; + + // can't zoom with invalid params + if (bail || !number$1(zoom) || zoom === currentZoom || pos != null && (!number$1(pos.x) || !number$1(pos.y))) { + return null; + } + if (pos != null) { + // set zoom about position + var pan1 = currentPan; + var zoom1 = currentZoom; + var zoom2 = zoom; + var pan2 = { + x: -zoom2 / zoom1 * (pos.x - pan1.x) + pos.x, + y: -zoom2 / zoom1 * (pos.y - pan1.y) + pos.y + }; + return { + zoomed: true, + panned: true, + zoom: zoom2, + pan: pan2 + }; + } else { + // just set the zoom + return { + zoomed: true, + panned: false, + zoom: zoom, + pan: currentPan + }; + } + }, + zoom: function zoom(params) { + if (params === undefined) { + // get + return this._private.zoom; + } else { + // set + var vp = this.getZoomedViewport(params); + var _p = this._private; + if (vp == null || !vp.zoomed) { + return this; + } + _p.zoom = vp.zoom; + if (vp.panned) { + _p.pan.x = vp.pan.x; + _p.pan.y = vp.pan.y; + } + this.emit('zoom' + (vp.panned ? ' pan' : '') + ' viewport'); + this.notify('viewport'); + return this; // chaining + } + }, + + viewport: function viewport(opts) { + var _p = this._private; + var zoomDefd = true; + var panDefd = true; + var events = []; // to trigger + var zoomFailed = false; + var panFailed = false; + if (!opts) { + return this; + } + if (!number$1(opts.zoom)) { + zoomDefd = false; + } + if (!plainObject(opts.pan)) { + panDefd = false; + } + if (!zoomDefd && !panDefd) { + return this; + } + if (zoomDefd) { + var z = opts.zoom; + if (z < _p.minZoom || z > _p.maxZoom || !_p.zoomingEnabled) { + zoomFailed = true; + } else { + _p.zoom = z; + events.push('zoom'); + } + } + if (panDefd && (!zoomFailed || !opts.cancelOnFailedZoom) && _p.panningEnabled) { + var p = opts.pan; + if (number$1(p.x)) { + _p.pan.x = p.x; + panFailed = false; + } + if (number$1(p.y)) { + _p.pan.y = p.y; + panFailed = false; + } + if (!panFailed) { + events.push('pan'); + } + } + if (events.length > 0) { + events.push('viewport'); + this.emit(events.join(' ')); + this.notify('viewport'); + } + return this; // chaining + }, + + center: function center(elements) { + var pan = this.getCenterPan(elements); + if (pan) { + this._private.pan = pan; + this.emit('pan viewport'); + this.notify('viewport'); + } + return this; // chaining + }, + + getCenterPan: function getCenterPan(elements, zoom) { + if (!this._private.panningEnabled) { + return; + } + if (string(elements)) { + var selector = elements; + elements = this.mutableElements().filter(selector); + } else if (!elementOrCollection(elements)) { + elements = this.mutableElements(); + } + if (elements.length === 0) { + return; + } // can't centre pan to nothing + + var bb = elements.boundingBox(); + var w = this.width(); + var h = this.height(); + zoom = zoom === undefined ? this._private.zoom : zoom; + var pan = { + // middle + x: (w - zoom * (bb.x1 + bb.x2)) / 2, + y: (h - zoom * (bb.y1 + bb.y2)) / 2 + }; + return pan; + }, + reset: function reset() { + if (!this._private.panningEnabled || !this._private.zoomingEnabled) { + return this; + } + this.viewport({ + pan: { + x: 0, + y: 0 + }, + zoom: 1 + }); + return this; // chaining + }, + + invalidateSize: function invalidateSize() { + this._private.sizeCache = null; + }, + size: function size() { + var _p = this._private; + var container = _p.container; + var cy = this; + return _p.sizeCache = _p.sizeCache || (container ? function () { + var style = cy.window().getComputedStyle(container); + var val = function val(name) { + return parseFloat(style.getPropertyValue(name)); + }; + return { + width: container.clientWidth - val('padding-left') - val('padding-right'), + height: container.clientHeight - val('padding-top') - val('padding-bottom') + }; + }() : { + // fallback if no container (not 0 b/c can be used for dividing etc) + width: 1, + height: 1 + }); + }, + width: function width() { + return this.size().width; + }, + height: function height() { + return this.size().height; + }, + extent: function extent() { + var pan = this._private.pan; + var zoom = this._private.zoom; + var rb = this.renderedExtent(); + var b = { + x1: (rb.x1 - pan.x) / zoom, + x2: (rb.x2 - pan.x) / zoom, + y1: (rb.y1 - pan.y) / zoom, + y2: (rb.y2 - pan.y) / zoom + }; + b.w = b.x2 - b.x1; + b.h = b.y2 - b.y1; + return b; + }, + renderedExtent: function renderedExtent() { + var width = this.width(); + var height = this.height(); + return { + x1: 0, + y1: 0, + x2: width, + y2: height, + w: width, + h: height + }; + }, + multiClickDebounceTime: function multiClickDebounceTime(_int) { + if (_int) this._private.multiClickDebounceTime = _int;else return this._private.multiClickDebounceTime; + return this; // chaining + } + }; + + // aliases + corefn$1.centre = corefn$1.center; + + // backwards compatibility + corefn$1.autolockNodes = corefn$1.autolock; + corefn$1.autoungrabifyNodes = corefn$1.autoungrabify; + + var fn = { + data: define.data({ + field: 'data', + bindingEvent: 'data', + allowBinding: true, + allowSetting: true, + settingEvent: 'data', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + updateStyle: true + }), + removeData: define.removeData({ + field: 'data', + event: 'data', + triggerFnName: 'trigger', + triggerEvent: true, + updateStyle: true + }), + scratch: define.data({ + field: 'scratch', + bindingEvent: 'scratch', + allowBinding: true, + allowSetting: true, + settingEvent: 'scratch', + settingTriggersEvent: true, + triggerFnName: 'trigger', + allowGetting: true, + updateStyle: true + }), + removeScratch: define.removeData({ + field: 'scratch', + event: 'scratch', + triggerFnName: 'trigger', + triggerEvent: true, + updateStyle: true + }) + }; + + // aliases + fn.attr = fn.data; + fn.removeAttr = fn.removeData; + + var Core = function Core(opts) { + var cy = this; + opts = extend({}, opts); + var container = opts.container; + + // allow for passing a wrapped jquery object + // e.g. cytoscape({ container: $('#cy') }) + if (container && !htmlElement(container) && htmlElement(container[0])) { + container = container[0]; + } + var reg = container ? container._cyreg : null; // e.g. already registered some info (e.g. readies) via jquery + reg = reg || {}; + if (reg && reg.cy) { + reg.cy.destroy(); + reg = {}; // old instance => replace reg completely + } + + var readies = reg.readies = reg.readies || []; + if (container) { + container._cyreg = reg; + } // make sure container assoc'd reg points to this cy + reg.cy = cy; + var head = _window !== undefined && container !== undefined && !opts.headless; + var options = opts; + options.layout = extend({ + name: head ? 'grid' : 'null' + }, options.layout); + options.renderer = extend({ + name: head ? 'canvas' : 'null' + }, options.renderer); + var defVal = function defVal(def, val, altVal) { + if (val !== undefined) { + return val; + } else if (altVal !== undefined) { + return altVal; + } else { + return def; + } + }; + var _p = this._private = { + container: container, + // html dom ele container + ready: false, + // whether ready has been triggered + options: options, + // cached options + elements: new Collection(this), + // elements in the graph + listeners: [], + // list of listeners + aniEles: new Collection(this), + // elements being animated + data: options.data || {}, + // data for the core + scratch: {}, + // scratch object for core + layout: null, + renderer: null, + destroyed: false, + // whether destroy was called + notificationsEnabled: true, + // whether notifications are sent to the renderer + minZoom: 1e-50, + maxZoom: 1e50, + zoomingEnabled: defVal(true, options.zoomingEnabled), + userZoomingEnabled: defVal(true, options.userZoomingEnabled), + panningEnabled: defVal(true, options.panningEnabled), + userPanningEnabled: defVal(true, options.userPanningEnabled), + boxSelectionEnabled: defVal(true, options.boxSelectionEnabled), + autolock: defVal(false, options.autolock, options.autolockNodes), + autoungrabify: defVal(false, options.autoungrabify, options.autoungrabifyNodes), + autounselectify: defVal(false, options.autounselectify), + styleEnabled: options.styleEnabled === undefined ? head : options.styleEnabled, + zoom: number$1(options.zoom) ? options.zoom : 1, + pan: { + x: plainObject(options.pan) && number$1(options.pan.x) ? options.pan.x : 0, + y: plainObject(options.pan) && number$1(options.pan.y) ? options.pan.y : 0 + }, + animation: { + // object for currently-running animations + current: [], + queue: [] + }, + hasCompoundNodes: false, + multiClickDebounceTime: defVal(250, options.multiClickDebounceTime) + }; + this.createEmitter(); + + // set selection type + this.selectionType(options.selectionType); + + // init zoom bounds + this.zoomRange({ + min: options.minZoom, + max: options.maxZoom + }); + var loadExtData = function loadExtData(extData, next) { + var anyIsPromise = extData.some(promise); + if (anyIsPromise) { + return Promise$1.all(extData).then(next); // load all data asynchronously, then exec rest of init + } else { + next(extData); // exec synchronously for convenience + } + }; + + // start with the default stylesheet so we have something before loading an external stylesheet + if (_p.styleEnabled) { + cy.setStyle([]); + } + + // create the renderer + var rendererOptions = extend({}, options, options.renderer); // allow rendering hints in top level options + cy.initRenderer(rendererOptions); + var setElesAndLayout = function setElesAndLayout(elements, onload, ondone) { + cy.notifications(false); + + // remove old elements + var oldEles = cy.mutableElements(); + if (oldEles.length > 0) { + oldEles.remove(); + } + if (elements != null) { + if (plainObject(elements) || array(elements)) { + cy.add(elements); + } + } + cy.one('layoutready', function (e) { + cy.notifications(true); + cy.emit(e); // we missed this event by turning notifications off, so pass it on + + cy.one('load', onload); + cy.emitAndNotify('load'); + }).one('layoutstop', function () { + cy.one('done', ondone); + cy.emit('done'); + }); + var layoutOpts = extend({}, cy._private.options.layout); + layoutOpts.eles = cy.elements(); + cy.layout(layoutOpts).run(); + }; + loadExtData([options.style, options.elements], function (thens) { + var initStyle = thens[0]; + var initEles = thens[1]; + + // init style + if (_p.styleEnabled) { + cy.style().append(initStyle); + } + + // initial load + setElesAndLayout(initEles, function () { + // onready + cy.startAnimationLoop(); + _p.ready = true; + + // if a ready callback is specified as an option, the bind it + if (fn$6(options.ready)) { + cy.on('ready', options.ready); + } + + // bind all the ready handlers registered before creating this instance + for (var i = 0; i < readies.length; i++) { + var fn = readies[i]; + cy.on('ready', fn); + } + if (reg) { + reg.readies = []; + } // clear b/c we've bound them all and don't want to keep it around in case a new core uses the same div etc + + cy.emit('ready'); + }, options.done); + }); + }; + var corefn = Core.prototype; // short alias + + extend(corefn, { + instanceString: function instanceString() { + return 'core'; + }, + isReady: function isReady() { + return this._private.ready; + }, + destroyed: function destroyed() { + return this._private.destroyed; + }, + ready: function ready(fn) { + if (this.isReady()) { + this.emitter().emit('ready', [], fn); // just calls fn as though triggered via ready event + } else { + this.on('ready', fn); + } + return this; + }, + destroy: function destroy() { + var cy = this; + if (cy.destroyed()) return; + cy.stopAnimationLoop(); + cy.destroyRenderer(); + this.emit('destroy'); + cy._private.destroyed = true; + return cy; + }, + hasElementWithId: function hasElementWithId(id) { + return this._private.elements.hasElementWithId(id); + }, + getElementById: function getElementById(id) { + return this._private.elements.getElementById(id); + }, + hasCompoundNodes: function hasCompoundNodes() { + return this._private.hasCompoundNodes; + }, + headless: function headless() { + return this._private.renderer.isHeadless(); + }, + styleEnabled: function styleEnabled() { + return this._private.styleEnabled; + }, + addToPool: function addToPool(eles) { + this._private.elements.merge(eles); + return this; // chaining + }, + + removeFromPool: function removeFromPool(eles) { + this._private.elements.unmerge(eles); + return this; + }, + container: function container() { + return this._private.container || null; + }, + window: function window() { + var container = this._private.container; + if (container == null) return _window; + var ownerDocument = this._private.container.ownerDocument; + if (ownerDocument === undefined || ownerDocument == null) { + return _window; + } + return ownerDocument.defaultView || _window; + }, + mount: function mount(container) { + if (container == null) { + return; + } + var cy = this; + var _p = cy._private; + var options = _p.options; + if (!htmlElement(container) && htmlElement(container[0])) { + container = container[0]; + } + cy.stopAnimationLoop(); + cy.destroyRenderer(); + _p.container = container; + _p.styleEnabled = true; + cy.invalidateSize(); + cy.initRenderer(extend({}, options, options.renderer, { + // allow custom renderer name to be re-used, otherwise use canvas + name: options.renderer.name === 'null' ? 'canvas' : options.renderer.name + })); + cy.startAnimationLoop(); + cy.style(options.style); + cy.emit('mount'); + return cy; + }, + unmount: function unmount() { + var cy = this; + cy.stopAnimationLoop(); + cy.destroyRenderer(); + cy.initRenderer({ + name: 'null' + }); + cy.emit('unmount'); + return cy; + }, + options: function options() { + return copy(this._private.options); + }, + json: function json(obj) { + var cy = this; + var _p = cy._private; + var eles = cy.mutableElements(); + var getFreshRef = function getFreshRef(ele) { + return cy.getElementById(ele.id()); + }; + if (plainObject(obj)) { + // set + + cy.startBatch(); + if (obj.elements) { + var idInJson = {}; + var updateEles = function updateEles(jsons, gr) { + var toAdd = []; + var toMod = []; + for (var i = 0; i < jsons.length; i++) { + var json = jsons[i]; + if (!json.data.id) { + warn('cy.json() cannot handle elements without an ID attribute'); + continue; + } + var id = '' + json.data.id; // id must be string + var ele = cy.getElementById(id); + idInJson[id] = true; + if (ele.length !== 0) { + // existing element should be updated + toMod.push({ + ele: ele, + json: json + }); + } else { + // otherwise should be added + if (gr) { + json.group = gr; + toAdd.push(json); + } else { + toAdd.push(json); + } + } + } + cy.add(toAdd); + for (var _i = 0; _i < toMod.length; _i++) { + var _toMod$_i = toMod[_i], + _ele = _toMod$_i.ele, + _json = _toMod$_i.json; + _ele.json(_json); + } + }; + if (array(obj.elements)) { + // elements: [] + updateEles(obj.elements); + } else { + // elements: { nodes: [], edges: [] } + var grs = ['nodes', 'edges']; + for (var i = 0; i < grs.length; i++) { + var gr = grs[i]; + var elements = obj.elements[gr]; + if (array(elements)) { + updateEles(elements, gr); + } + } + } + var parentsToRemove = cy.collection(); + eles.filter(function (ele) { + return !idInJson[ele.id()]; + }).forEach(function (ele) { + if (ele.isParent()) { + parentsToRemove.merge(ele); + } else { + ele.remove(); + } + }); + + // so that children are not removed w/parent + parentsToRemove.forEach(function (ele) { + return ele.children().move({ + parent: null + }); + }); + + // intermediate parents may be moved by prior line, so make sure we remove by fresh refs + parentsToRemove.forEach(function (ele) { + return getFreshRef(ele).remove(); + }); + } + if (obj.style) { + cy.style(obj.style); + } + if (obj.zoom != null && obj.zoom !== _p.zoom) { + cy.zoom(obj.zoom); + } + if (obj.pan) { + if (obj.pan.x !== _p.pan.x || obj.pan.y !== _p.pan.y) { + cy.pan(obj.pan); + } + } + if (obj.data) { + cy.data(obj.data); + } + var fields = ['minZoom', 'maxZoom', 'zoomingEnabled', 'userZoomingEnabled', 'panningEnabled', 'userPanningEnabled', 'boxSelectionEnabled', 'autolock', 'autoungrabify', 'autounselectify', 'multiClickDebounceTime']; + for (var _i2 = 0; _i2 < fields.length; _i2++) { + var f = fields[_i2]; + if (obj[f] != null) { + cy[f](obj[f]); + } + } + cy.endBatch(); + return this; // chaining + } else { + // get + var flat = !!obj; + var json = {}; + if (flat) { + json.elements = this.elements().map(function (ele) { + return ele.json(); + }); + } else { + json.elements = {}; + eles.forEach(function (ele) { + var group = ele.group(); + if (!json.elements[group]) { + json.elements[group] = []; + } + json.elements[group].push(ele.json()); + }); + } + if (this._private.styleEnabled) { + json.style = cy.style().json(); + } + json.data = copy(cy.data()); + var options = _p.options; + json.zoomingEnabled = _p.zoomingEnabled; + json.userZoomingEnabled = _p.userZoomingEnabled; + json.zoom = _p.zoom; + json.minZoom = _p.minZoom; + json.maxZoom = _p.maxZoom; + json.panningEnabled = _p.panningEnabled; + json.userPanningEnabled = _p.userPanningEnabled; + json.pan = copy(_p.pan); + json.boxSelectionEnabled = _p.boxSelectionEnabled; + json.renderer = copy(options.renderer); + json.hideEdgesOnViewport = options.hideEdgesOnViewport; + json.textureOnViewport = options.textureOnViewport; + json.wheelSensitivity = options.wheelSensitivity; + json.motionBlur = options.motionBlur; + json.multiClickDebounceTime = options.multiClickDebounceTime; + return json; + } + } + }); + corefn.$id = corefn.getElementById; + [corefn$9, corefn$8, elesfn, corefn$7, corefn$6, corefn$5, corefn$4, corefn$3, corefn$2, corefn$1, fn].forEach(function (props) { + extend(corefn, props); + }); + + /* eslint-disable no-unused-vars */ + var defaults$7 = { + fit: true, + // whether to fit the viewport to the graph + directed: false, + // whether the tree is directed downwards (or edges can point in any direction if false) + padding: 30, + // padding on fit + circle: false, + // put depths in concentric circles if true, put depths top down if false + grid: false, + // whether to create an even grid into which the DAG is placed (circle:false only) + spacingFactor: 1.75, + // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap) + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + roots: undefined, + // the roots of the trees + depthSort: undefined, + // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled, + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + }; + + var deprecatedOptionDefaults = { + maximal: false, + // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only); setting acyclic to true sets maximal to true also + acyclic: false // whether the tree is acyclic and thus a node could be shifted (due to the maximal option) multiple times without causing an infinite loop; setting to true sets maximal to true also; if you are uncertain whether a tree is acyclic, set to false to avoid potential infinite loops + }; + + /* eslint-enable */ + + var getInfo = function getInfo(ele) { + return ele.scratch('breadthfirst'); + }; + var setInfo = function setInfo(ele, obj) { + return ele.scratch('breadthfirst', obj); + }; + function BreadthFirstLayout(options) { + this.options = extend({}, defaults$7, deprecatedOptionDefaults, options); + } + BreadthFirstLayout.prototype.run = function () { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var nodes = eles.nodes().filter(function (n) { + return !n.isParent(); + }); + var graph = eles; + var directed = options.directed; + var maximal = options.acyclic || options.maximal || options.maximalAdjustments > 0; // maximalAdjustments for compat. w/ old code; also, setting acyclic to true sets maximal to true + + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var roots; + if (elementOrCollection(options.roots)) { + roots = options.roots; + } else if (array(options.roots)) { + var rootsArray = []; + for (var i = 0; i < options.roots.length; i++) { + var id = options.roots[i]; + var ele = cy.getElementById(id); + rootsArray.push(ele); + } + roots = cy.collection(rootsArray); + } else if (string(options.roots)) { + roots = cy.$(options.roots); + } else { + if (directed) { + roots = nodes.roots(); + } else { + var components = eles.components(); + roots = cy.collection(); + var _loop = function _loop(_i) { + var comp = components[_i]; + var maxDegree = comp.maxDegree(false); + var compRoots = comp.filter(function (ele) { + return ele.degree(false) === maxDegree; + }); + roots = roots.add(compRoots); + }; + for (var _i = 0; _i < components.length; _i++) { + _loop(_i); + } + } + } + var depths = []; + var foundByBfs = {}; + var addToDepth = function addToDepth(ele, d) { + if (depths[d] == null) { + depths[d] = []; + } + var i = depths[d].length; + depths[d].push(ele); + setInfo(ele, { + index: i, + depth: d + }); + }; + var changeDepth = function changeDepth(ele, newDepth) { + var _getInfo = getInfo(ele), + depth = _getInfo.depth, + index = _getInfo.index; + depths[depth][index] = null; + addToDepth(ele, newDepth); + }; + + // find the depths of the nodes + graph.bfs({ + roots: roots, + directed: options.directed, + visit: function visit(node, edge, pNode, i, depth) { + var ele = node[0]; + var id = ele.id(); + addToDepth(ele, depth); + foundByBfs[id] = true; + } + }); + + // check for nodes not found by bfs + var orphanNodes = []; + for (var _i2 = 0; _i2 < nodes.length; _i2++) { + var _ele = nodes[_i2]; + if (foundByBfs[_ele.id()]) { + continue; + } else { + orphanNodes.push(_ele); + } + } + + // assign the nodes a depth and index + + var assignDepthsAt = function assignDepthsAt(i) { + var eles = depths[i]; + for (var j = 0; j < eles.length; j++) { + var _ele2 = eles[j]; + if (_ele2 == null) { + eles.splice(j, 1); + j--; + continue; + } + setInfo(_ele2, { + depth: i, + index: j + }); + } + }; + var assignDepths = function assignDepths() { + for (var _i3 = 0; _i3 < depths.length; _i3++) { + assignDepthsAt(_i3); + } + }; + var adjustMaximally = function adjustMaximally(ele, shifted) { + var eInfo = getInfo(ele); + var incomers = ele.incomers().filter(function (el) { + return el.isNode() && eles.has(el); + }); + var maxDepth = -1; + var id = ele.id(); + for (var k = 0; k < incomers.length; k++) { + var incmr = incomers[k]; + var iInfo = getInfo(incmr); + maxDepth = Math.max(maxDepth, iInfo.depth); + } + if (eInfo.depth <= maxDepth) { + if (!options.acyclic && shifted[id]) { + return null; + } + var newDepth = maxDepth + 1; + changeDepth(ele, newDepth); + shifted[id] = newDepth; + return true; + } + return false; + }; + + // for the directed case, try to make the edges all go down (i.e. depth i => depth i + 1) + if (directed && maximal) { + var Q = []; + var shifted = {}; + var enqueue = function enqueue(n) { + return Q.push(n); + }; + var dequeue = function dequeue() { + return Q.shift(); + }; + nodes.forEach(function (n) { + return Q.push(n); + }); + while (Q.length > 0) { + var _ele3 = dequeue(); + var didShift = adjustMaximally(_ele3, shifted); + if (didShift) { + _ele3.outgoers().filter(function (el) { + return el.isNode() && eles.has(el); + }).forEach(enqueue); + } else if (didShift === null) { + warn('Detected double maximal shift for node `' + _ele3.id() + '`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.'); + break; // exit on failure + } + } + } + + assignDepths(); // clear holes + + // find min distance we need to leave between nodes + var minDistance = 0; + if (options.avoidOverlap) { + for (var _i4 = 0; _i4 < nodes.length; _i4++) { + var n = nodes[_i4]; + var nbb = n.layoutDimensions(options); + var w = nbb.w; + var h = nbb.h; + minDistance = Math.max(minDistance, w, h); + } + } + + // get the weighted percent for an element based on its connectivity to other levels + var cachedWeightedPercent = {}; + var getWeightedPercent = function getWeightedPercent(ele) { + if (cachedWeightedPercent[ele.id()]) { + return cachedWeightedPercent[ele.id()]; + } + var eleDepth = getInfo(ele).depth; + var neighbors = ele.neighborhood(); + var percent = 0; + var samples = 0; + for (var _i5 = 0; _i5 < neighbors.length; _i5++) { + var neighbor = neighbors[_i5]; + if (neighbor.isEdge() || neighbor.isParent() || !nodes.has(neighbor)) { + continue; + } + var bf = getInfo(neighbor); + if (bf == null) { + continue; + } + var index = bf.index; + var depth = bf.depth; + + // unassigned neighbours shouldn't affect the ordering + if (index == null || depth == null) { + continue; + } + var nDepth = depths[depth].length; + if (depth < eleDepth) { + // only get influenced by elements above + percent += index / nDepth; + samples++; + } + } + samples = Math.max(1, samples); + percent = percent / samples; + if (samples === 0) { + // put lone nodes at the start + percent = 0; + } + cachedWeightedPercent[ele.id()] = percent; + return percent; + }; + + // rearrange the indices in each depth level based on connectivity + + var sortFn = function sortFn(a, b) { + var apct = getWeightedPercent(a); + var bpct = getWeightedPercent(b); + var diff = apct - bpct; + if (diff === 0) { + return ascending(a.id(), b.id()); // make sure sort doesn't have don't-care comparisons + } else { + return diff; + } + }; + if (options.depthSort !== undefined) { + sortFn = options.depthSort; + } + + // sort each level to make connected nodes closer + for (var _i6 = 0; _i6 < depths.length; _i6++) { + depths[_i6].sort(sortFn); + assignDepthsAt(_i6); + } + + // assign orphan nodes to a new top-level depth + var orphanDepth = []; + for (var _i7 = 0; _i7 < orphanNodes.length; _i7++) { + orphanDepth.push(orphanNodes[_i7]); + } + depths.unshift(orphanDepth); + assignDepths(); + var biggestDepthSize = 0; + for (var _i8 = 0; _i8 < depths.length; _i8++) { + biggestDepthSize = Math.max(depths[_i8].length, biggestDepthSize); + } + var center = { + x: bb.x1 + bb.w / 2, + y: bb.x1 + bb.h / 2 + }; + var maxDepthSize = depths.reduce(function (max, eles) { + return Math.max(max, eles.length); + }, 0); + var getPosition = function getPosition(ele) { + var _getInfo2 = getInfo(ele), + depth = _getInfo2.depth, + index = _getInfo2.index; + var depthSize = depths[depth].length; + var distanceX = Math.max(bb.w / ((options.grid ? maxDepthSize : depthSize) + 1), minDistance); + var distanceY = Math.max(bb.h / (depths.length + 1), minDistance); + var radiusStepSize = Math.min(bb.w / 2 / depths.length, bb.h / 2 / depths.length); + radiusStepSize = Math.max(radiusStepSize, minDistance); + if (!options.circle) { + var epos = { + x: center.x + (index + 1 - (depthSize + 1) / 2) * distanceX, + y: (depth + 1) * distanceY + }; + return epos; + } else { + var radius = radiusStepSize * depth + radiusStepSize - (depths.length > 0 && depths[0].length <= 3 ? radiusStepSize / 2 : 0); + var theta = 2 * Math.PI / depths[depth].length * index; + if (depth === 0 && depths[0].length === 1) { + radius = 1; + } + return { + x: center.x + radius * Math.cos(theta), + y: center.y + radius * Math.sin(theta) + }; + } + }; + eles.nodes().layoutPositions(this, options, getPosition); + return this; // chaining + }; + + var defaults$6 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox and radius if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: undefined, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + radius: undefined, + // the radius of the circle + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: undefined, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: true, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + sort: undefined, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + }; + + function CircleLayout(options) { + this.options = extend({}, defaults$6, options); + } + CircleLayout.prototype.run = function () { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise; + var nodes = eles.nodes().not(':parent'); + if (options.sort) { + nodes = nodes.sort(options.sort); + } + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var center = { + x: bb.x1 + bb.w / 2, + y: bb.y1 + bb.h / 2 + }; + var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / nodes.length : options.sweep; + var dTheta = sweep / Math.max(1, nodes.length - 1); + var r; + var minDistance = 0; + for (var i = 0; i < nodes.length; i++) { + var n = nodes[i]; + var nbb = n.layoutDimensions(options); + var w = nbb.w; + var h = nbb.h; + minDistance = Math.max(minDistance, w, h); + } + if (number$1(options.radius)) { + r = options.radius; + } else if (nodes.length <= 1) { + r = 0; + } else { + r = Math.min(bb.h, bb.w) / 2 - minDistance; + } + + // calculate the radius + if (nodes.length > 1 && options.avoidOverlap) { + // but only if more than one node (can't overlap) + minDistance *= 1.75; // just to have some nice spacing + + var dcos = Math.cos(dTheta) - Math.cos(0); + var dsin = Math.sin(dTheta) - Math.sin(0); + var rMin = Math.sqrt(minDistance * minDistance / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping + r = Math.max(rMin, r); + } + var getPos = function getPos(ele, i) { + var theta = options.startAngle + i * dTheta * (clockwise ? 1 : -1); + var rx = r * Math.cos(theta); + var ry = r * Math.sin(theta); + var pos = { + x: center.x + rx, + y: center.y + ry + }; + return pos; + }; + eles.nodes().layoutPositions(this, options, getPos); + return this; // chaining + }; + + var defaults$5 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // the padding on fit + startAngle: 3 / 2 * Math.PI, + // where nodes start in radians + sweep: undefined, + // how many radians should be between the first and last node (defaults to full circle) + clockwise: true, + // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) + equidistant: false, + // whether levels have an equal radial distance betwen them, may cause bounding box overflow + minNodeSpacing: 10, + // min spacing between outside of nodes (used for radius adjustment) + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + height: undefined, + // height of layout area (overrides container height) + width: undefined, + // width of layout area (overrides container width) + spacingFactor: undefined, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + concentric: function concentric(node) { + // returns numeric value for each node, placing higher nodes in levels towards the centre + return node.degree(); + }, + levelWidth: function levelWidth(nodes) { + // the variation of concentric values in each level + return nodes.maxDegree() / 4; + }, + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + }; + + function ConcentricLayout(options) { + this.options = extend({}, defaults$5, options); + } + ConcentricLayout.prototype.run = function () { + var params = this.options; + var options = params; + var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise; + var cy = params.cy; + var eles = options.eles; + var nodes = eles.nodes().not(':parent'); + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var center = { + x: bb.x1 + bb.w / 2, + y: bb.y1 + bb.h / 2 + }; + var nodeValues = []; // { node, value } + var maxNodeSize = 0; + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var value = void 0; + + // calculate the node value + value = options.concentric(node); + nodeValues.push({ + value: value, + node: node + }); + + // for style mapping + node._private.scratch.concentric = value; + } + + // in case we used the `concentric` in style + nodes.updateStyle(); + + // calculate max size now based on potentially updated mappers + for (var _i = 0; _i < nodes.length; _i++) { + var _node = nodes[_i]; + var nbb = _node.layoutDimensions(options); + maxNodeSize = Math.max(maxNodeSize, nbb.w, nbb.h); + } + + // sort node values in descreasing order + nodeValues.sort(function (a, b) { + return b.value - a.value; + }); + var levelWidth = options.levelWidth(nodes); + + // put the values into levels + var levels = [[]]; + var currentLevel = levels[0]; + for (var _i2 = 0; _i2 < nodeValues.length; _i2++) { + var val = nodeValues[_i2]; + if (currentLevel.length > 0) { + var diff = Math.abs(currentLevel[0].value - val.value); + if (diff >= levelWidth) { + currentLevel = []; + levels.push(currentLevel); + } + } + currentLevel.push(val); + } + + // create positions from levels + + var minDist = maxNodeSize + options.minNodeSpacing; // min dist between nodes + + if (!options.avoidOverlap) { + // then strictly constrain to bb + var firstLvlHasMulti = levels.length > 0 && levels[0].length > 1; + var maxR = Math.min(bb.w, bb.h) / 2 - minDist; + var rStep = maxR / (levels.length + firstLvlHasMulti ? 1 : 0); + minDist = Math.min(minDist, rStep); + } + + // find the metrics for each level + var r = 0; + for (var _i3 = 0; _i3 < levels.length; _i3++) { + var level = levels[_i3]; + var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / level.length : options.sweep; + var dTheta = level.dTheta = sweep / Math.max(1, level.length - 1); + + // calculate the radius + if (level.length > 1 && options.avoidOverlap) { + // but only if more than one node (can't overlap) + var dcos = Math.cos(dTheta) - Math.cos(0); + var dsin = Math.sin(dTheta) - Math.sin(0); + var rMin = Math.sqrt(minDist * minDist / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping + + r = Math.max(rMin, r); + } + level.r = r; + r += minDist; + } + if (options.equidistant) { + var rDeltaMax = 0; + var _r = 0; + for (var _i4 = 0; _i4 < levels.length; _i4++) { + var _level = levels[_i4]; + var rDelta = _level.r - _r; + rDeltaMax = Math.max(rDeltaMax, rDelta); + } + _r = 0; + for (var _i5 = 0; _i5 < levels.length; _i5++) { + var _level2 = levels[_i5]; + if (_i5 === 0) { + _r = _level2.r; + } + _level2.r = _r; + _r += rDeltaMax; + } + } + + // calculate the node positions + var pos = {}; // id => position + for (var _i6 = 0; _i6 < levels.length; _i6++) { + var _level3 = levels[_i6]; + var _dTheta = _level3.dTheta; + var _r2 = _level3.r; + for (var j = 0; j < _level3.length; j++) { + var _val = _level3[j]; + var theta = options.startAngle + (clockwise ? 1 : -1) * _dTheta * j; + var p = { + x: center.x + _r2 * Math.cos(theta), + y: center.y + _r2 * Math.sin(theta) + }; + pos[_val.node.id()] = p; + } + } + + // position the nodes + eles.nodes().layoutPositions(this, options, function (ele) { + var id = ele.id(); + return pos[id]; + }); + return this; // chaining + }; + + /* + The CoSE layout was written by Gerardo Huck. + https://www.linkedin.com/in/gerardohuck/ + + Based on the following article: + http://dl.acm.org/citation.cfm?id=1498047 + + Modifications tracked on Github. + */ + var DEBUG; + + /** + * @brief : default layout options + */ + var defaults$4 = { + // Called on `layoutready` + ready: function ready() {}, + // Called on `layoutstop` + stop: function stop() {}, + // Whether to animate while running the layout + // true : Animate continuously as the layout is running + // false : Just show the end result + // 'end' : Animate with the end result, from the initial positions to the end positions + animate: true, + // Easing of the animation for animate:'end' + animationEasing: undefined, + // The duration of the animation for animate:'end' + animationDuration: undefined, + // A function that determines whether the node should be animated + // All nodes animated by default on animate enabled + // Non-animated nodes are positioned immediately when the layout starts + animateFilter: function animateFilter(node, i) { + return true; + }, + // The layout animates only after this many milliseconds for animate:true + // (prevents flashing on fast runs) + animationThreshold: 250, + // Number of iterations between consecutive screen positions update + refresh: 20, + // Whether to fit the network view after when done + fit: true, + // Padding on fit + padding: 30, + // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + boundingBox: undefined, + // Excludes the label when calculating node bounding boxes for the layout algorithm + nodeDimensionsIncludeLabels: false, + // Randomize the initial positions of the nodes (true) or use existing positions (false) + randomize: false, + // Extra spacing between components in non-compound graphs + componentSpacing: 40, + // Node repulsion (non overlapping) multiplier + nodeRepulsion: function nodeRepulsion(node) { + return 2048; + }, + // Node repulsion (overlapping) multiplier + nodeOverlap: 4, + // Ideal edge (non nested) length + idealEdgeLength: function idealEdgeLength(edge) { + return 32; + }, + // Divisor to compute edge forces + edgeElasticity: function edgeElasticity(edge) { + return 32; + }, + // Nesting factor (multiplier) to compute ideal edge length for nested edges + nestingFactor: 1.2, + // Gravity force (constant) + gravity: 1, + // Maximum number of iterations to perform + numIter: 1000, + // Initial temperature (maximum node displacement) + initialTemp: 1000, + // Cooling factor (how the temperature is reduced between consecutive iterations + coolingFactor: 0.99, + // Lower temperature threshold (below this point the layout will end) + minTemp: 1.0 + }; + + /** + * @brief : constructor + * @arg options : object containing layout options + */ + function CoseLayout(options) { + this.options = extend({}, defaults$4, options); + this.options.layout = this; + + // Exclude any edge that has a source or target node that is not in the set of passed-in nodes + var nodes = this.options.eles.nodes(); + var edges = this.options.eles.edges(); + var notEdges = edges.filter(function (e) { + var sourceId = e.source().data('id'); + var targetId = e.target().data('id'); + var hasSource = nodes.some(function (n) { + return n.data('id') === sourceId; + }); + var hasTarget = nodes.some(function (n) { + return n.data('id') === targetId; + }); + return !hasSource || !hasTarget; + }); + this.options.eles = this.options.eles.not(notEdges); + } + + /** + * @brief : runs the layout + */ + CoseLayout.prototype.run = function () { + var options = this.options; + var cy = options.cy; + var layout = this; + layout.stopped = false; + if (options.animate === true || options.animate === false) { + layout.emit({ + type: 'layoutstart', + layout: layout + }); + } + + // Set DEBUG - Global variable + if (true === options.debug) { + DEBUG = true; + } else { + DEBUG = false; + } + + // Initialize layout info + var layoutInfo = createLayoutInfo(cy, layout, options); + + // Show LayoutInfo contents if debugging + if (DEBUG) { + printLayoutInfo(layoutInfo); + } + + // If required, randomize node positions + if (options.randomize) { + randomizePositions(layoutInfo); + } + var startTime = performanceNow(); + var refresh = function refresh() { + refreshPositions(layoutInfo, cy, options); + + // Fit the graph if necessary + if (true === options.fit) { + cy.fit(options.padding); + } + }; + var mainLoop = function mainLoop(i) { + if (layout.stopped || i >= options.numIter) { + // logDebug("Layout manually stopped. Stopping computation in step " + i); + return false; + } + + // Do one step in the phisical simulation + step(layoutInfo, options); + + // Update temperature + layoutInfo.temperature = layoutInfo.temperature * options.coolingFactor; + // logDebug("New temperature: " + layoutInfo.temperature); + + if (layoutInfo.temperature < options.minTemp) { + // logDebug("Temperature drop below minimum threshold. Stopping computation in step " + i); + return false; + } + return true; + }; + var done = function done() { + if (options.animate === true || options.animate === false) { + refresh(); + + // Layout has finished + layout.one('layoutstop', options.stop); + layout.emit({ + type: 'layoutstop', + layout: layout + }); + } else { + var nodes = options.eles.nodes(); + var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes); + nodes.layoutPositions(layout, options, getScaledPos); + } + }; + var i = 0; + var loopRet = true; + if (options.animate === true) { + var frame = function frame() { + var f = 0; + while (loopRet && f < options.refresh) { + loopRet = mainLoop(i); + i++; + f++; + } + if (!loopRet) { + // it's done + separateComponents(layoutInfo, options); + done(); + } else { + var now = performanceNow(); + if (now - startTime >= options.animationThreshold) { + refresh(); + } + requestAnimationFrame(frame); + } + }; + frame(); + } else { + while (loopRet) { + loopRet = mainLoop(i); + i++; + } + separateComponents(layoutInfo, options); + done(); + } + return this; // chaining + }; + + /** + * @brief : called on continuous layouts to stop them before they finish + */ + CoseLayout.prototype.stop = function () { + this.stopped = true; + if (this.thread) { + this.thread.stop(); + } + this.emit('layoutstop'); + return this; // chaining + }; + + CoseLayout.prototype.destroy = function () { + if (this.thread) { + this.thread.stop(); + } + return this; // chaining + }; + + /** + * @brief : Creates an object which is contains all the data + * used in the layout process + * @arg cy : cytoscape.js object + * @return : layoutInfo object initialized + */ + var createLayoutInfo = function createLayoutInfo(cy, layout, options) { + // Shortcut + var edges = options.eles.edges(); + var nodes = options.eles.nodes(); + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var layoutInfo = { + isCompound: cy.hasCompoundNodes(), + layoutNodes: [], + idToIndex: {}, + nodeSize: nodes.size(), + graphSet: [], + indexToGraph: [], + layoutEdges: [], + edgeSize: edges.size(), + temperature: options.initialTemp, + clientWidth: bb.w, + clientHeight: bb.h, + boundingBox: bb + }; + var components = options.eles.components(); + var id2cmptId = {}; + for (var i = 0; i < components.length; i++) { + var component = components[i]; + for (var j = 0; j < component.length; j++) { + var node = component[j]; + id2cmptId[node.id()] = i; + } + } + + // Iterate over all nodes, creating layout nodes + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = nodes[i]; + var nbb = n.layoutDimensions(options); + var tempNode = {}; + tempNode.isLocked = n.locked(); + tempNode.id = n.data('id'); + tempNode.parentId = n.data('parent'); + tempNode.cmptId = id2cmptId[n.id()]; + tempNode.children = []; + tempNode.positionX = n.position('x'); + tempNode.positionY = n.position('y'); + tempNode.offsetX = 0; + tempNode.offsetY = 0; + tempNode.height = nbb.w; + tempNode.width = nbb.h; + tempNode.maxX = tempNode.positionX + tempNode.width / 2; + tempNode.minX = tempNode.positionX - tempNode.width / 2; + tempNode.maxY = tempNode.positionY + tempNode.height / 2; + tempNode.minY = tempNode.positionY - tempNode.height / 2; + tempNode.padLeft = parseFloat(n.style('padding')); + tempNode.padRight = parseFloat(n.style('padding')); + tempNode.padTop = parseFloat(n.style('padding')); + tempNode.padBottom = parseFloat(n.style('padding')); + + // forces + tempNode.nodeRepulsion = fn$6(options.nodeRepulsion) ? options.nodeRepulsion(n) : options.nodeRepulsion; + + // Add new node + layoutInfo.layoutNodes.push(tempNode); + // Add entry to id-index map + layoutInfo.idToIndex[tempNode.id] = i; + } + + // Inline implementation of a queue, used for traversing the graph in BFS order + var queue = []; + var start = 0; // Points to the start the queue + var end = -1; // Points to the end of the queue + + var tempGraph = []; + + // Second pass to add child information and + // initialize queue for hierarchical traversal + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + var p_id = n.parentId; + // Check if node n has a parent node + if (null != p_id) { + // Add node Id to parent's list of children + layoutInfo.layoutNodes[layoutInfo.idToIndex[p_id]].children.push(n.id); + } else { + // If a node doesn't have a parent, then it's in the root graph + queue[++end] = n.id; + tempGraph.push(n.id); + } + } + + // Add root graph to graphSet + layoutInfo.graphSet.push(tempGraph); + + // Traverse the graph, level by level, + while (start <= end) { + // Get the node to visit and remove it from queue + var node_id = queue[start++]; + var node_ix = layoutInfo.idToIndex[node_id]; + var node = layoutInfo.layoutNodes[node_ix]; + var children = node.children; + if (children.length > 0) { + // Add children nodes as a new graph to graph set + layoutInfo.graphSet.push(children); + // Add children to que queue to be visited + for (var i = 0; i < children.length; i++) { + queue[++end] = children[i]; + } + } + } + + // Create indexToGraph map + for (var i = 0; i < layoutInfo.graphSet.length; i++) { + var graph = layoutInfo.graphSet[i]; + for (var j = 0; j < graph.length; j++) { + var index = layoutInfo.idToIndex[graph[j]]; + layoutInfo.indexToGraph[index] = i; + } + } + + // Iterate over all edges, creating Layout Edges + for (var i = 0; i < layoutInfo.edgeSize; i++) { + var e = edges[i]; + var tempEdge = {}; + tempEdge.id = e.data('id'); + tempEdge.sourceId = e.data('source'); + tempEdge.targetId = e.data('target'); + + // Compute ideal length + var idealLength = fn$6(options.idealEdgeLength) ? options.idealEdgeLength(e) : options.idealEdgeLength; + var elasticity = fn$6(options.edgeElasticity) ? options.edgeElasticity(e) : options.edgeElasticity; + + // Check if it's an inter graph edge + var sourceIx = layoutInfo.idToIndex[tempEdge.sourceId]; + var targetIx = layoutInfo.idToIndex[tempEdge.targetId]; + var sourceGraph = layoutInfo.indexToGraph[sourceIx]; + var targetGraph = layoutInfo.indexToGraph[targetIx]; + if (sourceGraph != targetGraph) { + // Find lowest common graph ancestor + var lca = findLCA(tempEdge.sourceId, tempEdge.targetId, layoutInfo); + + // Compute sum of node depths, relative to lca graph + var lcaGraph = layoutInfo.graphSet[lca]; + var depth = 0; + + // Source depth + var tempNode = layoutInfo.layoutNodes[sourceIx]; + while (-1 === lcaGraph.indexOf(tempNode.id)) { + tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; + depth++; + } + + // Target depth + tempNode = layoutInfo.layoutNodes[targetIx]; + while (-1 === lcaGraph.indexOf(tempNode.id)) { + tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; + depth++; + } + + // logDebug('LCA of nodes ' + tempEdge.sourceId + ' and ' + tempEdge.targetId + + // ". Index: " + lca + " Contents: " + lcaGraph.toString() + + // ". Depth: " + depth); + + // Update idealLength + idealLength *= depth * options.nestingFactor; + } + tempEdge.idealLength = idealLength; + tempEdge.elasticity = elasticity; + layoutInfo.layoutEdges.push(tempEdge); + } + + // Finally, return layoutInfo object + return layoutInfo; + }; + + /** + * @brief : This function finds the index of the lowest common + * graph ancestor between 2 nodes in the subtree + * (from the graph hierarchy induced tree) whose + * root is graphIx + * + * @arg node1: node1's ID + * @arg node2: node2's ID + * @arg layoutInfo: layoutInfo object + * + */ + var findLCA = function findLCA(node1, node2, layoutInfo) { + // Find their common ancester, starting from the root graph + var res = findLCA_aux(node1, node2, 0, layoutInfo); + if (2 > res.count) { + // If aux function couldn't find the common ancester, + // then it is the root graph + return 0; + } else { + return res.graph; + } + }; + + /** + * @brief : Auxiliary function used for LCA computation + * + * @arg node1 : node1's ID + * @arg node2 : node2's ID + * @arg graphIx : subgraph index + * @arg layoutInfo : layoutInfo object + * + * @return : object of the form {count: X, graph: Y}, where: + * X is the number of ancestors (max: 2) found in + * graphIx (and it's subgraphs), + * Y is the graph index of the lowest graph containing + * all X nodes + */ + var findLCA_aux = function findLCA_aux(node1, node2, graphIx, layoutInfo) { + var graph = layoutInfo.graphSet[graphIx]; + // If both nodes belongs to graphIx + if (-1 < graph.indexOf(node1) && -1 < graph.indexOf(node2)) { + return { + count: 2, + graph: graphIx + }; + } + + // Make recursive calls for all subgraphs + var c = 0; + for (var i = 0; i < graph.length; i++) { + var nodeId = graph[i]; + var nodeIx = layoutInfo.idToIndex[nodeId]; + var children = layoutInfo.layoutNodes[nodeIx].children; + + // If the node has no child, skip it + if (0 === children.length) { + continue; + } + var childGraphIx = layoutInfo.indexToGraph[layoutInfo.idToIndex[children[0]]]; + var result = findLCA_aux(node1, node2, childGraphIx, layoutInfo); + if (0 === result.count) { + // Neither node1 nor node2 are present in this subgraph + continue; + } else if (1 === result.count) { + // One of (node1, node2) is present in this subgraph + c++; + if (2 === c) { + // We've already found both nodes, no need to keep searching + break; + } + } else { + // Both nodes are present in this subgraph + return result; + } + } + return { + count: c, + graph: graphIx + }; + }; + + /** + * @brief: printsLayoutInfo into js console + * Only used for debbuging + */ +var printLayoutInfo; + + /** + * @brief : Randomizes the position of all nodes + */ + var randomizePositions = function randomizePositions(layoutInfo, cy) { + var width = layoutInfo.clientWidth; + var height = layoutInfo.clientHeight; + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + + // No need to randomize compound nodes or locked nodes + if (0 === n.children.length && !n.isLocked) { + n.positionX = Math.random() * width; + n.positionY = Math.random() * height; + } + } + }; + var getScaleInBoundsFn = function getScaleInBoundsFn(layoutInfo, options, nodes) { + var bb = layoutInfo.boundingBox; + var coseBB = { + x1: Infinity, + x2: -Infinity, + y1: Infinity, + y2: -Infinity + }; + if (options.boundingBox) { + nodes.forEach(function (node) { + var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[node.data('id')]]; + coseBB.x1 = Math.min(coseBB.x1, lnode.positionX); + coseBB.x2 = Math.max(coseBB.x2, lnode.positionX); + coseBB.y1 = Math.min(coseBB.y1, lnode.positionY); + coseBB.y2 = Math.max(coseBB.y2, lnode.positionY); + }); + coseBB.w = coseBB.x2 - coseBB.x1; + coseBB.h = coseBB.y2 - coseBB.y1; + } + return function (ele, i) { + var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[ele.data('id')]]; + if (options.boundingBox) { + // then add extra bounding box constraint + var pctX = (lnode.positionX - coseBB.x1) / coseBB.w; + var pctY = (lnode.positionY - coseBB.y1) / coseBB.h; + return { + x: bb.x1 + pctX * bb.w, + y: bb.y1 + pctY * bb.h + }; + } else { + return { + x: lnode.positionX, + y: lnode.positionY + }; + } + }; + }; + + /** + * @brief : Updates the positions of nodes in the network + * @arg layoutInfo : LayoutInfo object + * @arg cy : Cytoscape object + * @arg options : Layout options + */ + var refreshPositions = function refreshPositions(layoutInfo, cy, options) { + // var s = 'Refreshing positions'; + // logDebug(s); + + var layout = options.layout; + var nodes = options.eles.nodes(); + var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes); + nodes.positions(getScaledPos); + + // Trigger layoutReady only on first call + if (true !== layoutInfo.ready) { + // s = 'Triggering layoutready'; + // logDebug(s); + layoutInfo.ready = true; + layout.one('layoutready', options.ready); + layout.emit({ + type: 'layoutready', + layout: this + }); + } + }; + + /** + * @brief : Logs a debug message in JS console, if DEBUG is ON + */ + // var logDebug = function(text) { + // if (DEBUG) { + // console.debug(text); + // } + // }; + + /** + * @brief : Performs one iteration of the physical simulation + * @arg layoutInfo : LayoutInfo object already initialized + * @arg cy : Cytoscape object + * @arg options : Layout options + */ + var step = function step(layoutInfo, options, _step) { + // var s = "\n\n###############################"; + // s += "\nSTEP: " + step; + // s += "\n###############################\n"; + // logDebug(s); + + // Calculate node repulsions + calculateNodeForces(layoutInfo, options); + // Calculate edge forces + calculateEdgeForces(layoutInfo); + // Calculate gravity forces + calculateGravityForces(layoutInfo, options); + // Propagate forces from parent to child + propagateForces(layoutInfo); + // Update positions based on calculated forces + updatePositions(layoutInfo); + }; + + /** + * @brief : Computes the node repulsion forces + */ + var calculateNodeForces = function calculateNodeForces(layoutInfo, options) { + // Go through each of the graphs in graphSet + // Nodes only repel each other if they belong to the same graph + // var s = 'calculateNodeForces'; + // logDebug(s); + for (var i = 0; i < layoutInfo.graphSet.length; i++) { + var graph = layoutInfo.graphSet[i]; + var numNodes = graph.length; + + // s = "Set: " + graph.toString(); + // logDebug(s); + + // Now get all the pairs of nodes + // Only get each pair once, (A, B) = (B, A) + for (var j = 0; j < numNodes; j++) { + var node1 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; + for (var k = j + 1; k < numNodes; k++) { + var node2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[k]]]; + nodeRepulsion(node1, node2, layoutInfo, options); + } + } + } + }; + var randomDistance = function randomDistance(max) { + return -max + 2 * max * Math.random(); + }; + + /** + * @brief : Compute the node repulsion forces between a pair of nodes + */ + var nodeRepulsion = function nodeRepulsion(node1, node2, layoutInfo, options) { + // var s = "Node repulsion. Node1: " + node1.id + " Node2: " + node2.id; + + var cmptId1 = node1.cmptId; + var cmptId2 = node2.cmptId; + if (cmptId1 !== cmptId2 && !layoutInfo.isCompound) { + return; + } + + // Get direction of line connecting both node centers + var directionX = node2.positionX - node1.positionX; + var directionY = node2.positionY - node1.positionY; + var maxRandDist = 1; + // s += "\ndirectionX: " + directionX + ", directionY: " + directionY; + + // If both centers are the same, apply a random force + if (0 === directionX && 0 === directionY) { + directionX = randomDistance(maxRandDist); + directionY = randomDistance(maxRandDist); + } + var overlap = nodesOverlap(node1, node2, directionX, directionY); + if (overlap > 0) { + // s += "\nNodes DO overlap."; + // s += "\nOverlap: " + overlap; + // If nodes overlap, repulsion force is proportional + // to the overlap + var force = options.nodeOverlap * overlap; + + // Compute the module and components of the force vector + var distance = Math.sqrt(directionX * directionX + directionY * directionY); + // s += "\nDistance: " + distance; + var forceX = force * directionX / distance; + var forceY = force * directionY / distance; + } else { + // s += "\nNodes do NOT overlap."; + // If there's no overlap, force is inversely proportional + // to squared distance + + // Get clipping points for both nodes + var point1 = findClippingPoint(node1, directionX, directionY); + var point2 = findClippingPoint(node2, -1 * directionX, -1 * directionY); + + // Use clipping points to compute distance + var distanceX = point2.x - point1.x; + var distanceY = point2.y - point1.y; + var distanceSqr = distanceX * distanceX + distanceY * distanceY; + var distance = Math.sqrt(distanceSqr); + // s += "\nDistance: " + distance; + + // Compute the module and components of the force vector + var force = (node1.nodeRepulsion + node2.nodeRepulsion) / distanceSqr; + var forceX = force * distanceX / distance; + var forceY = force * distanceY / distance; + } + + // Apply force + if (!node1.isLocked) { + node1.offsetX -= forceX; + node1.offsetY -= forceY; + } + if (!node2.isLocked) { + node2.offsetX += forceX; + node2.offsetY += forceY; + } + + // s += "\nForceX: " + forceX + " ForceY: " + forceY; + // logDebug(s); + + return; + }; + + /** + * @brief : Determines whether two nodes overlap or not + * @return : Amount of overlapping (0 => no overlap) + */ + var nodesOverlap = function nodesOverlap(node1, node2, dX, dY) { + if (dX > 0) { + var overlapX = node1.maxX - node2.minX; + } else { + var overlapX = node2.maxX - node1.minX; + } + if (dY > 0) { + var overlapY = node1.maxY - node2.minY; + } else { + var overlapY = node2.maxY - node1.minY; + } + if (overlapX >= 0 && overlapY >= 0) { + return Math.sqrt(overlapX * overlapX + overlapY * overlapY); + } else { + return 0; + } + }; + + /** + * @brief : Finds the point in which an edge (direction dX, dY) intersects + * the rectangular bounding box of it's source/target node + */ + var findClippingPoint = function findClippingPoint(node, dX, dY) { + // Shorcuts + var X = node.positionX; + var Y = node.positionY; + var H = node.height || 1; + var W = node.width || 1; + var dirSlope = dY / dX; + var nodeSlope = H / W; + + // var s = 'Computing clipping point of node ' + node.id + + // " . Height: " + H + ", Width: " + W + + // "\nDirection " + dX + ", " + dY; + // + // Compute intersection + var res = {}; + + // Case: Vertical direction (up) + if (0 === dX && 0 < dY) { + res.x = X; + // s += "\nUp direction"; + res.y = Y + H / 2; + return res; + } + + // Case: Vertical direction (down) + if (0 === dX && 0 > dY) { + res.x = X; + res.y = Y + H / 2; + // s += "\nDown direction"; + + return res; + } + + // Case: Intersects the right border + if (0 < dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { + res.x = X + W / 2; + res.y = Y + W * dY / 2 / dX; + // s += "\nRightborder"; + + return res; + } + + // Case: Intersects the left border + if (0 > dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { + res.x = X - W / 2; + res.y = Y - W * dY / 2 / dX; + // s += "\nLeftborder"; + + return res; + } + + // Case: Intersects the top border + if (0 < dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { + res.x = X + H * dX / 2 / dY; + res.y = Y + H / 2; + // s += "\nTop border"; + + return res; + } + + // Case: Intersects the bottom border + if (0 > dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { + res.x = X - H * dX / 2 / dY; + res.y = Y - H / 2; + // s += "\nBottom border"; + + return res; + } + + // s += "\nClipping point found at " + res.x + ", " + res.y; + // logDebug(s); + return res; + }; + + /** + * @brief : Calculates all edge forces + */ + var calculateEdgeForces = function calculateEdgeForces(layoutInfo, options) { + // Iterate over all edges + for (var i = 0; i < layoutInfo.edgeSize; i++) { + // Get edge, source & target nodes + var edge = layoutInfo.layoutEdges[i]; + var sourceIx = layoutInfo.idToIndex[edge.sourceId]; + var source = layoutInfo.layoutNodes[sourceIx]; + var targetIx = layoutInfo.idToIndex[edge.targetId]; + var target = layoutInfo.layoutNodes[targetIx]; + + // Get direction of line connecting both node centers + var directionX = target.positionX - source.positionX; + var directionY = target.positionY - source.positionY; + + // If both centers are the same, do nothing. + // A random force has already been applied as node repulsion + if (0 === directionX && 0 === directionY) { + continue; + } + + // Get clipping points for both nodes + var point1 = findClippingPoint(source, directionX, directionY); + var point2 = findClippingPoint(target, -1 * directionX, -1 * directionY); + var lx = point2.x - point1.x; + var ly = point2.y - point1.y; + var l = Math.sqrt(lx * lx + ly * ly); + var force = Math.pow(edge.idealLength - l, 2) / edge.elasticity; + if (0 !== l) { + var forceX = force * lx / l; + var forceY = force * ly / l; + } else { + var forceX = 0; + var forceY = 0; + } + + // Add this force to target and source nodes + if (!source.isLocked) { + source.offsetX += forceX; + source.offsetY += forceY; + } + if (!target.isLocked) { + target.offsetX -= forceX; + target.offsetY -= forceY; + } + + // var s = 'Edge force between nodes ' + source.id + ' and ' + target.id; + // s += "\nDistance: " + l + " Force: (" + forceX + ", " + forceY + ")"; + // logDebug(s); + } + }; + + /** + * @brief : Computes gravity forces for all nodes + */ + var calculateGravityForces = function calculateGravityForces(layoutInfo, options) { + if (options.gravity === 0) { + return; + } + var distThreshold = 1; + + // var s = 'calculateGravityForces'; + // logDebug(s); + for (var i = 0; i < layoutInfo.graphSet.length; i++) { + var graph = layoutInfo.graphSet[i]; + var numNodes = graph.length; + + // s = "Set: " + graph.toString(); + // logDebug(s); + + // Compute graph center + if (0 === i) { + var centerX = layoutInfo.clientHeight / 2; + var centerY = layoutInfo.clientWidth / 2; + } else { + // Get Parent node for this graph, and use its position as center + var temp = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[0]]]; + var parent = layoutInfo.layoutNodes[layoutInfo.idToIndex[temp.parentId]]; + var centerX = parent.positionX; + var centerY = parent.positionY; + } + // s = "Center found at: " + centerX + ", " + centerY; + // logDebug(s); + + // Apply force to all nodes in graph + for (var j = 0; j < numNodes; j++) { + var node = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; + // s = "Node: " + node.id; + + if (node.isLocked) { + continue; + } + var dx = centerX - node.positionX; + var dy = centerY - node.positionY; + var d = Math.sqrt(dx * dx + dy * dy); + if (d > distThreshold) { + var fx = options.gravity * dx / d; + var fy = options.gravity * dy / d; + node.offsetX += fx; + node.offsetY += fy; + // s += ": Applied force: " + fx + ", " + fy; + } + // logDebug(s); + } + } + }; + + /** + * @brief : This function propagates the existing offsets from + * parent nodes to its descendents. + * @arg layoutInfo : layoutInfo Object + * @arg cy : cytoscape Object + * @arg options : Layout options + */ + var propagateForces = function propagateForces(layoutInfo, options) { + // Inline implementation of a queue, used for traversing the graph in BFS order + var queue = []; + var start = 0; // Points to the start the queue + var end = -1; // Points to the end of the queue + + // logDebug('propagateForces'); + + // Start by visiting the nodes in the root graph + queue.push.apply(queue, layoutInfo.graphSet[0]); + end += layoutInfo.graphSet[0].length; + + // Traverse the graph, level by level, + while (start <= end) { + // Get the node to visit and remove it from queue + var nodeId = queue[start++]; + var nodeIndex = layoutInfo.idToIndex[nodeId]; + var node = layoutInfo.layoutNodes[nodeIndex]; + var children = node.children; + + // We only need to process the node if it's compound + if (0 < children.length && !node.isLocked) { + var offX = node.offsetX; + var offY = node.offsetY; + + // var s = "Propagating offset from parent node : " + node.id + + // ". OffsetX: " + offX + ". OffsetY: " + offY; + // s += "\n Children: " + children.toString(); + // logDebug(s); + + for (var i = 0; i < children.length; i++) { + var childNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[children[i]]]; + // Propagate offset + childNode.offsetX += offX; + childNode.offsetY += offY; + // Add children to queue to be visited + queue[++end] = children[i]; + } + + // Reset parent offsets + node.offsetX = 0; + node.offsetY = 0; + } + } + }; + + /** + * @brief : Updates the layout model positions, based on + * the accumulated forces + */ + var updatePositions = function updatePositions(layoutInfo, options) { + // var s = 'Updating positions'; + // logDebug(s); + + // Reset boundaries for compound nodes + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + if (0 < n.children.length) { + // logDebug("Resetting boundaries of compound node: " + n.id); + n.maxX = undefined; + n.minX = undefined; + n.maxY = undefined; + n.minY = undefined; + } + } + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + if (0 < n.children.length || n.isLocked) { + // No need to set compound or locked node position + // logDebug("Skipping position update of node: " + n.id); + continue; + } + // s = "Node: " + n.id + " Previous position: (" + + // n.positionX + ", " + n.positionY + ")."; + + // Limit displacement in order to improve stability + var tempForce = limitForce(n.offsetX, n.offsetY, layoutInfo.temperature); + n.positionX += tempForce.x; + n.positionY += tempForce.y; + n.offsetX = 0; + n.offsetY = 0; + n.minX = n.positionX - n.width; + n.maxX = n.positionX + n.width; + n.minY = n.positionY - n.height; + n.maxY = n.positionY + n.height; + // s += " New Position: (" + n.positionX + ", " + n.positionY + ")."; + // logDebug(s); + + // Update ancestry boudaries + updateAncestryBoundaries(n, layoutInfo); + } + + // Update size, position of compund nodes + for (var i = 0; i < layoutInfo.nodeSize; i++) { + var n = layoutInfo.layoutNodes[i]; + if (0 < n.children.length && !n.isLocked) { + n.positionX = (n.maxX + n.minX) / 2; + n.positionY = (n.maxY + n.minY) / 2; + n.width = n.maxX - n.minX; + n.height = n.maxY - n.minY; + // s = "Updating position, size of compound node " + n.id; + // s += "\nPositionX: " + n.positionX + ", PositionY: " + n.positionY; + // s += "\nWidth: " + n.width + ", Height: " + n.height; + // logDebug(s); + } + } + }; + + /** + * @brief : Limits a force (forceX, forceY) to be not + * greater (in modulo) than max. + 8 Preserves force direction. + */ + var limitForce = function limitForce(forceX, forceY, max) { + // var s = "Limiting force: (" + forceX + ", " + forceY + "). Max: " + max; + var force = Math.sqrt(forceX * forceX + forceY * forceY); + if (force > max) { + var res = { + x: max * forceX / force, + y: max * forceY / force + }; + } else { + var res = { + x: forceX, + y: forceY + }; + } + + // s += ".\nResult: (" + res.x + ", " + res.y + ")"; + // logDebug(s); + + return res; + }; + + /** + * @brief : Function used for keeping track of compound node + * sizes, since they should bound all their subnodes. + */ + var updateAncestryBoundaries = function updateAncestryBoundaries(node, layoutInfo) { + // var s = "Propagating new position/size of node " + node.id; + var parentId = node.parentId; + if (null == parentId) { + // If there's no parent, we are done + // s += ". No parent node."; + // logDebug(s); + return; + } + + // Get Parent Node + var p = layoutInfo.layoutNodes[layoutInfo.idToIndex[parentId]]; + var flag = false; + + // MaxX + if (null == p.maxX || node.maxX + p.padRight > p.maxX) { + p.maxX = node.maxX + p.padRight; + flag = true; + // s += "\nNew maxX for parent node " + p.id + ": " + p.maxX; + } + + // MinX + if (null == p.minX || node.minX - p.padLeft < p.minX) { + p.minX = node.minX - p.padLeft; + flag = true; + // s += "\nNew minX for parent node " + p.id + ": " + p.minX; + } + + // MaxY + if (null == p.maxY || node.maxY + p.padBottom > p.maxY) { + p.maxY = node.maxY + p.padBottom; + flag = true; + // s += "\nNew maxY for parent node " + p.id + ": " + p.maxY; + } + + // MinY + if (null == p.minY || node.minY - p.padTop < p.minY) { + p.minY = node.minY - p.padTop; + flag = true; + // s += "\nNew minY for parent node " + p.id + ": " + p.minY; + } + + // If updated boundaries, propagate changes upward + if (flag) { + // logDebug(s); + return updateAncestryBoundaries(p, layoutInfo); + } + + // s += ". No changes in boundaries/position of parent node " + p.id; + // logDebug(s); + return; + }; + var separateComponents = function separateComponents(layoutInfo, options) { + var nodes = layoutInfo.layoutNodes; + var components = []; + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var cid = node.cmptId; + var component = components[cid] = components[cid] || []; + component.push(node); + } + var totalA = 0; + for (var i = 0; i < components.length; i++) { + var c = components[i]; + if (!c) { + continue; + } + c.x1 = Infinity; + c.x2 = -Infinity; + c.y1 = Infinity; + c.y2 = -Infinity; + for (var j = 0; j < c.length; j++) { + var n = c[j]; + c.x1 = Math.min(c.x1, n.positionX - n.width / 2); + c.x2 = Math.max(c.x2, n.positionX + n.width / 2); + c.y1 = Math.min(c.y1, n.positionY - n.height / 2); + c.y2 = Math.max(c.y2, n.positionY + n.height / 2); + } + c.w = c.x2 - c.x1; + c.h = c.y2 - c.y1; + totalA += c.w * c.h; + } + components.sort(function (c1, c2) { + return c2.w * c2.h - c1.w * c1.h; + }); + var x = 0; + var y = 0; + var usedW = 0; + var rowH = 0; + var maxRowW = Math.sqrt(totalA) * layoutInfo.clientWidth / layoutInfo.clientHeight; + for (var i = 0; i < components.length; i++) { + var c = components[i]; + if (!c) { + continue; + } + for (var j = 0; j < c.length; j++) { + var n = c[j]; + if (!n.isLocked) { + n.positionX += x - c.x1; + n.positionY += y - c.y1; + } + } + x += c.w + options.componentSpacing; + usedW += c.w + options.componentSpacing; + rowH = Math.max(rowH, c.h); + if (usedW > maxRowW) { + y += rowH + options.componentSpacing; + x = 0; + usedW = 0; + rowH = 0; + } + } + }; + + var defaults$3 = { + fit: true, + // whether to fit the viewport to the graph + padding: 30, + // padding used on fit + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + avoidOverlap: true, + // prevents node overlap, may overflow boundingBox if not enough space + avoidOverlapPadding: 10, + // extra spacing around nodes when avoidOverlap: true + nodeDimensionsIncludeLabels: false, + // Excludes the label when calculating node bounding boxes for the layout algorithm + spacingFactor: undefined, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + condense: false, + // uses all available space on false, uses minimal space on true + rows: undefined, + // force num of rows in the grid + cols: undefined, + // force num of columns in the grid + position: function position(node) {}, + // returns { row, col } for element + sort: undefined, + // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + }; + + function GridLayout(options) { + this.options = extend({}, defaults$3, options); + } + GridLayout.prototype.run = function () { + var params = this.options; + var options = params; + var cy = params.cy; + var eles = options.eles; + var nodes = eles.nodes().not(':parent'); + if (options.sort) { + nodes = nodes.sort(options.sort); + } + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + if (bb.h === 0 || bb.w === 0) { + eles.nodes().layoutPositions(this, options, function (ele) { + return { + x: bb.x1, + y: bb.y1 + }; + }); + } else { + // width/height * splits^2 = cells where splits is number of times to split width + var cells = nodes.size(); + var splits = Math.sqrt(cells * bb.h / bb.w); + var rows = Math.round(splits); + var cols = Math.round(bb.w / bb.h * splits); + var small = function small(val) { + if (val == null) { + return Math.min(rows, cols); + } else { + var min = Math.min(rows, cols); + if (min == rows) { + rows = val; + } else { + cols = val; + } + } + }; + var large = function large(val) { + if (val == null) { + return Math.max(rows, cols); + } else { + var max = Math.max(rows, cols); + if (max == rows) { + rows = val; + } else { + cols = val; + } + } + }; + var oRows = options.rows; + var oCols = options.cols != null ? options.cols : options.columns; + + // if rows or columns were set in options, use those values + if (oRows != null && oCols != null) { + rows = oRows; + cols = oCols; + } else if (oRows != null && oCols == null) { + rows = oRows; + cols = Math.ceil(cells / rows); + } else if (oRows == null && oCols != null) { + cols = oCols; + rows = Math.ceil(cells / cols); + } + + // otherwise use the automatic values and adjust accordingly + + // if rounding was up, see if we can reduce rows or columns + else if (cols * rows > cells) { + var sm = small(); + var lg = large(); + + // reducing the small side takes away the most cells, so try it first + if ((sm - 1) * lg >= cells) { + small(sm - 1); + } else if ((lg - 1) * sm >= cells) { + large(lg - 1); + } + } else { + // if rounding was too low, add rows or columns + while (cols * rows < cells) { + var _sm = small(); + var _lg = large(); + + // try to add to larger side first (adds less in multiplication) + if ((_lg + 1) * _sm >= cells) { + large(_lg + 1); + } else { + small(_sm + 1); + } + } + } + var cellWidth = bb.w / cols; + var cellHeight = bb.h / rows; + if (options.condense) { + cellWidth = 0; + cellHeight = 0; + } + if (options.avoidOverlap) { + for (var i = 0; i < nodes.length; i++) { + var node = nodes[i]; + var pos = node._private.position; + if (pos.x == null || pos.y == null) { + // for bb + pos.x = 0; + pos.y = 0; + } + var nbb = node.layoutDimensions(options); + var p = options.avoidOverlapPadding; + var w = nbb.w + p; + var h = nbb.h + p; + cellWidth = Math.max(cellWidth, w); + cellHeight = Math.max(cellHeight, h); + } + } + var cellUsed = {}; // e.g. 'c-0-2' => true + + var used = function used(row, col) { + return cellUsed['c-' + row + '-' + col] ? true : false; + }; + var use = function use(row, col) { + cellUsed['c-' + row + '-' + col] = true; + }; + + // to keep track of current cell position + var row = 0; + var col = 0; + var moveToNextCell = function moveToNextCell() { + col++; + if (col >= cols) { + col = 0; + row++; + } + }; + + // get a cache of all the manual positions + var id2manPos = {}; + for (var _i = 0; _i < nodes.length; _i++) { + var _node = nodes[_i]; + var rcPos = options.position(_node); + if (rcPos && (rcPos.row !== undefined || rcPos.col !== undefined)) { + // must have at least row or col def'd + var _pos = { + row: rcPos.row, + col: rcPos.col + }; + if (_pos.col === undefined) { + // find unused col + _pos.col = 0; + while (used(_pos.row, _pos.col)) { + _pos.col++; + } + } else if (_pos.row === undefined) { + // find unused row + _pos.row = 0; + while (used(_pos.row, _pos.col)) { + _pos.row++; + } + } + id2manPos[_node.id()] = _pos; + use(_pos.row, _pos.col); + } + } + var getPos = function getPos(element, i) { + var x, y; + if (element.locked() || element.isParent()) { + return false; + } + + // see if we have a manual position set + var rcPos = id2manPos[element.id()]; + if (rcPos) { + x = rcPos.col * cellWidth + cellWidth / 2 + bb.x1; + y = rcPos.row * cellHeight + cellHeight / 2 + bb.y1; + } else { + // otherwise set automatically + + while (used(row, col)) { + moveToNextCell(); + } + x = col * cellWidth + cellWidth / 2 + bb.x1; + y = row * cellHeight + cellHeight / 2 + bb.y1; + use(row, col); + moveToNextCell(); + } + return { + x: x, + y: y + }; + }; + nodes.layoutPositions(this, options, getPos); + } + return this; // chaining + }; + + // default layout options + var defaults$2 = { + ready: function ready() {}, + // on layoutready + stop: function stop() {} // on layoutstop + }; + + // constructor + // options : object containing layout options + function NullLayout(options) { + this.options = extend({}, defaults$2, options); + } + + // runs the layout + NullLayout.prototype.run = function () { + var options = this.options; + var eles = options.eles; // elements to consider in the layout + var layout = this; + + // cy is automatically populated for us in the constructor + // (disable eslint for next line as this serves as example layout code to external developers) + // eslint-disable-next-line no-unused-vars + options.cy; + layout.emit('layoutstart'); + + // puts all nodes at (0, 0) + // n.b. most layouts would use layoutPositions(), instead of positions() and manual events + eles.nodes().positions(function () { + return { + x: 0, + y: 0 + }; + }); + + // trigger layoutready when each node has had its position set at least once + layout.one('layoutready', options.ready); + layout.emit('layoutready'); + + // trigger layoutstop when the layout stops (e.g. finishes) + layout.one('layoutstop', options.stop); + layout.emit('layoutstop'); + return this; // chaining + }; + + // called on continuous layouts to stop them before they finish + NullLayout.prototype.stop = function () { + return this; // chaining + }; + + var defaults$1 = { + positions: undefined, + // map of (node id) => (position obj); or function(node){ return somPos; } + zoom: undefined, + // the zoom level to set (prob want fit = false if set) + pan: undefined, + // the pan level to set (prob want fit = false if set) + fit: true, + // whether to fit to viewport + padding: 30, + // padding on fit + spacingFactor: undefined, + // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + }; + + function PresetLayout(options) { + this.options = extend({}, defaults$1, options); + } + PresetLayout.prototype.run = function () { + var options = this.options; + var eles = options.eles; + var nodes = eles.nodes(); + var posIsFn = fn$6(options.positions); + function getPosition(node) { + if (options.positions == null) { + return copyPosition(node.position()); + } + if (posIsFn) { + return options.positions(node); + } + var pos = options.positions[node._private.data.id]; + if (pos == null) { + return null; + } + return pos; + } + nodes.layoutPositions(this, options, function (node, i) { + var position = getPosition(node); + if (node.locked() || position == null) { + return false; + } + return position; + }); + return this; // chaining + }; + + var defaults = { + fit: true, + // whether to fit to viewport + padding: 30, + // fit padding + boundingBox: undefined, + // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } + animate: false, + // whether to transition the node positions + animationDuration: 500, + // duration of animation in ms if enabled + animationEasing: undefined, + // easing of animation if enabled + animateFilter: function animateFilter(node, i) { + return true; + }, + // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts + ready: undefined, + // callback on layoutready + stop: undefined, + // callback on layoutstop + transform: function transform(node, position) { + return position; + } // transform a given node position. Useful for changing flow direction in discrete layouts + }; + + function RandomLayout(options) { + this.options = extend({}, defaults, options); + } + RandomLayout.prototype.run = function () { + var options = this.options; + var cy = options.cy; + var eles = options.eles; + var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { + x1: 0, + y1: 0, + w: cy.width(), + h: cy.height() + }); + var getPos = function getPos(node, i) { + return { + x: bb.x1 + Math.round(Math.random() * bb.w), + y: bb.y1 + Math.round(Math.random() * bb.h) + }; + }; + eles.nodes().layoutPositions(this, options, getPos); + return this; // chaining + }; + + var layout = [{ + name: 'breadthfirst', + impl: BreadthFirstLayout + }, { + name: 'circle', + impl: CircleLayout + }, { + name: 'concentric', + impl: ConcentricLayout + }, { + name: 'cose', + impl: CoseLayout + }, { + name: 'grid', + impl: GridLayout + }, { + name: 'null', + impl: NullLayout + }, { + name: 'preset', + impl: PresetLayout + }, { + name: 'random', + impl: RandomLayout + }]; + + function NullRenderer(options) { + this.options = options; + this.notifications = 0; // for testing + } + + var noop = function noop() {}; + var throwImgErr = function throwImgErr() { + throw new Error('A headless instance can not render images'); + }; + NullRenderer.prototype = { + recalculateRenderedStyle: noop, + notify: function notify() { + this.notifications++; + }, + init: noop, + isHeadless: function isHeadless() { + return true; + }, + png: throwImgErr, + jpg: throwImgErr + }; + + var BRp$f = {}; + BRp$f.arrowShapeWidth = 0.3; + BRp$f.registerArrowShapes = function () { + var arrowShapes = this.arrowShapes = {}; + var renderer = this; + + // Contract for arrow shapes: + // 0, 0 is arrow tip + // (0, 1) is direction towards node + // (1, 0) is right + // + // functional api: + // collide: check x, y in shape + // roughCollide: called before collide, no false negatives + // draw: draw + // spacing: dist(arrowTip, nodeBoundary) + // gap: dist(edgeTip, nodeBoundary), edgeTip may != arrowTip + + var bbCollide = function bbCollide(x, y, size, angle, translation, edgeWidth, padding) { + var x1 = translation.x - size / 2 - padding; + var x2 = translation.x + size / 2 + padding; + var y1 = translation.y - size / 2 - padding; + var y2 = translation.y + size / 2 + padding; + var inside = x1 <= x && x <= x2 && y1 <= y && y <= y2; + return inside; + }; + var transform = function transform(x, y, size, angle, translation) { + var xRotated = x * Math.cos(angle) - y * Math.sin(angle); + var yRotated = x * Math.sin(angle) + y * Math.cos(angle); + var xScaled = xRotated * size; + var yScaled = yRotated * size; + var xTranslated = xScaled + translation.x; + var yTranslated = yScaled + translation.y; + return { + x: xTranslated, + y: yTranslated + }; + }; + var transformPoints = function transformPoints(pts, size, angle, translation) { + var retPts = []; + for (var i = 0; i < pts.length; i += 2) { + var x = pts[i]; + var y = pts[i + 1]; + retPts.push(transform(x, y, size, angle, translation)); + } + return retPts; + }; + var pointsToArr = function pointsToArr(pts) { + var ret = []; + for (var i = 0; i < pts.length; i++) { + var p = pts[i]; + ret.push(p.x, p.y); + } + return ret; + }; + var standardGap = function standardGap(edge) { + return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').pfValue * 2; + }; + var defineArrowShape = function defineArrowShape(name, defn) { + if (string(defn)) { + defn = arrowShapes[defn]; + } + arrowShapes[name] = extend({ + name: name, + points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], + collide: function collide(x, y, size, angle, translation, padding) { + var points = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, points); + return inside; + }, + roughCollide: bbCollide, + draw: function draw(context, size, angle, translation) { + var points = transformPoints(this.points, size, angle, translation); + renderer.arrowShapeImpl('polygon')(context, points); + }, + spacing: function spacing(edge) { + return 0; + }, + gap: standardGap + }, defn); + }; + defineArrowShape('none', { + collide: falsify, + roughCollide: falsify, + draw: noop$1, + spacing: zeroify, + gap: zeroify + }); + defineArrowShape('triangle', { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3] + }); + defineArrowShape('arrow', 'triangle'); + defineArrowShape('triangle-backcurve', { + points: arrowShapes['triangle'].points, + controlPoint: [0, -0.15], + roughCollide: bbCollide, + draw: function draw(context, size, angle, translation, edgeWidth) { + var ptsTrans = transformPoints(this.points, size, angle, translation); + var ctrlPt = this.controlPoint; + var ctrlPtTrans = transform(ctrlPt[0], ctrlPt[1], size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, ptsTrans, ctrlPtTrans); + }, + gap: function gap(edge) { + return standardGap(edge) * 0.8; + } + }); + defineArrowShape('triangle-tee', { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4], + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var teePts = pointsToArr(transformPoints(this.pointsTee, size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); + return inside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.points, size, angle, translation); + var teePts = transformPoints(this.pointsTee, size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, triPts, teePts); + } + }); + defineArrowShape('circle-triangle', { + radius: 0.15, + pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15], + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var t = translation; + var circleInside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + return pointInsidePolygonPoints(x, y, triPts) || circleInside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.pointsTr, size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, triPts, translation.x, translation.y, this.radius * size); + }, + spacing: function spacing(edge) { + return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius; + } + }); + defineArrowShape('triangle-cross', { + points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], + baseCrossLinePts: [-0.15, -0.4, + // first half of the rectangle + -0.15, -0.4, 0.15, -0.4, + // second half of the rectangle + 0.15, -0.4], + crossLinePts: function crossLinePts(size, edgeWidth) { + // shift points so that the distance between the cross points matches edge width + var p = this.baseCrossLinePts.slice(); + var shiftFactor = edgeWidth / size; + var y0 = 3; + var y1 = 5; + p[y0] = p[y0] - shiftFactor; + p[y1] = p[y1] - shiftFactor; + return p; + }, + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); + var teePts = pointsToArr(transformPoints(this.crossLinePts(size, edgeWidth), size + 2 * padding, angle, translation)); + var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); + return inside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + var triPts = transformPoints(this.points, size, angle, translation); + var crossLinePts = transformPoints(this.crossLinePts(size, edgeWidth), size, angle, translation); + renderer.arrowShapeImpl(this.name)(context, triPts, crossLinePts); + } + }); + defineArrowShape('vee', { + points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15], + gap: function gap(edge) { + return standardGap(edge) * 0.525; + } + }); + defineArrowShape('circle', { + radius: 0.15, + collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { + var t = translation; + var inside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); + return inside; + }, + draw: function draw(context, size, angle, translation, edgeWidth) { + renderer.arrowShapeImpl(this.name)(context, translation.x, translation.y, this.radius * size); + }, + spacing: function spacing(edge) { + return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius; + } + }); + defineArrowShape('tee', { + points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0], + spacing: function spacing(edge) { + return 1; + }, + gap: function gap(edge) { + return 1; + } + }); + defineArrowShape('square', { + points: [-0.15, 0.00, 0.15, 0.00, 0.15, -0.3, -0.15, -0.3] + }); + defineArrowShape('diamond', { + points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0], + gap: function gap(edge) { + return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value; + } + }); + defineArrowShape('chevron', { + points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15], + gap: function gap(edge) { + return 0.95 * edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value; + } + }); + }; + + var BRp$e = {}; + + // Project mouse + BRp$e.projectIntoViewport = function (clientX, clientY) { + var cy = this.cy; + var offsets = this.findContainerClientCoords(); + var offsetLeft = offsets[0]; + var offsetTop = offsets[1]; + var scale = offsets[4]; + var pan = cy.pan(); + var zoom = cy.zoom(); + var x = ((clientX - offsetLeft) / scale - pan.x) / zoom; + var y = ((clientY - offsetTop) / scale - pan.y) / zoom; + return [x, y]; + }; + BRp$e.findContainerClientCoords = function () { + if (this.containerBB) { + return this.containerBB; + } + var container = this.container; + var rect = container.getBoundingClientRect(); + var style = this.cy.window().getComputedStyle(container); + var styleValue = function styleValue(name) { + return parseFloat(style.getPropertyValue(name)); + }; + var padding = { + left: styleValue('padding-left'), + right: styleValue('padding-right'), + top: styleValue('padding-top'), + bottom: styleValue('padding-bottom') + }; + var border = { + left: styleValue('border-left-width'), + right: styleValue('border-right-width'), + top: styleValue('border-top-width'), + bottom: styleValue('border-bottom-width') + }; + var clientWidth = container.clientWidth; + var clientHeight = container.clientHeight; + var paddingHor = padding.left + padding.right; + var paddingVer = padding.top + padding.bottom; + var borderHor = border.left + border.right; + var scale = rect.width / (clientWidth + borderHor); + var unscaledW = clientWidth - paddingHor; + var unscaledH = clientHeight - paddingVer; + var left = rect.left + padding.left + border.left; + var top = rect.top + padding.top + border.top; + return this.containerBB = [left, top, unscaledW, unscaledH, scale]; + }; + BRp$e.invalidateContainerClientCoordsCache = function () { + this.containerBB = null; + }; + BRp$e.findNearestElement = function (x, y, interactiveElementsOnly, isTouch) { + return this.findNearestElements(x, y, interactiveElementsOnly, isTouch)[0]; + }; + BRp$e.findNearestElements = function (x, y, interactiveElementsOnly, isTouch) { + var self = this; + var r = this; + var eles = r.getCachedZSortedEles(); + var near = []; // 1 node max, 1 edge max + var zoom = r.cy.zoom(); + var hasCompounds = r.cy.hasCompoundNodes(); + var edgeThreshold = (isTouch ? 24 : 8) / zoom; + var nodeThreshold = (isTouch ? 8 : 2) / zoom; + var labelThreshold = (isTouch ? 8 : 2) / zoom; + var minSqDist = Infinity; + var nearEdge; + var nearNode; + if (interactiveElementsOnly) { + eles = eles.interactive; + } + function addEle(ele, sqDist) { + if (ele.isNode()) { + if (nearNode) { + return; // can't replace node + } else { + nearNode = ele; + near.push(ele); + } + } + if (ele.isEdge() && (sqDist == null || sqDist < minSqDist)) { + if (nearEdge) { + // then replace existing edge + // can replace only if same z-index + if (nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value && nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value) { + for (var i = 0; i < near.length; i++) { + if (near[i].isEdge()) { + near[i] = ele; + nearEdge = ele; + minSqDist = sqDist != null ? sqDist : minSqDist; + break; + } + } + } + } else { + near.push(ele); + nearEdge = ele; + minSqDist = sqDist != null ? sqDist : minSqDist; + } + } + } + function checkNode(node) { + var width = node.outerWidth() + 2 * nodeThreshold; + var height = node.outerHeight() + 2 * nodeThreshold; + var hw = width / 2; + var hh = height / 2; + var pos = node.position(); + if (pos.x - hw <= x && x <= pos.x + hw // bb check x + && pos.y - hh <= y && y <= pos.y + hh // bb check y + ) { + var shape = r.nodeShapes[self.getNodeShape(node)]; + if (shape.checkPoint(x, y, 0, width, height, pos.x, pos.y)) { + addEle(node, 0); + return true; + } + } + } + function checkEdge(edge) { + var _p = edge._private; + var rs = _p.rscratch; + var styleWidth = edge.pstyle('width').pfValue; + var scale = edge.pstyle('arrow-scale').value; + var width = styleWidth / 2 + edgeThreshold; // more like a distance radius from centre + var widthSq = width * width; + var width2 = width * 2; + var src = _p.source; + var tgt = _p.target; + var sqDist; + if (rs.edgeType === 'segments' || rs.edgeType === 'straight' || rs.edgeType === 'haystack') { + var pts = rs.allpts; + for (var i = 0; i + 3 < pts.length; i += 2) { + if (inLineVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], width2) && widthSq > (sqDist = sqdistToFiniteLine(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3]))) { + addEle(edge, sqDist); + return true; + } + } + } else if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') { + var pts = rs.allpts; + for (var i = 0; i + 5 < rs.allpts.length; i += 4) { + if (inBezierVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5], width2) && widthSq > (sqDist = sqdistToQuadraticBezier(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5]))) { + addEle(edge, sqDist); + return true; + } + } + } + + // if we're close to the edge but didn't hit it, maybe we hit its arrows + + var src = src || _p.source; + var tgt = tgt || _p.target; + var arSize = self.getArrowWidth(styleWidth, scale); + var arrows = [{ + name: 'source', + x: rs.arrowStartX, + y: rs.arrowStartY, + angle: rs.srcArrowAngle + }, { + name: 'target', + x: rs.arrowEndX, + y: rs.arrowEndY, + angle: rs.tgtArrowAngle + }, { + name: 'mid-source', + x: rs.midX, + y: rs.midY, + angle: rs.midsrcArrowAngle + }, { + name: 'mid-target', + x: rs.midX, + y: rs.midY, + angle: rs.midtgtArrowAngle + }]; + for (var i = 0; i < arrows.length; i++) { + var ar = arrows[i]; + var shape = r.arrowShapes[edge.pstyle(ar.name + '-arrow-shape').value]; + var edgeWidth = edge.pstyle('width').pfValue; + if (shape.roughCollide(x, y, arSize, ar.angle, { + x: ar.x, + y: ar.y + }, edgeWidth, edgeThreshold) && shape.collide(x, y, arSize, ar.angle, { + x: ar.x, + y: ar.y + }, edgeWidth, edgeThreshold)) { + addEle(edge); + return true; + } + } + + // for compound graphs, hitting edge may actually want a connected node instead (b/c edge may have greater z-index precedence) + if (hasCompounds && near.length > 0) { + checkNode(src); + checkNode(tgt); + } + } + function preprop(obj, name, pre) { + return getPrefixedProperty(obj, name, pre); + } + function checkLabel(ele, prefix) { + var _p = ele._private; + var th = labelThreshold; + var prefixDash; + if (prefix) { + prefixDash = prefix + '-'; + } else { + prefixDash = ''; + } + ele.boundingBox(); + var bb = _p.labelBounds[prefix || 'main']; + var text = ele.pstyle(prefixDash + 'label').value; + var eventsEnabled = ele.pstyle('text-events').strValue === 'yes'; + if (!eventsEnabled || !text) { + return; + } + var lx = preprop(_p.rscratch, 'labelX', prefix); + var ly = preprop(_p.rscratch, 'labelY', prefix); + var theta = preprop(_p.rscratch, 'labelAngle', prefix); + var ox = ele.pstyle(prefixDash + 'text-margin-x').pfValue; + var oy = ele.pstyle(prefixDash + 'text-margin-y').pfValue; + var lx1 = bb.x1 - th - ox; // (-ox, -oy) as bb already includes margin + var lx2 = bb.x2 + th - ox; // and rotation is about (lx, ly) + var ly1 = bb.y1 - th - oy; + var ly2 = bb.y2 + th - oy; + if (theta) { + var cos = Math.cos(theta); + var sin = Math.sin(theta); + var rotate = function rotate(x, y) { + x = x - lx; + y = y - ly; + return { + x: x * cos - y * sin + lx, + y: x * sin + y * cos + ly + }; + }; + var px1y1 = rotate(lx1, ly1); + var px1y2 = rotate(lx1, ly2); + var px2y1 = rotate(lx2, ly1); + var px2y2 = rotate(lx2, ly2); + var points = [ + // with the margin added after the rotation is applied + px1y1.x + ox, px1y1.y + oy, px2y1.x + ox, px2y1.y + oy, px2y2.x + ox, px2y2.y + oy, px1y2.x + ox, px1y2.y + oy]; + if (pointInsidePolygonPoints(x, y, points)) { + addEle(ele); + return true; + } + } else { + // do a cheaper bb check + if (inBoundingBox(bb, x, y)) { + addEle(ele); + return true; + } + } + } + for (var i = eles.length - 1; i >= 0; i--) { + // reverse order for precedence + var ele = eles[i]; + if (ele.isNode()) { + checkNode(ele) || checkLabel(ele); + } else { + // then edge + checkEdge(ele) || checkLabel(ele) || checkLabel(ele, 'source') || checkLabel(ele, 'target'); + } + } + return near; + }; + + // 'Give me everything from this box' + BRp$e.getAllInBox = function (x1, y1, x2, y2) { + var eles = this.getCachedZSortedEles().interactive; + var box = []; + var x1c = Math.min(x1, x2); + var x2c = Math.max(x1, x2); + var y1c = Math.min(y1, y2); + var y2c = Math.max(y1, y2); + x1 = x1c; + x2 = x2c; + y1 = y1c; + y2 = y2c; + var boxBb = makeBoundingBox({ + x1: x1, + y1: y1, + x2: x2, + y2: y2 + }); + for (var e = 0; e < eles.length; e++) { + var ele = eles[e]; + if (ele.isNode()) { + var node = ele; + var nodeBb = node.boundingBox({ + includeNodes: true, + includeEdges: false, + includeLabels: false + }); + if (boundingBoxesIntersect(boxBb, nodeBb) && !boundingBoxInBoundingBox(nodeBb, boxBb)) { + box.push(node); + } + } else { + var edge = ele; + var _p = edge._private; + var rs = _p.rscratch; + if (rs.startX != null && rs.startY != null && !inBoundingBox(boxBb, rs.startX, rs.startY)) { + continue; + } + if (rs.endX != null && rs.endY != null && !inBoundingBox(boxBb, rs.endX, rs.endY)) { + continue; + } + if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound' || rs.edgeType === 'segments' || rs.edgeType === 'haystack') { + var pts = _p.rstyle.bezierPts || _p.rstyle.linePts || _p.rstyle.haystackPts; + var allInside = true; + for (var i = 0; i < pts.length; i++) { + if (!pointInBoundingBox(boxBb, pts[i])) { + allInside = false; + break; + } + } + if (allInside) { + box.push(edge); + } + } else if (rs.edgeType === 'haystack' || rs.edgeType === 'straight') { + box.push(edge); + } + } + } + return box; + }; + + var BRp$d = {}; + BRp$d.calculateArrowAngles = function (edge) { + var rs = edge._private.rscratch; + var isHaystack = rs.edgeType === 'haystack'; + var isBezier = rs.edgeType === 'bezier'; + var isMultibezier = rs.edgeType === 'multibezier'; + var isSegments = rs.edgeType === 'segments'; + var isCompound = rs.edgeType === 'compound'; + var isSelf = rs.edgeType === 'self'; + + // Displacement gives direction for arrowhead orientation + var dispX, dispY; + var startX, startY, endX, endY, midX, midY; + if (isHaystack) { + startX = rs.haystackPts[0]; + startY = rs.haystackPts[1]; + endX = rs.haystackPts[2]; + endY = rs.haystackPts[3]; + } else { + startX = rs.arrowStartX; + startY = rs.arrowStartY; + endX = rs.arrowEndX; + endY = rs.arrowEndY; + } + midX = rs.midX; + midY = rs.midY; + + // source + // + + if (isSegments) { + dispX = startX - rs.segpts[0]; + dispY = startY - rs.segpts[1]; + } else if (isMultibezier || isCompound || isSelf || isBezier) { + var pts = rs.allpts; + var bX = qbezierAt(pts[0], pts[2], pts[4], 0.1); + var bY = qbezierAt(pts[1], pts[3], pts[5], 0.1); + dispX = startX - bX; + dispY = startY - bY; + } else { + dispX = startX - midX; + dispY = startY - midY; + } + rs.srcArrowAngle = getAngleFromDisp(dispX, dispY); + + // mid target + // + + var midX = rs.midX; + var midY = rs.midY; + if (isHaystack) { + midX = (startX + endX) / 2; + midY = (startY + endY) / 2; + } + dispX = endX - startX; + dispY = endY - startY; + if (isSegments) { + var pts = rs.allpts; + if (pts.length / 2 % 2 === 0) { + var i2 = pts.length / 2; + var i1 = i2 - 2; + dispX = pts[i2] - pts[i1]; + dispY = pts[i2 + 1] - pts[i1 + 1]; + } else { + var i2 = pts.length / 2 - 1; + var i1 = i2 - 2; + var i3 = i2 + 2; + dispX = pts[i2] - pts[i1]; + dispY = pts[i2 + 1] - pts[i1 + 1]; + } + } else if (isMultibezier || isCompound || isSelf) { + var pts = rs.allpts; + var cpts = rs.ctrlpts; + var bp0x, bp0y; + var bp1x, bp1y; + if (cpts.length / 2 % 2 === 0) { + var p0 = pts.length / 2 - 1; // startpt + var ic = p0 + 2; + var p1 = ic + 2; + bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0); + bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0); + bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0001); + bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0001); + } else { + var ic = pts.length / 2 - 1; // ctrpt + var p0 = ic - 2; // startpt + var p1 = ic + 2; // endpt + + bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.4999); + bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.4999); + bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.5); + bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.5); + } + dispX = bp1x - bp0x; + dispY = bp1y - bp0y; + } + rs.midtgtArrowAngle = getAngleFromDisp(dispX, dispY); + rs.midDispX = dispX; + rs.midDispY = dispY; + + // mid source + // + + dispX *= -1; + dispY *= -1; + if (isSegments) { + var pts = rs.allpts; + if (pts.length / 2 % 2 === 0) ; else { + var i2 = pts.length / 2 - 1; + var i3 = i2 + 2; + dispX = -(pts[i3] - pts[i2]); + dispY = -(pts[i3 + 1] - pts[i2 + 1]); + } + } + rs.midsrcArrowAngle = getAngleFromDisp(dispX, dispY); + + // target + // + + if (isSegments) { + dispX = endX - rs.segpts[rs.segpts.length - 2]; + dispY = endY - rs.segpts[rs.segpts.length - 1]; + } else if (isMultibezier || isCompound || isSelf || isBezier) { + var pts = rs.allpts; + var l = pts.length; + var bX = qbezierAt(pts[l - 6], pts[l - 4], pts[l - 2], 0.9); + var bY = qbezierAt(pts[l - 5], pts[l - 3], pts[l - 1], 0.9); + dispX = endX - bX; + dispY = endY - bY; + } else { + dispX = endX - midX; + dispY = endY - midY; + } + rs.tgtArrowAngle = getAngleFromDisp(dispX, dispY); + }; + BRp$d.getArrowWidth = BRp$d.getArrowHeight = function (edgeWidth, scale) { + var cache = this.arrowWidthCache = this.arrowWidthCache || {}; + var cachedVal = cache[edgeWidth + ', ' + scale]; + if (cachedVal) { + return cachedVal; + } + cachedVal = Math.max(Math.pow(edgeWidth * 13.37, 0.9), 29) * scale; + cache[edgeWidth + ', ' + scale] = cachedVal; + return cachedVal; + }; + + var BRp$c = {}; + BRp$c.findMidptPtsEtc = function (edge, pairInfo) { + var posPts = pairInfo.posPts, + intersectionPts = pairInfo.intersectionPts, + vectorNormInverse = pairInfo.vectorNormInverse; + var midptPts; + + // n.b. assumes all edges in bezier bundle have same endpoints specified + var srcManEndpt = edge.pstyle('source-endpoint'); + var tgtManEndpt = edge.pstyle('target-endpoint'); + var haveManualEndPts = srcManEndpt.units != null && tgtManEndpt.units != null; + var recalcVectorNormInverse = function recalcVectorNormInverse(x1, y1, x2, y2) { + var dy = y2 - y1; + var dx = x2 - x1; + var l = Math.sqrt(dx * dx + dy * dy); + return { + x: -dy / l, + y: dx / l + }; + }; + var edgeDistances = edge.pstyle('edge-distances').value; + switch (edgeDistances) { + case 'node-position': + midptPts = posPts; + break; + case 'intersection': + midptPts = intersectionPts; + break; + case 'endpoints': + { + if (haveManualEndPts) { + var _this$manualEndptToPx = this.manualEndptToPx(edge.source()[0], srcManEndpt), + _this$manualEndptToPx2 = _slicedToArray(_this$manualEndptToPx, 2), + x1 = _this$manualEndptToPx2[0], + y1 = _this$manualEndptToPx2[1]; + var _this$manualEndptToPx3 = this.manualEndptToPx(edge.target()[0], tgtManEndpt), + _this$manualEndptToPx4 = _slicedToArray(_this$manualEndptToPx3, 2), + x2 = _this$manualEndptToPx4[0], + y2 = _this$manualEndptToPx4[1]; + var endPts = { + x1: x1, + y1: y1, + x2: x2, + y2: y2 + }; + vectorNormInverse = recalcVectorNormInverse(x1, y1, x2, y2); + midptPts = endPts; + } else { + warn("Edge ".concat(edge.id(), " has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")); + midptPts = intersectionPts; // back to default + } + + break; + } + } + return { + midptPts: midptPts, + vectorNormInverse: vectorNormInverse + }; + }; + BRp$c.findHaystackPoints = function (edges) { + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var _p = edge._private; + var rs = _p.rscratch; + if (!rs.haystack) { + var angle = Math.random() * 2 * Math.PI; + rs.source = { + x: Math.cos(angle), + y: Math.sin(angle) + }; + angle = Math.random() * 2 * Math.PI; + rs.target = { + x: Math.cos(angle), + y: Math.sin(angle) + }; + } + var src = _p.source; + var tgt = _p.target; + var srcPos = src.position(); + var tgtPos = tgt.position(); + var srcW = src.width(); + var tgtW = tgt.width(); + var srcH = src.height(); + var tgtH = tgt.height(); + var radius = edge.pstyle('haystack-radius').value; + var halfRadius = radius / 2; // b/c have to half width/height + + rs.haystackPts = rs.allpts = [rs.source.x * srcW * halfRadius + srcPos.x, rs.source.y * srcH * halfRadius + srcPos.y, rs.target.x * tgtW * halfRadius + tgtPos.x, rs.target.y * tgtH * halfRadius + tgtPos.y]; + rs.midX = (rs.allpts[0] + rs.allpts[2]) / 2; + rs.midY = (rs.allpts[1] + rs.allpts[3]) / 2; + + // always override as haystack in case set to different type previously + rs.edgeType = 'haystack'; + rs.haystack = true; + this.storeEdgeProjections(edge); + this.calculateArrowAngles(edge); + this.recalculateEdgeLabelProjections(edge); + this.calculateLabelAngles(edge); + } + }; + BRp$c.findSegmentsPoints = function (edge, pairInfo) { + // Segments (multiple straight lines) + + var rs = edge._private.rscratch; + var segmentWs = edge.pstyle('segment-weights'); + var segmentDs = edge.pstyle('segment-distances'); + var segmentsN = Math.min(segmentWs.pfValue.length, segmentDs.pfValue.length); + rs.edgeType = 'segments'; + rs.segpts = []; + for (var s = 0; s < segmentsN; s++) { + var w = segmentWs.pfValue[s]; + var d = segmentDs.pfValue[s]; + var w1 = 1 - w; + var w2 = w; + var _this$findMidptPtsEtc = this.findMidptPtsEtc(edge, pairInfo), + midptPts = _this$findMidptPtsEtc.midptPts, + vectorNormInverse = _this$findMidptPtsEtc.vectorNormInverse; + var adjustedMidpt = { + x: midptPts.x1 * w1 + midptPts.x2 * w2, + y: midptPts.y1 * w1 + midptPts.y2 * w2 + }; + rs.segpts.push(adjustedMidpt.x + vectorNormInverse.x * d, adjustedMidpt.y + vectorNormInverse.y * d); + } + }; + BRp$c.findLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) { + // Self-edge + + var rs = edge._private.rscratch; + var dirCounts = pairInfo.dirCounts, + srcPos = pairInfo.srcPos; + var ctrlptDists = edge.pstyle('control-point-distances'); + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; + var loopDir = edge.pstyle('loop-direction').pfValue; + var loopSwp = edge.pstyle('loop-sweep').pfValue; + var stepSize = edge.pstyle('control-point-step-size').pfValue; + rs.edgeType = 'self'; + var j = i; + var loopDist = stepSize; + if (edgeIsUnbundled) { + j = 0; + loopDist = ctrlptDist; + } + var loopAngle = loopDir - Math.PI / 2; + var outAngle = loopAngle - loopSwp / 2; + var inAngle = loopAngle + loopSwp / 2; + + // increase by step size for overlapping loops, keyed on direction and sweep values + var dc = String(loopDir + '_' + loopSwp); + j = dirCounts[dc] === undefined ? dirCounts[dc] = 0 : ++dirCounts[dc]; + rs.ctrlpts = [srcPos.x + Math.cos(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.x + Math.cos(inAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(inAngle) * 1.4 * loopDist * (j / 3 + 1)]; + }; + BRp$c.findCompoundLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) { + // Compound edge + + var rs = edge._private.rscratch; + rs.edgeType = 'compound'; + var srcPos = pairInfo.srcPos, + tgtPos = pairInfo.tgtPos, + srcW = pairInfo.srcW, + srcH = pairInfo.srcH, + tgtW = pairInfo.tgtW, + tgtH = pairInfo.tgtH; + var stepSize = edge.pstyle('control-point-step-size').pfValue; + var ctrlptDists = edge.pstyle('control-point-distances'); + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; + var j = i; + var loopDist = stepSize; + if (edgeIsUnbundled) { + j = 0; + loopDist = ctrlptDist; + } + var loopW = 50; + var loopaPos = { + x: srcPos.x - srcW / 2, + y: srcPos.y - srcH / 2 + }; + var loopbPos = { + x: tgtPos.x - tgtW / 2, + y: tgtPos.y - tgtH / 2 + }; + var loopPos = { + x: Math.min(loopaPos.x, loopbPos.x), + y: Math.min(loopaPos.y, loopbPos.y) + }; + + // avoids cases with impossible beziers + var minCompoundStretch = 0.5; + var compoundStretchA = Math.max(minCompoundStretch, Math.log(srcW * 0.01)); + var compoundStretchB = Math.max(minCompoundStretch, Math.log(tgtW * 0.01)); + rs.ctrlpts = [loopPos.x, loopPos.y - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchA, loopPos.x - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchB, loopPos.y]; + }; + BRp$c.findStraightEdgePoints = function (edge) { + // Straight edge within bundle + + edge._private.rscratch.edgeType = 'straight'; + }; + BRp$c.findBezierPoints = function (edge, pairInfo, i, edgeIsUnbundled, edgeIsSwapped) { + var rs = edge._private.rscratch; + var stepSize = edge.pstyle('control-point-step-size').pfValue; + var ctrlptDists = edge.pstyle('control-point-distances'); + var ctrlptWs = edge.pstyle('control-point-weights'); + var bezierN = ctrlptDists && ctrlptWs ? Math.min(ctrlptDists.value.length, ctrlptWs.value.length) : 1; + var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; + var ctrlptWeight = ctrlptWs.value[0]; + + // (Multi)bezier + + var multi = edgeIsUnbundled; + rs.edgeType = multi ? 'multibezier' : 'bezier'; + rs.ctrlpts = []; + for (var b = 0; b < bezierN; b++) { + var normctrlptDist = (0.5 - pairInfo.eles.length / 2 + i) * stepSize * (edgeIsSwapped ? -1 : 1); + var manctrlptDist = void 0; + var sign = signum(normctrlptDist); + if (multi) { + ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[b] : stepSize; // fall back on step size + ctrlptWeight = ctrlptWs.value[b]; + } + if (edgeIsUnbundled) { + // multi or single unbundled + manctrlptDist = ctrlptDist; + } else { + manctrlptDist = ctrlptDist !== undefined ? sign * ctrlptDist : undefined; + } + var distanceFromMidpoint = manctrlptDist !== undefined ? manctrlptDist : normctrlptDist; + var w1 = 1 - ctrlptWeight; + var w2 = ctrlptWeight; + var _this$findMidptPtsEtc2 = this.findMidptPtsEtc(edge, pairInfo), + midptPts = _this$findMidptPtsEtc2.midptPts, + vectorNormInverse = _this$findMidptPtsEtc2.vectorNormInverse; + var adjustedMidpt = { + x: midptPts.x1 * w1 + midptPts.x2 * w2, + y: midptPts.y1 * w1 + midptPts.y2 * w2 + }; + rs.ctrlpts.push(adjustedMidpt.x + vectorNormInverse.x * distanceFromMidpoint, adjustedMidpt.y + vectorNormInverse.y * distanceFromMidpoint); + } + }; + BRp$c.findTaxiPoints = function (edge, pairInfo) { + // Taxicab geometry with two turns maximum + + var rs = edge._private.rscratch; + rs.edgeType = 'segments'; + var VERTICAL = 'vertical'; + var HORIZONTAL = 'horizontal'; + var LEFTWARD = 'leftward'; + var RIGHTWARD = 'rightward'; + var DOWNWARD = 'downward'; + var UPWARD = 'upward'; + var AUTO = 'auto'; + var posPts = pairInfo.posPts, + srcW = pairInfo.srcW, + srcH = pairInfo.srcH, + tgtW = pairInfo.tgtW, + tgtH = pairInfo.tgtH; + var edgeDistances = edge.pstyle('edge-distances').value; + var dIncludesNodeBody = edgeDistances !== 'node-position'; + var taxiDir = edge.pstyle('taxi-direction').value; + var rawTaxiDir = taxiDir; // unprocessed value + var taxiTurn = edge.pstyle('taxi-turn'); + var turnIsPercent = taxiTurn.units === '%'; + var taxiTurnPfVal = taxiTurn.pfValue; + var turnIsNegative = taxiTurnPfVal < 0; // i.e. from target side + var minD = edge.pstyle('taxi-turn-min-distance').pfValue; + var dw = dIncludesNodeBody ? (srcW + tgtW) / 2 : 0; + var dh = dIncludesNodeBody ? (srcH + tgtH) / 2 : 0; + var pdx = posPts.x2 - posPts.x1; + var pdy = posPts.y2 - posPts.y1; + + // take away the effective w/h from the magnitude of the delta value + var subDWH = function subDWH(dxy, dwh) { + if (dxy > 0) { + return Math.max(dxy - dwh, 0); + } else { + return Math.min(dxy + dwh, 0); + } + }; + var dx = subDWH(pdx, dw); + var dy = subDWH(pdy, dh); + var isExplicitDir = false; + if (rawTaxiDir === AUTO) { + taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL; + } else if (rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD) { + taxiDir = VERTICAL; + isExplicitDir = true; + } else if (rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD) { + taxiDir = HORIZONTAL; + isExplicitDir = true; + } + var isVert = taxiDir === VERTICAL; + var l = isVert ? dy : dx; + var pl = isVert ? pdy : pdx; + var sgnL = signum(pl); + var forcedDir = false; + if (!(isExplicitDir && (turnIsPercent || turnIsNegative)) // forcing in this case would cause weird growing in the opposite direction + && (rawTaxiDir === DOWNWARD && pl < 0 || rawTaxiDir === UPWARD && pl > 0 || rawTaxiDir === LEFTWARD && pl > 0 || rawTaxiDir === RIGHTWARD && pl < 0)) { + sgnL *= -1; + l = sgnL * Math.abs(l); + forcedDir = true; + } + var d; + if (turnIsPercent) { + var p = taxiTurnPfVal < 0 ? 1 + taxiTurnPfVal : taxiTurnPfVal; + d = p * l; + } else { + var k = taxiTurnPfVal < 0 ? l : 0; + d = k + taxiTurnPfVal * sgnL; + } + var getIsTooClose = function getIsTooClose(d) { + return Math.abs(d) < minD || Math.abs(d) >= Math.abs(l); + }; + var isTooCloseSrc = getIsTooClose(d); + var isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d)); + var isTooClose = isTooCloseSrc || isTooCloseTgt; + if (isTooClose && !forcedDir) { + // non-ideal routing + if (isVert) { + // vertical fallbacks + var lShapeInsideSrc = Math.abs(pl) <= srcH / 2; + var lShapeInsideTgt = Math.abs(pdx) <= tgtW / 2; + if (lShapeInsideSrc) { + // horizontal Z-shape (direction not respected) + var x = (posPts.x1 + posPts.x2) / 2; + var y1 = posPts.y1, + y2 = posPts.y2; + rs.segpts = [x, y1, x, y2]; + } else if (lShapeInsideTgt) { + // vertical Z-shape (distance not respected) + var y = (posPts.y1 + posPts.y2) / 2; + var x1 = posPts.x1, + x2 = posPts.x2; + rs.segpts = [x1, y, x2, y]; + } else { + // L-shape fallback (turn distance not respected, but works well with tree siblings) + rs.segpts = [posPts.x1, posPts.y2]; + } + } else { + // horizontal fallbacks + var _lShapeInsideSrc = Math.abs(pl) <= srcW / 2; + var _lShapeInsideTgt = Math.abs(pdy) <= tgtH / 2; + if (_lShapeInsideSrc) { + // vertical Z-shape (direction not respected) + var _y = (posPts.y1 + posPts.y2) / 2; + var _x = posPts.x1, + _x2 = posPts.x2; + rs.segpts = [_x, _y, _x2, _y]; + } else if (_lShapeInsideTgt) { + // horizontal Z-shape (turn distance not respected) + var _x3 = (posPts.x1 + posPts.x2) / 2; + var _y2 = posPts.y1, + _y3 = posPts.y2; + rs.segpts = [_x3, _y2, _x3, _y3]; + } else { + // L-shape (turn distance not respected, but works well for tree siblings) + rs.segpts = [posPts.x2, posPts.y1]; + } + } + } else { + // ideal routing + if (isVert) { + var _y4 = posPts.y1 + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0); + var _x4 = posPts.x1, + _x5 = posPts.x2; + rs.segpts = [_x4, _y4, _x5, _y4]; + } else { + // horizontal + var _x6 = posPts.x1 + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0); + var _y5 = posPts.y1, + _y6 = posPts.y2; + rs.segpts = [_x6, _y5, _x6, _y6]; + } + } + }; + BRp$c.tryToCorrectInvalidPoints = function (edge, pairInfo) { + var rs = edge._private.rscratch; + + // can only correct beziers for now... + if (rs.edgeType === 'bezier') { + var srcPos = pairInfo.srcPos, + tgtPos = pairInfo.tgtPos, + srcW = pairInfo.srcW, + srcH = pairInfo.srcH, + tgtW = pairInfo.tgtW, + tgtH = pairInfo.tgtH, + srcShape = pairInfo.srcShape, + tgtShape = pairInfo.tgtShape; + var badStart = !number$1(rs.startX) || !number$1(rs.startY); + var badAStart = !number$1(rs.arrowStartX) || !number$1(rs.arrowStartY); + var badEnd = !number$1(rs.endX) || !number$1(rs.endY); + var badAEnd = !number$1(rs.arrowEndX) || !number$1(rs.arrowEndY); + var minCpADistFactor = 3; + var arrowW = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth; + var minCpADist = minCpADistFactor * arrowW; + var startACpDist = dist({ + x: rs.ctrlpts[0], + y: rs.ctrlpts[1] + }, { + x: rs.startX, + y: rs.startY + }); + var closeStartACp = startACpDist < minCpADist; + var endACpDist = dist({ + x: rs.ctrlpts[0], + y: rs.ctrlpts[1] + }, { + x: rs.endX, + y: rs.endY + }); + var closeEndACp = endACpDist < minCpADist; + var overlapping = false; + if (badStart || badAStart || closeStartACp) { + overlapping = true; + + // project control point along line from src centre to outside the src shape + // (otherwise intersection will yield nothing) + var cpD = { + // delta + x: rs.ctrlpts[0] - srcPos.x, + y: rs.ctrlpts[1] - srcPos.y + }; + var cpL = Math.sqrt(cpD.x * cpD.x + cpD.y * cpD.y); // length of line + var cpM = { + // normalised delta + x: cpD.x / cpL, + y: cpD.y / cpL + }; + var radius = Math.max(srcW, srcH); + var cpProj = { + // *2 radius guarantees outside shape + x: rs.ctrlpts[0] + cpM.x * 2 * radius, + y: rs.ctrlpts[1] + cpM.y * 2 * radius + }; + var srcCtrlPtIntn = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, cpProj.x, cpProj.y, 0); + if (closeStartACp) { + rs.ctrlpts[0] = rs.ctrlpts[0] + cpM.x * (minCpADist - startACpDist); + rs.ctrlpts[1] = rs.ctrlpts[1] + cpM.y * (minCpADist - startACpDist); + } else { + rs.ctrlpts[0] = srcCtrlPtIntn[0] + cpM.x * minCpADist; + rs.ctrlpts[1] = srcCtrlPtIntn[1] + cpM.y * minCpADist; + } + } + if (badEnd || badAEnd || closeEndACp) { + overlapping = true; + + // project control point along line from tgt centre to outside the tgt shape + // (otherwise intersection will yield nothing) + var _cpD = { + // delta + x: rs.ctrlpts[0] - tgtPos.x, + y: rs.ctrlpts[1] - tgtPos.y + }; + var _cpL = Math.sqrt(_cpD.x * _cpD.x + _cpD.y * _cpD.y); // length of line + var _cpM = { + // normalised delta + x: _cpD.x / _cpL, + y: _cpD.y / _cpL + }; + var _radius = Math.max(srcW, srcH); + var _cpProj = { + // *2 radius guarantees outside shape + x: rs.ctrlpts[0] + _cpM.x * 2 * _radius, + y: rs.ctrlpts[1] + _cpM.y * 2 * _radius + }; + var tgtCtrlPtIntn = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, _cpProj.x, _cpProj.y, 0); + if (closeEndACp) { + rs.ctrlpts[0] = rs.ctrlpts[0] + _cpM.x * (minCpADist - endACpDist); + rs.ctrlpts[1] = rs.ctrlpts[1] + _cpM.y * (minCpADist - endACpDist); + } else { + rs.ctrlpts[0] = tgtCtrlPtIntn[0] + _cpM.x * minCpADist; + rs.ctrlpts[1] = tgtCtrlPtIntn[1] + _cpM.y * minCpADist; + } + } + if (overlapping) { + // recalc endpts + this.findEndpoints(edge); + } + } + }; + BRp$c.storeAllpts = function (edge) { + var rs = edge._private.rscratch; + if (rs.edgeType === 'multibezier' || rs.edgeType === 'bezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') { + rs.allpts = []; + rs.allpts.push(rs.startX, rs.startY); + for (var b = 0; b + 1 < rs.ctrlpts.length; b += 2) { + // ctrl pt itself + rs.allpts.push(rs.ctrlpts[b], rs.ctrlpts[b + 1]); + + // the midpt between ctrlpts as intermediate destination pts + if (b + 3 < rs.ctrlpts.length) { + rs.allpts.push((rs.ctrlpts[b] + rs.ctrlpts[b + 2]) / 2, (rs.ctrlpts[b + 1] + rs.ctrlpts[b + 3]) / 2); + } + } + rs.allpts.push(rs.endX, rs.endY); + var m, mt; + if (rs.ctrlpts.length / 2 % 2 === 0) { + m = rs.allpts.length / 2 - 1; + rs.midX = rs.allpts[m]; + rs.midY = rs.allpts[m + 1]; + } else { + m = rs.allpts.length / 2 - 3; + mt = 0.5; + rs.midX = qbezierAt(rs.allpts[m], rs.allpts[m + 2], rs.allpts[m + 4], mt); + rs.midY = qbezierAt(rs.allpts[m + 1], rs.allpts[m + 3], rs.allpts[m + 5], mt); + } + } else if (rs.edgeType === 'straight') { + // need to calc these after endpts + rs.allpts = [rs.startX, rs.startY, rs.endX, rs.endY]; + + // default midpt for labels etc + rs.midX = (rs.startX + rs.endX + rs.arrowStartX + rs.arrowEndX) / 4; + rs.midY = (rs.startY + rs.endY + rs.arrowStartY + rs.arrowEndY) / 4; + } else if (rs.edgeType === 'segments') { + rs.allpts = []; + rs.allpts.push(rs.startX, rs.startY); + rs.allpts.push.apply(rs.allpts, rs.segpts); + rs.allpts.push(rs.endX, rs.endY); + if (rs.segpts.length % 4 === 0) { + var i2 = rs.segpts.length / 2; + var i1 = i2 - 2; + rs.midX = (rs.segpts[i1] + rs.segpts[i2]) / 2; + rs.midY = (rs.segpts[i1 + 1] + rs.segpts[i2 + 1]) / 2; + } else { + var _i = rs.segpts.length / 2 - 1; + rs.midX = rs.segpts[_i]; + rs.midY = rs.segpts[_i + 1]; + } + } + }; + BRp$c.checkForInvalidEdgeWarning = function (edge) { + var rs = edge[0]._private.rscratch; + if (rs.nodesOverlap || number$1(rs.startX) && number$1(rs.startY) && number$1(rs.endX) && number$1(rs.endY)) { + rs.loggedErr = false; + } else { + if (!rs.loggedErr) { + rs.loggedErr = true; + warn('Edge `' + edge.id() + '` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap.'); + } + } + }; + BRp$c.findEdgeControlPoints = function (edges) { + var _this = this; + if (!edges || edges.length === 0) { + return; + } + var r = this; + var cy = r.cy; + var hasCompounds = cy.hasCompoundNodes(); + var hashTable = { + map: new Map$2(), + get: function get(pairId) { + var map2 = this.map.get(pairId[0]); + if (map2 != null) { + return map2.get(pairId[1]); + } else { + return null; + } + }, + set: function set(pairId, val) { + var map2 = this.map.get(pairId[0]); + if (map2 == null) { + map2 = new Map$2(); + this.map.set(pairId[0], map2); + } + map2.set(pairId[1], val); + } + }; + var pairIds = []; + var haystackEdges = []; + + // create a table of edge (src, tgt) => list of edges between them + for (var i = 0; i < edges.length; i++) { + var edge = edges[i]; + var _p = edge._private; + var curveStyle = edge.pstyle('curve-style').value; + + // ignore edges who are not to be displayed + // they shouldn't take up space + if (edge.removed() || !edge.takesUpSpace()) { + continue; + } + if (curveStyle === 'haystack') { + haystackEdges.push(edge); + continue; + } + var edgeIsUnbundled = curveStyle === 'unbundled-bezier' || curveStyle === 'segments' || curveStyle === 'straight' || curveStyle === 'straight-triangle' || curveStyle === 'taxi'; + var edgeIsBezier = curveStyle === 'unbundled-bezier' || curveStyle === 'bezier'; + var src = _p.source; + var tgt = _p.target; + var srcIndex = src.poolIndex(); + var tgtIndex = tgt.poolIndex(); + var pairId = [srcIndex, tgtIndex].sort(); + var tableEntry = hashTable.get(pairId); + if (tableEntry == null) { + tableEntry = { + eles: [] + }; + hashTable.set(pairId, tableEntry); + pairIds.push(pairId); + } + tableEntry.eles.push(edge); + if (edgeIsUnbundled) { + tableEntry.hasUnbundled = true; + } + if (edgeIsBezier) { + tableEntry.hasBezier = true; + } + } + + // for each pair (src, tgt), create the ctrl pts + // Nested for loop is OK; total number of iterations for both loops = edgeCount + var _loop = function _loop(p) { + var pairId = pairIds[p]; + var pairInfo = hashTable.get(pairId); + var swappedpairInfo = void 0; + if (!pairInfo.hasUnbundled) { + var pllEdges = pairInfo.eles[0].parallelEdges().filter(function (e) { + return e.isBundledBezier(); + }); + clearArray(pairInfo.eles); + pllEdges.forEach(function (edge) { + return pairInfo.eles.push(edge); + }); + + // for each pair id, the edges should be sorted by index + pairInfo.eles.sort(function (edge1, edge2) { + return edge1.poolIndex() - edge2.poolIndex(); + }); + } + var firstEdge = pairInfo.eles[0]; + var src = firstEdge.source(); + var tgt = firstEdge.target(); + + // make sure src/tgt distinction is consistent w.r.t. pairId + if (src.poolIndex() > tgt.poolIndex()) { + var temp = src; + src = tgt; + tgt = temp; + } + var srcPos = pairInfo.srcPos = src.position(); + var tgtPos = pairInfo.tgtPos = tgt.position(); + var srcW = pairInfo.srcW = src.outerWidth(); + var srcH = pairInfo.srcH = src.outerHeight(); + var tgtW = pairInfo.tgtW = tgt.outerWidth(); + var tgtH = pairInfo.tgtH = tgt.outerHeight(); + var srcShape = pairInfo.srcShape = r.nodeShapes[_this.getNodeShape(src)]; + var tgtShape = pairInfo.tgtShape = r.nodeShapes[_this.getNodeShape(tgt)]; + pairInfo.dirCounts = { + 'north': 0, + 'west': 0, + 'south': 0, + 'east': 0, + 'northwest': 0, + 'southwest': 0, + 'northeast': 0, + 'southeast': 0 + }; + for (var _i2 = 0; _i2 < pairInfo.eles.length; _i2++) { + var _edge = pairInfo.eles[_i2]; + var rs = _edge[0]._private.rscratch; + var _curveStyle = _edge.pstyle('curve-style').value; + var _edgeIsUnbundled = _curveStyle === 'unbundled-bezier' || _curveStyle === 'segments' || _curveStyle === 'taxi'; + + // whether the normalised pair order is the reverse of the edge's src-tgt order + var edgeIsSwapped = !src.same(_edge.source()); + if (!pairInfo.calculatedIntersection && src !== tgt && (pairInfo.hasBezier || pairInfo.hasUnbundled)) { + pairInfo.calculatedIntersection = true; + + // pt outside src shape to calc distance/displacement from src to tgt + var srcOutside = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, tgtPos.x, tgtPos.y, 0); + var srcIntn = pairInfo.srcIntn = srcOutside; + + // pt outside tgt shape to calc distance/displacement from src to tgt + var tgtOutside = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, srcPos.x, srcPos.y, 0); + var tgtIntn = pairInfo.tgtIntn = tgtOutside; + var intersectionPts = pairInfo.intersectionPts = { + x1: srcOutside[0], + x2: tgtOutside[0], + y1: srcOutside[1], + y2: tgtOutside[1] + }; + var posPts = pairInfo.posPts = { + x1: srcPos.x, + x2: tgtPos.x, + y1: srcPos.y, + y2: tgtPos.y + }; + var dy = tgtOutside[1] - srcOutside[1]; + var dx = tgtOutside[0] - srcOutside[0]; + var l = Math.sqrt(dx * dx + dy * dy); + var vector = pairInfo.vector = { + x: dx, + y: dy + }; + var vectorNorm = pairInfo.vectorNorm = { + x: vector.x / l, + y: vector.y / l + }; + var vectorNormInverse = { + x: -vectorNorm.y, + y: vectorNorm.x + }; + + // if node shapes overlap, then no ctrl pts to draw + pairInfo.nodesOverlap = !number$1(l) || tgtShape.checkPoint(srcOutside[0], srcOutside[1], 0, tgtW, tgtH, tgtPos.x, tgtPos.y) || srcShape.checkPoint(tgtOutside[0], tgtOutside[1], 0, srcW, srcH, srcPos.x, srcPos.y); + pairInfo.vectorNormInverse = vectorNormInverse; + swappedpairInfo = { + nodesOverlap: pairInfo.nodesOverlap, + dirCounts: pairInfo.dirCounts, + calculatedIntersection: true, + hasBezier: pairInfo.hasBezier, + hasUnbundled: pairInfo.hasUnbundled, + eles: pairInfo.eles, + srcPos: tgtPos, + tgtPos: srcPos, + srcW: tgtW, + srcH: tgtH, + tgtW: srcW, + tgtH: srcH, + srcIntn: tgtIntn, + tgtIntn: srcIntn, + srcShape: tgtShape, + tgtShape: srcShape, + posPts: { + x1: posPts.x2, + y1: posPts.y2, + x2: posPts.x1, + y2: posPts.y1 + }, + intersectionPts: { + x1: intersectionPts.x2, + y1: intersectionPts.y2, + x2: intersectionPts.x1, + y2: intersectionPts.y1 + }, + vector: { + x: -vector.x, + y: -vector.y + }, + vectorNorm: { + x: -vectorNorm.x, + y: -vectorNorm.y + }, + vectorNormInverse: { + x: -vectorNormInverse.x, + y: -vectorNormInverse.y + } + }; + } + var passedPairInfo = edgeIsSwapped ? swappedpairInfo : pairInfo; + rs.nodesOverlap = passedPairInfo.nodesOverlap; + rs.srcIntn = passedPairInfo.srcIntn; + rs.tgtIntn = passedPairInfo.tgtIntn; + if (hasCompounds && (src.isParent() || src.isChild() || tgt.isParent() || tgt.isChild()) && (src.parents().anySame(tgt) || tgt.parents().anySame(src) || src.same(tgt) && src.isParent())) { + _this.findCompoundLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); + } else if (src === tgt) { + _this.findLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); + } else if (_curveStyle === 'segments') { + _this.findSegmentsPoints(_edge, passedPairInfo); + } else if (_curveStyle === 'taxi') { + _this.findTaxiPoints(_edge, passedPairInfo); + } else if (_curveStyle === 'straight' || !_edgeIsUnbundled && pairInfo.eles.length % 2 === 1 && _i2 === Math.floor(pairInfo.eles.length / 2)) { + _this.findStraightEdgePoints(_edge); + } else { + _this.findBezierPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled, edgeIsSwapped); + } + _this.findEndpoints(_edge); + _this.tryToCorrectInvalidPoints(_edge, passedPairInfo); + _this.checkForInvalidEdgeWarning(_edge); + _this.storeAllpts(_edge); + _this.storeEdgeProjections(_edge); + _this.calculateArrowAngles(_edge); + _this.recalculateEdgeLabelProjections(_edge); + _this.calculateLabelAngles(_edge); + } // for pair edges + }; + for (var p = 0; p < pairIds.length; p++) { + _loop(p); + } // for pair ids + + // haystacks avoid the expense of pairInfo stuff (intersections etc.) + this.findHaystackPoints(haystackEdges); + }; + function getPts(pts) { + var retPts = []; + if (pts == null) { + return; + } + for (var i = 0; i < pts.length; i += 2) { + var x = pts[i]; + var y = pts[i + 1]; + retPts.push({ + x: x, + y: y + }); + } + return retPts; + } + BRp$c.getSegmentPoints = function (edge) { + var rs = edge[0]._private.rscratch; + var type = rs.edgeType; + if (type === 'segments') { + this.recalculateRenderedStyle(edge); + return getPts(rs.segpts); + } + }; + BRp$c.getControlPoints = function (edge) { + var rs = edge[0]._private.rscratch; + var type = rs.edgeType; + if (type === 'bezier' || type === 'multibezier' || type === 'self' || type === 'compound') { + this.recalculateRenderedStyle(edge); + return getPts(rs.ctrlpts); + } + }; + BRp$c.getEdgeMidpoint = function (edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + return { + x: rs.midX, + y: rs.midY + }; + }; + + var BRp$b = {}; + BRp$b.manualEndptToPx = function (node, prop) { + var r = this; + var npos = node.position(); + var w = node.outerWidth(); + var h = node.outerHeight(); + if (prop.value.length === 2) { + var p = [prop.pfValue[0], prop.pfValue[1]]; + if (prop.units[0] === '%') { + p[0] = p[0] * w; + } + if (prop.units[1] === '%') { + p[1] = p[1] * h; + } + p[0] += npos.x; + p[1] += npos.y; + return p; + } else { + var angle = prop.pfValue[0]; + angle = -Math.PI / 2 + angle; // start at 12 o'clock + + var l = 2 * Math.max(w, h); + var _p = [npos.x + Math.cos(angle) * l, npos.y + Math.sin(angle) * l]; + return r.nodeShapes[this.getNodeShape(node)].intersectLine(npos.x, npos.y, w, h, _p[0], _p[1], 0); + } + }; + BRp$b.findEndpoints = function (edge) { + var r = this; + var intersect; + var source = edge.source()[0]; + var target = edge.target()[0]; + var srcPos = source.position(); + var tgtPos = target.position(); + var tgtArShape = edge.pstyle('target-arrow-shape').value; + var srcArShape = edge.pstyle('source-arrow-shape').value; + var tgtDist = edge.pstyle('target-distance-from-node').pfValue; + var srcDist = edge.pstyle('source-distance-from-node').pfValue; + var curveStyle = edge.pstyle('curve-style').value; + var rs = edge._private.rscratch; + var et = rs.edgeType; + var taxi = curveStyle === 'taxi'; + var self = et === 'self' || et === 'compound'; + var bezier = et === 'bezier' || et === 'multibezier' || self; + var multi = et !== 'bezier'; + var lines = et === 'straight' || et === 'segments'; + var segments = et === 'segments'; + var hasEndpts = bezier || multi || lines; + var overrideEndpts = self || taxi; + var srcManEndpt = edge.pstyle('source-endpoint'); + var srcManEndptVal = overrideEndpts ? 'outside-to-node' : srcManEndpt.value; + var tgtManEndpt = edge.pstyle('target-endpoint'); + var tgtManEndptVal = overrideEndpts ? 'outside-to-node' : tgtManEndpt.value; + rs.srcManEndpt = srcManEndpt; + rs.tgtManEndpt = tgtManEndpt; + var p1; // last known point of edge on target side + var p2; // last known point of edge on source side + + var p1_i; // point to intersect with target shape + var p2_i; // point to intersect with source shape + + if (bezier) { + var cpStart = [rs.ctrlpts[0], rs.ctrlpts[1]]; + var cpEnd = multi ? [rs.ctrlpts[rs.ctrlpts.length - 2], rs.ctrlpts[rs.ctrlpts.length - 1]] : cpStart; + p1 = cpEnd; + p2 = cpStart; + } else if (lines) { + var srcArrowFromPt = !segments ? [tgtPos.x, tgtPos.y] : rs.segpts.slice(0, 2); + var tgtArrowFromPt = !segments ? [srcPos.x, srcPos.y] : rs.segpts.slice(rs.segpts.length - 2); + p1 = tgtArrowFromPt; + p2 = srcArrowFromPt; + } + if (tgtManEndptVal === 'inside-to-node') { + intersect = [tgtPos.x, tgtPos.y]; + } else if (tgtManEndpt.units) { + intersect = this.manualEndptToPx(target, tgtManEndpt); + } else if (tgtManEndptVal === 'outside-to-line') { + intersect = rs.tgtIntn; // use cached value from ctrlpt calc + } else { + if (tgtManEndptVal === 'outside-to-node' || tgtManEndptVal === 'outside-to-node-or-label') { + p1_i = p1; + } else if (tgtManEndptVal === 'outside-to-line' || tgtManEndptVal === 'outside-to-line-or-label') { + p1_i = [srcPos.x, srcPos.y]; + } + intersect = r.nodeShapes[this.getNodeShape(target)].intersectLine(tgtPos.x, tgtPos.y, target.outerWidth(), target.outerHeight(), p1_i[0], p1_i[1], 0); + if (tgtManEndptVal === 'outside-to-node-or-label' || tgtManEndptVal === 'outside-to-line-or-label') { + var trs = target._private.rscratch; + var lw = trs.labelWidth; + var lh = trs.labelHeight; + var lx = trs.labelX; + var ly = trs.labelY; + var lw2 = lw / 2; + var lh2 = lh / 2; + var va = target.pstyle('text-valign').value; + if (va === 'top') { + ly -= lh2; + } else if (va === 'bottom') { + ly += lh2; + } + var ha = target.pstyle('text-halign').value; + if (ha === 'left') { + lx -= lw2; + } else if (ha === 'right') { + lx += lw2; + } + var labelIntersect = polygonIntersectLine(p1_i[0], p1_i[1], [lx - lw2, ly - lh2, lx + lw2, ly - lh2, lx + lw2, ly + lh2, lx - lw2, ly + lh2], tgtPos.x, tgtPos.y); + if (labelIntersect.length > 0) { + var refPt = srcPos; + var intSqdist = sqdist(refPt, array2point(intersect)); + var labIntSqdist = sqdist(refPt, array2point(labelIntersect)); + var minSqDist = intSqdist; + if (labIntSqdist < intSqdist) { + intersect = labelIntersect; + minSqDist = labIntSqdist; + } + if (labelIntersect.length > 2) { + var labInt2SqDist = sqdist(refPt, { + x: labelIntersect[2], + y: labelIntersect[3] + }); + if (labInt2SqDist < minSqDist) { + intersect = [labelIntersect[2], labelIntersect[3]]; + } + } + } + } + } + var arrowEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].spacing(edge) + tgtDist); + var edgeEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].gap(edge) + tgtDist); + rs.endX = edgeEnd[0]; + rs.endY = edgeEnd[1]; + rs.arrowEndX = arrowEnd[0]; + rs.arrowEndY = arrowEnd[1]; + if (srcManEndptVal === 'inside-to-node') { + intersect = [srcPos.x, srcPos.y]; + } else if (srcManEndpt.units) { + intersect = this.manualEndptToPx(source, srcManEndpt); + } else if (srcManEndptVal === 'outside-to-line') { + intersect = rs.srcIntn; // use cached value from ctrlpt calc + } else { + if (srcManEndptVal === 'outside-to-node' || srcManEndptVal === 'outside-to-node-or-label') { + p2_i = p2; + } else if (srcManEndptVal === 'outside-to-line' || srcManEndptVal === 'outside-to-line-or-label') { + p2_i = [tgtPos.x, tgtPos.y]; + } + intersect = r.nodeShapes[this.getNodeShape(source)].intersectLine(srcPos.x, srcPos.y, source.outerWidth(), source.outerHeight(), p2_i[0], p2_i[1], 0); + if (srcManEndptVal === 'outside-to-node-or-label' || srcManEndptVal === 'outside-to-line-or-label') { + var srs = source._private.rscratch; + var _lw = srs.labelWidth; + var _lh = srs.labelHeight; + var _lx = srs.labelX; + var _ly = srs.labelY; + var _lw2 = _lw / 2; + var _lh2 = _lh / 2; + var _va = source.pstyle('text-valign').value; + if (_va === 'top') { + _ly -= _lh2; + } else if (_va === 'bottom') { + _ly += _lh2; + } + var _ha = source.pstyle('text-halign').value; + if (_ha === 'left') { + _lx -= _lw2; + } else if (_ha === 'right') { + _lx += _lw2; + } + var _labelIntersect = polygonIntersectLine(p2_i[0], p2_i[1], [_lx - _lw2, _ly - _lh2, _lx + _lw2, _ly - _lh2, _lx + _lw2, _ly + _lh2, _lx - _lw2, _ly + _lh2], srcPos.x, srcPos.y); + if (_labelIntersect.length > 0) { + var _refPt = tgtPos; + var _intSqdist = sqdist(_refPt, array2point(intersect)); + var _labIntSqdist = sqdist(_refPt, array2point(_labelIntersect)); + var _minSqDist = _intSqdist; + if (_labIntSqdist < _intSqdist) { + intersect = [_labelIntersect[0], _labelIntersect[1]]; + _minSqDist = _labIntSqdist; + } + if (_labelIntersect.length > 2) { + var _labInt2SqDist = sqdist(_refPt, { + x: _labelIntersect[2], + y: _labelIntersect[3] + }); + if (_labInt2SqDist < _minSqDist) { + intersect = [_labelIntersect[2], _labelIntersect[3]]; + } + } + } + } + } + var arrowStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].spacing(edge) + srcDist); + var edgeStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].gap(edge) + srcDist); + rs.startX = edgeStart[0]; + rs.startY = edgeStart[1]; + rs.arrowStartX = arrowStart[0]; + rs.arrowStartY = arrowStart[1]; + if (hasEndpts) { + if (!number$1(rs.startX) || !number$1(rs.startY) || !number$1(rs.endX) || !number$1(rs.endY)) { + rs.badLine = true; + } else { + rs.badLine = false; + } + } + }; + BRp$b.getSourceEndpoint = function (edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + switch (rs.edgeType) { + case 'haystack': + return { + x: rs.haystackPts[0], + y: rs.haystackPts[1] + }; + default: + return { + x: rs.arrowStartX, + y: rs.arrowStartY + }; + } + }; + BRp$b.getTargetEndpoint = function (edge) { + var rs = edge[0]._private.rscratch; + this.recalculateRenderedStyle(edge); + switch (rs.edgeType) { + case 'haystack': + return { + x: rs.haystackPts[2], + y: rs.haystackPts[3] + }; + default: + return { + x: rs.arrowEndX, + y: rs.arrowEndY + }; + } + }; + + var BRp$a = {}; + function pushBezierPts(r, edge, pts) { + var qbezierAt$1 = function qbezierAt$1(p1, p2, p3, t) { + return qbezierAt(p1, p2, p3, t); + }; + var _p = edge._private; + var bpts = _p.rstyle.bezierPts; + for (var i = 0; i < r.bezierProjPcts.length; i++) { + var p = r.bezierProjPcts[i]; + bpts.push({ + x: qbezierAt$1(pts[0], pts[2], pts[4], p), + y: qbezierAt$1(pts[1], pts[3], pts[5], p) + }); + } + } + BRp$a.storeEdgeProjections = function (edge) { + var _p = edge._private; + var rs = _p.rscratch; + var et = rs.edgeType; + + // clear the cached points state + _p.rstyle.bezierPts = null; + _p.rstyle.linePts = null; + _p.rstyle.haystackPts = null; + if (et === 'multibezier' || et === 'bezier' || et === 'self' || et === 'compound') { + _p.rstyle.bezierPts = []; + for (var i = 0; i + 5 < rs.allpts.length; i += 4) { + pushBezierPts(this, edge, rs.allpts.slice(i, i + 6)); + } + } else if (et === 'segments') { + var lpts = _p.rstyle.linePts = []; + for (var i = 0; i + 1 < rs.allpts.length; i += 2) { + lpts.push({ + x: rs.allpts[i], + y: rs.allpts[i + 1] + }); + } + } else if (et === 'haystack') { + var hpts = rs.haystackPts; + _p.rstyle.haystackPts = [{ + x: hpts[0], + y: hpts[1] + }, { + x: hpts[2], + y: hpts[3] + }]; + } + _p.rstyle.arrowWidth = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth; + }; + BRp$a.recalculateEdgeProjections = function (edges) { + this.findEdgeControlPoints(edges); + }; + + /* global document */ + + var BRp$9 = {}; + BRp$9.recalculateNodeLabelProjection = function (node) { + var content = node.pstyle('label').strValue; + if (emptyString(content)) { + return; + } + var textX, textY; + var _p = node._private; + var nodeWidth = node.width(); + var nodeHeight = node.height(); + var padding = node.padding(); + var nodePos = node.position(); + var textHalign = node.pstyle('text-halign').strValue; + var textValign = node.pstyle('text-valign').strValue; + var rs = _p.rscratch; + var rstyle = _p.rstyle; + switch (textHalign) { + case 'left': + textX = nodePos.x - nodeWidth / 2 - padding; + break; + case 'right': + textX = nodePos.x + nodeWidth / 2 + padding; + break; + default: + // e.g. center + textX = nodePos.x; + } + switch (textValign) { + case 'top': + textY = nodePos.y - nodeHeight / 2 - padding; + break; + case 'bottom': + textY = nodePos.y + nodeHeight / 2 + padding; + break; + default: + // e.g. middle + textY = nodePos.y; + } + rs.labelX = textX; + rs.labelY = textY; + rstyle.labelX = textX; + rstyle.labelY = textY; + this.calculateLabelAngles(node); + this.applyLabelDimensions(node); + }; + var lineAngleFromDelta = function lineAngleFromDelta(dx, dy) { + var angle = Math.atan(dy / dx); + if (dx === 0 && angle < 0) { + angle = angle * -1; + } + return angle; + }; + var lineAngle = function lineAngle(p0, p1) { + var dx = p1.x - p0.x; + var dy = p1.y - p0.y; + return lineAngleFromDelta(dx, dy); + }; + var bezierAngle = function bezierAngle(p0, p1, p2, t) { + var t0 = bound(0, t - 0.001, 1); + var t1 = bound(0, t + 0.001, 1); + var lp0 = qbezierPtAt(p0, p1, p2, t0); + var lp1 = qbezierPtAt(p0, p1, p2, t1); + return lineAngle(lp0, lp1); + }; + BRp$9.recalculateEdgeLabelProjections = function (edge) { + var p; + var _p = edge._private; + var rs = _p.rscratch; + var r = this; + var content = { + mid: edge.pstyle('label').strValue, + source: edge.pstyle('source-label').strValue, + target: edge.pstyle('target-label').strValue + }; + if (content.mid || content.source || content.target) ; else { + return; // no labels => no calcs + } + + // add center point to style so bounding box calculations can use it + // + p = { + x: rs.midX, + y: rs.midY + }; + var setRs = function setRs(propName, prefix, value) { + setPrefixedProperty(_p.rscratch, propName, prefix, value); + setPrefixedProperty(_p.rstyle, propName, prefix, value); + }; + setRs('labelX', null, p.x); + setRs('labelY', null, p.y); + var midAngle = lineAngleFromDelta(rs.midDispX, rs.midDispY); + setRs('labelAutoAngle', null, midAngle); + var createControlPointInfo = function createControlPointInfo() { + if (createControlPointInfo.cache) { + return createControlPointInfo.cache; + } // use cache so only 1x per edge + + var ctrlpts = []; + + // store each ctrlpt info init + for (var i = 0; i + 5 < rs.allpts.length; i += 4) { + var p0 = { + x: rs.allpts[i], + y: rs.allpts[i + 1] + }; + var p1 = { + x: rs.allpts[i + 2], + y: rs.allpts[i + 3] + }; // ctrlpt + var p2 = { + x: rs.allpts[i + 4], + y: rs.allpts[i + 5] + }; + ctrlpts.push({ + p0: p0, + p1: p1, + p2: p2, + startDist: 0, + length: 0, + segments: [] + }); + } + var bpts = _p.rstyle.bezierPts; + var nProjs = r.bezierProjPcts.length; + function addSegment(cp, p0, p1, t0, t1) { + var length = dist(p0, p1); + var prevSegment = cp.segments[cp.segments.length - 1]; + var segment = { + p0: p0, + p1: p1, + t0: t0, + t1: t1, + startDist: prevSegment ? prevSegment.startDist + prevSegment.length : 0, + length: length + }; + cp.segments.push(segment); + cp.length += length; + } + + // update each ctrlpt with segment info + for (var _i = 0; _i < ctrlpts.length; _i++) { + var cp = ctrlpts[_i]; + var prevCp = ctrlpts[_i - 1]; + if (prevCp) { + cp.startDist = prevCp.startDist + prevCp.length; + } + addSegment(cp, cp.p0, bpts[_i * nProjs], 0, r.bezierProjPcts[0]); // first + + for (var j = 0; j < nProjs - 1; j++) { + addSegment(cp, bpts[_i * nProjs + j], bpts[_i * nProjs + j + 1], r.bezierProjPcts[j], r.bezierProjPcts[j + 1]); + } + addSegment(cp, bpts[_i * nProjs + nProjs - 1], cp.p2, r.bezierProjPcts[nProjs - 1], 1); // last + } + + return createControlPointInfo.cache = ctrlpts; + }; + var calculateEndProjection = function calculateEndProjection(prefix) { + var angle; + var isSrc = prefix === 'source'; + if (!content[prefix]) { + return; + } + var offset = edge.pstyle(prefix + '-text-offset').pfValue; + switch (rs.edgeType) { + case 'self': + case 'compound': + case 'bezier': + case 'multibezier': + { + var cps = createControlPointInfo(); + var selected; + var startDist = 0; + var totalDist = 0; + + // find the segment we're on + for (var i = 0; i < cps.length; i++) { + var _cp = cps[isSrc ? i : cps.length - 1 - i]; + for (var j = 0; j < _cp.segments.length; j++) { + var _seg = _cp.segments[isSrc ? j : _cp.segments.length - 1 - j]; + var lastSeg = i === cps.length - 1 && j === _cp.segments.length - 1; + startDist = totalDist; + totalDist += _seg.length; + if (totalDist >= offset || lastSeg) { + selected = { + cp: _cp, + segment: _seg + }; + break; + } + } + if (selected) { + break; + } + } + var cp = selected.cp; + var seg = selected.segment; + var tSegment = (offset - startDist) / seg.length; + var segDt = seg.t1 - seg.t0; + var t = isSrc ? seg.t0 + segDt * tSegment : seg.t1 - segDt * tSegment; + t = bound(0, t, 1); + p = qbezierPtAt(cp.p0, cp.p1, cp.p2, t); + angle = bezierAngle(cp.p0, cp.p1, cp.p2, t); + break; + } + case 'straight': + case 'segments': + case 'haystack': + { + var d = 0, + di, + d0; + var p0, p1; + var l = rs.allpts.length; + for (var _i2 = 0; _i2 + 3 < l; _i2 += 2) { + if (isSrc) { + p0 = { + x: rs.allpts[_i2], + y: rs.allpts[_i2 + 1] + }; + p1 = { + x: rs.allpts[_i2 + 2], + y: rs.allpts[_i2 + 3] + }; + } else { + p0 = { + x: rs.allpts[l - 2 - _i2], + y: rs.allpts[l - 1 - _i2] + }; + p1 = { + x: rs.allpts[l - 4 - _i2], + y: rs.allpts[l - 3 - _i2] + }; + } + di = dist(p0, p1); + d0 = d; + d += di; + if (d >= offset) { + break; + } + } + var pD = offset - d0; + var _t = pD / di; + _t = bound(0, _t, 1); + p = lineAt(p0, p1, _t); + angle = lineAngle(p0, p1); + break; + } + } + setRs('labelX', prefix, p.x); + setRs('labelY', prefix, p.y); + setRs('labelAutoAngle', prefix, angle); + }; + calculateEndProjection('source'); + calculateEndProjection('target'); + this.applyLabelDimensions(edge); + }; + BRp$9.applyLabelDimensions = function (ele) { + this.applyPrefixedLabelDimensions(ele); + if (ele.isEdge()) { + this.applyPrefixedLabelDimensions(ele, 'source'); + this.applyPrefixedLabelDimensions(ele, 'target'); + } + }; + BRp$9.applyPrefixedLabelDimensions = function (ele, prefix) { + var _p = ele._private; + var text = this.getLabelText(ele, prefix); + var labelDims = this.calculateLabelDimensions(ele, text); + var lineHeight = ele.pstyle('line-height').pfValue; + var textWrap = ele.pstyle('text-wrap').strValue; + var lines = getPrefixedProperty(_p.rscratch, 'labelWrapCachedLines', prefix) || []; + var numLines = textWrap !== 'wrap' ? 1 : Math.max(lines.length, 1); + var normPerLineHeight = labelDims.height / numLines; + var labelLineHeight = normPerLineHeight * lineHeight; + var width = labelDims.width; + var height = labelDims.height + (numLines - 1) * (lineHeight - 1) * normPerLineHeight; + setPrefixedProperty(_p.rstyle, 'labelWidth', prefix, width); + setPrefixedProperty(_p.rscratch, 'labelWidth', prefix, width); + setPrefixedProperty(_p.rstyle, 'labelHeight', prefix, height); + setPrefixedProperty(_p.rscratch, 'labelHeight', prefix, height); + setPrefixedProperty(_p.rscratch, 'labelLineHeight', prefix, labelLineHeight); + }; + BRp$9.getLabelText = function (ele, prefix) { + var _p = ele._private; + var pfd = prefix ? prefix + '-' : ''; + var text = ele.pstyle(pfd + 'label').strValue; + var textTransform = ele.pstyle('text-transform').value; + var rscratch = function rscratch(propName, value) { + if (value) { + setPrefixedProperty(_p.rscratch, propName, prefix, value); + return value; + } else { + return getPrefixedProperty(_p.rscratch, propName, prefix); + } + }; + + // for empty text, skip all processing + if (!text) { + return ''; + } + if (textTransform == 'none') ; else if (textTransform == 'uppercase') { + text = text.toUpperCase(); + } else if (textTransform == 'lowercase') { + text = text.toLowerCase(); + } + var wrapStyle = ele.pstyle('text-wrap').value; + if (wrapStyle === 'wrap') { + var labelKey = rscratch('labelKey'); + + // save recalc if the label is the same as before + if (labelKey != null && rscratch('labelWrapKey') === labelKey) { + return rscratch('labelWrapCachedText'); + } + var zwsp = "\u200B"; + var lines = text.split('\n'); + var maxW = ele.pstyle('text-max-width').pfValue; + var overflow = ele.pstyle('text-overflow-wrap').value; + var overflowAny = overflow === 'anywhere'; + var wrappedLines = []; + var wordsRegex = /[\s\u200b]+/; + var wordSeparator = overflowAny ? '' : ' '; + for (var l = 0; l < lines.length; l++) { + var line = lines[l]; + var lineDims = this.calculateLabelDimensions(ele, line); + var lineW = lineDims.width; + if (overflowAny) { + var processedLine = line.split('').join(zwsp); + line = processedLine; + } + if (lineW > maxW) { + // line is too long + var words = line.split(wordsRegex); + var subline = ''; + for (var w = 0; w < words.length; w++) { + var word = words[w]; + var testLine = subline.length === 0 ? word : subline + wordSeparator + word; + var testDims = this.calculateLabelDimensions(ele, testLine); + var testW = testDims.width; + if (testW <= maxW) { + // word fits on current line + subline += word + wordSeparator; + } else { + // word starts new line + if (subline) { + wrappedLines.push(subline); + } + subline = word + wordSeparator; + } + } + + // if there's remaining text, put it in a wrapped line + if (!subline.match(/^[\s\u200b]+$/)) { + wrappedLines.push(subline); + } + } else { + // line is already short enough + wrappedLines.push(line); + } + } // for + + rscratch('labelWrapCachedLines', wrappedLines); + text = rscratch('labelWrapCachedText', wrappedLines.join('\n')); + rscratch('labelWrapKey', labelKey); + } else if (wrapStyle === 'ellipsis') { + var _maxW = ele.pstyle('text-max-width').pfValue; + var ellipsized = ''; + var ellipsis = "\u2026"; + var incLastCh = false; + if (this.calculateLabelDimensions(ele, text).width < _maxW) { + // the label already fits + return text; + } + for (var i = 0; i < text.length; i++) { + var widthWithNextCh = this.calculateLabelDimensions(ele, ellipsized + text[i] + ellipsis).width; + if (widthWithNextCh > _maxW) { + break; + } + ellipsized += text[i]; + if (i === text.length - 1) { + incLastCh = true; + } + } + if (!incLastCh) { + ellipsized += ellipsis; + } + return ellipsized; + } // if ellipsize + + return text; + }; + BRp$9.getLabelJustification = function (ele) { + var justification = ele.pstyle('text-justification').strValue; + var textHalign = ele.pstyle('text-halign').strValue; + if (justification === 'auto') { + if (ele.isNode()) { + switch (textHalign) { + case 'left': + return 'right'; + case 'right': + return 'left'; + default: + return 'center'; + } + } else { + return 'center'; + } + } else { + return justification; + } + }; + BRp$9.calculateLabelDimensions = function (ele, text) { + var r = this; + var cacheKey = hashString(text, ele._private.labelDimsKey); + var cache = r.labelDimCache || (r.labelDimCache = []); + var existingVal = cache[cacheKey]; + if (existingVal != null) { + return existingVal; + } + var padding = 0; // add padding around text dims, as the measurement isn't that accurate + var fStyle = ele.pstyle('font-style').strValue; + var size = ele.pstyle('font-size').pfValue; + var family = ele.pstyle('font-family').strValue; + var weight = ele.pstyle('font-weight').strValue; + var canvas = this.labelCalcCanvas; + var c2d = this.labelCalcCanvasContext; + if (!canvas) { + canvas = this.labelCalcCanvas = document.createElement('canvas'); + c2d = this.labelCalcCanvasContext = canvas.getContext('2d'); + var ds = canvas.style; + ds.position = 'absolute'; + ds.left = '-9999px'; + ds.top = '-9999px'; + ds.zIndex = '-1'; + ds.visibility = 'hidden'; + ds.pointerEvents = 'none'; + } + c2d.font = "".concat(fStyle, " ").concat(weight, " ").concat(size, "px ").concat(family); + var width = 0; + var height = 0; + var lines = text.split('\n'); + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + var metrics = c2d.measureText(line); + var w = Math.ceil(metrics.width); + var h = size; + width = Math.max(w, width); + height += h; + } + width += padding; + height += padding; + return cache[cacheKey] = { + width: width, + height: height + }; + }; + BRp$9.calculateLabelAngle = function (ele, prefix) { + var _p = ele._private; + var rs = _p.rscratch; + var isEdge = ele.isEdge(); + var prefixDash = prefix ? prefix + '-' : ''; + var rot = ele.pstyle(prefixDash + 'text-rotation'); + var rotStr = rot.strValue; + if (rotStr === 'none') { + return 0; + } else if (isEdge && rotStr === 'autorotate') { + return rs.labelAutoAngle; + } else if (rotStr === 'autorotate') { + return 0; + } else { + return rot.pfValue; + } + }; + BRp$9.calculateLabelAngles = function (ele) { + var r = this; + var isEdge = ele.isEdge(); + var _p = ele._private; + var rs = _p.rscratch; + rs.labelAngle = r.calculateLabelAngle(ele); + if (isEdge) { + rs.sourceLabelAngle = r.calculateLabelAngle(ele, 'source'); + rs.targetLabelAngle = r.calculateLabelAngle(ele, 'target'); + } + }; + + var BRp$8 = {}; + var TOO_SMALL_CUT_RECT = 28; + var warnedCutRect = false; + BRp$8.getNodeShape = function (node) { + var r = this; + var shape = node.pstyle('shape').value; + if (shape === 'cutrectangle' && (node.width() < TOO_SMALL_CUT_RECT || node.height() < TOO_SMALL_CUT_RECT)) { + if (!warnedCutRect) { + warn('The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead'); + warnedCutRect = true; + } + return 'rectangle'; + } + if (node.isParent()) { + if (shape === 'rectangle' || shape === 'roundrectangle' || shape === 'round-rectangle' || shape === 'cutrectangle' || shape === 'cut-rectangle' || shape === 'barrel') { + return shape; + } else { + return 'rectangle'; + } + } + if (shape === 'polygon') { + var points = node.pstyle('shape-polygon-points').value; + return r.nodeShapes.makePolygon(points).name; + } + return shape; + }; + + var BRp$7 = {}; + BRp$7.registerCalculationListeners = function () { + var cy = this.cy; + var elesToUpdate = cy.collection(); + var r = this; + var enqueue = function enqueue(eles) { + var dirtyStyleCaches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + elesToUpdate.merge(eles); + if (dirtyStyleCaches) { + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _p = ele._private; + var rstyle = _p.rstyle; + rstyle.clean = false; + rstyle.cleanConnected = false; + } + } + }; + r.binder(cy).on('bounds.* dirty.*', function onDirtyBounds(e) { + var ele = e.target; + enqueue(ele); + }).on('style.* background.*', function onDirtyStyle(e) { + var ele = e.target; + enqueue(ele, false); + }); + var updateEleCalcs = function updateEleCalcs(willDraw) { + if (willDraw) { + var fns = r.onUpdateEleCalcsFns; + + // because we need to have up-to-date style (e.g. stylesheet mappers) + // before calculating rendered style (and pstyle might not be called yet) + elesToUpdate.cleanStyle(); + for (var i = 0; i < elesToUpdate.length; i++) { + var ele = elesToUpdate[i]; + var rstyle = ele._private.rstyle; + if (ele.isNode() && !rstyle.cleanConnected) { + enqueue(ele.connectedEdges()); + rstyle.cleanConnected = true; + } + } + if (fns) { + for (var _i = 0; _i < fns.length; _i++) { + var fn = fns[_i]; + fn(willDraw, elesToUpdate); + } + } + r.recalculateRenderedStyle(elesToUpdate); + elesToUpdate = cy.collection(); + } + }; + r.flushRenderedStyleQueue = function () { + updateEleCalcs(true); + }; + r.beforeRender(updateEleCalcs, r.beforeRenderPriorities.eleCalcs); + }; + BRp$7.onUpdateEleCalcs = function (fn) { + var fns = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; + fns.push(fn); + }; + BRp$7.recalculateRenderedStyle = function (eles, useCache) { + var isCleanConnected = function isCleanConnected(ele) { + return ele._private.rstyle.cleanConnected; + }; + var edges = []; + var nodes = []; + + // the renderer can't be used for calcs when destroyed, e.g. ele.boundingBox() + if (this.destroyed) { + return; + } + + // use cache by default for perf + if (useCache === undefined) { + useCache = true; + } + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var _p = ele._private; + var rstyle = _p.rstyle; + + // an edge may be implicitly dirty b/c of one of its connected nodes + // (and a request for recalc may come in between frames) + if (ele.isEdge() && (!isCleanConnected(ele.source()) || !isCleanConnected(ele.target()))) { + rstyle.clean = false; + } + + // only update if dirty and in graph + if (useCache && rstyle.clean || ele.removed()) { + continue; + } + + // only update if not display: none + if (ele.pstyle('display').value === 'none') { + continue; + } + if (_p.group === 'nodes') { + nodes.push(ele); + } else { + // edges + edges.push(ele); + } + rstyle.clean = true; + } + + // update node data from projections + for (var _i2 = 0; _i2 < nodes.length; _i2++) { + var _ele = nodes[_i2]; + var _p2 = _ele._private; + var _rstyle = _p2.rstyle; + var pos = _ele.position(); + this.recalculateNodeLabelProjection(_ele); + _rstyle.nodeX = pos.x; + _rstyle.nodeY = pos.y; + _rstyle.nodeW = _ele.pstyle('width').pfValue; + _rstyle.nodeH = _ele.pstyle('height').pfValue; + } + this.recalculateEdgeProjections(edges); + + // update edge data from projections + for (var _i3 = 0; _i3 < edges.length; _i3++) { + var _ele2 = edges[_i3]; + var _p3 = _ele2._private; + var _rstyle2 = _p3.rstyle; + var rs = _p3.rscratch; + + // update rstyle positions + _rstyle2.srcX = rs.arrowStartX; + _rstyle2.srcY = rs.arrowStartY; + _rstyle2.tgtX = rs.arrowEndX; + _rstyle2.tgtY = rs.arrowEndY; + _rstyle2.midX = rs.midX; + _rstyle2.midY = rs.midY; + _rstyle2.labelAngle = rs.labelAngle; + _rstyle2.sourceLabelAngle = rs.sourceLabelAngle; + _rstyle2.targetLabelAngle = rs.targetLabelAngle; + } + }; + + var BRp$6 = {}; + BRp$6.updateCachedGrabbedEles = function () { + var eles = this.cachedZSortedEles; + if (!eles) { + // just let this be recalculated on the next z sort tick + return; + } + eles.drag = []; + eles.nondrag = []; + var grabTargets = []; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var rs = ele._private.rscratch; + if (ele.grabbed() && !ele.isParent()) { + grabTargets.push(ele); + } else if (rs.inDragLayer) { + eles.drag.push(ele); + } else { + eles.nondrag.push(ele); + } + } + + // put the grab target nodes last so it's on top of its neighbourhood + for (var i = 0; i < grabTargets.length; i++) { + var ele = grabTargets[i]; + eles.drag.push(ele); + } + }; + BRp$6.invalidateCachedZSortedEles = function () { + this.cachedZSortedEles = null; + }; + BRp$6.getCachedZSortedEles = function (forceRecalc) { + if (forceRecalc || !this.cachedZSortedEles) { + var eles = this.cy.mutableElements().toArray(); + eles.sort(zIndexSort); + eles.interactive = eles.filter(function (ele) { + return ele.interactive(); + }); + this.cachedZSortedEles = eles; + this.updateCachedGrabbedEles(); + } else { + eles = this.cachedZSortedEles; + } + return eles; + }; + + var BRp$5 = {}; + [BRp$e, BRp$d, BRp$c, BRp$b, BRp$a, BRp$9, BRp$8, BRp$7, BRp$6].forEach(function (props) { + extend(BRp$5, props); + }); + + var BRp$4 = {}; + BRp$4.getCachedImage = function (url, crossOrigin, onLoad) { + var r = this; + var imageCache = r.imageCache = r.imageCache || {}; + var cache = imageCache[url]; + if (cache) { + if (!cache.image.complete) { + cache.image.addEventListener('load', onLoad); + } + return cache.image; + } else { + cache = imageCache[url] = imageCache[url] || {}; + var image = cache.image = new Image(); // eslint-disable-line no-undef + + image.addEventListener('load', onLoad); + image.addEventListener('error', function () { + image.error = true; + }); + + // #1582 safari doesn't load data uris with crossOrigin properly + // https://bugs.webkit.org/show_bug.cgi?id=123978 + var dataUriPrefix = 'data:'; + var isDataUri = url.substring(0, dataUriPrefix.length).toLowerCase() === dataUriPrefix; + if (!isDataUri) { + // if crossorigin is 'null'(stringified), then manually set it to null + crossOrigin = crossOrigin === 'null' ? null : crossOrigin; + image.crossOrigin = crossOrigin; // prevent tainted canvas + } + + image.src = url; + return image; + } + }; + + var BRp$3 = {}; + + /* global document, window, ResizeObserver, MutationObserver */ + + BRp$3.registerBinding = function (target, event, handler, useCapture) { + // eslint-disable-line no-unused-vars + var args = Array.prototype.slice.apply(arguments, [1]); // copy + var b = this.binder(target); + return b.on.apply(b, args); + }; + BRp$3.binder = function (tgt) { + var r = this; + var containerWindow = r.cy.window(); + var tgtIsDom = tgt === containerWindow || tgt === containerWindow.document || tgt === containerWindow.document.body || domElement(tgt); + if (r.supportsPassiveEvents == null) { + // from https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection + var supportsPassive = false; + try { + var opts = Object.defineProperty({}, 'passive', { + get: function get() { + supportsPassive = true; + return true; + } + }); + containerWindow.addEventListener('test', null, opts); + } catch (err) { + // not supported + } + r.supportsPassiveEvents = supportsPassive; + } + var on = function on(event, handler, useCapture) { + var args = Array.prototype.slice.call(arguments); + if (tgtIsDom && r.supportsPassiveEvents) { + // replace useCapture w/ opts obj + args[2] = { + capture: useCapture != null ? useCapture : false, + passive: false, + once: false + }; + } + r.bindings.push({ + target: tgt, + args: args + }); + (tgt.addEventListener || tgt.on).apply(tgt, args); + return this; + }; + return { + on: on, + addEventListener: on, + addListener: on, + bind: on + }; + }; + BRp$3.nodeIsDraggable = function (node) { + return node && node.isNode() && !node.locked() && node.grabbable(); + }; + BRp$3.nodeIsGrabbable = function (node) { + return this.nodeIsDraggable(node) && node.interactive(); + }; + BRp$3.load = function () { + var r = this; + var containerWindow = r.cy.window(); + var isSelected = function isSelected(ele) { + return ele.selected(); + }; + var triggerEvents = function triggerEvents(target, names, e, position) { + if (target == null) { + target = r.cy; + } + for (var i = 0; i < names.length; i++) { + var name = names[i]; + target.emit({ + originalEvent: e, + type: name, + position: position + }); + } + }; + var isMultSelKeyDown = function isMultSelKeyDown(e) { + return e.shiftKey || e.metaKey || e.ctrlKey; // maybe e.altKey + }; + + var allowPanningPassthrough = function allowPanningPassthrough(down, downs) { + var allowPassthrough = true; + if (r.cy.hasCompoundNodes() && down && down.pannable()) { + // a grabbable compound node below the ele => no passthrough panning + for (var i = 0; downs && i < downs.length; i++) { + var down = downs[i]; + + //if any parent node in event hierarchy isn't pannable, reject passthrough + if (down.isNode() && down.isParent() && !down.pannable()) { + allowPassthrough = false; + break; + } + } + } else { + allowPassthrough = true; + } + return allowPassthrough; + }; + var setGrabbed = function setGrabbed(ele) { + ele[0]._private.grabbed = true; + }; + var setFreed = function setFreed(ele) { + ele[0]._private.grabbed = false; + }; + var setInDragLayer = function setInDragLayer(ele) { + ele[0]._private.rscratch.inDragLayer = true; + }; + var setOutDragLayer = function setOutDragLayer(ele) { + ele[0]._private.rscratch.inDragLayer = false; + }; + var setGrabTarget = function setGrabTarget(ele) { + ele[0]._private.rscratch.isGrabTarget = true; + }; + var removeGrabTarget = function removeGrabTarget(ele) { + ele[0]._private.rscratch.isGrabTarget = false; + }; + var addToDragList = function addToDragList(ele, opts) { + var list = opts.addToList; + var listHasEle = list.has(ele); + if (!listHasEle && ele.grabbable() && !ele.locked()) { + list.merge(ele); + setGrabbed(ele); + } + }; + + // helper function to determine which child nodes and inner edges + // of a compound node to be dragged as well as the grabbed and selected nodes + var addDescendantsToDrag = function addDescendantsToDrag(node, opts) { + if (!node.cy().hasCompoundNodes()) { + return; + } + if (opts.inDragLayer == null && opts.addToList == null) { + return; + } // nothing to do + + var innerNodes = node.descendants(); + if (opts.inDragLayer) { + innerNodes.forEach(setInDragLayer); + innerNodes.connectedEdges().forEach(setInDragLayer); + } + if (opts.addToList) { + addToDragList(innerNodes, opts); + } + }; + + // adds the given nodes and its neighbourhood to the drag layer + var addNodesToDrag = function addNodesToDrag(nodes, opts) { + opts = opts || {}; + var hasCompoundNodes = nodes.cy().hasCompoundNodes(); + if (opts.inDragLayer) { + nodes.forEach(setInDragLayer); + nodes.neighborhood().stdFilter(function (ele) { + return !hasCompoundNodes || ele.isEdge(); + }).forEach(setInDragLayer); + } + if (opts.addToList) { + nodes.forEach(function (ele) { + addToDragList(ele, opts); + }); + } + addDescendantsToDrag(nodes, opts); // always add to drag + + // also add nodes and edges related to the topmost ancestor + updateAncestorsInDragLayer(nodes, { + inDragLayer: opts.inDragLayer + }); + r.updateCachedGrabbedEles(); + }; + var addNodeToDrag = addNodesToDrag; + var freeDraggedElements = function freeDraggedElements(grabbedEles) { + if (!grabbedEles) { + return; + } + + // just go over all elements rather than doing a bunch of (possibly expensive) traversals + r.getCachedZSortedEles().forEach(function (ele) { + setFreed(ele); + setOutDragLayer(ele); + removeGrabTarget(ele); + }); + r.updateCachedGrabbedEles(); + }; + + // helper function to determine which ancestor nodes and edges should go + // to the drag layer (or should be removed from drag layer). + var updateAncestorsInDragLayer = function updateAncestorsInDragLayer(node, opts) { + if (opts.inDragLayer == null && opts.addToList == null) { + return; + } // nothing to do + + if (!node.cy().hasCompoundNodes()) { + return; + } + + // find top-level parent + var parent = node.ancestors().orphans(); + + // no parent node: no nodes to add to the drag layer + if (parent.same(node)) { + return; + } + var nodes = parent.descendants().spawnSelf().merge(parent).unmerge(node).unmerge(node.descendants()); + var edges = nodes.connectedEdges(); + if (opts.inDragLayer) { + edges.forEach(setInDragLayer); + nodes.forEach(setInDragLayer); + } + if (opts.addToList) { + nodes.forEach(function (ele) { + addToDragList(ele, opts); + }); + } + }; + var blurActiveDomElement = function blurActiveDomElement() { + if (document.activeElement != null && document.activeElement.blur != null) { + document.activeElement.blur(); + } + }; + var haveMutationsApi = typeof MutationObserver !== 'undefined'; + var haveResizeObserverApi = typeof ResizeObserver !== 'undefined'; + + // watch for when the cy container is removed from the dom + if (haveMutationsApi) { + r.removeObserver = new MutationObserver(function (mutns) { + // eslint-disable-line no-undef + for (var i = 0; i < mutns.length; i++) { + var mutn = mutns[i]; + var rNodes = mutn.removedNodes; + if (rNodes) { + for (var j = 0; j < rNodes.length; j++) { + var rNode = rNodes[j]; + if (rNode === r.container) { + r.destroy(); + break; + } + } + } + } + }); + if (r.container.parentNode) { + r.removeObserver.observe(r.container.parentNode, { + childList: true + }); + } + } else { + r.registerBinding(r.container, 'DOMNodeRemoved', function (e) { + // eslint-disable-line no-unused-vars + r.destroy(); + }); + } + var onResize = debounce_1(function () { + r.cy.resize(); + }, 100); + if (haveMutationsApi) { + r.styleObserver = new MutationObserver(onResize); // eslint-disable-line no-undef + + r.styleObserver.observe(r.container, { + attributes: true + }); + } + + // auto resize + r.registerBinding(containerWindow, 'resize', onResize); // eslint-disable-line no-undef + + if (haveResizeObserverApi) { + r.resizeObserver = new ResizeObserver(onResize); // eslint-disable-line no-undef + + r.resizeObserver.observe(r.container); + } + var forEachUp = function forEachUp(domEle, fn) { + while (domEle != null) { + fn(domEle); + domEle = domEle.parentNode; + } + }; + var invalidateCoords = function invalidateCoords() { + r.invalidateContainerClientCoordsCache(); + }; + forEachUp(r.container, function (domEle) { + r.registerBinding(domEle, 'transitionend', invalidateCoords); + r.registerBinding(domEle, 'animationend', invalidateCoords); + r.registerBinding(domEle, 'scroll', invalidateCoords); + }); + + // stop right click menu from appearing on cy + r.registerBinding(r.container, 'contextmenu', function (e) { + e.preventDefault(); + }); + var inBoxSelection = function inBoxSelection() { + return r.selection[4] !== 0; + }; + var eventInContainer = function eventInContainer(e) { + // save cycles if mouse events aren't to be captured + var containerPageCoords = r.findContainerClientCoords(); + var x = containerPageCoords[0]; + var y = containerPageCoords[1]; + var width = containerPageCoords[2]; + var height = containerPageCoords[3]; + var positions = e.touches ? e.touches : [e]; + var atLeastOnePosInside = false; + for (var i = 0; i < positions.length; i++) { + var p = positions[i]; + if (x <= p.clientX && p.clientX <= x + width && y <= p.clientY && p.clientY <= y + height) { + atLeastOnePosInside = true; + break; + } + } + if (!atLeastOnePosInside) { + return false; + } + var container = r.container; + var target = e.target; + var tParent = target.parentNode; + var containerIsTarget = false; + while (tParent) { + if (tParent === container) { + containerIsTarget = true; + break; + } + tParent = tParent.parentNode; + } + if (!containerIsTarget) { + return false; + } // if target is outisde cy container, then this event is not for us + + return true; + }; + + // Primary key + r.registerBinding(r.container, 'mousedown', function mousedownHandler(e) { + if (!eventInContainer(e)) { + return; + } + e.preventDefault(); + blurActiveDomElement(); + r.hoverData.capture = true; + r.hoverData.which = e.which; + var cy = r.cy; + var gpos = [e.clientX, e.clientY]; + var pos = r.projectIntoViewport(gpos[0], gpos[1]); + var select = r.selection; + var nears = r.findNearestElements(pos[0], pos[1], true, false); + var near = nears[0]; + var draggedElements = r.dragData.possibleDragElements; + r.hoverData.mdownPos = pos; + r.hoverData.mdownGPos = gpos; + var checkForTaphold = function checkForTaphold() { + r.hoverData.tapholdCancelled = false; + clearTimeout(r.hoverData.tapholdTimeout); + r.hoverData.tapholdTimeout = setTimeout(function () { + if (r.hoverData.tapholdCancelled) { + return; + } else { + var ele = r.hoverData.down; + if (ele) { + ele.emit({ + originalEvent: e, + type: 'taphold', + position: { + x: pos[0], + y: pos[1] + } + }); + } else { + cy.emit({ + originalEvent: e, + type: 'taphold', + position: { + x: pos[0], + y: pos[1] + } + }); + } + } + }, r.tapholdDuration); + }; + + // Right click button + if (e.which == 3) { + r.hoverData.cxtStarted = true; + var cxtEvt = { + originalEvent: e, + type: 'cxttapstart', + position: { + x: pos[0], + y: pos[1] + } + }; + if (near) { + near.activate(); + near.emit(cxtEvt); + r.hoverData.down = near; + } else { + cy.emit(cxtEvt); + } + r.hoverData.downTime = new Date().getTime(); + r.hoverData.cxtDragged = false; + + // Primary button + } else if (e.which == 1) { + if (near) { + near.activate(); + } + + // Element dragging + { + // If something is under the cursor and it is draggable, prepare to grab it + if (near != null) { + if (r.nodeIsGrabbable(near)) { + var makeEvent = function makeEvent(type) { + return { + originalEvent: e, + type: type, + position: { + x: pos[0], + y: pos[1] + } + }; + }; + var triggerGrab = function triggerGrab(ele) { + ele.emit(makeEvent('grab')); + }; + setGrabTarget(near); + if (!near.selected()) { + draggedElements = r.dragData.possibleDragElements = cy.collection(); + addNodeToDrag(near, { + addToList: draggedElements + }); + near.emit(makeEvent('grabon')).emit(makeEvent('grab')); + } else { + draggedElements = r.dragData.possibleDragElements = cy.collection(); + var selectedNodes = cy.$(function (ele) { + return ele.isNode() && ele.selected() && r.nodeIsGrabbable(ele); + }); + addNodesToDrag(selectedNodes, { + addToList: draggedElements + }); + near.emit(makeEvent('grabon')); + selectedNodes.forEach(triggerGrab); + } + r.redrawHint('eles', true); + r.redrawHint('drag', true); + } + } + r.hoverData.down = near; + r.hoverData.downs = nears; + r.hoverData.downTime = new Date().getTime(); + } + triggerEvents(near, ['mousedown', 'tapstart', 'vmousedown'], e, { + x: pos[0], + y: pos[1] + }); + if (near == null) { + select[4] = 1; + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + r.redrawHint('select', true); + r.redraw(); + } else if (near.pannable()) { + select[4] = 1; // for future pan + } + + checkForTaphold(); + } + + // Initialize selection box coordinates + select[0] = select[2] = pos[0]; + select[1] = select[3] = pos[1]; + }, false); + r.registerBinding(containerWindow, 'mousemove', function mousemoveHandler(e) { + // eslint-disable-line no-undef + var capture = r.hoverData.capture; + if (!capture && !eventInContainer(e)) { + return; + } + var preventDefault = false; + var cy = r.cy; + var zoom = cy.zoom(); + var gpos = [e.clientX, e.clientY]; + var pos = r.projectIntoViewport(gpos[0], gpos[1]); + var mdownPos = r.hoverData.mdownPos; + var mdownGPos = r.hoverData.mdownGPos; + var select = r.selection; + var near = null; + if (!r.hoverData.draggingEles && !r.hoverData.dragging && !r.hoverData.selecting) { + near = r.findNearestElement(pos[0], pos[1], true, false); + } + var last = r.hoverData.last; + var down = r.hoverData.down; + var disp = [pos[0] - select[2], pos[1] - select[3]]; + var draggedElements = r.dragData.possibleDragElements; + var isOverThresholdDrag; + if (mdownGPos) { + var dx = gpos[0] - mdownGPos[0]; + var dx2 = dx * dx; + var dy = gpos[1] - mdownGPos[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + r.hoverData.isOverThresholdDrag = isOverThresholdDrag = dist2 >= r.desktopTapThreshold2; + } + var multSelKeyDown = isMultSelKeyDown(e); + if (isOverThresholdDrag) { + r.hoverData.tapholdCancelled = true; + } + var updateDragDelta = function updateDragDelta() { + var dragDelta = r.hoverData.dragDelta = r.hoverData.dragDelta || []; + if (dragDelta.length === 0) { + dragDelta.push(disp[0]); + dragDelta.push(disp[1]); + } else { + dragDelta[0] += disp[0]; + dragDelta[1] += disp[1]; + } + }; + preventDefault = true; + triggerEvents(near, ['mousemove', 'vmousemove', 'tapdrag'], e, { + x: pos[0], + y: pos[1] + }); + var goIntoBoxMode = function goIntoBoxMode() { + r.data.bgActivePosistion = undefined; + if (!r.hoverData.selecting) { + cy.emit({ + originalEvent: e, + type: 'boxstart', + position: { + x: pos[0], + y: pos[1] + } + }); + } + select[4] = 1; + r.hoverData.selecting = true; + r.redrawHint('select', true); + r.redraw(); + }; + + // trigger context drag if rmouse down + if (r.hoverData.which === 3) { + // but only if over threshold + if (isOverThresholdDrag) { + var cxtEvt = { + originalEvent: e, + type: 'cxtdrag', + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + r.hoverData.cxtDragged = true; + if (!r.hoverData.cxtOver || near !== r.hoverData.cxtOver) { + if (r.hoverData.cxtOver) { + r.hoverData.cxtOver.emit({ + originalEvent: e, + type: 'cxtdragout', + position: { + x: pos[0], + y: pos[1] + } + }); + } + r.hoverData.cxtOver = near; + if (near) { + near.emit({ + originalEvent: e, + type: 'cxtdragover', + position: { + x: pos[0], + y: pos[1] + } + }); + } + } + } + + // Check if we are drag panning the entire graph + } else if (r.hoverData.dragging) { + preventDefault = true; + if (cy.panningEnabled() && cy.userPanningEnabled()) { + var deltaP; + if (r.hoverData.justStartedPan) { + var mdPos = r.hoverData.mdownPos; + deltaP = { + x: (pos[0] - mdPos[0]) * zoom, + y: (pos[1] - mdPos[1]) * zoom + }; + r.hoverData.justStartedPan = false; + } else { + deltaP = { + x: disp[0] * zoom, + y: disp[1] * zoom + }; + } + cy.panBy(deltaP); + cy.emit('dragpan'); + r.hoverData.dragged = true; + } + + // Needs reproject due to pan changing viewport + pos = r.projectIntoViewport(e.clientX, e.clientY); + + // Checks primary button down & out of time & mouse not moved much + } else if (select[4] == 1 && (down == null || down.pannable())) { + if (isOverThresholdDrag) { + if (!r.hoverData.dragging && cy.boxSelectionEnabled() && (multSelKeyDown || !cy.panningEnabled() || !cy.userPanningEnabled())) { + goIntoBoxMode(); + } else if (!r.hoverData.selecting && cy.panningEnabled() && cy.userPanningEnabled()) { + var allowPassthrough = allowPanningPassthrough(down, r.hoverData.downs); + if (allowPassthrough) { + r.hoverData.dragging = true; + r.hoverData.justStartedPan = true; + select[4] = 0; + r.data.bgActivePosistion = array2point(mdownPos); + r.redrawHint('select', true); + r.redraw(); + } + } + if (down && down.pannable() && down.active()) { + down.unactivate(); + } + } + } else { + if (down && down.pannable() && down.active()) { + down.unactivate(); + } + if ((!down || !down.grabbed()) && near != last) { + if (last) { + triggerEvents(last, ['mouseout', 'tapdragout'], e, { + x: pos[0], + y: pos[1] + }); + } + if (near) { + triggerEvents(near, ['mouseover', 'tapdragover'], e, { + x: pos[0], + y: pos[1] + }); + } + r.hoverData.last = near; + } + if (down) { + if (isOverThresholdDrag) { + // then we can take action + + if (cy.boxSelectionEnabled() && multSelKeyDown) { + // then selection overrides + if (down && down.grabbed()) { + freeDraggedElements(draggedElements); + down.emit('freeon'); + draggedElements.emit('free'); + if (r.dragData.didDrag) { + down.emit('dragfreeon'); + draggedElements.emit('dragfree'); + } + } + goIntoBoxMode(); + } else if (down && down.grabbed() && r.nodeIsDraggable(down)) { + // drag node + var justStartedDrag = !r.dragData.didDrag; + if (justStartedDrag) { + r.redrawHint('eles', true); + } + r.dragData.didDrag = true; // indicate that we actually did drag the node + + // now, add the elements to the drag layer if not done already + if (!r.hoverData.draggingEles) { + addNodesToDrag(draggedElements, { + inDragLayer: true + }); + } + var totalShift = { + x: 0, + y: 0 + }; + if (number$1(disp[0]) && number$1(disp[1])) { + totalShift.x += disp[0]; + totalShift.y += disp[1]; + if (justStartedDrag) { + var dragDelta = r.hoverData.dragDelta; + if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + r.hoverData.draggingEles = true; + draggedElements.silentShift(totalShift).emit('position drag'); + r.redrawHint('drag', true); + r.redraw(); + } + } else { + // otherwise save drag delta for when we actually start dragging so the relative grab pos is constant + updateDragDelta(); + } + } + + // prevent the dragging from triggering text selection on the page + preventDefault = true; + } + select[2] = pos[0]; + select[3] = pos[1]; + if (preventDefault) { + if (e.stopPropagation) e.stopPropagation(); + if (e.preventDefault) e.preventDefault(); + return false; + } + }, false); + var clickTimeout, didDoubleClick, prevClickTimeStamp; + r.registerBinding(containerWindow, 'mouseup', function mouseupHandler(e) { + // eslint-disable-line no-undef + var capture = r.hoverData.capture; + if (!capture) { + return; + } + r.hoverData.capture = false; + var cy = r.cy; + var pos = r.projectIntoViewport(e.clientX, e.clientY); + var select = r.selection; + var near = r.findNearestElement(pos[0], pos[1], true, false); + var draggedElements = r.dragData.possibleDragElements; + var down = r.hoverData.down; + var multSelKeyDown = isMultSelKeyDown(e); + if (r.data.bgActivePosistion) { + r.redrawHint('select', true); + r.redraw(); + } + r.hoverData.tapholdCancelled = true; + r.data.bgActivePosistion = undefined; // not active bg now + + if (down) { + down.unactivate(); + } + if (r.hoverData.which === 3) { + var cxtEvt = { + originalEvent: e, + type: 'cxttapend', + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + if (!r.hoverData.cxtDragged) { + var cxtTap = { + originalEvent: e, + type: 'cxttap', + position: { + x: pos[0], + y: pos[1] + } + }; + if (down) { + down.emit(cxtTap); + } else { + cy.emit(cxtTap); + } + } + r.hoverData.cxtDragged = false; + r.hoverData.which = null; + } else if (r.hoverData.which === 1) { + triggerEvents(near, ['mouseup', 'tapend', 'vmouseup'], e, { + x: pos[0], + y: pos[1] + }); + if (!r.dragData.didDrag && + // didn't move a node around + !r.hoverData.dragged && + // didn't pan + !r.hoverData.selecting && + // not box selection + !r.hoverData.isOverThresholdDrag // didn't move too much + ) { + triggerEvents(down, ["click", "tap", "vclick"], e, { + x: pos[0], + y: pos[1] + }); + didDoubleClick = false; + if (e.timeStamp - prevClickTimeStamp <= cy.multiClickDebounceTime()) { + clickTimeout && clearTimeout(clickTimeout); + didDoubleClick = true; + prevClickTimeStamp = null; + triggerEvents(down, ["dblclick", "dbltap", "vdblclick"], e, { + x: pos[0], + y: pos[1] + }); + } else { + clickTimeout = setTimeout(function () { + if (didDoubleClick) return; + triggerEvents(down, ["oneclick", "onetap", "voneclick"], e, { + x: pos[0], + y: pos[1] + }); + }, cy.multiClickDebounceTime()); + prevClickTimeStamp = e.timeStamp; + } + } + + // Deselect all elements if nothing is currently under the mouse cursor and we aren't dragging something + if (down == null // not mousedown on node + && !r.dragData.didDrag // didn't move the node around + && !r.hoverData.selecting // not box selection + && !r.hoverData.dragged // didn't pan + && !isMultSelKeyDown(e)) { + cy.$(isSelected).unselect(['tapunselect']); + if (draggedElements.length > 0) { + r.redrawHint('eles', true); + } + r.dragData.possibleDragElements = draggedElements = cy.collection(); + } + + // Single selection + if (near == down && !r.dragData.didDrag && !r.hoverData.selecting) { + if (near != null && near._private.selectable) { + if (r.hoverData.dragging) ; else if (cy.selectionType() === 'additive' || multSelKeyDown) { + if (near.selected()) { + near.unselect(['tapunselect']); + } else { + near.select(['tapselect']); + } + } else { + if (!multSelKeyDown) { + cy.$(isSelected).unmerge(near).unselect(['tapunselect']); + near.select(['tapselect']); + } + } + r.redrawHint('eles', true); + } + } + if (r.hoverData.selecting) { + var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); + r.redrawHint('select', true); + if (box.length > 0) { + r.redrawHint('eles', true); + } + cy.emit({ + type: 'boxend', + originalEvent: e, + position: { + x: pos[0], + y: pos[1] + } + }); + var eleWouldBeSelected = function eleWouldBeSelected(ele) { + return ele.selectable() && !ele.selected(); + }; + if (cy.selectionType() === 'additive') { + box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); + } else { + if (!multSelKeyDown) { + cy.$(isSelected).unmerge(box).unselect(); + } + box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); + } + + // always need redraw in case eles unselectable + r.redraw(); + } + + // Cancel drag pan + if (r.hoverData.dragging) { + r.hoverData.dragging = false; + r.redrawHint('select', true); + r.redrawHint('eles', true); + r.redraw(); + } + if (!select[4]) { + r.redrawHint('drag', true); + r.redrawHint('eles', true); + var downWasGrabbed = down && down.grabbed(); + freeDraggedElements(draggedElements); + if (downWasGrabbed) { + down.emit('freeon'); + draggedElements.emit('free'); + if (r.dragData.didDrag) { + down.emit('dragfreeon'); + draggedElements.emit('dragfree'); + } + } + } + } // else not right mouse + + select[4] = 0; + r.hoverData.down = null; + r.hoverData.cxtStarted = false; + r.hoverData.draggingEles = false; + r.hoverData.selecting = false; + r.hoverData.isOverThresholdDrag = false; + r.dragData.didDrag = false; + r.hoverData.dragged = false; + r.hoverData.dragDelta = []; + r.hoverData.mdownPos = null; + r.hoverData.mdownGPos = null; + }, false); + var wheelHandler = function wheelHandler(e) { + if (r.scrollingPage) { + return; + } // while scrolling, ignore wheel-to-zoom + + var cy = r.cy; + var zoom = cy.zoom(); + var pan = cy.pan(); + var pos = r.projectIntoViewport(e.clientX, e.clientY); + var rpos = [pos[0] * zoom + pan.x, pos[1] * zoom + pan.y]; + if (r.hoverData.draggingEles || r.hoverData.dragging || r.hoverData.cxtStarted || inBoxSelection()) { + // if pan dragging or cxt dragging, wheel movements make no zoom + e.preventDefault(); + return; + } + if (cy.panningEnabled() && cy.userPanningEnabled() && cy.zoomingEnabled() && cy.userZoomingEnabled()) { + e.preventDefault(); + r.data.wheelZooming = true; + clearTimeout(r.data.wheelTimeout); + r.data.wheelTimeout = setTimeout(function () { + r.data.wheelZooming = false; + r.redrawHint('eles', true); + r.redraw(); + }, 150); + var diff; + if (e.deltaY != null) { + diff = e.deltaY / -250; + } else if (e.wheelDeltaY != null) { + diff = e.wheelDeltaY / 1000; + } else { + diff = e.wheelDelta / 1000; + } + diff = diff * r.wheelSensitivity; + var needsWheelFix = e.deltaMode === 1; + if (needsWheelFix) { + // fixes slow wheel events on ff/linux and ff/windows + diff *= 33; + } + var newZoom = cy.zoom() * Math.pow(10, diff); + if (e.type === 'gesturechange') { + newZoom = r.gestureStartZoom * e.scale; + } + cy.zoom({ + level: newZoom, + renderedPosition: { + x: rpos[0], + y: rpos[1] + } + }); + cy.emit(e.type === 'gesturechange' ? 'pinchzoom' : 'scrollzoom'); + } + }; + + // Functions to help with whether mouse wheel should trigger zooming + // -- + r.registerBinding(r.container, 'wheel', wheelHandler, true); + + // disable nonstandard wheel events + // r.registerBinding(r.container, 'mousewheel', wheelHandler, true); + // r.registerBinding(r.container, 'DOMMouseScroll', wheelHandler, true); + // r.registerBinding(r.container, 'MozMousePixelScroll', wheelHandler, true); // older firefox + + r.registerBinding(containerWindow, 'scroll', function scrollHandler(e) { + // eslint-disable-line no-unused-vars + r.scrollingPage = true; + clearTimeout(r.scrollingPageTimeout); + r.scrollingPageTimeout = setTimeout(function () { + r.scrollingPage = false; + }, 250); + }, true); + + // desktop safari pinch to zoom start + r.registerBinding(r.container, 'gesturestart', function gestureStartHandler(e) { + r.gestureStartZoom = r.cy.zoom(); + if (!r.hasTouchStarted) { + // don't affect touch devices like iphone + e.preventDefault(); + } + }, true); + r.registerBinding(r.container, 'gesturechange', function (e) { + if (!r.hasTouchStarted) { + // don't affect touch devices like iphone + wheelHandler(e); + } + }, true); + + // Functions to help with handling mouseout/mouseover on the Cytoscape container + // Handle mouseout on Cytoscape container + r.registerBinding(r.container, 'mouseout', function mouseOutHandler(e) { + var pos = r.projectIntoViewport(e.clientX, e.clientY); + r.cy.emit({ + originalEvent: e, + type: 'mouseout', + position: { + x: pos[0], + y: pos[1] + } + }); + }, false); + r.registerBinding(r.container, 'mouseover', function mouseOverHandler(e) { + var pos = r.projectIntoViewport(e.clientX, e.clientY); + r.cy.emit({ + originalEvent: e, + type: 'mouseover', + position: { + x: pos[0], + y: pos[1] + } + }); + }, false); + var f1x1, f1y1, f2x1, f2y1; // starting points for pinch-to-zoom + var distance1, distance1Sq; // initial distance between finger 1 and finger 2 for pinch-to-zoom + var center1, modelCenter1; // center point on start pinch to zoom + var offsetLeft, offsetTop; + var containerWidth, containerHeight; + var twoFingersStartInside; + var distance = function distance(x1, y1, x2, y2) { + return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); + }; + var distanceSq = function distanceSq(x1, y1, x2, y2) { + return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); + }; + var touchstartHandler; + r.registerBinding(r.container, 'touchstart', touchstartHandler = function touchstartHandler(e) { + r.hasTouchStarted = true; + if (!eventInContainer(e)) { + return; + } + blurActiveDomElement(); + r.touchData.capture = true; + r.data.bgActivePosistion = undefined; + var cy = r.cy; + var now = r.touchData.now; + var earlier = r.touchData.earlier; + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } + + // record starting points for pinch-to-zoom + if (e.touches[1]) { + r.touchData.singleTouchMoved = true; + freeDraggedElements(r.dragData.touchDragEles); + var offsets = r.findContainerClientCoords(); + offsetLeft = offsets[0]; + offsetTop = offsets[1]; + containerWidth = offsets[2]; + containerHeight = offsets[3]; + f1x1 = e.touches[0].clientX - offsetLeft; + f1y1 = e.touches[0].clientY - offsetTop; + f2x1 = e.touches[1].clientX - offsetLeft; + f2y1 = e.touches[1].clientY - offsetTop; + twoFingersStartInside = 0 <= f1x1 && f1x1 <= containerWidth && 0 <= f2x1 && f2x1 <= containerWidth && 0 <= f1y1 && f1y1 <= containerHeight && 0 <= f2y1 && f2y1 <= containerHeight; + var pan = cy.pan(); + var zoom = cy.zoom(); + distance1 = distance(f1x1, f1y1, f2x1, f2y1); + distance1Sq = distanceSq(f1x1, f1y1, f2x1, f2y1); + center1 = [(f1x1 + f2x1) / 2, (f1y1 + f2y1) / 2]; + modelCenter1 = [(center1[0] - pan.x) / zoom, (center1[1] - pan.y) / zoom]; + + // consider context tap + var cxtDistThreshold = 200; + var cxtDistThresholdSq = cxtDistThreshold * cxtDistThreshold; + if (distance1Sq < cxtDistThresholdSq && !e.touches[2]) { + var near1 = r.findNearestElement(now[0], now[1], true, true); + var near2 = r.findNearestElement(now[2], now[3], true, true); + if (near1 && near1.isNode()) { + near1.activate().emit({ + originalEvent: e, + type: 'cxttapstart', + position: { + x: now[0], + y: now[1] + } + }); + r.touchData.start = near1; + } else if (near2 && near2.isNode()) { + near2.activate().emit({ + originalEvent: e, + type: 'cxttapstart', + position: { + x: now[0], + y: now[1] + } + }); + r.touchData.start = near2; + } else { + cy.emit({ + originalEvent: e, + type: 'cxttapstart', + position: { + x: now[0], + y: now[1] + } + }); + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxt = true; + r.touchData.cxtDragged = false; + r.data.bgActivePosistion = undefined; + r.redraw(); + return; + } + } + if (e.touches[2]) { + // ignore + + // safari on ios pans the page otherwise (normally you should be able to preventdefault on touchmove...) + if (cy.boxSelectionEnabled()) { + e.preventDefault(); + } + } else if (e.touches[1]) ; else if (e.touches[0]) { + var nears = r.findNearestElements(now[0], now[1], true, true); + var near = nears[0]; + if (near != null) { + near.activate(); + r.touchData.start = near; + r.touchData.starts = nears; + if (r.nodeIsGrabbable(near)) { + var draggedEles = r.dragData.touchDragEles = cy.collection(); + var selectedNodes = null; + r.redrawHint('eles', true); + r.redrawHint('drag', true); + if (near.selected()) { + // reset drag elements, since near will be added again + + selectedNodes = cy.$(function (ele) { + return ele.selected() && r.nodeIsGrabbable(ele); + }); + addNodesToDrag(selectedNodes, { + addToList: draggedEles + }); + } else { + addNodeToDrag(near, { + addToList: draggedEles + }); + } + setGrabTarget(near); + var makeEvent = function makeEvent(type) { + return { + originalEvent: e, + type: type, + position: { + x: now[0], + y: now[1] + } + }; + }; + near.emit(makeEvent('grabon')); + if (selectedNodes) { + selectedNodes.forEach(function (n) { + n.emit(makeEvent('grab')); + }); + } else { + near.emit(makeEvent('grab')); + } + } + } + triggerEvents(near, ['touchstart', 'tapstart', 'vmousedown'], e, { + x: now[0], + y: now[1] + }); + if (near == null) { + r.data.bgActivePosistion = { + x: pos[0], + y: pos[1] + }; + r.redrawHint('select', true); + r.redraw(); + } + + // Tap, taphold + // ----- + + r.touchData.singleTouchMoved = false; + r.touchData.singleTouchStartTime = +new Date(); + clearTimeout(r.touchData.tapholdTimeout); + r.touchData.tapholdTimeout = setTimeout(function () { + if (r.touchData.singleTouchMoved === false && !r.pinching // if pinching, then taphold unselect shouldn't take effect + && !r.touchData.selecting // box selection shouldn't allow taphold through + ) { + triggerEvents(r.touchData.start, ['taphold'], e, { + x: now[0], + y: now[1] + }); + } + }, r.tapholdDuration); + } + if (e.touches.length >= 1) { + var sPos = r.touchData.startPosition = [null, null, null, null, null, null]; + for (var i = 0; i < now.length; i++) { + sPos[i] = earlier[i] = now[i]; + } + var touch0 = e.touches[0]; + r.touchData.startGPosition = [touch0.clientX, touch0.clientY]; + } + }, false); + var touchmoveHandler; + r.registerBinding(window, 'touchmove', touchmoveHandler = function touchmoveHandler(e) { + // eslint-disable-line no-undef + var capture = r.touchData.capture; + if (!capture && !eventInContainer(e)) { + return; + } + var select = r.selection; + var cy = r.cy; + var now = r.touchData.now; + var earlier = r.touchData.earlier; + var zoom = cy.zoom(); + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } + var startGPos = r.touchData.startGPosition; + var isOverThresholdDrag; + if (capture && e.touches[0] && startGPos) { + var disp = []; + for (var j = 0; j < now.length; j++) { + disp[j] = now[j] - earlier[j]; + } + var dx = e.touches[0].clientX - startGPos[0]; + var dx2 = dx * dx; + var dy = e.touches[0].clientY - startGPos[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + isOverThresholdDrag = dist2 >= r.touchTapThreshold2; + } + + // context swipe cancelling + if (capture && r.touchData.cxt) { + e.preventDefault(); + var f1x2 = e.touches[0].clientX - offsetLeft, + f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, + f2y2 = e.touches[1].clientY - offsetTop; + // var distance2 = distance( f1x2, f1y2, f2x2, f2y2 ); + var distance2Sq = distanceSq(f1x2, f1y2, f2x2, f2y2); + var factorSq = distance2Sq / distance1Sq; + var distThreshold = 150; + var distThresholdSq = distThreshold * distThreshold; + var factorThreshold = 1.5; + var factorThresholdSq = factorThreshold * factorThreshold; + + // cancel ctx gestures if the distance b/t the fingers increases + if (factorSq >= factorThresholdSq || distance2Sq >= distThresholdSq) { + r.touchData.cxt = false; + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + var cxtEvt = { + originalEvent: e, + type: 'cxttapend', + position: { + x: now[0], + y: now[1] + } + }; + if (r.touchData.start) { + r.touchData.start.unactivate().emit(cxtEvt); + r.touchData.start = null; + } else { + cy.emit(cxtEvt); + } + } + } + + // context swipe + if (capture && r.touchData.cxt) { + var cxtEvt = { + originalEvent: e, + type: 'cxtdrag', + position: { + x: now[0], + y: now[1] + } + }; + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + if (r.touchData.start) { + r.touchData.start.emit(cxtEvt); + } else { + cy.emit(cxtEvt); + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxtDragged = true; + var near = r.findNearestElement(now[0], now[1], true, true); + if (!r.touchData.cxtOver || near !== r.touchData.cxtOver) { + if (r.touchData.cxtOver) { + r.touchData.cxtOver.emit({ + originalEvent: e, + type: 'cxtdragout', + position: { + x: now[0], + y: now[1] + } + }); + } + r.touchData.cxtOver = near; + if (near) { + near.emit({ + originalEvent: e, + type: 'cxtdragover', + position: { + x: now[0], + y: now[1] + } + }); + } + } + + // box selection + } else if (capture && e.touches[2] && cy.boxSelectionEnabled()) { + e.preventDefault(); + r.data.bgActivePosistion = undefined; + this.lastThreeTouch = +new Date(); + if (!r.touchData.selecting) { + cy.emit({ + originalEvent: e, + type: 'boxstart', + position: { + x: now[0], + y: now[1] + } + }); + } + r.touchData.selecting = true; + r.touchData.didSelect = true; + select[4] = 1; + if (!select || select.length === 0 || select[0] === undefined) { + select[0] = (now[0] + now[2] + now[4]) / 3; + select[1] = (now[1] + now[3] + now[5]) / 3; + select[2] = (now[0] + now[2] + now[4]) / 3 + 1; + select[3] = (now[1] + now[3] + now[5]) / 3 + 1; + } else { + select[2] = (now[0] + now[2] + now[4]) / 3; + select[3] = (now[1] + now[3] + now[5]) / 3; + } + r.redrawHint('select', true); + r.redraw(); + + // pinch to zoom + } else if (capture && e.touches[1] && !r.touchData.didSelect // don't allow box selection to degrade to pinch-to-zoom + && cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled()) { + // two fingers => pinch to zoom + e.preventDefault(); + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + var draggedEles = r.dragData.touchDragEles; + if (draggedEles) { + r.redrawHint('drag', true); + for (var i = 0; i < draggedEles.length; i++) { + var de_p = draggedEles[i]._private; + de_p.grabbed = false; + de_p.rscratch.inDragLayer = false; + } + } + var _start = r.touchData.start; + + // (x2, y2) for fingers 1 and 2 + var f1x2 = e.touches[0].clientX - offsetLeft, + f1y2 = e.touches[0].clientY - offsetTop; + var f2x2 = e.touches[1].clientX - offsetLeft, + f2y2 = e.touches[1].clientY - offsetTop; + var distance2 = distance(f1x2, f1y2, f2x2, f2y2); + // var distance2Sq = distanceSq( f1x2, f1y2, f2x2, f2y2 ); + // var factor = Math.sqrt( distance2Sq ) / Math.sqrt( distance1Sq ); + var factor = distance2 / distance1; + if (twoFingersStartInside) { + // delta finger1 + var df1x = f1x2 - f1x1; + var df1y = f1y2 - f1y1; + + // delta finger 2 + var df2x = f2x2 - f2x1; + var df2y = f2y2 - f2y1; + + // translation is the normalised vector of the two fingers movement + // i.e. so pinching cancels out and moving together pans + var tx = (df1x + df2x) / 2; + var ty = (df1y + df2y) / 2; + + // now calculate the zoom + var zoom1 = cy.zoom(); + var zoom2 = zoom1 * factor; + var pan1 = cy.pan(); + + // the model center point converted to the current rendered pos + var ctrx = modelCenter1[0] * zoom1 + pan1.x; + var ctry = modelCenter1[1] * zoom1 + pan1.y; + var pan2 = { + x: -zoom2 / zoom1 * (ctrx - pan1.x - tx) + ctrx, + y: -zoom2 / zoom1 * (ctry - pan1.y - ty) + ctry + }; + + // remove dragged eles + if (_start && _start.active()) { + var draggedEles = r.dragData.touchDragEles; + freeDraggedElements(draggedEles); + r.redrawHint('drag', true); + r.redrawHint('eles', true); + _start.unactivate().emit('freeon'); + draggedEles.emit('free'); + if (r.dragData.didDrag) { + _start.emit('dragfreeon'); + draggedEles.emit('dragfree'); + } + } + cy.viewport({ + zoom: zoom2, + pan: pan2, + cancelOnFailedZoom: true + }); + cy.emit('pinchzoom'); + distance1 = distance2; + f1x1 = f1x2; + f1y1 = f1y2; + f2x1 = f2x2; + f2y1 = f2y2; + r.pinching = true; + } + + // Re-project + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } + } else if (e.touches[0] && !r.touchData.didSelect // don't allow box selection to degrade to single finger events like panning + ) { + var start = r.touchData.start; + var last = r.touchData.last; + var near; + if (!r.hoverData.draggingEles && !r.swipePanning) { + near = r.findNearestElement(now[0], now[1], true, true); + } + if (capture && start != null) { + e.preventDefault(); + } + + // dragging nodes + if (capture && start != null && r.nodeIsDraggable(start)) { + if (isOverThresholdDrag) { + // then dragging can happen + var draggedEles = r.dragData.touchDragEles; + var justStartedDrag = !r.dragData.didDrag; + if (justStartedDrag) { + addNodesToDrag(draggedEles, { + inDragLayer: true + }); + } + r.dragData.didDrag = true; + var totalShift = { + x: 0, + y: 0 + }; + if (number$1(disp[0]) && number$1(disp[1])) { + totalShift.x += disp[0]; + totalShift.y += disp[1]; + if (justStartedDrag) { + r.redrawHint('eles', true); + var dragDelta = r.touchData.dragDelta; + if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { + totalShift.x += dragDelta[0]; + totalShift.y += dragDelta[1]; + } + } + } + r.hoverData.draggingEles = true; + draggedEles.silentShift(totalShift).emit('position drag'); + r.redrawHint('drag', true); + if (r.touchData.startPosition[0] == earlier[0] && r.touchData.startPosition[1] == earlier[1]) { + r.redrawHint('eles', true); + } + r.redraw(); + } else { + // otherwise keep track of drag delta for later + var dragDelta = r.touchData.dragDelta = r.touchData.dragDelta || []; + if (dragDelta.length === 0) { + dragDelta.push(disp[0]); + dragDelta.push(disp[1]); + } else { + dragDelta[0] += disp[0]; + dragDelta[1] += disp[1]; + } + } + } + + // touchmove + { + triggerEvents(start || near, ['touchmove', 'tapdrag', 'vmousemove'], e, { + x: now[0], + y: now[1] + }); + if ((!start || !start.grabbed()) && near != last) { + if (last) { + last.emit({ + originalEvent: e, + type: 'tapdragout', + position: { + x: now[0], + y: now[1] + } + }); + } + if (near) { + near.emit({ + originalEvent: e, + type: 'tapdragover', + position: { + x: now[0], + y: now[1] + } + }); + } + } + r.touchData.last = near; + } + + // check to cancel taphold + if (capture) { + for (var i = 0; i < now.length; i++) { + if (now[i] && r.touchData.startPosition[i] && isOverThresholdDrag) { + r.touchData.singleTouchMoved = true; + } + } + } + + // panning + if (capture && (start == null || start.pannable()) && cy.panningEnabled() && cy.userPanningEnabled()) { + var allowPassthrough = allowPanningPassthrough(start, r.touchData.starts); + if (allowPassthrough) { + e.preventDefault(); + if (!r.data.bgActivePosistion) { + r.data.bgActivePosistion = array2point(r.touchData.startPosition); + } + if (r.swipePanning) { + cy.panBy({ + x: disp[0] * zoom, + y: disp[1] * zoom + }); + cy.emit('dragpan'); + } else if (isOverThresholdDrag) { + r.swipePanning = true; + cy.panBy({ + x: dx * zoom, + y: dy * zoom + }); + cy.emit('dragpan'); + if (start) { + start.unactivate(); + r.redrawHint('select', true); + r.touchData.start = null; + } + } + } + + // Re-project + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + } + for (var j = 0; j < now.length; j++) { + earlier[j] = now[j]; + } + + // the active bg indicator should be removed when making a swipe that is neither for dragging nodes or panning + if (capture && e.touches.length > 0 && !r.hoverData.draggingEles && !r.swipePanning && r.data.bgActivePosistion != null) { + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + r.redraw(); + } + }, false); + var touchcancelHandler; + r.registerBinding(containerWindow, 'touchcancel', touchcancelHandler = function touchcancelHandler(e) { + // eslint-disable-line no-unused-vars + var start = r.touchData.start; + r.touchData.capture = false; + if (start) { + start.unactivate(); + } + }); + var touchendHandler, didDoubleTouch, touchTimeout, prevTouchTimeStamp; + r.registerBinding(containerWindow, 'touchend', touchendHandler = function touchendHandler(e) { + // eslint-disable-line no-unused-vars + var start = r.touchData.start; + var capture = r.touchData.capture; + if (capture) { + if (e.touches.length === 0) { + r.touchData.capture = false; + } + e.preventDefault(); + } else { + return; + } + var select = r.selection; + r.swipePanning = false; + r.hoverData.draggingEles = false; + var cy = r.cy; + var zoom = cy.zoom(); + var now = r.touchData.now; + var earlier = r.touchData.earlier; + if (e.touches[0]) { + var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); + now[0] = pos[0]; + now[1] = pos[1]; + } + if (e.touches[1]) { + var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); + now[2] = pos[0]; + now[3] = pos[1]; + } + if (e.touches[2]) { + var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); + now[4] = pos[0]; + now[5] = pos[1]; + } + if (start) { + start.unactivate(); + } + var ctxTapend; + if (r.touchData.cxt) { + ctxTapend = { + originalEvent: e, + type: 'cxttapend', + position: { + x: now[0], + y: now[1] + } + }; + if (start) { + start.emit(ctxTapend); + } else { + cy.emit(ctxTapend); + } + if (!r.touchData.cxtDragged) { + var ctxTap = { + originalEvent: e, + type: 'cxttap', + position: { + x: now[0], + y: now[1] + } + }; + if (start) { + start.emit(ctxTap); + } else { + cy.emit(ctxTap); + } + } + if (r.touchData.start) { + r.touchData.start._private.grabbed = false; + } + r.touchData.cxt = false; + r.touchData.start = null; + r.redraw(); + return; + } + + // no more box selection if we don't have three fingers + if (!e.touches[2] && cy.boxSelectionEnabled() && r.touchData.selecting) { + r.touchData.selecting = false; + var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); + select[0] = undefined; + select[1] = undefined; + select[2] = undefined; + select[3] = undefined; + select[4] = 0; + r.redrawHint('select', true); + cy.emit({ + type: 'boxend', + originalEvent: e, + position: { + x: now[0], + y: now[1] + } + }); + var eleWouldBeSelected = function eleWouldBeSelected(ele) { + return ele.selectable() && !ele.selected(); + }; + box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); + if (box.nonempty()) { + r.redrawHint('eles', true); + } + r.redraw(); + } + if (start != null) { + start.unactivate(); + } + if (e.touches[2]) { + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + } else if (e.touches[1]) ; else if (e.touches[0]) ; else if (!e.touches[0]) { + r.data.bgActivePosistion = undefined; + r.redrawHint('select', true); + var draggedEles = r.dragData.touchDragEles; + if (start != null) { + var startWasGrabbed = start._private.grabbed; + freeDraggedElements(draggedEles); + r.redrawHint('drag', true); + r.redrawHint('eles', true); + if (startWasGrabbed) { + start.emit('freeon'); + draggedEles.emit('free'); + if (r.dragData.didDrag) { + start.emit('dragfreeon'); + draggedEles.emit('dragfree'); + } + } + triggerEvents(start, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, { + x: now[0], + y: now[1] + }); + start.unactivate(); + r.touchData.start = null; + } else { + var near = r.findNearestElement(now[0], now[1], true, true); + triggerEvents(near, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, { + x: now[0], + y: now[1] + }); + } + var dx = r.touchData.startPosition[0] - now[0]; + var dx2 = dx * dx; + var dy = r.touchData.startPosition[1] - now[1]; + var dy2 = dy * dy; + var dist2 = dx2 + dy2; + var rdist2 = dist2 * zoom * zoom; + + // Tap event, roughly same as mouse click event for touch + if (!r.touchData.singleTouchMoved) { + if (!start) { + cy.$(':selected').unselect(['tapunselect']); + } + triggerEvents(start, ['tap', 'vclick'], e, { + x: now[0], + y: now[1] + }); + didDoubleTouch = false; + if (e.timeStamp - prevTouchTimeStamp <= cy.multiClickDebounceTime()) { + touchTimeout && clearTimeout(touchTimeout); + didDoubleTouch = true; + prevTouchTimeStamp = null; + triggerEvents(start, ['dbltap', 'vdblclick'], e, { + x: now[0], + y: now[1] + }); + } else { + touchTimeout = setTimeout(function () { + if (didDoubleTouch) return; + triggerEvents(start, ['onetap', 'voneclick'], e, { + x: now[0], + y: now[1] + }); + }, cy.multiClickDebounceTime()); + prevTouchTimeStamp = e.timeStamp; + } + } + + // Prepare to select the currently touched node, only if it hasn't been dragged past a certain distance + if (start != null && !r.dragData.didDrag // didn't drag nodes around + && start._private.selectable && rdist2 < r.touchTapThreshold2 && !r.pinching // pinch to zoom should not affect selection + ) { + if (cy.selectionType() === 'single') { + cy.$(isSelected).unmerge(start).unselect(['tapunselect']); + start.select(['tapselect']); + } else { + if (start.selected()) { + start.unselect(['tapunselect']); + } else { + start.select(['tapselect']); + } + } + r.redrawHint('eles', true); + } + r.touchData.singleTouchMoved = true; + } + for (var j = 0; j < now.length; j++) { + earlier[j] = now[j]; + } + r.dragData.didDrag = false; // reset for next touchstart + + if (e.touches.length === 0) { + r.touchData.dragDelta = []; + r.touchData.startPosition = [null, null, null, null, null, null]; + r.touchData.startGPosition = null; + r.touchData.didSelect = false; + } + if (e.touches.length < 2) { + if (e.touches.length === 1) { + // the old start global pos'n may not be the same finger that remains + r.touchData.startGPosition = [e.touches[0].clientX, e.touches[0].clientY]; + } + r.pinching = false; + r.redrawHint('eles', true); + r.redraw(); + } + + //r.redraw(); + }, false); + + // fallback compatibility layer for ms pointer events + if (typeof TouchEvent === 'undefined') { + var pointers = []; + var makeTouch = function makeTouch(e) { + return { + clientX: e.clientX, + clientY: e.clientY, + force: 1, + identifier: e.pointerId, + pageX: e.pageX, + pageY: e.pageY, + radiusX: e.width / 2, + radiusY: e.height / 2, + screenX: e.screenX, + screenY: e.screenY, + target: e.target + }; + }; + var makePointer = function makePointer(e) { + return { + event: e, + touch: makeTouch(e) + }; + }; + var addPointer = function addPointer(e) { + pointers.push(makePointer(e)); + }; + var removePointer = function removePointer(e) { + for (var i = 0; i < pointers.length; i++) { + var p = pointers[i]; + if (p.event.pointerId === e.pointerId) { + pointers.splice(i, 1); + return; + } + } + }; + var updatePointer = function updatePointer(e) { + var p = pointers.filter(function (p) { + return p.event.pointerId === e.pointerId; + })[0]; + p.event = e; + p.touch = makeTouch(e); + }; + var addTouchesToEvent = function addTouchesToEvent(e) { + e.touches = pointers.map(function (p) { + return p.touch; + }); + }; + var pointerIsMouse = function pointerIsMouse(e) { + return e.pointerType === 'mouse' || e.pointerType === 4; + }; + r.registerBinding(r.container, 'pointerdown', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + e.preventDefault(); + addPointer(e); + addTouchesToEvent(e); + touchstartHandler(e); + }); + r.registerBinding(r.container, 'pointerup', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + removePointer(e); + addTouchesToEvent(e); + touchendHandler(e); + }); + r.registerBinding(r.container, 'pointercancel', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + removePointer(e); + addTouchesToEvent(e); + touchcancelHandler(e); + }); + r.registerBinding(r.container, 'pointermove', function (e) { + if (pointerIsMouse(e)) { + return; + } // mouse already handled + + e.preventDefault(); + updatePointer(e); + addTouchesToEvent(e); + touchmoveHandler(e); + }); + } + }; + + var BRp$2 = {}; + BRp$2.generatePolygon = function (name, points) { + return this.nodeShapes[name] = { + renderer: this, + name: name, + points: points, + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl('polygon', context, centerX, centerY, width, height, this.points); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return polygonIntersectLine(x, y, this.points, nodeX, nodeY, width / 2, height / 2, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return pointInsidePolygon(x, y, this.points, centerX, centerY, width, height, [0, -1], padding); + } + }; + }; + BRp$2.generateEllipse = function () { + return this.nodeShapes['ellipse'] = { + renderer: this, + name: 'ellipse', + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return intersectLineEllipse(x, y, nodeX, nodeY, width / 2 + padding, height / 2 + padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return checkInEllipse(x, y, width, height, centerX, centerY, padding); + } + }; + }; + BRp$2.generateRoundPolygon = function (name, points) { + // Pre-compute control points + // Since these points depend on the radius length (which in turns depend on the width/height of the node) we will only pre-compute + // the unit vectors. + // For simplicity the layout will be: + // [ p0, UnitVectorP0P1, p1, UniVectorP1P2, ..., pn, UnitVectorPnP0 ] + var allPoints = new Array(points.length * 2); + for (var i = 0; i < points.length / 2; i++) { + var sourceIndex = i * 2; + var destIndex = void 0; + if (i < points.length / 2 - 1) { + destIndex = (i + 1) * 2; + } else { + destIndex = 0; + } + allPoints[i * 4] = points[sourceIndex]; + allPoints[i * 4 + 1] = points[sourceIndex + 1]; + var xDest = points[destIndex] - points[sourceIndex]; + var yDest = points[destIndex + 1] - points[sourceIndex + 1]; + var norm = Math.sqrt(xDest * xDest + yDest * yDest); + allPoints[i * 4 + 2] = xDest / norm; + allPoints[i * 4 + 3] = yDest / norm; + } + return this.nodeShapes[name] = { + renderer: this, + name: name, + points: allPoints, + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl('round-polygon', context, centerX, centerY, width, height, this.points); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return roundPolygonIntersectLine(x, y, this.points, nodeX, nodeY, width, height); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + return pointInsideRoundPolygon(x, y, this.points, centerX, centerY, width, height); + } + }; + }; + BRp$2.generateRoundRectangle = function () { + return this.nodeShapes['round-rectangle'] = this.nodeShapes['roundrectangle'] = { + renderer: this, + name: 'round-rectangle', + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var cornerRadius = getRoundRectangleRadius(width, height); + var diam = cornerRadius * 2; + + // Check hBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { + return true; + } + + // Check vBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { + return true; + } + + // Check top left quarter circle + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY - height / 2 + cornerRadius, padding)) { + return true; + } + + // Check top right quarter circle + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY - height / 2 + cornerRadius, padding)) { + return true; + } + + // Check bottom right quarter circle + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + + // Check bottom left quarter circle + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + return false; + } + }; + }; + BRp$2.generateCutRectangle = function () { + return this.nodeShapes['cut-rectangle'] = this.nodeShapes['cutrectangle'] = { + renderer: this, + name: 'cut-rectangle', + cornerLength: getCutRectangleCornerLength(), + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + generateCutTrianglePts: function generateCutTrianglePts(width, height, centerX, centerY) { + var cl = this.cornerLength; + var hh = height / 2; + var hw = width / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; + + // points are in clockwise order, inner (imaginary) triangle pt on [4, 5] + return { + topLeft: [xBegin, yBegin + cl, xBegin + cl, yBegin, xBegin + cl, yBegin + cl], + topRight: [xEnd - cl, yBegin, xEnd, yBegin + cl, xEnd - cl, yBegin + cl], + bottomRight: [xEnd, yEnd - cl, xEnd - cl, yEnd, xEnd - cl, yEnd - cl], + bottomLeft: [xBegin + cl, yEnd, xBegin, yEnd - cl, xBegin + cl, yEnd - cl] + }; + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + var cPts = this.generateCutTrianglePts(width + 2 * padding, height + 2 * padding, nodeX, nodeY); + var pts = [].concat.apply([], [cPts.topLeft.splice(0, 4), cPts.topRight.splice(0, 4), cPts.bottomRight.splice(0, 4), cPts.bottomLeft.splice(0, 4)]); + return polygonIntersectLine(x, y, pts, nodeX, nodeY); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + // Check hBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * this.cornerLength, [0, -1], padding)) { + return true; + } + + // Check vBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * this.cornerLength, height, [0, -1], padding)) { + return true; + } + var cutTrianglePts = this.generateCutTrianglePts(width, height, centerX, centerY); + return pointInsidePolygonPoints(x, y, cutTrianglePts.topLeft) || pointInsidePolygonPoints(x, y, cutTrianglePts.topRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomLeft); + } + }; + }; + BRp$2.generateBarrel = function () { + return this.nodeShapes['barrel'] = { + renderer: this, + name: 'barrel', + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + // use two fixed t values for the bezier curve approximation + + var t0 = 0.15; + var t1 = 0.5; + var t2 = 0.85; + var bPts = this.generateBarrelBezierPts(width + 2 * padding, height + 2 * padding, nodeX, nodeY); + var approximateBarrelCurvePts = function approximateBarrelCurvePts(pts) { + // approximate curve pts based on the two t values + var m0 = qbezierPtAt({ + x: pts[0], + y: pts[1] + }, { + x: pts[2], + y: pts[3] + }, { + x: pts[4], + y: pts[5] + }, t0); + var m1 = qbezierPtAt({ + x: pts[0], + y: pts[1] + }, { + x: pts[2], + y: pts[3] + }, { + x: pts[4], + y: pts[5] + }, t1); + var m2 = qbezierPtAt({ + x: pts[0], + y: pts[1] + }, { + x: pts[2], + y: pts[3] + }, { + x: pts[4], + y: pts[5] + }, t2); + return [pts[0], pts[1], m0.x, m0.y, m1.x, m1.y, m2.x, m2.y, pts[4], pts[5]]; + }; + var pts = [].concat(approximateBarrelCurvePts(bPts.topLeft), approximateBarrelCurvePts(bPts.topRight), approximateBarrelCurvePts(bPts.bottomRight), approximateBarrelCurvePts(bPts.bottomLeft)); + return polygonIntersectLine(x, y, pts, nodeX, nodeY); + }, + generateBarrelBezierPts: function generateBarrelBezierPts(width, height, centerX, centerY) { + var hh = height / 2; + var hw = width / 2; + var xBegin = centerX - hw; + var xEnd = centerX + hw; + var yBegin = centerY - hh; + var yEnd = centerY + hh; + var curveConstants = getBarrelCurveConstants(width, height); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; + var ctrlPtXOffset = curveConstants.ctrlPtOffsetPct * width; + + // points are in clockwise order, inner (imaginary) control pt on [4, 5] + var pts = { + topLeft: [xBegin, yBegin + hOffset, xBegin + ctrlPtXOffset, yBegin, xBegin + wOffset, yBegin], + topRight: [xEnd - wOffset, yBegin, xEnd - ctrlPtXOffset, yBegin, xEnd, yBegin + hOffset], + bottomRight: [xEnd, yEnd - hOffset, xEnd - ctrlPtXOffset, yEnd, xEnd - wOffset, yEnd], + bottomLeft: [xBegin + wOffset, yEnd, xBegin + ctrlPtXOffset, yEnd, xBegin, yEnd - hOffset] + }; + pts.topLeft.isTop = true; + pts.topRight.isTop = true; + pts.bottomLeft.isBottom = true; + pts.bottomRight.isBottom = true; + return pts; + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var curveConstants = getBarrelCurveConstants(width, height); + var hOffset = curveConstants.heightOffset; + var wOffset = curveConstants.widthOffset; + + // Check hBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * hOffset, [0, -1], padding)) { + return true; + } + + // Check vBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * wOffset, height, [0, -1], padding)) { + return true; + } + var barrelCurvePts = this.generateBarrelBezierPts(width, height, centerX, centerY); + var getCurveT = function getCurveT(x, y, curvePts) { + var x0 = curvePts[4]; + var x1 = curvePts[2]; + var x2 = curvePts[0]; + var y0 = curvePts[5]; + // var y1 = curvePts[ 3 ]; + var y2 = curvePts[1]; + var xMin = Math.min(x0, x2); + var xMax = Math.max(x0, x2); + var yMin = Math.min(y0, y2); + var yMax = Math.max(y0, y2); + if (xMin <= x && x <= xMax && yMin <= y && y <= yMax) { + var coeff = bezierPtsToQuadCoeff(x0, x1, x2); + var roots = solveQuadratic(coeff[0], coeff[1], coeff[2], x); + var validRoots = roots.filter(function (r) { + return 0 <= r && r <= 1; + }); + if (validRoots.length > 0) { + return validRoots[0]; + } + } + return null; + }; + var curveRegions = Object.keys(barrelCurvePts); + for (var i = 0; i < curveRegions.length; i++) { + var corner = curveRegions[i]; + var cornerPts = barrelCurvePts[corner]; + var t = getCurveT(x, y, cornerPts); + if (t == null) { + continue; + } + var y0 = cornerPts[5]; + var y1 = cornerPts[3]; + var y2 = cornerPts[1]; + var bezY = qbezierAt(y0, y1, y2, t); + if (cornerPts.isTop && bezY <= y) { + return true; + } + if (cornerPts.isBottom && y <= bezY) { + return true; + } + } + return false; + } + }; + }; + BRp$2.generateBottomRoundrectangle = function () { + return this.nodeShapes['bottom-round-rectangle'] = this.nodeShapes['bottomroundrectangle'] = { + renderer: this, + name: 'bottom-round-rectangle', + points: generateUnitNgonPointsFitToSquare(4, 0), + draw: function draw(context, centerX, centerY, width, height) { + this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); + }, + intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { + var topStartX = nodeX - (width / 2 + padding); + var topStartY = nodeY - (height / 2 + padding); + var topEndY = topStartY; + var topEndX = nodeX + (width / 2 + padding); + var topIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); + if (topIntersections.length > 0) { + return topIntersections; + } + return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding); + }, + checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { + var cornerRadius = getRoundRectangleRadius(width, height); + var diam = 2 * cornerRadius; + + // Check hBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { + return true; + } + + // Check vBox + if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { + return true; + } + + // check non-rounded top side + var outerWidth = width / 2 + 2 * padding; + var outerHeight = height / 2 + 2 * padding; + var points = [centerX - outerWidth, centerY - outerHeight, centerX - outerWidth, centerY, centerX + outerWidth, centerY, centerX + outerWidth, centerY - outerHeight]; + if (pointInsidePolygonPoints(x, y, points)) { + return true; + } + + // Check bottom right quarter circle + if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + + // Check bottom left quarter circle + if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) { + return true; + } + return false; + } + }; + }; + BRp$2.registerNodeShapes = function () { + var nodeShapes = this.nodeShapes = {}; + var renderer = this; + this.generateEllipse(); + this.generatePolygon('triangle', generateUnitNgonPointsFitToSquare(3, 0)); + this.generateRoundPolygon('round-triangle', generateUnitNgonPointsFitToSquare(3, 0)); + this.generatePolygon('rectangle', generateUnitNgonPointsFitToSquare(4, 0)); + nodeShapes['square'] = nodeShapes['rectangle']; + this.generateRoundRectangle(); + this.generateCutRectangle(); + this.generateBarrel(); + this.generateBottomRoundrectangle(); + { + var diamondPoints = [0, 1, 1, 0, 0, -1, -1, 0]; + this.generatePolygon('diamond', diamondPoints); + this.generateRoundPolygon('round-diamond', diamondPoints); + } + this.generatePolygon('pentagon', generateUnitNgonPointsFitToSquare(5, 0)); + this.generateRoundPolygon('round-pentagon', generateUnitNgonPointsFitToSquare(5, 0)); + this.generatePolygon('hexagon', generateUnitNgonPointsFitToSquare(6, 0)); + this.generateRoundPolygon('round-hexagon', generateUnitNgonPointsFitToSquare(6, 0)); + this.generatePolygon('heptagon', generateUnitNgonPointsFitToSquare(7, 0)); + this.generateRoundPolygon('round-heptagon', generateUnitNgonPointsFitToSquare(7, 0)); + this.generatePolygon('octagon', generateUnitNgonPointsFitToSquare(8, 0)); + this.generateRoundPolygon('round-octagon', generateUnitNgonPointsFitToSquare(8, 0)); + var star5Points = new Array(20); + { + var outerPoints = generateUnitNgonPoints(5, 0); + var innerPoints = generateUnitNgonPoints(5, Math.PI / 5); + + // Outer radius is 1; inner radius of star is smaller + var innerRadius = 0.5 * (3 - Math.sqrt(5)); + innerRadius *= 1.57; + for (var i = 0; i < innerPoints.length / 2; i++) { + innerPoints[i * 2] *= innerRadius; + innerPoints[i * 2 + 1] *= innerRadius; + } + for (var i = 0; i < 20 / 4; i++) { + star5Points[i * 4] = outerPoints[i * 2]; + star5Points[i * 4 + 1] = outerPoints[i * 2 + 1]; + star5Points[i * 4 + 2] = innerPoints[i * 2]; + star5Points[i * 4 + 3] = innerPoints[i * 2 + 1]; + } + } + star5Points = fitPolygonToSquare(star5Points); + this.generatePolygon('star', star5Points); + this.generatePolygon('vee', [-1, -1, 0, -0.333, 1, -1, 0, 1]); + this.generatePolygon('rhomboid', [-1, -1, 0.333, -1, 1, 1, -0.333, 1]); + this.generatePolygon('right-rhomboid', [-0.333, -1, 1, -1, 0.333, 1, -1, 1]); + this.nodeShapes['concavehexagon'] = this.generatePolygon('concave-hexagon', [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]); + { + var tagPoints = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1]; + this.generatePolygon('tag', tagPoints); + this.generateRoundPolygon('round-tag', tagPoints); + } + nodeShapes.makePolygon = function (points) { + // use caching on user-specified polygons so they are as fast as native shapes + + var key = points.join('$'); + var name = 'polygon-' + key; + var shape; + if (shape = this[name]) { + // got cached shape + return shape; + } + + // create and cache new shape + return renderer.generatePolygon(name, points); + }; + }; + + var BRp$1 = {}; + BRp$1.timeToRender = function () { + return this.redrawTotalTime / this.redrawCount; + }; + BRp$1.redraw = function (options) { + options = options || staticEmptyObject(); + var r = this; + if (r.averageRedrawTime === undefined) { + r.averageRedrawTime = 0; + } + if (r.lastRedrawTime === undefined) { + r.lastRedrawTime = 0; + } + if (r.lastDrawTime === undefined) { + r.lastDrawTime = 0; + } + r.requestedFrame = true; + r.renderOptions = options; + }; + BRp$1.beforeRender = function (fn, priority) { + // the renderer can't add tick callbacks when destroyed + if (this.destroyed) { + return; + } + if (priority == null) { + error('Priority is not optional for beforeRender'); + } + var cbs = this.beforeRenderCallbacks; + cbs.push({ + fn: fn, + priority: priority + }); + + // higher priority callbacks executed first + cbs.sort(function (a, b) { + return b.priority - a.priority; + }); + }; + var beforeRenderCallbacks = function beforeRenderCallbacks(r, willDraw, startTime) { + var cbs = r.beforeRenderCallbacks; + for (var i = 0; i < cbs.length; i++) { + cbs[i].fn(willDraw, startTime); + } + }; + BRp$1.startRenderLoop = function () { + var r = this; + var cy = r.cy; + if (r.renderLoopStarted) { + return; + } else { + r.renderLoopStarted = true; + } + var renderFn = function renderFn(requestTime) { + if (r.destroyed) { + return; + } + if (cy.batching()) ; else if (r.requestedFrame && !r.skipFrame) { + beforeRenderCallbacks(r, true, requestTime); + var startTime = performanceNow(); + r.render(r.renderOptions); + var endTime = r.lastDrawTime = performanceNow(); + if (r.averageRedrawTime === undefined) { + r.averageRedrawTime = endTime - startTime; + } + if (r.redrawCount === undefined) { + r.redrawCount = 0; + } + r.redrawCount++; + if (r.redrawTotalTime === undefined) { + r.redrawTotalTime = 0; + } + var duration = endTime - startTime; + r.redrawTotalTime += duration; + r.lastRedrawTime = duration; + + // use a weighted average with a bias from the previous average so we don't spike so easily + r.averageRedrawTime = r.averageRedrawTime / 2 + duration / 2; + r.requestedFrame = false; + } else { + beforeRenderCallbacks(r, false, requestTime); + } + r.skipFrame = false; + requestAnimationFrame(renderFn); + }; + requestAnimationFrame(renderFn); + }; + + var BaseRenderer = function BaseRenderer(options) { + this.init(options); + }; + var BR = BaseRenderer; + var BRp = BR.prototype; + BRp.clientFunctions = ['redrawHint', 'render', 'renderTo', 'matchCanvasSize', 'nodeShapeImpl', 'arrowShapeImpl']; + BRp.init = function (options) { + var r = this; + r.options = options; + r.cy = options.cy; + var ctr = r.container = options.cy.container(); + var containerWindow = r.cy.window(); + + // prepend a stylesheet in the head such that + if (containerWindow) { + var document = containerWindow.document; + var head = document.head; + var stylesheetId = '__________cytoscape_stylesheet'; + var className = '__________cytoscape_container'; + var stylesheetAlreadyExists = document.getElementById(stylesheetId) != null; + if (ctr.className.indexOf(className) < 0) { + ctr.className = (ctr.className || '') + ' ' + className; + } + if (!stylesheetAlreadyExists) { + var stylesheet = document.createElement('style'); + stylesheet.id = stylesheetId; + stylesheet.textContent = '.' + className + ' { position: relative; }'; + head.insertBefore(stylesheet, head.children[0]); // first so lowest priority + } + + var computedStyle = containerWindow.getComputedStyle(ctr); + var position = computedStyle.getPropertyValue('position'); + if (position === 'static') { + warn('A Cytoscape container has style position:static and so can not use UI extensions properly'); + } + } + r.selection = [undefined, undefined, undefined, undefined, 0]; // Coordinates for selection box, plus enabled flag + + r.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95]; + + //--Pointer-related data + r.hoverData = { + down: null, + last: null, + downTime: null, + triggerMode: null, + dragging: false, + initialPan: [null, null], + capture: false + }; + r.dragData = { + possibleDragElements: [] + }; + r.touchData = { + start: null, + capture: false, + // These 3 fields related to tap, taphold events + startPosition: [null, null, null, null, null, null], + singleTouchStartTime: null, + singleTouchMoved: true, + now: [null, null, null, null, null, null], + earlier: [null, null, null, null, null, null] + }; + r.redraws = 0; + r.showFps = options.showFps; + r.debug = options.debug; + r.hideEdgesOnViewport = options.hideEdgesOnViewport; + r.textureOnViewport = options.textureOnViewport; + r.wheelSensitivity = options.wheelSensitivity; + r.motionBlurEnabled = options.motionBlur; // on by default + r.forcedPixelRatio = number$1(options.pixelRatio) ? options.pixelRatio : null; + r.motionBlur = options.motionBlur; // for initial kick off + r.motionBlurOpacity = options.motionBlurOpacity; + r.motionBlurTransparency = 1 - r.motionBlurOpacity; + r.motionBlurPxRatio = 1; + r.mbPxRBlurry = 1; //0.8; + r.minMbLowQualFrames = 4; + r.fullQualityMb = false; + r.clearedForMotionBlur = []; + r.desktopTapThreshold = options.desktopTapThreshold; + r.desktopTapThreshold2 = options.desktopTapThreshold * options.desktopTapThreshold; + r.touchTapThreshold = options.touchTapThreshold; + r.touchTapThreshold2 = options.touchTapThreshold * options.touchTapThreshold; + r.tapholdDuration = 500; + r.bindings = []; + r.beforeRenderCallbacks = []; + r.beforeRenderPriorities = { + // higher priority execs before lower one + animations: 400, + eleCalcs: 300, + eleTxrDeq: 200, + lyrTxrDeq: 150, + lyrTxrSkip: 100 + }; + r.registerNodeShapes(); + r.registerArrowShapes(); + r.registerCalculationListeners(); + }; + BRp.notify = function (eventName, eles) { + var r = this; + var cy = r.cy; + + // the renderer can't be notified after it's destroyed + if (this.destroyed) { + return; + } + if (eventName === 'init') { + r.load(); + return; + } + if (eventName === 'destroy') { + r.destroy(); + return; + } + if (eventName === 'add' || eventName === 'remove' || eventName === 'move' && cy.hasCompoundNodes() || eventName === 'load' || eventName === 'zorder' || eventName === 'mount') { + r.invalidateCachedZSortedEles(); + } + if (eventName === 'viewport') { + r.redrawHint('select', true); + } + if (eventName === 'load' || eventName === 'resize' || eventName === 'mount') { + r.invalidateContainerClientCoordsCache(); + r.matchCanvasSize(r.container); + } + r.redrawHint('eles', true); + r.redrawHint('drag', true); + this.startRenderLoop(); + this.redraw(); + }; + BRp.destroy = function () { + var r = this; + r.destroyed = true; + r.cy.stopAnimationLoop(); + for (var i = 0; i < r.bindings.length; i++) { + var binding = r.bindings[i]; + var b = binding; + var tgt = b.target; + (tgt.off || tgt.removeEventListener).apply(tgt, b.args); + } + r.bindings = []; + r.beforeRenderCallbacks = []; + r.onUpdateEleCalcsFns = []; + if (r.removeObserver) { + r.removeObserver.disconnect(); + } + if (r.styleObserver) { + r.styleObserver.disconnect(); + } + if (r.resizeObserver) { + r.resizeObserver.disconnect(); + } + if (r.labelCalcDiv) { + try { + document.body.removeChild(r.labelCalcDiv); // eslint-disable-line no-undef + } catch (e) { + // ie10 issue #1014 + } + } + }; + BRp.isHeadless = function () { + return false; + }; + [BRp$f, BRp$5, BRp$4, BRp$3, BRp$2, BRp$1].forEach(function (props) { + extend(BRp, props); + }); + + var fullFpsTime = 1000 / 60; // assume 60 frames per second + + var defs = { + setupDequeueing: function setupDequeueing(opts) { + return function setupDequeueingImpl() { + var self = this; + var r = this.renderer; + if (self.dequeueingSetup) { + return; + } else { + self.dequeueingSetup = true; + } + var queueRedraw = debounce_1(function () { + r.redrawHint('eles', true); + r.redrawHint('drag', true); + r.redraw(); + }, opts.deqRedrawThreshold); + var dequeue = function dequeue(willDraw, frameStartTime) { + var startTime = performanceNow(); + var avgRenderTime = r.averageRedrawTime; + var renderTime = r.lastRedrawTime; + var deqd = []; + var extent = r.cy.extent(); + var pixelRatio = r.getPixelRatio(); + + // if we aren't in a tick that causes a draw, then the rendered style + // queue won't automatically be flushed before dequeueing starts + if (!willDraw) { + r.flushRenderedStyleQueue(); + } + while (true) { + // eslint-disable-line no-constant-condition + var now = performanceNow(); + var duration = now - startTime; + var frameDuration = now - frameStartTime; + if (renderTime < fullFpsTime) { + // if we're rendering faster than the ideal fps, then do dequeueing + // during all of the remaining frame time + + var timeAvailable = fullFpsTime - (willDraw ? avgRenderTime : 0); + if (frameDuration >= opts.deqFastCost * timeAvailable) { + break; + } + } else { + if (willDraw) { + if (duration >= opts.deqCost * renderTime || duration >= opts.deqAvgCost * avgRenderTime) { + break; + } + } else if (frameDuration >= opts.deqNoDrawCost * fullFpsTime) { + break; + } + } + var thisDeqd = opts.deq(self, pixelRatio, extent); + if (thisDeqd.length > 0) { + for (var i = 0; i < thisDeqd.length; i++) { + deqd.push(thisDeqd[i]); + } + } else { + break; + } + } + + // callbacks on dequeue + if (deqd.length > 0) { + opts.onDeqd(self, deqd); + if (!willDraw && opts.shouldRedraw(self, deqd, pixelRatio, extent)) { + queueRedraw(); + } + } + }; + var priority = opts.priority || noop$1; + r.beforeRender(dequeue, priority(self)); + }; + } + }; + + // Allows lookups for (ele, lvl) => cache. + // Uses keys so elements may share the same cache. + var ElementTextureCacheLookup = /*#__PURE__*/function () { + function ElementTextureCacheLookup(getKey) { + var doesEleInvalidateKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : falsify; + _classCallCheck(this, ElementTextureCacheLookup); + this.idsByKey = new Map$2(); + this.keyForId = new Map$2(); + this.cachesByLvl = new Map$2(); + this.lvls = []; + this.getKey = getKey; + this.doesEleInvalidateKey = doesEleInvalidateKey; + } + _createClass(ElementTextureCacheLookup, [{ + key: "getIdsFor", + value: function getIdsFor(key) { + if (key == null) { + error("Can not get id list for null key"); + } + var idsByKey = this.idsByKey; + var ids = this.idsByKey.get(key); + if (!ids) { + ids = new Set$1(); + idsByKey.set(key, ids); + } + return ids; + } + }, { + key: "addIdForKey", + value: function addIdForKey(key, id) { + if (key != null) { + this.getIdsFor(key).add(id); + } + } + }, { + key: "deleteIdForKey", + value: function deleteIdForKey(key, id) { + if (key != null) { + this.getIdsFor(key)["delete"](id); + } + } + }, { + key: "getNumberOfIdsForKey", + value: function getNumberOfIdsForKey(key) { + if (key == null) { + return 0; + } else { + return this.getIdsFor(key).size; + } + } + }, { + key: "updateKeyMappingFor", + value: function updateKeyMappingFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + var currKey = this.getKey(ele); + this.deleteIdForKey(prevKey, id); + this.addIdForKey(currKey, id); + this.keyForId.set(id, currKey); + } + }, { + key: "deleteKeyMappingFor", + value: function deleteKeyMappingFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + this.deleteIdForKey(prevKey, id); + this.keyForId["delete"](id); + } + }, { + key: "keyHasChangedFor", + value: function keyHasChangedFor(ele) { + var id = ele.id(); + var prevKey = this.keyForId.get(id); + var newKey = this.getKey(ele); + return prevKey !== newKey; + } + }, { + key: "isInvalid", + value: function isInvalid(ele) { + return this.keyHasChangedFor(ele) || this.doesEleInvalidateKey(ele); + } + }, { + key: "getCachesAt", + value: function getCachesAt(lvl) { + var cachesByLvl = this.cachesByLvl, + lvls = this.lvls; + var caches = cachesByLvl.get(lvl); + if (!caches) { + caches = new Map$2(); + cachesByLvl.set(lvl, caches); + lvls.push(lvl); + } + return caches; + } + }, { + key: "getCache", + value: function getCache(key, lvl) { + return this.getCachesAt(lvl).get(key); + } + }, { + key: "get", + value: function get(ele, lvl) { + var key = this.getKey(ele); + var cache = this.getCache(key, lvl); + + // getting for an element may need to add to the id list b/c eles can share keys + if (cache != null) { + this.updateKeyMappingFor(ele); + } + return cache; + } + }, { + key: "getForCachedKey", + value: function getForCachedKey(ele, lvl) { + var key = this.keyForId.get(ele.id()); // n.b. use cached key, not newly computed key + var cache = this.getCache(key, lvl); + return cache; + } + }, { + key: "hasCache", + value: function hasCache(key, lvl) { + return this.getCachesAt(lvl).has(key); + } + }, { + key: "has", + value: function has(ele, lvl) { + var key = this.getKey(ele); + return this.hasCache(key, lvl); + } + }, { + key: "setCache", + value: function setCache(key, lvl, cache) { + cache.key = key; + this.getCachesAt(lvl).set(key, cache); + } + }, { + key: "set", + value: function set(ele, lvl, cache) { + var key = this.getKey(ele); + this.setCache(key, lvl, cache); + this.updateKeyMappingFor(ele); + } + }, { + key: "deleteCache", + value: function deleteCache(key, lvl) { + this.getCachesAt(lvl)["delete"](key); + } + }, { + key: "delete", + value: function _delete(ele, lvl) { + var key = this.getKey(ele); + this.deleteCache(key, lvl); + } + }, { + key: "invalidateKey", + value: function invalidateKey(key) { + var _this = this; + this.lvls.forEach(function (lvl) { + return _this.deleteCache(key, lvl); + }); + } + + // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key) + }, { + key: "invalidate", + value: function invalidate(ele) { + var id = ele.id(); + var key = this.keyForId.get(id); // n.b. use stored key rather than current (potential key) + + this.deleteKeyMappingFor(ele); + var entireKeyInvalidated = this.doesEleInvalidateKey(ele); + if (entireKeyInvalidated) { + // clear mapping for current key + this.invalidateKey(key); + } + return entireKeyInvalidated || this.getNumberOfIdsForKey(key) === 0; + } + }]); + return ElementTextureCacheLookup; + }(); + + var minTxrH = 25; // the size of the texture cache for small height eles (special case) + var txrStepH = 50; // the min size of the regular cache, and the size it increases with each step up + var minLvl$1 = -4; // when scaling smaller than that we don't need to re-render + var maxLvl$1 = 3; // when larger than this scale just render directly (caching is not helpful) + var maxZoom$1 = 7.99; // beyond this zoom level, layered textures are not used + var eleTxrSpacing = 8; // spacing between elements on textures to avoid blitting overlaps + var defTxrWidth = 1024; // default/minimum texture width + var maxTxrW = 1024; // the maximum width of a texture + var maxTxrH = 1024; // the maximum height of a texture + var minUtility = 0.2; // if usage of texture is less than this, it is retired + var maxFullness = 0.8; // fullness of texture after which queue removal is checked + var maxFullnessChecks = 10; // dequeued after this many checks + var deqCost$1 = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame + var deqAvgCost$1 = 0.1; // % of add'l rendering cost compared to average overall redraw time + var deqNoDrawCost$1 = 0.9; // % of avg frame time that can be used for dequeueing when not drawing + var deqFastCost$1 = 0.9; // % of frame time to be used when >60fps + var deqRedrawThreshold$1 = 100; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile + var maxDeqSize$1 = 1; // number of eles to dequeue and render at higher texture in each batch + + var getTxrReasons = { + dequeue: 'dequeue', + downscale: 'downscale', + highQuality: 'highQuality' + }; + var initDefaults = defaults$g({ + getKey: null, + doesEleInvalidateKey: falsify, + drawElement: null, + getBoundingBox: null, + getRotationPoint: null, + getRotationOffset: null, + isVisible: trueify, + allowEdgeTxrCaching: true, + allowParentTxrCaching: true + }); + var ElementTextureCache = function ElementTextureCache(renderer, initOptions) { + var self = this; + self.renderer = renderer; + self.onDequeues = []; + var opts = initDefaults(initOptions); + extend(self, opts); + self.lookup = new ElementTextureCacheLookup(opts.getKey, opts.doesEleInvalidateKey); + self.setupDequeueing(); + }; + var ETCp = ElementTextureCache.prototype; + ETCp.reasons = getTxrReasons; + + // the list of textures in which new subtextures for elements can be placed + ETCp.getTextureQueue = function (txrH) { + var self = this; + self.eleImgCaches = self.eleImgCaches || {}; + return self.eleImgCaches[txrH] = self.eleImgCaches[txrH] || []; + }; + + // the list of usused textures which can be recycled (in use in texture queue) + ETCp.getRetiredTextureQueue = function (txrH) { + var self = this; + var rtxtrQs = self.eleImgCaches.retired = self.eleImgCaches.retired || {}; + var rtxtrQ = rtxtrQs[txrH] = rtxtrQs[txrH] || []; + return rtxtrQ; + }; + + // queue of element draw requests at different scale levels + ETCp.getElementQueue = function () { + var self = this; + var q = self.eleCacheQueue = self.eleCacheQueue || new heap(function (a, b) { + return b.reqs - a.reqs; + }); + return q; + }; + + // queue of element draw requests at different scale levels (element id lookup) + ETCp.getElementKeyToQueue = function () { + var self = this; + var k2q = self.eleKeyToCacheQueue = self.eleKeyToCacheQueue || {}; + return k2q; + }; + ETCp.getElement = function (ele, bb, pxRatio, lvl, reason) { + var self = this; + var r = this.renderer; + var zoom = r.cy.zoom(); + var lookup = this.lookup; + if (!bb || bb.w === 0 || bb.h === 0 || isNaN(bb.w) || isNaN(bb.h) || !ele.visible() || ele.removed()) { + return null; + } + if (!self.allowEdgeTxrCaching && ele.isEdge() || !self.allowParentTxrCaching && ele.isParent()) { + return null; + } + if (lvl == null) { + lvl = Math.ceil(log2(zoom * pxRatio)); + } + if (lvl < minLvl$1) { + lvl = minLvl$1; + } else if (zoom >= maxZoom$1 || lvl > maxLvl$1) { + return null; + } + var scale = Math.pow(2, lvl); + var eleScaledH = bb.h * scale; + var eleScaledW = bb.w * scale; + var scaledLabelShown = r.eleTextBiggerThanMin(ele, scale); + if (!this.isVisible(ele, scaledLabelShown)) { + return null; + } + var eleCache = lookup.get(ele, lvl); + + // if this get was on an unused/invalidated cache, then restore the texture usage metric + if (eleCache && eleCache.invalidated) { + eleCache.invalidated = false; + eleCache.texture.invalidatedWidth -= eleCache.width; + } + if (eleCache) { + return eleCache; + } + var txrH; // which texture height this ele belongs to + + if (eleScaledH <= minTxrH) { + txrH = minTxrH; + } else if (eleScaledH <= txrStepH) { + txrH = txrStepH; + } else { + txrH = Math.ceil(eleScaledH / txrStepH) * txrStepH; + } + if (eleScaledH > maxTxrH || eleScaledW > maxTxrW) { + return null; // caching large elements is not efficient + } + + var txrQ = self.getTextureQueue(txrH); + + // first try the second last one in case it has space at the end + var txr = txrQ[txrQ.length - 2]; + var addNewTxr = function addNewTxr() { + return self.recycleTexture(txrH, eleScaledW) || self.addTexture(txrH, eleScaledW); + }; + + // try the last one if there is no second last one + if (!txr) { + txr = txrQ[txrQ.length - 1]; + } + + // if the last one doesn't exist, we need a first one + if (!txr) { + txr = addNewTxr(); + } + + // if there's no room in the current texture, we need a new one + if (txr.width - txr.usedWidth < eleScaledW) { + txr = addNewTxr(); + } + var scalableFrom = function scalableFrom(otherCache) { + return otherCache && otherCache.scaledLabelShown === scaledLabelShown; + }; + var deqing = reason && reason === getTxrReasons.dequeue; + var highQualityReq = reason && reason === getTxrReasons.highQuality; + var downscaleReq = reason && reason === getTxrReasons.downscale; + var higherCache; // the nearest cache with a higher level + for (var l = lvl + 1; l <= maxLvl$1; l++) { + var c = lookup.get(ele, l); + if (c) { + higherCache = c; + break; + } + } + var oneUpCache = higherCache && higherCache.level === lvl + 1 ? higherCache : null; + var downscale = function downscale() { + txr.context.drawImage(oneUpCache.texture.canvas, oneUpCache.x, 0, oneUpCache.width, oneUpCache.height, txr.usedWidth, 0, eleScaledW, eleScaledH); + }; + + // reset ele area in texture + txr.context.setTransform(1, 0, 0, 1, 0, 0); + txr.context.clearRect(txr.usedWidth, 0, eleScaledW, txrH); + if (scalableFrom(oneUpCache)) { + // then we can relatively cheaply rescale the existing image w/o rerendering + downscale(); + } else if (scalableFrom(higherCache)) { + // then use the higher cache for now and queue the next level down + // to cheaply scale towards the smaller level + + if (highQualityReq) { + for (var _l = higherCache.level; _l > lvl; _l--) { + oneUpCache = self.getElement(ele, bb, pxRatio, _l, getTxrReasons.downscale); + } + downscale(); + } else { + self.queueElement(ele, higherCache.level - 1); + return higherCache; + } + } else { + var lowerCache; // the nearest cache with a lower level + if (!deqing && !highQualityReq && !downscaleReq) { + for (var _l2 = lvl - 1; _l2 >= minLvl$1; _l2--) { + var _c = lookup.get(ele, _l2); + if (_c) { + lowerCache = _c; + break; + } + } + } + if (scalableFrom(lowerCache)) { + // then use the lower quality cache for now and queue the better one for later + + self.queueElement(ele, lvl); + return lowerCache; + } + txr.context.translate(txr.usedWidth, 0); + txr.context.scale(scale, scale); + this.drawElement(txr.context, ele, bb, scaledLabelShown, false); + txr.context.scale(1 / scale, 1 / scale); + txr.context.translate(-txr.usedWidth, 0); + } + eleCache = { + x: txr.usedWidth, + texture: txr, + level: lvl, + scale: scale, + width: eleScaledW, + height: eleScaledH, + scaledLabelShown: scaledLabelShown + }; + txr.usedWidth += Math.ceil(eleScaledW + eleTxrSpacing); + txr.eleCaches.push(eleCache); + lookup.set(ele, lvl, eleCache); + self.checkTextureFullness(txr); + return eleCache; + }; + ETCp.invalidateElements = function (eles) { + for (var i = 0; i < eles.length; i++) { + this.invalidateElement(eles[i]); + } + }; + ETCp.invalidateElement = function (ele) { + var self = this; + var lookup = self.lookup; + var caches = []; + var invalid = lookup.isInvalid(ele); + if (!invalid) { + return; // override the invalidation request if the element key has not changed + } + + for (var lvl = minLvl$1; lvl <= maxLvl$1; lvl++) { + var cache = lookup.getForCachedKey(ele, lvl); + if (cache) { + caches.push(cache); + } + } + var noOtherElesUseCache = lookup.invalidate(ele); + if (noOtherElesUseCache) { + for (var i = 0; i < caches.length; i++) { + var _cache = caches[i]; + var txr = _cache.texture; + + // remove space from the texture it belongs to + txr.invalidatedWidth += _cache.width; + + // mark the cache as invalidated + _cache.invalidated = true; + + // retire the texture if its utility is low + self.checkTextureUtility(txr); + } + } + + // remove from queue since the old req was for the old state + self.removeFromQueue(ele); + }; + ETCp.checkTextureUtility = function (txr) { + // invalidate all entries in the cache if the cache size is small + if (txr.invalidatedWidth >= minUtility * txr.width) { + this.retireTexture(txr); + } + }; + ETCp.checkTextureFullness = function (txr) { + // if texture has been mostly filled and passed over several times, remove + // it from the queue so we don't need to waste time looking at it to put new things + + var self = this; + var txrQ = self.getTextureQueue(txr.height); + if (txr.usedWidth / txr.width > maxFullness && txr.fullnessChecks >= maxFullnessChecks) { + removeFromArray(txrQ, txr); + } else { + txr.fullnessChecks++; + } + }; + ETCp.retireTexture = function (txr) { + var self = this; + var txrH = txr.height; + var txrQ = self.getTextureQueue(txrH); + var lookup = this.lookup; + + // retire the texture from the active / searchable queue: + + removeFromArray(txrQ, txr); + txr.retired = true; + + // remove the refs from the eles to the caches: + + var eleCaches = txr.eleCaches; + for (var i = 0; i < eleCaches.length; i++) { + var eleCache = eleCaches[i]; + lookup.deleteCache(eleCache.key, eleCache.level); + } + clearArray(eleCaches); + + // add the texture to a retired queue so it can be recycled in future: + + var rtxtrQ = self.getRetiredTextureQueue(txrH); + rtxtrQ.push(txr); + }; + ETCp.addTexture = function (txrH, minW) { + var self = this; + var txrQ = self.getTextureQueue(txrH); + var txr = {}; + txrQ.push(txr); + txr.eleCaches = []; + txr.height = txrH; + txr.width = Math.max(defTxrWidth, minW); + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + txr.canvas = self.renderer.makeOffscreenCanvas(txr.width, txr.height); + txr.context = txr.canvas.getContext('2d'); + return txr; + }; + ETCp.recycleTexture = function (txrH, minW) { + var self = this; + var txrQ = self.getTextureQueue(txrH); + var rtxtrQ = self.getRetiredTextureQueue(txrH); + for (var i = 0; i < rtxtrQ.length; i++) { + var txr = rtxtrQ[i]; + if (txr.width >= minW) { + txr.retired = false; + txr.usedWidth = 0; + txr.invalidatedWidth = 0; + txr.fullnessChecks = 0; + clearArray(txr.eleCaches); + txr.context.setTransform(1, 0, 0, 1, 0, 0); + txr.context.clearRect(0, 0, txr.width, txr.height); + removeFromArray(rtxtrQ, txr); + txrQ.push(txr); + return txr; + } + } + }; + ETCp.queueElement = function (ele, lvl) { + var self = this; + var q = self.getElementQueue(); + var k2q = self.getElementKeyToQueue(); + var key = this.getKey(ele); + var existingReq = k2q[key]; + if (existingReq) { + // use the max lvl b/c in between lvls are cheap to make + existingReq.level = Math.max(existingReq.level, lvl); + existingReq.eles.merge(ele); + existingReq.reqs++; + q.updateItem(existingReq); + } else { + var req = { + eles: ele.spawn().merge(ele), + level: lvl, + reqs: 1, + key: key + }; + q.push(req); + k2q[key] = req; + } + }; + ETCp.dequeue = function (pxRatio /*, extent*/) { + var self = this; + var q = self.getElementQueue(); + var k2q = self.getElementKeyToQueue(); + var dequeued = []; + var lookup = self.lookup; + for (var i = 0; i < maxDeqSize$1; i++) { + if (q.size() > 0) { + var req = q.pop(); + var key = req.key; + var ele = req.eles[0]; // all eles have the same key + var cacheExists = lookup.hasCache(ele, req.level); + + // clear out the key to req lookup + k2q[key] = null; + + // dequeueing isn't necessary with an existing cache + if (cacheExists) { + continue; + } + dequeued.push(req); + var bb = self.getBoundingBox(ele); + self.getElement(ele, bb, pxRatio, req.level, getTxrReasons.dequeue); + } else { + break; + } + } + return dequeued; + }; + ETCp.removeFromQueue = function (ele) { + var self = this; + var q = self.getElementQueue(); + var k2q = self.getElementKeyToQueue(); + var key = this.getKey(ele); + var req = k2q[key]; + if (req != null) { + if (req.eles.length === 1) { + // remove if last ele in the req + // bring to front of queue + req.reqs = MAX_INT$1; + q.updateItem(req); + q.pop(); // remove from queue + + k2q[key] = null; // remove from lookup map + } else { + // otherwise just remove ele from req + req.eles.unmerge(ele); + } + } + }; + ETCp.onDequeue = function (fn) { + this.onDequeues.push(fn); + }; + ETCp.offDequeue = function (fn) { + removeFromArray(this.onDequeues, fn); + }; + ETCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold: deqRedrawThreshold$1, + deqCost: deqCost$1, + deqAvgCost: deqAvgCost$1, + deqNoDrawCost: deqNoDrawCost$1, + deqFastCost: deqFastCost$1, + deq: function deq(self, pxRatio, extent) { + return self.dequeue(pxRatio, extent); + }, + onDeqd: function onDeqd(self, deqd) { + for (var i = 0; i < self.onDequeues.length; i++) { + var fn = self.onDequeues[i]; + fn(deqd); + } + }, + shouldRedraw: function shouldRedraw(self, deqd, pxRatio, extent) { + for (var i = 0; i < deqd.length; i++) { + var eles = deqd[i].eles; + for (var j = 0; j < eles.length; j++) { + var bb = eles[j].boundingBox(); + if (boundingBoxesIntersect(bb, extent)) { + return true; + } + } + } + return false; + }, + priority: function priority(self) { + return self.renderer.beforeRenderPriorities.eleTxrDeq; + } + }); + + var defNumLayers = 1; // default number of layers to use + var minLvl = -4; // when scaling smaller than that we don't need to re-render + var maxLvl = 2; // when larger than this scale just render directly (caching is not helpful) + var maxZoom = 3.99; // beyond this zoom level, layered textures are not used + var deqRedrawThreshold = 50; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile + var refineEleDebounceTime = 50; // time to debounce sharper ele texture updates + var deqCost = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame + var deqAvgCost = 0.1; // % of add'l rendering cost compared to average overall redraw time + var deqNoDrawCost = 0.9; // % of avg frame time that can be used for dequeueing when not drawing + var deqFastCost = 0.9; // % of frame time to be used when >60fps + var maxDeqSize = 1; // number of eles to dequeue and render at higher texture in each batch + var invalidThreshold = 250; // time threshold for disabling b/c of invalidations + var maxLayerArea = 4000 * 4000; // layers can't be bigger than this + var useHighQualityEleTxrReqs = true; // whether to use high quality ele txr requests (generally faster and cheaper in the longterm) + + // var log = function(){ console.log.apply( console, arguments ); }; + + var LayeredTextureCache = function LayeredTextureCache(renderer) { + var self = this; + var r = self.renderer = renderer; + var cy = r.cy; + self.layersByLevel = {}; // e.g. 2 => [ layer1, layer2, ..., layerN ] + + self.firstGet = true; + self.lastInvalidationTime = performanceNow() - 2 * invalidThreshold; + self.skipping = false; + self.eleTxrDeqs = cy.collection(); + self.scheduleElementRefinement = debounce_1(function () { + self.refineElementTextures(self.eleTxrDeqs); + self.eleTxrDeqs.unmerge(self.eleTxrDeqs); + }, refineEleDebounceTime); + r.beforeRender(function (willDraw, now) { + if (now - self.lastInvalidationTime <= invalidThreshold) { + self.skipping = true; + } else { + self.skipping = false; + } + }, r.beforeRenderPriorities.lyrTxrSkip); + var qSort = function qSort(a, b) { + return b.reqs - a.reqs; + }; + self.layersQueue = new heap(qSort); + self.setupDequeueing(); + }; + var LTCp = LayeredTextureCache.prototype; + var layerIdPool = 0; + var MAX_INT = Math.pow(2, 53) - 1; + LTCp.makeLayer = function (bb, lvl) { + var scale = Math.pow(2, lvl); + var w = Math.ceil(bb.w * scale); + var h = Math.ceil(bb.h * scale); + var canvas = this.renderer.makeOffscreenCanvas(w, h); + var layer = { + id: layerIdPool = ++layerIdPool % MAX_INT, + bb: bb, + level: lvl, + width: w, + height: h, + canvas: canvas, + context: canvas.getContext('2d'), + eles: [], + elesQueue: [], + reqs: 0 + }; + + // log('make layer %s with w %s and h %s and lvl %s', layer.id, layer.width, layer.height, layer.level); + + var cxt = layer.context; + var dx = -layer.bb.x1; + var dy = -layer.bb.y1; + + // do the transform on creation to save cycles (it's the same for all eles) + cxt.scale(scale, scale); + cxt.translate(dx, dy); + return layer; + }; + LTCp.getLayers = function (eles, pxRatio, lvl) { + var self = this; + var r = self.renderer; + var cy = r.cy; + var zoom = cy.zoom(); + var firstGet = self.firstGet; + self.firstGet = false; + + // log('--\nget layers with %s eles', eles.length); + //log eles.map(function(ele){ return ele.id() }) ); + + if (lvl == null) { + lvl = Math.ceil(log2(zoom * pxRatio)); + if (lvl < minLvl) { + lvl = minLvl; + } else if (zoom >= maxZoom || lvl > maxLvl) { + return null; + } + } + self.validateLayersElesOrdering(lvl, eles); + var layersByLvl = self.layersByLevel; + var scale = Math.pow(2, lvl); + var layers = layersByLvl[lvl] = layersByLvl[lvl] || []; + var bb; + var lvlComplete = self.levelIsComplete(lvl, eles); + var tmpLayers; + var checkTempLevels = function checkTempLevels() { + var canUseAsTmpLvl = function canUseAsTmpLvl(l) { + self.validateLayersElesOrdering(l, eles); + if (self.levelIsComplete(l, eles)) { + tmpLayers = layersByLvl[l]; + return true; + } + }; + var checkLvls = function checkLvls(dir) { + if (tmpLayers) { + return; + } + for (var l = lvl + dir; minLvl <= l && l <= maxLvl; l += dir) { + if (canUseAsTmpLvl(l)) { + break; + } + } + }; + checkLvls(+1); + checkLvls(-1); + + // remove the invalid layers; they will be replaced as needed later in this function + for (var i = layers.length - 1; i >= 0; i--) { + var layer = layers[i]; + if (layer.invalid) { + removeFromArray(layers, layer); + } + } + }; + if (!lvlComplete) { + // if the current level is incomplete, then use the closest, best quality layerset temporarily + // and later queue the current layerset so we can get the proper quality level soon + + checkTempLevels(); + } else { + // log('level complete, using existing layers\n--'); + return layers; + } + var getBb = function getBb() { + if (!bb) { + bb = makeBoundingBox(); + for (var i = 0; i < eles.length; i++) { + updateBoundingBox(bb, eles[i].boundingBox()); + } + } + return bb; + }; + var makeLayer = function makeLayer(opts) { + opts = opts || {}; + var after = opts.after; + getBb(); + var area = bb.w * scale * (bb.h * scale); + if (area > maxLayerArea) { + return null; + } + var layer = self.makeLayer(bb, lvl); + if (after != null) { + var index = layers.indexOf(after) + 1; + layers.splice(index, 0, layer); + } else if (opts.insert === undefined || opts.insert) { + // no after specified => first layer made so put at start + layers.unshift(layer); + } + + // if( tmpLayers ){ + //self.queueLayer( layer ); + // } + + return layer; + }; + if (self.skipping && !firstGet) { + // log('skip layers'); + return null; + } + + // log('do layers'); + + var layer = null; + var maxElesPerLayer = eles.length / defNumLayers; + var allowLazyQueueing = !firstGet; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; + + // log('look at ele', ele.id()); + + var existingLayer = caches[lvl]; + if (existingLayer) { + // reuse layer for later eles + // log('reuse layer for', ele.id()); + layer = existingLayer; + continue; + } + if (!layer || layer.eles.length >= maxElesPerLayer || !boundingBoxInBoundingBox(layer.bb, ele.boundingBox())) { + // log('make new layer for ele %s', ele.id()); + + layer = makeLayer({ + insert: true, + after: layer + }); + + // if now layer can be built then we can't use layers at this level + if (!layer) { + return null; + } + + // log('new layer with id %s', layer.id); + } + + if (tmpLayers || allowLazyQueueing) { + // log('queue ele %s in layer %s', ele.id(), layer.id); + self.queueLayer(layer, ele); + } else { + // log('draw ele %s in layer %s', ele.id(), layer.id); + self.drawEleInLayer(layer, ele, lvl, pxRatio); + } + layer.eles.push(ele); + caches[lvl] = layer; + } + + // log('--'); + + if (tmpLayers) { + // then we only queued the current layerset and can't draw it yet + return tmpLayers; + } + if (allowLazyQueueing) { + // log('lazy queue level', lvl); + return null; + } + return layers; + }; + + // a layer may want to use an ele cache of a higher level to avoid blurriness + // so the layer level might not equal the ele level + LTCp.getEleLevelForLayerLevel = function (lvl, pxRatio) { + return lvl; + }; + LTCp.drawEleInLayer = function (layer, ele, lvl, pxRatio) { + var self = this; + var r = this.renderer; + var context = layer.context; + var bb = ele.boundingBox(); + if (bb.w === 0 || bb.h === 0 || !ele.visible()) { + return; + } + lvl = self.getEleLevelForLayerLevel(lvl, pxRatio); + { + r.setImgSmoothing(context, false); + } + { + r.drawCachedElement(context, ele, null, null, lvl, useHighQualityEleTxrReqs); + } + { + r.setImgSmoothing(context, true); + } + }; + LTCp.levelIsComplete = function (lvl, eles) { + var self = this; + var layers = self.layersByLevel[lvl]; + if (!layers || layers.length === 0) { + return false; + } + var numElesInLayers = 0; + for (var i = 0; i < layers.length; i++) { + var layer = layers[i]; + + // if there are any eles needed to be drawn yet, the level is not complete + if (layer.reqs > 0) { + return false; + } + + // if the layer is invalid, the level is not complete + if (layer.invalid) { + return false; + } + numElesInLayers += layer.eles.length; + } + + // we should have exactly the number of eles passed in to be complete + if (numElesInLayers !== eles.length) { + return false; + } + return true; + }; + LTCp.validateLayersElesOrdering = function (lvl, eles) { + var layers = this.layersByLevel[lvl]; + if (!layers) { + return; + } + + // if in a layer the eles are not in the same order, then the layer is invalid + // (i.e. there is an ele in between the eles in the layer) + + for (var i = 0; i < layers.length; i++) { + var layer = layers[i]; + var offset = -1; + + // find the offset + for (var j = 0; j < eles.length; j++) { + if (layer.eles[0] === eles[j]) { + offset = j; + break; + } + } + if (offset < 0) { + // then the layer has nonexistent elements and is invalid + this.invalidateLayer(layer); + continue; + } + + // the eles in the layer must be in the same continuous order, else the layer is invalid + + var o = offset; + for (var j = 0; j < layer.eles.length; j++) { + if (layer.eles[j] !== eles[o + j]) { + // log('invalidate based on ordering', layer.id); + + this.invalidateLayer(layer); + break; + } + } + } + }; + LTCp.updateElementsInLayers = function (eles, update) { + var self = this; + var isEles = element(eles[0]); + + // collect udpated elements (cascaded from the layers) and update each + // layer itself along the way + for (var i = 0; i < eles.length; i++) { + var req = isEles ? null : eles[i]; + var ele = isEles ? eles[i] : eles[i].ele; + var rs = ele._private.rscratch; + var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; + for (var l = minLvl; l <= maxLvl; l++) { + var layer = caches[l]; + if (!layer) { + continue; + } + + // if update is a request from the ele cache, then it affects only + // the matching level + if (req && self.getEleLevelForLayerLevel(layer.level) !== req.level) { + continue; + } + update(layer, ele, req); + } + } + }; + LTCp.haveLayers = function () { + var self = this; + var haveLayers = false; + for (var l = minLvl; l <= maxLvl; l++) { + var layers = self.layersByLevel[l]; + if (layers && layers.length > 0) { + haveLayers = true; + break; + } + } + return haveLayers; + }; + LTCp.invalidateElements = function (eles) { + var self = this; + if (eles.length === 0) { + return; + } + self.lastInvalidationTime = performanceNow(); + + // log('update invalidate layer time from eles'); + + if (eles.length === 0 || !self.haveLayers()) { + return; + } + self.updateElementsInLayers(eles, function invalAssocLayers(layer, ele, req) { + self.invalidateLayer(layer); + }); + }; + LTCp.invalidateLayer = function (layer) { + // log('update invalidate layer time'); + + this.lastInvalidationTime = performanceNow(); + if (layer.invalid) { + return; + } // save cycles + + var lvl = layer.level; + var eles = layer.eles; + var layers = this.layersByLevel[lvl]; + + // log('invalidate layer', layer.id ); + + removeFromArray(layers, layer); + // layer.eles = []; + + layer.elesQueue = []; + layer.invalid = true; + if (layer.replacement) { + layer.replacement.invalid = true; + } + for (var i = 0; i < eles.length; i++) { + var caches = eles[i]._private.rscratch.imgLayerCaches; + if (caches) { + caches[lvl] = null; + } + } + }; + LTCp.refineElementTextures = function (eles) { + var self = this; + + // log('refine', eles.length); + + self.updateElementsInLayers(eles, function refineEachEle(layer, ele, req) { + var rLyr = layer.replacement; + if (!rLyr) { + rLyr = layer.replacement = self.makeLayer(layer.bb, layer.level); + rLyr.replaces = layer; + rLyr.eles = layer.eles; + + // log('make replacement layer %s for %s with level %s', rLyr.id, layer.id, rLyr.level); + } + + if (!rLyr.reqs) { + for (var i = 0; i < rLyr.eles.length; i++) { + self.queueLayer(rLyr, rLyr.eles[i]); + } + + // log('queue replacement layer refinement', rLyr.id); + } + }); + }; + + LTCp.enqueueElementRefinement = function (ele) { + this.eleTxrDeqs.merge(ele); + this.scheduleElementRefinement(); + }; + LTCp.queueLayer = function (layer, ele) { + var self = this; + var q = self.layersQueue; + var elesQ = layer.elesQueue; + var hasId = elesQ.hasId = elesQ.hasId || {}; + + // if a layer is going to be replaced, queuing is a waste of time + if (layer.replacement) { + return; + } + if (ele) { + if (hasId[ele.id()]) { + return; + } + elesQ.push(ele); + hasId[ele.id()] = true; + } + if (layer.reqs) { + layer.reqs++; + q.updateItem(layer); + } else { + layer.reqs = 1; + q.push(layer); + } + }; + LTCp.dequeue = function (pxRatio) { + var self = this; + var q = self.layersQueue; + var deqd = []; + var eleDeqs = 0; + while (eleDeqs < maxDeqSize) { + if (q.size() === 0) { + break; + } + var layer = q.peek(); + + // if a layer has been or will be replaced, then don't waste time with it + if (layer.replacement) { + // log('layer %s in queue skipped b/c it already has a replacement', layer.id); + q.pop(); + continue; + } + + // if this is a replacement layer that has been superceded, then forget it + if (layer.replaces && layer !== layer.replaces.replacement) { + // log('layer is no longer the most uptodate replacement; dequeued', layer.id) + q.pop(); + continue; + } + if (layer.invalid) { + // log('replacement layer %s is invalid; dequeued', layer.id); + q.pop(); + continue; + } + var ele = layer.elesQueue.shift(); + if (ele) { + // log('dequeue layer %s', layer.id); + + self.drawEleInLayer(layer, ele, layer.level, pxRatio); + eleDeqs++; + } + if (deqd.length === 0) { + // we need only one entry in deqd to queue redrawing etc + deqd.push(true); + } + + // if the layer has all its eles done, then remove from the queue + if (layer.elesQueue.length === 0) { + q.pop(); + layer.reqs = 0; + + // log('dequeue of layer %s complete', layer.id); + + // when a replacement layer is dequeued, it replaces the old layer in the level + if (layer.replaces) { + self.applyLayerReplacement(layer); + } + self.requestRedraw(); + } + } + return deqd; + }; + LTCp.applyLayerReplacement = function (layer) { + var self = this; + var layersInLevel = self.layersByLevel[layer.level]; + var replaced = layer.replaces; + var index = layersInLevel.indexOf(replaced); + + // if the replaced layer is not in the active list for the level, then replacing + // refs would be a mistake (i.e. overwriting the true active layer) + if (index < 0 || replaced.invalid) { + // log('replacement layer would have no effect', layer.id); + return; + } + layersInLevel[index] = layer; // replace level ref + + // replace refs in eles + for (var i = 0; i < layer.eles.length; i++) { + var _p = layer.eles[i]._private; + var cache = _p.imgLayerCaches = _p.imgLayerCaches || {}; + if (cache) { + cache[layer.level] = layer; + } + } + + // log('apply replacement layer %s over %s', layer.id, replaced.id); + + self.requestRedraw(); + }; + LTCp.requestRedraw = debounce_1(function () { + var r = this.renderer; + r.redrawHint('eles', true); + r.redrawHint('drag', true); + r.redraw(); + }, 100); + LTCp.setupDequeueing = defs.setupDequeueing({ + deqRedrawThreshold: deqRedrawThreshold, + deqCost: deqCost, + deqAvgCost: deqAvgCost, + deqNoDrawCost: deqNoDrawCost, + deqFastCost: deqFastCost, + deq: function deq(self, pxRatio) { + return self.dequeue(pxRatio); + }, + onDeqd: noop$1, + shouldRedraw: trueify, + priority: function priority(self) { + return self.renderer.beforeRenderPriorities.lyrTxrDeq; + } + }); + + var CRp$a = {}; + var impl; + function polygon(context, points) { + for (var i = 0; i < points.length; i++) { + var pt = points[i]; + context.lineTo(pt.x, pt.y); + } + } + function triangleBackcurve(context, points, controlPoint) { + var firstPt; + for (var i = 0; i < points.length; i++) { + var pt = points[i]; + if (i === 0) { + firstPt = pt; + } + context.lineTo(pt.x, pt.y); + } + context.quadraticCurveTo(controlPoint.x, controlPoint.y, firstPt.x, firstPt.y); + } + function triangleTee(context, trianglePoints, teePoints) { + if (context.beginPath) { + context.beginPath(); + } + var triPts = trianglePoints; + for (var i = 0; i < triPts.length; i++) { + var pt = triPts[i]; + context.lineTo(pt.x, pt.y); + } + var teePts = teePoints; + var firstTeePt = teePoints[0]; + context.moveTo(firstTeePt.x, firstTeePt.y); + for (var i = 1; i < teePts.length; i++) { + var pt = teePts[i]; + context.lineTo(pt.x, pt.y); + } + if (context.closePath) { + context.closePath(); + } + } + function circleTriangle(context, trianglePoints, rx, ry, r) { + if (context.beginPath) { + context.beginPath(); + } + context.arc(rx, ry, r, 0, Math.PI * 2, false); + var triPts = trianglePoints; + var firstTrPt = triPts[0]; + context.moveTo(firstTrPt.x, firstTrPt.y); + for (var i = 0; i < triPts.length; i++) { + var pt = triPts[i]; + context.lineTo(pt.x, pt.y); + } + if (context.closePath) { + context.closePath(); + } + } + function circle(context, rx, ry, r) { + context.arc(rx, ry, r, 0, Math.PI * 2, false); + } + CRp$a.arrowShapeImpl = function (name) { + return (impl || (impl = { + 'polygon': polygon, + 'triangle-backcurve': triangleBackcurve, + 'triangle-tee': triangleTee, + 'circle-triangle': circleTriangle, + 'triangle-cross': triangleTee, + 'circle': circle + }))[name]; + }; + + var CRp$9 = {}; + CRp$9.drawElement = function (context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity) { + var r = this; + if (ele.isNode()) { + r.drawNode(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); + } else { + r.drawEdge(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); + } + }; + CRp$9.drawElementOverlay = function (context, ele) { + var r = this; + if (ele.isNode()) { + r.drawNodeOverlay(context, ele); + } else { + r.drawEdgeOverlay(context, ele); + } + }; + CRp$9.drawElementUnderlay = function (context, ele) { + var r = this; + if (ele.isNode()) { + r.drawNodeUnderlay(context, ele); + } else { + r.drawEdgeUnderlay(context, ele); + } + }; + CRp$9.drawCachedElementPortion = function (context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation, getOpacity) { + var r = this; + var bb = eleTxrCache.getBoundingBox(ele); + if (bb.w === 0 || bb.h === 0) { + return; + } // ignore zero size case + + var eleCache = eleTxrCache.getElement(ele, bb, pxRatio, lvl, reason); + if (eleCache != null) { + var opacity = getOpacity(r, ele); + if (opacity === 0) { + return; + } + var theta = getRotation(r, ele); + var x1 = bb.x1, + y1 = bb.y1, + w = bb.w, + h = bb.h; + var x, y, sx, sy, smooth; + if (theta !== 0) { + var rotPt = eleTxrCache.getRotationPoint(ele); + sx = rotPt.x; + sy = rotPt.y; + context.translate(sx, sy); + context.rotate(theta); + smooth = r.getImgSmoothing(context); + if (!smooth) { + r.setImgSmoothing(context, true); + } + var off = eleTxrCache.getRotationOffset(ele); + x = off.x; + y = off.y; + } else { + x = x1; + y = y1; + } + var oldGlobalAlpha; + if (opacity !== 1) { + oldGlobalAlpha = context.globalAlpha; + context.globalAlpha = oldGlobalAlpha * opacity; + } + context.drawImage(eleCache.texture.canvas, eleCache.x, 0, eleCache.width, eleCache.height, x, y, w, h); + if (opacity !== 1) { + context.globalAlpha = oldGlobalAlpha; + } + if (theta !== 0) { + context.rotate(-theta); + context.translate(-sx, -sy); + if (!smooth) { + r.setImgSmoothing(context, false); + } + } + } else { + eleTxrCache.drawElement(context, ele); // direct draw fallback + } + }; + + var getZeroRotation = function getZeroRotation() { + return 0; + }; + var getLabelRotation = function getLabelRotation(r, ele) { + return r.getTextAngle(ele, null); + }; + var getSourceLabelRotation = function getSourceLabelRotation(r, ele) { + return r.getTextAngle(ele, 'source'); + }; + var getTargetLabelRotation = function getTargetLabelRotation(r, ele) { + return r.getTextAngle(ele, 'target'); + }; + var getOpacity = function getOpacity(r, ele) { + return ele.effectiveOpacity(); + }; + var getTextOpacity = function getTextOpacity(e, ele) { + return ele.pstyle('text-opacity').pfValue * ele.effectiveOpacity(); + }; + CRp$9.drawCachedElement = function (context, ele, pxRatio, extent, lvl, requestHighQuality) { + var r = this; + var _r$data = r.data, + eleTxrCache = _r$data.eleTxrCache, + lblTxrCache = _r$data.lblTxrCache, + slbTxrCache = _r$data.slbTxrCache, + tlbTxrCache = _r$data.tlbTxrCache; + var bb = ele.boundingBox(); + var reason = requestHighQuality === true ? eleTxrCache.reasons.highQuality : null; + if (bb.w === 0 || bb.h === 0 || !ele.visible()) { + return; + } + if (!extent || boundingBoxesIntersect(bb, extent)) { + var isEdge = ele.isEdge(); + var badLine = ele.element()._private.rscratch.badLine; + r.drawElementUnderlay(context, ele); + r.drawCachedElementPortion(context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation, getOpacity); + if (!isEdge || !badLine) { + r.drawCachedElementPortion(context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation, getTextOpacity); + } + if (isEdge && !badLine) { + r.drawCachedElementPortion(context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation, getTextOpacity); + r.drawCachedElementPortion(context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation, getTextOpacity); + } + r.drawElementOverlay(context, ele); + } + }; + CRp$9.drawElements = function (context, eles) { + var r = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + r.drawElement(context, ele); + } + }; + CRp$9.drawCachedElements = function (context, eles, pxRatio, extent) { + var r = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + r.drawCachedElement(context, ele, pxRatio, extent); + } + }; + CRp$9.drawCachedNodes = function (context, eles, pxRatio, extent) { + var r = this; + for (var i = 0; i < eles.length; i++) { + var ele = eles[i]; + if (!ele.isNode()) { + continue; + } + r.drawCachedElement(context, ele, pxRatio, extent); + } + }; + CRp$9.drawLayeredElements = function (context, eles, pxRatio, extent) { + var r = this; + var layers = r.data.lyrTxrCache.getLayers(eles, pxRatio); + if (layers) { + for (var i = 0; i < layers.length; i++) { + var layer = layers[i]; + var bb = layer.bb; + if (bb.w === 0 || bb.h === 0) { + continue; + } + context.drawImage(layer.canvas, bb.x1, bb.y1, bb.w, bb.h); + } + } else { + // fall back on plain caching if no layers + r.drawCachedElements(context, eles, pxRatio, extent); + } + }; + + /* global Path2D */ + var CRp$8 = {}; + CRp$8.drawEdge = function (context, edge, shiftToOriginWithBb) { + var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var r = this; + var rs = edge._private.rscratch; + if (shouldDrawOpacity && !edge.visible()) { + return; + } + + // if bezier ctrl pts can not be calculated, then die + if (rs.badLine || rs.allpts == null || isNaN(rs.allpts[0])) { + // isNaN in case edge is impossible and browser bugs (e.g. safari) + return; + } + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + var opacity = shouldDrawOpacity ? edge.pstyle('opacity').value : 1; + var lineOpacity = shouldDrawOpacity ? edge.pstyle('line-opacity').value : 1; + var curveStyle = edge.pstyle('curve-style').value; + var lineStyle = edge.pstyle('line-style').value; + var edgeWidth = edge.pstyle('width').pfValue; + var lineCap = edge.pstyle('line-cap').value; + var effectiveLineOpacity = opacity * lineOpacity; + // separate arrow opacity would require arrow-opacity property + var effectiveArrowOpacity = opacity * lineOpacity; + var drawLine = function drawLine() { + var strokeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveLineOpacity; + if (curveStyle === 'straight-triangle') { + r.eleStrokeStyle(context, edge, strokeOpacity); + r.drawEdgeTrianglePath(edge, context, rs.allpts); + } else { + context.lineWidth = edgeWidth; + context.lineCap = lineCap; + r.eleStrokeStyle(context, edge, strokeOpacity); + r.drawEdgePath(edge, context, rs.allpts, lineStyle); + context.lineCap = 'butt'; // reset for other drawing functions + } + }; + + var drawOverlay = function drawOverlay() { + if (!shouldDrawOverlay) { + return; + } + r.drawEdgeOverlay(context, edge); + }; + var drawUnderlay = function drawUnderlay() { + if (!shouldDrawOverlay) { + return; + } + r.drawEdgeUnderlay(context, edge); + }; + var drawArrows = function drawArrows() { + var arrowOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveArrowOpacity; + r.drawArrowheads(context, edge, arrowOpacity); + }; + var drawText = function drawText() { + r.drawElementText(context, edge, null, drawLabel); + }; + context.lineJoin = 'round'; + var ghost = edge.pstyle('ghost').value === 'yes'; + if (ghost) { + var gx = edge.pstyle('ghost-offset-x').pfValue; + var gy = edge.pstyle('ghost-offset-y').pfValue; + var ghostOpacity = edge.pstyle('ghost-opacity').value; + var effectiveGhostOpacity = effectiveLineOpacity * ghostOpacity; + context.translate(gx, gy); + drawLine(effectiveGhostOpacity); + drawArrows(effectiveGhostOpacity); + context.translate(-gx, -gy); + } + drawUnderlay(); + drawLine(); + drawArrows(); + drawOverlay(); + drawText(); + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + var drawEdgeOverlayUnderlay = function drawEdgeOverlayUnderlay(overlayOrUnderlay) { + if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { + throw new Error('Invalid state'); + } + return function (context, edge) { + if (!edge.visible()) { + return; + } + var opacity = edge.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; + if (opacity === 0) { + return; + } + var r = this; + var usePaths = r.usePaths(); + var rs = edge._private.rscratch; + var padding = edge.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; + var width = 2 * padding; + var color = edge.pstyle("".concat(overlayOrUnderlay, "-color")).value; + context.lineWidth = width; + if (rs.edgeType === 'self' && !usePaths) { + context.lineCap = 'butt'; + } else { + context.lineCap = 'round'; + } + r.colorStrokeStyle(context, color[0], color[1], color[2], opacity); + r.drawEdgePath(edge, context, rs.allpts, 'solid'); + }; + }; + CRp$8.drawEdgeOverlay = drawEdgeOverlayUnderlay('overlay'); + CRp$8.drawEdgeUnderlay = drawEdgeOverlayUnderlay('underlay'); + CRp$8.drawEdgePath = function (edge, context, pts, type) { + var rs = edge._private.rscratch; + var canvasCxt = context; + var path; + var pathCacheHit = false; + var usePaths = this.usePaths(); + var lineDashPattern = edge.pstyle('line-dash-pattern').pfValue; + var lineDashOffset = edge.pstyle('line-dash-offset').pfValue; + if (usePaths) { + var pathCacheKey = pts.join('$'); + var keyMatches = rs.pathCacheKey && rs.pathCacheKey === pathCacheKey; + if (keyMatches) { + path = context = rs.pathCache; + pathCacheHit = true; + } else { + path = context = new Path2D(); + rs.pathCacheKey = pathCacheKey; + rs.pathCache = path; + } + } + if (canvasCxt.setLineDash) { + // for very outofdate browsers + switch (type) { + case 'dotted': + canvasCxt.setLineDash([1, 1]); + break; + case 'dashed': + canvasCxt.setLineDash(lineDashPattern); + canvasCxt.lineDashOffset = lineDashOffset; + break; + case 'solid': + canvasCxt.setLineDash([]); + break; + } + } + if (!pathCacheHit && !rs.badLine) { + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(pts[0], pts[1]); + switch (rs.edgeType) { + case 'bezier': + case 'self': + case 'compound': + case 'multibezier': + for (var i = 2; i + 3 < pts.length; i += 4) { + context.quadraticCurveTo(pts[i], pts[i + 1], pts[i + 2], pts[i + 3]); + } + break; + case 'straight': + case 'segments': + case 'haystack': + for (var _i = 2; _i + 1 < pts.length; _i += 2) { + context.lineTo(pts[_i], pts[_i + 1]); + } + break; + } + } + context = canvasCxt; + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + + // reset any line dashes + if (context.setLineDash) { + // for very outofdate browsers + context.setLineDash([]); + } + }; + CRp$8.drawEdgeTrianglePath = function (edge, context, pts) { + // use line stroke style for triangle fill style + context.fillStyle = context.strokeStyle; + var edgeWidth = edge.pstyle('width').pfValue; + for (var i = 0; i + 1 < pts.length; i += 2) { + var vector = [pts[i + 2] - pts[i], pts[i + 3] - pts[i + 1]]; + var length = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]); + var normal = [vector[1] / length, -vector[0] / length]; + var triangleHead = [normal[0] * edgeWidth / 2, normal[1] * edgeWidth / 2]; + context.beginPath(); + context.moveTo(pts[i] - triangleHead[0], pts[i + 1] - triangleHead[1]); + context.lineTo(pts[i] + triangleHead[0], pts[i + 1] + triangleHead[1]); + context.lineTo(pts[i + 2], pts[i + 3]); + context.closePath(); + context.fill(); + } + }; + CRp$8.drawArrowheads = function (context, edge, opacity) { + var rs = edge._private.rscratch; + var isHaystack = rs.edgeType === 'haystack'; + if (!isHaystack) { + this.drawArrowhead(context, edge, 'source', rs.arrowStartX, rs.arrowStartY, rs.srcArrowAngle, opacity); + } + this.drawArrowhead(context, edge, 'mid-target', rs.midX, rs.midY, rs.midtgtArrowAngle, opacity); + this.drawArrowhead(context, edge, 'mid-source', rs.midX, rs.midY, rs.midsrcArrowAngle, opacity); + if (!isHaystack) { + this.drawArrowhead(context, edge, 'target', rs.arrowEndX, rs.arrowEndY, rs.tgtArrowAngle, opacity); + } + }; + CRp$8.drawArrowhead = function (context, edge, prefix, x, y, angle, opacity) { + if (isNaN(x) || x == null || isNaN(y) || y == null || isNaN(angle) || angle == null) { + return; + } + var self = this; + var arrowShape = edge.pstyle(prefix + '-arrow-shape').value; + if (arrowShape === 'none') { + return; + } + var arrowClearFill = edge.pstyle(prefix + '-arrow-fill').value === 'hollow' ? 'both' : 'filled'; + var arrowFill = edge.pstyle(prefix + '-arrow-fill').value; + var edgeWidth = edge.pstyle('width').pfValue; + var pArrowWidth = edge.pstyle(prefix + '-arrow-width'); + var arrowWidth = pArrowWidth.value === 'match-line' ? edgeWidth : pArrowWidth.pfValue; + if (pArrowWidth.units === '%') arrowWidth *= edgeWidth; + var edgeOpacity = edge.pstyle('opacity').value; + if (opacity === undefined) { + opacity = edgeOpacity; + } + var gco = context.globalCompositeOperation; + if (opacity !== 1 || arrowFill === 'hollow') { + // then extra clear is needed + context.globalCompositeOperation = 'destination-out'; + self.colorFillStyle(context, 255, 255, 255, 1); + self.colorStrokeStyle(context, 255, 255, 255, 1); + self.drawArrowShape(edge, context, arrowClearFill, edgeWidth, arrowShape, arrowWidth, x, y, angle); + context.globalCompositeOperation = gco; + } // otherwise, the opaque arrow clears it for free :) + + var color = edge.pstyle(prefix + '-arrow-color').value; + self.colorFillStyle(context, color[0], color[1], color[2], opacity); + self.colorStrokeStyle(context, color[0], color[1], color[2], opacity); + self.drawArrowShape(edge, context, arrowFill, edgeWidth, arrowShape, arrowWidth, x, y, angle); + }; + CRp$8.drawArrowShape = function (edge, context, fill, edgeWidth, shape, shapeWidth, x, y, angle) { + var r = this; + var usePaths = this.usePaths() && shape !== 'triangle-cross'; + var pathCacheHit = false; + var path; + var canvasContext = context; + var translation = { + x: x, + y: y + }; + var scale = edge.pstyle('arrow-scale').value; + var size = this.getArrowWidth(edgeWidth, scale); + var shapeImpl = r.arrowShapes[shape]; + if (usePaths) { + var cache = r.arrowPathCache = r.arrowPathCache || []; + var key = hashString(shape); + var cachedPath = cache[key]; + if (cachedPath != null) { + path = context = cachedPath; + pathCacheHit = true; + } else { + path = context = new Path2D(); + cache[key] = path; + } + } + if (!pathCacheHit) { + if (context.beginPath) { + context.beginPath(); + } + if (usePaths) { + // store in the path cache with values easily manipulated later + shapeImpl.draw(context, 1, 0, { + x: 0, + y: 0 + }, 1); + } else { + shapeImpl.draw(context, size, angle, translation, edgeWidth); + } + if (context.closePath) { + context.closePath(); + } + } + context = canvasContext; + if (usePaths) { + // set transform to arrow position/orientation + context.translate(x, y); + context.rotate(angle); + context.scale(size, size); + } + if (fill === 'filled' || fill === 'both') { + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + } + if (fill === 'hollow' || fill === 'both') { + context.lineWidth = shapeWidth / (usePaths ? size : 1); + context.lineJoin = 'miter'; + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + } + if (usePaths) { + // reset transform by applying inverse + context.scale(1 / size, 1 / size); + context.rotate(-angle); + context.translate(-x, -y); + } + }; + + var CRp$7 = {}; + CRp$7.safeDrawImage = function (context, img, ix, iy, iw, ih, x, y, w, h) { + // detect problematic cases for old browsers with bad images (cheaper than try-catch) + if (iw <= 0 || ih <= 0 || w <= 0 || h <= 0) { + return; + } + try { + context.drawImage(img, ix, iy, iw, ih, x, y, w, h); + } catch (e) { + warn(e); + } + }; + CRp$7.drawInscribedImage = function (context, img, node, index, nodeOpacity) { + var r = this; + var pos = node.position(); + var nodeX = pos.x; + var nodeY = pos.y; + var styleObj = node.cy().style(); + var getIndexedStyle = styleObj.getIndexedStyle.bind(styleObj); + var fit = getIndexedStyle(node, 'background-fit', 'value', index); + var repeat = getIndexedStyle(node, 'background-repeat', 'value', index); + var nodeW = node.width(); + var nodeH = node.height(); + var paddingX2 = node.padding() * 2; + var nodeTW = nodeW + (getIndexedStyle(node, 'background-width-relative-to', 'value', index) === 'inner' ? 0 : paddingX2); + var nodeTH = nodeH + (getIndexedStyle(node, 'background-height-relative-to', 'value', index) === 'inner' ? 0 : paddingX2); + var rs = node._private.rscratch; + var clip = getIndexedStyle(node, 'background-clip', 'value', index); + var shouldClip = clip === 'node'; + var imgOpacity = getIndexedStyle(node, 'background-image-opacity', 'value', index) * nodeOpacity; + var smooth = getIndexedStyle(node, 'background-image-smoothing', 'value', index); + var imgW = img.width || img.cachedW; + var imgH = img.height || img.cachedH; + + // workaround for broken browsers like ie + if (null == imgW || null == imgH) { + document.body.appendChild(img); // eslint-disable-line no-undef + + imgW = img.cachedW = img.width || img.offsetWidth; + imgH = img.cachedH = img.height || img.offsetHeight; + document.body.removeChild(img); // eslint-disable-line no-undef + } + + var w = imgW; + var h = imgH; + if (getIndexedStyle(node, 'background-width', 'value', index) !== 'auto') { + if (getIndexedStyle(node, 'background-width', 'units', index) === '%') { + w = getIndexedStyle(node, 'background-width', 'pfValue', index) * nodeTW; + } else { + w = getIndexedStyle(node, 'background-width', 'pfValue', index); + } + } + if (getIndexedStyle(node, 'background-height', 'value', index) !== 'auto') { + if (getIndexedStyle(node, 'background-height', 'units', index) === '%') { + h = getIndexedStyle(node, 'background-height', 'pfValue', index) * nodeTH; + } else { + h = getIndexedStyle(node, 'background-height', 'pfValue', index); + } + } + if (w === 0 || h === 0) { + return; // no point in drawing empty image (and chrome is broken in this case) + } + + if (fit === 'contain') { + var scale = Math.min(nodeTW / w, nodeTH / h); + w *= scale; + h *= scale; + } else if (fit === 'cover') { + var scale = Math.max(nodeTW / w, nodeTH / h); + w *= scale; + h *= scale; + } + var x = nodeX - nodeTW / 2; // left + var posXUnits = getIndexedStyle(node, 'background-position-x', 'units', index); + var posXPfVal = getIndexedStyle(node, 'background-position-x', 'pfValue', index); + if (posXUnits === '%') { + x += (nodeTW - w) * posXPfVal; + } else { + x += posXPfVal; + } + var offXUnits = getIndexedStyle(node, 'background-offset-x', 'units', index); + var offXPfVal = getIndexedStyle(node, 'background-offset-x', 'pfValue', index); + if (offXUnits === '%') { + x += (nodeTW - w) * offXPfVal; + } else { + x += offXPfVal; + } + var y = nodeY - nodeTH / 2; // top + var posYUnits = getIndexedStyle(node, 'background-position-y', 'units', index); + var posYPfVal = getIndexedStyle(node, 'background-position-y', 'pfValue', index); + if (posYUnits === '%') { + y += (nodeTH - h) * posYPfVal; + } else { + y += posYPfVal; + } + var offYUnits = getIndexedStyle(node, 'background-offset-y', 'units', index); + var offYPfVal = getIndexedStyle(node, 'background-offset-y', 'pfValue', index); + if (offYUnits === '%') { + y += (nodeTH - h) * offYPfVal; + } else { + y += offYPfVal; + } + if (rs.pathCache) { + x -= nodeX; + y -= nodeY; + nodeX = 0; + nodeY = 0; + } + var gAlpha = context.globalAlpha; + context.globalAlpha = imgOpacity; + var smoothingEnabled = r.getImgSmoothing(context); + var isSmoothingSwitched = false; + if (smooth === 'no' && smoothingEnabled) { + r.setImgSmoothing(context, false); + isSmoothingSwitched = true; + } else if (smooth === 'yes' && !smoothingEnabled) { + r.setImgSmoothing(context, true); + isSmoothingSwitched = true; + } + if (repeat === 'no-repeat') { + if (shouldClip) { + context.save(); + if (rs.pathCache) { + context.clip(rs.pathCache); + } else { + r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH); + context.clip(); + } + } + r.safeDrawImage(context, img, 0, 0, imgW, imgH, x, y, w, h); + if (shouldClip) { + context.restore(); + } + } else { + var pattern = context.createPattern(img, repeat); + context.fillStyle = pattern; + r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH); + context.translate(x, y); + context.fill(); + context.translate(-x, -y); + } + context.globalAlpha = gAlpha; + if (isSmoothingSwitched) { + r.setImgSmoothing(context, smoothingEnabled); + } + }; + + var CRp$6 = {}; + CRp$6.eleTextBiggerThanMin = function (ele, scale) { + if (!scale) { + var zoom = ele.cy().zoom(); + var pxRatio = this.getPixelRatio(); + var lvl = Math.ceil(log2(zoom * pxRatio)); // the effective texture level + + scale = Math.pow(2, lvl); + } + var computedSize = ele.pstyle('font-size').pfValue * scale; + var minSize = ele.pstyle('min-zoomed-font-size').pfValue; + if (computedSize < minSize) { + return false; + } + return true; + }; + CRp$6.drawElementText = function (context, ele, shiftToOriginWithBb, force, prefix) { + var useEleOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var r = this; + if (force == null) { + if (useEleOpacity && !r.eleTextBiggerThanMin(ele)) { + return; + } + } else if (force === false) { + return; + } + if (ele.isNode()) { + var label = ele.pstyle('label'); + if (!label || !label.value) { + return; + } + var justification = r.getLabelJustification(ele); + context.textAlign = justification; + context.textBaseline = 'bottom'; + } else { + var badLine = ele.element()._private.rscratch.badLine; + var _label = ele.pstyle('label'); + var srcLabel = ele.pstyle('source-label'); + var tgtLabel = ele.pstyle('target-label'); + if (badLine || (!_label || !_label.value) && (!srcLabel || !srcLabel.value) && (!tgtLabel || !tgtLabel.value)) { + return; + } + context.textAlign = 'center'; + context.textBaseline = 'bottom'; + } + var applyRotation = !shiftToOriginWithBb; + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + if (prefix == null) { + r.drawText(context, ele, null, applyRotation, useEleOpacity); + if (ele.isEdge()) { + r.drawText(context, ele, 'source', applyRotation, useEleOpacity); + r.drawText(context, ele, 'target', applyRotation, useEleOpacity); + } + } else { + r.drawText(context, ele, prefix, applyRotation, useEleOpacity); + } + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + CRp$6.getFontCache = function (context) { + var cache; + this.fontCaches = this.fontCaches || []; + for (var i = 0; i < this.fontCaches.length; i++) { + cache = this.fontCaches[i]; + if (cache.context === context) { + return cache; + } + } + cache = { + context: context + }; + this.fontCaches.push(cache); + return cache; + }; + + // set up canvas context with font + // returns transformed text string + CRp$6.setupTextStyle = function (context, ele) { + var useEleOpacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + // Font style + var labelStyle = ele.pstyle('font-style').strValue; + var labelSize = ele.pstyle('font-size').pfValue + 'px'; + var labelFamily = ele.pstyle('font-family').strValue; + var labelWeight = ele.pstyle('font-weight').strValue; + var opacity = useEleOpacity ? ele.effectiveOpacity() * ele.pstyle('text-opacity').value : 1; + var outlineOpacity = ele.pstyle('text-outline-opacity').value * opacity; + var color = ele.pstyle('color').value; + var outlineColor = ele.pstyle('text-outline-color').value; + context.font = labelStyle + ' ' + labelWeight + ' ' + labelSize + ' ' + labelFamily; + context.lineJoin = 'round'; // so text outlines aren't jagged + + this.colorFillStyle(context, color[0], color[1], color[2], opacity); + this.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], outlineOpacity); + }; + + // TODO ensure re-used + function roundRect(ctx, x, y, width, height) { + var radius = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 5; + var stroke = arguments.length > 6 ? arguments[6] : undefined; + ctx.beginPath(); + ctx.moveTo(x + radius, y); + ctx.lineTo(x + width - radius, y); + ctx.quadraticCurveTo(x + width, y, x + width, y + radius); + ctx.lineTo(x + width, y + height - radius); + ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height); + ctx.lineTo(x + radius, y + height); + ctx.quadraticCurveTo(x, y + height, x, y + height - radius); + ctx.lineTo(x, y + radius); + ctx.quadraticCurveTo(x, y, x + radius, y); + ctx.closePath(); + if (stroke) ctx.stroke();else ctx.fill(); + } + CRp$6.getTextAngle = function (ele, prefix) { + var theta; + var _p = ele._private; + var rscratch = _p.rscratch; + var pdash = prefix ? prefix + '-' : ''; + var rotation = ele.pstyle(pdash + 'text-rotation'); + var textAngle = getPrefixedProperty(rscratch, 'labelAngle', prefix); + if (rotation.strValue === 'autorotate') { + theta = ele.isEdge() ? textAngle : 0; + } else if (rotation.strValue === 'none') { + theta = 0; + } else { + theta = rotation.pfValue; + } + return theta; + }; + CRp$6.drawText = function (context, ele, prefix) { + var applyRotation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var useEleOpacity = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var _p = ele._private; + var rscratch = _p.rscratch; + var parentOpacity = useEleOpacity ? ele.effectiveOpacity() : 1; + if (useEleOpacity && (parentOpacity === 0 || ele.pstyle('text-opacity').value === 0)) { + return; + } + + // use 'main' as an alias for the main label (i.e. null prefix) + if (prefix === 'main') { + prefix = null; + } + var textX = getPrefixedProperty(rscratch, 'labelX', prefix); + var textY = getPrefixedProperty(rscratch, 'labelY', prefix); + var orgTextX, orgTextY; // used for rotation + var text = this.getLabelText(ele, prefix); + if (text != null && text !== '' && !isNaN(textX) && !isNaN(textY)) { + this.setupTextStyle(context, ele, useEleOpacity); + var pdash = prefix ? prefix + '-' : ''; + var textW = getPrefixedProperty(rscratch, 'labelWidth', prefix); + var textH = getPrefixedProperty(rscratch, 'labelHeight', prefix); + var marginX = ele.pstyle(pdash + 'text-margin-x').pfValue; + var marginY = ele.pstyle(pdash + 'text-margin-y').pfValue; + var isEdge = ele.isEdge(); + var halign = ele.pstyle('text-halign').value; + var valign = ele.pstyle('text-valign').value; + if (isEdge) { + halign = 'center'; + valign = 'center'; + } + textX += marginX; + textY += marginY; + var theta; + if (!applyRotation) { + theta = 0; + } else { + theta = this.getTextAngle(ele, prefix); + } + if (theta !== 0) { + orgTextX = textX; + orgTextY = textY; + context.translate(orgTextX, orgTextY); + context.rotate(theta); + textX = 0; + textY = 0; + } + switch (valign) { + case 'top': + break; + case 'center': + textY += textH / 2; + break; + case 'bottom': + textY += textH; + break; + } + var backgroundOpacity = ele.pstyle('text-background-opacity').value; + var borderOpacity = ele.pstyle('text-border-opacity').value; + var textBorderWidth = ele.pstyle('text-border-width').pfValue; + var backgroundPadding = ele.pstyle('text-background-padding').pfValue; + var styleShape = ele.pstyle('text-background-shape').strValue; + var rounded = styleShape.indexOf('round') === 0; + var roundRadius = 2; + if (backgroundOpacity > 0 || textBorderWidth > 0 && borderOpacity > 0) { + var bgX = textX - backgroundPadding; + switch (halign) { + case 'left': + bgX -= textW; + break; + case 'center': + bgX -= textW / 2; + break; + } + var bgY = textY - textH - backgroundPadding; + var bgW = textW + 2 * backgroundPadding; + var bgH = textH + 2 * backgroundPadding; + if (backgroundOpacity > 0) { + var textFill = context.fillStyle; + var textBackgroundColor = ele.pstyle('text-background-color').value; + context.fillStyle = 'rgba(' + textBackgroundColor[0] + ',' + textBackgroundColor[1] + ',' + textBackgroundColor[2] + ',' + backgroundOpacity * parentOpacity + ')'; + if (rounded) { + roundRect(context, bgX, bgY, bgW, bgH, roundRadius); + } else { + context.fillRect(bgX, bgY, bgW, bgH); + } + context.fillStyle = textFill; + } + if (textBorderWidth > 0 && borderOpacity > 0) { + var textStroke = context.strokeStyle; + var textLineWidth = context.lineWidth; + var textBorderColor = ele.pstyle('text-border-color').value; + var textBorderStyle = ele.pstyle('text-border-style').value; + context.strokeStyle = 'rgba(' + textBorderColor[0] + ',' + textBorderColor[1] + ',' + textBorderColor[2] + ',' + borderOpacity * parentOpacity + ')'; + context.lineWidth = textBorderWidth; + if (context.setLineDash) { + // for very outofdate browsers + switch (textBorderStyle) { + case 'dotted': + context.setLineDash([1, 1]); + break; + case 'dashed': + context.setLineDash([4, 2]); + break; + case 'double': + context.lineWidth = textBorderWidth / 4; // 50% reserved for white between the two borders + context.setLineDash([]); + break; + case 'solid': + context.setLineDash([]); + break; + } + } + if (rounded) { + roundRect(context, bgX, bgY, bgW, bgH, roundRadius, 'stroke'); + } else { + context.strokeRect(bgX, bgY, bgW, bgH); + } + if (textBorderStyle === 'double') { + var whiteWidth = textBorderWidth / 2; + if (rounded) { + roundRect(context, bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2, roundRadius, 'stroke'); + } else { + context.strokeRect(bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2); + } + } + if (context.setLineDash) { + // for very outofdate browsers + context.setLineDash([]); + } + context.lineWidth = textLineWidth; + context.strokeStyle = textStroke; + } + } + var lineWidth = 2 * ele.pstyle('text-outline-width').pfValue; // *2 b/c the stroke is drawn centred on the middle + + if (lineWidth > 0) { + context.lineWidth = lineWidth; + } + if (ele.pstyle('text-wrap').value === 'wrap') { + var lines = getPrefixedProperty(rscratch, 'labelWrapCachedLines', prefix); + var lineHeight = getPrefixedProperty(rscratch, 'labelLineHeight', prefix); + var halfTextW = textW / 2; + var justification = this.getLabelJustification(ele); + if (justification === 'auto') ; else if (halign === 'left') { + // auto justification : right + if (justification === 'left') { + textX += -textW; + } else if (justification === 'center') { + textX += -halfTextW; + } // else same as auto + } else if (halign === 'center') { + // auto justfication : center + if (justification === 'left') { + textX += -halfTextW; + } else if (justification === 'right') { + textX += halfTextW; + } // else same as auto + } else if (halign === 'right') { + // auto justification : left + if (justification === 'center') { + textX += halfTextW; + } else if (justification === 'right') { + textX += textW; + } // else same as auto + } + + switch (valign) { + case 'top': + textY -= (lines.length - 1) * lineHeight; + break; + case 'center': + case 'bottom': + textY -= (lines.length - 1) * lineHeight; + break; + } + for (var l = 0; l < lines.length; l++) { + if (lineWidth > 0) { + context.strokeText(lines[l], textX, textY); + } + context.fillText(lines[l], textX, textY); + textY += lineHeight; + } + } else { + if (lineWidth > 0) { + context.strokeText(text, textX, textY); + } + context.fillText(text, textX, textY); + } + if (theta !== 0) { + context.rotate(-theta); + context.translate(-orgTextX, -orgTextY); + } + } + }; + + /* global Path2D */ + var CRp$5 = {}; + CRp$5.drawNode = function (context, node, shiftToOriginWithBb) { + var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; + var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; + var r = this; + var nodeWidth, nodeHeight; + var _p = node._private; + var rs = _p.rscratch; + var pos = node.position(); + if (!number$1(pos.x) || !number$1(pos.y)) { + return; // can't draw node with undefined position + } + + if (shouldDrawOpacity && !node.visible()) { + return; + } + var eleOpacity = shouldDrawOpacity ? node.effectiveOpacity() : 1; + var usePaths = r.usePaths(); + var path; + var pathCacheHit = false; + var padding = node.padding(); + nodeWidth = node.width() + 2 * padding; + nodeHeight = node.height() + 2 * padding; + + // + // setup shift + + var bb; + if (shiftToOriginWithBb) { + bb = shiftToOriginWithBb; + context.translate(-bb.x1, -bb.y1); + } + + // + // load bg image + + var bgImgProp = node.pstyle('background-image'); + var urls = bgImgProp.value; + var urlDefined = new Array(urls.length); + var image = new Array(urls.length); + var numImages = 0; + for (var i = 0; i < urls.length; i++) { + var url = urls[i]; + var defd = urlDefined[i] = url != null && url !== 'none'; + if (defd) { + var bgImgCrossOrigin = node.cy().style().getIndexedStyle(node, 'background-image-crossorigin', 'value', i); + numImages++; + + // get image, and if not loaded then ask to redraw when later loaded + image[i] = r.getCachedImage(url, bgImgCrossOrigin, function () { + _p.backgroundTimestamp = Date.now(); + node.emitAndNotify('background'); + }); + } + } + + // + // setup styles + + var darkness = node.pstyle('background-blacken').value; + var borderWidth = node.pstyle('border-width').pfValue; + var bgOpacity = node.pstyle('background-opacity').value * eleOpacity; + var borderColor = node.pstyle('border-color').value; + var borderStyle = node.pstyle('border-style').value; + var borderOpacity = node.pstyle('border-opacity').value * eleOpacity; + var outlineWidth = node.pstyle('outline-width').pfValue; + var outlineColor = node.pstyle('outline-color').value; + var outlineStyle = node.pstyle('outline-style').value; + var outlineOpacity = node.pstyle('outline-opacity').value * eleOpacity; + var outlineOffset = node.pstyle('outline-offset').value; + context.lineJoin = 'miter'; // so borders are square with the node shape + + var setupShapeColor = function setupShapeColor() { + var bgOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : bgOpacity; + r.eleFillStyle(context, node, bgOpy); + }; + var setupBorderColor = function setupBorderColor() { + var bdrOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : borderOpacity; + r.colorStrokeStyle(context, borderColor[0], borderColor[1], borderColor[2], bdrOpy); + }; + var setupOutlineColor = function setupOutlineColor() { + var otlnOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : outlineOpacity; + r.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], otlnOpy); + }; + + // + // setup shape + + var getPath = function getPath(width, height, shape, points) { + var pathCache = r.nodePathCache = r.nodePathCache || []; + var key = hashStrings(shape === 'polygon' ? shape + ',' + points.join(',') : shape, '' + height, '' + width); + var cachedPath = pathCache[key]; + var path; + var cacheHit = false; + if (cachedPath != null) { + path = cachedPath; + cacheHit = true; + rs.pathCache = path; + } else { + path = new Path2D(); + pathCache[key] = rs.pathCache = path; + } + return { + path: path, + cacheHit: cacheHit + }; + }; + var styleShape = node.pstyle('shape').strValue; + var shapePts = node.pstyle('shape-polygon-points').pfValue; + if (usePaths) { + context.translate(pos.x, pos.y); + var shapePath = getPath(nodeWidth, nodeHeight, styleShape, shapePts); + path = shapePath.path; + pathCacheHit = shapePath.cacheHit; + } + var drawShape = function drawShape() { + if (!pathCacheHit) { + var npos = pos; + if (usePaths) { + npos = { + x: 0, + y: 0 + }; + } + r.nodeShapes[r.getNodeShape(node)].draw(path || context, npos.x, npos.y, nodeWidth, nodeHeight); + } + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + }; + var drawImages = function drawImages() { + var nodeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity; + var inside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + var prevBging = _p.backgrounding; + var totalCompleted = 0; + for (var _i = 0; _i < image.length; _i++) { + var bgContainment = node.cy().style().getIndexedStyle(node, 'background-image-containment', 'value', _i); + if (inside && bgContainment === 'over' || !inside && bgContainment === 'inside') { + totalCompleted++; + continue; + } + if (urlDefined[_i] && image[_i].complete && !image[_i].error) { + totalCompleted++; + r.drawInscribedImage(context, image[_i], node, _i, nodeOpacity); + } + } + _p.backgrounding = !(totalCompleted === numImages); + if (prevBging !== _p.backgrounding) { + // update style b/c :backgrounding state changed + node.updateStyle(false); + } + }; + var drawPie = function drawPie() { + var redrawShape = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var pieOpacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : eleOpacity; + if (r.hasPie(node)) { + r.drawPie(context, node, pieOpacity); + + // redraw/restore path if steps after pie need it + if (redrawShape) { + if (!usePaths) { + r.nodeShapes[r.getNodeShape(node)].draw(context, pos.x, pos.y, nodeWidth, nodeHeight); + } + } + } + }; + var darken = function darken() { + var darkenOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity; + var opacity = (darkness > 0 ? darkness : -darkness) * darkenOpacity; + var c = darkness > 0 ? 0 : 255; + if (darkness !== 0) { + r.colorFillStyle(context, c, c, c, opacity); + if (usePaths) { + context.fill(path); + } else { + context.fill(); + } + } + }; + var drawBorder = function drawBorder() { + if (borderWidth > 0) { + context.lineWidth = borderWidth; + context.lineCap = 'butt'; + if (context.setLineDash) { + // for very outofdate browsers + switch (borderStyle) { + case 'dotted': + context.setLineDash([1, 1]); + break; + case 'dashed': + context.setLineDash([4, 2]); + break; + case 'solid': + case 'double': + context.setLineDash([]); + break; + } + } + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + if (borderStyle === 'double') { + context.lineWidth = borderWidth / 3; + var gco = context.globalCompositeOperation; + context.globalCompositeOperation = 'destination-out'; + if (usePaths) { + context.stroke(path); + } else { + context.stroke(); + } + context.globalCompositeOperation = gco; + } + + // reset in case we changed the border style + if (context.setLineDash) { + // for very outofdate browsers + context.setLineDash([]); + } + } + }; + var drawOutline = function drawOutline() { + if (outlineWidth > 0) { + context.lineWidth = outlineWidth; + context.lineCap = 'butt'; + if (context.setLineDash) { + // for very outofdate browsers + switch (outlineStyle) { + case 'dotted': + context.setLineDash([1, 1]); + break; + case 'dashed': + context.setLineDash([4, 2]); + break; + case 'solid': + case 'double': + context.setLineDash([]); + break; + } + } + var npos = pos; + if (usePaths) { + npos = { + x: 0, + y: 0 + }; + } + var shape = r.getNodeShape(node); + var scaleX = (nodeWidth + borderWidth + (outlineWidth + outlineOffset)) / nodeWidth; + var scaleY = (nodeHeight + borderWidth + (outlineWidth + outlineOffset)) / nodeHeight; + var sWidth = nodeWidth * scaleX; + var sHeight = nodeHeight * scaleY; + var points = r.nodeShapes[shape].points; + var _path; + if (usePaths) { + var outlinePath = getPath(sWidth, sHeight, shape, points); + _path = outlinePath.path; + } + + // draw the outline path, either by using expanded points or by scaling + // the dimensions, depending on shape + if (shape === "ellipse") { + r.drawEllipsePath(_path || context, npos.x, npos.y, sWidth, sHeight); + } else if (['round-diamond', 'round-heptagon', 'round-hexagon', 'round-octagon', 'round-pentagon', 'round-polygon', 'round-triangle', 'round-tag'].includes(shape)) { + var sMult = 0; + var offsetX = 0; + var offsetY = 0; + if (shape === 'round-diamond') { + sMult = (borderWidth + outlineOffset + outlineWidth) * 1.4; + } else if (shape === 'round-heptagon') { + sMult = (borderWidth + outlineOffset + outlineWidth) * 1.075; + offsetY = -(borderWidth / 2 + outlineOffset + outlineWidth) / 35; + } else if (shape === 'round-hexagon') { + sMult = (borderWidth + outlineOffset + outlineWidth) * 1.12; + } else if (shape === 'round-pentagon') { + sMult = (borderWidth + outlineOffset + outlineWidth) * 1.13; + offsetY = -(borderWidth / 2 + outlineOffset + outlineWidth) / 15; + } else if (shape === 'round-tag') { + sMult = (borderWidth + outlineOffset + outlineWidth) * 1.12; + offsetX = (borderWidth / 2 + outlineWidth + outlineOffset) * .07; + } else if (shape === 'round-triangle') { + sMult = (borderWidth + outlineOffset + outlineWidth) * (Math.PI / 2); + offsetY = -(borderWidth + outlineOffset / 2 + outlineWidth) / Math.PI; + } + if (sMult !== 0) { + scaleX = (nodeWidth + sMult) / nodeWidth; + scaleY = (nodeHeight + sMult) / nodeHeight; + } + r.drawRoundPolygonPath(_path || context, npos.x + offsetX, npos.y + offsetY, nodeWidth * scaleX, nodeHeight * scaleY, points); + } else if (['roundrectangle', 'round-rectangle'].includes(shape)) { + r.drawRoundRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight); + } else if (['cutrectangle', 'cut-rectangle'].includes(shape)) { + r.drawCutRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight); + } else if (['bottomroundrectangle', 'bottom-round-rectangle'].includes(shape)) { + r.drawBottomRoundRectanglePath(_path || context, npos.x, npos.y, sWidth, sHeight); + } else if (shape === "barrel") { + r.drawBarrelPath(_path || context, npos.x, npos.y, sWidth, sHeight); + } else if (shape.startsWith("polygon") || ['rhomboid', 'right-rhomboid', 'round-tag', 'tag', 'vee'].includes(shape)) { + var pad = (borderWidth + outlineWidth + outlineOffset) / nodeWidth; + points = joinLines(expandPolygon(points, pad)); + r.drawPolygonPath(_path || context, npos.x, npos.y, nodeWidth, nodeHeight, points); + } else { + var _pad = (borderWidth + outlineWidth + outlineOffset) / nodeWidth; + points = joinLines(expandPolygon(points, -_pad)); + r.drawPolygonPath(_path || context, npos.x, npos.y, nodeWidth, nodeHeight, points); + } + if (usePaths) { + context.stroke(_path); + } else { + context.stroke(); + } + if (outlineStyle === 'double') { + context.lineWidth = borderWidth / 3; + var gco = context.globalCompositeOperation; + context.globalCompositeOperation = 'destination-out'; + if (usePaths) { + context.stroke(_path); + } else { + context.stroke(); + } + context.globalCompositeOperation = gco; + } + + // reset in case we changed the border style + if (context.setLineDash) { + // for very outofdate browsers + context.setLineDash([]); + } + } + }; + var drawOverlay = function drawOverlay() { + if (shouldDrawOverlay) { + r.drawNodeOverlay(context, node, pos, nodeWidth, nodeHeight); + } + }; + var drawUnderlay = function drawUnderlay() { + if (shouldDrawOverlay) { + r.drawNodeUnderlay(context, node, pos, nodeWidth, nodeHeight); + } + }; + var drawText = function drawText() { + r.drawElementText(context, node, null, drawLabel); + }; + var ghost = node.pstyle('ghost').value === 'yes'; + if (ghost) { + var gx = node.pstyle('ghost-offset-x').pfValue; + var gy = node.pstyle('ghost-offset-y').pfValue; + var ghostOpacity = node.pstyle('ghost-opacity').value; + var effGhostOpacity = ghostOpacity * eleOpacity; + context.translate(gx, gy); + setupOutlineColor(); + drawOutline(); + setupShapeColor(ghostOpacity * bgOpacity); + drawShape(); + drawImages(effGhostOpacity, true); + setupBorderColor(ghostOpacity * borderOpacity); + drawBorder(); + drawPie(darkness !== 0 || borderWidth !== 0); + drawImages(effGhostOpacity, false); + darken(effGhostOpacity); + context.translate(-gx, -gy); + } + if (usePaths) { + context.translate(-pos.x, -pos.y); + } + drawUnderlay(); + if (usePaths) { + context.translate(pos.x, pos.y); + } + setupOutlineColor(); + drawOutline(); + setupShapeColor(); + drawShape(); + drawImages(eleOpacity, true); + setupBorderColor(); + drawBorder(); + drawPie(darkness !== 0 || borderWidth !== 0); + drawImages(eleOpacity, false); + darken(); + if (usePaths) { + context.translate(-pos.x, -pos.y); + } + drawText(); + drawOverlay(); + + // + // clean up shift + + if (shiftToOriginWithBb) { + context.translate(bb.x1, bb.y1); + } + }; + var drawNodeOverlayUnderlay = function drawNodeOverlayUnderlay(overlayOrUnderlay) { + if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { + throw new Error('Invalid state'); + } + return function (context, node, pos, nodeWidth, nodeHeight) { + var r = this; + if (!node.visible()) { + return; + } + var padding = node.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; + var opacity = node.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; + var color = node.pstyle("".concat(overlayOrUnderlay, "-color")).value; + var shape = node.pstyle("".concat(overlayOrUnderlay, "-shape")).value; + if (opacity > 0) { + pos = pos || node.position(); + if (nodeWidth == null || nodeHeight == null) { + var _padding = node.padding(); + nodeWidth = node.width() + 2 * _padding; + nodeHeight = node.height() + 2 * _padding; + } + r.colorFillStyle(context, color[0], color[1], color[2], opacity); + r.nodeShapes[shape].draw(context, pos.x, pos.y, nodeWidth + padding * 2, nodeHeight + padding * 2); + context.fill(); + } + }; + }; + CRp$5.drawNodeOverlay = drawNodeOverlayUnderlay('overlay'); + CRp$5.drawNodeUnderlay = drawNodeOverlayUnderlay('underlay'); + + // does the node have at least one pie piece? + CRp$5.hasPie = function (node) { + node = node[0]; // ensure ele ref + + return node._private.hasPie; + }; + CRp$5.drawPie = function (context, node, nodeOpacity, pos) { + node = node[0]; // ensure ele ref + pos = pos || node.position(); + var cyStyle = node.cy().style(); + var pieSize = node.pstyle('pie-size'); + var x = pos.x; + var y = pos.y; + var nodeW = node.width(); + var nodeH = node.height(); + var radius = Math.min(nodeW, nodeH) / 2; // must fit in node + var lastPercent = 0; // what % to continue drawing pie slices from on [0, 1] + var usePaths = this.usePaths(); + if (usePaths) { + x = 0; + y = 0; + } + if (pieSize.units === '%') { + radius = radius * pieSize.pfValue; + } else if (pieSize.pfValue !== undefined) { + radius = pieSize.pfValue / 2; + } + for (var i = 1; i <= cyStyle.pieBackgroundN; i++) { + // 1..N + var size = node.pstyle('pie-' + i + '-background-size').value; + var color = node.pstyle('pie-' + i + '-background-color').value; + var opacity = node.pstyle('pie-' + i + '-background-opacity').value * nodeOpacity; + var percent = size / 100; // map integer range [0, 100] to [0, 1] + + // percent can't push beyond 1 + if (percent + lastPercent > 1) { + percent = 1 - lastPercent; + } + var angleStart = 1.5 * Math.PI + 2 * Math.PI * lastPercent; // start at 12 o'clock and go clockwise + var angleDelta = 2 * Math.PI * percent; + var angleEnd = angleStart + angleDelta; + + // ignore if + // - zero size + // - we're already beyond the full circle + // - adding the current slice would go beyond the full circle + if (size === 0 || lastPercent >= 1 || lastPercent + percent > 1) { + continue; + } + context.beginPath(); + context.moveTo(x, y); + context.arc(x, y, radius, angleStart, angleEnd); + context.closePath(); + this.colorFillStyle(context, color[0], color[1], color[2], opacity); + context.fill(); + lastPercent += percent; + } + }; + + var CRp$4 = {}; + var motionBlurDelay = 100; + + // var isFirefox = typeof InstallTrigger !== 'undefined'; + + CRp$4.getPixelRatio = function () { + var context = this.data.contexts[0]; + if (this.forcedPixelRatio != null) { + return this.forcedPixelRatio; + } + var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1; + return (window.devicePixelRatio || 1) / backingStore; // eslint-disable-line no-undef + }; + + CRp$4.paintCache = function (context) { + var caches = this.paintCaches = this.paintCaches || []; + var needToCreateCache = true; + var cache; + for (var i = 0; i < caches.length; i++) { + cache = caches[i]; + if (cache.context === context) { + needToCreateCache = false; + break; + } + } + if (needToCreateCache) { + cache = { + context: context + }; + caches.push(cache); + } + return cache; + }; + CRp$4.createGradientStyleFor = function (context, shapeStyleName, ele, fill, opacity) { + var gradientStyle; + var usePaths = this.usePaths(); + var colors = ele.pstyle(shapeStyleName + '-gradient-stop-colors').value, + positions = ele.pstyle(shapeStyleName + '-gradient-stop-positions').pfValue; + if (fill === 'radial-gradient') { + if (ele.isEdge()) { + var start = ele.sourceEndpoint(), + end = ele.targetEndpoint(), + mid = ele.midpoint(); + var d1 = dist(start, mid); + var d2 = dist(end, mid); + gradientStyle = context.createRadialGradient(mid.x, mid.y, 0, mid.x, mid.y, Math.max(d1, d2)); + } else { + var pos = usePaths ? { + x: 0, + y: 0 + } : ele.position(), + width = ele.paddedWidth(), + height = ele.paddedHeight(); + gradientStyle = context.createRadialGradient(pos.x, pos.y, 0, pos.x, pos.y, Math.max(width, height)); + } + } else { + if (ele.isEdge()) { + var _start = ele.sourceEndpoint(), + _end = ele.targetEndpoint(); + gradientStyle = context.createLinearGradient(_start.x, _start.y, _end.x, _end.y); + } else { + var _pos = usePaths ? { + x: 0, + y: 0 + } : ele.position(), + _width = ele.paddedWidth(), + _height = ele.paddedHeight(), + halfWidth = _width / 2, + halfHeight = _height / 2; + var direction = ele.pstyle('background-gradient-direction').value; + switch (direction) { + case 'to-bottom': + gradientStyle = context.createLinearGradient(_pos.x, _pos.y - halfHeight, _pos.x, _pos.y + halfHeight); + break; + case 'to-top': + gradientStyle = context.createLinearGradient(_pos.x, _pos.y + halfHeight, _pos.x, _pos.y - halfHeight); + break; + case 'to-left': + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y, _pos.x - halfWidth, _pos.y); + break; + case 'to-right': + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y, _pos.x + halfWidth, _pos.y); + break; + case 'to-bottom-right': + case 'to-right-bottom': + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y - halfHeight, _pos.x + halfWidth, _pos.y + halfHeight); + break; + case 'to-top-right': + case 'to-right-top': + gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y + halfHeight, _pos.x + halfWidth, _pos.y - halfHeight); + break; + case 'to-bottom-left': + case 'to-left-bottom': + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y - halfHeight, _pos.x - halfWidth, _pos.y + halfHeight); + break; + case 'to-top-left': + case 'to-left-top': + gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y + halfHeight, _pos.x - halfWidth, _pos.y - halfHeight); + break; + } + } + } + if (!gradientStyle) return null; // invalid gradient style + + var hasPositions = positions.length === colors.length; + var length = colors.length; + for (var i = 0; i < length; i++) { + gradientStyle.addColorStop(hasPositions ? positions[i] : i / (length - 1), 'rgba(' + colors[i][0] + ',' + colors[i][1] + ',' + colors[i][2] + ',' + opacity + ')'); + } + return gradientStyle; + }; + CRp$4.gradientFillStyle = function (context, ele, fill, opacity) { + var gradientStyle = this.createGradientStyleFor(context, 'background', ele, fill, opacity); + if (!gradientStyle) return null; // error + context.fillStyle = gradientStyle; + }; + CRp$4.colorFillStyle = function (context, r, g, b, a) { + context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + // turn off for now, seems context does its own caching + + // var cache = this.paintCache(context); + + // var fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + + // if( cache.fillStyle !== fillStyle ){ + // context.fillStyle = cache.fillStyle = fillStyle; + // } + }; + + CRp$4.eleFillStyle = function (context, ele, opacity) { + var backgroundFill = ele.pstyle('background-fill').value; + if (backgroundFill === 'linear-gradient' || backgroundFill === 'radial-gradient') { + this.gradientFillStyle(context, ele, backgroundFill, opacity); + } else { + var backgroundColor = ele.pstyle('background-color').value; + this.colorFillStyle(context, backgroundColor[0], backgroundColor[1], backgroundColor[2], opacity); + } + }; + CRp$4.gradientStrokeStyle = function (context, ele, fill, opacity) { + var gradientStyle = this.createGradientStyleFor(context, 'line', ele, fill, opacity); + if (!gradientStyle) return null; // error + context.strokeStyle = gradientStyle; + }; + CRp$4.colorStrokeStyle = function (context, r, g, b, a) { + context.strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + // turn off for now, seems context does its own caching + + // var cache = this.paintCache(context); + + // var strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; + + // if( cache.strokeStyle !== strokeStyle ){ + // context.strokeStyle = cache.strokeStyle = strokeStyle; + // } + }; + + CRp$4.eleStrokeStyle = function (context, ele, opacity) { + var lineFill = ele.pstyle('line-fill').value; + if (lineFill === 'linear-gradient' || lineFill === 'radial-gradient') { + this.gradientStrokeStyle(context, ele, lineFill, opacity); + } else { + var lineColor = ele.pstyle('line-color').value; + this.colorStrokeStyle(context, lineColor[0], lineColor[1], lineColor[2], opacity); + } + }; + + // Resize canvas + CRp$4.matchCanvasSize = function (container) { + var r = this; + var data = r.data; + var bb = r.findContainerClientCoords(); + var width = bb[2]; + var height = bb[3]; + var pixelRatio = r.getPixelRatio(); + var mbPxRatio = r.motionBlurPxRatio; + if (container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE] || container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]) { + pixelRatio = mbPxRatio; + } + var canvasWidth = width * pixelRatio; + var canvasHeight = height * pixelRatio; + var canvas; + if (canvasWidth === r.canvasWidth && canvasHeight === r.canvasHeight) { + return; // save cycles if same + } + + r.fontCaches = null; // resizing resets the style + + var canvasContainer = data.canvasContainer; + canvasContainer.style.width = width + 'px'; + canvasContainer.style.height = height + 'px'; + for (var i = 0; i < r.CANVAS_LAYERS; i++) { + canvas = data.canvases[i]; + canvas.width = canvasWidth; + canvas.height = canvasHeight; + canvas.style.width = width + 'px'; + canvas.style.height = height + 'px'; + } + for (var i = 0; i < r.BUFFER_COUNT; i++) { + canvas = data.bufferCanvases[i]; + canvas.width = canvasWidth; + canvas.height = canvasHeight; + canvas.style.width = width + 'px'; + canvas.style.height = height + 'px'; + } + r.textureMult = 1; + if (pixelRatio <= 1) { + canvas = data.bufferCanvases[r.TEXTURE_BUFFER]; + r.textureMult = 2; + canvas.width = canvasWidth * r.textureMult; + canvas.height = canvasHeight * r.textureMult; + } + r.canvasWidth = canvasWidth; + r.canvasHeight = canvasHeight; + }; + CRp$4.renderTo = function (cxt, zoom, pan, pxRatio) { + this.render({ + forcedContext: cxt, + forcedZoom: zoom, + forcedPan: pan, + drawAllLayers: true, + forcedPxRatio: pxRatio + }); + }; + CRp$4.render = function (options) { + options = options || staticEmptyObject(); + var forcedContext = options.forcedContext; + var drawAllLayers = options.drawAllLayers; + var drawOnlyNodeLayer = options.drawOnlyNodeLayer; + var forcedZoom = options.forcedZoom; + var forcedPan = options.forcedPan; + var r = this; + var pixelRatio = options.forcedPxRatio === undefined ? this.getPixelRatio() : options.forcedPxRatio; + var cy = r.cy; + var data = r.data; + var needDraw = data.canvasNeedsRedraw; + var textureDraw = r.textureOnViewport && !forcedContext && (r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming); + var motionBlur = options.motionBlur !== undefined ? options.motionBlur : r.motionBlur; + var mbPxRatio = r.motionBlurPxRatio; + var hasCompoundNodes = cy.hasCompoundNodes(); + var inNodeDragGesture = r.hoverData.draggingEles; + var inBoxSelection = r.hoverData.selecting || r.touchData.selecting ? true : false; + motionBlur = motionBlur && !forcedContext && r.motionBlurEnabled && !inBoxSelection; + var motionBlurFadeEffect = motionBlur; + if (!forcedContext) { + if (r.prevPxRatio !== pixelRatio) { + r.invalidateContainerClientCoordsCache(); + r.matchCanvasSize(r.container); + r.redrawHint('eles', true); + r.redrawHint('drag', true); + } + r.prevPxRatio = pixelRatio; + } + if (!forcedContext && r.motionBlurTimeout) { + clearTimeout(r.motionBlurTimeout); + } + if (motionBlur) { + if (r.mbFrames == null) { + r.mbFrames = 0; + } + r.mbFrames++; + if (r.mbFrames < 3) { + // need several frames before even high quality motionblur + motionBlurFadeEffect = false; + } + + // go to lower quality blurry frames when several m/b frames have been rendered (avoids flashing) + if (r.mbFrames > r.minMbLowQualFrames) { + //r.fullQualityMb = false; + r.motionBlurPxRatio = r.mbPxRBlurry; + } + } + if (r.clearingMotionBlur) { + r.motionBlurPxRatio = 1; + } + + // b/c drawToContext() may be async w.r.t. redraw(), keep track of last texture frame + // because a rogue async texture frame would clear needDraw + if (r.textureDrawLastFrame && !textureDraw) { + needDraw[r.NODE] = true; + needDraw[r.SELECT_BOX] = true; + } + var style = cy.style(); + var zoom = cy.zoom(); + var effectiveZoom = forcedZoom !== undefined ? forcedZoom : zoom; + var pan = cy.pan(); + var effectivePan = { + x: pan.x, + y: pan.y + }; + var vp = { + zoom: zoom, + pan: { + x: pan.x, + y: pan.y + } + }; + var prevVp = r.prevViewport; + var viewportIsDiff = prevVp === undefined || vp.zoom !== prevVp.zoom || vp.pan.x !== prevVp.pan.x || vp.pan.y !== prevVp.pan.y; + + // we want the low quality motionblur only when the viewport is being manipulated etc (where it's not noticed) + if (!viewportIsDiff && !(inNodeDragGesture && !hasCompoundNodes)) { + r.motionBlurPxRatio = 1; + } + if (forcedPan) { + effectivePan = forcedPan; + } + + // apply pixel ratio + + effectiveZoom *= pixelRatio; + effectivePan.x *= pixelRatio; + effectivePan.y *= pixelRatio; + var eles = r.getCachedZSortedEles(); + function mbclear(context, x, y, w, h) { + var gco = context.globalCompositeOperation; + context.globalCompositeOperation = 'destination-out'; + r.colorFillStyle(context, 255, 255, 255, r.motionBlurTransparency); + context.fillRect(x, y, w, h); + context.globalCompositeOperation = gco; + } + function setContextTransform(context, clear) { + var ePan, eZoom, w, h; + if (!r.clearingMotionBlur && (context === data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] || context === data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])) { + ePan = { + x: pan.x * mbPxRatio, + y: pan.y * mbPxRatio + }; + eZoom = zoom * mbPxRatio; + w = r.canvasWidth * mbPxRatio; + h = r.canvasHeight * mbPxRatio; + } else { + ePan = effectivePan; + eZoom = effectiveZoom; + w = r.canvasWidth; + h = r.canvasHeight; + } + context.setTransform(1, 0, 0, 1, 0, 0); + if (clear === 'motionBlur') { + mbclear(context, 0, 0, w, h); + } else if (!forcedContext && (clear === undefined || clear)) { + context.clearRect(0, 0, w, h); + } + if (!drawAllLayers) { + context.translate(ePan.x, ePan.y); + context.scale(eZoom, eZoom); + } + if (forcedPan) { + context.translate(forcedPan.x, forcedPan.y); + } + if (forcedZoom) { + context.scale(forcedZoom, forcedZoom); + } + } + if (!textureDraw) { + r.textureDrawLastFrame = false; + } + if (textureDraw) { + r.textureDrawLastFrame = true; + if (!r.textureCache) { + r.textureCache = {}; + r.textureCache.bb = cy.mutableElements().boundingBox(); + r.textureCache.texture = r.data.bufferCanvases[r.TEXTURE_BUFFER]; + var cxt = r.data.bufferContexts[r.TEXTURE_BUFFER]; + cxt.setTransform(1, 0, 0, 1, 0, 0); + cxt.clearRect(0, 0, r.canvasWidth * r.textureMult, r.canvasHeight * r.textureMult); + r.render({ + forcedContext: cxt, + drawOnlyNodeLayer: true, + forcedPxRatio: pixelRatio * r.textureMult + }); + var vp = r.textureCache.viewport = { + zoom: cy.zoom(), + pan: cy.pan(), + width: r.canvasWidth, + height: r.canvasHeight + }; + vp.mpan = { + x: (0 - vp.pan.x) / vp.zoom, + y: (0 - vp.pan.y) / vp.zoom + }; + } + needDraw[r.DRAG] = false; + needDraw[r.NODE] = false; + var context = data.contexts[r.NODE]; + var texture = r.textureCache.texture; + var vp = r.textureCache.viewport; + context.setTransform(1, 0, 0, 1, 0, 0); + if (motionBlur) { + mbclear(context, 0, 0, vp.width, vp.height); + } else { + context.clearRect(0, 0, vp.width, vp.height); + } + var outsideBgColor = style.core('outside-texture-bg-color').value; + var outsideBgOpacity = style.core('outside-texture-bg-opacity').value; + r.colorFillStyle(context, outsideBgColor[0], outsideBgColor[1], outsideBgColor[2], outsideBgOpacity); + context.fillRect(0, 0, vp.width, vp.height); + var zoom = cy.zoom(); + setContextTransform(context, false); + context.clearRect(vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); + context.drawImage(texture, vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); + } else if (r.textureOnViewport && !forcedContext) { + // clear the cache since we don't need it + r.textureCache = null; + } + var extent = cy.extent(); + var vpManip = r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming || r.hoverData.draggingEles || r.cy.animated(); + var hideEdges = r.hideEdgesOnViewport && vpManip; + var needMbClear = []; + needMbClear[r.NODE] = !needDraw[r.NODE] && motionBlur && !r.clearedForMotionBlur[r.NODE] || r.clearingMotionBlur; + if (needMbClear[r.NODE]) { + r.clearedForMotionBlur[r.NODE] = true; + } + needMbClear[r.DRAG] = !needDraw[r.DRAG] && motionBlur && !r.clearedForMotionBlur[r.DRAG] || r.clearingMotionBlur; + if (needMbClear[r.DRAG]) { + r.clearedForMotionBlur[r.DRAG] = true; + } + if (needDraw[r.NODE] || drawAllLayers || drawOnlyNodeLayer || needMbClear[r.NODE]) { + var useBuffer = motionBlur && !needMbClear[r.NODE] && mbPxRatio !== 1; + var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] : data.contexts[r.NODE]); + var clear = motionBlur && !useBuffer ? 'motionBlur' : undefined; + setContextTransform(context, clear); + if (hideEdges) { + r.drawCachedNodes(context, eles.nondrag, pixelRatio, extent); + } else { + r.drawLayeredElements(context, eles.nondrag, pixelRatio, extent); + } + if (r.debug) { + r.drawDebugPoints(context, eles.nondrag); + } + if (!drawAllLayers && !motionBlur) { + needDraw[r.NODE] = false; + } + } + if (!drawOnlyNodeLayer && (needDraw[r.DRAG] || drawAllLayers || needMbClear[r.DRAG])) { + var useBuffer = motionBlur && !needMbClear[r.DRAG] && mbPxRatio !== 1; + var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG] : data.contexts[r.DRAG]); + setContextTransform(context, motionBlur && !useBuffer ? 'motionBlur' : undefined); + if (hideEdges) { + r.drawCachedNodes(context, eles.drag, pixelRatio, extent); + } else { + r.drawCachedElements(context, eles.drag, pixelRatio, extent); + } + if (r.debug) { + r.drawDebugPoints(context, eles.drag); + } + if (!drawAllLayers && !motionBlur) { + needDraw[r.DRAG] = false; + } + } + if (r.showFps || !drawOnlyNodeLayer && needDraw[r.SELECT_BOX] && !drawAllLayers) { + var context = forcedContext || data.contexts[r.SELECT_BOX]; + setContextTransform(context); + if (r.selection[4] == 1 && (r.hoverData.selecting || r.touchData.selecting)) { + var zoom = r.cy.zoom(); + var borderWidth = style.core('selection-box-border-width').value / zoom; + context.lineWidth = borderWidth; + context.fillStyle = 'rgba(' + style.core('selection-box-color').value[0] + ',' + style.core('selection-box-color').value[1] + ',' + style.core('selection-box-color').value[2] + ',' + style.core('selection-box-opacity').value + ')'; + context.fillRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); + if (borderWidth > 0) { + context.strokeStyle = 'rgba(' + style.core('selection-box-border-color').value[0] + ',' + style.core('selection-box-border-color').value[1] + ',' + style.core('selection-box-border-color').value[2] + ',' + style.core('selection-box-opacity').value + ')'; + context.strokeRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); + } + } + if (data.bgActivePosistion && !r.hoverData.selecting) { + var zoom = r.cy.zoom(); + var pos = data.bgActivePosistion; + context.fillStyle = 'rgba(' + style.core('active-bg-color').value[0] + ',' + style.core('active-bg-color').value[1] + ',' + style.core('active-bg-color').value[2] + ',' + style.core('active-bg-opacity').value + ')'; + context.beginPath(); + context.arc(pos.x, pos.y, style.core('active-bg-size').pfValue / zoom, 0, 2 * Math.PI); + context.fill(); + } + var timeToRender = r.lastRedrawTime; + if (r.showFps && timeToRender) { + timeToRender = Math.round(timeToRender); + var fps = Math.round(1000 / timeToRender); + context.setTransform(1, 0, 0, 1, 0, 0); + context.fillStyle = 'rgba(255, 0, 0, 0.75)'; + context.strokeStyle = 'rgba(255, 0, 0, 0.75)'; + context.lineWidth = 1; + context.fillText('1 frame = ' + timeToRender + ' ms = ' + fps + ' fps', 0, 20); + var maxFps = 60; + context.strokeRect(0, 30, 250, 20); + context.fillRect(0, 30, 250 * Math.min(fps / maxFps, 1), 20); + } + if (!drawAllLayers) { + needDraw[r.SELECT_BOX] = false; + } + } + + // motionblur: blit rendered blurry frames + if (motionBlur && mbPxRatio !== 1) { + var cxtNode = data.contexts[r.NODE]; + var txtNode = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]; + var cxtDrag = data.contexts[r.DRAG]; + var txtDrag = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]; + var drawMotionBlur = function drawMotionBlur(cxt, txt, needClear) { + cxt.setTransform(1, 0, 0, 1, 0, 0); + if (needClear || !motionBlurFadeEffect) { + cxt.clearRect(0, 0, r.canvasWidth, r.canvasHeight); + } else { + mbclear(cxt, 0, 0, r.canvasWidth, r.canvasHeight); + } + var pxr = mbPxRatio; + cxt.drawImage(txt, + // img + 0, 0, + // sx, sy + r.canvasWidth * pxr, r.canvasHeight * pxr, + // sw, sh + 0, 0, + // x, y + r.canvasWidth, r.canvasHeight // w, h + ); + }; + + if (needDraw[r.NODE] || needMbClear[r.NODE]) { + drawMotionBlur(cxtNode, txtNode, needMbClear[r.NODE]); + needDraw[r.NODE] = false; + } + if (needDraw[r.DRAG] || needMbClear[r.DRAG]) { + drawMotionBlur(cxtDrag, txtDrag, needMbClear[r.DRAG]); + needDraw[r.DRAG] = false; + } + } + r.prevViewport = vp; + if (r.clearingMotionBlur) { + r.clearingMotionBlur = false; + r.motionBlurCleared = true; + r.motionBlur = true; + } + if (motionBlur) { + r.motionBlurTimeout = setTimeout(function () { + r.motionBlurTimeout = null; + r.clearedForMotionBlur[r.NODE] = false; + r.clearedForMotionBlur[r.DRAG] = false; + r.motionBlur = false; + r.clearingMotionBlur = !textureDraw; + r.mbFrames = 0; + needDraw[r.NODE] = true; + needDraw[r.DRAG] = true; + r.redraw(); + }, motionBlurDelay); + } + if (!forcedContext) { + cy.emit('render'); + } + }; + + var CRp$3 = {}; + + // @O Polygon drawing + CRp$3.drawPolygonPath = function (context, x, y, width, height, points) { + var halfW = width / 2; + var halfH = height / 2; + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x + halfW * points[0], y + halfH * points[1]); + for (var i = 1; i < points.length / 2; i++) { + context.lineTo(x + halfW * points[i * 2], y + halfH * points[i * 2 + 1]); + } + context.closePath(); + }; + CRp$3.drawRoundPolygonPath = function (context, x, y, width, height, points) { + var halfW = width / 2; + var halfH = height / 2; + var cornerRadius = getRoundPolygonRadius(width, height); + if (context.beginPath) { + context.beginPath(); + } + for (var _i = 0; _i < points.length / 4; _i++) { + var sourceUv = void 0, + destUv = void 0; + if (_i === 0) { + sourceUv = points.length - 2; + } else { + sourceUv = _i * 4 - 2; + } + destUv = _i * 4 + 2; + var px = x + halfW * points[_i * 4]; + var py = y + halfH * points[_i * 4 + 1]; + var cosTheta = -points[sourceUv] * points[destUv] - points[sourceUv + 1] * points[destUv + 1]; + var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); + var cp0x = px - offset * points[sourceUv]; + var cp0y = py - offset * points[sourceUv + 1]; + var cp1x = px + offset * points[destUv]; + var cp1y = py + offset * points[destUv + 1]; + if (_i === 0) { + context.moveTo(cp0x, cp0y); + } else { + context.lineTo(cp0x, cp0y); + } + context.arcTo(px, py, cp1x, cp1y, cornerRadius); + } + context.closePath(); + }; + + // Round rectangle drawing + CRp$3.drawRoundRectanglePath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerRadius = getRoundRectangleRadius(width, height); + if (context.beginPath) { + context.beginPath(); + } + + // Start at top middle + context.moveTo(x, y - halfHeight); + // Arc from middle top to right side + context.arcTo(x + halfWidth, y - halfHeight, x + halfWidth, y, cornerRadius); + // Arc from right side to bottom + context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); + // Arc from bottom to left side + context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); + // Arc from left side to topBorder + context.arcTo(x - halfWidth, y - halfHeight, x, y - halfHeight, cornerRadius); + // Join line + context.lineTo(x, y - halfHeight); + context.closePath(); + }; + CRp$3.drawBottomRoundRectanglePath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerRadius = getRoundRectangleRadius(width, height); + if (context.beginPath) { + context.beginPath(); + } + + // Start at top middle + context.moveTo(x, y - halfHeight); + context.lineTo(x + halfWidth, y - halfHeight); + context.lineTo(x + halfWidth, y); + context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); + context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); + context.lineTo(x - halfWidth, y - halfHeight); + context.lineTo(x, y - halfHeight); + context.closePath(); + }; + CRp$3.drawCutRectanglePath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var cornerLength = getCutRectangleCornerLength(); + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(x - halfWidth + cornerLength, y - halfHeight); + context.lineTo(x + halfWidth - cornerLength, y - halfHeight); + context.lineTo(x + halfWidth, y - halfHeight + cornerLength); + context.lineTo(x + halfWidth, y + halfHeight - cornerLength); + context.lineTo(x + halfWidth - cornerLength, y + halfHeight); + context.lineTo(x - halfWidth + cornerLength, y + halfHeight); + context.lineTo(x - halfWidth, y + halfHeight - cornerLength); + context.lineTo(x - halfWidth, y - halfHeight + cornerLength); + context.closePath(); + }; + CRp$3.drawBarrelPath = function (context, x, y, width, height) { + var halfWidth = width / 2; + var halfHeight = height / 2; + var xBegin = x - halfWidth; + var xEnd = x + halfWidth; + var yBegin = y - halfHeight; + var yEnd = y + halfHeight; + var barrelCurveConstants = getBarrelCurveConstants(width, height); + var wOffset = barrelCurveConstants.widthOffset; + var hOffset = barrelCurveConstants.heightOffset; + var ctrlPtXOffset = barrelCurveConstants.ctrlPtOffsetPct * wOffset; + if (context.beginPath) { + context.beginPath(); + } + context.moveTo(xBegin, yBegin + hOffset); + context.lineTo(xBegin, yEnd - hOffset); + context.quadraticCurveTo(xBegin + ctrlPtXOffset, yEnd, xBegin + wOffset, yEnd); + context.lineTo(xEnd - wOffset, yEnd); + context.quadraticCurveTo(xEnd - ctrlPtXOffset, yEnd, xEnd, yEnd - hOffset); + context.lineTo(xEnd, yBegin + hOffset); + context.quadraticCurveTo(xEnd - ctrlPtXOffset, yBegin, xEnd - wOffset, yBegin); + context.lineTo(xBegin + wOffset, yBegin); + context.quadraticCurveTo(xBegin + ctrlPtXOffset, yBegin, xBegin, yBegin + hOffset); + context.closePath(); + }; + var sin0 = Math.sin(0); + var cos0 = Math.cos(0); + var sin = {}; + var cos = {}; + var ellipseStepSize = Math.PI / 40; + for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) { + sin[i] = Math.sin(i); + cos[i] = Math.cos(i); + } + CRp$3.drawEllipsePath = function (context, centerX, centerY, width, height) { + if (context.beginPath) { + context.beginPath(); + } + if (context.ellipse) { + context.ellipse(centerX, centerY, width / 2, height / 2, 0, 0, 2 * Math.PI); + } else { + var xPos, yPos; + var rw = width / 2; + var rh = height / 2; + for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) { + xPos = centerX - rw * sin[i] * sin0 + rw * cos[i] * cos0; + yPos = centerY + rh * cos[i] * sin0 + rh * sin[i] * cos0; + if (i === 0) { + context.moveTo(xPos, yPos); + } else { + context.lineTo(xPos, yPos); + } + } + } + context.closePath(); + }; + + /* global atob, ArrayBuffer, Uint8Array, Blob */ + var CRp$2 = {}; + CRp$2.createBuffer = function (w, h) { + var buffer = document.createElement('canvas'); // eslint-disable-line no-undef + buffer.width = w; + buffer.height = h; + return [buffer, buffer.getContext('2d')]; + }; + CRp$2.bufferCanvasImage = function (options) { + var cy = this.cy; + var eles = cy.mutableElements(); + var bb = eles.boundingBox(); + var ctrRect = this.findContainerClientCoords(); + var width = options.full ? Math.ceil(bb.w) : ctrRect[2]; + var height = options.full ? Math.ceil(bb.h) : ctrRect[3]; + var specdMaxDims = number$1(options.maxWidth) || number$1(options.maxHeight); + var pxRatio = this.getPixelRatio(); + var scale = 1; + if (options.scale !== undefined) { + width *= options.scale; + height *= options.scale; + scale = options.scale; + } else if (specdMaxDims) { + var maxScaleW = Infinity; + var maxScaleH = Infinity; + if (number$1(options.maxWidth)) { + maxScaleW = scale * options.maxWidth / width; + } + if (number$1(options.maxHeight)) { + maxScaleH = scale * options.maxHeight / height; + } + scale = Math.min(maxScaleW, maxScaleH); + width *= scale; + height *= scale; + } + if (!specdMaxDims) { + width *= pxRatio; + height *= pxRatio; + scale *= pxRatio; + } + var buffCanvas = document.createElement('canvas'); // eslint-disable-line no-undef + + buffCanvas.width = width; + buffCanvas.height = height; + buffCanvas.style.width = width + 'px'; + buffCanvas.style.height = height + 'px'; + var buffCxt = buffCanvas.getContext('2d'); + + // Rasterize the layers, but only if container has nonzero size + if (width > 0 && height > 0) { + buffCxt.clearRect(0, 0, width, height); + buffCxt.globalCompositeOperation = 'source-over'; + var zsortedEles = this.getCachedZSortedEles(); + if (options.full) { + // draw the full bounds of the graph + buffCxt.translate(-bb.x1 * scale, -bb.y1 * scale); + buffCxt.scale(scale, scale); + this.drawElements(buffCxt, zsortedEles); + buffCxt.scale(1 / scale, 1 / scale); + buffCxt.translate(bb.x1 * scale, bb.y1 * scale); + } else { + // draw the current view + var pan = cy.pan(); + var translation = { + x: pan.x * scale, + y: pan.y * scale + }; + scale *= cy.zoom(); + buffCxt.translate(translation.x, translation.y); + buffCxt.scale(scale, scale); + this.drawElements(buffCxt, zsortedEles); + buffCxt.scale(1 / scale, 1 / scale); + buffCxt.translate(-translation.x, -translation.y); + } + + // need to fill bg at end like this in order to fill cleared transparent pixels in jpgs + if (options.bg) { + buffCxt.globalCompositeOperation = 'destination-over'; + buffCxt.fillStyle = options.bg; + buffCxt.rect(0, 0, width, height); + buffCxt.fill(); + } + } + return buffCanvas; + }; + function b64ToBlob(b64, mimeType) { + var bytes = atob(b64); + var buff = new ArrayBuffer(bytes.length); + var buffUint8 = new Uint8Array(buff); + for (var i = 0; i < bytes.length; i++) { + buffUint8[i] = bytes.charCodeAt(i); + } + return new Blob([buff], { + type: mimeType + }); + } + function b64UriToB64(b64uri) { + var i = b64uri.indexOf(','); + return b64uri.substr(i + 1); + } + function output(options, canvas, mimeType) { + var getB64Uri = function getB64Uri() { + return canvas.toDataURL(mimeType, options.quality); + }; + switch (options.output) { + case 'blob-promise': + return new Promise$1(function (resolve, reject) { + try { + canvas.toBlob(function (blob) { + if (blob != null) { + resolve(blob); + } else { + reject(new Error('`canvas.toBlob()` sent a null value in its callback')); + } + }, mimeType, options.quality); + } catch (err) { + reject(err); + } + }); + case 'blob': + return b64ToBlob(b64UriToB64(getB64Uri()), mimeType); + case 'base64': + return b64UriToB64(getB64Uri()); + case 'base64uri': + default: + return getB64Uri(); + } + } + CRp$2.png = function (options) { + return output(options, this.bufferCanvasImage(options), 'image/png'); + }; + CRp$2.jpg = function (options) { + return output(options, this.bufferCanvasImage(options), 'image/jpeg'); + }; + + var CRp$1 = {}; + CRp$1.nodeShapeImpl = function (name, context, centerX, centerY, width, height, points) { + switch (name) { + case 'ellipse': + return this.drawEllipsePath(context, centerX, centerY, width, height); + case 'polygon': + return this.drawPolygonPath(context, centerX, centerY, width, height, points); + case 'round-polygon': + return this.drawRoundPolygonPath(context, centerX, centerY, width, height, points); + case 'roundrectangle': + case 'round-rectangle': + return this.drawRoundRectanglePath(context, centerX, centerY, width, height); + case 'cutrectangle': + case 'cut-rectangle': + return this.drawCutRectanglePath(context, centerX, centerY, width, height); + case 'bottomroundrectangle': + case 'bottom-round-rectangle': + return this.drawBottomRoundRectanglePath(context, centerX, centerY, width, height); + case 'barrel': + return this.drawBarrelPath(context, centerX, centerY, width, height); + } + }; + + var CR = CanvasRenderer; + var CRp = CanvasRenderer.prototype; + CRp.CANVAS_LAYERS = 3; + // + CRp.SELECT_BOX = 0; + CRp.DRAG = 1; + CRp.NODE = 2; + CRp.BUFFER_COUNT = 3; + // + CRp.TEXTURE_BUFFER = 0; + CRp.MOTIONBLUR_BUFFER_NODE = 1; + CRp.MOTIONBLUR_BUFFER_DRAG = 2; + function CanvasRenderer(options) { + var r = this; + r.data = { + canvases: new Array(CRp.CANVAS_LAYERS), + contexts: new Array(CRp.CANVAS_LAYERS), + canvasNeedsRedraw: new Array(CRp.CANVAS_LAYERS), + bufferCanvases: new Array(CRp.BUFFER_COUNT), + bufferContexts: new Array(CRp.CANVAS_LAYERS) + }; + var tapHlOffAttr = '-webkit-tap-highlight-color'; + var tapHlOffStyle = 'rgba(0,0,0,0)'; + r.data.canvasContainer = document.createElement('div'); // eslint-disable-line no-undef + var containerStyle = r.data.canvasContainer.style; + r.data.canvasContainer.style[tapHlOffAttr] = tapHlOffStyle; + containerStyle.position = 'relative'; + containerStyle.zIndex = '0'; + containerStyle.overflow = 'hidden'; + var container = options.cy.container(); + container.appendChild(r.data.canvasContainer); + container.style[tapHlOffAttr] = tapHlOffStyle; + var styleMap = { + '-webkit-user-select': 'none', + '-moz-user-select': '-moz-none', + 'user-select': 'none', + '-webkit-tap-highlight-color': 'rgba(0,0,0,0)', + 'outline-style': 'none' + }; + if (ms()) { + styleMap['-ms-touch-action'] = 'none'; + styleMap['touch-action'] = 'none'; + } + for (var i = 0; i < CRp.CANVAS_LAYERS; i++) { + var canvas = r.data.canvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef + r.data.contexts[i] = canvas.getContext('2d'); + Object.keys(styleMap).forEach(function (k) { + canvas.style[k] = styleMap[k]; + }); + canvas.style.position = 'absolute'; + canvas.setAttribute('data-id', 'layer' + i); + canvas.style.zIndex = String(CRp.CANVAS_LAYERS - i); + r.data.canvasContainer.appendChild(canvas); + r.data.canvasNeedsRedraw[i] = false; + } + r.data.topCanvas = r.data.canvases[0]; + r.data.canvases[CRp.NODE].setAttribute('data-id', 'layer' + CRp.NODE + '-node'); + r.data.canvases[CRp.SELECT_BOX].setAttribute('data-id', 'layer' + CRp.SELECT_BOX + '-selectbox'); + r.data.canvases[CRp.DRAG].setAttribute('data-id', 'layer' + CRp.DRAG + '-drag'); + for (var i = 0; i < CRp.BUFFER_COUNT; i++) { + r.data.bufferCanvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef + r.data.bufferContexts[i] = r.data.bufferCanvases[i].getContext('2d'); + r.data.bufferCanvases[i].style.position = 'absolute'; + r.data.bufferCanvases[i].setAttribute('data-id', 'buffer' + i); + r.data.bufferCanvases[i].style.zIndex = String(-i - 1); + r.data.bufferCanvases[i].style.visibility = 'hidden'; + //r.data.canvasContainer.appendChild(r.data.bufferCanvases[i]); + } + + r.pathsEnabled = true; + var emptyBb = makeBoundingBox(); + var getBoxCenter = function getBoxCenter(bb) { + return { + x: (bb.x1 + bb.x2) / 2, + y: (bb.y1 + bb.y2) / 2 + }; + }; + var getCenterOffset = function getCenterOffset(bb) { + return { + x: -bb.w / 2, + y: -bb.h / 2 + }; + }; + var backgroundTimestampHasChanged = function backgroundTimestampHasChanged(ele) { + var _p = ele[0]._private; + var same = _p.oldBackgroundTimestamp === _p.backgroundTimestamp; + return !same; + }; + var getStyleKey = function getStyleKey(ele) { + return ele[0]._private.nodeKey; + }; + var getLabelKey = function getLabelKey(ele) { + return ele[0]._private.labelStyleKey; + }; + var getSourceLabelKey = function getSourceLabelKey(ele) { + return ele[0]._private.sourceLabelStyleKey; + }; + var getTargetLabelKey = function getTargetLabelKey(ele) { + return ele[0]._private.targetLabelStyleKey; + }; + var drawElement = function drawElement(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElement(context, ele, bb, false, false, useEleOpacity); + }; + var drawLabel = function drawLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, 'main', useEleOpacity); + }; + var drawSourceLabel = function drawSourceLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, 'source', useEleOpacity); + }; + var drawTargetLabel = function drawTargetLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { + return r.drawElementText(context, ele, bb, scaledLabelShown, 'target', useEleOpacity); + }; + var getElementBox = function getElementBox(ele) { + ele.boundingBox(); + return ele[0]._private.bodyBounds; + }; + var getLabelBox = function getLabelBox(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.main || emptyBb; + }; + var getSourceLabelBox = function getSourceLabelBox(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.source || emptyBb; + }; + var getTargetLabelBox = function getTargetLabelBox(ele) { + ele.boundingBox(); + return ele[0]._private.labelBounds.target || emptyBb; + }; + var isLabelVisibleAtScale = function isLabelVisibleAtScale(ele, scaledLabelShown) { + return scaledLabelShown; + }; + var getElementRotationPoint = function getElementRotationPoint(ele) { + return getBoxCenter(getElementBox(ele)); + }; + var addTextMargin = function addTextMargin(prefix, pt, ele) { + var pre = prefix ? prefix + '-' : ''; + return { + x: pt.x + ele.pstyle(pre + 'text-margin-x').pfValue, + y: pt.y + ele.pstyle(pre + 'text-margin-y').pfValue + }; + }; + var getRsPt = function getRsPt(ele, x, y) { + var rs = ele[0]._private.rscratch; + return { + x: rs[x], + y: rs[y] + }; + }; + var getLabelRotationPoint = function getLabelRotationPoint(ele) { + return addTextMargin('', getRsPt(ele, 'labelX', 'labelY'), ele); + }; + var getSourceLabelRotationPoint = function getSourceLabelRotationPoint(ele) { + return addTextMargin('source', getRsPt(ele, 'sourceLabelX', 'sourceLabelY'), ele); + }; + var getTargetLabelRotationPoint = function getTargetLabelRotationPoint(ele) { + return addTextMargin('target', getRsPt(ele, 'targetLabelX', 'targetLabelY'), ele); + }; + var getElementRotationOffset = function getElementRotationOffset(ele) { + return getCenterOffset(getElementBox(ele)); + }; + var getSourceLabelRotationOffset = function getSourceLabelRotationOffset(ele) { + return getCenterOffset(getSourceLabelBox(ele)); + }; + var getTargetLabelRotationOffset = function getTargetLabelRotationOffset(ele) { + return getCenterOffset(getTargetLabelBox(ele)); + }; + var getLabelRotationOffset = function getLabelRotationOffset(ele) { + var bb = getLabelBox(ele); + var p = getCenterOffset(getLabelBox(ele)); + if (ele.isNode()) { + switch (ele.pstyle('text-halign').value) { + case 'left': + p.x = -bb.w; + break; + case 'right': + p.x = 0; + break; + } + switch (ele.pstyle('text-valign').value) { + case 'top': + p.y = -bb.h; + break; + case 'bottom': + p.y = 0; + break; + } + } + return p; + }; + var eleTxrCache = r.data.eleTxrCache = new ElementTextureCache(r, { + getKey: getStyleKey, + doesEleInvalidateKey: backgroundTimestampHasChanged, + drawElement: drawElement, + getBoundingBox: getElementBox, + getRotationPoint: getElementRotationPoint, + getRotationOffset: getElementRotationOffset, + allowEdgeTxrCaching: false, + allowParentTxrCaching: false + }); + var lblTxrCache = r.data.lblTxrCache = new ElementTextureCache(r, { + getKey: getLabelKey, + drawElement: drawLabel, + getBoundingBox: getLabelBox, + getRotationPoint: getLabelRotationPoint, + getRotationOffset: getLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var slbTxrCache = r.data.slbTxrCache = new ElementTextureCache(r, { + getKey: getSourceLabelKey, + drawElement: drawSourceLabel, + getBoundingBox: getSourceLabelBox, + getRotationPoint: getSourceLabelRotationPoint, + getRotationOffset: getSourceLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var tlbTxrCache = r.data.tlbTxrCache = new ElementTextureCache(r, { + getKey: getTargetLabelKey, + drawElement: drawTargetLabel, + getBoundingBox: getTargetLabelBox, + getRotationPoint: getTargetLabelRotationPoint, + getRotationOffset: getTargetLabelRotationOffset, + isVisible: isLabelVisibleAtScale + }); + var lyrTxrCache = r.data.lyrTxrCache = new LayeredTextureCache(r); + r.onUpdateEleCalcs(function invalidateTextureCaches(willDraw, eles) { + // each cache should check for sub-key diff to see that the update affects that cache particularly + eleTxrCache.invalidateElements(eles); + lblTxrCache.invalidateElements(eles); + slbTxrCache.invalidateElements(eles); + tlbTxrCache.invalidateElements(eles); + + // any change invalidates the layers + lyrTxrCache.invalidateElements(eles); + + // update the old bg timestamp so diffs can be done in the ele txr caches + for (var _i = 0; _i < eles.length; _i++) { + var _p = eles[_i]._private; + _p.oldBackgroundTimestamp = _p.backgroundTimestamp; + } + }); + var refineInLayers = function refineInLayers(reqs) { + for (var i = 0; i < reqs.length; i++) { + lyrTxrCache.enqueueElementRefinement(reqs[i].ele); + } + }; + eleTxrCache.onDequeue(refineInLayers); + lblTxrCache.onDequeue(refineInLayers); + slbTxrCache.onDequeue(refineInLayers); + tlbTxrCache.onDequeue(refineInLayers); + } + CRp.redrawHint = function (group, bool) { + var r = this; + switch (group) { + case 'eles': + r.data.canvasNeedsRedraw[CRp.NODE] = bool; + break; + case 'drag': + r.data.canvasNeedsRedraw[CRp.DRAG] = bool; + break; + case 'select': + r.data.canvasNeedsRedraw[CRp.SELECT_BOX] = bool; + break; + } + }; + + // whether to use Path2D caching for drawing + var pathsImpld = typeof Path2D !== 'undefined'; + CRp.path2dEnabled = function (on) { + if (on === undefined) { + return this.pathsEnabled; + } + this.pathsEnabled = on ? true : false; + }; + CRp.usePaths = function () { + return pathsImpld && this.pathsEnabled; + }; + CRp.setImgSmoothing = function (context, bool) { + if (context.imageSmoothingEnabled != null) { + context.imageSmoothingEnabled = bool; + } else { + context.webkitImageSmoothingEnabled = bool; + context.mozImageSmoothingEnabled = bool; + context.msImageSmoothingEnabled = bool; + } + }; + CRp.getImgSmoothing = function (context) { + if (context.imageSmoothingEnabled != null) { + return context.imageSmoothingEnabled; + } else { + return context.webkitImageSmoothingEnabled || context.mozImageSmoothingEnabled || context.msImageSmoothingEnabled; + } + }; + CRp.makeOffscreenCanvas = function (width, height) { + var canvas; + if ((typeof OffscreenCanvas === "undefined" ? "undefined" : _typeof(OffscreenCanvas)) !== ("undefined" )) { + canvas = new OffscreenCanvas(width, height); + } else { + canvas = document.createElement('canvas'); // eslint-disable-line no-undef + canvas.width = width; + canvas.height = height; + } + return canvas; + }; + [CRp$a, CRp$9, CRp$8, CRp$7, CRp$6, CRp$5, CRp$4, CRp$3, CRp$2, CRp$1].forEach(function (props) { + extend(CRp, props); + }); + + var renderer = [{ + name: 'null', + impl: NullRenderer + }, { + name: 'base', + impl: BR + }, { + name: 'canvas', + impl: CR + }]; + + var incExts = [{ + type: 'layout', + extensions: layout + }, { + type: 'renderer', + extensions: renderer + }]; + + // registered extensions to cytoscape, indexed by name + var extensions = {}; + + // registered modules for extensions, indexed by name + var modules = {}; + function setExtension(type, name, registrant) { + var ext = registrant; + var overrideErr = function overrideErr(field) { + warn('Can not register `' + name + '` for `' + type + '` since `' + field + '` already exists in the prototype and can not be overridden'); + }; + if (type === 'core') { + if (Core.prototype[name]) { + return overrideErr(name); + } else { + Core.prototype[name] = registrant; + } + } else if (type === 'collection') { + if (Collection.prototype[name]) { + return overrideErr(name); + } else { + Collection.prototype[name] = registrant; + } + } else if (type === 'layout') { + // fill in missing layout functions in the prototype + + var Layout = function Layout(options) { + this.options = options; + registrant.call(this, options); + + // make sure layout has _private for use w/ std apis like .on() + if (!plainObject(this._private)) { + this._private = {}; + } + this._private.cy = options.cy; + this._private.listeners = []; + this.createEmitter(); + }; + var layoutProto = Layout.prototype = Object.create(registrant.prototype); + var optLayoutFns = []; + for (var i = 0; i < optLayoutFns.length; i++) { + var fnName = optLayoutFns[i]; + layoutProto[fnName] = layoutProto[fnName] || function () { + return this; + }; + } + + // either .start() or .run() is defined, so autogen the other + if (layoutProto.start && !layoutProto.run) { + layoutProto.run = function () { + this.start(); + return this; + }; + } else if (!layoutProto.start && layoutProto.run) { + layoutProto.start = function () { + this.run(); + return this; + }; + } + var regStop = registrant.prototype.stop; + layoutProto.stop = function () { + var opts = this.options; + if (opts && opts.animate) { + var anis = this.animations; + if (anis) { + for (var _i = 0; _i < anis.length; _i++) { + anis[_i].stop(); + } + } + } + if (regStop) { + regStop.call(this); + } else { + this.emit('layoutstop'); + } + return this; + }; + if (!layoutProto.destroy) { + layoutProto.destroy = function () { + return this; + }; + } + layoutProto.cy = function () { + return this._private.cy; + }; + var getCy = function getCy(layout) { + return layout._private.cy; + }; + var emitterOpts = { + addEventFields: function addEventFields(layout, evt) { + evt.layout = layout; + evt.cy = getCy(layout); + evt.target = layout; + }, + bubble: function bubble() { + return true; + }, + parent: function parent(layout) { + return getCy(layout); + } + }; + extend(layoutProto, { + createEmitter: function createEmitter() { + this._private.emitter = new Emitter(emitterOpts, this); + return this; + }, + emitter: function emitter() { + return this._private.emitter; + }, + on: function on(evt, cb) { + this.emitter().on(evt, cb); + return this; + }, + one: function one(evt, cb) { + this.emitter().one(evt, cb); + return this; + }, + once: function once(evt, cb) { + this.emitter().one(evt, cb); + return this; + }, + removeListener: function removeListener(evt, cb) { + this.emitter().removeListener(evt, cb); + return this; + }, + removeAllListeners: function removeAllListeners() { + this.emitter().removeAllListeners(); + return this; + }, + emit: function emit(evt, params) { + this.emitter().emit(evt, params); + return this; + } + }); + define.eventAliasesOn(layoutProto); + ext = Layout; // replace with our wrapped layout + } else if (type === 'renderer' && name !== 'null' && name !== 'base') { + // user registered renderers inherit from base + + var BaseRenderer = getExtension('renderer', 'base'); + var bProto = BaseRenderer.prototype; + var RegistrantRenderer = registrant; + var rProto = registrant.prototype; + var Renderer = function Renderer() { + BaseRenderer.apply(this, arguments); + RegistrantRenderer.apply(this, arguments); + }; + var proto = Renderer.prototype; + for (var pName in bProto) { + var pVal = bProto[pName]; + var existsInR = rProto[pName] != null; + if (existsInR) { + return overrideErr(pName); + } + proto[pName] = pVal; // take impl from base + } + + for (var _pName in rProto) { + proto[_pName] = rProto[_pName]; // take impl from registrant + } + + bProto.clientFunctions.forEach(function (name) { + proto[name] = proto[name] || function () { + error('Renderer does not implement `renderer.' + name + '()` on its prototype'); + }; + }); + ext = Renderer; + } else if (type === '__proto__' || type === 'constructor' || type === 'prototype') { + // to avoid potential prototype pollution + return error(type + ' is an illegal type to be registered, possibly lead to prototype pollutions'); + } + return setMap({ + map: extensions, + keys: [type, name], + value: ext + }); + } + function getExtension(type, name) { + return getMap({ + map: extensions, + keys: [type, name] + }); + } + function setModule(type, name, moduleType, moduleName, registrant) { + return setMap({ + map: modules, + keys: [type, name, moduleType, moduleName], + value: registrant + }); + } + function getModule(type, name, moduleType, moduleName) { + return getMap({ + map: modules, + keys: [type, name, moduleType, moduleName] + }); + } + var extension = function extension() { + // e.g. extension('renderer', 'svg') + if (arguments.length === 2) { + return getExtension.apply(null, arguments); + } + + // e.g. extension('renderer', 'svg', { ... }) + else if (arguments.length === 3) { + return setExtension.apply(null, arguments); + } + + // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse') + else if (arguments.length === 4) { + return getModule.apply(null, arguments); + } + + // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse', { ... }) + else if (arguments.length === 5) { + return setModule.apply(null, arguments); + } else { + error('Invalid extension access syntax'); + } + }; + + // allows a core instance to access extensions internally + Core.prototype.extension = extension; + + // included extensions + incExts.forEach(function (group) { + group.extensions.forEach(function (ext) { + setExtension(group.type, ext.name, ext.impl); + }); + }); + + // a dummy stylesheet object that doesn't need a reference to the core + // (useful for init) + var Stylesheet = function Stylesheet() { + if (!(this instanceof Stylesheet)) { + return new Stylesheet(); + } + this.length = 0; + }; + var sheetfn = Stylesheet.prototype; + sheetfn.instanceString = function () { + return 'stylesheet'; + }; + + // just store the selector to be parsed later + sheetfn.selector = function (selector) { + var i = this.length++; + this[i] = { + selector: selector, + properties: [] + }; + return this; // chaining + }; + + // just store the property to be parsed later + sheetfn.css = function (name, value) { + var i = this.length - 1; + if (string(name)) { + this[i].properties.push({ + name: name, + value: value + }); + } else if (plainObject(name)) { + var map = name; + var propNames = Object.keys(map); + for (var j = 0; j < propNames.length; j++) { + var key = propNames[j]; + var mapVal = map[key]; + if (mapVal == null) { + continue; + } + var prop = Style.properties[key] || Style.properties[dash2camel(key)]; + if (prop == null) { + continue; + } + var _name = prop.name; + var _value = mapVal; + this[i].properties.push({ + name: _name, + value: _value + }); + } + } + return this; // chaining + }; + + sheetfn.style = sheetfn.css; + + // generate a real style object from the dummy stylesheet + sheetfn.generateStyle = function (cy) { + var style = new Style(cy); + return this.appendToStyle(style); + }; + + // append a dummy stylesheet object on a real style object + sheetfn.appendToStyle = function (style) { + for (var i = 0; i < this.length; i++) { + var context = this[i]; + var selector = context.selector; + var props = context.properties; + style.selector(selector); // apply selector + + for (var j = 0; j < props.length; j++) { + var prop = props[j]; + style.css(prop.name, prop.value); // apply property + } + } + + return style; + }; + + var version = "3.28.1"; + + var cytoscape = function cytoscape(options) { + // if no options specified, use default + if (options === undefined) { + options = {}; + } + + // create instance + if (plainObject(options)) { + return new Core(options); + } + + // allow for registration of extensions + else if (string(options)) { + return extension.apply(extension, arguments); + } + }; + + // e.g. cytoscape.use( require('cytoscape-foo'), bar ) + cytoscape.use = function (ext) { + var args = Array.prototype.slice.call(arguments, 1); // args to pass to ext + + args.unshift(cytoscape); // cytoscape is first arg to ext + + ext.apply(null, args); + return this; + }; + cytoscape.warnings = function (bool) { + return warnings(bool); + }; + + // replaced by build system + cytoscape.version = version; + + // expose public apis (mostly for extensions) + cytoscape.stylesheet = cytoscape.Stylesheet = Stylesheet; + + return cytoscape; + +})); + + +/***/ }), + +/***/ 8744: +/***/ (function(module) { + +(function webpackUniversalModuleDefinition(root, factory) { + if(true) + module.exports = factory(); + else {} +})(this, function() { +return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __nested_webpack_require_543__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_543__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __nested_webpack_require_543__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __nested_webpack_require_543__.c = installedModules; +/******/ +/******/ // identity function for calling harmony imports with the correct context +/******/ __nested_webpack_require_543__.i = function(value) { return value; }; +/******/ +/******/ // define getter function for harmony exports +/******/ __nested_webpack_require_543__.d = function(exports, name, getter) { +/******/ if(!__nested_webpack_require_543__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { +/******/ configurable: false, +/******/ enumerable: true, +/******/ get: getter +/******/ }); +/******/ } +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __nested_webpack_require_543__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __nested_webpack_require_543__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __nested_webpack_require_543__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __nested_webpack_require_543__.p = ""; +/******/ +/******/ // Load entry module and return exports +/******/ return __nested_webpack_require_543__(__nested_webpack_require_543__.s = 26); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function LayoutConstants() {} + +/** + * Layout Quality: 0:draft, 1:default, 2:proof + */ +LayoutConstants.QUALITY = 1; + +/** + * Default parameters + */ +LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false; +LayoutConstants.DEFAULT_INCREMENTAL = false; +LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true; +LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false; +LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50; +LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false; + +// ----------------------------------------------------------------------------- +// Section: General other constants +// ----------------------------------------------------------------------------- +/* + * Margins of a graph to be applied on bouding rectangle of its contents. We + * assume margins on all four sides to be uniform. + */ +LayoutConstants.DEFAULT_GRAPH_MARGIN = 15; + +/* + * Whether to consider labels in node dimensions or not + */ +LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false; + +/* + * Default dimension of a non-compound node. + */ +LayoutConstants.SIMPLE_NODE_SIZE = 40; + +/* + * Default dimension of a non-compound node. + */ +LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2; + +/* + * Empty compound node size. When a compound node is empty, its both + * dimensions should be of this value. + */ +LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40; + +/* + * Minimum length that an edge should take during layout + */ +LayoutConstants.MIN_EDGE_LENGTH = 1; + +/* + * World boundaries that layout operates on + */ +LayoutConstants.WORLD_BOUNDARY = 1000000; + +/* + * World boundaries that random positioning can be performed with + */ +LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000; + +/* + * Coordinates of the world center + */ +LayoutConstants.WORLD_CENTER_X = 1200; +LayoutConstants.WORLD_CENTER_Y = 900; + +module.exports = LayoutConstants; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __nested_webpack_require_4947__) { + +"use strict"; + + +var LGraphObject = __nested_webpack_require_4947__(2); +var IGeometry = __nested_webpack_require_4947__(8); +var IMath = __nested_webpack_require_4947__(9); + +function LEdge(source, target, vEdge) { + LGraphObject.call(this, vEdge); + + this.isOverlapingSourceAndTarget = false; + this.vGraphObject = vEdge; + this.bendpoints = []; + this.source = source; + this.target = target; +} + +LEdge.prototype = Object.create(LGraphObject.prototype); + +for (var prop in LGraphObject) { + LEdge[prop] = LGraphObject[prop]; +} + +LEdge.prototype.getSource = function () { + return this.source; +}; + +LEdge.prototype.getTarget = function () { + return this.target; +}; + +LEdge.prototype.isInterGraph = function () { + return this.isInterGraph; +}; + +LEdge.prototype.getLength = function () { + return this.length; +}; + +LEdge.prototype.isOverlapingSourceAndTarget = function () { + return this.isOverlapingSourceAndTarget; +}; + +LEdge.prototype.getBendpoints = function () { + return this.bendpoints; +}; + +LEdge.prototype.getLca = function () { + return this.lca; +}; + +LEdge.prototype.getSourceInLca = function () { + return this.sourceInLca; +}; + +LEdge.prototype.getTargetInLca = function () { + return this.targetInLca; +}; + +LEdge.prototype.getOtherEnd = function (node) { + if (this.source === node) { + return this.target; + } else if (this.target === node) { + return this.source; + } else { + throw "Node is not incident with this edge"; + } +}; + +LEdge.prototype.getOtherEndInGraph = function (node, graph) { + var otherEnd = this.getOtherEnd(node); + var root = graph.getGraphManager().getRoot(); + + while (true) { + if (otherEnd.getOwner() == graph) { + return otherEnd; + } + + if (otherEnd.getOwner() == root) { + break; + } + + otherEnd = otherEnd.getOwner().getParent(); + } + + return null; +}; + +LEdge.prototype.updateLength = function () { + var clipPointCoordinates = new Array(4); + + this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates); + + if (!this.isOverlapingSourceAndTarget) { + this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2]; + this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3]; + + if (Math.abs(this.lengthX) < 1.0) { + this.lengthX = IMath.sign(this.lengthX); + } + + if (Math.abs(this.lengthY) < 1.0) { + this.lengthY = IMath.sign(this.lengthY); + } + + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); + } +}; + +LEdge.prototype.updateLengthSimple = function () { + this.lengthX = this.target.getCenterX() - this.source.getCenterX(); + this.lengthY = this.target.getCenterY() - this.source.getCenterY(); + + if (Math.abs(this.lengthX) < 1.0) { + this.lengthX = IMath.sign(this.lengthX); + } + + if (Math.abs(this.lengthY) < 1.0) { + this.lengthY = IMath.sign(this.lengthY); + } + + this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); +}; + +module.exports = LEdge; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function LGraphObject(vGraphObject) { + this.vGraphObject = vGraphObject; +} + +module.exports = LGraphObject; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __nested_webpack_require_8167__) { + +"use strict"; + + +var LGraphObject = __nested_webpack_require_8167__(2); +var Integer = __nested_webpack_require_8167__(10); +var RectangleD = __nested_webpack_require_8167__(13); +var LayoutConstants = __nested_webpack_require_8167__(0); +var RandomSeed = __nested_webpack_require_8167__(16); +var PointD = __nested_webpack_require_8167__(4); + +function LNode(gm, loc, size, vNode) { + //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode) + if (size == null && vNode == null) { + vNode = loc; + } + + LGraphObject.call(this, vNode); + + //Alternative constructor 2 : LNode(Layout layout, Object vNode) + if (gm.graphManager != null) gm = gm.graphManager; + + this.estimatedSize = Integer.MIN_VALUE; + this.inclusionTreeDepth = Integer.MAX_VALUE; + this.vGraphObject = vNode; + this.edges = []; + this.graphManager = gm; + + if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);else this.rect = new RectangleD(); +} + +LNode.prototype = Object.create(LGraphObject.prototype); +for (var prop in LGraphObject) { + LNode[prop] = LGraphObject[prop]; +} + +LNode.prototype.getEdges = function () { + return this.edges; +}; + +LNode.prototype.getChild = function () { + return this.child; +}; + +LNode.prototype.getOwner = function () { + // if (this.owner != null) { + // if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) { + // throw "assert failed"; + // } + // } + + return this.owner; +}; + +LNode.prototype.getWidth = function () { + return this.rect.width; +}; + +LNode.prototype.setWidth = function (width) { + this.rect.width = width; +}; + +LNode.prototype.getHeight = function () { + return this.rect.height; +}; + +LNode.prototype.setHeight = function (height) { + this.rect.height = height; +}; + +LNode.prototype.getCenterX = function () { + return this.rect.x + this.rect.width / 2; +}; + +LNode.prototype.getCenterY = function () { + return this.rect.y + this.rect.height / 2; +}; + +LNode.prototype.getCenter = function () { + return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2); +}; + +LNode.prototype.getLocation = function () { + return new PointD(this.rect.x, this.rect.y); +}; + +LNode.prototype.getRect = function () { + return this.rect; +}; + +LNode.prototype.getDiagonal = function () { + return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height); +}; + +/** + * This method returns half the diagonal length of this node. + */ +LNode.prototype.getHalfTheDiagonal = function () { + return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2; +}; + +LNode.prototype.setRect = function (upperLeft, dimension) { + this.rect.x = upperLeft.x; + this.rect.y = upperLeft.y; + this.rect.width = dimension.width; + this.rect.height = dimension.height; +}; + +LNode.prototype.setCenter = function (cx, cy) { + this.rect.x = cx - this.rect.width / 2; + this.rect.y = cy - this.rect.height / 2; +}; + +LNode.prototype.setLocation = function (x, y) { + this.rect.x = x; + this.rect.y = y; +}; + +LNode.prototype.moveBy = function (dx, dy) { + this.rect.x += dx; + this.rect.y += dy; +}; + +LNode.prototype.getEdgeListToNode = function (to) { + var edgeList = []; + var edge; + var self = this; + + self.edges.forEach(function (edge) { + + if (edge.target == to) { + if (edge.source != self) throw "Incorrect edge source!"; + + edgeList.push(edge); + } + }); + + return edgeList; +}; + +LNode.prototype.getEdgesBetween = function (other) { + var edgeList = []; + var edge; + + var self = this; + self.edges.forEach(function (edge) { + + if (!(edge.source == self || edge.target == self)) throw "Incorrect edge source and/or target"; + + if (edge.target == other || edge.source == other) { + edgeList.push(edge); + } + }); + + return edgeList; +}; + +LNode.prototype.getNeighborsList = function () { + var neighbors = new Set(); + + var self = this; + self.edges.forEach(function (edge) { + + if (edge.source == self) { + neighbors.add(edge.target); + } else { + if (edge.target != self) { + throw "Incorrect incidency!"; + } + + neighbors.add(edge.source); + } + }); + + return neighbors; +}; + +LNode.prototype.withChildren = function () { + var withNeighborsList = new Set(); + var childNode; + var children; + + withNeighborsList.add(this); + + if (this.child != null) { + var nodes = this.child.getNodes(); + for (var i = 0; i < nodes.length; i++) { + childNode = nodes[i]; + children = childNode.withChildren(); + children.forEach(function (node) { + withNeighborsList.add(node); + }); + } + } + + return withNeighborsList; +}; + +LNode.prototype.getNoOfChildren = function () { + var noOfChildren = 0; + var childNode; + + if (this.child == null) { + noOfChildren = 1; + } else { + var nodes = this.child.getNodes(); + for (var i = 0; i < nodes.length; i++) { + childNode = nodes[i]; + + noOfChildren += childNode.getNoOfChildren(); + } + } + + if (noOfChildren == 0) { + noOfChildren = 1; + } + return noOfChildren; +}; + +LNode.prototype.getEstimatedSize = function () { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; +}; + +LNode.prototype.calcEstimatedSize = function () { + if (this.child == null) { + return this.estimatedSize = (this.rect.width + this.rect.height) / 2; + } else { + this.estimatedSize = this.child.calcEstimatedSize(); + this.rect.width = this.estimatedSize; + this.rect.height = this.estimatedSize; + + return this.estimatedSize; + } +}; + +LNode.prototype.scatter = function () { + var randomCenterX; + var randomCenterY; + + var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX; + + var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY; + var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY; + randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY; + + this.rect.x = randomCenterX; + this.rect.y = randomCenterY; +}; + +LNode.prototype.updateBounds = function () { + if (this.getChild() == null) { + throw "assert failed"; + } + if (this.getChild().getNodes().length != 0) { + // wrap the children nodes by re-arranging the boundaries + var childGraph = this.getChild(); + childGraph.updateBounds(true); + + this.rect.x = childGraph.getLeft(); + this.rect.y = childGraph.getTop(); + + this.setWidth(childGraph.getRight() - childGraph.getLeft()); + this.setHeight(childGraph.getBottom() - childGraph.getTop()); + + // Update compound bounds considering its label properties + if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { + + var width = childGraph.getRight() - childGraph.getLeft(); + var height = childGraph.getBottom() - childGraph.getTop(); + + if (this.labelWidth > width) { + this.rect.x -= (this.labelWidth - width) / 2; + this.setWidth(this.labelWidth); + } + + if (this.labelHeight > height) { + if (this.labelPos == "center") { + this.rect.y -= (this.labelHeight - height) / 2; + } else if (this.labelPos == "top") { + this.rect.y -= this.labelHeight - height; + } + this.setHeight(this.labelHeight); + } + } + } +}; + +LNode.prototype.getInclusionTreeDepth = function () { + if (this.inclusionTreeDepth == Integer.MAX_VALUE) { + throw "assert failed"; + } + return this.inclusionTreeDepth; +}; + +LNode.prototype.transform = function (trans) { + var left = this.rect.x; + + if (left > LayoutConstants.WORLD_BOUNDARY) { + left = LayoutConstants.WORLD_BOUNDARY; + } else if (left < -LayoutConstants.WORLD_BOUNDARY) { + left = -LayoutConstants.WORLD_BOUNDARY; + } + + var top = this.rect.y; + + if (top > LayoutConstants.WORLD_BOUNDARY) { + top = LayoutConstants.WORLD_BOUNDARY; + } else if (top < -LayoutConstants.WORLD_BOUNDARY) { + top = -LayoutConstants.WORLD_BOUNDARY; + } + + var leftTop = new PointD(left, top); + var vLeftTop = trans.inverseTransformPoint(leftTop); + + this.setLocation(vLeftTop.x, vLeftTop.y); +}; + +LNode.prototype.getLeft = function () { + return this.rect.x; +}; + +LNode.prototype.getRight = function () { + return this.rect.x + this.rect.width; +}; + +LNode.prototype.getTop = function () { + return this.rect.y; +}; + +LNode.prototype.getBottom = function () { + return this.rect.y + this.rect.height; +}; + +LNode.prototype.getParent = function () { + if (this.owner == null) { + return null; + } + + return this.owner.getParent(); +}; + +module.exports = LNode; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function PointD(x, y) { + if (x == null && y == null) { + this.x = 0; + this.y = 0; + } else { + this.x = x; + this.y = y; + } +} + +PointD.prototype.getX = function () { + return this.x; +}; + +PointD.prototype.getY = function () { + return this.y; +}; + +PointD.prototype.setX = function (x) { + this.x = x; +}; + +PointD.prototype.setY = function (y) { + this.y = y; +}; + +PointD.prototype.getDifference = function (pt) { + return new DimensionD(this.x - pt.x, this.y - pt.y); +}; + +PointD.prototype.getCopy = function () { + return new PointD(this.x, this.y); +}; + +PointD.prototype.translate = function (dim) { + this.x += dim.width; + this.y += dim.height; + return this; +}; + +module.exports = PointD; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __nested_webpack_require_17549__) { + +"use strict"; + + +var LGraphObject = __nested_webpack_require_17549__(2); +var Integer = __nested_webpack_require_17549__(10); +var LayoutConstants = __nested_webpack_require_17549__(0); +var LGraphManager = __nested_webpack_require_17549__(6); +var LNode = __nested_webpack_require_17549__(3); +var LEdge = __nested_webpack_require_17549__(1); +var RectangleD = __nested_webpack_require_17549__(13); +var Point = __nested_webpack_require_17549__(12); +var LinkedList = __nested_webpack_require_17549__(11); + +function LGraph(parent, obj2, vGraph) { + LGraphObject.call(this, vGraph); + this.estimatedSize = Integer.MIN_VALUE; + this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN; + this.edges = []; + this.nodes = []; + this.isConnected = false; + this.parent = parent; + + if (obj2 != null && obj2 instanceof LGraphManager) { + this.graphManager = obj2; + } else if (obj2 != null && obj2 instanceof Layout) { + this.graphManager = obj2.graphManager; + } +} + +LGraph.prototype = Object.create(LGraphObject.prototype); +for (var prop in LGraphObject) { + LGraph[prop] = LGraphObject[prop]; +} + +LGraph.prototype.getNodes = function () { + return this.nodes; +}; + +LGraph.prototype.getEdges = function () { + return this.edges; +}; + +LGraph.prototype.getGraphManager = function () { + return this.graphManager; +}; + +LGraph.prototype.getParent = function () { + return this.parent; +}; + +LGraph.prototype.getLeft = function () { + return this.left; +}; + +LGraph.prototype.getRight = function () { + return this.right; +}; + +LGraph.prototype.getTop = function () { + return this.top; +}; + +LGraph.prototype.getBottom = function () { + return this.bottom; +}; + +LGraph.prototype.isConnected = function () { + return this.isConnected; +}; + +LGraph.prototype.add = function (obj1, sourceNode, targetNode) { + if (sourceNode == null && targetNode == null) { + var newNode = obj1; + if (this.graphManager == null) { + throw "Graph has no graph mgr!"; + } + if (this.getNodes().indexOf(newNode) > -1) { + throw "Node already in graph!"; + } + newNode.owner = this; + this.getNodes().push(newNode); + + return newNode; + } else { + var newEdge = obj1; + if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) { + throw "Source or target not in graph!"; + } + + if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) { + throw "Both owners must be this graph!"; + } + + if (sourceNode.owner != targetNode.owner) { + return null; + } + + // set source and target + newEdge.source = sourceNode; + newEdge.target = targetNode; + + // set as intra-graph edge + newEdge.isInterGraph = false; + + // add to graph edge list + this.getEdges().push(newEdge); + + // add to incidency lists + sourceNode.edges.push(newEdge); + + if (targetNode != sourceNode) { + targetNode.edges.push(newEdge); + } + + return newEdge; + } +}; + +LGraph.prototype.remove = function (obj) { + var node = obj; + if (obj instanceof LNode) { + if (node == null) { + throw "Node is null!"; + } + if (!(node.owner != null && node.owner == this)) { + throw "Owner graph is invalid!"; + } + if (this.graphManager == null) { + throw "Owner graph manager is invalid!"; + } + // remove incident edges first (make a copy to do it safely) + var edgesToBeRemoved = node.edges.slice(); + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) { + edge = edgesToBeRemoved[i]; + + if (edge.isInterGraph) { + this.graphManager.remove(edge); + } else { + edge.source.owner.remove(edge); + } + } + + // now the node itself + var index = this.nodes.indexOf(node); + if (index == -1) { + throw "Node not in owner node list!"; + } + + this.nodes.splice(index, 1); + } else if (obj instanceof LEdge) { + var edge = obj; + if (edge == null) { + throw "Edge is null!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) { + throw "Source and/or target owner is invalid!"; + } + + var sourceIndex = edge.source.edges.indexOf(edge); + var targetIndex = edge.target.edges.indexOf(edge); + if (!(sourceIndex > -1 && targetIndex > -1)) { + throw "Source and/or target doesn't know this edge!"; + } + + edge.source.edges.splice(sourceIndex, 1); + + if (edge.target != edge.source) { + edge.target.edges.splice(targetIndex, 1); + } + + var index = edge.source.owner.getEdges().indexOf(edge); + if (index == -1) { + throw "Not in owner's edge list!"; + } + + edge.source.owner.getEdges().splice(index, 1); + } +}; + +LGraph.prototype.updateLeftTop = function () { + var top = Integer.MAX_VALUE; + var left = Integer.MAX_VALUE; + var nodeTop; + var nodeLeft; + var margin; + + var nodes = this.getNodes(); + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + nodeTop = lNode.getTop(); + nodeLeft = lNode.getLeft(); + + if (top > nodeTop) { + top = nodeTop; + } + + if (left > nodeLeft) { + left = nodeLeft; + } + } + + // Do we have any nodes in this graph? + if (top == Integer.MAX_VALUE) { + return null; + } + + if (nodes[0].getParent().paddingLeft != undefined) { + margin = nodes[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + + this.left = left - margin; + this.top = top - margin; + + // Apply the margins and return the result + return new Point(this.left, this.top); +}; + +LGraph.prototype.updateBounds = function (recursive) { + // calculate bounds + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + var margin; + + var nodes = this.nodes; + var s = nodes.length; + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + + if (recursive && lNode.child != null) { + lNode.updateBounds(); + } + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + + if (left > nodeLeft) { + left = nodeLeft; + } + + if (right < nodeRight) { + right = nodeRight; + } + + if (top > nodeTop) { + top = nodeTop; + } + + if (bottom < nodeBottom) { + bottom = nodeBottom; + } + } + + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + if (left == Integer.MAX_VALUE) { + this.left = this.parent.getLeft(); + this.right = this.parent.getRight(); + this.top = this.parent.getTop(); + this.bottom = this.parent.getBottom(); + } + + if (nodes[0].getParent().paddingLeft != undefined) { + margin = nodes[0].getParent().paddingLeft; + } else { + margin = this.margin; + } + + this.left = boundingRect.x - margin; + this.right = boundingRect.x + boundingRect.width + margin; + this.top = boundingRect.y - margin; + this.bottom = boundingRect.y + boundingRect.height + margin; +}; + +LGraph.calculateBounds = function (nodes) { + var left = Integer.MAX_VALUE; + var right = -Integer.MAX_VALUE; + var top = Integer.MAX_VALUE; + var bottom = -Integer.MAX_VALUE; + var nodeLeft; + var nodeRight; + var nodeTop; + var nodeBottom; + + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + nodeLeft = lNode.getLeft(); + nodeRight = lNode.getRight(); + nodeTop = lNode.getTop(); + nodeBottom = lNode.getBottom(); + + if (left > nodeLeft) { + left = nodeLeft; + } + + if (right < nodeRight) { + right = nodeRight; + } + + if (top > nodeTop) { + top = nodeTop; + } + + if (bottom < nodeBottom) { + bottom = nodeBottom; + } + } + + var boundingRect = new RectangleD(left, top, right - left, bottom - top); + + return boundingRect; +}; + +LGraph.prototype.getInclusionTreeDepth = function () { + if (this == this.graphManager.getRoot()) { + return 1; + } else { + return this.parent.getInclusionTreeDepth(); + } +}; + +LGraph.prototype.getEstimatedSize = function () { + if (this.estimatedSize == Integer.MIN_VALUE) { + throw "assert failed"; + } + return this.estimatedSize; +}; + +LGraph.prototype.calcEstimatedSize = function () { + var size = 0; + var nodes = this.nodes; + var s = nodes.length; + + for (var i = 0; i < s; i++) { + var lNode = nodes[i]; + size += lNode.calcEstimatedSize(); + } + + if (size == 0) { + this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE; + } else { + this.estimatedSize = size / Math.sqrt(this.nodes.length); + } + + return this.estimatedSize; +}; + +LGraph.prototype.updateConnected = function () { + var self = this; + if (this.nodes.length == 0) { + this.isConnected = true; + return; + } + + var queue = new LinkedList(); + var visited = new Set(); + var currentNode = this.nodes[0]; + var neighborEdges; + var currentNeighbor; + var childrenOfNode = currentNode.withChildren(); + childrenOfNode.forEach(function (node) { + queue.push(node); + visited.add(node); + }); + + while (queue.length !== 0) { + currentNode = queue.shift(); + + // Traverse all neighbors of this node + neighborEdges = currentNode.getEdges(); + var size = neighborEdges.length; + for (var i = 0; i < size; i++) { + var neighborEdge = neighborEdges[i]; + currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this); + + // Add unvisited neighbors to the list to visit + if (currentNeighbor != null && !visited.has(currentNeighbor)) { + var childrenOfNeighbor = currentNeighbor.withChildren(); + + childrenOfNeighbor.forEach(function (node) { + queue.push(node); + visited.add(node); + }); + } + } + } + + this.isConnected = false; + + if (visited.size >= this.nodes.length) { + var noOfVisitedInThisGraph = 0; + + visited.forEach(function (visitedNode) { + if (visitedNode.owner == self) { + noOfVisitedInThisGraph++; + } + }); + + if (noOfVisitedInThisGraph == this.nodes.length) { + this.isConnected = true; + } + } +}; + +module.exports = LGraph; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __nested_webpack_require_27617__) { + +"use strict"; + + +var LGraph; +var LEdge = __nested_webpack_require_27617__(1); + +function LGraphManager(layout) { + LGraph = __nested_webpack_require_27617__(5); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now. + this.layout = layout; + + this.graphs = []; + this.edges = []; +} + +LGraphManager.prototype.addRoot = function () { + var ngraph = this.layout.newGraph(); + var nnode = this.layout.newNode(null); + var root = this.add(ngraph, nnode); + this.setRootGraph(root); + return this.rootGraph; +}; + +LGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) { + //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge + if (newEdge == null && sourceNode == null && targetNode == null) { + if (newGraph == null) { + throw "Graph is null!"; + } + if (parentNode == null) { + throw "Parent node is null!"; + } + if (this.graphs.indexOf(newGraph) > -1) { + throw "Graph already in this graph mgr!"; + } + + this.graphs.push(newGraph); + + if (newGraph.parent != null) { + throw "Already has a parent!"; + } + if (parentNode.child != null) { + throw "Already has a child!"; + } + + newGraph.parent = parentNode; + parentNode.child = newGraph; + + return newGraph; + } else { + //change the order of the parameters + targetNode = newEdge; + sourceNode = parentNode; + newEdge = newGraph; + var sourceGraph = sourceNode.getOwner(); + var targetGraph = targetNode.getOwner(); + + if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) { + throw "Source not in this graph mgr!"; + } + if (!(targetGraph != null && targetGraph.getGraphManager() == this)) { + throw "Target not in this graph mgr!"; + } + + if (sourceGraph == targetGraph) { + newEdge.isInterGraph = false; + return sourceGraph.add(newEdge, sourceNode, targetNode); + } else { + newEdge.isInterGraph = true; + + // set source and target + newEdge.source = sourceNode; + newEdge.target = targetNode; + + // add edge to inter-graph edge list + if (this.edges.indexOf(newEdge) > -1) { + throw "Edge already in inter-graph edge list!"; + } + + this.edges.push(newEdge); + + // add edge to source and target incidency lists + if (!(newEdge.source != null && newEdge.target != null)) { + throw "Edge source and/or target is null!"; + } + + if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) { + throw "Edge already in source and/or target incidency list!"; + } + + newEdge.source.edges.push(newEdge); + newEdge.target.edges.push(newEdge); + + return newEdge; + } + } +}; + +LGraphManager.prototype.remove = function (lObj) { + if (lObj instanceof LGraph) { + var graph = lObj; + if (graph.getGraphManager() != this) { + throw "Graph not in this graph mgr"; + } + if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) { + throw "Invalid parent node!"; + } + + // first the edges (make a copy to do it safely) + var edgesToBeRemoved = []; + + edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges()); + + var edge; + var s = edgesToBeRemoved.length; + for (var i = 0; i < s; i++) { + edge = edgesToBeRemoved[i]; + graph.remove(edge); + } + + // then the nodes (make a copy to do it safely) + var nodesToBeRemoved = []; + + nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes()); + + var node; + s = nodesToBeRemoved.length; + for (var i = 0; i < s; i++) { + node = nodesToBeRemoved[i]; + graph.remove(node); + } + + // check if graph is the root + if (graph == this.rootGraph) { + this.setRootGraph(null); + } + + // now remove the graph itself + var index = this.graphs.indexOf(graph); + this.graphs.splice(index, 1); + + // also reset the parent of the graph + graph.parent = null; + } else if (lObj instanceof LEdge) { + edge = lObj; + if (edge == null) { + throw "Edge is null!"; + } + if (!edge.isInterGraph) { + throw "Not an inter-graph edge!"; + } + if (!(edge.source != null && edge.target != null)) { + throw "Source and/or target is null!"; + } + + // remove edge from source and target nodes' incidency lists + + if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) { + throw "Source and/or target doesn't know this edge!"; + } + + var index = edge.source.edges.indexOf(edge); + edge.source.edges.splice(index, 1); + index = edge.target.edges.indexOf(edge); + edge.target.edges.splice(index, 1); + + // remove edge from owner graph manager's inter-graph edge list + + if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) { + throw "Edge owner graph or owner graph manager is null!"; + } + if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) { + throw "Not in owner graph manager's edge list!"; + } + + var index = edge.source.owner.getGraphManager().edges.indexOf(edge); + edge.source.owner.getGraphManager().edges.splice(index, 1); + } +}; + +LGraphManager.prototype.updateBounds = function () { + this.rootGraph.updateBounds(true); +}; + +LGraphManager.prototype.getGraphs = function () { + return this.graphs; +}; + +LGraphManager.prototype.getAllNodes = function () { + if (this.allNodes == null) { + var nodeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i = 0; i < s; i++) { + nodeList = nodeList.concat(graphs[i].getNodes()); + } + this.allNodes = nodeList; + } + return this.allNodes; +}; + +LGraphManager.prototype.resetAllNodes = function () { + this.allNodes = null; +}; + +LGraphManager.prototype.resetAllEdges = function () { + this.allEdges = null; +}; + +LGraphManager.prototype.resetAllNodesToApplyGravitation = function () { + this.allNodesToApplyGravitation = null; +}; + +LGraphManager.prototype.getAllEdges = function () { + if (this.allEdges == null) { + var edgeList = []; + var graphs = this.getGraphs(); + var s = graphs.length; + for (var i = 0; i < graphs.length; i++) { + edgeList = edgeList.concat(graphs[i].getEdges()); + } + + edgeList = edgeList.concat(this.edges); + + this.allEdges = edgeList; + } + return this.allEdges; +}; + +LGraphManager.prototype.getAllNodesToApplyGravitation = function () { + return this.allNodesToApplyGravitation; +}; + +LGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) { + if (this.allNodesToApplyGravitation != null) { + throw "assert failed"; + } + + this.allNodesToApplyGravitation = nodeList; +}; + +LGraphManager.prototype.getRoot = function () { + return this.rootGraph; +}; + +LGraphManager.prototype.setRootGraph = function (graph) { + if (graph.getGraphManager() != this) { + throw "Root not in this graph mgr!"; + } + + this.rootGraph = graph; + // root graph must have a root node associated with it for convenience + if (graph.parent == null) { + graph.parent = this.layout.newNode("Root node"); + } +}; + +LGraphManager.prototype.getLayout = function () { + return this.layout; +}; + +LGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) { + if (!(firstNode != null && secondNode != null)) { + throw "assert failed"; + } + + if (firstNode == secondNode) { + return true; + } + // Is second node an ancestor of the first one? + var ownerGraph = firstNode.getOwner(); + var parentNode; + + do { + parentNode = ownerGraph.getParent(); + + if (parentNode == null) { + break; + } + + if (parentNode == secondNode) { + return true; + } + + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + // Is first node an ancestor of the second one? + ownerGraph = secondNode.getOwner(); + + do { + parentNode = ownerGraph.getParent(); + + if (parentNode == null) { + break; + } + + if (parentNode == firstNode) { + return true; + } + + ownerGraph = parentNode.getOwner(); + if (ownerGraph == null) { + break; + } + } while (true); + + return false; +}; + +LGraphManager.prototype.calcLowestCommonAncestors = function () { + var edge; + var sourceNode; + var targetNode; + var sourceAncestorGraph; + var targetAncestorGraph; + + var edges = this.getAllEdges(); + var s = edges.length; + for (var i = 0; i < s; i++) { + edge = edges[i]; + + sourceNode = edge.source; + targetNode = edge.target; + edge.lca = null; + edge.sourceInLca = sourceNode; + edge.targetInLca = targetNode; + + if (sourceNode == targetNode) { + edge.lca = sourceNode.getOwner(); + continue; + } + + sourceAncestorGraph = sourceNode.getOwner(); + + while (edge.lca == null) { + edge.targetInLca = targetNode; + targetAncestorGraph = targetNode.getOwner(); + + while (edge.lca == null) { + if (targetAncestorGraph == sourceAncestorGraph) { + edge.lca = targetAncestorGraph; + break; + } + + if (targetAncestorGraph == this.rootGraph) { + break; + } + + if (edge.lca != null) { + throw "assert failed"; + } + edge.targetInLca = targetAncestorGraph.getParent(); + targetAncestorGraph = edge.targetInLca.getOwner(); + } + + if (sourceAncestorGraph == this.rootGraph) { + break; + } + + if (edge.lca == null) { + edge.sourceInLca = sourceAncestorGraph.getParent(); + sourceAncestorGraph = edge.sourceInLca.getOwner(); + } + } + + if (edge.lca == null) { + throw "assert failed"; + } + } +}; + +LGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) { + if (firstNode == secondNode) { + return firstNode.getOwner(); + } + var firstOwnerGraph = firstNode.getOwner(); + + do { + if (firstOwnerGraph == null) { + break; + } + var secondOwnerGraph = secondNode.getOwner(); + + do { + if (secondOwnerGraph == null) { + break; + } + + if (secondOwnerGraph == firstOwnerGraph) { + return secondOwnerGraph; + } + secondOwnerGraph = secondOwnerGraph.getParent().getOwner(); + } while (true); + + firstOwnerGraph = firstOwnerGraph.getParent().getOwner(); + } while (true); + + return firstOwnerGraph; +}; + +LGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) { + if (graph == null && depth == null) { + graph = this.rootGraph; + depth = 1; + } + var node; + + var nodes = graph.getNodes(); + var s = nodes.length; + for (var i = 0; i < s; i++) { + node = nodes[i]; + node.inclusionTreeDepth = depth; + + if (node.child != null) { + this.calcInclusionTreeDepths(node.child, depth + 1); + } + } +}; + +LGraphManager.prototype.includesInvalidEdge = function () { + var edge; + + var s = this.edges.length; + for (var i = 0; i < s; i++) { + edge = this.edges[i]; + + if (this.isOneAncestorOfOther(edge.source, edge.target)) { + return true; + } + } + return false; +}; + +module.exports = LGraphManager; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __nested_webpack_require_38707__) { + +"use strict"; + + +var LayoutConstants = __nested_webpack_require_38707__(0); + +function FDLayoutConstants() {} + +//FDLayoutConstants inherits static props in LayoutConstants +for (var prop in LayoutConstants) { + FDLayoutConstants[prop] = LayoutConstants[prop]; +} + +FDLayoutConstants.MAX_ITERATIONS = 2500; + +FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; +FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45; +FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0; +FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4; +FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0; +FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8; +FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5; +FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true; +FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true; +FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3; +FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33; +FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000; +FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000; +FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0; +FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3; +FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0; +FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100; +FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1; +FDLayoutConstants.MIN_EDGE_LENGTH = 1; +FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10; + +module.exports = FDLayoutConstants; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __nested_webpack_require_40298__) { + +"use strict"; + + +/** + * This class maintains a list of static geometry related utility methods. + * + * + * Copyright: i-Vis Research Group, Bilkent University, 2007 - present + */ + +var Point = __nested_webpack_require_40298__(12); + +function IGeometry() {} + +/** + * This method calculates *half* the amount in x and y directions of the two + * input rectangles needed to separate them keeping their respective + * positioning, and returns the result in the input array. An input + * separation buffer added to the amount in both directions. We assume that + * the two rectangles do intersect. + */ +IGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) { + if (!rectA.intersects(rectB)) { + throw "assert failed"; + } + + var directions = new Array(2); + + this.decideDirectionsForOverlappingNodes(rectA, rectB, directions); + + overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x); + overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y); + + // update the overlapping amounts for the following cases: + if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) { + /* Case x.1: + * + * rectA + * | | + * | _________ | + * | | | | + * |________|_______|______| + * | | + * | | + * rectB + */ + overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight()); + } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) { + /* Case x.2: + * + * rectB + * | | + * | _________ | + * | | | | + * |________|_______|______| + * | | + * | | + * rectA + */ + overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight()); + } + if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) { + /* Case y.1: + * ________ rectA + * | + * | + * ______|____ rectB + * | | + * | | + * ______|____| + * | + * | + * |________ + * + */ + overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom()); + } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) { + /* Case y.2: + * ________ rectB + * | + * | + * ______|____ rectA + * | | + * | | + * ______|____| + * | + * | + * |________ + * + */ + overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom()); + } + + // find slope of the line passes two centers + var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX())); + // if centers are overlapped + if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) { + // assume the slope is 1 (45 degree) + slope = 1.0; + } + + var moveByY = slope * overlapAmount[0]; + var moveByX = overlapAmount[1] / slope; + if (overlapAmount[0] < moveByX) { + moveByX = overlapAmount[0]; + } else { + moveByY = overlapAmount[1]; + } + // return half the amount so that if each rectangle is moved by these + // amounts in opposite directions, overlap will be resolved + overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer); + overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer); +}; + +/** + * This method decides the separation direction of overlapping nodes + * + * if directions[0] = -1, then rectA goes left + * if directions[0] = 1, then rectA goes right + * if directions[1] = -1, then rectA goes up + * if directions[1] = 1, then rectA goes down + */ +IGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) { + if (rectA.getCenterX() < rectB.getCenterX()) { + directions[0] = -1; + } else { + directions[0] = 1; + } + + if (rectA.getCenterY() < rectB.getCenterY()) { + directions[1] = -1; + } else { + directions[1] = 1; + } +}; + +/** + * This method calculates the intersection (clipping) points of the two + * input rectangles with line segment defined by the centers of these two + * rectangles. The clipping points are saved in the input double array and + * whether or not the two rectangles overlap is returned. + */ +IGeometry.getIntersection2 = function (rectA, rectB, result) { + //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB + var p1x = rectA.getCenterX(); + var p1y = rectA.getCenterY(); + var p2x = rectB.getCenterX(); + var p2y = rectB.getCenterY(); + + //if two rectangles intersect, then clipping points are centers + if (rectA.intersects(rectB)) { + result[0] = p1x; + result[1] = p1y; + result[2] = p2x; + result[3] = p2y; + return true; + } + //variables for rectA + var topLeftAx = rectA.getX(); + var topLeftAy = rectA.getY(); + var topRightAx = rectA.getRight(); + var bottomLeftAx = rectA.getX(); + var bottomLeftAy = rectA.getBottom(); + var bottomRightAx = rectA.getRight(); + var halfWidthA = rectA.getWidthHalf(); + var halfHeightA = rectA.getHeightHalf(); + //variables for rectB + var topLeftBx = rectB.getX(); + var topLeftBy = rectB.getY(); + var topRightBx = rectB.getRight(); + var bottomLeftBx = rectB.getX(); + var bottomLeftBy = rectB.getBottom(); + var bottomRightBx = rectB.getRight(); + var halfWidthB = rectB.getWidthHalf(); + var halfHeightB = rectB.getHeightHalf(); + + //flag whether clipping points are found + var clipPointAFound = false; + var clipPointBFound = false; + + // line is vertical + if (p1x === p2x) { + if (p1y > p2y) { + result[0] = p1x; + result[1] = topLeftAy; + result[2] = p2x; + result[3] = bottomLeftBy; + return false; + } else if (p1y < p2y) { + result[0] = p1x; + result[1] = bottomLeftAy; + result[2] = p2x; + result[3] = topLeftBy; + return false; + } else { + //not line, return null; + } + } + // line is horizontal + else if (p1y === p2y) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = p1y; + result[2] = topRightBx; + result[3] = p2y; + return false; + } else if (p1x < p2x) { + result[0] = topRightAx; + result[1] = p1y; + result[2] = topLeftBx; + result[3] = p2y; + return false; + } else { + //not valid line, return null; + } + } else { + //slopes of rectA's and rectB's diagonals + var slopeA = rectA.height / rectA.width; + var slopeB = rectB.height / rectB.width; + + //slope of line between center of rectA and center of rectB + var slopePrime = (p2y - p1y) / (p2x - p1x); + var cardinalDirectionA = void 0; + var cardinalDirectionB = void 0; + var tempPointAx = void 0; + var tempPointAy = void 0; + var tempPointBx = void 0; + var tempPointBy = void 0; + + //determine whether clipping point is the corner of nodeA + if (-slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = bottomLeftAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } else { + result[0] = topRightAx; + result[1] = topLeftAy; + clipPointAFound = true; + } + } else if (slopeA === slopePrime) { + if (p1x > p2x) { + result[0] = topLeftAx; + result[1] = topLeftAy; + clipPointAFound = true; + } else { + result[0] = bottomRightAx; + result[1] = bottomLeftAy; + clipPointAFound = true; + } + } + + //determine whether clipping point is the corner of nodeB + if (-slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = bottomLeftBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } else { + result[2] = topRightBx; + result[3] = topLeftBy; + clipPointBFound = true; + } + } else if (slopeB === slopePrime) { + if (p2x > p1x) { + result[2] = topLeftBx; + result[3] = topLeftBy; + clipPointBFound = true; + } else { + result[2] = bottomRightBx; + result[3] = bottomLeftBy; + clipPointBFound = true; + } + } + + //if both clipping points are corners + if (clipPointAFound && clipPointBFound) { + return false; + } + + //determine Cardinal Direction of rectangles + if (p1x > p2x) { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2); + } else { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1); + } + } else { + if (p1y > p2y) { + cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1); + cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3); + } else { + cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2); + cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4); + } + } + //calculate clipping Point if it is not found before + if (!clipPointAFound) { + switch (cardinalDirectionA) { + case 1: + tempPointAy = topLeftAy; + tempPointAx = p1x + -halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 2: + tempPointAx = bottomRightAx; + tempPointAy = p1y + halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 3: + tempPointAy = bottomLeftAy; + tempPointAx = p1x + halfHeightA / slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + case 4: + tempPointAx = bottomLeftAx; + tempPointAy = p1y + -halfWidthA * slopePrime; + result[0] = tempPointAx; + result[1] = tempPointAy; + break; + } + } + if (!clipPointBFound) { + switch (cardinalDirectionB) { + case 1: + tempPointBy = topLeftBy; + tempPointBx = p2x + -halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 2: + tempPointBx = bottomRightBx; + tempPointBy = p2y + halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 3: + tempPointBy = bottomLeftBy; + tempPointBx = p2x + halfHeightB / slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + case 4: + tempPointBx = bottomLeftBx; + tempPointBy = p2y + -halfWidthB * slopePrime; + result[2] = tempPointBx; + result[3] = tempPointBy; + break; + } + } + } + return false; +}; + +/** + * This method returns in which cardinal direction does input point stays + * 1: North + * 2: East + * 3: South + * 4: West + */ +IGeometry.getCardinalDirection = function (slope, slopePrime, line) { + if (slope > slopePrime) { + return line; + } else { + return 1 + line % 4; + } +}; + +/** + * This method calculates the intersection of the two lines defined by + * point pairs (s1,s2) and (f1,f2). + */ +IGeometry.getIntersection = function (s1, s2, f1, f2) { + if (f2 == null) { + return this.getIntersection2(s1, s2, f1); + } + + var x1 = s1.x; + var y1 = s1.y; + var x2 = s2.x; + var y2 = s2.y; + var x3 = f1.x; + var y3 = f1.y; + var x4 = f2.x; + var y4 = f2.y; + var x = void 0, + y = void 0; // intersection point + var a1 = void 0, + a2 = void 0, + b1 = void 0, + b2 = void 0, + c1 = void 0, + c2 = void 0; // coefficients of line eqns. + var denom = void 0; + + a1 = y2 - y1; + b1 = x1 - x2; + c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 } + + a2 = y4 - y3; + b2 = x3 - x4; + c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 } + + denom = a1 * b2 - a2 * b1; + + if (denom === 0) { + return null; + } + + x = (b1 * c2 - b2 * c1) / denom; + y = (a2 * c1 - a1 * c2) / denom; + + return new Point(x, y); +}; + +/** + * This method finds and returns the angle of the vector from the + x-axis + * in clockwise direction (compatible w/ Java coordinate system!). + */ +IGeometry.angleOfVector = function (Cx, Cy, Nx, Ny) { + var C_angle = void 0; + + if (Cx !== Nx) { + C_angle = Math.atan((Ny - Cy) / (Nx - Cx)); + + if (Nx < Cx) { + C_angle += Math.PI; + } else if (Ny < Cy) { + C_angle += this.TWO_PI; + } + } else if (Ny < Cy) { + C_angle = this.ONE_AND_HALF_PI; // 270 degrees + } else { + C_angle = this.HALF_PI; // 90 degrees + } + + return C_angle; +}; + +/** + * This method checks whether the given two line segments (one with point + * p1 and p2, the other with point p3 and p4) intersect at a point other + * than these points. + */ +IGeometry.doIntersect = function (p1, p2, p3, p4) { + var a = p1.x; + var b = p1.y; + var c = p2.x; + var d = p2.y; + var p = p3.x; + var q = p3.y; + var r = p4.x; + var s = p4.y; + var det = (c - a) * (s - q) - (r - p) * (d - b); + + if (det === 0) { + return false; + } else { + var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det; + var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det; + return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1; + } +}; + +// ----------------------------------------------------------------------------- +// Section: Class Constants +// ----------------------------------------------------------------------------- +/** + * Some useful pre-calculated constants + */ +IGeometry.HALF_PI = 0.5 * Math.PI; +IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI; +IGeometry.TWO_PI = 2.0 * Math.PI; +IGeometry.THREE_PI = 3.0 * Math.PI; + +module.exports = IGeometry; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function IMath() {} + +/** + * This method returns the sign of the input value. + */ +IMath.sign = function (value) { + if (value > 0) { + return 1; + } else if (value < 0) { + return -1; + } else { + return 0; + } +}; + +IMath.floor = function (value) { + return value < 0 ? Math.ceil(value) : Math.floor(value); +}; + +IMath.ceil = function (value) { + return value < 0 ? Math.floor(value) : Math.ceil(value); +}; + +module.exports = IMath; + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function Integer() {} + +Integer.MAX_VALUE = 2147483647; +Integer.MIN_VALUE = -2147483648; + +module.exports = Integer; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var nodeFrom = function nodeFrom(value) { + return { value: value, next: null, prev: null }; +}; + +var add = function add(prev, node, next, list) { + if (prev !== null) { + prev.next = node; + } else { + list.head = node; + } + + if (next !== null) { + next.prev = node; + } else { + list.tail = node; + } + + node.prev = prev; + node.next = next; + + list.length++; + + return node; +}; + +var _remove = function _remove(node, list) { + var prev = node.prev, + next = node.next; + + + if (prev !== null) { + prev.next = next; + } else { + list.head = next; + } + + if (next !== null) { + next.prev = prev; + } else { + list.tail = prev; + } + + node.prev = node.next = null; + + list.length--; + + return node; +}; + +var LinkedList = function () { + function LinkedList(vals) { + var _this = this; + + _classCallCheck(this, LinkedList); + + this.length = 0; + this.head = null; + this.tail = null; + + if (vals != null) { + vals.forEach(function (v) { + return _this.push(v); + }); + } + } + + _createClass(LinkedList, [{ + key: "size", + value: function size() { + return this.length; + } + }, { + key: "insertBefore", + value: function insertBefore(val, otherNode) { + return add(otherNode.prev, nodeFrom(val), otherNode, this); + } + }, { + key: "insertAfter", + value: function insertAfter(val, otherNode) { + return add(otherNode, nodeFrom(val), otherNode.next, this); + } + }, { + key: "insertNodeBefore", + value: function insertNodeBefore(newNode, otherNode) { + return add(otherNode.prev, newNode, otherNode, this); + } + }, { + key: "insertNodeAfter", + value: function insertNodeAfter(newNode, otherNode) { + return add(otherNode, newNode, otherNode.next, this); + } + }, { + key: "push", + value: function push(val) { + return add(this.tail, nodeFrom(val), null, this); + } + }, { + key: "unshift", + value: function unshift(val) { + return add(null, nodeFrom(val), this.head, this); + } + }, { + key: "remove", + value: function remove(node) { + return _remove(node, this); + } + }, { + key: "pop", + value: function pop() { + return _remove(this.tail, this).value; + } + }, { + key: "popNode", + value: function popNode() { + return _remove(this.tail, this); + } + }, { + key: "shift", + value: function shift() { + return _remove(this.head, this).value; + } + }, { + key: "shiftNode", + value: function shiftNode() { + return _remove(this.head, this); + } + }, { + key: "get_object_at", + value: function get_object_at(index) { + if (index <= this.length()) { + var i = 1; + var current = this.head; + while (i < index) { + current = current.next; + i++; + } + return current.value; + } + } + }, { + key: "set_object_at", + value: function set_object_at(index, value) { + if (index <= this.length()) { + var i = 1; + var current = this.head; + while (i < index) { + current = current.next; + i++; + } + current.value = value; + } + } + }]); + + return LinkedList; +}(); + +module.exports = LinkedList; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +/* + *This class is the javascript implementation of the Point.java class in jdk + */ +function Point(x, y, p) { + this.x = null; + this.y = null; + if (x == null && y == null && p == null) { + this.x = 0; + this.y = 0; + } else if (typeof x == 'number' && typeof y == 'number' && p == null) { + this.x = x; + this.y = y; + } else if (x.constructor.name == 'Point' && y == null && p == null) { + p = x; + this.x = p.x; + this.y = p.y; + } +} + +Point.prototype.getX = function () { + return this.x; +}; + +Point.prototype.getY = function () { + return this.y; +}; + +Point.prototype.getLocation = function () { + return new Point(this.x, this.y); +}; + +Point.prototype.setLocation = function (x, y, p) { + if (x.constructor.name == 'Point' && y == null && p == null) { + p = x; + this.setLocation(p.x, p.y); + } else if (typeof x == 'number' && typeof y == 'number' && p == null) { + //if both parameters are integer just move (x,y) location + if (parseInt(x) == x && parseInt(y) == y) { + this.move(x, y); + } else { + this.x = Math.floor(x + 0.5); + this.y = Math.floor(y + 0.5); + } + } +}; + +Point.prototype.move = function (x, y) { + this.x = x; + this.y = y; +}; + +Point.prototype.translate = function (dx, dy) { + this.x += dx; + this.y += dy; +}; + +Point.prototype.equals = function (obj) { + if (obj.constructor.name == "Point") { + var pt = obj; + return this.x == pt.x && this.y == pt.y; + } + return this == obj; +}; + +Point.prototype.toString = function () { + return new Point().constructor.name + "[x=" + this.x + ",y=" + this.y + "]"; +}; + +module.exports = Point; + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function RectangleD(x, y, width, height) { + this.x = 0; + this.y = 0; + this.width = 0; + this.height = 0; + + if (x != null && y != null && width != null && height != null) { + this.x = x; + this.y = y; + this.width = width; + this.height = height; + } +} + +RectangleD.prototype.getX = function () { + return this.x; +}; + +RectangleD.prototype.setX = function (x) { + this.x = x; +}; + +RectangleD.prototype.getY = function () { + return this.y; +}; + +RectangleD.prototype.setY = function (y) { + this.y = y; +}; + +RectangleD.prototype.getWidth = function () { + return this.width; +}; + +RectangleD.prototype.setWidth = function (width) { + this.width = width; +}; + +RectangleD.prototype.getHeight = function () { + return this.height; +}; + +RectangleD.prototype.setHeight = function (height) { + this.height = height; +}; + +RectangleD.prototype.getRight = function () { + return this.x + this.width; +}; + +RectangleD.prototype.getBottom = function () { + return this.y + this.height; +}; + +RectangleD.prototype.intersects = function (a) { + if (this.getRight() < a.x) { + return false; + } + + if (this.getBottom() < a.y) { + return false; + } + + if (a.getRight() < this.x) { + return false; + } + + if (a.getBottom() < this.y) { + return false; + } + + return true; +}; + +RectangleD.prototype.getCenterX = function () { + return this.x + this.width / 2; +}; + +RectangleD.prototype.getMinX = function () { + return this.getX(); +}; + +RectangleD.prototype.getMaxX = function () { + return this.getX() + this.width; +}; + +RectangleD.prototype.getCenterY = function () { + return this.y + this.height / 2; +}; + +RectangleD.prototype.getMinY = function () { + return this.getY(); +}; + +RectangleD.prototype.getMaxY = function () { + return this.getY() + this.height; +}; + +RectangleD.prototype.getWidthHalf = function () { + return this.width / 2; +}; + +RectangleD.prototype.getHeightHalf = function () { + return this.height / 2; +}; + +module.exports = RectangleD; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; + +function UniqueIDGeneretor() {} + +UniqueIDGeneretor.lastID = 0; + +UniqueIDGeneretor.createID = function (obj) { + if (UniqueIDGeneretor.isPrimitive(obj)) { + return obj; + } + if (obj.uniqueID != null) { + return obj.uniqueID; + } + obj.uniqueID = UniqueIDGeneretor.getString(); + UniqueIDGeneretor.lastID++; + return obj.uniqueID; +}; + +UniqueIDGeneretor.getString = function (id) { + if (id == null) id = UniqueIDGeneretor.lastID; + return "Object#" + id + ""; +}; + +UniqueIDGeneretor.isPrimitive = function (arg) { + var type = typeof arg === "undefined" ? "undefined" : _typeof(arg); + return arg == null || type != "object" && type != "function"; +}; + +module.exports = UniqueIDGeneretor; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __nested_webpack_require_64072__) { + +"use strict"; + + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var LayoutConstants = __nested_webpack_require_64072__(0); +var LGraphManager = __nested_webpack_require_64072__(6); +var LNode = __nested_webpack_require_64072__(3); +var LEdge = __nested_webpack_require_64072__(1); +var LGraph = __nested_webpack_require_64072__(5); +var PointD = __nested_webpack_require_64072__(4); +var Transform = __nested_webpack_require_64072__(17); +var Emitter = __nested_webpack_require_64072__(27); + +function Layout(isRemoteUse) { + Emitter.call(this); + + //Layout Quality: 0:draft, 1:default, 2:proof + this.layoutQuality = LayoutConstants.QUALITY; + //Whether layout should create bendpoints as needed or not + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + //Whether layout should be incremental or not + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + //Whether we animate from before to after layout node positions + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + //Whether we animate the layout process or not + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + //Number iterations that should be done between two successive animations + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + /** + * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When + * they are, both spring and repulsion forces between two leaf nodes can be + * calculated without the expensive clipping point calculations, resulting + * in major speed-up. + */ + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + /** + * This is used for creation of bendpoints by using dummy nodes and edges. + * Maps an LEdge to its dummy bendpoint path. + */ + this.edgeToDummyNodes = new Map(); + this.graphManager = new LGraphManager(this); + this.isLayoutFinished = false; + this.isSubLayout = false; + this.isRemoteUse = false; + + if (isRemoteUse != null) { + this.isRemoteUse = isRemoteUse; + } +} + +Layout.RANDOM_SEED = 1; + +Layout.prototype = Object.create(Emitter.prototype); + +Layout.prototype.getGraphManager = function () { + return this.graphManager; +}; + +Layout.prototype.getAllNodes = function () { + return this.graphManager.getAllNodes(); +}; + +Layout.prototype.getAllEdges = function () { + return this.graphManager.getAllEdges(); +}; + +Layout.prototype.getAllNodesToApplyGravitation = function () { + return this.graphManager.getAllNodesToApplyGravitation(); +}; + +Layout.prototype.newGraphManager = function () { + var gm = new LGraphManager(this); + this.graphManager = gm; + return gm; +}; + +Layout.prototype.newGraph = function (vGraph) { + return new LGraph(null, this.graphManager, vGraph); +}; + +Layout.prototype.newNode = function (vNode) { + return new LNode(this.graphManager, vNode); +}; + +Layout.prototype.newEdge = function (vEdge) { + return new LEdge(null, null, vEdge); +}; + +Layout.prototype.checkLayoutSuccess = function () { + return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge(); +}; + +Layout.prototype.runLayout = function () { + this.isLayoutFinished = false; + + if (this.tilingPreLayout) { + this.tilingPreLayout(); + } + + this.initParameters(); + var isLayoutSuccessfull; + + if (this.checkLayoutSuccess()) { + isLayoutSuccessfull = false; + } else { + isLayoutSuccessfull = this.layout(); + } + + if (LayoutConstants.ANIMATE === 'during') { + // If this is a 'during' layout animation. Layout is not finished yet. + // We need to perform these in index.js when layout is really finished. + return false; + } + + if (isLayoutSuccessfull) { + if (!this.isSubLayout) { + this.doPostLayout(); + } + } + + if (this.tilingPostLayout) { + this.tilingPostLayout(); + } + + this.isLayoutFinished = true; + + return isLayoutSuccessfull; +}; + +/** + * This method performs the operations required after layout. + */ +Layout.prototype.doPostLayout = function () { + //assert !isSubLayout : "Should not be called on sub-layout!"; + // Propagate geometric changes to v-level objects + if (!this.incremental) { + this.transform(); + } + this.update(); +}; + +/** + * This method updates the geometry of the target graph according to + * calculated layout. + */ +Layout.prototype.update2 = function () { + // update bend points + if (this.createBendsAsNeeded) { + this.createBendpointsFromDummyNodes(); + + // reset all edges, since the topology has changed + this.graphManager.resetAllEdges(); + } + + // perform edge, node and root updates if layout is not called + // remotely + if (!this.isRemoteUse) { + // update all edges + var edge; + var allEdges = this.graphManager.getAllEdges(); + for (var i = 0; i < allEdges.length; i++) { + edge = allEdges[i]; + // this.update(edge); + } + + // recursively update nodes + var node; + var nodes = this.graphManager.getRoot().getNodes(); + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + // this.update(node); + } + + // update root graph + this.update(this.graphManager.getRoot()); + } +}; + +Layout.prototype.update = function (obj) { + if (obj == null) { + this.update2(); + } else if (obj instanceof LNode) { + var node = obj; + if (node.getChild() != null) { + // since node is compound, recursively update child nodes + var nodes = node.getChild().getNodes(); + for (var i = 0; i < nodes.length; i++) { + update(nodes[i]); + } + } + + // if the l-level node is associated with a v-level graph object, + // then it is assumed that the v-level node implements the + // interface Updatable. + if (node.vGraphObject != null) { + // cast to Updatable without any type check + var vNode = node.vGraphObject; + + // call the update method of the interface + vNode.update(node); + } + } else if (obj instanceof LEdge) { + var edge = obj; + // if the l-level edge is associated with a v-level graph object, + // then it is assumed that the v-level edge implements the + // interface Updatable. + + if (edge.vGraphObject != null) { + // cast to Updatable without any type check + var vEdge = edge.vGraphObject; + + // call the update method of the interface + vEdge.update(edge); + } + } else if (obj instanceof LGraph) { + var graph = obj; + // if the l-level graph is associated with a v-level graph object, + // then it is assumed that the v-level object implements the + // interface Updatable. + + if (graph.vGraphObject != null) { + // cast to Updatable without any type check + var vGraph = graph.vGraphObject; + + // call the update method of the interface + vGraph.update(graph); + } + } +}; + +/** + * This method is used to set all layout parameters to default values + * determined at compile time. + */ +Layout.prototype.initParameters = function () { + if (!this.isSubLayout) { + this.layoutQuality = LayoutConstants.QUALITY; + this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; + this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; + this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; + this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; + this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; + this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; + } + + if (this.animationDuringLayout) { + this.animationOnLayout = false; + } +}; + +Layout.prototype.transform = function (newLeftTop) { + if (newLeftTop == undefined) { + this.transform(new PointD(0, 0)); + } else { + // create a transformation object (from Eclipse to layout). When an + // inverse transform is applied, we get upper-left coordinate of the + // drawing or the root graph at given input coordinate (some margins + // already included in calculation of left-top). + + var trans = new Transform(); + var leftTop = this.graphManager.getRoot().updateLeftTop(); + + if (leftTop != null) { + trans.setWorldOrgX(newLeftTop.x); + trans.setWorldOrgY(newLeftTop.y); + + trans.setDeviceOrgX(leftTop.x); + trans.setDeviceOrgY(leftTop.y); + + var nodes = this.getAllNodes(); + var node; + + for (var i = 0; i < nodes.length; i++) { + node = nodes[i]; + node.transform(trans); + } + } + } +}; + +Layout.prototype.positionNodesRandomly = function (graph) { + + if (graph == undefined) { + //assert !this.incremental; + this.positionNodesRandomly(this.getGraphManager().getRoot()); + this.getGraphManager().getRoot().updateBounds(true); + } else { + var lNode; + var childGraph; + + var nodes = graph.getNodes(); + for (var i = 0; i < nodes.length; i++) { + lNode = nodes[i]; + childGraph = lNode.getChild(); + + if (childGraph == null) { + lNode.scatter(); + } else if (childGraph.getNodes().length == 0) { + lNode.scatter(); + } else { + this.positionNodesRandomly(childGraph); + lNode.updateBounds(); + } + } + } +}; + +/** + * This method returns a list of trees where each tree is represented as a + * list of l-nodes. The method returns a list of size 0 when: + * - The graph is not flat or + * - One of the component(s) of the graph is not a tree. + */ +Layout.prototype.getFlatForest = function () { + var flatForest = []; + var isForest = true; + + // Quick reference for all nodes in the graph manager associated with + // this layout. The list should not be changed. + var allNodes = this.graphManager.getRoot().getNodes(); + + // First be sure that the graph is flat + var isFlat = true; + + for (var i = 0; i < allNodes.length; i++) { + if (allNodes[i].getChild() != null) { + isFlat = false; + } + } + + // Return empty forest if the graph is not flat. + if (!isFlat) { + return flatForest; + } + + // Run BFS for each component of the graph. + + var visited = new Set(); + var toBeVisited = []; + var parents = new Map(); + var unProcessedNodes = []; + + unProcessedNodes = unProcessedNodes.concat(allNodes); + + // Each iteration of this loop finds a component of the graph and + // decides whether it is a tree or not. If it is a tree, adds it to the + // forest and continued with the next component. + + while (unProcessedNodes.length > 0 && isForest) { + toBeVisited.push(unProcessedNodes[0]); + + // Start the BFS. Each iteration of this loop visits a node in a + // BFS manner. + while (toBeVisited.length > 0 && isForest) { + //pool operation + var currentNode = toBeVisited[0]; + toBeVisited.splice(0, 1); + visited.add(currentNode); + + // Traverse all neighbors of this node + var neighborEdges = currentNode.getEdges(); + + for (var i = 0; i < neighborEdges.length; i++) { + var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode); + + // If BFS is not growing from this neighbor. + if (parents.get(currentNode) != currentNeighbor) { + // We haven't previously visited this neighbor. + if (!visited.has(currentNeighbor)) { + toBeVisited.push(currentNeighbor); + parents.set(currentNeighbor, currentNode); + } + // Since we have previously visited this neighbor and + // this neighbor is not parent of currentNode, given + // graph contains a component that is not tree, hence + // it is not a forest. + else { + isForest = false; + break; + } + } + } + } + + // The graph contains a component that is not a tree. Empty + // previously found trees. The method will end. + if (!isForest) { + flatForest = []; + } + // Save currently visited nodes as a tree in our forest. Reset + // visited and parents lists. Continue with the next component of + // the graph, if any. + else { + var temp = [].concat(_toConsumableArray(visited)); + flatForest.push(temp); + //flatForest = flatForest.concat(temp); + //unProcessedNodes.removeAll(visited); + for (var i = 0; i < temp.length; i++) { + var value = temp[i]; + var index = unProcessedNodes.indexOf(value); + if (index > -1) { + unProcessedNodes.splice(index, 1); + } + } + visited = new Set(); + parents = new Map(); + } + } + + return flatForest; +}; + +/** + * This method creates dummy nodes (an l-level node with minimal dimensions) + * for the given edge (one per bendpoint). The existing l-level structure + * is updated accordingly. + */ +Layout.prototype.createDummyNodesForBendpoints = function (edge) { + var dummyNodes = []; + var prev = edge.source; + + var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target); + + for (var i = 0; i < edge.bendpoints.length; i++) { + // create new dummy node + var dummyNode = this.newNode(null); + dummyNode.setRect(new Point(0, 0), new Dimension(1, 1)); + + graph.add(dummyNode); + + // create new dummy edge between prev and dummy node + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, dummyNode); + + dummyNodes.add(dummyNode); + prev = dummyNode; + } + + var dummyEdge = this.newEdge(null); + this.graphManager.add(dummyEdge, prev, edge.target); + + this.edgeToDummyNodes.set(edge, dummyNodes); + + // remove real edge from graph manager if it is inter-graph + if (edge.isInterGraph()) { + this.graphManager.remove(edge); + } + // else, remove the edge from the current graph + else { + graph.remove(edge); + } + + return dummyNodes; +}; + +/** + * This method creates bendpoints for edges from the dummy nodes + * at l-level. + */ +Layout.prototype.createBendpointsFromDummyNodes = function () { + var edges = []; + edges = edges.concat(this.graphManager.getAllEdges()); + edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges); + + for (var k = 0; k < edges.length; k++) { + var lEdge = edges[k]; + + if (lEdge.bendpoints.length > 0) { + var path = this.edgeToDummyNodes.get(lEdge); + + for (var i = 0; i < path.length; i++) { + var dummyNode = path[i]; + var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY()); + + // update bendpoint's location according to dummy node + var ebp = lEdge.bendpoints.get(i); + ebp.x = p.x; + ebp.y = p.y; + + // remove the dummy node, dummy edges incident with this + // dummy node is also removed (within the remove method) + dummyNode.getOwner().remove(dummyNode); + } + + // add the real edge to graph + this.graphManager.add(lEdge, lEdge.source, lEdge.target); + } + } +}; + +Layout.transform = function (sliderValue, defaultValue, minDiv, maxMul) { + if (minDiv != undefined && maxMul != undefined) { + var value = defaultValue; + + if (sliderValue <= 50) { + var minValue = defaultValue / minDiv; + value -= (defaultValue - minValue) / 50 * (50 - sliderValue); + } else { + var maxValue = defaultValue * maxMul; + value += (maxValue - defaultValue) / 50 * (sliderValue - 50); + } + + return value; + } else { + var a, b; + + if (sliderValue <= 50) { + a = 9.0 * defaultValue / 500.0; + b = defaultValue / 10.0; + } else { + a = 9.0 * defaultValue / 50.0; + b = -8 * defaultValue; + } + + return a * sliderValue + b; + } +}; + +/** + * This method finds and returns the center of the given nodes, assuming + * that the given nodes form a tree in themselves. + */ +Layout.findCenterOfTree = function (nodes) { + var list = []; + list = list.concat(nodes); + + var removedNodes = []; + var remainingDegrees = new Map(); + var foundCenter = false; + var centerNode = null; + + if (list.length == 1 || list.length == 2) { + foundCenter = true; + centerNode = list[0]; + } + + for (var i = 0; i < list.length; i++) { + var node = list[i]; + var degree = node.getNeighborsList().size; + remainingDegrees.set(node, node.getNeighborsList().size); + + if (degree == 1) { + removedNodes.push(node); + } + } + + var tempList = []; + tempList = tempList.concat(removedNodes); + + while (!foundCenter) { + var tempList2 = []; + tempList2 = tempList2.concat(tempList); + tempList = []; + + for (var i = 0; i < list.length; i++) { + var node = list[i]; + + var index = list.indexOf(node); + if (index >= 0) { + list.splice(index, 1); + } + + var neighbours = node.getNeighborsList(); + + neighbours.forEach(function (neighbour) { + if (removedNodes.indexOf(neighbour) < 0) { + var otherDegree = remainingDegrees.get(neighbour); + var newDegree = otherDegree - 1; + + if (newDegree == 1) { + tempList.push(neighbour); + } + + remainingDegrees.set(neighbour, newDegree); + } + }); + } + + removedNodes = removedNodes.concat(tempList); + + if (list.length == 1 || list.length == 2) { + foundCenter = true; + centerNode = list[0]; + } + } + + return centerNode; +}; + +/** + * During the coarsening process, this layout may be referenced by two graph managers + * this setter function grants access to change the currently being used graph manager + */ +Layout.prototype.setGraphManager = function (gm) { + this.graphManager = gm; +}; + +module.exports = Layout; + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function RandomSeed() {} +// adapted from: https://stackoverflow.com/a/19303725 +RandomSeed.seed = 1; +RandomSeed.x = 0; + +RandomSeed.nextDouble = function () { + RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000; + return RandomSeed.x - Math.floor(RandomSeed.x); +}; + +module.exports = RandomSeed; + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __nested_webpack_require_81860__) { + +"use strict"; + + +var PointD = __nested_webpack_require_81860__(4); + +function Transform(x, y) { + this.lworldOrgX = 0.0; + this.lworldOrgY = 0.0; + this.ldeviceOrgX = 0.0; + this.ldeviceOrgY = 0.0; + this.lworldExtX = 1.0; + this.lworldExtY = 1.0; + this.ldeviceExtX = 1.0; + this.ldeviceExtY = 1.0; +} + +Transform.prototype.getWorldOrgX = function () { + return this.lworldOrgX; +}; + +Transform.prototype.setWorldOrgX = function (wox) { + this.lworldOrgX = wox; +}; + +Transform.prototype.getWorldOrgY = function () { + return this.lworldOrgY; +}; + +Transform.prototype.setWorldOrgY = function (woy) { + this.lworldOrgY = woy; +}; + +Transform.prototype.getWorldExtX = function () { + return this.lworldExtX; +}; + +Transform.prototype.setWorldExtX = function (wex) { + this.lworldExtX = wex; +}; + +Transform.prototype.getWorldExtY = function () { + return this.lworldExtY; +}; + +Transform.prototype.setWorldExtY = function (wey) { + this.lworldExtY = wey; +}; + +/* Device related */ + +Transform.prototype.getDeviceOrgX = function () { + return this.ldeviceOrgX; +}; + +Transform.prototype.setDeviceOrgX = function (dox) { + this.ldeviceOrgX = dox; +}; + +Transform.prototype.getDeviceOrgY = function () { + return this.ldeviceOrgY; +}; + +Transform.prototype.setDeviceOrgY = function (doy) { + this.ldeviceOrgY = doy; +}; + +Transform.prototype.getDeviceExtX = function () { + return this.ldeviceExtX; +}; + +Transform.prototype.setDeviceExtX = function (dex) { + this.ldeviceExtX = dex; +}; + +Transform.prototype.getDeviceExtY = function () { + return this.ldeviceExtY; +}; + +Transform.prototype.setDeviceExtY = function (dey) { + this.ldeviceExtY = dey; +}; + +Transform.prototype.transformX = function (x) { + var xDevice = 0.0; + var worldExtX = this.lworldExtX; + if (worldExtX != 0.0) { + xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX; + } + + return xDevice; +}; + +Transform.prototype.transformY = function (y) { + var yDevice = 0.0; + var worldExtY = this.lworldExtY; + if (worldExtY != 0.0) { + yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY; + } + + return yDevice; +}; + +Transform.prototype.inverseTransformX = function (x) { + var xWorld = 0.0; + var deviceExtX = this.ldeviceExtX; + if (deviceExtX != 0.0) { + xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX; + } + + return xWorld; +}; + +Transform.prototype.inverseTransformY = function (y) { + var yWorld = 0.0; + var deviceExtY = this.ldeviceExtY; + if (deviceExtY != 0.0) { + yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY; + } + return yWorld; +}; + +Transform.prototype.inverseTransformPoint = function (inPoint) { + var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y)); + return outPoint; +}; + +module.exports = Transform; + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __nested_webpack_require_84747__) { + +"use strict"; + + +function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } + +var Layout = __nested_webpack_require_84747__(15); +var FDLayoutConstants = __nested_webpack_require_84747__(7); +var LayoutConstants = __nested_webpack_require_84747__(0); +var IGeometry = __nested_webpack_require_84747__(8); +var IMath = __nested_webpack_require_84747__(9); + +function FDLayout() { + Layout.call(this); + + this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; + this.idealEdgeLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; + this.springConstant = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; + this.repulsionConstant = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; + this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; + this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; + this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; + this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; + this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100; + this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; + this.totalDisplacement = 0.0; + this.oldTotalDisplacement = 0.0; + this.maxIterations = FDLayoutConstants.MAX_ITERATIONS; +} + +FDLayout.prototype = Object.create(Layout.prototype); + +for (var prop in Layout) { + FDLayout[prop] = Layout[prop]; +} + +FDLayout.prototype.initParameters = function () { + Layout.prototype.initParameters.call(this, arguments); + + this.totalIterations = 0; + this.notAnimatedIterations = 0; + + this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION; + + this.grid = []; +}; + +FDLayout.prototype.calcIdealEdgeLengths = function () { + var edge; + var lcaDepth; + var source; + var target; + var sizeOfSourceInLca; + var sizeOfTargetInLca; + + var allEdges = this.getGraphManager().getAllEdges(); + for (var i = 0; i < allEdges.length; i++) { + edge = allEdges[i]; + + edge.idealLength = this.idealEdgeLength; + + if (edge.isInterGraph) { + source = edge.getSource(); + target = edge.getTarget(); + + sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize(); + sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize(); + + if (this.useSmartIdealEdgeLengthCalculation) { + edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE; + } + + lcaDepth = edge.getLca().getInclusionTreeDepth(); + + edge.idealLength += FDLayoutConstants.DEFAULT_EDGE_LENGTH * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth); + } + } +}; + +FDLayout.prototype.initSpringEmbedder = function () { + + var s = this.getAllNodes().length; + if (this.incremental) { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL; + } else { + if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { + this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); + } else { + this.coolingFactor = 1.0; + } + this.initialCoolingFactor = this.coolingFactor; + this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT; + } + + this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations); + + this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length; + + this.repulsionRange = this.calcRepulsionRange(); +}; + +FDLayout.prototype.calcSpringForces = function () { + var lEdges = this.getAllEdges(); + var edge; + + for (var i = 0; i < lEdges.length; i++) { + edge = lEdges[i]; + + this.calcSpringForce(edge, edge.idealLength); + } +}; + +FDLayout.prototype.calcRepulsionForces = function () { + var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + var i, j; + var nodeA, nodeB; + var lNodes = this.getAllNodes(); + var processedNodeSet; + + if (this.useFRGridVariant) { + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) { + this.updateGrid(); + } + + processedNodeSet = new Set(); + + // calculate repulsion forces between each nodes and its surrounding + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate); + processedNodeSet.add(nodeA); + } + } else { + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + + for (j = i + 1; j < lNodes.length; j++) { + nodeB = lNodes[j]; + + // If both nodes are not members of the same graph, skip. + if (nodeA.getOwner() != nodeB.getOwner()) { + continue; + } + + this.calcRepulsionForce(nodeA, nodeB); + } + } + } +}; + +FDLayout.prototype.calcGravitationalForces = function () { + var node; + var lNodes = this.getAllNodesToApplyGravitation(); + + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + this.calcGravitationalForce(node); + } +}; + +FDLayout.prototype.moveNodes = function () { + var lNodes = this.getAllNodes(); + var node; + + for (var i = 0; i < lNodes.length; i++) { + node = lNodes[i]; + node.move(); + } +}; + +FDLayout.prototype.calcSpringForce = function (edge, idealLength) { + var sourceNode = edge.getSource(); + var targetNode = edge.getTarget(); + + var length; + var springForce; + var springForceX; + var springForceY; + + // Update edge length + if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) { + edge.updateLengthSimple(); + } else { + edge.updateLength(); + + if (edge.isOverlapingSourceAndTarget) { + return; + } + } + + length = edge.getLength(); + + if (length == 0) return; + + // Calculate spring forces + springForce = this.springConstant * (length - idealLength); + + // Project force onto x and y axes + springForceX = springForce * (edge.lengthX / length); + springForceY = springForce * (edge.lengthY / length); + + // Apply forces on the end nodes + sourceNode.springForceX += springForceX; + sourceNode.springForceY += springForceY; + targetNode.springForceX -= springForceX; + targetNode.springForceY -= springForceY; +}; + +FDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) { + var rectA = nodeA.getRect(); + var rectB = nodeB.getRect(); + var overlapAmount = new Array(2); + var clipPoints = new Array(4); + var distanceX; + var distanceY; + var distanceSquared; + var distance; + var repulsionForce; + var repulsionForceX; + var repulsionForceY; + + if (rectA.intersects(rectB)) // two nodes overlap + { + // calculate separation amount in x and y directions + IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0); + + repulsionForceX = 2 * overlapAmount[0]; + repulsionForceY = 2 * overlapAmount[1]; + + var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren); + + // Apply forces on the two nodes + nodeA.repulsionForceX -= childrenConstant * repulsionForceX; + nodeA.repulsionForceY -= childrenConstant * repulsionForceY; + nodeB.repulsionForceX += childrenConstant * repulsionForceX; + nodeB.repulsionForceY += childrenConstant * repulsionForceY; + } else // no overlap + { + // calculate distance + + if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) // simply base repulsion on distance of node centers + { + distanceX = rectB.getCenterX() - rectA.getCenterX(); + distanceY = rectB.getCenterY() - rectA.getCenterY(); + } else // use clipping points + { + IGeometry.getIntersection(rectA, rectB, clipPoints); + + distanceX = clipPoints[2] - clipPoints[0]; + distanceY = clipPoints[3] - clipPoints[1]; + } + + // No repulsion range. FR grid variant should take care of this. + if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST; + } + + if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) { + distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST; + } + + distanceSquared = distanceX * distanceX + distanceY * distanceY; + distance = Math.sqrt(distanceSquared); + + repulsionForce = this.repulsionConstant * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared; + + // Project force onto x and y axes + repulsionForceX = repulsionForce * distanceX / distance; + repulsionForceY = repulsionForce * distanceY / distance; + + // Apply forces on the two nodes + nodeA.repulsionForceX -= repulsionForceX; + nodeA.repulsionForceY -= repulsionForceY; + nodeB.repulsionForceX += repulsionForceX; + nodeB.repulsionForceY += repulsionForceY; + } +}; + +FDLayout.prototype.calcGravitationalForce = function (node) { + var ownerGraph; + var ownerCenterX; + var ownerCenterY; + var distanceX; + var distanceY; + var absDistanceX; + var absDistanceY; + var estimatedSize; + ownerGraph = node.getOwner(); + + ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2; + ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2; + distanceX = node.getCenterX() - ownerCenterX; + distanceY = node.getCenterY() - ownerCenterY; + absDistanceX = Math.abs(distanceX) + node.getWidth() / 2; + absDistanceY = Math.abs(distanceY) + node.getHeight() / 2; + + if (node.getOwner() == this.graphManager.getRoot()) // in the root graph + { + estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor; + + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node.gravitationForceX = -this.gravityConstant * distanceX; + node.gravitationForceY = -this.gravityConstant * distanceY; + } + } else // inside a compound + { + estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor; + + if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { + node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant; + node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant; + } + } +}; + +FDLayout.prototype.isConverged = function () { + var converged; + var oscilating = false; + + if (this.totalIterations > this.maxIterations / 3) { + oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2; + } + + converged = this.totalDisplacement < this.totalDisplacementThreshold; + + this.oldTotalDisplacement = this.totalDisplacement; + + return converged || oscilating; +}; + +FDLayout.prototype.animate = function () { + if (this.animationDuringLayout && !this.isSubLayout) { + if (this.notAnimatedIterations == this.animationPeriod) { + this.update(); + this.notAnimatedIterations = 0; + } else { + this.notAnimatedIterations++; + } + } +}; + +//This method calculates the number of children (weight) for all nodes +FDLayout.prototype.calcNoOfChildrenForAllNodes = function () { + var node; + var allNodes = this.graphManager.getAllNodes(); + + for (var i = 0; i < allNodes.length; i++) { + node = allNodes[i]; + node.noOfChildren = node.getNoOfChildren(); + } +}; + +// ----------------------------------------------------------------------------- +// Section: FR-Grid Variant Repulsion Force Calculation +// ----------------------------------------------------------------------------- + +FDLayout.prototype.calcGrid = function (graph) { + + var sizeX = 0; + var sizeY = 0; + + sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange)); + sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange)); + + var grid = new Array(sizeX); + + for (var i = 0; i < sizeX; i++) { + grid[i] = new Array(sizeY); + } + + for (var i = 0; i < sizeX; i++) { + for (var j = 0; j < sizeY; j++) { + grid[i][j] = new Array(); + } + } + + return grid; +}; + +FDLayout.prototype.addNodeToGrid = function (v, left, top) { + + var startX = 0; + var finishX = 0; + var startY = 0; + var finishY = 0; + + startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange)); + finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange)); + startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange)); + finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange)); + + for (var i = startX; i <= finishX; i++) { + for (var j = startY; j <= finishY; j++) { + this.grid[i][j].push(v); + v.setGridCoordinates(startX, finishX, startY, finishY); + } + } +}; + +FDLayout.prototype.updateGrid = function () { + var i; + var nodeA; + var lNodes = this.getAllNodes(); + + this.grid = this.calcGrid(this.graphManager.getRoot()); + + // put all nodes to proper grid cells + for (i = 0; i < lNodes.length; i++) { + nodeA = lNodes[i]; + this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop()); + } +}; + +FDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) { + + if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) { + var surrounding = new Set(); + nodeA.surrounding = new Array(); + var nodeB; + var grid = this.grid; + + for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) { + for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) { + if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) { + for (var k = 0; k < grid[i][j].length; k++) { + nodeB = grid[i][j][k]; + + // If both nodes are not members of the same graph, + // or both nodes are the same, skip. + if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) { + continue; + } + + // check if the repulsion force between + // nodeA and nodeB has already been calculated + if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) { + var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2); + var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2); + + // if the distance between nodeA and nodeB + // is less then calculation range + if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) { + //then add nodeB to surrounding of nodeA + surrounding.add(nodeB); + } + } + } + } + } + } + + nodeA.surrounding = [].concat(_toConsumableArray(surrounding)); + } + for (i = 0; i < nodeA.surrounding.length; i++) { + this.calcRepulsionForce(nodeA, nodeA.surrounding[i]); + } +}; + +FDLayout.prototype.calcRepulsionRange = function () { + return 0.0; +}; + +module.exports = FDLayout; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __nested_webpack_require_100902__) { + +"use strict"; + + +var LEdge = __nested_webpack_require_100902__(1); +var FDLayoutConstants = __nested_webpack_require_100902__(7); + +function FDLayoutEdge(source, target, vEdge) { + LEdge.call(this, source, target, vEdge); + this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; +} + +FDLayoutEdge.prototype = Object.create(LEdge.prototype); + +for (var prop in LEdge) { + FDLayoutEdge[prop] = LEdge[prop]; +} + +module.exports = FDLayoutEdge; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __nested_webpack_require_101387__) { + +"use strict"; + + +var LNode = __nested_webpack_require_101387__(3); + +function FDLayoutNode(gm, loc, size, vNode) { + // alternative constructor is handled inside LNode + LNode.call(this, gm, loc, size, vNode); + //Spring, repulsion and gravitational forces acting on this node + this.springForceX = 0; + this.springForceY = 0; + this.repulsionForceX = 0; + this.repulsionForceY = 0; + this.gravitationForceX = 0; + this.gravitationForceY = 0; + //Amount by which this node is to be moved in this iteration + this.displacementX = 0; + this.displacementY = 0; + + //Start and finish grid coordinates that this node is fallen into + this.startX = 0; + this.finishX = 0; + this.startY = 0; + this.finishY = 0; + + //Geometric neighbors of this node + this.surrounding = []; +} + +FDLayoutNode.prototype = Object.create(LNode.prototype); + +for (var prop in LNode) { + FDLayoutNode[prop] = LNode[prop]; +} + +FDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) { + this.startX = _startX; + this.finishX = _finishX; + this.startY = _startY; + this.finishY = _finishY; +}; + +module.exports = FDLayoutNode; + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function DimensionD(width, height) { + this.width = 0; + this.height = 0; + if (width !== null && height !== null) { + this.height = height; + this.width = width; + } +} + +DimensionD.prototype.getWidth = function () { + return this.width; +}; + +DimensionD.prototype.setWidth = function (width) { + this.width = width; +}; + +DimensionD.prototype.getHeight = function () { + return this.height; +}; + +DimensionD.prototype.setHeight = function (height) { + this.height = height; +}; + +module.exports = DimensionD; + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __nested_webpack_require_103173__) { + +"use strict"; + + +var UniqueIDGeneretor = __nested_webpack_require_103173__(14); + +function HashMap() { + this.map = {}; + this.keys = []; +} + +HashMap.prototype.put = function (key, value) { + var theId = UniqueIDGeneretor.createID(key); + if (!this.contains(theId)) { + this.map[theId] = value; + this.keys.push(key); + } +}; + +HashMap.prototype.contains = function (key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[key] != null; +}; + +HashMap.prototype.get = function (key) { + var theId = UniqueIDGeneretor.createID(key); + return this.map[theId]; +}; + +HashMap.prototype.keySet = function () { + return this.keys; +}; + +module.exports = HashMap; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __nested_webpack_require_103901__) { + +"use strict"; + + +var UniqueIDGeneretor = __nested_webpack_require_103901__(14); + +function HashSet() { + this.set = {}; +} +; + +HashSet.prototype.add = function (obj) { + var theId = UniqueIDGeneretor.createID(obj); + if (!this.contains(theId)) this.set[theId] = obj; +}; + +HashSet.prototype.remove = function (obj) { + delete this.set[UniqueIDGeneretor.createID(obj)]; +}; + +HashSet.prototype.clear = function () { + this.set = {}; +}; + +HashSet.prototype.contains = function (obj) { + return this.set[UniqueIDGeneretor.createID(obj)] == obj; +}; + +HashSet.prototype.isEmpty = function () { + return this.size() === 0; +}; + +HashSet.prototype.size = function () { + return Object.keys(this.set).length; +}; + +//concats this.set to the given list +HashSet.prototype.addAllTo = function (list) { + var keys = Object.keys(this.set); + var length = keys.length; + for (var i = 0; i < length; i++) { + list.push(this.set[keys[i]]); + } +}; + +HashSet.prototype.size = function () { + return Object.keys(this.set).length; +}; + +HashSet.prototype.addAll = function (list) { + var s = list.length; + for (var i = 0; i < s; i++) { + var v = list[i]; + this.add(v); + } +}; + +module.exports = HashSet; + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __nested_webpack_require_105138__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * A classic Quicksort algorithm with Hoare's partition + * - Works also on LinkedList objects + * + * Copyright: i-Vis Research Group, Bilkent University, 2007 - present + */ + +var LinkedList = __nested_webpack_require_105138__(11); + +var Quicksort = function () { + function Quicksort(A, compareFunction) { + _classCallCheck(this, Quicksort); + + if (compareFunction !== null || compareFunction !== undefined) this.compareFunction = this._defaultCompareFunction; + + var length = void 0; + if (A instanceof LinkedList) length = A.size();else length = A.length; + + this._quicksort(A, 0, length - 1); + } + + _createClass(Quicksort, [{ + key: '_quicksort', + value: function _quicksort(A, p, r) { + if (p < r) { + var q = this._partition(A, p, r); + this._quicksort(A, p, q); + this._quicksort(A, q + 1, r); + } + } + }, { + key: '_partition', + value: function _partition(A, p, r) { + var x = this._get(A, p); + var i = p; + var j = r; + while (true) { + while (this.compareFunction(x, this._get(A, j))) { + j--; + }while (this.compareFunction(this._get(A, i), x)) { + i++; + }if (i < j) { + this._swap(A, i, j); + i++; + j--; + } else return j; + } + } + }, { + key: '_get', + value: function _get(object, index) { + if (object instanceof LinkedList) return object.get_object_at(index);else return object[index]; + } + }, { + key: '_set', + value: function _set(object, index, value) { + if (object instanceof LinkedList) object.set_object_at(index, value);else object[index] = value; + } + }, { + key: '_swap', + value: function _swap(A, i, j) { + var temp = this._get(A, i); + this._set(A, i, this._get(A, j)); + this._set(A, j, temp); + } + }, { + key: '_defaultCompareFunction', + value: function _defaultCompareFunction(a, b) { + return b > a; + } + }]); + + return Quicksort; +}(); + +module.exports = Quicksort; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +/** + * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string + * sequences by S.B.Needleman and C.D.Wunsch (1970). + * + * Aside from the inputs, you can assign the scores for, + * - Match: The two characters at the current index are same. + * - Mismatch: The two characters at the current index are different. + * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string. + */ + +var NeedlemanWunsch = function () { + function NeedlemanWunsch(sequence1, sequence2) { + var match_score = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; + var mismatch_penalty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1; + var gap_penalty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1; + + _classCallCheck(this, NeedlemanWunsch); + + this.sequence1 = sequence1; + this.sequence2 = sequence2; + this.match_score = match_score; + this.mismatch_penalty = mismatch_penalty; + this.gap_penalty = gap_penalty; + + // Just the remove redundancy + this.iMax = sequence1.length + 1; + this.jMax = sequence2.length + 1; + + // Grid matrix of scores + this.grid = new Array(this.iMax); + for (var i = 0; i < this.iMax; i++) { + this.grid[i] = new Array(this.jMax); + + for (var j = 0; j < this.jMax; j++) { + this.grid[i][j] = 0; + } + } + + // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions) + this.tracebackGrid = new Array(this.iMax); + for (var _i = 0; _i < this.iMax; _i++) { + this.tracebackGrid[_i] = new Array(this.jMax); + + for (var _j = 0; _j < this.jMax; _j++) { + this.tracebackGrid[_i][_j] = [null, null, null]; + } + } + + // The aligned sequences (return multiple possibilities) + this.alignments = []; + + // Final alignment score + this.score = -1; + + // Calculate scores and tracebacks + this.computeGrids(); + } + + _createClass(NeedlemanWunsch, [{ + key: "getScore", + value: function getScore() { + return this.score; + } + }, { + key: "getAlignments", + value: function getAlignments() { + return this.alignments; + } + + // Main dynamic programming procedure + + }, { + key: "computeGrids", + value: function computeGrids() { + // Fill in the first row + for (var j = 1; j < this.jMax; j++) { + this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty; + this.tracebackGrid[0][j] = [false, false, true]; + } + + // Fill in the first column + for (var i = 1; i < this.iMax; i++) { + this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty; + this.tracebackGrid[i][0] = [false, true, false]; + } + + // Fill the rest of the grid + for (var _i2 = 1; _i2 < this.iMax; _i2++) { + for (var _j2 = 1; _j2 < this.jMax; _j2++) { + // Find the max score(s) among [`Diag`, `Up`, `Left`] + var diag = void 0; + if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty; + + var up = this.grid[_i2 - 1][_j2] + this.gap_penalty; + var left = this.grid[_i2][_j2 - 1] + this.gap_penalty; + + // If there exists multiple max values, capture them for multiple paths + var maxOf = [diag, up, left]; + var indices = this.arrayAllMaxIndexes(maxOf); + + // Update Grids + this.grid[_i2][_j2] = maxOf[indices[0]]; + this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)]; + } + } + + // Update alignment score + this.score = this.grid[this.iMax - 1][this.jMax - 1]; + } + + // Gets all possible valid sequence combinations + + }, { + key: "alignmentTraceback", + value: function alignmentTraceback() { + var inProcessAlignments = []; + + inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length], + seq1: "", + seq2: "" + }); + + while (inProcessAlignments[0]) { + var current = inProcessAlignments[0]; + var directions = this.tracebackGrid[current.pos[0]][current.pos[1]]; + + if (directions[0]) { + inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1] - 1], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + if (directions[1]) { + inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1]], + seq1: this.sequence1[current.pos[0] - 1] + current.seq1, + seq2: '-' + current.seq2 + }); + } + if (directions[2]) { + inProcessAlignments.push({ pos: [current.pos[0], current.pos[1] - 1], + seq1: '-' + current.seq1, + seq2: this.sequence2[current.pos[1] - 1] + current.seq2 + }); + } + + if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({ sequence1: current.seq1, + sequence2: current.seq2 + }); + + inProcessAlignments.shift(); + } + + return this.alignments; + } + + // Helper Functions + + }, { + key: "getAllIndexes", + value: function getAllIndexes(arr, val) { + var indexes = [], + i = -1; + while ((i = arr.indexOf(val, i + 1)) !== -1) { + indexes.push(i); + } + return indexes; + } + }, { + key: "arrayAllMaxIndexes", + value: function arrayAllMaxIndexes(array) { + return this.getAllIndexes(array, Math.max.apply(null, array)); + } + }]); + + return NeedlemanWunsch; +}(); + +module.exports = NeedlemanWunsch; + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __nested_webpack_require_115611__) { + +"use strict"; + + +var layoutBase = function layoutBase() { + return; +}; + +layoutBase.FDLayout = __nested_webpack_require_115611__(18); +layoutBase.FDLayoutConstants = __nested_webpack_require_115611__(7); +layoutBase.FDLayoutEdge = __nested_webpack_require_115611__(19); +layoutBase.FDLayoutNode = __nested_webpack_require_115611__(20); +layoutBase.DimensionD = __nested_webpack_require_115611__(21); +layoutBase.HashMap = __nested_webpack_require_115611__(22); +layoutBase.HashSet = __nested_webpack_require_115611__(23); +layoutBase.IGeometry = __nested_webpack_require_115611__(8); +layoutBase.IMath = __nested_webpack_require_115611__(9); +layoutBase.Integer = __nested_webpack_require_115611__(10); +layoutBase.Point = __nested_webpack_require_115611__(12); +layoutBase.PointD = __nested_webpack_require_115611__(4); +layoutBase.RandomSeed = __nested_webpack_require_115611__(16); +layoutBase.RectangleD = __nested_webpack_require_115611__(13); +layoutBase.Transform = __nested_webpack_require_115611__(17); +layoutBase.UniqueIDGeneretor = __nested_webpack_require_115611__(14); +layoutBase.Quicksort = __nested_webpack_require_115611__(24); +layoutBase.LinkedList = __nested_webpack_require_115611__(11); +layoutBase.LGraphObject = __nested_webpack_require_115611__(2); +layoutBase.LGraph = __nested_webpack_require_115611__(5); +layoutBase.LEdge = __nested_webpack_require_115611__(1); +layoutBase.LGraphManager = __nested_webpack_require_115611__(6); +layoutBase.LNode = __nested_webpack_require_115611__(3); +layoutBase.Layout = __nested_webpack_require_115611__(15); +layoutBase.LayoutConstants = __nested_webpack_require_115611__(0); +layoutBase.NeedlemanWunsch = __nested_webpack_require_115611__(25); + +module.exports = layoutBase; + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +function Emitter() { + this.listeners = []; +} + +var p = Emitter.prototype; + +p.addListener = function (event, callback) { + this.listeners.push({ + event: event, + callback: callback + }); +}; + +p.removeListener = function (event, callback) { + for (var i = this.listeners.length; i >= 0; i--) { + var l = this.listeners[i]; + + if (l.event === event && l.callback === callback) { + this.listeners.splice(i, 1); + } + } +}; + +p.emit = function (event, data) { + for (var i = 0; i < this.listeners.length; i++) { + var l = this.listeners[i]; + + if (event === l.event) { + l.callback(data); + } + } +}; + +module.exports = Emitter; + +/***/ }) +/******/ ]); +}); + +/***/ }), + +/***/ 52592: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(99968); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2588); +/* harmony import */ var cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65500); +/* harmony import */ var cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81176); +/* harmony import */ var cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(34176); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(67612); +/* harmony import */ var khroma__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(85219); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62264); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_3__); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86208); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66296); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1488); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(95536); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(58408); +/* harmony import */ var dagre_d3_es__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(128); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(18268); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75816); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(27280); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_12__); + + + + + + + + + + + + + + + + + + + + + + + + +var parser = function() { + var o = function(k, v, o2, l) { + for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) + ; + return o2; + }, $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 6, 13, 15, 16, 19, 22], $Vd = [1, 33], $Ve = [1, 34], $Vf = [1, 6, 7, 11, 13, 15, 16, 19, 22]; + var parser2 = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "start": 3, "mindMap": 4, "spaceLines": 5, "SPACELINE": 6, "NL": 7, "MINDMAP": 8, "document": 9, "stop": 10, "EOF": 11, "statement": 12, "SPACELIST": 13, "node": 14, "ICON": 15, "CLASS": 16, "nodeWithId": 17, "nodeWithoutId": 18, "NODE_DSTART": 19, "NODE_DESCR": 20, "NODE_DEND": 21, "NODE_ID": 22, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" }, + productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 6: + case 7: + return yy; + case 8: + yy.getLogger().trace("Stop NL "); + break; + case 9: + yy.getLogger().trace("Stop EOF "); + break; + case 11: + yy.getLogger().trace("Stop NL2 "); + break; + case 12: + yy.getLogger().trace("Stop EOF2 "); + break; + case 15: + yy.getLogger().info("Node: ", $$[$0].id); + yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 16: + yy.getLogger().trace("Icon: ", $$[$0]); + yy.decorateNode({ icon: $$[$0] }); + break; + case 17: + case 21: + yy.decorateNode({ class: $$[$0] }); + break; + case 18: + yy.getLogger().trace("SPACELIST"); + break; + case 19: + yy.getLogger().trace("Node: ", $$[$0].id); + yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type); + break; + case 20: + yy.decorateNode({ icon: $$[$0] }); + break; + case 25: + yy.getLogger().trace("node found ..", $$[$0 - 2]); + this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + case 26: + this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT }; + break; + case 27: + yy.getLogger().trace("node found ..", $$[$0 - 3]); + this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) }; + break; + } + }, + table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])], + defaultActions: { 2: [2, 1], 6: [2, 2] }, + parseError: function parseError2(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + var error = new Error(str); + error.hash = hash; + throw error; + } + }, + parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer2 = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer2.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer2; + sharedState.yy.parser = this; + if (typeof lexer2.yylloc == "undefined") { + lexer2.yylloc = {}; + } + var yyloc = lexer2.yylloc; + lstack.push(yyloc); + var ranges = lexer2.options && lexer2.options.ranges; + if (typeof sharedState.yy.parseError === "function") { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function lex() { + var token; + token = tstack.pop() || lexer2.lex() || EOF; + if (typeof token !== "number") { + if (token instanceof Array) { + tstack = token; + token = tstack.pop(); + } + token = self.symbols_[token] || token; + } + return token; + } + var symbol, state, action, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push("'" + this.terminals_[p] + "'"); + } + } + if (lexer2.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { + text: lexer2.match, + token: this.terminals_[symbol] || symbol, + line: lexer2.yylineno, + loc: yyloc, + expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer2.yytext); + lstack.push(lexer2.yylloc); + stack.push(action[1]); + symbol = null; + { + yyleng = lexer2.yyleng; + yytext = lexer2.yytext; + yylineno = lexer2.yylineno; + yyloc = lexer2.yylloc; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError2(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + // resets the lexer, sets new input + setInput: function(input, yy) { + this.yy = yy || this.yy || {}; + this._input = input; + this._more = this._backtrack = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { + first_line: 1, + first_column: 0, + last_line: 1, + last_column: 0 + }; + if (this.options.ranges) { + this.yylloc.range = [0, 0]; + } + this.offset = 0; + return this; + }, + // consumes and returns one char from the input + input: function() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) { + this.yylloc.range[1]++; + } + this._input = this._input.slice(1); + return ch; + }, + // unshifts one char (or a string) into the input + unput: function(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) { + this.yylineno -= lines.length - 1; + } + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + this.yyleng = this.yytext.length; + return this; + }, + // When called from action, caches matched text and appends it on next action + more: function() { + this._more = true; + return this; + }, + // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead. + reject: function() { + if (this.options.backtrack_lexer) { + this._backtrack = true; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + return this; + }, + // retain first n characters of the match + less: function(n) { + this.unput(this.match.slice(n)); + }, + // displays already matched input, i.e. for error messages + pastInput: function() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + // displays upcoming input, i.e. for error messages + upcomingInput: function() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + // displays the character position where the lexing error occurred, i.e. for error messages + showPosition: function() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + // test the lexed token: return FALSE when not a match, otherwise return token + test_match: function(match, indexed_rule) { + var token, lines, backup; + if (this.options.backtrack_lexer) { + backup = { + yylineno: this.yylineno, + yylloc: { + first_line: this.yylloc.first_line, + last_line: this.last_line, + first_column: this.yylloc.first_column, + last_column: this.yylloc.last_column + }, + yytext: this.yytext, + match: this.match, + matches: this.matches, + matched: this.matched, + yyleng: this.yyleng, + offset: this.offset, + _more: this._more, + _input: this._input, + yy: this.yy, + conditionStack: this.conditionStack.slice(0), + done: this.done + }; + if (this.options.ranges) { + backup.yylloc.range = this.yylloc.range.slice(0); + } + } + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno += lines.length; + } + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._backtrack = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) { + this.done = false; + } + if (token) { + return token; + } else if (this._backtrack) { + for (var k in backup) { + this[k] = backup[k]; + } + return false; + } + return false; + }, + // return next match in input + next: function() { + if (this.done) { + return this.EOF; + } + if (!this._input) { + this.done = true; + } + var token, match, tempMatch, index; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (this.options.backtrack_lexer) { + token = this.test_match(tempMatch, rules[i]); + if (token !== false) { + return token; + } else if (this._backtrack) { + match = false; + continue; + } else { + return false; + } + } else if (!this.options.flex) { + break; + } + } + } + if (match) { + token = this.test_match(match, rules[index]); + if (token !== false) { + return token; + } + return false; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { + text: "", + token: null, + line: this.yylineno + }); + } + }, + // return next match that has a token + lex: function lex() { + var r = this.next(); + if (r) { + return r; + } else { + return this.lex(); + } + }, + // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack) + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + // pop the previously active lexer condition state off the condition stack + popState: function popState() { + var n = this.conditionStack.length - 1; + if (n > 0) { + return this.conditionStack.pop(); + } else { + return this.conditionStack[0]; + } + }, + // produce the lexer rule set which is active for the currently active lexer condition state + _currentRules: function _currentRules() { + if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + } else { + return this.conditions["INITIAL"].rules; + } + }, + // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available + topState: function topState(n) { + n = this.conditionStack.length - 1 - Math.abs(n || 0); + if (n >= 0) { + return this.conditionStack[n]; + } else { + return "INITIAL"; + } + }, + // alias for begin(condition) + pushState: function pushState(condition) { + this.begin(condition); + }, + // return the number of states currently on the stack + stateStackSize: function stateStackSize() { + return this.conditionStack.length; + }, + options: { "case-insensitive": true }, + performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + switch ($avoiding_name_collisions) { + case 0: + yy.getLogger().trace("Found comment", yy_.yytext); + break; + case 1: + return 8; + case 2: + this.begin("CLASS"); + break; + case 3: + this.popState(); + return 16; + case 4: + this.popState(); + break; + case 5: + yy.getLogger().trace("Begin icon"); + this.begin("ICON"); + break; + case 6: + yy.getLogger().trace("SPACELINE"); + return 6; + case 7: + return 7; + case 8: + return 15; + case 9: + yy.getLogger().trace("end icon"); + this.popState(); + break; + case 10: + yy.getLogger().trace("Exploding node"); + this.begin("NODE"); + return 19; + case 11: + yy.getLogger().trace("Cloud"); + this.begin("NODE"); + return 19; + case 12: + yy.getLogger().trace("Explosion Bang"); + this.begin("NODE"); + return 19; + case 13: + yy.getLogger().trace("Cloud Bang"); + this.begin("NODE"); + return 19; + case 14: + this.begin("NODE"); + return 19; + case 15: + this.begin("NODE"); + return 19; + case 16: + this.begin("NODE"); + return 19; + case 17: + this.begin("NODE"); + return 19; + case 18: + return 13; + case 19: + return 22; + case 20: + return 11; + case 21: + yy.getLogger().trace("Starting NSTR"); + this.begin("NSTR"); + break; + case 22: + yy.getLogger().trace("description:", yy_.yytext); + return "NODE_DESCR"; + case 23: + this.popState(); + break; + case 24: + this.popState(); + yy.getLogger().trace("node end ))"); + return "NODE_DEND"; + case 25: + this.popState(); + yy.getLogger().trace("node end )"); + return "NODE_DEND"; + case 26: + this.popState(); + yy.getLogger().trace("node end ...", yy_.yytext); + return "NODE_DEND"; + case 27: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 28: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 29: + this.popState(); + yy.getLogger().trace("node end (-"); + return "NODE_DEND"; + case 30: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 31: + this.popState(); + yy.getLogger().trace("node end (("); + return "NODE_DEND"; + case 32: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + case 33: + yy.getLogger().trace("Long description:", yy_.yytext); + return 20; + } + }, + rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\-\)\{\}]+)/i, /^(?:$)/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i], + conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR": { "rules": [22, 23], "inclusive": false }, "NODE": { "rules": [21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } } + }; + return lexer2; + }(); + parser2.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser2; + parser2.Parser = Parser; + return new Parser(); +}(); +parser.parser = parser; +const mindmapParser = parser; +const sanitizeText = (text) => (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.n)(text, (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.g)()); +let nodes = []; +let cnt = 0; +let elements = {}; +const clear = () => { + nodes = []; + cnt = 0; + elements = {}; +}; +const getParent = function(level) { + for (let i = nodes.length - 1; i >= 0; i--) { + if (nodes[i].level < level) { + return nodes[i]; + } + } + return null; +}; +const getMindmap = () => { + return nodes.length > 0 ? nodes[0] : null; +}; +const addNode = (level, id, descr, type) => { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.info("addNode", level, id, descr, type); + const conf = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.g)(); + const node = { + id: cnt++, + nodeId: sanitizeText(id), + level, + descr: sanitizeText(descr), + type, + children: [], + width: (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.g)().mindmap.maxNodeWidth + }; + switch (node.type) { + case nodeType.ROUNDED_RECT: + node.padding = 2 * conf.mindmap.padding; + break; + case nodeType.RECT: + node.padding = 2 * conf.mindmap.padding; + break; + case nodeType.HEXAGON: + node.padding = 2 * conf.mindmap.padding; + break; + default: + node.padding = conf.mindmap.padding; + } + const parent = getParent(level); + if (parent) { + parent.children.push(node); + nodes.push(node); + } else { + if (nodes.length === 0) { + nodes.push(node); + } else { + let error = new Error( + 'There can be only one root. No parent could be found for ("' + node.descr + '")' + ); + error.hash = { + text: "branch " + name, + token: "branch " + name, + line: "1", + loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 }, + expected: ['"checkout ' + name + '"'] + }; + throw error; + } + } +}; +const nodeType = { + DEFAULT: 0, + NO_BORDER: 0, + ROUNDED_RECT: 1, + RECT: 2, + CIRCLE: 3, + CLOUD: 4, + BANG: 5, + HEXAGON: 6 +}; +const getType = (startStr, endStr) => { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.debug("In get type", startStr, endStr); + switch (startStr) { + case "[": + return nodeType.RECT; + case "(": + return endStr === ")" ? nodeType.ROUNDED_RECT : nodeType.CLOUD; + case "((": + return nodeType.CIRCLE; + case ")": + return nodeType.CLOUD; + case "))": + return nodeType.BANG; + case "{{": + return nodeType.HEXAGON; + default: + return nodeType.DEFAULT; + } +}; +const setElementForId = (id, element) => { + elements[id] = element; +}; +const decorateNode = (decoration) => { + const node = nodes[nodes.length - 1]; + if (decoration && decoration.icon) { + node.icon = sanitizeText(decoration.icon); + } + if (decoration && decoration.class) { + node.class = sanitizeText(decoration.class); + } +}; +const type2Str = (type) => { + switch (type) { + case nodeType.DEFAULT: + return "no-border"; + case nodeType.RECT: + return "rect"; + case nodeType.ROUNDED_RECT: + return "rounded-rect"; + case nodeType.CIRCLE: + return "circle"; + case nodeType.CLOUD: + return "cloud"; + case nodeType.BANG: + return "bang"; + case nodeType.HEXAGON: + return "hexgon"; + default: + return "no-border"; + } +}; +let parseError; +const setErrorHandler = (handler) => { + parseError = handler; +}; +const getLogger = () => _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l; +const getNodeById = (id) => nodes[id]; +const getElementById = (id) => elements[id]; +const mindmapDb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + addNode, + clear, + decorateNode, + getElementById, + getLogger, + getMindmap, + getNodeById, + getType, + nodeType, + get parseError() { + return parseError; + }, + sanitizeText, + setElementForId, + setErrorHandler, + type2Str +}, Symbol.toStringTag, { value: "Module" })); +const MAX_SECTIONS = 12; +function wrap(text, width) { + text.each(function() { + var text2 = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)(this), words = text2.text().split(/(\s+|
)/).reverse(), word, line = [], lineHeight = 1.1, y = text2.attr("y"), dy = parseFloat(text2.attr("dy")), tspan = text2.text(null).append("tspan").attr("x", 0).attr("y", y).attr("dy", dy + "em"); + for (let j = 0; j < words.length; j++) { + word = words[words.length - 1 - j]; + line.push(word); + tspan.text(line.join(" ").trim()); + if (tspan.node().getComputedTextLength() > width || word === "
") { + line.pop(); + tspan.text(line.join(" ").trim()); + if (word === "
") { + line = [""]; + } else { + line = [word]; + } + tspan = text2.append("tspan").attr("x", 0).attr("y", y).attr("dy", lineHeight + "em").text(word); + } + } + }); +} +const defaultBkg = function(elem, node, section) { + const rd = 5; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); + elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); +}; +const rectBkg = function(elem, node) { + elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("height", node.height).attr("width", node.width); +}; +const cloudBkg = function(elem, node) { + const w = node.width; + const h = node.height; + const r1 = 0.15 * w; + const r2 = 0.25 * w; + const r3 = 0.35 * w; + const r4 = 0.2 * w; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1} + a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1} + a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2} + + a${r1},${r1} 1 0,1 ${w * 0.15},${1 * h * 0.35} + a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${1 * h * 0.65} + + a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15} + a${r3},${r3} 1 0,1 ${-1 * w * 0.5},${0} + a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15} + + a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35} + a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65} + + H0 V0 Z` + ); +}; +const bangBkg = function(elem, node) { + const w = node.width; + const h = node.height; + const r = 0.15 * w; + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1} + a${r},${r} 1 0,0 ${w * 0.25},${0} + a${r},${r} 1 0,0 ${w * 0.25},${0} + a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1} + + a${r},${r} 1 0,0 ${w * 0.15},${1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${1 * h * 0.34} + a${r},${r} 1 0,0 ${-1 * w * 0.15},${1 * h * 0.33} + + a${r},${r} 1 0,0 ${-1 * w * 0.25},${h * 0.15} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${0} + a${r},${r} 1 0,0 ${-1 * w * 0.25},${-1 * h * 0.15} + + a${r},${r} 1 0,0 ${-1 * w * 0.1},${-1 * h * 0.33} + a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34} + a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33} + + H0 V0 Z` + ); +}; +const circleBkg = function(elem, node) { + elem.append("circle").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("r", node.width / 2); +}; +function insertPolygonShape(parent, w, h, points, node) { + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + (node.width - w) / 2 + ", " + h + ")"); +} +const hexagonBkg = function(elem, node) { + const h = node.height; + const f = 4; + const m = h / f; + const w = node.width - node.padding + 2 * m; + const points = [ + { x: m, y: 0 }, + { x: w - m, y: 0 }, + { x: w, y: -h / 2 }, + { x: w - m, y: -h }, + { x: m, y: -h }, + { x: 0, y: -h / 2 } + ]; + insertPolygonShape(elem, w, h, points, node); +}; +const roundedRectBkg = function(elem, node) { + elem.append("rect").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("height", node.height).attr("rx", node.padding).attr("ry", node.padding).attr("width", node.width); +}; +const drawNode = function(elem, node, fullSection, conf) { + const section = fullSection % (MAX_SECTIONS - 1); + const nodeElem = elem.append("g"); + node.section = section; + let sectionClass = "section-" + section; + if (section < 0) { + sectionClass += " section-root"; + } + nodeElem.attr("class", (node.class ? node.class + " " : "") + "mindmap-node " + sectionClass); + const bkgElem = nodeElem.append("g"); + const textElem = nodeElem.append("g"); + const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); + const bbox = txt.node().getBBox(); + const fontSize = conf.fontSize.replace ? conf.fontSize.replace("px", "") : conf.fontSize; + node.height = bbox.height + fontSize * 1.1 * 0.5 + node.padding; + node.width = bbox.width + 2 * node.padding; + if (node.icon) { + if (node.type === nodeType.CIRCLE) { + node.height += 50; + node.width += 50; + const icon = nodeElem.append("foreignObject").attr("height", "50px").attr("width", node.width).attr("style", "text-align: center;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); + textElem.attr( + "transform", + "translate(" + node.width / 2 + ", " + (node.height / 2 - 1.5 * node.padding) + ")" + ); + } else { + node.width += 50; + const orgHeight = node.height; + node.height = Math.max(orgHeight, 60); + const heightDiff = Math.abs(node.height - orgHeight); + const icon = nodeElem.append("foreignObject").attr("width", "60px").attr("height", node.height).attr("style", "text-align: center;margin-top:" + heightDiff / 2 + "px;"); + icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); + textElem.attr( + "transform", + "translate(" + (25 + node.width / 2) + ", " + (heightDiff / 2 + node.padding / 2) + ")" + ); + } + } else { + textElem.attr("transform", "translate(" + node.width / 2 + ", " + node.padding / 2 + ")"); + } + switch (node.type) { + case nodeType.DEFAULT: + defaultBkg(bkgElem, node, section); + break; + case nodeType.ROUNDED_RECT: + roundedRectBkg(bkgElem, node); + break; + case nodeType.RECT: + rectBkg(bkgElem, node); + break; + case nodeType.CIRCLE: + bkgElem.attr("transform", "translate(" + node.width / 2 + ", " + +node.height / 2 + ")"); + circleBkg(bkgElem, node); + break; + case nodeType.CLOUD: + cloudBkg(bkgElem, node); + break; + case nodeType.BANG: + bangBkg(bkgElem, node); + break; + case nodeType.HEXAGON: + hexagonBkg(bkgElem, node); + break; + } + setElementForId(node.id, nodeElem); + return node.height; +}; +const drawEdge = function drawEdge2(edgesElem, mindmap, parent, depth, fullSection) { + const section = fullSection % (MAX_SECTIONS - 1); + const sx = parent.x + parent.width / 2; + const sy = parent.y + parent.height / 2; + const ex = mindmap.x + mindmap.width / 2; + const ey = mindmap.y + mindmap.height / 2; + const mx = ex > sx ? sx + Math.abs(sx - ex) / 2 : sx - Math.abs(sx - ex) / 2; + const my = ey > sy ? sy + Math.abs(sy - ey) / 2 : sy - Math.abs(sy - ey) / 2; + const qx = ex > sx ? Math.abs(sx - mx) / 2 + sx : -Math.abs(sx - mx) / 2 + sx; + const qy = ey > sy ? Math.abs(sy - my) / 2 + sy : -Math.abs(sy - my) / 2 + sy; + edgesElem.append("path").attr( + "d", + parent.direction === "TB" || parent.direction === "BT" ? `M${sx},${sy} Q${sx},${qy} ${mx},${my} T${ex},${ey}` : `M${sx},${sy} Q${qx},${sy} ${mx},${my} T${ex},${ey}` + ).attr("class", "edge section-edge-" + section + " edge-depth-" + depth); +}; +const positionNode = function(node) { + const nodeElem = getElementById(node.id); + const x = node.x || 0; + const y = node.y || 0; + nodeElem.attr("transform", "translate(" + x + "," + y + ")"); +}; +const svgDraw = { drawNode, positionNode, drawEdge }; +cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1___default().use((cytoscape_cose_bilkent__WEBPACK_IMPORTED_MODULE_2___default())); +function drawNodes(svg, mindmap, section, conf) { + svgDraw.drawNode(svg, mindmap, section, conf); + if (mindmap.children) { + mindmap.children.forEach((child, index) => { + drawNodes(svg, child, section < 0 ? index : section, conf); + }); + } +} +function drawEdges(edgesEl, cy) { + cy.edges().map((edge, id) => { + const data = edge.data(); + if (edge[0]._private.bodyBounds) { + const bounds = edge[0]._private.rscratch; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.trace("Edge: ", id, data); + edgesEl.insert("path").attr( + "d", + `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} ` + ).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth); + } + }); +} +function addNodes(mindmap, cy, conf, level) { + cy.add({ + group: "nodes", + data: { + id: mindmap.id, + labelText: mindmap.descr, + height: mindmap.height, + width: mindmap.width, + level, + nodeId: mindmap.id, + padding: mindmap.padding, + type: mindmap.type + }, + position: { + x: mindmap.x, + y: mindmap.y + } + }); + if (mindmap.children) { + mindmap.children.forEach((child) => { + addNodes(child, cy, conf, level + 1); + cy.add({ + group: "edges", + data: { + id: `${mindmap.id}_${child.id}`, + source: mindmap.id, + target: child.id, + depth: level, + section: child.section + } + }); + }); + } +} +function layoutMindmap(node, conf) { + return new Promise((resolve) => { + const renderEl = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)("body").append("div").attr("id", "cy").attr("style", "display:none"); + const cy = cytoscape_dist_cytoscape_umd_js__WEBPACK_IMPORTED_MODULE_1___default()({ + container: document.getElementById("cy"), + // container to render in + style: [ + { + selector: "edge", + style: { + "curve-style": "bezier" + } + } + ] + }); + renderEl.remove(); + addNodes(node, cy, conf, 0); + cy.nodes().forEach(function(n) { + n.layoutDimensions = () => { + const data = n.data(); + return { w: data.width, h: data.height }; + }; + }); + cy.layout({ + name: "cose-bilkent", + quality: "proof", + // headless: true, + styleEnabled: false, + animate: false + }).run(); + cy.ready((e) => { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.info("Ready", e); + resolve(cy); + }); + }); +} +function positionNodes(cy) { + cy.nodes().map((node, id) => { + const data = node.data(); + data.x = node.position().x; + data.y = node.position().y; + svgDraw.positionNode(data); + const el = getElementById(data.nodeId); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.info("Id:", id, "Position: (", node.position().x, ", ", node.position().y, ")", data); + el.attr( + "transform", + `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})` + ); + el.attr("attr", `apa-${id})`); + }); +} +const draw = async (text, id, version, diagObj) => { + const conf = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.g)(); + diagObj.db.clear(); + diagObj.parser.parse(text); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.l.debug("Renering info diagram\n" + text); + const securityLevel = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.g)().securityLevel; + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)("body"); + const svg = root.select("#" + id); + svg.append("g"); + const mm = diagObj.db.getMindmap(); + const edgesElem = svg.append("g"); + edgesElem.attr("class", "mindmap-edges"); + const nodesElem = svg.append("g"); + nodesElem.attr("class", "mindmap-nodes"); + drawNodes(nodesElem, mm, -1, conf); + const cy = await layoutMindmap(mm, conf); + drawEdges(edgesElem, cy); + positionNodes(cy); + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_13__.s)(void 0, svg, conf.mindmap.padding, conf.mindmap.useMaxWidth); +}; +const mindmapRenderer = { + draw +}; +const genSections = (options) => { + let sections = ""; + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i]; + if ((0,khroma__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .c)(options["lineColor" + i])) { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .c)(options["lineColor" + i], 20); + } else { + options["lineColor" + i] = (0,khroma__WEBPACK_IMPORTED_MODULE_16__/* ["default"] */ .c)(options["lineColor" + i], 20); + } + } + for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) { + const sw = "" + (17 - 3 * i); + sections += ` + .section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path { + fill: ${options["cScale" + i]}; + } + .section-${i - 1} text { + fill: ${options["cScaleLabel" + i]}; + } + .node-icon-${i - 1} { + font-size: 40px; + color: ${options["cScaleLabel" + i]}; + } + .section-edge-${i - 1}{ + stroke: ${options["cScale" + i]}; + } + .edge-depth-${i - 1}{ + stroke-width: ${sw}; + } + .section-${i - 1} line { + stroke: ${options["cScaleInv" + i]} ; + stroke-width: 3; + } + + .disabled, .disabled circle, .disabled text { + fill: lightgray; + } + .disabled text { + fill: #efefef; + } + `; + } + return sections; +}; +const getStyles = (options) => ` + .edge { + stroke-width: 3; + } + ${genSections(options)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${options.git0}; + } + .section-root text { + fill: ${options.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } +`; +const mindmapStyles = getStyles; +const diagram = { + db: mindmapDb, + renderer: mindmapRenderer, + parser: mindmapParser, + styles: mindmapStyles +}; + +//# sourceMappingURL=mindmap-definition-44684416.js.map + + +/***/ }), + +/***/ 34176: +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, { + c: () => (/* binding */ is_dark) +}); + +// EXTERNAL MODULE: ./node_modules/khroma/dist/utils/index.js + 3 modules +var utils = __webpack_require__(89612); +// EXTERNAL MODULE: ./node_modules/khroma/dist/color/index.js + 4 modules +var dist_color = __webpack_require__(72120); +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/luminance.js +/* IMPORT */ + + +/* MAIN */ +//SOURCE: https://planetcalc.com/7779 +const luminance = (color) => { + const { r, g, b } = dist_color/* default */.c.parse(color); + const luminance = .2126 * utils/* default */.c.channel.toLinear(r) + .7152 * utils/* default */.c.channel.toLinear(g) + .0722 * utils/* default */.c.channel.toLinear(b); + return utils/* default */.c.lang.round(luminance); +}; +/* EXPORT */ +/* harmony default export */ const methods_luminance = (luminance); + +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/is_light.js +/* IMPORT */ + +/* MAIN */ +const isLight = (color) => { + return methods_luminance(color) >= .5; +}; +/* EXPORT */ +/* harmony default export */ const is_light = (isLight); + +;// CONCATENATED MODULE: ./node_modules/khroma/dist/methods/is_dark.js +/* IMPORT */ + +/* MAIN */ +const isDark = (color) => { + return !is_light(color); +}; +/* EXPORT */ +/* harmony default export */ const is_dark = (isDark); + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/592.9a184a6c.js b/assets/js/592.9a184a6c.js new file mode 100644 index 00000000..ccd27b4d --- /dev/null +++ b/assets/js/592.9a184a6c.js @@ -0,0 +1,2 @@ +/*! For license information please see 592.9a184a6c.js.LICENSE.txt */ +(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[592],{75352:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n,r=this.getChild().getNodes(),i=0;i0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},m.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},m.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1)for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(c.WORLD_CENTER_X-o.x/2,c.WORLD_CENTER_Y-o.y/2))},m.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);m.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var y=v[0];v.splice(0,1);var b=c.indexOf(y);b>=0&&c.splice(b,1),g--,h--}d=null!=t?(c.indexOf(v[0])+1)%g:0;for(var x=Math.abs(r-n)/h,w=d;p!=h;w=++w%g){var E=c[w].getOtherEnd(e);if(E!=t){var T=(n+p*x)%360,_=(T+x)%360;m.branchRadialLayout(E,e,T,_,i+a,a),p++}}},m.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},m.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},m.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),l=i.getChild();l.add(a);for(var u=0;u=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},m.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach((function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)}))},m.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];var n=e.getChild();if(null==n)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[t]=!0,!0},m.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;rl&&(l=c.rect.height)}n+=l+e.verticalPadding}},m.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach((function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height}))},m.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};e.sort((function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},m.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},m.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a,o,s=0;return e.rowHeight[r]0&&(s=n+e.verticalPadding-e.rowHeight[r]),a=e.width-i>=t+e.horizontalPadding?(e.height+s)/(i+t+e.horizontalPadding):(e.height+s)/e.width,s=n+e.verticalPadding,(o=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var c=i;c<=a;c++)l[0]+=this.grid[c][o-1].length+this.grid[c][o].length-1;if(a0)for(c=o;c<=s;c++)l[3]+=this.grid[i-1][c].length+this.grid[i][c].length-1;for(var h,d,p=g.MAX_VALUE,f=0;f0&&(o=n.getGraphManager().add(n.newGraph(),a),this.processChildrenList(o,h,n))}},h.prototype.stop=function(){return this.stopped=!0,this};var p=function(e){e("layout","cose-bilkent",h)};"undefined"!=typeof cytoscape&&p(cytoscape),e.exports=p}])},e.exports=r(n(75352))},65500:function(e,t,n){e.exports=function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nt?1:0},Z=function(e,t){return-1*K(e,t)},Q=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+H+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(i=parseFloat(c[3]))<0||i>100)return;if(i/=100,void 0!==(a=c[4])&&((a=parseFloat(a))<0||a>1))return;if(0===r)o=s=l=Math.round(255*i);else{var h=i<.5?i*(1+r):i+r-i*r,d=2*i-h;o=Math.round(255*u(d,h,n+1/3)),s=Math.round(255*u(d,h,n)),l=Math.round(255*u(d,h,n-1/3))}t=[o,s,l,a]}return t},te=function(e){var t,n=new RegExp("^"+U+"$").exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var a=n[i];if("%"===a[a.length-1]&&(r[i]=!0),a=parseFloat(a),r[i]&&(a=a/100*255),a<0||a>255)return;t.push(Math.floor(a))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t},ne=function(e){return ie[e.toLowerCase()]},re=function(e){return(w(e)?e:null)||ne(e)||J(e)||te(e)||ee(e)},ie={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},ae=function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i=t||n<0||h&&e-u>=a}function y(){var e=ge();if(v(e))return m(e);s=setTimeout(y,f(e))}function m(e){return s=void 0,d&&r?p(e):(r=i=void 0,o)}function b(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0}function x(){return void 0===s?o:m(ge())}function w(){var e=ge(),n=v(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return g(l);if(h)return clearTimeout(s),s=setTimeout(y,t),p(l)}return void 0===s&&(s=setTimeout(y,t)),o}return t=qe(t)||0,le(n)&&(c=!!n.leading,a=(h="maxWait"in n)?$e(qe(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),w.cancel=b,w.flush=x,w}var Qe=Ze,Je=d?d.performance:null,et=Je&&Je.now?function(){return Je.now()}:function(){return Date.now()},tt=function(){if(d){if(d.requestAnimationFrame)return function(e){d.requestAnimationFrame(e)};if(d.mozRequestAnimationFrame)return function(e){d.mozRequestAnimationFrame(e)};if(d.webkitRequestAnimationFrame)return function(e){d.webkitRequestAnimationFrame(e)};if(d.msRequestAnimationFrame)return function(e){d.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(et())}),1e3/60)}}(),nt=function(e){return tt(e)},rt=et,it=9261,at=65599,ot=5381,st=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:it;!(t=e.next()).done;)n=n*at+t.value|0;return n},lt=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:it)*at+e|0},ut=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ot;return(t<<5)+t+e|0},ct=function(e,t){return 2097152*e+t},ht=function(e){return 2097152*e[0]+e[1]},dt=function(e,t){return[lt(e[0],t[0]),ut(e[1],t[1])]},pt=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return st({next:function(){return r=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},Rt=function(e){e.splice(0,e.length)},Bt=function(e,t){for(var n=0;n2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&S(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new Ut,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),t.renderedPosition){var a=t.renderedPosition,o=e.pan(),s=e.zoom();i.position={x:(a.x-o.x)/s,y:(a.y-o.y)/s}}var l=[];w(t.classes)?l=t.classes:b(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;ut?1:0},u=function(e,t,i,a,o){var s;if(null==i&&(i=0),null==o&&(o=n),i<0)throw new Error("lo must be non-negative");for(null==a&&(a=e.length);in;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;af;0<=f?++d:--d)v.push(a(e,r));return v},g=function(e,t,r,i){var a,o,s;for(null==i&&(i=n),a=e[r];r>t&&i(a,o=e[s=r-1>>1])<0;)e[r]=o,r=s;return e[r]=a},f=function(e,t,r){var i,a,o,s,l;for(null==r&&(r=n),a=e.length,l=t,o=e[t],i=2*t+1;i0;){var T=y.pop(),_=f(T),D=T.id();if(h[D]=_,_!==1/0)for(var C=T.neighborhood().intersect(p),N=0;N0)for(n.unshift(t);c[i];){var a=c[i];n.unshift(a.edge),n.unshift(a.node),i=(r=a.node).id()}return o.spawn(n)}}}},Qt={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,i=n.length,a=new Array(i),o=n,s=function(e){for(var t=0;t0;){if(x(),E++,u===h){for(var T=[],_=i,D=h,C=m[D];T.unshift(_),null!=C&&T.unshift(C),null!=(_=y[D]);)C=m[D=_.id()];return{found:!0,distance:d[u],path:this.spawn(T),steps:E}}g[u]=!0;for(var N=l._private.edges,A=0;AN&&(p[C]=N,y[C]=D,m[C]=w),!i){var A=D*u+_;!i&&p[A]>N&&(p[A]=N,y[A]=_,m[A]=w)}}}for(var L=0;L1&&void 0!==arguments[1]?arguments[1]:a,r=[],i=m(e);;){if(null==i)return t.spawn();var o=y(i),l=o.edge,u=o.pred;if(r.unshift(i[0]),i.same(n)&&r.length>0)break;null!=l&&r.unshift(l),i=u}return s.spawn(r)},E=0;E=0;u--){var c=l[u],h=c[1],d=c[2];(t[h]===o&&t[d]===s||t[h]===s&&t[d]===o)&&l.splice(u,1)}for(var p=0;pr;){var i=Math.floor(Math.random()*t.length);t=sn(i,e,t),n--}return t},un={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var i=n.length,a=r.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/on);if(!(i<2)){for(var l=[],u=0;u1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,i=0,a=t;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var a=0,o=e.length-1;o>=0;o--){var s=e[o];i?isFinite(s)||(e[o]=-1/0,a++):e.splice(o,1)}r&&e.sort((function(e,t){return e-t}));var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+a]:(e[u-1+a]+e[u+a])/2},mn=function(e){return Math.PI*e/180},bn=function(e,t){return Math.atan2(t,e)-Math.PI/2},xn=Math.log2||function(e){return Math.log(e)/Math.log(2)},wn=function(e){return e>0?1:e<0?-1:0},En=function(e,t){return Math.sqrt(Tn(e,t))},Tn=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},_n=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Sn=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},On=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},kn=function(e,t,n){return{x1:e.x1+t,x2:e.x2+t,y1:e.y1+n,y2:e.y2+n,w:e.w,h:e.h}},In=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},Mn=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},Pn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Rn=function(e){var t,n,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===a.length)t=n=r=i=a[0];else if(2===a.length)t=r=a[0],i=n=a[1];else if(4===a.length){var s=o(a,4);t=s[0],n=s[1],r=s[2],i=s[3]}return e.x1-=i,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Bn=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},Fn=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},zn=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},Gn=function(e,t){return zn(e,t.x,t.y)},Yn=function(e,t){return zn(e,t.x1,t.y1)&&zn(e,t.x2,t.y2)},Xn=function(e,t,n,r,i,a,o){var s,l=hr(i,a),u=i/2,c=a/2,h=r-c-o;if((s=ir(e,t,n,r,n-u+l-o,h,n+u-l+o,h,!1)).length>0)return s;var d=n+u+o;if((s=ir(e,t,n,r,d,r-c+l-o,d,r+c-l+o,!1)).length>0)return s;var p=r+c+o;if((s=ir(e,t,n,r,n-u+l-o,p,n+u-l+o,p,!1)).length>0)return s;var g,f=n-u-o;if((s=ir(e,t,n,r,f,r-c+l-o,f,r+c-l+o,!1)).length>0)return s;var v=n-u+l,y=r-c+l;if((g=nr(e,t,n,r,v,y,l+o)).length>0&&g[0]<=v&&g[1]<=y)return[g[0],g[1]];var m=n+u-l,b=r-c+l;if((g=nr(e,t,n,r,m,b,l+o)).length>0&&g[0]>=m&&g[1]<=b)return[g[0],g[1]];var x=n+u-l,w=r+c-l;if((g=nr(e,t,n,r,x,w,l+o)).length>0&&g[0]>=x&&g[1]>=w)return[g[0],g[1]];var E=n-u+l,T=r+c-l;return(g=nr(e,t,n,r,E,T,l+o)).length>0&&g[0]<=E&&g[1]>=T?[g[0],g[1]]:[]},Vn=function(e,t,n,r,i,a,o){var s=o,l=Math.min(n,i),u=Math.max(n,i),c=Math.min(r,a),h=Math.max(r,a);return l-s<=e&&e<=u+s&&c-s<=t&&t<=h+s},Un=function(e,t,n,r,i,a,o,s,l){var u={x1:Math.min(n,o,i)-l,x2:Math.max(n,o,i)+l,y1:Math.min(r,s,a)-l,y2:Math.max(r,s,a)+l};return!(eu.x2||tu.y2)},jn=function(e,t,n,r){var i=t*t-4*e*(n-=r);if(i<0)return[];var a=Math.sqrt(i),o=2*e;return[(-t+a)/o,(-t-a)/o]},Hn=function(e,t,n,r,i){var a,o,s,l,u,c,h,d;return 0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),a=(o=(3*n-t*t)/9)*o*o+(s/=54)*s,i[1]=0,h=t/3,a>0?(u=(u=s+Math.sqrt(a))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(a))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+u+c,h+=(u+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+u)/2,i[3]=h,void(i[5]=-h)):(i[5]=i[3]=0,0===a?(d=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),i[0]=2*d-h,void(i[4]=i[2]=-(d+h))):(l=(o=-o)*o*o,l=Math.acos(s/Math.sqrt(l)),d=2*Math.sqrt(o),i[0]=-h+d*Math.cos(l/3),i[2]=-h+d*Math.cos((l+2*Math.PI)/3),void(i[4]=-h+d*Math.cos((l+4*Math.PI)/3))))},qn=function(e,t,n,r,i,a,o,s){var l=[];Hn(1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+r*r-4*r*a+2*r*s+4*a*a-4*a*s+s*s,9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*r*a-3*r*r-3*r*s-6*a*a+3*a*s,3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*r*r-6*r*a+r*s-r*t+2*a*a+2*a*t-s*t,1*n*i-n*n+n*e-i*e+r*a-r*r+r*t-a*t,l);for(var u=1e-7,c=[],h=0;h<6;h+=2)Math.abs(l[h+1])=0&&l[h]<=1&&c.push(l[h]);c.push(1),c.push(0);for(var d,p,g,f=-1,v=0;v=0?gl?(e-i)*(e-i)+(t-a)*(t-a):u-h},$n=function(e,t,n){for(var r,i,a,o,s=0,l=0;l=e&&e>=a||r<=e&&e<=a))continue;(e-r)/(a-r)*(o-i)+i>t&&s++}return s%2!=0},Kn=function(e,t,n,r,i,a,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var h,d=Math.cos(-u),p=Math.sin(-u),g=0;g0){var f=Jn(c,-l);h=Qn(f)}else h=c;return $n(e,t,h)},Zn=function(e,t,n,r,i,a,o){for(var s=new Array(n.length),l=a/2,u=o/2,c=dr(a,o),h=c*c,d=0;d=0&&g<=1&&v.push(g),f>=0&&f<=1&&v.push(f),0===v.length)return[];var y=v[0]*s[0]+e,m=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[y,m]:[y,m,v[1]*s[0]+e,v[1]*s[1]+t]:[y,m]},rr=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},ir=function(e,t,n,r,i,a,o,s,l){var u=e-i,c=n-e,h=o-i,d=t-a,p=r-t,g=s-a,f=h*d-g*u,v=c*d-p*u,y=g*c-h*p;if(0!==y){var m=f/y,b=v/y,x=.001,w=0-x,E=1+x;return w<=m&&m<=E&&w<=b&&b<=E||l?[e+m*c,t+m*p]:[]}return 0===f||0===v?rr(e,n,o)===o?[o,s]:rr(e,n,i)===i?[i,a]:rr(i,o,n)===n?[n,r]:[]:[]},ar=function(e,t,n,r,i,a,o,s){var l,u,c,h,d,p,g=[],f=new Array(n.length),v=!0;if(null==a&&(v=!1),v){for(var y=0;y0){var m=Jn(f,-s);u=Qn(m)}else u=f}else u=n;for(var b=0;b2){for(var A=[u[0],u[1]],L=Math.pow(A[0]-e,2)+Math.pow(A[1]-t,2),S=1;Su&&(u=t)},get:function(e){return l[e]}},h=0;h0?m.edgesTo(y)[0]:y.edgesTo(m)[0];var x=r(b);y=y.id(),h[y]>h[f]+x&&(h[y]=h[f]+x,d.nodes.indexOf(y)<0?d.push(y):d.updateItem(y),u[y]=0,l[y]=[]),h[y]==h[f]+x&&(u[y]=u[y]+u[f],l[y].push(f))}else for(var w=0;w0;){for(var D=n.pop(),C=0;C0&&o.push(n[s]);0!==o.length&&i.push(r.collection(o))}return i},Mr=function(e,t){for(var n=0;n5&&void 0!==arguments[5]?arguments[5]:Fr,o=r,s=0;s=2?Ur(e,t,n,0,Yr,Xr):Ur(e,t,n,0,Gr)},squaredEuclidean:function(e,t,n){return Ur(e,t,n,0,Yr)},manhattan:function(e,t,n){return Ur(e,t,n,0,Gr)},max:function(e,t,n){return Ur(e,t,n,-1/0,Vr)}};function Hr(e,t,n,r,i,a){var o;return o=x(e)?e:jr[e]||jr.euclidean,0===t&&x(e)?o(i,a):o(t,n,r,i,a)}jr["squared-euclidean"]=jr.squaredEuclidean,jr.squaredeuclidean=jr.squaredEuclidean;var qr=Mt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Wr=function(e){return qr(e)},$r=function(e,t,n,r,i){var a="kMedoids"!==i?function(e){return n[e]}:function(e){return r[e](n)},o=function(e){return r[e](t)},s=n,l=t;return Hr(e,r.length,a,o,s,l)},Kr=function(e,t,n){for(var r=n.length,i=new Array(r),a=new Array(r),o=new Array(t),s=null,l=0;ln)return!1;return!0},ti=function(e,t,n){for(var r=0;ri&&(i=t[l][u],a=u);o[a].push(e[l])}for(var c=0;c=i.threshold||"dendrogram"===i.mode&&1===e.length)return!1;var p,g=t[o],f=t[r[o]];p="dendrogram"===i.mode?{left:g,right:f,key:g.key}:{value:g.value.concat(f.value),key:g.key},e[g.index]=p,e.splice(f.index,1),t[g.key]=p;for(var v=0;vn[f.key][y.key]&&(a=n[f.key][y.key])):"max"===i.linkage?(a=n[g.key][y.key],n[g.key][y.key]0&&r.push(i);return r},Ti=function(e,t,n){for(var r=[],i=0;io&&(a=l,o=t[i*e+l])}a>0&&r.push(a)}for(var u=0;ul&&(s=u,l=c)}n[i]=a[s]}return r=Ti(e,t,n)},Di=function(e){for(var t,n,r,i,a,o,s=this.cy(),l=this.nodes(),u=bi(e),c={},h=0;h=C?(N=C,C=L,A=S):L>N&&(N=L);for(var O=0;O0?1:0;T[E%u.minIterations*t+B]=F,R+=F}if(R>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var z=0,G=0;G1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&c[t].push(e.id())}))}else h[t]=[void 0,e.target().id()]})):l.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach((function(e){return c[t].push(e.id())}))):h[t]=[e.source().id(),e.target().id()]}));var d={found:!1,trail:void 0};if(u)return d;if(r&&n)if(s){if(i&&r!=i)return d;i=r}else{if(i&&r!=i&&n!=i)return d;i||(i=r)}else i||(i=l[0].id());var p=function(e){for(var t,n,r,i=e,a=[e];c[i].length;)t=c[i].shift(),n=h[t][0],i!=(r=h[t][1])?(c[r]=c[r].filter((function(e){return e!=t})),i=r):s||i==n||(c[n]=c[n].filter((function(e){return e!=t})),i=n),a.unshift(t),a.unshift(i);return a},g=[],f=[];for(f=p(i);1!=f.length;)0==c[f[0]].length?(g.unshift(l.getElementById(f.shift())),g.unshift(l.getElementById(f.shift()))):f=p(f.shift()).concat(f);for(var v in g.unshift(l.getElementById(f.shift())),c)if(c[v].length)return d;return d.found=!0,d.trail=this.spawn(g,!0),d}},Li=function(){var e=this,t={},n=0,r=0,i=[],a=[],o={},s=function(n,r){for(var o=a.length-1,s=[],l=e.spawn();a[o].x!=n||a[o].y!=r;)s.push(a.pop().edge),o--;s.push(a.pop().edge),s.forEach((function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach((function(n){var r=n.id(),i=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(i.filter((function(e){return e.isLoop()}))):l.merge(i)}))})),i.push(l)},l=function l(u,c,h){u===h&&(r+=1),t[c]={id:n,low:n++,cutVertex:!1};var d,p,g,f,v=e.getElementById(c).connectedEdges().intersection(e);0===v.size()?i.push(e.spawn(e.getElementById(c))):v.forEach((function(e){d=e.source().id(),p=e.target().id(),(g=d===c?p:d)!==h&&(f=e.id(),o[f]||(o[f]=!0,a.push({x:c,y:g,edge:e})),g in t?t[c].low=Math.min(t[c].low,t[g].id):(l(u,g,c),t[c].low=Math.min(t[c].low,t[g].low),t[c].id<=t[g].low&&(t[c].cutVertex=!0,s(c,g))))}))};e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||(r=0,l(n,n),t[n].cutVertex=r>1)}}));var u=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(u),components:i}},Si=function(){var e=this,t={},n=0,r=[],i=[],a=e.spawn(e),o=function o(s){if(i.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var l=e.spawn();;){var u=i.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),h=l.merge(c);r.push(h),a=a.difference(h)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||o(n)}})),{cut:a,components:r}},Oi={};[qt,Zt,Qt,en,nn,an,un,yr,br,wr,Tr,Br,li,yi,Ci,Ai,{hopcroftTarjanBiconnected:Li,htbc:Li,htb:Li,hopcroftTarjanBiconnectedComponents:Li},{tarjanStronglyConnected:Si,tsc:Si,tscc:Si,tarjanStronglyConnectedComponents:Si}].forEach((function(e){Q(Oi,e)}));var ki=0,Ii=1,Mi=2,Pi=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=ki,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};Pi.prototype={fulfill:function(e){return Ri(this,Ii,"fulfillValue",e)},reject:function(e){return Ri(this,Mi,"rejectReason",e)},then:function(e,t){var n=this,r=new Pi;return n.onFulfilled.push(zi(e,r,"fulfill")),n.onRejected.push(zi(t,r,"reject")),Bi(n),r.proxy}};var Ri=function(e,t,n,r){return e.state===ki&&(e.state=t,e[n]=r,Bi(e)),e},Bi=function(e){e.state===Ii?Fi(e,"onFulfilled",e.fulfillValue):e.state===Mi&&Fi(e,"onRejected",e.rejectReason)},Fi=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1}var Qa=Za;function Ja(e,t){var n=this.__data__,r=ja(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var eo=Ja;function to(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){w(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,i=[],a=0,o=n.length;a0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};gs.className=gs.classNames=gs.classes;var fs={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:V,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};fs.variable="(?:[\\w-.]|(?:\\\\"+fs.metaChar+"))+",fs.className="(?:[\\w-]|(?:\\\\"+fs.metaChar+"))+",fs.value=fs.string+"|"+fs.number,fs.id=fs.variable,function(){var e,t,n;for(e=fs.comparatorOp.split("|"),n=0;n=0||"="!==t&&(fs.comparatorOp+="|\\!"+t)}();var vs=function(){return{checks:[]}},ys={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},ms=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return Z(e.selector,t.selector)})),bs=function(){for(var e,t={},n=0;n0&&u.edgeCount>0)return Nt("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return Nt("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&Nt("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return b(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(r,a){var o=r.type,s=r.value;switch(o){case ys.GROUP:var l=e(s);return l.substring(0,l.length-1);case ys.DATA_COMPARE:var u=r.field,c=r.operator;return"["+u+n(e(c))+t(s)+"]";case ys.DATA_BOOL:var h=r.operator,d=r.field;return"["+e(h)+d+"]";case ys.DATA_EXIST:return"["+r.field+"]";case ys.META_COMPARE:var p=r.operator;return"[["+r.field+n(e(p))+t(s)+"]]";case ys.STATE:return s;case ys.ID:return"#"+s;case ys.CLASS:return"."+s;case ys.PARENT:case ys.CHILD:return i(r.parent,a)+n(">")+i(r.child,a);case ys.ANCESTOR:case ys.DESCENDANT:return i(r.ancestor,a)+" "+i(r.descendant,a);case ys.COMPOUND_SPLIT:var g=i(r.left,a),f=i(r.subject,a),v=i(r.right,a);return g+(g.length>0?" ":"")+f+v;case ys.TRUE:return""}},i=function(e,t){return e.checks.reduce((function(n,i,a){return n+(t===e&&0===a?"$":"")+r(i,t)}),"")},a="",o=0;o1&&o=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(i=o||s?""+e:"",a=""+n),u&&(e=i=i.toLowerCase(),n=a=a.toLowerCase()),t){case"*=":r=i.indexOf(a)>=0;break;case"$=":r=i.indexOf(a,i.length-a.length)>=0;break;case"^=":r=0===i.indexOf(a);break;case"=":r=e===n;break;case">":h=!0,r=e>n;break;case">=":h=!0,r=e>=n;break;case"<":h=!0,r=e0;){var u=i.shift();t(u),a.add(u.id()),o&&r(i,a,u)}return e}function Us(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1],Us)},Xs.forEachUp=function(e){return Vs(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],js)},Xs.forEachUpAndDown=function(e){return Vs(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Hs)},Xs.ancestors=Xs.parents,(zs=Gs={data:ds.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:ds.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:ds.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ds.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:ds.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:ds.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=zs.data,zs.removeAttr=zs.removeData;var qs,Ws,$s=Gs,Ks={};function Zs(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],a=i._private.edges,o=0;ot})),minIndegree:Qs("indegree",(function(e,t){return et})),minOutdegree:Qs("outdegree",(function(e,t){return et}))}),Q(Ks,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=u;u&&(l=l[0]);var h=c?l.position():{x:0,y:0};return i={x:s.x-h.x,y:s.y-h.y},void 0===e?i:i[e]}for(var d=0;d0,v=f;f&&(g=g[0]);var y=v?g.position():{x:0,y:0};void 0!==t?p.position(e,t+y[e]):void 0!==i&&p.position({x:i.x+y.x,y:i.y+y.y})}}else if(!a)return;return this}}).modelPosition=qs.point=qs.position,qs.modelPositions=qs.points=qs.positions,qs.renderedPoint=qs.renderedPosition,qs.relativePoint=qs.relativePosition;var tl,nl,rl=Ws;tl=nl={},nl.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),a=t.x1*r+i.x,o=t.x2*r+i.x,s=t.y1*r+i.y,l=t.y2*r+i.y;return{x1:a,x2:o,y1:s,y2:l,w:o-a,h:l-s}},nl.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},nl.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,i={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},a=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==a.w&&0!==a.h||((a={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-a.w/2,a.x2=o.x+a.w/2,a.y1=o.y-a.h/2,a.y2=o.y+a.h/2);var s=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var l=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(l=100*l/i.width.val);var u=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(u=100*u/i.height.val);var c=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(c=100*c/i.height.val);var h=y(i.width.val-a.w,s,l),d=h.biasDiff,p=h.biasComplementDiff,g=y(i.height.val-a.h,u,c),f=g.biasDiff,v=g.biasComplementDiff;t.autoPadding=m(a.w,a.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(a.w,i.width.val),o.x=(-d+a.x1+a.x2+p)/2,t.autoHeight=Math.max(a.h,i.height.val),o.y=(-f+a.y1+a.y2+v)/2}function y(e,t,n){var r=0,i=0,a=t+n;return e>0&&a>0&&(r=t/a*e,i=n/a*e),{biasDiff:r,biasComplementDiff:i}}function m(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},ol=function(e,t){return null==t?e:al(e,t.x1,t.y1,t.x2,t.y2)},sl=function(e,t,n){return Ft(e,t,n)},ll=function(e,t,n){if(!t.cy().headless()){var r,i,a=t._private,o=a.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,i=o.srcY):"target"===n?(r=o.tgtX,i=o.tgtY):(r=o.midX,i=o.midY);var l=a.arrowBounds=a.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=i-s,u.x2=r+s,u.y2=i+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,Pn(u,1),al(e,u.x1,u.y1,u.x2,u.y2)}}},ul=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var i=t._private,a=i.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),h=t.pstyle("text-valign"),d=sl(a,"labelWidth",n),p=sl(a,"labelHeight",n),g=sl(a,"labelX",n),f=sl(a,"labelY",n),v=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,T=2,_=p,D=d,C=D/2,N=_/2;if(m)o=g-C,s=g+C,l=f-N,u=f+N;else{switch(c.value){case"left":o=g-D,s=g;break;case"center":o=g-C,s=g+C;break;case"right":o=g,s=g+D}switch(h.value){case"top":l=f-_,u=f;break;case"center":l=f-N,u=f+N;break;case"bottom":l=f,u=f+_}}o+=v-Math.max(x,w)-E-T,s+=v+Math.max(x,w)+E+T,l+=y-Math.max(x,w)-E-T,u+=y+Math.max(x,w)+E+T;var A=n||"main",L=i.labelBounds,S=L[A]=L[A]||{};S.x1=o,S.y1=l,S.x2=s,S.y2=u,S.w=s-o,S.h=u-l;var O=m&&"autorotate"===b.strValue,k=null!=b.pfValue&&0!==b.pfValue;if(O||k){var I=O?sl(i.rstyle,"labelAngle",n):b.pfValue,M=Math.cos(I),P=Math.sin(I),R=(o+s)/2,B=(l+u)/2;if(!m){switch(c.value){case"left":R=s;break;case"right":R=o}switch(h.value){case"top":B=u;break;case"bottom":B=l}}var F=function(e,t){return{x:(e-=R)*M-(t-=B)*P+R,y:e*P+t*M+B}},z=F(o,l),G=F(o,u),Y=F(s,l),X=F(s,u);o=Math.min(z.x,G.x,Y.x,X.x),s=Math.max(z.x,G.x,Y.x,X.x),l=Math.min(z.y,G.y,Y.y,X.y),u=Math.max(z.y,G.y,Y.y,X.y)}var V=A+"Rot",U=L[V]=L[V]||{};U.x1=o,U.y1=l,U.x2=s,U.y2=u,U.w=s-o,U.h=u-l,al(e,o,l,s,u),al(i.labelBounds.all,o,l,s,u)}return e}},cl=function(e,t){if(!t.cy().headless()){var n=t.pstyle("outline-opacity").value,r=t.pstyle("outline-width").value;if(n>0&&r>0){var i=t.pstyle("outline-offset").value,a=t.pstyle("shape").value,o=r+i,s=(e.w+2*o)/e.w,l=(e.h+2*o)/e.h,u=0,c=0;["diamond","pentagon","round-triangle"].includes(a)?(s=(e.w+2.4*o)/e.w,c=-o/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(a)?s=(e.w+2.4*o)/e.w:"star"===a?(s=(e.w+2.8*o)/e.w,l=(e.h+2.6*o)/e.h,c=-o/3.8):"triangle"===a?(s=(e.w+2.8*o)/e.w,l=(e.h+2.4*o)/e.h,c=-o/1.4):"vee"===a&&(s=(e.w+4.4*o)/e.w,l=(e.h+3.8*o)/e.h,c=.5*-o);var h=e.h*l-e.h,d=e.w*s-e.w;if(Rn(e,[Math.ceil(h/2),Math.ceil(d/2)]),0!=u||0!==c){var p=kn(e,u,c);In(e,p)}}}},hl=function(e,t){var n,r,i,a,o,s,l=e._private.cy,u=l.styleEnabled(),c=l.headless(),h=Ln(),d=e._private,p=e.isNode(),g=e.isEdge(),f=d.rstyle,v=p&&u?e.pstyle("bounds-expansion").pfValue:[0],y=function(e){return"none"!==e.pstyle("display").value},m=!u||y(e)&&(!g||y(e.source())&&y(e.target()));if(m){var b=0;u&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(b=e.pstyle("overlay-padding").value);var x=0;u&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(x=e.pstyle("underlay-padding").value);var w=Math.max(b,x),E=0;if(u&&(E=e.pstyle("width").pfValue/2),p&&t.includeNodes){var T=e.position();o=T.x,s=T.y;var _=e.outerWidth()/2,D=e.outerHeight()/2;al(h,n=o-_,i=s-D,r=o+_,a=s+D),u&&t.includeOutlines&&cl(h,e)}else if(g&&t.includeEdges)if(u&&!c){var C=e.pstyle("curve-style").strValue;if(n=Math.min(f.srcX,f.midX,f.tgtX),r=Math.max(f.srcX,f.midX,f.tgtX),i=Math.min(f.srcY,f.midY,f.tgtY),a=Math.max(f.srcY,f.midY,f.tgtY),al(h,n-=E,i-=E,r+=E,a+=E),"haystack"===C){var N=f.haystackPts;if(N&&2===N.length){if(n=N[0].x,i=N[0].y,n>(r=N[1].x)){var A=n;n=r,r=A}if(i>(a=N[1].y)){var L=i;i=a,a=L}al(h,n-E,i-E,r+E,a+E)}}else if("bezier"===C||"unbundled-bezier"===C||"segments"===C||"taxi"===C){var S;switch(C){case"bezier":case"unbundled-bezier":S=f.bezierPts;break;case"segments":case"taxi":S=f.linePts}if(null!=S)for(var O=0;O(r=M.x)){var P=n;n=r,r=P}if((i=I.y)>(a=M.y)){var R=i;i=a,a=R}al(h,n-=E,i-=E,r+=E,a+=E)}if(u&&t.includeEdges&&g&&(ll(h,e,"mid-source"),ll(h,e,"mid-target"),ll(h,e,"source"),ll(h,e,"target")),u&&"yes"===e.pstyle("ghost").value){var B=e.pstyle("ghost-offset-x").pfValue,F=e.pstyle("ghost-offset-y").pfValue;al(h,h.x1+B,h.y1+F,h.x2+B,h.y2+F)}var z=d.bodyBounds=d.bodyBounds||{};Bn(z,h),Rn(z,v),Pn(z,1),u&&(n=h.x1,r=h.x2,i=h.y1,a=h.y2,al(h,n-w,i-w,r+w,a+w));var G=d.overlayBounds=d.overlayBounds||{};Bn(G,h),Rn(G,v),Pn(G,1);var Y=d.labelBounds=d.labelBounds||{};null!=Y.all?On(Y.all):Y.all=Ln(),u&&t.includeLabels&&(t.includeMainLabels&&ul(h,e,null),g&&(t.includeSourceLabels&&ul(h,e,"source"),t.includeTargetLabels&&ul(h,e,"target")))}return h.x1=il(h.x1),h.y1=il(h.y1),h.x2=il(h.x2),h.y2=il(h.y2),h.w=il(h.x2-h.x1),h.h=il(h.y2-h.y1),h.w>0&&h.h>0&&m&&(Rn(h,v),Pn(h,1)),h},dl=function(e){var t=0,n=function(e){return(e?1:0)<0&&void 0!==arguments[0]?arguments[0]:Bl,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)o(s);return this},zl.removeAllListeners=function(){return this.removeListener("*")},zl.emit=zl.trigger=function(e,t,n){var r=this.listeners,i=r.length;return this.emitting++,w(t)||(t=[t]),Xl(this,(function(e,a){null!=n&&(r=[{event:a.event,type:a.type,namespace:a.namespace,callback:n}],i=r.length);for(var o=function(n){var i=r[n];if(i.type===a.type&&(!i.namespace||i.namespace===a.namespace||i.namespace===Ml)&&e.eventMatches(e.context,i,a)){var o=[a];null!=t&&Bt(o,t),e.beforeEmit(e.context,i,a),i.conf&&i.conf.one&&(e.listeners=e.listeners.filter((function(e){return e!==i})));var s=e.callbackContext(e.context,i,a),l=i.callback.apply(s,o);e.afterEmit(e.context,i,a),!1===l&&(a.stopPropagation(),a.preventDefault())}},s=0;s1&&!r){var i=this.length-1,a=this[i],o=a._private.data.id;this[i]=void 0,this[e]=a,n.set(o,{ele:a,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&b(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--)e(this[t])&&this.unmergeAt(t);return this},map:function(e,t){for(var n=[],r=this,i=0;ir&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=this,a=0;a=0&&i1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var i=n._private.style[e];return null!=i?i:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(E(e)){var a=e;i.applyBypass(this,a,r),this.emitAndNotify("style")}else if(b(e)){if(void 0===t){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}i.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?i.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(void 0===e)for(var a=0;a0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),gu.neighbourhood=gu.neighborhood,gu.closedNeighbourhood=gu.closedNeighborhood,gu.openNeighbourhood=gu.openNeighborhood,Q(gu,{source:Ys((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:Ys((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:mu({attr:"source"}),targets:mu({attr:"target"})}),Q(gu,{edgesWith:Ys(bu(),"edgesWith"),edgesTo:Ys(bu({thisIsSrc:!0}),"edgesTo")}),Q(gu,{connectedEdges:Ys((function(e){for(var t=[],n=this,r=0;r0);return a},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),gu.componentsOf=gu.components;var wu=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var i=new Yt,a=!1;if(t){if(t.length>0&&E(t[0])&&!A(t[0])){a=!0;for(var o=[],s=new Ut,l=0,u=t.length;l0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,a=i.cy(),o=a._private,s=[],l=[],u=0,c=i.length;u0){for(var B=e.length===i.length?i:new wu(a,e),F=0;F0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},a=n._private.cy;function o(e){for(var t=e._private.edges,n=0;n0&&(e?D.emitAndNotify("remove"):t&&D.emit("remove"));for(var C=0;C0?i=l:r=l}while(Math.abs(a)>o&&++u=a?m(t,s):0===c?s:x(t,r,r+u)}var E=!1;function T(){E=!0,e===t&&n===r||b()}var _=function(i){return E||T(),e===t&&n===r?i:0===i?0:1===i?1:v(w(i),t,r)};_.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var D="generateBezier("+[e,t,n,r]+")";return _.toString=function(){return D},_}var Du=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},a=t(n,.5*r,i),o=t(n,.5*r,a),s=t(n,r,o),l=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),u=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,i){var a,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,h=1e-4,d=.016;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,l.tension=t,l.friction=r,o=(a=null!==i)?(c=e(t,r))/i*d:d;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>h&&Math.abs(s.v)>h;);return a?function(e){return u[e*(u.length-1)|0]}:c}}(),Cu=function(e,t,n,r){var i=_u(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},Nu={linear:function(e,t,n){return e+(t-e)*n},ease:Cu(.25,.1,.25,1),"ease-in":Cu(.42,0,1,1),"ease-out":Cu(0,0,.58,1),"ease-in-out":Cu(.42,0,.58,1),"ease-in-sine":Cu(.47,0,.745,.715),"ease-out-sine":Cu(.39,.575,.565,1),"ease-in-out-sine":Cu(.445,.05,.55,.95),"ease-in-quad":Cu(.55,.085,.68,.53),"ease-out-quad":Cu(.25,.46,.45,.94),"ease-in-out-quad":Cu(.455,.03,.515,.955),"ease-in-cubic":Cu(.55,.055,.675,.19),"ease-out-cubic":Cu(.215,.61,.355,1),"ease-in-out-cubic":Cu(.645,.045,.355,1),"ease-in-quart":Cu(.895,.03,.685,.22),"ease-out-quart":Cu(.165,.84,.44,1),"ease-in-out-quart":Cu(.77,0,.175,1),"ease-in-quint":Cu(.755,.05,.855,.06),"ease-out-quint":Cu(.23,1,.32,1),"ease-in-out-quint":Cu(.86,0,.07,1),"ease-in-expo":Cu(.95,.05,.795,.035),"ease-out-expo":Cu(.19,1,.22,1),"ease-in-out-expo":Cu(1,0,0,1),"ease-in-circ":Cu(.6,.04,.98,.335),"ease-out-circ":Cu(.075,.82,.165,1),"ease-in-out-circ":Cu(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Nu.linear;var r=Du(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":Cu};function Au(e,t,n,r,i){if(1===r)return n;if(t===n)return n;var a=i(t,n,r);return null==e||((e.roundValue||e.color)&&(a=Math.round(a)),void 0!==e.min&&(a=Math.max(a,e.min)),void 0!==e.max&&(a=Math.min(a,e.max))),a}function Lu(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function Su(e,t,n,r,i){var a=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var o=Lu(e,i),s=Lu(t,i);if(_(o)&&_(s))return Au(a,o,s,n,r);if(w(o)&&w(s)){for(var l=[],u=0;u0?("spring"===h&&d.push(o.duration),o.easingImpl=Nu[h].apply(null,d)):o.easingImpl=Nu[h]}var p,g=o.easingImpl;if(p=0===o.duration?1:(n-l)/o.duration,o.applying&&(p=o.progress),p<0?p=0:p>1&&(p=1),null==o.delay){var f=o.startPosition,v=o.position;if(v&&i&&!e.locked()){var y={};ku(f.x,v.x)&&(y.x=Su(f.x,v.x,p,g)),ku(f.y,v.y)&&(y.y=Su(f.y,v.y,p,g)),e.position(y)}var m=o.startPan,x=o.pan,w=a.pan,E=null!=x&&r;E&&(ku(m.x,x.x)&&(w.x=Su(m.x,x.x,p,g)),ku(m.y,x.y)&&(w.y=Su(m.y,x.y,p,g)),e.emit("pan"));var T=o.startZoom,_=o.zoom,D=null!=_&&r;D&&(ku(T,_)&&(a.zoom=An(a.minZoom,Su(T,_,p,g),a.maxZoom)),e.emit("zoom")),(E||D)&&e.emit("viewport");var C=o.style;if(C&&C.length>0&&i){for(var N=0;N=0;t--)(0,e[t])();e.splice(0,e.length)},c=a.length-1;c>=0;c--){var h=a[c],d=h._private;d.stopped?(a.splice(c,1),d.hooked=!1,d.playing=!1,d.started=!1,u(d.frames)):(d.playing||d.applying)&&(d.playing&&d.applying&&(d.applying=!1),d.started||Iu(t,h,e),Ou(t,h,e,n),d.applying&&(d.applying=!1),u(d.frames),null!=d.step&&d.step(e),h.completed()&&(a.splice(c,1),d.hooked=!1,d.playing=!1,d.started=!1,u(d.completes)),s=!0)}return n||0!==a.length||0!==o.length||r.push(t),s}for(var a=!1,o=0;o0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var Pu={animate:ds.animate(),animation:ds.animation(),animated:ds.animated(),clearQueue:ds.clearQueue(),delay:ds.delay(),delayAnimation:ds.delayAnimation(),stop:ds.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){Mu(n,e)}),t.beforeRenderPriorities.animations):n()}function n(){e._private.animationsRunning&&nt((function(t){Mu(t,e),n()}))}}},Ru={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&A(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},Bu=function(e){return b(e)?new Rs(e):e},Fu={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Fl(Ru,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Bu(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Bu(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Bu(t),n),this},once:function(e,t,n){return this.emitter().one(e,Bu(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};ds.eventAliasesOn(Fu);var zu={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};zu.jpeg=zu.jpg;var Gu={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n=e.name,r=t.extension("layout",n);if(null!=r){var i;i=b(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$();var a=new r(Q({},e,{cy:t,eles:i}));return a}Dt("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else Dt("A `name` must be specified to make a layout");else Dt("Layout options must be specified to make a layout")}};Gu.createLayout=Gu.makeLayout=Gu.layout;var Yu={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Vu.invalidateDimensions=Vu.resize;var Uu={collection:function(e,t){return b(e)?this.$(e):N(e)?e.collection():w(e)?(t||(t={}),new wu(this,e,t.unique,t.removed)):new wu(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};Uu.elements=Uu.filter=Uu.$;var ju={},Hu="t",qu="f";ju.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(d||h&&p){var g=void 0;d&&p||d?g=u.properties:p&&(g=u.mappedProperties);for(var f=0;f1&&(v=1),s.color){var w=i.valueMin[0],E=i.valueMax[0],T=i.valueMin[1],D=i.valueMax[1],C=i.valueMin[2],N=i.valueMax[2],A=null==i.valueMin[3]?1:i.valueMin[3],L=null==i.valueMax[3]?1:i.valueMax[3],S=[Math.round(w+(E-w)*v),Math.round(T+(D-T)*v),Math.round(C+(N-C)*v),Math.round(A+(L-A)*v)];n={bypass:i.bypass,name:i.name,value:S,strValue:"rgb("+S[0]+", "+S[1]+", "+S[2]+")"}}else{if(!s.number)return!1;var O=i.valueMin+(i.valueMax-i.valueMin)*v;n=this.parse(i.name,O,i.bypass,d)}if(!n)return f(),!1;n.mapping=i,i=n;break;case o.data:for(var k=i.field.split("."),I=h.data,M=0;M0&&a>0){for(var s={},l=!1,u=0;u0?e.delayAnimation(o).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:a,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1)},ju.checkTrigger=function(e,t,n,r,i,a){var o=this.properties[t],s=i(o);null!=s&&s(n,r)&&a(o)},ju.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){i._private.cy.notify("zorder",e)}))},ju.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(i){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!i.triggersBoundsOfParallelBeziers||"curve-style"!==t||"bezier"!==n&&"bezier"!==r||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()})),!i.triggersBoundsOfConnectedEdges||"display"!==t||"none"!==n&&"none"!==r||e.connectedEdges().forEach((function(e){e.dirtyBoundingBoxCache()}))}))},ju.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var Wu={applyBypass:function(e,t,n,r){var i=this,a=[],o=!0;if("*"===t||"**"===t){if(void 0!==n)for(var s=0;st.length?o.substr(t.length):""}function l(){n=n.length>r.length?n.substr(r.length):""}for(o=o.replace(/[/][*](\s|.)+?[*][/]/g,"");!o.match(/^\s*$/);){var u=o.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!u){Nt("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+o);break}t=u[0];var c=u[1];if("core"!==c&&new Rs(c).invalid)Nt("Skipping parsing of block: Invalid selector found in string stylesheet: "+c),s();else{var h=u[2],d=!1;n=h;for(var p=[];!n.match(/^\s*$/);){var g=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!g){Nt("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),d=!0;break}r=g[0];var f=g[1],v=g[2];i.properties[f]?a.parse(f,v)?(p.push({name:f,val:v}),l()):(Nt("Skipping property: Invalid property definition in: "+r),l()):(Nt("Skipping property: Invalid property name in: "+r),l())}if(d){s();break}a.selector(c);for(var y=0;y=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var d=s.data;return{name:e,value:u,strValue:""+t,mapped:d,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(h.multiple)return!1;var p=s.mapData;if(!h.color&&!h.number)return!1;var g=this.parse(e,c[4]);if(!g||g.mapped)return!1;var f=this.parse(e,c[5]);if(!f||f.mapped)return!1;if(g.pfValue===f.pfValue||g.strValue===f.strValue)return Nt("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+g.strValue+"`"),this.parse(e,g.strValue);if(h.color){var v=g.value,y=f.value;if(!(v[0]!==y[0]||v[1]!==y[1]||v[2]!==y[2]||v[3]!==y[3]&&(null!=v[3]&&1!==v[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:p,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:g.value,valueMax:f.value,bypass:n}}}if(h.multiple&&"multiple"!==r){var m;if(m=l?t.split(/\s+/):w(t)?t:[t],h.evenMultiple&&m.length%2!=0)return null;for(var E=[],T=[],_=[],C="",N=!1,A=0;A0?" ":"")+L.strValue}return h.validate&&!h.validate(E,T)?null:h.singleEnum&&N?1===E.length&&b(E[0])?{name:e,value:E[0],strValue:E[0],bypass:n}:null:{name:e,value:E,pfValue:_,strValue:C,bypass:n,units:T}}var S=function(){for(var r=0;rh.max||h.strictMax&&t===h.max))return null;var P={name:e,value:t,strValue:""+t+(O||""),units:O,bypass:n};return h.unitless||"px"!==O&&"em"!==O?P.pfValue=t:P.pfValue="px"!==O&&O?this.getEmSizeInPixels()*t:t,"ms"!==O&&"s"!==O||(P.pfValue="ms"===O?t:1e3*t),"deg"!==O&&"rad"!==O||(P.pfValue="rad"===O?t:mn(t)),"%"===O&&(P.pfValue=t/100),P}if(h.propList){var R=[],B=""+t;if("none"===B);else{for(var F=B.split(/\s*,\s*|\s+/),G=0;G0&&s>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:a=(a=(a=Math.min((o-2*t)/n.w,(s-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:a)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,i=r.pan,a=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),_(e)?n=e:E(e)&&(n=e.level,null!=e.position?t=hn(e.position,a,i):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=s,i.push("zoom"))}if(r&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;_(l.x)&&(t.pan.x=l.x,o=!1),_(l.y)&&(t.pan.y=l.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(b(e)){var n=e;e=this.mutableElements().filter(n)}else N(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),i=this.width(),a=this.height();return{x:(i-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(a-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container,i=this;return n.sizeCache=n.sizeCache||(r?(e=i.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};ac.centre=ac.center,ac.autolockNodes=ac.autolock,ac.autoungrabifyNodes=ac.autoungrabify;var oc={data:ds.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:ds.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:ds.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ds.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};oc.attr=oc.data,oc.removeAttr=oc.removeData;var sc=function(e){var t=this,n=(e=Q({},e)).container;n&&!C(n)&&C(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var a=void 0!==d&&void 0!==n&&!e.headless,o=e;o.layout=Q({name:a?"grid":"null"},o.layout),o.renderer=Q({name:a?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new wu(this),listeners:[],aniEles:new wu(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?a:o.styleEnabled,zoom:_(o.zoom)?o.zoom:1,pan:{x:E(o.pan)&&_(o.pan.x)?o.pan.x:0,y:E(o.pan)&&_(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var u=function(e,t){if(e.some(R))return Yi.all(e).then(t);t(e)};l.styleEnabled&&t.setStyle([]);var c=Q({},o,o.renderer);t.initRenderer(c);var h=function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),null!=e&&(E(e)||w(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var a=Q({},t._private.options.layout);a.eles=t.elements(),t.layout(a).run()};u([o.style,o.elements],(function(e){var n=e[0],a=e[1];l.styleEnabled&&t.style().append(n),h(a,(function(){t.startAnimationLoop(),l.ready=!0,x(o.ready)&&t.on("ready",o.ready);for(var e=0;e0,u=Ln(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(N(n.roots))e=n.roots;else if(w(n.roots)){for(var c=[],h=0;h0;){var M=I(),P=L(M,O);if(P)M.outgoers().filter((function(e){return e.isNode()&&i.has(e)})).forEach(k);else if(null===P){Nt("Detected double maximal shift for node `"+M.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}A();var R=0;if(n.avoidOverlap)for(var B=0;B0&&y[0].length<=3?l/2:0),h=2*Math.PI/y[r].length*i;return 0===r&&1===y[0].length&&(c=1),{x:$.x+c*Math.cos(h),y:$.y+c*Math.sin(h)}}return{x:$.x+(i+1-(a+1)/2)*o,y:(r+1)*s}};return i.nodes().layoutPositions(this,n,Q),this};var gc={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function fc(e){this.options=Q({},gc,e)}fc.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));for(var o,s=Ln(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l={x:s.x1+s.w/2,y:s.y1+s.h/2},u=(void 0===t.sweep?2*Math.PI-2*Math.PI/a.length:t.sweep)/Math.max(1,a.length-1),c=0,h=0;h1&&t.avoidOverlap){c*=1.75;var f=Math.cos(u)-Math.cos(0),v=Math.sin(u)-Math.sin(0),y=Math.sqrt(c*c/(f*f+v*v));o=Math.max(y,o)}var m=function(e,n){var r=t.startAngle+n*u*(i?1:-1),a=o*Math.cos(r),s=o*Math.sin(r);return{x:l.x+a,y:l.y+s}};return r.nodes().layoutPositions(this,t,m),this};var vc,yc={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function mc(e){this.options=Q({},yc,e)}mc.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles,a=i.nodes().not(":parent"),o=Ln(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},l=[],u=0,c=0;c0&&Math.abs(y[0].value-b.value)>=f&&(y=[],v.push(y)),y.push(b)}var x=u+t.minNodeSpacing;if(!t.avoidOverlap){var w=v.length>0&&v[0].length>1,E=(Math.min(o.w,o.h)/2-x)/(v.length+w?1:0);x=Math.min(x,E)}for(var T=0,_=0;_1&&t.avoidOverlap){var A=Math.cos(N)-Math.cos(0),L=Math.sin(N)-Math.sin(0),S=Math.sqrt(x*x/(A*A+L*L));T=Math.max(S,T)}D.r=T,T+=x}if(t.equidistant){for(var O=0,k=0,I=0;I=e.numIter||(Ac(r,e),r.temperature=r.temperature*e.coolingFactor,r.temperature=e.animationThreshold&&a(),nt(t)):(Gc(r,e),s())}();else{for(;u;)u=o(l),l++;Gc(r,e),s()}return this},xc.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},xc.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var wc,Ec=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),a=Ln(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},s=n.eles.components(),l={},u=0;u0)for(o.graphSet.push(E),u=0;ur.count?0:r.graph},_c=function e(t,n,r,i){var a=i.graphSet[r];if(-10)var l=(c=r.nodeOverlap*s)*i/(v=Math.sqrt(i*i+a*a)),u=c*a/v;else{var c,h=Ic(e,i,a),d=Ic(t,-1*i,-1*a),p=d.x-h.x,g=d.y-h.y,f=p*p+g*g,v=Math.sqrt(f);l=(c=(e.nodeRepulsion+t.nodeRepulsion)/f)*p/v,u=c*g/v}e.isLocked||(e.offsetX-=l,e.offsetY-=u),t.isLocked||(t.offsetX+=l,t.offsetY+=u)}},kc=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var a=e.maxY-t.minY;else a=t.maxY-e.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},Ic=function(e,t,n){var r=e.positionX,i=e.positionY,a=e.height||1,o=e.width||1,s=n/t,l=a/o,u={};return 0===t&&0n?(u.x=r,u.y=i+a/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=i-o*n/2/t,u):0=l)?(u.x=r+a*t/2/n,u.y=i+a/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-a*t/2/n,u.y=i-a/2,u):u},Mc=function(e,t){for(var n=0;nn){var f=t.gravity*d/g,v=t.gravity*p/g;h.offsetX+=f,h.offsetY+=v}}}}},Rc=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var a=n[r++],o=e.idToIndex[a],s=e.layoutNodes[o],l=s.children;if(0n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},zc=function e(t,n){var r=t.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],a=!1;return(null==i.maxX||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,a=!0),(null==i.minX||t.minX-i.padLefti.maxY)&&(i.maxY=t.maxY+i.padBottom,a=!0),(null==i.minY||t.minY-i.padTopg&&(h+=p+t.componentSpacing,c=0,d=0,p=0)}}},Yc={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Xc(e){this.options=Q({},Yc,e)}Xc.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));var a=Ln(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===a.h||0===a.w)r.nodes().layoutPositions(this,t,(function(e){return{x:a.x1,y:a.y1}}));else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),l=Math.round(s),u=Math.round(a.w/a.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},h=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},d=t.rows,p=null!=t.cols?t.cols:t.columns;if(null!=d&&null!=p)l=d,u=p;else if(null!=d&&null==p)l=d,u=Math.ceil(o/l);else if(null==d&&null!=p)u=p,l=Math.ceil(o/u);else if(u*l>o){var g=c(),f=h();(g-1)*f>=o?c(g-1):(f-1)*g>=o&&h(f-1)}else for(;u*l=o?h(y+1):c(v+1)}var m=a.w/u,b=a.h/l;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var x=0;x=u&&(O=0,S++)},I={},M=0;M(r=Wn(e,t,x[w],x[w+1],x[w+2],x[w+3])))return v(n,r),!0}else if("bezier"===a.edgeType||"multibezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType)for(x=a.allpts,w=0;w+5(r=qn(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return v(n,r),!0;m=m||i.source,b=b||i.target;var E=o.getArrowWidth(l,c),T=[{name:"source",x:a.arrowStartX,y:a.arrowStartY,angle:a.srcArrowAngle},{name:"target",x:a.arrowEndX,y:a.arrowEndY,angle:a.tgtArrowAngle},{name:"mid-source",x:a.midX,y:a.midY,angle:a.midsrcArrowAngle},{name:"mid-target",x:a.midX,y:a.midY,angle:a.midtgtArrowAngle}];for(w=0;w0&&(y(m),y(b))}function b(e,t,n){return Ft(e,t,n)}function x(n,r){var i,a=n._private,o=g;i=r?r+"-":"",n.boundingBox();var s=a.labelBounds[r||"main"],l=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(a.rscratch,"labelX",r),c=b(a.rscratch,"labelY",r),h=b(a.rscratch,"labelAngle",r),d=n.pstyle(i+"text-margin-x").pfValue,p=n.pstyle(i+"text-margin-y").pfValue,f=s.x1-o-d,y=s.x2+o-d,m=s.y1-o-p,x=s.y2+o-p;if(h){var w=Math.cos(h),E=Math.sin(h),T=function(e,t){return{x:(e-=u)*w-(t-=c)*E+u,y:e*E+t*w+c}},_=T(f,m),D=T(f,x),C=T(y,m),N=T(y,x),A=[_.x+d,_.y+p,C.x+d,C.y+p,N.x+d,N.y+p,D.x+d,D.y+p];if($n(e,t,A))return v(n),!0}else if(zn(s,e,t))return v(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var E=l[w];E.isNode()?y(E)||x(E):m(E)||x(E)||x(E,"source")||x(E,"target")}return u},getAllInBox:function(e,t,n,r){for(var i=this.getCachedZSortedEles().interactive,a=[],o=Math.min(e,n),s=Math.max(e,n),l=Math.min(t,r),u=Math.max(t,r),c=Ln({x1:e=o,y1:t=l,x2:n=s,y2:r=u}),h=0;h0?Math.max(e-t,0):Math.min(e+t,0)},A=N(D,T),L=N(C,_),S=!1;y===u?v=Math.abs(A)>Math.abs(L)?i:r:y===l||y===s?(v=r,S=!0):y!==a&&y!==o||(v=i,S=!0);var O,k=v===r,I=k?L:A,M=k?C:D,P=wn(M),R=!1;S&&(b||w)||!(y===s&&M<0||y===l&&M>0||y===a&&M>0||y===o&&M<0)||(I=(P*=-1)*Math.abs(I),R=!0);var B=function(e){return Math.abs(e)=Math.abs(I)},F=B(O=b?(x<0?1+x:x)*I:(x<0?I:0)+x*P),z=B(Math.abs(I)-Math.abs(O));if(!F&&!z||R)if(k){var G=c.y1+O+(f?d/2*P:0),Y=c.x1,X=c.x2;n.segpts=[Y,G,X,G]}else{var V=c.x1+O+(f?h/2*P:0),U=c.y1,j=c.y2;n.segpts=[V,U,V,j]}else if(k){var H=Math.abs(M)<=d/2,q=Math.abs(D)<=p/2;if(H){var W=(c.x1+c.x2)/2,$=c.y1,K=c.y2;n.segpts=[W,$,W,K]}else if(q){var Z=(c.y1+c.y2)/2,Q=c.x1,J=c.x2;n.segpts=[Q,Z,J,Z]}else n.segpts=[c.x1,c.y2]}else{var ee=Math.abs(M)<=h/2,te=Math.abs(C)<=g/2;if(ee){var ne=(c.y1+c.y2)/2,re=c.x1,ie=c.x2;n.segpts=[re,ne,ie,ne]}else if(te){var ae=(c.x1+c.x2)/2,oe=c.y1,se=c.y2;n.segpts=[ae,oe,ae,se]}else n.segpts=[c.x2,c.y1]}},nh.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,i=t.tgtPos,a=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,h=!_(n.startX)||!_(n.startY),d=!_(n.arrowStartX)||!_(n.arrowStartY),p=!_(n.endX)||!_(n.endY),g=!_(n.arrowEndX)||!_(n.arrowEndY),f=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,v=En({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),y=vd.poolIndex()){var p=h;h=d,d=p}var g=s.srcPos=h.position(),f=s.tgtPos=d.position(),v=s.srcW=h.outerWidth(),y=s.srcH=h.outerHeight(),m=s.tgtW=d.outerWidth(),b=s.tgtH=d.outerHeight(),x=s.srcShape=n.nodeShapes[t.getNodeShape(h)],w=s.tgtShape=n.nodeShapes[t.getNodeShape(d)];s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var E=0;E0){var X=u,V=Tn(X,pn(t)),U=Tn(X,pn(Y)),j=V;U2&&Tn(X,{x:Y[2],y:Y[3]})0){var ie=c,ae=Tn(ie,pn(t)),oe=Tn(ie,pn(re)),se=ae;oe2&&Tn(ie,{x:re[2],y:re[3]})=u||m){c={cp:f,segment:y};break}}if(c)break}var b=c.cp,x=c.segment,w=(u-d)/x.length,E=x.t1-x.t0,T=s?x.t0+E*w:x.t1-E*w;T=An(0,T,1),t=Cn(b.p0,b.p1,b.p2,T),i=ch(b.p0,b.p1,b.p2,T);break;case"straight":case"segments":case"haystack":for(var _,D,C,N,A=0,L=r.allpts.length,S=0;S+3=u));S+=2);var O=(u-D)/_;O=An(0,O,1),t=Nn(C,N,O),i=uh(C,N)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,i)}};u("source"),u("target"),this.applyLabelDimensions(e)}},sh.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},sh.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r),a=e.pstyle("line-height").pfValue,o=e.pstyle("text-wrap").strValue,s=Ft(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==o?1:Math.max(s.length,1),u=i.height/l,c=u*a,h=i.width,d=i.height+(l-1)*(a-1)*u;zt(n.rstyle,"labelWidth",t,h),zt(n.rscratch,"labelWidth",t,h),zt(n.rstyle,"labelHeight",t,d),zt(n.rscratch,"labelHeight",t,d),zt(n.rscratch,"labelLineHeight",t,c)},sh.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,a=e.pstyle("text-transform").value,o=function(e,r){return r?(zt(n.rscratch,e,t,r),r):Ft(n.rscratch,e,t)};if(!i)return"";"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var l=o("labelKey");if(null!=l&&o("labelWrapKey")===l)return o("labelWrapCachedText");for(var u="\u200b",c=i.split("\n"),h=e.pstyle("text-max-width").pfValue,d="anywhere"===e.pstyle("text-overflow-wrap").value,p=[],g=/[\s\u200b]+/,f=d?"":" ",v=0;vh){for(var x=y.split(g),w="",E=0;ED);L++)C+=i[L],L===i.length-1&&(A=!0);return A||(C+=N),C}return i},sh.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},sh.calculateLabelDimensions=function(e,t){var n=this,r=gt(t,e._private.labelDimsKey),i=n.labelDimCache||(n.labelDimCache=[]),a=i[r];if(null!=a)return a;var o=0,s=e.pstyle("font-style").strValue,l=e.pstyle("font-size").pfValue,u=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,h=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!h){h=this.labelCalcCanvas=document.createElement("canvas"),d=this.labelCalcCanvasContext=h.getContext("2d");var p=h.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}d.font="".concat(s," ").concat(c," ").concat(l,"px ").concat(u);for(var g=0,f=0,v=t.split("\n"),y=0;y1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var C=i(t);f&&(e.hoverData.tapholdCancelled=!0);var N=function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(b[0]),t.push(b[1])):(t[0]+=b[0],t[1]+=b[1])};n=!0,r(p,["mousemove","vmousemove","tapdrag"],t,{x:u[0],y:u[1]});var A=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:u[0],y:u[1]}}),d[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(f){var S={originalEvent:t,type:"cxtdrag",position:{x:u[0],y:u[1]}};m?m.emit(S):o.emit(S),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&p===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:u[0],y:u[1]}}),e.hoverData.cxtOver=p,p&&p.emit({originalEvent:t,type:"cxtdragover",position:{x:u[0],y:u[1]}}))}}else if(e.hoverData.dragging){if(n=!0,o.panningEnabled()&&o.userPanningEnabled()){var O;if(e.hoverData.justStartedPan){var k=e.hoverData.mdownPos;O={x:(u[0]-k[0])*s,y:(u[1]-k[1])*s},e.hoverData.justStartedPan=!1}else O={x:b[0]*s,y:b[1]*s};o.panBy(O),o.emit("dragpan"),e.hoverData.dragged=!0}u=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=d[4]||null!=m&&!m.pannable()){if(m&&m.pannable()&&m.active()&&m.unactivate(),m&&m.grabbed()||p==y||(y&&r(y,["mouseout","tapdragout"],t,{x:u[0],y:u[1]}),p&&r(p,["mouseover","tapdragover"],t,{x:u[0],y:u[1]}),e.hoverData.last=p),m)if(f){if(o.boxSelectionEnabled()&&C)m&&m.grabbed()&&(v(x),m.emit("freeon"),x.emit("free"),e.dragData.didDrag&&(m.emit("dragfreeon"),x.emit("dragfree"))),A();else if(m&&m.grabbed()&&e.nodeIsDraggable(m)){var I=!e.dragData.didDrag;I&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||g(x,{inDragLayer:!0});var M={x:0,y:0};if(_(b[0])&&_(b[1])&&(M.x+=b[0],M.y+=b[1],I)){var P=e.hoverData.dragDelta;P&&_(P[0])&&_(P[1])&&(M.x+=P[0],M.y+=P[1])}e.hoverData.draggingEles=!0,x.silentShift(M).emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else N();n=!0}else f&&(e.hoverData.dragging||!o.boxSelectionEnabled()||!C&&o.panningEnabled()&&o.userPanningEnabled()?!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()&&a(m,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,d[4]=0,e.data.bgActivePosistion=pn(c),e.redrawHint("select",!0),e.redraw()):A(),m&&m.pannable()&&m.active()&&m.unactivate());return d[2]=u[0],d[3]=u[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}}),!1),e.registerBinding(t,"mouseup",(function(t){if(e.hoverData.capture){e.hoverData.capture=!1;var a=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,h=i(t);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var d={originalEvent:t,type:"cxttapend",position:{x:o[0],y:o[1]}};if(c?c.emit(d):a.emit(d),!e.hoverData.cxtDragged){var p={originalEvent:t,type:"cxttap",position:{x:o[0],y:o[1]}};c?c.emit(p):a.emit(p)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(l,["mouseup","tapend","vmouseup"],t,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:o[0],y:o[1]}),C=!1,t.timeStamp-N<=a.multiClickDebounceTime()?(D&&clearTimeout(D),C=!0,N=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:o[0],y:o[1]})):(D=setTimeout((function(){C||r(c,["oneclick","onetap","voneclick"],t,{x:o[0],y:o[1]})}),a.multiClickDebounceTime()),N=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||i(t)||(a.$(n).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=a.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===a.selectionType()||h?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):h||(a.$(n).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var g=a.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),g.length>0&&e.redrawHint("eles",!0),a.emit({type:"boxend",originalEvent:t,position:{x:o[0],y:o[1]}});var f=function(e){return e.selectable()&&!e.selected()};"additive"===a.selectionType()||h||a.$(n).unmerge(g).unselect(),g.emit("box").stdFilter(f).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var y=c&&c.grabbed();v(u),y&&(c.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null}}),!1);var S,O,k,I,M,P,R,B,F,z,G,Y,X,V=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),i=n.pan(),a=e.projectIntoViewport(t.clientX,t.clientY),o=[a[0]*r+i.x,a[1]*r+i.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||A())t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var l=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(l=e.gestureStartZoom*t.scale),n.zoom({level:l,renderedPosition:{x:o[0],y:o[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",V,!0),e.registerBinding(t,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||V(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var U,j,H,q,W,$,K,Z=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},Q=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",U=function(t){if(e.hasTouchStarted=!0,L(t)){m(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,i=e.touchData.now,a=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);i[0]=o[0],i[1]=o[1]}if(t.touches[1]&&(o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=o[0],i[3]=o[1]),t.touches[2]&&(o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=o[0],i[5]=o[1]),t.touches[1]){e.touchData.singleTouchMoved=!0,v(e.dragData.touchDragEles);var s=e.findContainerClientCoords();F=s[0],z=s[1],G=s[2],Y=s[3],S=t.touches[0].clientX-F,O=t.touches[0].clientY-z,k=t.touches[1].clientX-F,I=t.touches[1].clientY-z,X=0<=S&&S<=G&&0<=k&&k<=G&&0<=O&&O<=Y&&0<=I&&I<=Y;var l=n.pan(),u=n.zoom();M=Z(S,O,k,I),P=Q(S,O,k,I),B=[((R=[(S+k)/2,(O+I)/2])[0]-l.x)/u,(R[1]-l.y)/u];var h=200;if(P=1){for(var T=e.touchData.startPosition=[null,null,null,null,null,null],_=0;_=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var x=t.touches[0].clientX-F,w=t.touches[0].clientY-z,E=t.touches[1].clientX-F,T=t.touches[1].clientY-z,D=Q(x,w,E,T),C=150,N=1.5;if(D/P>=N*N||D>=C*C){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var A={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(A),e.touchData.start=null):o.emit(A)}}if(n&&e.touchData.cxt){A={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}},e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(A):o.emit(A),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var R=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&R===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=R,R&&R.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(n&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(s[0]+s[2]+s[4])/3,i[3]=(s[1]+s[3]+s[5])/3):(i[0]=(s[0]+s[2]+s[4])/3,i[1]=(s[1]+s[3]+s[5])/3,i[2]=(s[0]+s[2]+s[4])/3+1,i[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ne=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var G=0;G0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",H=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",q=function(t){var i=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var a=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(t.touches[0]){var h=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);u[0]=h[0],u[1]=h[1]}if(t.touches[1]&&(h=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),u[2]=h[0],u[3]=h[1]),t.touches[2]&&(h=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),u[4]=h[0],u[5]=h[1]),i&&i.unactivate(),e.touchData.cxt){if(o={originalEvent:t,type:"cxttapend",position:{x:u[0],y:u[1]}},i?i.emit(o):s.emit(o),!e.touchData.cxtDragged){var d={originalEvent:t,type:"cxttap",position:{x:u[0],y:u[1]}};i?i.emit(d):s.emit(d)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var p=s.collection(e.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:t,position:{x:u[0],y:u[1]}});var g=function(e){return e.selectable()&&!e.selected()};p.emit("box").stdFilter(g).select().emit("boxselect"),p.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=i&&i.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var f=e.dragData.touchDragEles;if(null!=i){var y=i._private.grabbed;v(f),e.redrawHint("drag",!0),e.redrawHint("eles",!0),y&&(i.emit("freeon"),f.emit("free"),e.dragData.didDrag&&(i.emit("dragfreeon"),f.emit("dragfree"))),r(i,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]}),i.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(u[0],u[1],!0,!0);r(m,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]})}var b=e.touchData.startPosition[0]-u[0],x=b*b,w=e.touchData.startPosition[1]-u[1],E=(x+w*w)*l*l;e.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),r(i,["tap","vclick"],t,{x:u[0],y:u[1]}),W=!1,t.timeStamp-K<=s.multiClickDebounceTime()?($&&clearTimeout($),W=!0,K=null,r(i,["dbltap","vdblclick"],t,{x:u[0],y:u[1]})):($=setTimeout((function(){W||r(i,["onetap","voneclick"],t,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),K=t.timeStamp)),null!=i&&!e.dragData.didDrag&&i._private.selectable&&E0)return p[0]}return null},d=Object.keys(c),p=0;p0?l:Xn(i,a,e,t,n,r,o)},checkPoint:function(e,t,n,r,i,a,o){var s=hr(r,i),l=2*s;if(Kn(e,t,this.points,a,o,r,i-l,[0,-1],n))return!0;if(Kn(e,t,this.points,a,o,r-l,i,[0,-1],n))return!0;var u=r/2+2*n,c=i/2+2*n;return!!$n(e,t,[a-u,o-c,a-u,o,a+u,o,a+u,o-c])||!!tr(e,t,l,l,a+r/2-s,o+i/2-s,n)||!!tr(e,t,l,l,a-r/2+s,o+i/2-s,n)}}},registerNodeShapes:function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",lr(3,0)),this.generateRoundPolygon("round-triangle",lr(3,0)),this.generatePolygon("rectangle",lr(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",lr(5,0)),this.generateRoundPolygon("round-pentagon",lr(5,0)),this.generatePolygon("hexagon",lr(6,0)),this.generateRoundPolygon("round-hexagon",lr(6,0)),this.generatePolygon("heptagon",lr(7,0)),this.generateRoundPolygon("round-heptagon",lr(7,0)),this.generatePolygon("octagon",lr(8,0)),this.generateRoundPolygon("round-octagon",lr(8,0));var r=new Array(20),i=cr(5,0),a=cr(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*f)break}else if(i){if(p>=e.deqCost*l||p>=e.deqAvgCost*s)break}else if(g>=e.deqNoDrawCost*_h)break;var v=e.deq(t,h,c);if(!(v.length>0))break;for(var y=0;y0&&(e.onDeqd(t,u),!i&&e.shouldRedraw(t,u,h,c)&&r())},a=e.priority||_t;n.beforeRender(i,a(t))}}}},Ch=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Et;t(this,e),this.idsByKey=new Yt,this.keyForId=new Yt,this.cachesByLvl=new Yt,this.lvls=[],this.getKey=n,this.doesEleInvalidateKey=r}return i(e,[{key:"getIdsFor",value:function(e){null==e&&Dt("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new Ut,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new Yt,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),Nh=25,Ah=50,Lh=-4,Sh=3,Oh=7.99,kh=8,Ih=1024,Mh=1024,Ph=1024,Rh=.2,Bh=.8,Fh=10,zh=.15,Gh=.1,Yh=.9,Xh=.9,Vh=100,Uh=1,jh={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Hh=Mt({getKey:null,doesEleInvalidateKey:Et,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:wt,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),qh=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=Hh(t);Q(n,r),n.lookup=new Ch(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},Wh=qh.prototype;Wh.reasons=jh,Wh.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},Wh.getRetiredTextureQueue=function(e){var t=this,n=t.eleImgCaches.retired=t.eleImgCaches.retired||{};return n[e]=n[e]||[]},Wh.getElementQueue=function(){var e=this;return e.eleCacheQueue=e.eleCacheQueue||new $t((function(e,t){return t.reqs-e.reqs}))},Wh.getElementKeyToQueue=function(){var e=this;return e.eleKeyToCacheQueue=e.eleKeyToCacheQueue||{}},Wh.getElement=function(e,t,n,r,i){var a=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(xn(s*n))),r=Oh||r>Sh)return null;var u=Math.pow(2,r),c=t.h*u,h=t.w*u,d=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,d))return null;var p,g=l.get(e,r);if(g&&g.invalidated&&(g.invalidated=!1,g.texture.invalidatedWidth-=g.width),g)return g;if(p=c<=Nh?Nh:c<=Ah?Ah:Math.ceil(c/Ah)*Ah,c>Ph||h>Mh)return null;var f=a.getTextureQueue(p),v=f[f.length-2],y=function(){return a.recycleTexture(p,h)||a.addTexture(p,h)};v||(v=f[f.length-1]),v||(v=y()),v.width-v.usedWidthr;N--)D=a.getElement(e,t,n,N,jh.downscale);C()}else{var A;if(!x&&!w&&!E)for(var L=r-1;L>=Lh;L--){var S=l.get(e,L);if(S){A=S;break}}if(b(A))return a.queueElement(e,r),A;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,e,t,d,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return g={x:v.usedWidth,texture:v,level:r,scale:u,width:h,height:c,scaledLabelShown:d},v.usedWidth+=Math.ceil(h+kh),v.eleCaches.push(g),l.set(e,r,g),a.checkTextureFullness(v),g},Wh.invalidateElements=function(e){for(var t=0;t=Rh*e.width&&this.retireTexture(e)},Wh.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>Bh&&e.fullnessChecks>=Fh?Pt(t,e):e.fullnessChecks++},Wh.retireTexture=function(e){var t=this,n=e.height,r=t.getTextureQueue(n),i=this.lookup;Pt(r,e),e.retired=!0;for(var a=e.eleCaches,o=0;o=t)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,Rt(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),Pt(i,o),r.push(o),o}},Wh.queueElement=function(e,t){var n=this,r=n.getElementQueue(),i=n.getElementKeyToQueue(),a=this.getKey(e),o=i[a];if(o)o.level=Math.max(o.level,t),o.eles.merge(e),o.reqs++,r.updateItem(o);else{var s={eles:e.spawn().merge(e),level:t,reqs:1,key:a};r.push(s),i[a]=s}},Wh.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=[],a=t.lookup,o=0;o0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=a.hasCache(u,s.level);if(r[l]=null,!c){i.push(s);var h=t.getBoundingBox(u);t.getElement(u,h,e,s.level,jh.dequeue)}}return i},Wh.removeFromQueue=function(e){var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=this.getKey(e),a=r[i];null!=a&&(1===a.eles.length?(a.reqs=xt,n.updateItem(a),n.pop(),r[i]=null):a.eles.unmerge(e))},Wh.onDequeue=function(e){this.onDequeues.push(e)},Wh.offDequeue=function(e){Pt(this.onDequeues,e)},Wh.setupDequeueing=Dh.setupDequeueing({deqRedrawThreshold:Vh,deqCost:zh,deqAvgCost:Gh,deqNoDrawCost:Yh,deqFastCost:Xh,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=Qh||n>Zh)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[],h=function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},i=function(e){if(!s)for(var r=n+e;Kh<=r&&r<=Zh&&!t(r);r+=e);};i(1),i(-1);for(var a=c.length-1;a>=0;a--){var o=c[a];o.invalid&&Pt(c,o)}};if(r.levelIsComplete(n,e))return c;h();var d=function(){if(!o){o=Ln();for(var t=0;tsd)return null;var i=r.makeLayer(o,n);if(null!=t){var a=c.indexOf(t)+1;c.splice(a,0,i)}else(void 0===e.insert||e.insert)&&c.unshift(i);return i};if(r.skipping&&!a)return null;for(var g=null,f=e.length/$h,v=!a,y=0;y=f||!Yn(g.bb,m.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;s||v?r.queueLayer(g,m):r.drawEleInLayer(g,m,n,t),g.eles.push(m),x[n]=g}}return s||(v?null:c)},cd.getEleLevelForLayerLevel=function(e,t){return e},cd.drawEleInLayer=function(e,t,n,r){var i=this,a=this.renderer,o=e.context,s=t.boundingBox();0!==s.w&&0!==s.h&&t.visible()&&(n=i.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(o,!1),a.drawCachedElement(o,t,null,null,n,ld),a.setImgSmoothing(o,!0))},cd.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i0)return!1;if(a.invalid)return!1;r+=a.eles.length}return r===t.length},cd.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){t=!0;break}}return t},cd.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=rt(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},cd.invalidateLayer=function(e){if(this.lastInvalidationTime=rt(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];Pt(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!a||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=a?t.pstyle("opacity").value:1,c=a?t.pstyle("line-opacity").value:1,h=t.pstyle("curve-style").value,d=t.pstyle("line-style").value,p=t.pstyle("width").pfValue,g=t.pstyle("line-cap").value,f=u*c,v=u*c,y=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;"straight-triangle"===h?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=p,e.lineCap=g,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,d),e.lineCap="butt")},m=function(){i&&o.drawEdgeOverlay(e,t)},b=function(){i&&o.drawEdgeUnderlay(e,t)},x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v;o.drawArrowheads(e,t,n)},w=function(){o.drawElementText(e,t,null,r)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var E=t.pstyle("ghost-offset-x").pfValue,T=t.pstyle("ghost-offset-y").pfValue,_=t.pstyle("ghost-opacity").value,D=f*_;e.translate(E,T),y(D),x(D),e.translate(-E,-T)}b(),y(),x(),m(),w(),n&&e.translate(l.x1,l.y1)}}},Ad=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var i=this,a=i.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||a?t.lineCap="round":t.lineCap="butt",i.colorStrokeStyle(t,l[0],l[1],l[2],r),i.drawEdgePath(n,t,o.allpts,"solid")}}}};Nd.drawEdgeOverlay=Ad("overlay"),Nd.drawEdgeUnderlay=Ad("underlay"),Nd.drawEdgePath=function(e,t,n,r){var i,a=e._private.rscratch,o=t,s=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(l){var h=n.join("$");a.pathCacheKey&&a.pathCacheKey===h?(i=t=a.pathCache,s=!0):(i=t=new Path2D,a.pathCacheKey=h,a.pathCache=i)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(u),o.lineDashOffset=c;break;case"solid":o.setLineDash([])}if(!s&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+35&&void 0!==arguments[5]?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.quadraticCurveTo(t+r,n,t+r,n+a),e.lineTo(t+r,n+i-a),e.quadraticCurveTo(t+r,n+i,t+r-a,n+i),e.lineTo(t+a,n+i),e.quadraticCurveTo(t,n+i,t,n+i-a),e.lineTo(t,n+a),e.quadraticCurveTo(t,n,t+a,n),e.closePath(),o?e.stroke():e.fill()}Sd.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(xn(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(a&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),h=t.pstyle("source-label"),d=t.pstyle("target-label");if(u||(!c||!c.value)&&(!h||!h.value)&&(!d||!d.value))return;e.textAlign="center",e.textBaseline="bottom"}var p,g=!n;n&&(p=n,e.translate(-p.x1,-p.y1)),null==i?(o.drawText(e,t,null,g,a),t.isEdge()&&(o.drawText(e,t,"source",g,a),o.drawText(e,t,"target",g,a))):o.drawText(e,t,i,g,a),n&&e.translate(p.x1,p.y1)},Sd.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",a=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+i+" "+a,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},Sd.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",i=e.pstyle(r+"text-rotation"),a=Ft(n,"labelAngle",t);return"autorotate"===i.strValue?e.isEdge()?a:0:"none"===i.strValue?0:i.pfValue},Sd.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=t._private.rscratch,o=i?t.effectiveOpacity():1;if(!i||0!==o&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,l,u=Ft(a,"labelX",n),c=Ft(a,"labelY",n),h=this.getLabelText(t,n);if(null!=h&&""!==h&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(e,t,i);var d,p=n?n+"-":"",g=Ft(a,"labelWidth",n),f=Ft(a,"labelHeight",n),v=t.pstyle(p+"text-margin-x").pfValue,y=t.pstyle(p+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(m&&(b="center",x="center"),u+=v,c+=y,0!==(d=r?this.getTextAngle(t,n):0)&&(s=u,l=c,e.translate(s,l),e.rotate(d),u=0,c=0),x){case"top":break;case"center":c+=f/2;break;case"bottom":c+=f}var w=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,T=t.pstyle("text-border-width").pfValue,_=t.pstyle("text-background-padding").pfValue,D=0===t.pstyle("text-background-shape").strValue.indexOf("round"),C=2;if(w>0||T>0&&E>0){var N=u-_;switch(b){case"left":N-=g;break;case"center":N-=g/2}var A=c-f-_,L=g+2*_,S=f+2*_;if(w>0){var O=e.fillStyle,k=t.pstyle("text-background-color").value;e.fillStyle="rgba("+k[0]+","+k[1]+","+k[2]+","+w*o+")",D?Od(e,N,A,L,S,C):e.fillRect(N,A,L,S),e.fillStyle=O}if(T>0&&E>0){var I=e.strokeStyle,M=e.lineWidth,P=t.pstyle("text-border-color").value,R=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+P[0]+","+P[1]+","+P[2]+","+E*o+")",e.lineWidth=T,e.setLineDash)switch(R){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=T/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(D?Od(e,N,A,L,S,C,"stroke"):e.strokeRect(N,A,L,S),"double"===R){var B=T/2;D?Od(e,N+B,A+B,L-2*B,S-2*B,C,"stroke"):e.strokeRect(N+B,A+B,L-2*B,S-2*B)}e.setLineDash&&e.setLineDash([]),e.lineWidth=M,e.strokeStyle=I}}var F=2*t.pstyle("text-outline-width").pfValue;if(F>0&&(e.lineWidth=F),"wrap"===t.pstyle("text-wrap").value){var z=Ft(a,"labelWrapCachedLines",n),G=Ft(a,"labelLineHeight",n),Y=g/2,X=this.getLabelJustification(t);switch("auto"===X||("left"===b?"left"===X?u+=-g:"center"===X&&(u+=-Y):"center"===b?"left"===X?u+=-Y:"right"===X&&(u+=Y):"right"===b&&("center"===X?u+=Y:"right"===X&&(u+=g))),x){case"top":case"center":case"bottom":c-=(z.length-1)*G}for(var V=0;V0&&e.strokeText(z[V],u,c),e.fillText(z[V],u,c),c+=G}else F>0&&e.strokeText(h,u,c),e.fillText(h,u,c);0!==d&&(e.rotate(-d),e.translate(-s,-l))}}};var kd={drawNode:function(e,t,n){var r,i,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,h=t.position();if(_(h.x)&&_(h.y)&&(!s||t.visible())){var d,p,g=s?t.effectiveOpacity():1,f=l.usePaths(),v=!1,y=t.padding();r=t.width()+2*y,i=t.height()+2*y,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),x=new Array(m.length),w=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:A;l.eleFillStyle(e,t,n)},F=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O;l.colorStrokeStyle(e,L[0],L[1],L[2],t)},z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:P;l.colorStrokeStyle(e,I[0],I[1],I[2],t)},G=function(e,t,n,r){var i,a=l.nodePathCache=l.nodePathCache||[],o=ft("polygon"===n?n+","+r.join(","):n,""+t,""+e),s=a[o],u=!1;return null!=s?(i=s,u=!0,c.pathCache=i):(i=new Path2D,a[o]=c.pathCache=i),{path:i,cacheHit:u}},Y=t.pstyle("shape").strValue,X=t.pstyle("shape-polygon-points").pfValue;if(f){e.translate(h.x,h.y);var V=G(r,i,Y,X);d=V.path,v=V.cacheHit}var U=function(){if(!v){var n=h;f&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(d||e,n.x,n.y,r,i)}f?e.fill(d):e.fill()},j=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=u.backgrounding,a=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;l.hasPie(t)&&(l.drawPie(e,t,a),n&&(f||l.nodeShapes[l.getNodeShape(t)].draw(e,h.x,h.y,r,i)))},q=function(){var t=(C>0?C:-C)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:g),n=C>0?0:255;0!==C&&(l.colorFillStyle(e,n,n,n,t),f?e.fill(d):e.fill())},W=function(){if(N>0){if(e.lineWidth=N,e.lineCap="butt",e.setLineDash)switch(S){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}if(f?e.stroke(d):e.stroke(),"double"===S){e.lineWidth=N/3;var t=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",f?e.stroke(d):e.stroke(),e.globalCompositeOperation=t}e.setLineDash&&e.setLineDash([])}},$=function(){if(k>0){if(e.lineWidth=k,e.lineCap="butt",e.setLineDash)switch(M){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=h;f&&(n={x:0,y:0});var a,o=l.getNodeShape(t),s=(r+N+(k+R))/r,u=(i+N+(k+R))/i,c=r*s,d=i*u,p=l.nodeShapes[o].points;if(f&&(a=G(c,d,o,p).path),"ellipse"===o)l.drawEllipsePath(a||e,n.x,n.y,c,d);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(o)){var g=0,v=0,y=0;"round-diamond"===o?g=1.4*(N+R+k):"round-heptagon"===o?(g=1.075*(N+R+k),y=-(N/2+R+k)/35):"round-hexagon"===o?g=1.12*(N+R+k):"round-pentagon"===o?(g=1.13*(N+R+k),y=-(N/2+R+k)/15):"round-tag"===o?(g=1.12*(N+R+k),v=.07*(N/2+k+R)):"round-triangle"===o&&(g=(N+R+k)*(Math.PI/2),y=-(N+R/2+k)/Math.PI),0!==g&&(s=(r+g)/r,u=(i+g)/i),l.drawRoundPolygonPath(a||e,n.x+v,n.y+y,r*s,i*u,p)}else["roundrectangle","round-rectangle"].includes(o)?l.drawRoundRectanglePath(a||e,n.x,n.y,c,d):["cutrectangle","cut-rectangle"].includes(o)?l.drawCutRectanglePath(a||e,n.x,n.y,c,d):["bottomroundrectangle","bottom-round-rectangle"].includes(o)?l.drawBottomRoundRectanglePath(a||e,n.x,n.y,c,d):"barrel"===o?l.drawBarrelPath(a||e,n.x,n.y,c,d):o.startsWith("polygon")||["rhomboid","right-rhomboid","round-tag","tag","vee"].includes(o)?(p=Qn(Jn(p,(N+k+R)/r)),l.drawPolygonPath(a||e,n.x,n.y,r,i,p)):(p=Qn(Jn(p,-(N+k+R)/r)),l.drawPolygonPath(a||e,n.x,n.y,r,i,p));if(f?e.stroke(a):e.stroke(),"double"===M){e.lineWidth=N/3;var m=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",f?e.stroke(a):e.stroke(),e.globalCompositeOperation=m}e.setLineDash&&e.setLineDash([])}},K=function(){o&&l.drawNodeOverlay(e,t,h,r,i)},Z=function(){o&&l.drawNodeUnderlay(e,t,h,r,i)},Q=function(){l.drawElementText(e,t,null,a)};if("yes"===t.pstyle("ghost").value){var J=t.pstyle("ghost-offset-x").pfValue,ee=t.pstyle("ghost-offset-y").pfValue,te=t.pstyle("ghost-opacity").value,ne=te*g;e.translate(J,ee),z(),$(),B(te*A),U(),j(ne,!0),F(te*O),W(),H(0!==C||0!==N),j(ne,!1),q(ne),e.translate(-J,-ee)}f&&e.translate(-h.x,-h.y),Z(),f&&e.translate(h.x,h.y),z(),$(),B(),U(),j(g,!0),F(),W(),H(0!==C||0!==N),j(g,!1),q(),f&&e.translate(-h.x,-h.y),Q(),K(),n&&e.translate(p.x1,p.y1)}}},Id=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n,r,i,a){var o=this;if(n.visible()){var s=n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-opacity")).value,u=n.pstyle("".concat(e,"-color")).value,c=n.pstyle("".concat(e,"-shape")).value;if(l>0){if(r=r||n.position(),null==i||null==a){var h=n.padding();i=n.width()+2*h,a=n.height()+2*h}o.colorFillStyle(t,u[0],u[1],u[2],l),o.nodeShapes[c].draw(t,r.x,r.y,i+2*s,a+2*s),t.fill()}}}};kd.drawNodeOverlay=Id("overlay"),kd.drawNodeUnderlay=Id("underlay"),kd.hasPie=function(e){return(e=e[0])._private.hasPie},kd.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),a=t.pstyle("pie-size"),o=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,h=0;this.usePaths()&&(o=0,s=0),"%"===a.units?c*=a.pfValue:void 0!==a.pfValue&&(c=a.pfValue/2);for(var d=1;d<=i.pieBackgroundN;d++){var p=t.pstyle("pie-"+d+"-background-size").value,g=t.pstyle("pie-"+d+"-background-color").value,f=t.pstyle("pie-"+d+"-background-opacity").value*n,v=p/100;v+h>1&&(v=1-h);var y=1.5*Math.PI+2*Math.PI*h,m=y+2*Math.PI*v;0===p||h>=1||h+v>1||(e.beginPath(),e.moveTo(o,s),e.arc(o,s,c,y,m),e.closePath(),this.colorFillStyle(e,g[0],g[1],g[2],f),e.fill(),h+=v)}};var Md={},Pd=100;Md.getPixelRatio=function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t},Md.paintCache=function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;io.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!h&&(c[o.NODE]=!0,c[o.SELECT_BOX]=!0);var m=l.style(),b=l.zoom(),x=void 0!==i?i:b,w=l.pan(),E={x:w.x,y:w.y},T={zoom:b,pan:{x:w.x,y:w.y}},_=o.prevViewport;void 0===_||T.zoom!==_.zoom||T.pan.x!==_.pan.x||T.pan.y!==_.pan.y||f&&!g||(o.motionBlurPxRatio=1),a&&(E=a),x*=s,E.x*=s,E.y*=s;var D=o.getCachedZSortedEles();function C(e,t,n,r,i){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",o.colorFillStyle(e,255,255,255,o.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=a}function N(e,r){var s,l,c,h;o.clearingMotionBlur||e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]?(s=E,l=x,c=o.canvasWidth,h=o.canvasHeight):(s={x:w.x*p,y:w.y*p},l=b*p,c=o.canvasWidth*p,h=o.canvasHeight*p),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?C(e,0,0,c,h):t||void 0!==r&&!r||e.clearRect(0,0,c,h),n||(e.translate(s.x,s.y),e.scale(l,l)),a&&e.translate(a.x,a.y),i&&e.scale(i,i)}if(h||(o.textureDrawLastFrame=!1),h){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=l.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var A=o.data.bufferContexts[o.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:s*o.textureMult}),(T=o.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:o.canvasWidth,height:o.canvasHeight}).mpan={x:(0-T.pan.x)/T.zoom,y:(0-T.pan.y)/T.zoom}}c[o.DRAG]=!1,c[o.NODE]=!1;var L=u.contexts[o.NODE],S=o.textureCache.texture;T=o.textureCache.viewport,L.setTransform(1,0,0,1,0,0),d?C(L,0,0,T.width,T.height):L.clearRect(0,0,T.width,T.height);var O=m.core("outside-texture-bg-color").value,k=m.core("outside-texture-bg-opacity").value;o.colorFillStyle(L,O[0],O[1],O[2],k),L.fillRect(0,0,T.width,T.height),b=l.zoom(),N(L,!1),L.clearRect(T.mpan.x,T.mpan.y,T.width/T.zoom/s,T.height/T.zoom/s),L.drawImage(S,T.mpan.x,T.mpan.y,T.width/T.zoom/s,T.height/T.zoom/s)}else o.textureOnViewport&&!t&&(o.textureCache=null);var I=l.extent(),M=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),P=o.hideEdgesOnViewport&&M,R=[];if(R[o.NODE]=!c[o.NODE]&&d&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,R[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),R[o.DRAG]=!c[o.DRAG]&&d&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,R[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),c[o.NODE]||n||r||R[o.NODE]){var B=d&&!R[o.NODE]&&1!==p;N(L=t||(B?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:u.contexts[o.NODE]),d&&!B?"motionBlur":void 0),P?o.drawCachedNodes(L,D.nondrag,s,I):o.drawLayeredElements(L,D.nondrag,s,I),o.debug&&o.drawDebugPoints(L,D.nondrag),n||d||(c[o.NODE]=!1)}if(!r&&(c[o.DRAG]||n||R[o.DRAG])&&(B=d&&!R[o.DRAG]&&1!==p,N(L=t||(B?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:u.contexts[o.DRAG]),d&&!B?"motionBlur":void 0),P?o.drawCachedNodes(L,D.drag,s,I):o.drawCachedElements(L,D.drag,s,I),o.debug&&o.drawDebugPoints(L,D.drag),n||d||(c[o.DRAG]=!1)),o.showFps||!r&&c[o.SELECT_BOX]&&!n){if(N(L=t||u.contexts[o.SELECT_BOX]),1==o.selection[4]&&(o.hoverData.selecting||o.touchData.selecting)){b=o.cy.zoom();var F=m.core("selection-box-border-width").value/b;L.lineWidth=F,L.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",L.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),F>0&&(L.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",L.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(u.bgActivePosistion&&!o.hoverData.selecting){b=o.cy.zoom();var z=u.bgActivePosistion;L.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",L.beginPath(),L.arc(z.x,z.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),L.fill()}var G=o.lastRedrawTime;if(o.showFps&&G){G=Math.round(G);var Y=Math.round(1e3/G);L.setTransform(1,0,0,1,0,0),L.fillStyle="rgba(255, 0, 0, 0.75)",L.strokeStyle="rgba(255, 0, 0, 0.75)",L.lineWidth=1,L.fillText("1 frame = "+G+" ms = "+Y+" fps",0,20);var X=60;L.strokeRect(0,30,250,20),L.fillRect(0,30,250*Math.min(Y/X,1),20)}n||(c[o.SELECT_BOX]=!1)}if(d&&1!==p){var V=u.contexts[o.NODE],U=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],j=u.contexts[o.DRAG],H=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],q=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!y?e.clearRect(0,0,o.canvasWidth,o.canvasHeight):C(e,0,0,o.canvasWidth,o.canvasHeight);var r=p;e.drawImage(t,0,0,o.canvasWidth*r,o.canvasHeight*r,0,0,o.canvasWidth,o.canvasHeight)};(c[o.NODE]||R[o.NODE])&&(q(V,U,R[o.NODE]),c[o.NODE]=!1),(c[o.DRAG]||R[o.DRAG])&&(q(j,H,R[o.DRAG]),c[o.DRAG]=!1)}o.prevViewport=T,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),d&&(o.motionBlurTimeout=setTimeout((function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!h,o.mbFrames=0,c[o.NODE]=!0,c[o.DRAG]=!0,o.redraw()}),Pd)),t||l.emit("render")};for(var Rd={drawPolygonPath:function(e,t,n,r,i,a){var o=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*a[0],n+s*a[1]);for(var l=1;l0&&a>0){d.clearRect(0,0,i,a),d.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(e.full)d.translate(-n.x1*l,-n.y1*l),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(n.x1*l,n.y1*l);else{var g=t.pan(),f={x:g.x*l,y:g.y*l};l*=t.zoom(),d.translate(f.x,f.y),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(-f.x,-f.y)}e.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=e.bg,d.rect(0,0,i,a),d.fill())}return h},Vd.png=function(e){return Hd(e,this.bufferCanvasImage(e),"image/png")},Vd.jpg=function(e){return Hd(e,this.bufferCanvasImage(e),"image/jpeg")};var qd={nodeShapeImpl:function(e,t,n,r,i,a,o){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,i,a);case"polygon":return this.drawPolygonPath(t,n,r,i,a,o);case"round-polygon":return this.drawRoundPolygonPath(t,n,r,i,a,o);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,n,r,i,a);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,n,r,i,a);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,n,r,i,a);case"barrel":return this.drawBarrelPath(t,n,r,i,a)}}},Wd=Kd,$d=Kd.prototype;function Kd(e){var t=this;t.data={canvases:new Array($d.CANVAS_LAYERS),contexts:new Array($d.CANVAS_LAYERS),canvasNeedsRedraw:new Array($d.CANVAS_LAYERS),bufferCanvases:new Array($d.BUFFER_COUNT),bufferContexts:new Array($d.CANVAS_LAYERS)};var n="-webkit-tap-highlight-color",r="rgba(0,0,0,0)";t.data.canvasContainer=document.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[n]=r,i.position="relative",i.zIndex="0",i.overflow="hidden";var a=e.cy.container();a.appendChild(t.data.canvasContainer),a.style[n]=r;var o={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};B()&&(o["-ms-touch-action"]="none",o["touch-action"]="none");for(var s=0;s<$d.CANVAS_LAYERS;s++){var l=t.data.canvases[s]=document.createElement("canvas");t.data.contexts[s]=l.getContext("2d"),Object.keys(o).forEach((function(e){l.style[e]=o[e]})),l.style.position="absolute",l.setAttribute("data-id","layer"+s),l.style.zIndex=String($d.CANVAS_LAYERS-s),t.data.canvasContainer.appendChild(l),t.data.canvasNeedsRedraw[s]=!1}for(t.data.topCanvas=t.data.canvases[0],t.data.canvases[$d.NODE].setAttribute("data-id","layer"+$d.NODE+"-node"),t.data.canvases[$d.SELECT_BOX].setAttribute("data-id","layer"+$d.SELECT_BOX+"-selectbox"),t.data.canvases[$d.DRAG].setAttribute("data-id","layer"+$d.DRAG+"-drag"),s=0;s<$d.BUFFER_COUNT;s++)t.data.bufferCanvases[s]=document.createElement("canvas"),t.data.bufferContexts[s]=t.data.bufferCanvases[s].getContext("2d"),t.data.bufferCanvases[s].style.position="absolute",t.data.bufferCanvases[s].setAttribute("data-id","buffer"+s),t.data.bufferCanvases[s].style.zIndex=String(-s-1),t.data.bufferCanvases[s].style.visibility="hidden";t.pathsEnabled=!0;var u=Ln(),c=function(e){return{x:(e.x1+e.x2)/2,y:(e.y1+e.y2)/2}},h=function(e){return{x:-e.w/2,y:-e.h/2}},d=function(e){var t=e[0]._private;return!(t.oldBackgroundTimestamp===t.backgroundTimestamp)},p=function(e){return e[0]._private.nodeKey},g=function(e){return e[0]._private.labelStyleKey},f=function(e){return e[0]._private.sourceLabelStyleKey},v=function(e){return e[0]._private.targetLabelStyleKey},y=function(e,n,r,i,a){return t.drawElement(e,n,r,!1,!1,a)},m=function(e,n,r,i,a){return t.drawElementText(e,n,r,i,"main",a)},b=function(e,n,r,i,a){return t.drawElementText(e,n,r,i,"source",a)},x=function(e,n,r,i,a){return t.drawElementText(e,n,r,i,"target",a)},w=function(e){return e.boundingBox(),e[0]._private.bodyBounds},E=function(e){return e.boundingBox(),e[0]._private.labelBounds.main||u},T=function(e){return e.boundingBox(),e[0]._private.labelBounds.source||u},_=function(e){return e.boundingBox(),e[0]._private.labelBounds.target||u},D=function(e,t){return t},C=function(e){return c(w(e))},N=function(e,t,n){var r=e?e+"-":"";return{x:t.x+n.pstyle(r+"text-margin-x").pfValue,y:t.y+n.pstyle(r+"text-margin-y").pfValue}},A=function(e,t,n){var r=e[0]._private.rscratch;return{x:r[t],y:r[n]}},L=function(e){return N("",A(e,"labelX","labelY"),e)},S=function(e){return N("source",A(e,"sourceLabelX","sourceLabelY"),e)},O=function(e){return N("target",A(e,"targetLabelX","targetLabelY"),e)},k=function(e){return h(w(e))},I=function(e){return h(T(e))},M=function(e){return h(_(e))},P=function(e){var t=E(e),n=h(E(e));if(e.isNode()){switch(e.pstyle("text-halign").value){case"left":n.x=-t.w;break;case"right":n.x=0}switch(e.pstyle("text-valign").value){case"top":n.y=-t.h;break;case"bottom":n.y=0}}return n},R=t.data.eleTxrCache=new qh(t,{getKey:p,doesEleInvalidateKey:d,drawElement:y,getBoundingBox:w,getRotationPoint:C,getRotationOffset:k,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),F=t.data.lblTxrCache=new qh(t,{getKey:g,drawElement:m,getBoundingBox:E,getRotationPoint:L,getRotationOffset:P,isVisible:D}),z=t.data.slbTxrCache=new qh(t,{getKey:f,drawElement:b,getBoundingBox:T,getRotationPoint:S,getRotationOffset:I,isVisible:D}),G=t.data.tlbTxrCache=new qh(t,{getKey:v,drawElement:x,getBoundingBox:_,getRotationPoint:O,getRotationOffset:M,isVisible:D}),Y=t.data.lyrTxrCache=new ud(t);t.onUpdateEleCalcs((function(e,t){R.invalidateElements(t),F.invalidateElements(t),z.invalidateElements(t),G.invalidateElements(t),Y.invalidateElements(t);for(var n=0;nt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=u},function(e,t,n){"use strict";function r(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r},function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),l=n(1),u=n(13),c=n(12),h=n(11);function d(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof o?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in d.prototype=Object.create(r.prototype),r)d[p]=r[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(e,t,n){if(null==t&&null==n){var r=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(t.owner!=n.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=n.owner?null:(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i)},d.prototype.remove=function(e){var t=e;if(e instanceof s){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=t.edges.slice(),r=n.length,i=0;i-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(u,1),a.target!=a.source&&a.target.edges.splice(c,1),-1==(o=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(o,1)}},d.prototype.updateLeftTop=function(){for(var e,t,n,r=i.MAX_VALUE,a=i.MAX_VALUE,o=this.getNodes(),s=o.length,l=0;l(e=u.getTop())&&(r=e),a>(t=u.getLeft())&&(a=t)}return r==i.MAX_VALUE?null:(n=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=a-n,this.top=r-n,new c(this.left,this.top))},d.prototype.updateBounds=function(e){for(var t,n,r,a,o,s=i.MAX_VALUE,l=-i.MAX_VALUE,c=i.MAX_VALUE,h=-i.MAX_VALUE,d=this.nodes,p=d.length,g=0;g(t=f.getLeft())&&(s=t),l<(n=f.getRight())&&(l=n),c>(r=f.getTop())&&(c=r),h<(a=f.getBottom())&&(h=a)}var v=new u(s,c,l-s,h-c);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),o=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=v.x-o,this.right=v.x+v.width+o,this.top=v.y-o,this.bottom=v.y+v.height+o},d.calculateBounds=function(e){for(var t,n,r,a,o=i.MAX_VALUE,s=-i.MAX_VALUE,l=i.MAX_VALUE,c=-i.MAX_VALUE,h=e.length,d=0;d(t=p.getLeft())&&(o=t),s<(n=p.getRight())&&(s=n),l>(r=p.getTop())&&(l=r),c<(a=p.getBottom())&&(c=a)}return new u(o,l,s-o,c-l)},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r=this.nodes.length){var l=0;i.forEach((function(t){t.owner==e&&l++})),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},e.exports=d},function(e,t,n){"use strict";var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(null==n&&null==r&&null==i){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return e.parent=t,t.child=e,e}i=n,n=e;var a=(r=t).getOwner(),o=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==o||o.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var n,a=[],o=(a=a.concat(t.getEdges())).length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=l,n[2]=a,n[3]=b,!1;if(ia)return n[0]=s,n[1]=i,n[2]=y,n[3]=o,!1;if(ra?(n[0]=c,n[1]=h,T=!0):(n[0]=u,n[1]=l,T=!0):D===N&&(r>a?(n[0]=s,n[1]=l,T=!0):(n[0]=d,n[1]=h,T=!0)),-C===N?a>r?(n[2]=m,n[3]=b,_=!0):(n[2]=y,n[3]=v,_=!0):C===N&&(a>r?(n[2]=f,n[3]=v,_=!0):(n[2]=x,n[3]=b,_=!0)),T&&_)return!1;if(r>a?i>o?(A=this.getCardinalDirection(D,N,4),L=this.getCardinalDirection(C,N,2)):(A=this.getCardinalDirection(-D,N,3),L=this.getCardinalDirection(-C,N,1)):i>o?(A=this.getCardinalDirection(-D,N,1),L=this.getCardinalDirection(-C,N,3)):(A=this.getCardinalDirection(D,N,2),L=this.getCardinalDirection(C,N,4)),!T)switch(A){case 1:O=l,S=r+-g/N,n[0]=S,n[1]=O;break;case 2:S=d,O=i+p*N,n[0]=S,n[1]=O;break;case 3:O=h,S=r+g/N,n[0]=S,n[1]=O;break;case 4:S=c,O=i+-p*N,n[0]=S,n[1]=O}if(!_)switch(L){case 1:I=v,k=a+-E/N,n[2]=k,n[3]=I;break;case 2:k=x,I=o+w*N,n[2]=k,n[3]=I;break;case 3:I=b,k=a+E/N,n[2]=k,n[3]=I;break;case 4:k=m,I=o+-w*N,n[2]=k,n[3]=I}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(null==i)return this.getIntersection2(e,t,n);var a,o,s,l,u,c,h,d=e.x,p=e.y,g=t.x,f=t.y,v=n.x,y=n.y,m=i.x,b=i.y;return 0==(h=(a=f-p)*(l=v-m)-(o=b-y)*(s=d-g))?null:new r((s*(c=m*y-v*b)-l*(u=g*p-d*f))/h,(o*u-a*c)/h)},i.angleOfVector=function(e,t,n,r){var i=void 0;return e!==n?(i=Math.atan((r-t)/(n-e)),n0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r},function(e,t,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(u[0]);s.length>0&&t;){var c=s[0];s.splice(0,1),o.add(c);var h=c.getEdges();for(a=0;a-1&&u.splice(f,1)}o=new Set,l=new Map}else e=[]}return e},d.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(h,1),c.getNeighborsList().forEach((function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;1==t&&l.push(e),r.set(e,t)}}))}n=n.concat(l),1!=t.length&&2!=t.length||(i=!0,a=t[0])}return a},d.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=d},function(e,t,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},e.exports=r},function(e,t,n){"use strict";var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return 0!=n&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return 0!=n&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return 0!=n&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return 0!=n&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i},function(e,t,n){"use strict";var r=n(15),i=n(7),a=n(0),o=n(8),s=n(9);function l(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,o,s,l=this.getGraphManager().getAllEdges(),u=0;ui.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o&&this.updateGrid(),a=new Set,e=0;e(l=t.getEstimatedSize()*this.gravityRangeFactor)||s>l)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a):(o>(l=t.getEstimatedSize()*this.compoundGravityRangeFactor)||s>l)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=s.length||u>=s[0].length))for(var c=0;ce}}]),e}();e.exports=a},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=a,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var o=0;o=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{"use strict";n.d(t,{diagram:()=>S});var r=n(43900),i=n(2588),a=n(65500),o=n.n(a),s=n(81176),l=n.n(s),u=n(34176),c=n(67612),h=n(85219),d=(n(62264),n(86208),n(24300),n(1488),n(95536),n(58408),n(128),n(18268),n(75816),n(27280),function(){var e=function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},t=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],o=[1,20],s=[1,19],l=[6,7,8],u=[1,26],c=[1,24],h=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],g=[1,33],f=[1,34],v=[1,6,7,11,13,15,16,19,22],y={trace:function(){},yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace("Stop NL ");break;case 9:r.getLogger().trace("Stop EOF ");break;case 11:r.getLogger().trace("Stop NL2 ");break;case 12:r.getLogger().trace("Stop EOF2 ");break;case 15:r.getLogger().info("Node: ",a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace("Icon: ",a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace("SPACELIST");break;case 19:r.getLogger().trace("Node: ",a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace("node found ..",a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace("node found ..",a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])}}},table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},{6:n,9:22,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},{6:u,7:c,10:23,11:h},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:s}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:c,10:32,11:h},{1:[2,7],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},e(p,[2,14],{7:g,11:f}),e(v,[2,8]),e(v,[2,9]),e(v,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(p,[2,13],{7:g,11:f}),e(v,[2,11]),e(v,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e)},parse:function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",l=0,u=0,c=a.slice.call(arguments,1),h=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);h.setInput(e,d.yy),d.yy.lexer=h,d.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var g=h.yylloc;a.push(g);var f=h.options&&h.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var v,y,m,b,x,w,E,T,_,D={};;){if(y=n[n.length-1],this.defaultActions[y]?m=this.defaultActions[y]:(null==v&&(_=void 0,"number"!=typeof(_=r.pop()||h.lex()||1)&&(_ instanceof Array&&(_=(r=_).pop()),_=t.symbols_[_]||_),v=_),m=o[y]&&o[y][v]),void 0===m||!m.length||!m[0]){var C="";for(x in T=[],o[y])this.terminals_[x]&&x>2&&T.push("'"+this.terminals_[x]+"'");C=h.showPosition?"Parse error on line "+(l+1)+":\n"+h.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==v?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(C,{text:h.match,token:this.terminals_[v]||v,line:h.yylineno,loc:g,expected:T})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+v);switch(m[0]){case 1:n.push(v),i.push(h.yytext),a.push(h.yylloc),n.push(m[1]),v=null,u=h.yyleng,s=h.yytext,l=h.yylineno,g=h.yylloc;break;case 2:if(w=this.productions_[m[1]][1],D.$=i[i.length-w],D._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},f&&(D._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(b=this.performAction.apply(D,[s,u,l,d.yy,m[1],i,a].concat(c))))return b;w&&(n=n.slice(0,-1*w*2),i=i.slice(0,-1*w),a=a.slice(0,-1*w)),n.push(this.productions_[m[1]][0]),i.push(D.$),a.push(D._$),E=o[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},m={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(e,t,n,r){switch(n){case 0:e.getLogger().trace("Found comment",t.yytext);break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 22:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 24:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 25:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 26:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 27:case 30:case 31:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 28:case 29:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 32:case 33:return e.getLogger().trace("Long description:",t.yytext),20}},rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\-\)\{\}]+)/i,/^(?:$)/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR:{rules:[22,23],inclusive:!1},NODE:{rules:[21,24,25,26,27,28,29,30,31,32,33],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};function b(){this.yy={}}return y.lexer=m,b.prototype=y,y.Parser=b,new b}());d.parser=d;const p=d,g=e=>(0,r.n)(e,(0,r.g)());let f=[],v=0,y={};const m={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},b=(e,t)=>{y[e]=t},x=e=>{switch(e){case m.DEFAULT:return"no-border";case m.RECT:return"rect";case m.ROUNDED_RECT:return"rounded-rect";case m.CIRCLE:return"circle";case m.CLOUD:return"cloud";case m.BANG:return"bang";case m.HEXAGON:return"hexgon";default:return"no-border"}};let w;const E=e=>y[e],T=Object.freeze(Object.defineProperty({__proto__:null,addNode:(e,t,n,i)=>{r.l.info("addNode",e,t,n,i);const a=(0,r.g)(),o={id:v++,nodeId:g(t),level:e,descr:g(n),type:i,children:[],width:(0,r.g)().mindmap.maxNodeWidth};switch(o.type){case m.ROUNDED_RECT:case m.RECT:case m.HEXAGON:o.padding=2*a.mindmap.padding;break;default:o.padding=a.mindmap.padding}const s=function(e){for(let t=f.length-1;t>=0;t--)if(f[t].level{f=[],v=0,y={}},decorateNode:e=>{const t=f[f.length-1];e&&e.icon&&(t.icon=g(e.icon)),e&&e.class&&(t.class=g(e.class))},getElementById:E,getLogger:()=>r.l,getMindmap:()=>f.length>0?f[0]:null,getNodeById:e=>f[e],getType:(e,t)=>{switch(r.l.debug("In get type",e,t),e){case"[":return m.RECT;case"(":return")"===t?m.ROUNDED_RECT:m.CLOUD;case"((":return m.CIRCLE;case")":return m.CLOUD;case"))":return m.BANG;case"{{":return m.HEXAGON;default:return m.DEFAULT}},nodeType:m,get parseError(){return w},sanitizeText:g,setElementForId:b,setErrorHandler:e=>{w=e},type2Str:x},Symbol.toStringTag,{value:"Module"}));function _(e,t){e.each((function(){var e,n=(0,i.MlD)(this),r=n.text().split(/(\s+|
)/).reverse(),a=[],o=n.attr("y"),s=parseFloat(n.attr("dy")),l=n.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",s+"em");for(let i=0;it||"
"===e)&&(a.pop(),l.text(a.join(" ").trim()),a="
"===e?[""]:[e],l=n.append("tspan").attr("x",0).attr("y",o).attr("dy","1.1em").text(e))}))}const D=function(e,t,n,r){const i=n%11,a=e.append("g");t.section=i;let o="section-"+i;i<0&&(o+=" section-root"),a.attr("class",(t.class?t.class+" ":"")+"mindmap-node "+o);const s=a.append("g"),l=a.append("g"),u=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(_,t.width).node().getBBox(),c=r.fontSize.replace?r.fontSize.replace("px",""):r.fontSize;if(t.height=u.height+1.1*c*.5+t.padding,t.width=u.width+2*t.padding,t.icon)if(t.type===m.CIRCLE){t.height+=50,t.width+=50;a.append("foreignObject").attr("height","50px").attr("width",t.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+t.icon),l.attr("transform","translate("+t.width/2+", "+(t.height/2-1.5*t.padding)+")")}else{t.width+=50;const e=t.height;t.height=Math.max(e,60);const n=Math.abs(t.height-e);a.append("foreignObject").attr("width","60px").attr("height",t.height).attr("style","text-align: center;margin-top:"+n/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+i+" "+t.icon),l.attr("transform","translate("+(25+t.width/2)+", "+(n/2+t.padding/2)+")")}else l.attr("transform","translate("+t.width/2+", "+t.padding/2+")");switch(t.type){case m.DEFAULT:!function(e,t,n){e.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("d",`M0 ${t.height-5} v${10-t.height} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)}(s,t,i);break;case m.ROUNDED_RECT:!function(e,t){e.append("rect").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("height",t.height).attr("rx",t.padding).attr("ry",t.padding).attr("width",t.width)}(s,t);break;case m.RECT:!function(e,t){e.append("rect").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("height",t.height).attr("width",t.width)}(s,t);break;case m.CIRCLE:s.attr("transform","translate("+t.width/2+", "+ +t.height/2+")"),function(e,t){e.append("circle").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("r",t.width/2)}(s,t);break;case m.CLOUD:!function(e,t){const n=t.width,r=t.height,i=.15*n,a=.25*n,o=.35*n,s=.2*n;e.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("d",`M0 0 a${i},${i} 0 0,1 ${.25*n},${-1*n*.1}\n a${o},${o} 1 0,1 ${.4*n},${-1*n*.1}\n a${a},${a} 1 0,1 ${.35*n},${1*n*.2}\n\n a${i},${i} 1 0,1 ${.15*n},${1*r*.35}\n a${s},${s} 1 0,1 ${-1*n*.15},${1*r*.65}\n\n a${a},${i} 1 0,1 ${-1*n*.25},${.15*n}\n a${o},${o} 1 0,1 ${-1*n*.5},0\n a${i},${i} 1 0,1 ${-1*n*.25},${-1*n*.15}\n\n a${i},${i} 1 0,1 ${-1*n*.1},${-1*r*.35}\n a${s},${s} 1 0,1 ${.1*n},${-1*r*.65}\n\n H0 V0 Z`)}(s,t);break;case m.BANG:!function(e,t){const n=t.width,r=t.height,i=.15*n;e.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+x(t.type)).attr("d",`M0 0 a${i},${i} 1 0,0 ${.25*n},${-1*r*.1}\n a${i},${i} 1 0,0 ${.25*n},0\n a${i},${i} 1 0,0 ${.25*n},0\n a${i},${i} 1 0,0 ${.25*n},${1*r*.1}\n\n a${i},${i} 1 0,0 ${.15*n},${1*r*.33}\n a${.8*i},${.8*i} 1 0,0 0,${1*r*.34}\n a${i},${i} 1 0,0 ${-1*n*.15},${1*r*.33}\n\n a${i},${i} 1 0,0 ${-1*n*.25},${.15*r}\n a${i},${i} 1 0,0 ${-1*n*.25},0\n a${i},${i} 1 0,0 ${-1*n*.25},0\n a${i},${i} 1 0,0 ${-1*n*.25},${-1*r*.15}\n\n a${i},${i} 1 0,0 ${-1*n*.1},${-1*r*.33}\n a${.8*i},${.8*i} 1 0,0 0,${-1*r*.34}\n a${i},${i} 1 0,0 ${.1*n},${-1*r*.33}\n\n H0 V0 Z`)}(s,t);break;case m.HEXAGON:!function(e,t){const n=t.height,r=n/4,i=t.width-t.padding+2*r;!function(e,t,n,r,i){e.insert("polygon",":first-child").attr("points",r.map((function(e){return e.x+","+e.y})).join(" ")).attr("transform","translate("+(i.width-t)/2+", "+n+")")}(e,i,n,[{x:r,y:0},{x:i-r,y:0},{x:i,y:-n/2},{x:i-r,y:-n},{x:r,y:-n},{x:0,y:-n/2}],t)}(s,t)}return b(t.id,a),t.height},C=function(e){const t=E(e.id),n=e.x||0,r=e.y||0;t.attr("transform","translate("+n+","+r+")")};function N(e,t,n,r){D(e,t,n,r),t.children&&t.children.forEach(((t,i)=>{N(e,t,n<0?i:n,r)}))}function A(e,t,n,r){t.add({group:"nodes",data:{id:e.id,labelText:e.descr,height:e.height,width:e.width,level:r,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach((i=>{A(i,t,n,r+1),t.add({group:"edges",data:{id:`${e.id}_${i.id}`,source:e.id,target:i.id,depth:r,section:i.section}})}))}function L(e,t){return new Promise((n=>{const a=(0,i.MlD)("body").append("div").attr("id","cy").attr("style","display:none"),s=o()({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});a.remove(),A(e,s,t,0),s.nodes().forEach((function(e){e.layoutDimensions=()=>{const t=e.data();return{w:t.width,h:t.height}}})),s.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),s.ready((e=>{r.l.info("Ready",e),n(s)}))}))}o().use(l());const S={db:T,renderer:{draw:async(e,t,n,a)=>{const o=(0,r.g)();a.db.clear(),a.parser.parse(e),r.l.debug("Renering info diagram\n"+e);const s=(0,r.g)().securityLevel;let l;"sandbox"===s&&(l=(0,i.MlD)("#i"+t));const u=("sandbox"===s?(0,i.MlD)(l.nodes()[0].contentDocument.body):(0,i.MlD)("body")).select("#"+t);u.append("g");const c=a.db.getMindmap(),h=u.append("g");h.attr("class","mindmap-edges");const d=u.append("g");d.attr("class","mindmap-nodes"),N(d,c,-1,o);const p=await L(c,o);!function(e,t){t.edges().map(((t,n)=>{const i=t.data();if(t[0]._private.bodyBounds){const a=t[0]._private.rscratch;r.l.trace("Edge: ",n,i),e.insert("path").attr("d",`M ${a.startX},${a.startY} L ${a.midX},${a.midY} L${a.endX},${a.endY} `).attr("class","edge section-edge-"+i.section+" edge-depth-"+i.depth)}}))}(h,p),function(e){e.nodes().map(((e,t)=>{const n=e.data();n.x=e.position().x,n.y=e.position().y,C(n);const i=E(n.nodeId);r.l.info("Id:",t,"Position: (",e.position().x,", ",e.position().y,")",n),i.attr("transform",`translate(${e.position().x-n.width/2}, ${e.position().y-n.height/2})`),i.attr("attr",`apa-${t})`)}))}(p),(0,r.s)(void 0,u,o.mindmap.padding,o.mindmap.useMaxWidth)}},parser:p,styles:e=>`\n .edge {\n stroke-width: 3;\n }\n ${(e=>{let t="";for(let n=0;n{"use strict";n.d(t,{c:()=>s});var r=n(89612),i=n(72120);const a=e=>{const{r:t,g:n,b:a}=i.c.parse(e),o=.2126*r.c.channel.toLinear(t)+.7152*r.c.channel.toLinear(n)+.0722*r.c.channel.toLinear(a);return r.c.lang.round(o)},o=e=>a(e)>=.5,s=e=>!o(e)}}]); \ No newline at end of file diff --git a/assets/js/592.9a184a6c.js.LICENSE.txt b/assets/js/592.9a184a6c.js.LICENSE.txt new file mode 100644 index 00000000..a58daed4 --- /dev/null +++ b/assets/js/592.9a184a6c.js.LICENSE.txt @@ -0,0 +1,9 @@ +/*! + Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable + Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) + Licensed under The MIT License (http://opensource.org/licenses/MIT) + */ + +/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ + +/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ diff --git a/assets/js/744.791b79ef.js b/assets/js/744.791b79ef.js new file mode 100644 index 00000000..76a4283a --- /dev/null +++ b/assets/js/744.791b79ef.js @@ -0,0 +1,73 @@ +/*! For license information please see 744.791b79ef.js.LICENSE.txt */ +(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[744],{24292:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>A});var r=n(45072),i=n(11504),s=n(92580),a=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=(0,s.c)((function(e){return a.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=n(82748),c=n(56572),h=n(11758),u=n(72476),d=o,p=function(e){return"theme"!==e},f=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?d:p},m=function(e,t,n){var r;if(t){var i=t.shouldForwardProp;r=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,c.Up)(t,n,r),(0,u.A)((function(){return(0,c.aE)(t,n,r)})),null},A=function e(t,n){var s,a,o=t.__emotion_real===t,u=o&&t.__emotion_base||t;void 0!==n&&(s=n.label,a=n.target);var d=m(t,n,o),p=d||f(u),A=!p("as");return function(){var v=arguments,y=o&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==s&&y.push("label:"+s+";"),null==v[0]||void 0===v[0].raw)y.push.apply(y,v);else{0,y.push(v[0][0]);for(var x=v.length,b=1;b{"use strict";n.d(t,{Iu:()=>h,yg:()=>f});var r=n(11504);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},h=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,s=e.originalType,l=e.parentName,h=o(e,["components","mdxType","originalType","parentName"]),u=c(n),p=i,f=u["".concat(l,".").concat(p)]||u[p]||d[p]||s;return n?r.createElement(f,a(a({ref:t},h),{},{components:n})):r.createElement(f,a({ref:t},h))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var s=n.length,a=new Array(s);a[0]=p;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[u]="string"==typeof e?e:i,a[1]=o;for(var c=2;c{"use strict";n.r(t),n.d(t,{AdaptiveDpr:()=>ag,AdaptiveEvents:()=>og,ArcballControls:()=>zo,Backdrop:()=>Wf,BakeShadows:()=>eg,Billboard:()=>Oi,Bounds:()=>Mf,Box:()=>$p,CameraShake:()=>Bf,Center:()=>bf,Circle:()=>ef,Clone:()=>ro,Cloud:()=>hm,ComputedAttribute:()=>$a,Cone:()=>tf,ContactShadows:()=>Qf,CubeCamera:()=>ao,CubicBezierLine:()=>us,CurveModifier:()=>kp,CycleRaycast:()=>v,Cylinder:()=>nf,Detailed:()=>Zm,DeviceOrientationControls:()=>ho,Dodecahedron:()=>ff,Edges:()=>Ga,Effects:()=>Da,Environment:()=>Uf,EnvironmentCube:()=>kf,EnvironmentMap:()=>Of,EnvironmentPortal:()=>Nf,Extrude:()=>mf,FirstPersonControls:()=>hl,Float:()=>Rf,FlyControls:()=>go,GizmoHelper:()=>bl,GizmoViewcube:()=>Fl,GizmoViewport:()=>Nl,GradientTexture:()=>La,Html:()=>A,Icosahedron:()=>df,Image:()=>ka,Instance:()=>Hm,Instances:()=>jm,IsObject:()=>Ua,Lathe:()=>gf,Lightformer:()=>Zf,Line:()=>ls,Loader:()=>S,MapControls:()=>Mo,Merged:()=>Wm,MeshDistortMaterial:()=>zp,MeshReflectorMaterial:()=>Xp,MeshWobbleMaterial:()=>Vp,Octahedron:()=>pf,OrbitControls:()=>wo,OrthographicCamera:()=>io,PerspectiveCamera:()=>so,Plane:()=>sf,Point:()=>Tm,PointMaterial:()=>qp,PointMaterialImpl:()=>Yp,PointerLockControls:()=>sl,Points:()=>Bm,PointsBuffer:()=>Im,Polyhedron:()=>uf,PositionalAudio:()=>ds,Preload:()=>$m,PresentationControls:()=>gi,QuadraticBezierLine:()=>hs,Reflector:()=>Yf,Ring:()=>hf,RoundedBox:()=>vf,Sampler:()=>Za,ScreenQuad:()=>xf,Scroll:()=>P,ScrollControls:()=>I,Segment:()=>Jm,Segments:()=>qm,Select:()=>Fi,Shadow:()=>Xf,Sky:()=>sm,Sphere:()=>rf,SpotLight:()=>Jf,Stage:()=>Hf,Stars:()=>lm,Stats:()=>Uu,Tetrahedron:()=>cf,Text:()=>fa,Torus:()=>of,TorusKnot:()=>lf,TrackballControls:()=>Bo,Trail:()=>Ya,TransformControls:()=>qo,Tube:()=>af,calcPosFromAngles:()=>im,isWebGL2Available:()=>Pa,meshBounds:()=>sg,shaderMaterial:()=>Fa,softShadows:()=>Jp,useAnimations:()=>Cp,useAspect:()=>ku,useBVH:()=>Mp,useBounds:()=>wf,useBoxProjectedEnv:()=>Dp,useCamera:()=>ul,useContextBridge:()=>wp,useCubeTexture:()=>kl,useCursor:()=>y,useDepthBuffer:()=>Nu,useDetectGPU:()=>Ju,useFBO:()=>Ou,useFBX:()=>Vc,useGLTF:()=>Yh,useGizmoContext:()=>pl,useHelper:()=>Zu,useIntersect:()=>Tp,useKTX2:()=>Pu,useMatcapTexture:()=>pm,useNormalTexture:()=>gm,useProgress:()=>E,useScroll:()=>T,useSelect:()=>Ui,useTexture:()=>Oa,useTrail:()=>Xa});var r=n(45072),i=n(11504),s=n(97104),a=n(79224),o=n(44644);const l=new a.Vector3,c=new a.Vector3,h=new a.Vector3;function u(e,t,n){const r=l.setFromMatrixPosition(e.matrixWorld);r.project(t);const i=n.width/2,s=n.height/2;return[r.x*i+i,-r.y*s+s]}const d=e=>Math.abs(e)<1e-10?0:e;function p(e,t,n=""){let r="matrix3d(";for(let i=0;16!==i;i++)r+=d(t[i]*e.elements[i])+(15!==i?",":")");return n+r}const f=(m=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>p(e,m));var m;const g=(e,t)=>p(e,(e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1])(t),"translate(-50%,-50%)"),A=i.forwardRef((({children:e,eps:t=.001,style:n,className:p,prepend:m,center:A,fullscreen:v,portal:y,distanceFactor:x,sprite:b=!1,transform:E=!1,occlude:_,onOcclude:S,zIndexRange:M=[16777271,0],calculatePosition:w=u,as:C="div",wrapperClass:T,pointerEvents:I="auto",...B},R)=>{var P;const D=(0,o.useThree)((({gl:e})=>e)),L=(0,o.useThree)((({camera:e})=>e)),F=(0,o.useThree)((({scene:e})=>e)),U=(0,o.useThree)((({size:e})=>e)),O=(0,o.useThree)((({raycaster:e})=>e)),[N]=i.useState((()=>document.createElement(C))),k=i.useRef(null),G=i.useRef(0),z=i.useRef([0,0]),Q=i.useRef(null),V=i.useRef(null),H=null!==(P=null==y?void 0:y.current)&&void 0!==P?P:D.domElement.parentNode;i.useEffect((()=>{if(k.current){if(F.updateMatrixWorld(),E)N.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const e=w(k.current,L,U);N.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}return H&&(m?H.prepend(N):H.appendChild(N)),()=>{H&&H.removeChild(N),s.unmountComponentAtNode(N)}}}),[H,E]),i.useLayoutEffect((()=>{T&&(N.className=T)}),[T]);const j=i.useMemo((()=>E?{position:"absolute",top:0,left:0,width:U.width,height:U.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:A?"translate3d(-50%,-50%,0)":"none",...v&&{top:-U.height/2,left:-U.width/2,width:U.width,height:U.height},...n}),[n,A,v,U,E]),W=i.useMemo((()=>({position:"absolute",pointerEvents:I})),[I]);i.useLayoutEffect((()=>{E?s.render(i.createElement("div",{ref:Q,style:j},i.createElement("div",{ref:V,style:W},i.createElement("div",{ref:R,className:p,style:n,children:e}))),N):s.render(i.createElement("div",{ref:R,style:j,className:p,children:e}),N)}));const X=i.useRef(!0);return(0,o.useFrame)((()=>{if(k.current){L.updateMatrixWorld(),k.current.updateWorldMatrix(!0,!1);const e=E?z.current:w(k.current,L,U);if(E||Math.abs(G.current-L.zoom)>t||Math.abs(z.current[0]-e[0])>t||Math.abs(z.current[1]-e[1])>t){const t=function(e,t){const n=l.setFromMatrixPosition(e.matrixWorld),r=c.setFromMatrixPosition(t.matrixWorld),i=n.sub(r),s=t.getWorldDirection(h);return i.angleTo(s)>Math.PI/2}(k.current,L);let n=!1;"boolean"==typeof _?!0===_&&(n=[F]):Array.isArray(_)&&(n=_.map((e=>e.current)));const r=X.current;if(n){const e=function(e,t,n,r){const i=l.setFromMatrixPosition(e.matrixWorld),s=i.clone();s.project(t),n.setFromCamera(s,t);const a=n.intersectObjects(r,!0);if(a.length){const e=a[0].distance;return i.distanceTo(n.ray.origin)e.raycaster)),c=(0,o.useThree)((e=>e.get)),h=(0,o.useThree)((e=>e.gl));return i.useEffect((()=>{var i;let o,u=[];const d=l.filter,p=null!==(i=null==t?void 0:t.current)&&void 0!==i?i:h.domElement.parentNode,f=()=>p&&e&&e(u,Math.round(a.current)%u.length);l.filter=(e,t)=>{let n=[...e];n.length===u.length&&u.every((e=>n.map((e=>e.object.uuid)).includes(e.object.uuid)))||(a.current=0,u=n,f()),d&&(n=d(n,t));for(let r=0;r{var t,n;a.current=e(a.current),null==(t=c().events.handlers)||t.onPointerCancel(void 0),null==(n=c().events.handlers)||n.onPointerMove(o),f()},g=e=>{(e.keyCode||e.which===s)&&(n&&e.preventDefault(),u.length>1&&m((e=>e+1)))},A=e=>{n&&e.preventDefault();let t=0;e||(e=window.event),e.wheelDelta?t=e.wheelDelta/120:e.detail&&(t=-e.detail/3),u.length>1&&m((e=>Math.abs(e-t)))},v=e=>o=e;return document.addEventListener("pointermove",v,{passive:!0}),r&&document.addEventListener("wheel",A),void 0!==s&&document.addEventListener("keydown",g),()=>{l.filter=d,void 0!==s&&document.removeEventListener("keydown",g),r&&document.removeEventListener("wheel",A),document.removeEventListener("pointermove",v)}}),[h,c,l,n,r,s]),null}function y(e,t="pointer",n="auto"){i.useEffect((()=>{if(e)return document.body.style.cursor=t,()=>{document.body.style.cursor=n}}),[e])}var x=n(52584);let b=0;const E=(0,x.c)((e=>(a.DefaultLoadingManager.onStart=(t,n,r)=>{e({active:!0,item:t,loaded:n,total:r,progress:(n-b)/(r-b)*100})},a.DefaultLoadingManager.onLoad=()=>{e({active:!1})},a.DefaultLoadingManager.onError=t=>e((e=>({errors:[...e.errors,t]}))),a.DefaultLoadingManager.onProgress=(t,n,r)=>{n===r&&(b=r),e({active:!0,item:t,loaded:n,total:r,progress:(n-b)/(r-b)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}))),_=e=>`Loading ${e.toFixed(2)}%`;function S({containerStyles:e,innerStyles:t,barStyles:n,dataStyles:r,dataInterpolation:s=_,initialState:a=(e=>e)}){const{active:o,progress:l}=E(),c=i.useRef(0),h=i.useRef(0),u=i.useRef(null),[d,p]=i.useState(a(o));i.useEffect((()=>{let e;return o!==d&&(e=setTimeout((()=>p(o)),300)),()=>clearTimeout(e)}),[d,o]);const f=i.useCallback((()=>{u.current&&(c.current+=(l-c.current)/2,(c.current>.95*l||100===l)&&(c.current=l),u.current.innerText=s(c.current),c.current(f(),()=>cancelAnimationFrame(h.current))),[f]),d?i.createElement("div",{style:{...M.container,opacity:o?1:0,...e}},i.createElement("div",null,i.createElement("div",{style:{...M.inner,...t}},i.createElement("div",{style:{...M.bar,transform:`scaleX(${l/100})`,...n}}),i.createElement("span",{ref:u,style:{...M.data,...r}})))):null}const M={container:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"#171717",display:"flex",alignItems:"center",justifyContent:"center",transition:"opacity 300ms ease",zIndex:1e3},inner:{width:100,height:3,background:"#272727",textAlign:"center"},bar:{height:3,width:"100%",background:"white",transition:"transform 200ms",transformOrigin:"left center"},data:{display:"inline-block",position:"relative",fontVariantNumeric:"tabular-nums",marginTop:"0.8em",color:"#f0f0f0",fontSize:"0.6em",fontFamily:'-apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, Roboto, Ubuntu, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',whiteSpace:"nowrap"}};const w=function(e){return function(t){e.forEach((function(e){"function"==typeof e?e(t):null!=e&&(e.current=t)}))}},C=i.createContext(null);function T(){return i.useContext(C)}function I({eps:e=1e-5,enabled:t=!0,infinite:n,horizontal:r,pages:s=1,distance:l=1,damping:c=4,style:h={},children:u}){const{gl:d,size:p,invalidate:f,events:m,raycaster:g}=(0,o.useThree)(),[A]=i.useState((()=>document.createElement("div"))),[v]=i.useState((()=>document.createElement("div"))),[y]=i.useState((()=>document.createElement("div"))),x=d.domElement.parentNode,b=i.useRef(0),E=i.useMemo((()=>{const t={el:A,eps:e,fill:v,fixed:y,horizontal:r,damping:c,offset:0,delta:0,scroll:b,pages:s,range(e,t,n=0){const r=e-n,i=r+t+2*n;return this.offseti?1:(this.offset-r)/(i-r)},curve(e,t,n=0){return Math.sin(this.range(e,t,n)*Math.PI)},visible(e,t,n=0){const r=e-n,i=r+t+2*n;return this.offset>=r&&this.offset<=i}};return t}),[e,c,r,s]);i.useEffect((()=>{A.style.position="absolute",A.style.width="100%",A.style.height="100%",A.style[r?"overflowX":"overflowY"]="auto",A.style[r?"overflowY":"overflowX"]="hidden",A.style.top="0px",A.style.left="0px";for(const n in h)A.style[n]=h[n];y.style.position="sticky",y.style.top="0px",y.style.left="0px",y.style.width="100%",y.style.height="100%",y.style.overflow="hidden",A.appendChild(y),v.style.height=r?"100%":s*l*100+"%",v.style.width=r?s*l*100+"%":"100%",v.style.pointerEvents="none",A.appendChild(v),x.appendChild(A),A[r?"scrollLeft":"scrollTop"]=1;const e=m.connected||d.domElement;requestAnimationFrame((()=>null==m.connect?void 0:m.connect(A)));const t=g.computeOffsets;return g.computeOffsets=({clientX:e,clientY:t})=>({offsetX:e-x.offsetLeft,offsetY:t-x.offsetTop}),()=>{x.removeChild(A),g.computeOffsets=t,null==m.connect||m.connect(e)}}),[s,l,r,A,v,y,x]),i.useEffect((()=>{const e=p[r?"width":"height"],i=A[r?"scrollWidth":"scrollHeight"],s=i-e;let a=0,o=!0,l=!0;const c=()=>{if(t&&!l&&(f(),a=A[r?"scrollLeft":"scrollTop"],b.current=a/s,n)){if(!o)if(a>=s){const e=1-E.offset;A[r?"scrollLeft":"scrollTop"]=1,b.current=E.offset=-e,o=!0}else if(a<=0){const e=1+E.offset;A[r?"scrollLeft":"scrollTop"]=i,b.current=E.offset=e,o=!0}o&&setTimeout((()=>o=!1),40)}};A.addEventListener("scroll",c,{passive:!0}),requestAnimationFrame((()=>l=!1));const h=e=>A.scrollLeft+=e.deltaY/2;return r&&A.addEventListener("wheel",h,{passive:!0}),()=>{A.removeEventListener("scroll",c),r&&A.removeEventListener("wheel",h)}}),[A,p,n,E,f,r,t]);let _=0;return(0,o.useFrame)(((t,n)=>{E.offset=a.MathUtils.damp(_=E.offset,b.current,c,n),E.delta=a.MathUtils.damp(E.delta,Math.abs(_-E.offset),c,n),E.delta>e&&f()})),i.createElement(C.Provider,{value:E},u)}const B=i.forwardRef((({children:e},t)=>{const n=i.useRef(null),r=T(),{width:s,height:a}=(0,o.useThree)((e=>e.viewport));return(0,o.useFrame)((()=>{n.current.position.x=r.horizontal?-s*(r.pages-1)*r.offset:0,n.current.position.y=r.horizontal?0:a*(r.pages-1)*r.offset})),i.createElement("group",{ref:w([t,n])},e)})),R=i.forwardRef((({children:e,style:t,...n},a)=>{const l=T(),c=i.useRef(null),{width:h,height:u}=(0,o.useThree)((e=>e.size)),d=i.useContext(o.context);return(0,o.useFrame)((()=>{l.delta>l.eps&&(c.current.style.transform=`translate3d(${l.horizontal?-h*(l.pages-1)*l.offset:0}px,${l.horizontal?0:u*(l.pages-1)*-l.offset}px,0)`)})),s.render(i.createElement("div",(0,r.c)({ref:w([a,c]),style:{...t,position:"absolute",top:0,left:0,willChange:"transform"}},n),i.createElement(C.Provider,{value:l},i.createElement(o.context.Provider,{value:d},e))),l.fixed),null})),P=i.forwardRef((({html:e,...t},n)=>{const s=e?R:B;return i.createElement(s,(0,r.c)({ref:n},t))}));var D=Object.defineProperty,L={};((e,t)=>{for(var n in t)D(e,n,{get:t[n],enumerable:!0})})(L,{assign:()=>pe,colors:()=>he,createStringInterpolator:()=>ae,skipAnimation:()=>ue,to:()=>oe,willAdvance:()=>de});var F=J(),U=e=>X(e,F),O=J();U.write=e=>X(e,O);var N=J();U.onStart=e=>X(e,N);var k=J();U.onFrame=e=>X(e,k);var G=J();U.onFinish=e=>X(e,G);var z=[];U.setTimeout=(e,t)=>{const n=U.now()+t,r=()=>{const e=z.findIndex((e=>e.cancel==r));~e&&z.splice(e,1),j-=~e?1:0},i={time:n,handler:e,cancel:r};return z.splice(Q(n),0,i),j+=1,Y(),i};var Q=e=>~(~z.findIndex((t=>t.time>e))||~z.length);U.cancel=e=>{N.delete(e),k.delete(e),G.delete(e),F.delete(e),O.delete(e)},U.sync=e=>{W=!0,U.batchedUpdates(e),W=!1},U.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,U.onStart(n)}return r.handler=e,r.cancel=()=>{N.delete(n),t=null},r};var V="undefined"!=typeof window?window.requestAnimationFrame:()=>{};U.use=e=>V=e,U.now="undefined"!=typeof performance?()=>performance.now():Date.now,U.batchedUpdates=e=>e(),U.catch=console.error,U.frameLoop="always",U.advance=()=>{"demand"!==U.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):K()};var H=-1,j=0,W=!1;function X(e,t){W?(t.delete(e),e(0)):(t.add(e),Y())}function Y(){H<0&&(H=0,"demand"!==U.frameLoop&&V(q))}function q(){~H&&(V(q),U.batchedUpdates(K))}function K(){const e=H;H=U.now();const t=Q(H);t&&(Z(z.splice(0,t),(e=>e.handler())),j-=t),j?(N.flush(),F.flush(e?Math.min(64,H-e):16.667),k.flush(),O.flush(),G.flush()):H=-1}function J(){let e=new Set,t=e;return{add(n){j+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(j-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,j-=t.size,Z(t,(t=>t(n)&&e.add(t))),j+=e.size,t=e)}}}function Z(e,t){e.forEach((e=>{try{t(e)}catch(za){U.catch(za)}}))}function $(){}var ee={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function te(e,t){if(ee.arr(e)){if(!ee.arr(t)||e.length!==t.length)return!1;for(let n=0;ne.forEach(t);function re(e,t,n){if(ee.arr(e))for(let r=0;ree.und(e)?[]:ee.arr(e)?e:[e];function se(e,t){if(e.size){const n=Array.from(e);e.clear(),ne(n,t)}}var ae,oe,le=(e,...t)=>se(e,(e=>e(...t))),ce=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),he=null,ue=!1,de=$,pe=e=>{e.to&&(oe=e.to),e.now&&(U.now=e.now),void 0!==e.colors&&(he=e.colors),null!=e.skipAnimation&&(ue=e.skipAnimation),e.createStringInterpolator&&(ae=e.createStringInterpolator),e.requestAnimationFrame&&U.use(e.requestAnimationFrame),e.batchedUpdates&&(U.batchedUpdates=e.batchedUpdates),e.willAdvance&&(de=e.willAdvance),e.frameLoop&&(U.frameLoop=e.frameLoop)},fe=new Set,me=[],ge=[],Ae=0,ve={get idle(){return!fe.size&&!me.length},start(e){Ae>e.priority?(fe.add(e),U.onStart(ye)):(xe(e),U(Ee))},advance:Ee,sort(e){if(Ae)U.onFrame((()=>ve.sort(e)));else{const t=me.indexOf(e);~t&&(me.splice(t,1),be(e))}},clear(){me=[],fe.clear()}};function ye(){fe.forEach(xe),fe.clear(),U(Ee)}function xe(e){me.includes(e)||be(e)}function be(e){me.splice(function(e,t){const n=e.findIndex(t);return n<0?e.length:n}(me,(t=>t.priority>e.priority)),0,e)}function Ee(e){const t=ge;for(let n=0;n0}var _e="[-+]?\\d*\\.?\\d+",Se=_e+"%";function Me(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var we=new RegExp("rgb"+Me(_e,_e,_e)),Ce=new RegExp("rgba"+Me(_e,_e,_e,_e)),Te=new RegExp("hsl"+Me(_e,Se,Se)),Ie=new RegExp("hsla"+Me(_e,Se,Se,_e)),Be=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Re=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Pe=/^#([0-9a-fA-F]{6})$/,De=/^#([0-9a-fA-F]{8})$/;function Le(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Fe(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,s=Le(i,r,e+1/3),a=Le(i,r,e),o=Le(i,r,e-1/3);return Math.round(255*s)<<24|Math.round(255*a)<<16|Math.round(255*o)<<8}function Ue(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Oe(e){return(parseFloat(e)%360+360)%360/360}function Ne(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function ke(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ge(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Pe.exec(e))?parseInt(t[1]+"ff",16)>>>0:he&&void 0!==he[e]?he[e]:(t=we.exec(e))?(Ue(t[1])<<24|Ue(t[2])<<16|Ue(t[3])<<8|255)>>>0:(t=Ce.exec(e))?(Ue(t[1])<<24|Ue(t[2])<<16|Ue(t[3])<<8|Ne(t[4]))>>>0:(t=Be.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=De.exec(e))?parseInt(t[1],16)>>>0:(t=Re.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Te.exec(e))?(255|Fe(Oe(t[1]),ke(t[2]),ke(t[3])))>>>0:(t=Ie.exec(e))?(Fe(Oe(t[1]),ke(t[2]),ke(t[3]))|Ne(t[4]))>>>0:null}(e);if(null===t)return e;t=t||0;return`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`}var ze=(e,t,n)=>{if(ee.fun(e))return e;if(ee.arr(e))return ze({range:e,output:t,extrapolate:n});if(ee.str(e.output[0]))return ae(e);const r=e,i=r.output,s=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",o=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n=e);++n);return n-1}(e,s);return function(e,t,n,r,i,s,a,o,l){let c=l?l(e):e;if(cn){if("identity"===o)return c;"clamp"===o&&(c=n)}if(r===i)return r;if(t===n)return e<=t?r:i;t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t);c=s(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r;return c}(e,s[t],s[t+1],i[t],i[t+1],l,a,o,r.map)}};var Qe=1.70158,Ve=1.525*Qe,He=Qe+1,je=2*Math.PI/3,We=2*Math.PI/4.5,Xe=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},Ye={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>He*e*e*e-Qe*e*e,easeOutBack:e=>1+He*Math.pow(e-1,3)+Qe*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-Ve)/2:(Math.pow(2*e-2,2)*((Ve+1)*(2*e-2)+Ve)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*je),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*je)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*We)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*We)/2+1,easeInBounce:e=>1-Xe(1-e),easeOutBounce:Xe,easeInOutBounce:e=>e<.5?(1-Xe(1-2*e))/2:(1+Xe(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return((e,t,n)=>Math.min(Math.max(n,e),t))(0,1,("end"===t?Math.floor(r):Math.ceil(r))/e)}},qe=Symbol.for("FluidValue.get"),Ke=Symbol.for("FluidValue.observers"),Je=e=>Boolean(e&&e[qe]),Ze=e=>e&&e[qe]?e[qe]():e,$e=e=>e[Ke]||null;function et(e,t){const n=e[Ke];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}var tt=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");nt(this,e)}},nt=(e,t)=>at(e,qe,t);function rt(e,t){if(e[qe]){let n=e[Ke];n||at(e,Ke,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function it(e,t){const n=e[Ke];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ke]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var st,at=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ot=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,lt=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ct=new RegExp(`(${ot.source})(%|[a-z]+)`,"i"),ht=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,ut=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,dt=e=>{const[t,n]=pt(e);if(!t||ce())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const t=window.getComputedStyle(document.documentElement).getPropertyValue(n);return t||e}return n&&ut.test(n)?dt(n):n||e},pt=e=>{const t=ut.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},ft=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,mt=e=>{st||(st=he?new RegExp(`(${Object.keys(he).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Ze(e).replace(ut,dt).replace(lt,Ge).replace(st,Ge))),n=t.map((e=>e.match(ot).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))),i=r.map((t=>ze({...e,output:t})));return e=>{const n=!ct.test(t[0])&&t.find((e=>ct.test(e)))?.replace(ot,"");let r=0;return t[0].replace(ot,(()=>`${i[r++](e)}${n||""}`)).replace(ht,ft)}},gt="react-spring: ",At=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${gt}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},vt=At(console.warn);var yt=At(console.warn);function xt(e){return ee.str(e)&&("#"==e[0]||/\d/.test(e)||!ce()&&ut.test(e)||e in(he||{}))}var bt=ce()?i.useEffect:i.useLayoutEffect,Et=()=>{const e=(0,i.useRef)(!1);return bt((()=>(e.current=!0,()=>{e.current=!1})),[]),e};function _t(){const e=(0,i.useState)()[1],t=Et();return()=>{t.current&&e(Math.random())}}var St=e=>(0,i.useEffect)(e,Mt),Mt=[];function wt(e){const t=(0,i.useRef)();return(0,i.useEffect)((()=>{t.current=e})),t.current}var Ct=Symbol.for("Animated:node"),Tt=e=>e&&e[Ct],It=(e,t)=>{return n=e,r=Ct,i=t,Object.defineProperty(n,r,{value:i,writable:!0,configurable:!0});var n,r,i},Bt=e=>e&&e[Ct]&&e[Ct].getPayload(),Rt=class{constructor(){It(this,this)}getPayload(){return this.payload||[]}},Pt=class extends Rt{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,ee.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Pt(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return ee.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,ee.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Dt=class extends Pt{constructor(e){super(0),this._string=null,this._toString=ze({output:[e,e]})}static create(e){return new Dt(e)}getValue(){const e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(ee.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=ze({output:[this.getValue(),e]})),this._value=0,super.reset()}},Lt={dependencies:null},Ft=class extends Rt{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return re(this.source,((n,r)=>{var i;(i=n)&&i[Ct]===i?t[r]=n.getValue(e):Je(n)?t[r]=Ze(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&ne(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return re(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Lt.dependencies&&Je(e)&&Lt.dependencies.add(e);const t=Bt(e);t&&ne(t,(e=>this.add(e)))}},Ut=class extends Ft{constructor(e){super(e)}static create(e){return new Ut(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(Ot)),!0)}};function Ot(e){return(xt(e)?Dt:Pt).create(e)}function Nt(e){const t=Tt(e);return t?t.constructor:ee.arr(e)?Ut:xt(e)?Dt:Pt}var kt=(e,t)=>{const n=!ee.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,i.forwardRef)(((r,s)=>{const a=(0,i.useRef)(null),o=n&&(0,i.useCallback)((e=>{a.current=function(e,t){e&&(ee.fun(e)?e(t):e.current=t);return t}(s,e)}),[s]),[l,c]=function(e,t){const n=new Set;Lt.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)});return e=new Ft(e),Lt.dependencies=null,[e,n]}(r,t),h=_t(),u=()=>{const e=a.current;if(n&&!e)return;!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&h()},d=new Gt(u,c),p=(0,i.useRef)();bt((()=>(p.current=d,ne(c,(e=>rt(e,d))),()=>{p.current&&(ne(p.current.deps,(e=>it(e,p.current))),U.cancel(p.current.update))}))),(0,i.useEffect)(u,[]),St((()=>()=>{const e=p.current;ne(e.deps,(t=>it(t,e)))}));const f=t.getComponentProps(l.getValue());return i.createElement(e,{...f,ref:o})}))},Gt=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&U.write(this.update)}};var zt=Symbol.for("AnimatedComponent"),Qt=e=>ee.str(e)?e:e&&ee.str(e.displayName)?e.displayName:ee.fun(e)&&e.name||null;function Vt(e,...t){return ee.fun(e)?e(...t):e}var Ht=(e,t)=>!0===e||!!(t&&e&&(ee.fun(e)?e(t):ie(e).includes(t))),jt=(e,t)=>ee.obj(e)?t&&e[t]:e,Wt=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,Xt=e=>e,Yt=(e,t=Xt)=>{let n=qt;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const n=t(e[i],i);ee.und(n)||(r[i]=n)}return r},qt=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Kt={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function Jt(e){const t=function(e){const t={};let n=0;if(re(e,((e,r)=>{Kt[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return re(e,((e,r)=>r in t||(n[r]=e))),n}return{...e}}function Zt(e){return e=Ze(e),ee.arr(e)?e.map(Zt):xt(e)?L.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function $t(e){for(const t in e)return!0;return!1}function en(e){return ee.fun(e)||ee.arr(e)&&ee.obj(e[0])}function tn(e,t){e.ref?.delete(e),t?.delete(e)}function nn(e,t){t&&e.ref!==t&&(e.ref?.delete(e),t.add(e),e.ref=t)}var rn={tension:170,friction:26,mass:1,damping:1,easing:Ye.linear,clamp:!1},sn=class{constructor(){this.velocity=0,Object.assign(this,rn)}};function an(e,t){if(ee.und(t.decay)){const n=!ee.und(t.tension)||!ee.und(t.friction);!n&&ee.und(t.frequency)&&ee.und(t.damping)&&ee.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}var on=[],ln=class{constructor(){this.changed=!1,this.values=on,this.toValues=null,this.fromValues=on,this.config=new sn,this.immediate=!1}};function cn(e,{key:t,props:n,defaultProps:r,state:i,actions:s}){return new Promise(((a,o)=>{let l,c,h=Ht(n.cancel??r?.cancel,t);if(h)p();else{ee.und(n.pause)||(i.paused=Ht(n.pause,t));let e=r?.pause;!0!==e&&(e=i.paused||Ht(e,t)),l=Vt(n.delay||0,t),e?(i.resumeQueue.add(d),s.pause()):(s.resume(),d())}function u(){i.resumeQueue.add(d),i.timeouts.delete(c),c.cancel(),l=c.time-U.now()}function d(){l>0&&!L.skipAnimation?(i.delayed=!0,c=U.setTimeout(p,l),i.pauseQueue.add(u),i.timeouts.add(c)):p()}function p(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(u),i.timeouts.delete(c),e<=(i.cancelId||0)&&(h=!0);try{s.start({...n,callId:e,cancel:h},a)}catch(t){o(t)}}}))}var hn=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?pn(e.get()):t.every((e=>e.noop))?un(e.get()):dn(e.get(),t.every((e=>e.finished))),un=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),dn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),pn=e=>({value:e,cancelled:!0,finished:!1});function fn(e,t,n,r){const{callId:i,parentId:s,onRest:a}=t,{asyncTo:o,promise:l}=n;return s||e!==o||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const c=Yt(t,((e,t)=>"onRest"===t?void 0:e));let h,u;const d=new Promise(((e,t)=>(h=e,u=t))),p=e=>{const t=i<=(n.cancelId||0)&&pn(r)||i!==n.asyncId&&dn(r,!1);if(t)throw e.result=t,u(e),e},f=(e,t)=>{const s=new gn,a=new An;return(async()=>{if(L.skipAnimation)throw mn(n),a.result=dn(r,!1),u(a),a;p(s);const o=ee.obj(e)?{...e}:{...t,to:e};o.parentId=i,re(c,((e,t)=>{ee.und(o[t])&&(o[t]=e)}));const l=await r.start(o);return p(s),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};let m;if(L.skipAnimation)return mn(n),dn(r,!1);try{let t;t=ee.arr(e)?(async e=>{for(const t of e)await f(t)})(e):Promise.resolve(e(f,r.stop.bind(r))),await Promise.all([t.then(h),d]),m=dn(r.get(),!0,!1)}catch(g){if(g instanceof gn)m=g.result;else{if(!(g instanceof An))throw g;m=g.result}}finally{i==n.asyncId&&(n.asyncId=s,n.asyncTo=s?o:void 0,n.promise=s?l:void 0)}return ee.fun(a)&&U.batchedUpdates((()=>{a(m,r,r.item)})),m})():l}function mn(e,t){se(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var gn=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},An=class extends Error{constructor(){super("SkipAnimationSignal")}},vn=e=>e instanceof xn,yn=1,xn=class extends tt{constructor(){super(...arguments),this.id=yn++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Tt(this);return e&&e.getValue()}to(...e){return L.to(this,e)}interpolate(...e){return vt(`${gt}The "interpolate" function is deprecated in v9 (use "to" instead)`),L.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){et(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||ve.sort(this),et(this,{type:"priority",parent:this,priority:e})}},bn=Symbol.for("SpringPhase"),En=e=>(1&e[bn])>0,_n=e=>(2&e[bn])>0,Sn=e=>(4&e[bn])>0,Mn=(e,t)=>t?e[bn]|=3:e[bn]&=-3,wn=(e,t)=>t?e[bn]|=4:e[bn]&=-5,Cn=class extends xn{constructor(e,t){if(super(),this.animation=new ln,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!ee.und(e)||!ee.und(t)){const n=ee.obj(e)?{...e}:{...t,from:e};ee.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(_n(this)||this._state.asyncTo)||Sn(this)}get goal(){return Ze(this.animation.to)}get velocity(){const e=Tt(this);return e instanceof Pt?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return En(this)}get isAnimating(){return _n(this)}get isPaused(){return Sn(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:s}=r,a=Bt(r.to);!a&&Je(r.to)&&(i=ie(Ze(r.to))),r.values.forEach(((o,l)=>{if(o.done)return;const c=o.constructor==Dt?1:a?a[l].lastPosition:i[l];let h=r.immediate,u=c;if(!h){if(u=o.lastPosition,s.tension<=0)return void(o.done=!0);let t=o.elapsedTime+=e;const n=r.fromValues[l],i=null!=o.v0?o.v0:o.v0=ee.arr(s.velocity)?s.velocity[l]:s.velocity;let a;const d=s.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(ee.und(s.duration))if(s.decay){const e=!0===s.decay?.998:s.decay,r=Math.exp(-(1-e)*t);u=n+i/(1-e)*(1-r),h=Math.abs(o.lastPosition-u)<=d,a=i*r}else{a=null==o.lastVelocity?i:o.lastVelocity;const t=s.restVelocity||d/10,r=s.clamp?0:s.bounce,l=!ee.und(r),p=n==c?o.v0>0:nt,f||(h=Math.abs(c-u)<=d,!h));++e){l&&(m=u==c||u>c==p,m&&(a=-a*r,u=c));a+=(1e-6*-s.tension*(u-c)+.001*-s.friction*a)/s.mass*g,u+=a*g}}else{let r=1;s.duration>0&&(this._memoizedDuration!==s.duration&&(this._memoizedDuration=s.duration,o.durationProgress>0&&(o.elapsedTime=s.duration*o.durationProgress,t=o.elapsedTime+=e)),r=(s.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,o.durationProgress=r),u=n+s.easing(r)*(c-n),a=(u-o.lastPosition)/e,h=1==r}o.lastVelocity=a,Number.isNaN(u)&&(console.warn("Got NaN while animating:",this),h=!0)}a&&!a[l].done&&(h=!1),h?o.done=!0:t=!1,o.setValue(u,s.round)&&(n=!0)}));const o=Tt(this),l=o.getValue();if(t){const e=Ze(r.to);l===e&&!n||s.decay?n&&s.decay&&this._onChange(l):(o.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return U.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(_n(this)){const{to:e,config:t}=this.animation;U.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return ee.und(e)?(n=this.queue||[],this.queue=[]):n=[ee.obj(e)?e:{...t,to:e}],Promise.all(n.map((e=>this._update(e)))).then((e=>hn(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),mn(this._state,e&&this._lastCallId),U.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=ee.obj(n)?n[t]:n,(null==n||en(n))&&(n=void 0),r=ee.obj(r)?r[t]:r,null==r&&(r=void 0);const i={to:n,from:r};return En(this)||(e.reverse&&([n,r]=[r,n]),r=Ze(r),ee.und(r)?Tt(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Yt(e,((e,t)=>/^on/.test(t)?jt(e,n):e))),Ln(this,e,"onProps"),Fn(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const s=this._state;return cn(++this._lastCallId,{key:n,props:e,defaultProps:r,state:s,actions:{pause:()=>{Sn(this)||(wn(this,!0),le(s.pauseQueue),Fn(this,"onPause",dn(this,Tn(this,this.animation.to)),this))},resume:()=>{Sn(this)&&(wn(this,!1),_n(this)&&this._resume(),le(s.resumeQueue),Fn(this,"onResume",dn(this,Tn(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then((n=>{if(e.loop&&n.finished&&(!t||!n.noop)){const t=In(e);if(t)return this._update(t,!0)}return n}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(pn(this));const r=!ee.und(e.to),i=!ee.und(e.from);if(r||i){if(!(t.callId>this._lastToId))return n(pn(this));this._lastToId=t.callId}const{key:s,defaultProps:a,animation:o}=this,{to:l,from:c}=o;let{to:h=l,from:u=c}=e;!i||r||t.default&&!ee.und(h)||(h=u),t.reverse&&([h,u]=[u,h]);const d=!te(u,c);d&&(o.from=u),u=Ze(u);const p=!te(h,l);p&&this._focus(h);const f=en(t.to),{config:m}=o,{decay:g,velocity:A}=m;(r||i)&&(m.velocity=0),t.config&&!f&&function(e,t,n){n&&(an(n={...n},t),t={...n,...t}),an(e,t),Object.assign(e,t);for(const a in rn)null==e[a]&&(e[a]=rn[a]);let{frequency:r,damping:i}=e;const{mass:s}=e;ee.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*s,e.friction=4*Math.PI*i*s/r)}(m,Vt(t.config,s),t.config!==a.config?Vt(a.config,s):void 0);let v=Tt(this);if(!v||ee.und(h))return n(dn(this,!0));const y=ee.und(t.reset)?i&&!t.default:!ee.und(u)&&Ht(t.reset,s),x=y?u:this.get(),b=Zt(h),E=ee.num(b)||ee.arr(b)||xt(b),_=!f&&(!E||Ht(a.immediate||t.immediate,s));if(p){const e=Nt(h);if(e!==v.constructor){if(!_)throw Error(`Cannot animate between ${v.constructor.name} and ${e.name}, as the "to" prop suggests`);v=this._set(b)}}const S=v.constructor;let M=Je(h),w=!1;if(!M){const e=y||!En(this)&&d;(p||e)&&(w=te(Zt(x),b),M=!w),(te(o.immediate,_)||_)&&te(m.decay,g)&&te(m.velocity,A)||(M=!0)}if(w&&_n(this)&&(o.changed&&!y?M=!0:M||this._stop(l)),!f&&((M||Je(l))&&(o.values=v.getPayload(),o.toValues=Je(h)?null:S==Dt?[1]:ie(b)),o.immediate!=_&&(o.immediate=_,_||y||this._set(l)),M)){const{onRest:e}=o;ne(Dn,(e=>Ln(this,t,e)));const r=dn(this,Tn(this,l));le(this._pendingCalls,r),this._pendingCalls.add(n),o.changed&&U.batchedUpdates((()=>{o.changed=!y,e?.(r,this),y?Vt(a.onRest,r):o.onStart?.(r,this)}))}y&&this._set(x),f?n(fn(t.to,t,this._state,this)):M?this._start():_n(this)&&!p?this._pendingCalls.add(n):n(un(x))}_focus(e){const t=this.animation;e!==t.to&&($e(this)&&this._detach(),t.to=e,$e(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Je(t)&&(rt(t,this),vn(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Je(e)&&it(e,this)}_set(e,t=!0){const n=Ze(e);if(!ee.und(n)){const e=Tt(this);if(!e||!te(n,e.getValue())){const r=Nt(n);e&&e.constructor==r?e.setValue(n):It(this,r.create(n)),e&&U.batchedUpdates((()=>{this._onChange(n,t)}))}}return Tt(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Fn(this,"onStart",dn(this,Tn(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Vt(this.animation.onChange,e,this)),Vt(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Tt(this).reset(Ze(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),_n(this)||(Mn(this,!0),Sn(this)||this._resume())}_resume(){L.skipAnimation?this.finish():ve.start(this)}_stop(e,t){if(_n(this)){Mn(this,!1);const n=this.animation;ne(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),et(this,{type:"idle",parent:this});const r=t?pn(this.get()):dn(this.get(),Tn(this,e??n.to));le(this._pendingCalls,r),n.changed&&(n.changed=!1,Fn(this,"onRest",r,this))}}};function Tn(e,t){const n=Zt(t);return te(Zt(e.get()),n)}function In(e,t=e.loop,n=e.to){const r=Vt(t);if(r){const i=!0!==r&&Jt(r),s=(i||e).reverse,a=!i||i.reset;return Bn({...e,loop:t,default:!1,pause:void 0,to:!s||en(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function Bn(e){const{to:t,from:n}=e=Jt(e),r=new Set;return ee.obj(t)&&Pn(t,r),ee.obj(n)&&Pn(n,r),e.keys=r.size?Array.from(r):null,e}function Rn(e){const t=Bn(e);return ee.und(t.default)&&(t.default=Yt(t)),t}function Pn(e,t){re(e,((e,n)=>null!=e&&t.add(n)))}var Dn=["onStart","onRest","onChange","onPause","onResume"];function Ln(e,t,n){e.animation[n]=t[n]!==Wt(t,n)?jt(t[n],e.key):void 0}function Fn(e,t,...n){e.animation[t]?.(...n),e.defaultProps[t]?.(...n)}var Un=["onStart","onChange","onRest"],On=1,Nn=class{constructor(e,t){this.id=On++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];ee.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Bn(e)),this}start(e){let{queue:t}=this;return e?t=ie(e).map(Bn):this.queue=[],this._flush?this._flush(this,t):(jn(this,t),kn(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;ne(ie(t),(t=>n[t].stop(!!e)))}else mn(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(ee.und(e))this.start({pause:!0});else{const t=this.springs;ne(ie(e),(e=>t[e].pause()))}return this}resume(e){if(ee.und(e))this.start({pause:!1});else{const t=this.springs;ne(ie(e),(e=>t[e].resume()))}return this}each(e){re(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,se(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const s=!r&&this._started,a=i||s&&n.size?this.get():null;i&&t.size&&se(t,(([e,t])=>{t.value=a,e(t,this,this._item)})),s&&(this._started=!1,se(n,(([e,t])=>{t.value=a,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}U.onFrame(this._onFrame)}};function kn(e,t){return Promise.all(t.map((t=>Gn(e,t)))).then((t=>hn(e,t)))}async function Gn(e,t,n){const{keys:r,to:i,from:s,loop:a,onRest:o,onResolve:l}=t,c=ee.obj(t.default)&&t.default;a&&(t.loop=!1),!1===i&&(t.to=null),!1===s&&(t.from=null);const h=ee.arr(i)||ee.fun(i)?i:void 0;h?(t.to=void 0,t.onRest=void 0,c&&(c.onRest=void 0)):ne(Un,(n=>{const r=t[n];if(ee.fun(r)){const i=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},c&&(c[n]=t[n])}}));const u=e._state;t.pause===!u.paused?(u.paused=t.pause,le(t.pause?u.pauseQueue:u.resumeQueue)):u.paused&&(t.pause=!0);const d=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===Wt(t,"cancel");(h||p&&u.asyncId)&&d.push(cn(++e._lastAsyncId,{props:t,state:u,actions:{pause:$,resume:$,start(t,n){p?(mn(u,e._lastAsyncId),n(pn(e))):(t.onRest=o,n(fn(h,t,u,e)))}}})),u.paused&&await new Promise((e=>{u.resumeQueue.add(e)}));const f=hn(e,await Promise.all(d));if(a&&f.finished&&(!n||!f.noop)){const n=In(t,a,i);if(n)return jn(e,[n]),Gn(e,n,!0)}return l&&U.batchedUpdates((()=>l(f,e,e.item))),f}function zn(e,t){const n={...e.springs};return t&&ne(ie(t),(e=>{ee.und(e.keys)&&(e=Bn(e)),ee.obj(e.to)||(e={...e,to:void 0}),Hn(n,e,(e=>Vn(e)))})),Qn(e,n),n}function Qn(e,t){re(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,rt(t,e))}))}function Vn(e,t){const n=new Cn;return n.key=e,t&&rt(n,t),n}function Hn(e,t,n){t.keys&&ne(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function jn(e,t){ne(t,(t=>{Hn(e.springs,t,(t=>Vn(t,e)))}))}var Wn=({children:e,...t})=>{const n=(0,i.useContext)(Xn),r=t.pause||!!n.pause,s=t.immediate||!!n.immediate;t=function(e,t){const[n]=(0,i.useState)((()=>({inputs:t,result:e()}))),r=(0,i.useRef)(),s=r.current;let a=s;if(a){const n=Boolean(t&&a.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n{r.current=a,s==n&&(n.inputs=n.result=void 0)}),[a]),a.result}((()=>({pause:r,immediate:s})),[r,s]);const{Provider:a}=Xn;return i.createElement(a,{value:t},e)},Xn=function(e,t){return Object.assign(e,i.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}(Wn,{});Wn.Provider=Xn.Provider,Wn.Consumer=Xn.Consumer;var Yn=()=>{const e=[],t=function(t){yt(`${gt}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return ne(e,((e,i)=>{if(ee.und(t))r.push(e.start());else{const s=n(t,e,i);s&&r.push(e.start(s))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return ne(e,(e=>e.pause(...arguments))),this},t.resume=function(){return ne(e,(e=>e.resume(...arguments))),this},t.set=function(t){ne(e,((e,n)=>{const r=ee.fun(t)?t(n,e):t;r&&e.set(r)}))},t.start=function(t){const n=[];return ne(e,((e,r)=>{if(ee.und(t))n.push(e.start());else{const i=this._getProps(t,e,r);i&&n.push(e.start(i))}})),n},t.stop=function(){return ne(e,(e=>e.stop(...arguments))),this},t.update=function(t){return ne(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return ee.fun(e)?e(n,t):e};return t._getProps=n,t};function qn(e,t,n){const r=ee.fun(t)&&t;r&&!n&&(n=[]);const s=(0,i.useMemo)((()=>r||3==arguments.length?Yn():void 0),[]),a=(0,i.useRef)(0),o=_t(),l=(0,i.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=zn(e,t);return a.current>0&&!l.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?kn(e,t):new Promise((r=>{Qn(e,n),l.queue.push((()=>{r(kn(e,t))})),o()}))}})),[]),c=(0,i.useRef)([...l.ctrls]),h=[],u=wt(e)||0;function d(e,n){for(let i=e;i{ne(c.current.slice(e,u),(e=>{tn(e,s),e.stop(!0)})),c.current.length=e,d(u,e)}),[e]),(0,i.useMemo)((()=>{d(0,Math.min(u,e))}),n);const p=c.current.map(((e,t)=>zn(e,h[t]))),f=(0,i.useContext)(Wn),m=wt(f),g=f!==m&&$t(f);bt((()=>{a.current++,l.ctrls=c.current;const{queue:e}=l;e.length&&(l.queue=[],ne(e,(e=>e()))),ne(c.current,((e,t)=>{s?.add(e),g&&e.start({default:f});const n=h[t];n&&(nn(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),St((()=>()=>{ne(l.ctrls,(e=>e.stop(!0)))}));const A=p.map((e=>({...e})));return s?[A,s]:A}function Kn(e,t){const n=ee.fun(e),[[r],i]=qn(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,i]:r}var Jn=class extends xn{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=ze(...t);const n=this._get(),r=Nt(n);It(this,r.create(n))}advance(e){const t=this._get();te(t,this.get())||(Tt(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&$n(this._active)&&er(this)}_get(){const e=ee.arr(this.source)?this.source.map(Ze):ie(Ze(this.source));return this.calc(...e)}_start(){this.idle&&!$n(this._active)&&(this.idle=!1,ne(Bt(this),(e=>{e.done=!1})),L.skipAnimation?(U.batchedUpdates((()=>this.advance())),er(this)):ve.start(this))}_attach(){let e=1;ne(ie(this.source),(t=>{Je(t)&&rt(t,this),vn(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){ne(ie(this.source),(e=>{Je(e)&&it(e,this)})),this._active.clear(),er(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=ie(this.source).reduce(((e,t)=>Math.max(e,(vn(t)?t.priority:0)+1)),0))}};function Zn(e){return!1!==e.idle}function $n(e){return!e.size||Array.from(e).every(Zn)}function er(e){e.idle||(e.idle=!0,ne(Bt(e),(e=>{e.done=!0})),et(e,{type:"idle",parent:e}))}L.assign({createStringInterpolator:mt,to:(e,t)=>new Jn(e,t)});ve.advance;var tr=["primitive"].concat(Object.keys(a).filter((e=>/^[A-Z]/.test(e))).map((e=>e[0].toLowerCase()+e.slice(1))));L.assign({createStringInterpolator:mt,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},frameLoop:"demand"}),(0,o.addEffect)((()=>{U.advance()}));var nr=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new Ft(e)),getComponentProps:r=(e=>e)}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},s=e=>{const t=Qt(e)||"Anonymous";return(e=ee.str(e)?s[e]||(s[e]=kt(e,i)):e[zt]||(e[zt]=kt(e,i))).displayName=`Animated(${t})`,e};return re(e,((t,n)=>{ee.arr(e)&&(n=Qt(t)),s[n]=s(t)})),{animated:s}})(tr,{applyAnimatedValues:o.applyProps}),rr=nr.animated;const ir={toVector:(e,t)=>(void 0===e&&(e=t),Array.isArray(e)?e:[e,e]),add:(e,t)=>[e[0]+t[0],e[1]+t[1]],sub:(e,t)=>[e[0]-t[0],e[1]-t[1]],addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function sr(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function ar(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):en?+sr(e-n,n-t,r)+n:e}function or(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}function lr(e,t,n){return(t=or(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hr(e){for(var t=1;t{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}function Er(e,t){const[n,r]=Array.from(e.touches).filter((e=>t.includes(e.identifier)));return xr(n,r)}function _r(e){const t=yr(e);return Ar(e)?t.identifier:t.pointerId}function Sr(e){const t=yr(e);return[t.clientX,t.clientY]}function Mr(e){let{deltaX:t,deltaY:n,deltaMode:r}=e;return 1===r?(t*=40,n*=40):2===r&&(t*=800,n*=800),[t,n]}function wr(e,...t){return"function"==typeof e?e(...t):e}function Cr(){}function Tr(...e){return 0===e.length?Cr:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function Ir(e,t){return Object.assign({},t,e||{})}class Br{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=e.timeDelta=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?wr(n.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=e.timeStamp)}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:r}=this;t.args=this.args;let i=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,r.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,r.locked=!!document.pointerLockElement,Object.assign(r,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:i,ctrlKey:s}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:i,ctrlKey:s})}return t}(e)),r.down=r.pressed=r.buttons%2==1||r.touches>0,i=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);ir.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[s,a]=t._movement,[o,l]=n.threshold,{_step:c,values:h}=t;if(n.hasCustomTransform?(!1===c[0]&&(c[0]=Math.abs(s)>=o&&h[0]),!1===c[1]&&(c[1]=Math.abs(a)>=l&&h[1])):(!1===c[0]&&(c[0]=Math.abs(s)>=o&&Math.sign(s)*o),!1===c[1]&&(c[1]=Math.abs(a)>=l&&Math.sign(a)*l)),t.intentional=!1!==c[0]||!1!==c[1],!t.intentional)return;const u=[0,0];if(n.hasCustomTransform){const[e,t]=h;u[0]=!1!==c[0]?e-c[0]:0,u[1]=!1!==c[1]?t-c[1]:0}else u[0]=!1!==c[0]?s-c[0]:0,u[1]=!1!==c[1]?a-c[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(u);const d=t.offset,p=t._active&&!t._blocked||t.active;p&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=r[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=wr(n.bounds,t)),this.setup&&this.setup()),t.movement=u,this.computeOffset()));const[f,m]=t.offset,[[g,A],[v,y]]=t._bounds;t.overflow=[fA?1:0,my?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const x=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,i]){const[[s,a],[o,l]]=e;return[ar(t,s,a,r),ar(n,o,l,i)]}(t._bounds,t.offset,x),t.delta=ir.sub(t.offset,d),this.computeMovement(),p&&(!t.last||i>32)){t.delta=ir.sub(t.offset,d);const e=t.delta.map(Math.abs);ir.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&i>0&&(t.velocity=[e[0]/i,e[1]/i],t.timeDelta=i)}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(hr(hr(hr({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class Rr extends Br{constructor(...e){super(...e),lr(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=ir.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=ir.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[vr(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),i=Math.abs(t);return r>i&&r>n?"x":i>r&&i>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const Pr=e=>e,Dr={enabled:(e=!0)=>e,eventOptions:(e,t,n)=>hr(hr({},n.shared.eventOptions),e),preventDefault:(e=!1)=>e,triggerAllEvents:(e=!1)=>e,rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return ir.toVector(e)}},from:e=>"function"==typeof e?e:null!=e?ir.toVector(e):void 0,transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||Pr},threshold:e=>ir.toVector(e,0)};const Lr=hr(hr({},Dr),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold:(e=0)=>e,bounds(e={}){if("function"==typeof e)return t=>Lr.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:i=1/0}=e;return[[t,n],[r,i]]}}),Fr={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};const Ur="undefined"!=typeof window&&window.document&&window.document.createElement;function Or(){return Ur&&"ontouchstart"in window}const Nr={isBrowser:Ur,gesture:function(){try{return"constructor"in GestureEvent}catch(za){return!1}}(),touch:Or(),touchscreen:Or()||Ur&&window.navigator.maxTouchPoints>1,pointer:Ur&&"onpointerdown"in window,pointerLock:Ur&&"exitPointerLock"in window.document},kr={mouse:0,touch:0,pen:8},Gr=hr(hr({},Lr),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:i=!1}={}}){return this.pointerLock=r&&Nr.pointerLock,Nr.touch&&n?"touch":this.pointerLock?"mouse":Nr.pointer&&!i?"pointer":Nr.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,Nr.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:i=!0}={}}){return this.pointerButtons=r,this.keys=i,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:i}){const s=ir.toVector(e,n?r:i?1:0);return this.filterTaps=n,this.tapsThreshold=r,s},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(ir.toVector(e)),distance:this.transform(ir.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold:e=>e?hr(hr({},kr),e):kr,keyboardDisplacement:(e=10)=>e});function zr(e){const[t,n]=e.overflow,[r,i]=e._delta,[s,a]=e._direction;(t<0&&r>0&&s<0||t>0&&r<0&&s>0)&&(e._movement[0]=e._movementBound[0]),(n<0&&i>0&&a<0||n>0&&i<0&&a>0)&&(e._movement[1]=e._movementBound[1])}const Qr=hr(hr({},Dr),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!Nr.touch&&Nr.gesture)return"gesture";if(Nr.touch&&r)return"touch";if(Nr.touchscreen){if(Nr.pointer)return"pointer";if(Nr.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const i=e=>{const t=Ir(wr(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},s=e=>{const t=Ir(wr(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[i(),s()]:e=>[i(e),s(e)]},threshold(e,t,n){this.lockDirection="lock"===n.axis;return ir.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey:e=>void 0===e?"ctrlKey":e,pinchOnWheel:(e=!0)=>e});const Vr=hr(hr({},Lr),{},{mouseOnly:(e=!0)=>e});const Hr=Lr;const jr=Lr;const Wr=hr(hr({},Lr),{},{mouseOnly:(e=!0)=>e}),Xr=new Map,Yr=new Map;function qr(e){Xr.set(e.key,e.engine),Yr.set(e.key,e.resolver)}const Kr={key:"drag",engine:class extends Rr{constructor(...e){super(...e),lr(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=Lr.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=_r(e),n._pointerActive=!0,this.computeValues(Sr(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==vr(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;const r=_r(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;const i=Sr(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=ir.sub(i,t._values),this.computeValues(i)),ir.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(a){0}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=_r(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[i,s]=t._distance;if(t.tap=i<=n.tapsThreshold&&s<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t._delta,[i,s]=t._movement,[a,o]=n.swipe.velocity,[l,c]=n.swipe.distance,h=n.swipe.duration;if(t.elapsedTimea&&Math.abs(i)>l&&(t.swipe[0]=Math.sign(e)),h>o&&Math.abs(s)>c&&(t.swipe[1]=Math.sign(r))}}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=Fr[e.key];if(t){const n=this.state,r=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,r),n._keyboardActive=!0,ir.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in Fr&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:Gr},Jr={key:"hover",engine:class extends Rr{constructor(...e){super(...e),lr(this,"ingKey","hovering")}enter(e){this.config.mouseOnly&&"mouse"!==e.pointerType||(this.start(e),this.computeValues(Sr(e)),this.compute(e),this.emit())}leave(e){if(this.config.mouseOnly&&"mouse"!==e.pointerType)return;const t=this.state;if(!t._active)return;t._active=!1;const n=Sr(e);t._movement=t._delta=ir.sub(n,t._values),this.computeValues(n),this.compute(e),t.delta=t.movement,this.emit()}bind(e){e("pointer","enter",this.enter.bind(this)),e("pointer","leave",this.leave.bind(this))}},resolver:Wr},Zr={key:"move",engine:class extends Rr{constructor(...e){super(...e),lr(this,"ingKey","moving")}move(e){this.config.mouseOnly&&"mouse"!==e.pointerType||(this.state._active?this.moveChange(e):this.moveStart(e),this.timeoutStore.add("moveEnd",this.moveEnd.bind(this)))}moveStart(e){this.start(e),this.computeValues(Sr(e)),this.compute(e),this.computeInitial(),this.emit()}moveChange(e){if(!this.state._active)return;const t=Sr(e),n=this.state;n._delta=ir.sub(t,n._values),ir.addTo(n._movement,n._delta),this.computeValues(t),this.compute(e),this.emit()}moveEnd(e){this.state._active&&(this.state._active=!1,this.compute(e),this.emit())}bind(e){e("pointer","change",this.move.bind(this)),e("pointer","leave",this.moveEnd.bind(this))}},resolver:Vr},$r={key:"pinch",engine:class extends Br{constructor(...e){super(...e),lr(this,"ingKey","pinching"),lr(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const e=this.state;e._touchIds=[],e.canceled=!1,e.cancel=this.cancel.bind(this),e.turns=0}computeOffset(){const{type:e,movement:t,lastOffset:n}=this.state;this.state.offset="wheel"===e?ir.add(t,n):[(1+t[0])*n[0],t[1]+n[1]]}computeMovement(){const{offset:e,lastOffset:t}=this.state;this.state.movement=[e[0]/t[0],e[1]-t[1]]}axisIntent(){const e=this.state,[t,n]=e._movement;if(!e.axis){const r=30*Math.abs(t)-Math.abs(n);r<0?e.axis="angle":r>0&&(e.axis="scale")}}restrictToAxis(e){this.config.lockDirection&&("scale"===this.state.axis?e[1]=0:"angle"===this.state.axis&&(e[0]=0))}cancel(){const e=this.state;e.canceled||setTimeout((()=>{e.canceled=!0,e._active=!1,this.compute(),this.emit()}),0)}touchStart(e){this.ctrl.setEventIds(e);const t=this.state,n=this.ctrl.touchIds;if(t._active&&t._touchIds.every((e=>n.has(e))))return;if(n.size<2)return;this.start(e),t._touchIds=Array.from(n).slice(0,2);const r=Er(e,t._touchIds);r&&this.pinchStart(e,r)}pointerStart(e){if(null!=e.buttons&&e.buttons%2!=1)return;this.ctrl.setEventIds(e),e.target.setPointerCapture(e.pointerId);const t=this.state,n=t._pointerEvents,r=this.ctrl.pointerIds;if(t._active&&Array.from(n.keys()).every((e=>r.has(e))))return;if(n.size<2&&n.set(e.pointerId,e),t._pointerEvents.size<2)return;this.start(e);const i=xr(...Array.from(n.values()));i&&this.pinchStart(e,i)}pinchStart(e,t){this.state.origin=t.origin,this.computeValues([t.distance,t.angle]),this.computeInitial(),this.compute(e),this.emit()}touchMove(e){if(!this.state._active)return;const t=Er(e,this.state._touchIds);t&&this.pinchMove(e,t)}pointerMove(e){const t=this.state._pointerEvents;if(t.has(e.pointerId)&&t.set(e.pointerId,e),!this.state._active)return;const n=xr(...Array.from(t.values()));n&&this.pinchMove(e,n)}pinchMove(e,t){const n=this.state,r=n._values[1],i=t.angle-r;let s=0;Math.abs(i)>270&&(s+=Math.sign(i)),this.computeValues([t.distance,t.angle-360*s]),n.origin=t.origin,n.turns=s,n._movement=[n._values[0]/n._initial[0]-1,n._values[1]-n._initial[1]],this.compute(e),this.emit()}touchEnd(e){this.ctrl.setEventIds(e),this.state._active&&this.state._touchIds.some((e=>!this.ctrl.touchIds.has(e)))&&(this.state._active=!1,this.compute(e),this.emit())}pointerEnd(e){const t=this.state;this.ctrl.setEventIds(e);try{e.target.releasePointerCapture(e.pointerId)}catch(n){}t._pointerEvents.has(e.pointerId)&&t._pointerEvents.delete(e.pointerId),t._active&&t._pointerEvents.size<2&&(t._active=!1,this.compute(e),this.emit())}gestureStart(e){e.cancelable&&e.preventDefault();const t=this.state;t._active||(this.start(e),this.computeValues([e.scale,e.rotation]),t.origin=[e.clientX,e.clientY],this.compute(e),this.emit())}gestureMove(e){if(e.cancelable&&e.preventDefault(),!this.state._active)return;const t=this.state;this.computeValues([e.scale,e.rotation]),t.origin=[e.clientX,e.clientY];const n=t._movement;t._movement=[e.scale-1,e.rotation],t._delta=ir.sub(t._movement,n),this.compute(e),this.emit()}gestureEnd(e){this.state._active&&(this.state._active=!1,this.compute(e),this.emit())}wheel(e){const t=this.config.modifierKey;t&&!(Array.isArray(t)?t.find((t=>e[t])):e[t])||(this.state._active?this.wheelChange(e):this.wheelStart(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(e){this.start(e),this.wheelChange(e)}wheelChange(e){"uv"in e||e.cancelable&&e.preventDefault();const t=this.state;t._delta=[-Mr(e)[1]/100*t.offset[0],0],ir.addTo(t._movement,t._delta),zr(t),this.state.origin=[e.clientX,e.clientY],this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){const t=this.config.device;t&&(e(t,"start",this[t+"Start"].bind(this)),e(t,"change",this[t+"Move"].bind(this)),e(t,"end",this[t+"End"].bind(this)),e(t,"cancel",this[t+"End"].bind(this)),e("lostPointerCapture","",this[t+"End"].bind(this))),this.config.pinchOnWheel&&e("wheel","",this.wheel.bind(this),{passive:!1})}},resolver:Qr},ei={key:"scroll",engine:class extends Rr{constructor(...e){super(...e),lr(this,"ingKey","scrolling")}scroll(e){this.state._active||this.start(e),this.scrollChange(e),this.timeoutStore.add("scrollEnd",this.scrollEnd.bind(this))}scrollChange(e){e.cancelable&&e.preventDefault();const t=this.state,n=function(e){var t,n;const{scrollX:r,scrollY:i,scrollLeft:s,scrollTop:a}=e.currentTarget;return[null!==(t=null!=r?r:s)&&void 0!==t?t:0,null!==(n=null!=i?i:a)&&void 0!==n?n:0]}(e);t._delta=ir.sub(n,t._values),ir.addTo(t._movement,t._delta),this.computeValues(n),this.compute(e),this.emit()}scrollEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("scroll","",this.scroll.bind(this))}},resolver:Hr},ti={key:"wheel",engine:class extends Rr{constructor(...e){super(...e),lr(this,"ingKey","wheeling")}wheel(e){this.state._active||this.start(e),this.wheelChange(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this))}wheelChange(e){const t=this.state;t._delta=Mr(e),ir.addTo(t._movement,t._delta),zr(t),this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("wheel","",this.wheel.bind(this))}},resolver:jr};function ni(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},s=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const ri={target(e){if(e)return()=>"current"in e?e.current:e},enabled:(e=!0)=>e,window:(e=(Nr.isBrowser?window:void 0))=>e,eventOptions:({passive:e=!0,capture:t=!1}={})=>({passive:e,capture:t}),transform:e=>e},ii=["target","eventOptions","window","enabled","transform"];function si(e={},t){const n={};for(const[r,i]of Object.entries(t))switch(typeof i){case"function":n[r]=i.call(n,e[r],r,e);break;case"object":n[r]=si(e[r],i);break;case"boolean":i&&(n[r]=e[r])}return n}class ai{constructor(e,t){lr(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,i){const s=this._listeners,a=function(e,t=""){const n=ur[e];return e+(n&&n[t]||t)}(t,n),o=hr(hr({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),i);e.addEventListener(a,r,o);const l=()=>{e.removeEventListener(a,r,o),s.delete(l)};return s.add(l),l}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class oi{constructor(){lr(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class li{constructor(e){lr(this,"gestures",new Set),lr(this,"_targetEventStore",new ai(this)),lr(this,"gestureEventStores",{}),lr(this,"gestureTimeoutStores",{}),lr(this,"handlers",{}),lr(this,"config",{}),lr(this,"pointerIds",new Set),lr(this,"touchIds",new Set),lr(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),function(e,t){t.drag&&ci(e,"drag");t.wheel&&ci(e,"wheel");t.scroll&&ci(e,"scroll");t.move&&ci(e,"move");t.pinch&&ci(e,"pinch");t.hover&&ci(e,"hover")}(this,e)}setEventIds(e){return Ar(e)?(this.touchIds=new Set(br(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t,n={}){const r=e,{target:i,eventOptions:s,window:a,enabled:o,transform:l}=r,c=ni(r,ii);if(n.shared=si({target:i,eventOptions:s,window:a,enabled:o,transform:l},ri),t){const e=Yr.get(t);n[t]=si(hr({shared:n.shared},c),e)}else for(const h in c){const e=Yr.get(h);e&&(n[h]=si(hr({shared:n.shared},c[h]),e))}return n}(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const i=this.config[t],s=hi(n,i.eventOptions,!!r);if(i.enabled){new(Xr.get(t))(this,e,t).bind(s)}}const i=hi(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)i(t,"",(n=>this.nativeHandlers[t](hr(hr({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=Tr(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:i,passive:s}=gr(e);this._targetEventStore.add(r,t,"",n[e],{capture:i,passive:s})}}}}function ci(e,t){e.gestures.add(t),e.gestureEventStores[t]=new ai(e,t),e.gestureTimeoutStores[t]=new oi}const hi=(e,t,n)=>(r,i,s,a={},o=!1)=>{var l,c;const h=null!==(l=a.capture)&&void 0!==l?l:t.capture,u=null!==(c=a.passive)&&void 0!==c?c:t.passive;let d=o?r:fr(r,i,h);n&&u&&(d+="Passive"),e[d]=e[d]||[],e[d].push(s)},ui=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function di(e,t,n,r,i,s){if(!e.has(n))return;if(!Xr.has(r))return void 0;const a=n+"Start",o=n+"End";i[r]=e=>{let r;return e.first&&a in t&&t[a](e),n in t&&(r=t[n](e)),e.last&&o in t&&t[o](e),r},s[r]=s[r]||{}}function pi(e,t){const[n,r,i]=function(e){const t={},n={},r=new Set;for(let i in e)ui.test(i)?(r.add(RegExp.lastMatch),n[i]=e[i]):t[i]=e[i];return[n,t,r]}(e),s={};return di(i,n,"onDrag","drag",s,t),di(i,n,"onWheel","wheel",s,t),di(i,n,"onScroll","scroll",s,t),di(i,n,"onPinch","pinch",s,t),di(i,n,"onMove","move",s,t),di(i,n,"onHover","hover",s,t),{handlers:s,config:t,nativeHandlers:r}}function fi(e,t={},n,r){const s=i.useMemo((()=>new li(e)),[]);if(s.applyHandlers(e,r),s.applyConfig(t,n),i.useEffect(s.effect.bind(s)),i.useEffect((()=>s.clean.bind(s)),[]),void 0===t.target)return s.bind.bind(s)}function mi(e,t){const n=([Kr,$r,ei,ti,Zr,Jr].forEach(qr),function(e,t){const{handlers:n,nativeHandlers:r,config:i}=pi(e,t||{});return fi(n,i,void 0,r)});return n(e,t||{})}function gi({snap:e,global:t,cursor:n=!0,children:s,speed:l=1,rotation:c=[0,0,0],zoom:h=1,polar:u=[0,Math.PI/2],azimuth:d=[-1/0,1/0],config:p={mass:1,tension:170,friction:26}}){const{size:f,gl:m}=(0,o.useThree)(),g=i.useMemo((()=>[c[0]+u[0],c[0]+u[1]]),[c[0],u[0],u[1]]),A=i.useMemo((()=>[c[1]+d[0],c[1]+d[1]]),[c[1],d[0],d[1]]),v=i.useMemo((()=>[a.MathUtils.clamp(c[0],...g),a.MathUtils.clamp(c[1],...A),c[2]]),[c[0],c[1],c[2],g,A]),[y,x]=Kn((()=>({scale:1,rotation:v,config:p})));i.useEffect((()=>{x.start({scale:1,rotation:v,config:p})}),[v]),i.useEffect((()=>{t&&n&&(m.domElement.style.cursor="grab")}),[t,n,m.domElement]);const b=mi({onHover:({last:e})=>{n&&!t&&(m.domElement.style.cursor=e?"auto":"grab")},onDrag:({down:t,delta:[r,i],memo:[s,o]=y.rotation.animation.to||v})=>{n&&(m.domElement.style.cursor=t?"grabbing":"grab"),r=a.MathUtils.clamp(o+r/f.width*Math.PI*l,...A),i=a.MathUtils.clamp(s+i/f.height*Math.PI*l,...g);const c=e&&!t&&"boolean"!=typeof e?e:p;return x.start({scale:t&&i>g[1]/2?h:1,rotation:e&&!t?v:[i,r,0],config:e=>"scale"===e?{...c,friction:3*c.friction}:c}),[i,r]}},{target:t?m.domElement:void 0});return i.createElement(rr.group,(0,r.c)({},null==b?void 0:b(),y),s)}const Ai=new a.Frustum,vi=new a.Vector3,yi=new a.Vector3,xi=new a.Vector3,bi=new a.Vector3,Ei=new a.Vector3,_i=new a.Vector3,Si=new a.Vector3,Mi=new a.Vector3,wi=new a.Vector3,Ci=new a.Vector3,Ti=new a.Vector3,Ii=new a.Vector3,Bi=new a.Vector3,Ri=new a.Vector3;class Pi{constructor(e,t,n){this.camera=e,this.scene=t,this.startPoint=new a.Vector3,this.endPoint=new a.Vector3,this.collection=[],this.deep=n||Number.MAX_VALUE}select(e,t){return this.startPoint=e||this.startPoint,this.endPoint=t||this.endPoint,this.collection=[],this.updateFrustum(this.startPoint,this.endPoint),this.searchChildInFrustum(Ai,this.scene),this.collection}updateFrustum(e,t){if(e=e||this.startPoint,t=t||this.endPoint,e.x===t.x&&(t.x+=Number.EPSILON),e.y===t.y&&(t.y+=Number.EPSILON),this.camera.updateProjectionMatrix(),this.camera.updateMatrixWorld(),this.camera.isPerspectiveCamera)yi.copy(e),yi.x=Math.min(e.x,t.x),yi.y=Math.max(e.y,t.y),t.x=Math.max(e.x,t.x),t.y=Math.min(e.y,t.y),xi.setFromMatrixPosition(this.camera.matrixWorld),bi.copy(yi),Ei.set(t.x,yi.y,0),_i.copy(t),Si.set(yi.x,t.y,0),bi.unproject(this.camera),Ei.unproject(this.camera),_i.unproject(this.camera),Si.unproject(this.camera),Ii.copy(bi).sub(xi),Bi.copy(Ei).sub(xi),Ri.copy(_i).sub(xi),Ii.normalize(),Bi.normalize(),Ri.normalize(),Ii.multiplyScalar(this.deep),Bi.multiplyScalar(this.deep),Ri.multiplyScalar(this.deep),Ii.add(xi),Bi.add(xi),Ri.add(xi),(n=Ai.planes)[0].setFromCoplanarPoints(xi,bi,Ei),n[1].setFromCoplanarPoints(xi,Ei,_i),n[2].setFromCoplanarPoints(_i,Si,xi),n[3].setFromCoplanarPoints(Si,bi,xi),n[4].setFromCoplanarPoints(Ei,_i,Si),n[5].setFromCoplanarPoints(Ri,Bi,Ii),n[5].normal.multiplyScalar(-1);else if(this.camera.isOrthographicCamera){const r=Math.min(e.x,t.x),i=Math.max(e.y,t.y),s=Math.max(e.x,t.x),a=Math.min(e.y,t.y);var n;bi.set(r,i,-1),Ei.set(s,i,-1),_i.set(s,a,-1),Si.set(r,a,-1),Mi.set(r,i,1),wi.set(s,i,1),Ci.set(s,a,1),Ti.set(r,a,1),bi.unproject(this.camera),Ei.unproject(this.camera),_i.unproject(this.camera),Si.unproject(this.camera),Mi.unproject(this.camera),wi.unproject(this.camera),Ci.unproject(this.camera),Ti.unproject(this.camera),(n=Ai.planes)[0].setFromCoplanarPoints(bi,Mi,wi),n[1].setFromCoplanarPoints(Ei,wi,Ci),n[2].setFromCoplanarPoints(Ci,Ti,Si),n[3].setFromCoplanarPoints(Ti,Mi,bi),n[4].setFromCoplanarPoints(Ei,_i,Si),n[5].setFromCoplanarPoints(Ci,wi,Mi),n[5].normal.multiplyScalar(-1)}else console.error("THREE.SelectionBox: Unsupported camera type.")}searchChildInFrustum(e,t){if((t.isMesh||t.isLine||t.isPoints)&&void 0!==t.material&&(null===t.geometry.boundingSphere&&t.geometry.computeBoundingSphere(),vi.copy(t.geometry.boundingSphere.center),vi.applyMatrix4(t.matrixWorld),e.containsPoint(vi)&&this.collection.push(t)),t.children.length>0)for(let n=0;ne),...u}){const{camera:d,raycaster:p,gl:f,controls:m,size:g,get:A}=(0,o.useThree)(),[v,y]=i.useState(!1),[x,b]=i.useReducer(((e,{object:t,shift:n})=>void 0===t?[]:Array.isArray(t)?t:n?e.includes(t)?e.filter((e=>e!==t)):[t,...e]:e[0]===t?[]:[t]),[]);i.useEffect((()=>{null==s||s(x)}),[x]);const E=i.useCallback((e=>{e.stopPropagation(),b({object:h([e.object])[0],shift:t&&e.shiftKey})}),[]),_=i.useCallback((e=>!v&&b({})),[v]),S=i.useRef(null);return i.useEffect((()=>{if(!e||!t)return;const n=new Pi(d,S.current),r=document.createElement("div");r.style.pointerEvents="none",r.style.border=l,r.style.backgroundColor=c,r.style.position="fixed";const i=new a.Vector2,s=new a.Vector2,o=new a.Vector2,u=p.enabled,v=null==m?void 0:m.enabled;let y=!1;function x(e,t){var n;const{offsetX:r,offsetY:i}=null!==(n=null==p.computeOffsets?void 0:p.computeOffsets(e,A()))&&void 0!==n?n:e,{width:s,height:a}=g;t.set(r/s*2-1,-i/a*2+1)}function E(e){e.shiftKey&&(!function(e){var t;m&&(m.enabled=!1),p.enabled=!1,y=!0,null==(t=f.domElement.parentElement)||t.appendChild(r),r.style.left=`${e.clientX}px`,r.style.top=`${e.clientY}px`,r.style.width="0px",r.style.height="0px",i.x=e.clientX,i.y=e.clientY}(e),x(e,n.startPoint))}let _=[];function M(e){if(y){!function(e){o.x=Math.max(i.x,e.clientX),o.y=Math.max(i.y,e.clientY),s.x=Math.min(i.x,e.clientX),s.y=Math.min(i.y,e.clientY),r.style.left=`${s.x}px`,r.style.top=`${s.y}px`,r.style.width=o.x-s.x+"px",r.style.height=o.y-s.y+"px"}(e),x(e,n.endPoint);const t=n.select().sort((e=>e.uuid)).filter((e=>e.isMesh));(0,Di.c)(t,_)||(_=t,b({object:h(t)}))}}function w(e){var t;y&&y&&(m&&(m.enabled=v),p.enabled=u,y=!1,null==(t=r.parentElement)||t.removeChild(r))}return document.addEventListener("pointerdown",E,{passive:!0}),document.addEventListener("pointermove",M,{passive:!0,capture:!0}),document.addEventListener("pointerup",w,{passive:!0}),()=>{document.removeEventListener("pointerdown",E),document.removeEventListener("pointermove",M),document.removeEventListener("pointerup",w)}}),[g,p,d,m,f]),i.createElement("group",(0,r.c)({ref:S,onClick:E,onPointerOver:()=>y(!0),onPointerOut:()=>y(!1),onPointerMissed:_},u),i.createElement(Li.Provider,{value:x},n))}function Ui(){return i.useContext(Li)}const Oi=i.forwardRef((function({follow:e=!0,lockX:t=!1,lockY:n=!1,lockZ:s=!1,...a},l){const c=i.useRef();return(0,o.useFrame)((({camera:r})=>{if(!e||!c.current)return;const i=c.current.rotation.clone();c.current.quaternion.copy(r.quaternion),t&&(c.current.rotation.x=i.x),n&&(c.current.rotation.y=i.y),s&&(c.current.rotation.z=i.z)})),i.createElement("group",(0,r.c)({ref:w([c,l])},a))})),Ni=new a.Box3,ki=new a.Vector3;class Gi extends a.InstancedBufferGeometry{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute("position",new a.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this.setAttribute("uv",new a.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix4(e){const t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return void 0!==t&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new a.InstancedInterleavedBuffer(t,6,1);return this.setAttribute("instanceStart",new a.InterleavedBufferAttribute(n,3,0)),this.setAttribute("instanceEnd",new a.InterleavedBufferAttribute(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const r=new a.InstancedInterleavedBuffer(n,2*t,1);return this.setAttribute("instanceColorStart",new a.InterleavedBufferAttribute(r,t,0)),this.setAttribute("instanceColorEnd",new a.InterleavedBufferAttribute(r,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new a.WireframeGeometry(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new a.Box3);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;void 0!==e&&void 0!==t&&(this.boundingBox.setFromBufferAttribute(e),Ni.setFromBufferAttribute(t),this.boundingBox.union(Ni))}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new a.Sphere),null===this.boundingBox&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(void 0!==e&&void 0!==t){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let r=0;for(let i=0,s=e.count;i\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\n\t\t\t\tuniform float linewidth;\n\t\t\t\tuniform vec2 resolution;\n\n\t\t\t\tattribute vec3 instanceStart;\n\t\t\t\tattribute vec3 instanceEnd;\n\n\t\t\t\t#ifdef USE_COLOR\n\t\t\t\t\t#ifdef USE_LINE_COLOR_ALPHA\n\t\t\t\t\t\tvarying vec4 vLineColor;\n\t\t\t\t\t\tattribute vec4 instanceColorStart;\n\t\t\t\t\t\tattribute vec4 instanceColorEnd;\n\t\t\t\t\t#else\n\t\t\t\t\t\tvarying vec3 vLineColor;\n\t\t\t\t\t\tattribute vec3 instanceColorStart;\n\t\t\t\t\t\tattribute vec3 instanceColorEnd;\n\t\t\t\t\t#endif\n\t\t\t\t#endif\n\n\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\tvarying vec4 worldPos;\n\t\t\t\t\tvarying vec3 worldStart;\n\t\t\t\t\tvarying vec3 worldEnd;\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t#else\n\n\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t#endif\n\n\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\tuniform float dashScale;\n\t\t\t\t\tattribute float instanceDistanceStart;\n\t\t\t\t\tattribute float instanceDistanceEnd;\n\t\t\t\t\tvarying float vLineDistance;\n\n\t\t\t\t#endif\n\n\t\t\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t\t\t// conservative estimate of the near plane\n\t\t\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#ifdef USE_COLOR\n\n\t\t\t\t\t\tvLineColor = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\t\t\t\t\t\tvUv = uv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\t\t\t// camera space\n\t\t\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\tworldStart = start.xyz;\n\t\t\t\t\t\tworldEnd = end.xyz;\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\tvUv = uv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\t\t\tif ( perspective ) {\n\n\t\t\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// clip space\n\t\t\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t\t\t// ndc space\n\t\t\t\t\tvec3 ndcStart = clipStart.xyz / clipStart.w;\n\t\t\t\t\tvec3 ndcEnd = clipEnd.xyz / clipEnd.w;\n\n\t\t\t\t\t// direction\n\t\t\t\t\tvec2 dir = ndcEnd.xy - ndcStart.xy;\n\n\t\t\t\t\t// account for clip-space aspect ratio\n\t\t\t\t\tdir.x *= aspect;\n\t\t\t\t\tdir = normalize( dir );\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\t// get the offset direction as perpendicular to the view vector\n\t\t\t\t\t\tvec3 worldDir = normalize( end.xyz - start.xyz );\n\t\t\t\t\t\tvec3 offset;\n\t\t\t\t\t\tif ( position.y < 0.5 ) {\n\n\t\t\t\t\t\t\toffset = normalize( cross( start.xyz, worldDir ) );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\toffset = normalize( cross( end.xyz, worldDir ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// sign flip\n\t\t\t\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t\t\t\tfloat forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) );\n\n\t\t\t\t\t\t// don't extend the line if we're rendering dashes because we\n\t\t\t\t\t\t// won't be rendering the endcaps\n\t\t\t\t\t\t#ifndef USE_DASH\n\n\t\t\t\t\t\t\t// extend the line bounds to encompass endcaps\n\t\t\t\t\t\t\tstart.xyz += - worldDir * linewidth * 0.5;\n\t\t\t\t\t\t\tend.xyz += worldDir * linewidth * 0.5;\n\n\t\t\t\t\t\t\t// shift the position of the quad so it hugs the forward edge of the line\n\t\t\t\t\t\t\toffset.xy -= dir * forwardOffset;\n\t\t\t\t\t\t\toffset.z += 0.5;\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t\t// endcaps\n\t\t\t\t\t\tif ( position.y > 1.0 || position.y < 0.0 ) {\n\n\t\t\t\t\t\t\toffset.xy += dir * 2.0 * forwardOffset;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// adjust for linewidth\n\t\t\t\t\t\toffset *= linewidth * 0.5;\n\n\t\t\t\t\t\t// set the world position\n\t\t\t\t\t\tworldPos = ( position.y < 0.5 ) ? start : end;\n\t\t\t\t\t\tworldPos.xyz += offset;\n\n\t\t\t\t\t\t// project the worldpos\n\t\t\t\t\t\tvec4 clip = projectionMatrix * worldPos;\n\n\t\t\t\t\t\t// shift the depth of the projected points so the line\n\t\t\t\t\t\t// segments overlap neatly\n\t\t\t\t\t\tvec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;\n\t\t\t\t\t\tclip.z = clipPose.z * clip.w;\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\t\t\t\t\t\t// undo aspect ratio adjustment\n\t\t\t\t\t\tdir.x /= aspect;\n\t\t\t\t\t\toffset.x /= aspect;\n\n\t\t\t\t\t\t// sign flip\n\t\t\t\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t\t\t\t// endcaps\n\t\t\t\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\t\t\t\toffset += - dir;\n\n\t\t\t\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\t\t\t\toffset += dir;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// adjust for linewidth\n\t\t\t\t\t\toffset *= linewidth;\n\n\t\t\t\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\t\t\t\toffset /= resolution.y;\n\n\t\t\t\t\t\t// select end\n\t\t\t\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t\t\t\t// back to clip space\n\t\t\t\t\t\toffset *= clip.w;\n\n\t\t\t\t\t\tclip.xy += offset;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tgl_Position = clip;\n\n\t\t\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:`\n\t\t\t\tuniform vec3 diffuse;\n\t\t\t\tuniform float opacity;\n\t\t\t\tuniform float linewidth;\n\n\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\tuniform float dashOffset;\n\t\t\t\t\tuniform float dashSize;\n\t\t\t\t\tuniform float gapSize;\n\n\t\t\t\t#endif\n\n\t\t\t\tvarying float vLineDistance;\n\n\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\tvarying vec4 worldPos;\n\t\t\t\t\tvarying vec3 worldStart;\n\t\t\t\t\tvarying vec3 worldEnd;\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t#else\n\n\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t#endif\n\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\n\t\t\t\t#ifdef USE_COLOR\n\t\t\t\t\t#ifdef USE_LINE_COLOR_ALPHA\n\t\t\t\t\t\tvarying vec4 vLineColor;\n\t\t\t\t\t#else\n\t\t\t\t\t\tvarying vec3 vLineColor;\n\t\t\t\t\t#endif\n\t\t\t\t#endif\n\n\t\t\t\tvec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {\n\n\t\t\t\t\tfloat mua;\n\t\t\t\t\tfloat mub;\n\n\t\t\t\t\tvec3 p13 = p1 - p3;\n\t\t\t\t\tvec3 p43 = p4 - p3;\n\n\t\t\t\t\tvec3 p21 = p2 - p1;\n\n\t\t\t\t\tfloat d1343 = dot( p13, p43 );\n\t\t\t\t\tfloat d4321 = dot( p43, p21 );\n\t\t\t\t\tfloat d1321 = dot( p13, p21 );\n\t\t\t\t\tfloat d4343 = dot( p43, p43 );\n\t\t\t\t\tfloat d2121 = dot( p21, p21 );\n\n\t\t\t\t\tfloat denom = d2121 * d4343 - d4321 * d4321;\n\n\t\t\t\t\tfloat numer = d1343 * d4321 - d1321 * d4343;\n\n\t\t\t\t\tmua = numer / denom;\n\t\t\t\t\tmua = clamp( mua, 0.0, 1.0 );\n\t\t\t\t\tmub = ( d1343 + d4321 * ( mua ) ) / d4343;\n\t\t\t\t\tmub = clamp( mub, 0.0, 1.0 );\n\n\t\t\t\t\treturn vec2( mua, mub );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#include \n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\t\t\tif ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tfloat alpha = opacity;\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\t// Find the closest points on the view ray and the line segment\n\t\t\t\t\t\tvec3 rayEnd = normalize( worldPos.xyz ) * 1e5;\n\t\t\t\t\t\tvec3 lineDir = worldEnd - worldStart;\n\t\t\t\t\t\tvec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );\n\n\t\t\t\t\t\tvec3 p1 = worldStart + lineDir * params.x;\n\t\t\t\t\t\tvec3 p2 = rayEnd * params.y;\n\t\t\t\t\t\tvec3 delta = p1 - p2;\n\t\t\t\t\t\tfloat len = length( delta );\n\t\t\t\t\t\tfloat norm = len / linewidth;\n\n\t\t\t\t\t\t#ifndef USE_DASH\n\n\t\t\t\t\t\t\t#ifdef USE_ALPHA_TO_COVERAGE\n\n\t\t\t\t\t\t\t\tfloat dnorm = fwidth( norm );\n\t\t\t\t\t\t\t\talpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );\n\n\t\t\t\t\t\t\t#else\n\n\t\t\t\t\t\t\t\tif ( norm > 0.5 ) {\n\n\t\t\t\t\t\t\t\t\tdiscard;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t#endif\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\t#ifdef USE_ALPHA_TO_COVERAGE\n\n\t\t\t\t\t\t\t// artifacts appear on some hardware if a derivative is taken within a conditional\n\t\t\t\t\t\t\tfloat a = vUv.x;\n\t\t\t\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\t\t\t\tfloat len2 = a * a + b * b;\n\t\t\t\t\t\t\tfloat dlen = fwidth( len2 );\n\n\t\t\t\t\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\t\t\t\t\talpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#else\n\n\t\t\t\t\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\t\t\t\t\tfloat a = vUv.x;\n\t\t\t\t\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\t\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\t\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tvec4 diffuseColor = vec4( diffuse, alpha );\n\t\t\t\t\t#ifdef USE_COLOR\n\t\t\t\t\t\t#ifdef USE_LINE_COLOR_ALPHA\n\t\t\t\t\t\t\tdiffuseColor *= vLineColor;\n\t\t\t\t\t\t#else\n\t\t\t\t\t\t\tdiffuseColor.rgb *= vLineColor;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#include \n\n\t\t\t\t\tgl_FragColor = diffuseColor;\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include <${parseInt(a.REVISION.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}>\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t`,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(e){!0===e?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return Boolean("USE_DASH"in this.defines)},set(e){Boolean(e)!==Boolean("USE_DASH"in this.defines)&&(this.needsUpdate=!0),!0===e?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return Boolean("USE_ALPHA_TO_COVERAGE"in this.defines)},set:function(e){Boolean(e)!==Boolean("USE_ALPHA_TO_COVERAGE"in this.defines)&&(this.needsUpdate=!0),!0===e?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}const Qi=new a.Vector3,Vi=new a.Vector3,Hi=new a.Vector4,ji=new a.Vector4,Wi=new a.Vector4,Xi=new a.Vector3,Yi=new a.Matrix4,qi=new a.Line3,Ki=new a.Vector3,Ji=new a.Box3,Zi=new a.Sphere,$i=new a.Vector4;let es,ts,ns,rs;function is(e,t,n){return $i.set(0,0,-t,1).applyMatrix4(e.projectionMatrix),$i.multiplyScalar(1/$i.w),$i.x=rs/n.width,$i.y=rs/n.height,$i.applyMatrix4(e.projectionMatrixInverse),$i.multiplyScalar(1/$i.w),Math.abs(Math.max($i.x,$i.y))}class ss extends a.Mesh{constructor(e=new Gi,t=new zi({color:16777215*Math.random()})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,r=new Float32Array(2*t.count);for(let s=0,a=0,o=t.count;sh&&ji.z>h)continue;if(Hi.z>h){const e=Hi.z-ji.z,t=(Hi.z-h)/e;Hi.lerp(ji,t)}else if(ji.z>h){const e=ji.z-Hi.z,t=(ji.z-h)/e;ji.lerp(Hi,t)}Hi.applyMatrix4(r),ji.applyMatrix4(r),Hi.multiplyScalar(1/Hi.w),ji.multiplyScalar(1/ji.w),Hi.x*=i.x/2,Hi.y*=i.y/2,ji.x*=i.x/2,ji.y*=i.y/2,qi.start.copy(Hi),qi.start.z=0,qi.end.copy(ji),qi.end.z=0;const t=qi.closestPointToPointParameter(Xi,!0);qi.at(t,Ki);const o=a.MathUtils.lerp(Hi.z,ji.z,t),d=o>=-1&&o<=1,p=Xi.distanceTo(Ki)<.5*rs;if(d&&p){qi.start.fromBufferAttribute(l,u),qi.end.fromBufferAttribute(c,u),qi.start.applyMatrix4(s),qi.end.applyMatrix4(s);const t=new a.Vector3,r=new a.Vector3;es.distanceSqToSegment(qi.start,qi.end,r,t),n.push({point:r,pointOnLine:t,distance:es.origin.distanceTo(r),object:e,face:null,faceIndex:u,uv:null,uv2:null})}}}(this,r,t))}}}class as extends Gi{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const t=e.length-3,n=new Float32Array(2*t);for(let r=0;rnew os)),[u]=i.useState((()=>new zi)),[d]=i.useState((()=>new a.Vector2(512,512))),p=i.useMemo((()=>{const t=new as,r=e.map((e=>e instanceof a.Vector3?e.toArray():e));if(t.setPositions(r.flat()),n){const e=n.map((e=>e instanceof a.Color?e.toArray():e));t.setColors(e.flat())}return t}),[e,n]);return i.useLayoutEffect((()=>{h.computeLineDistances()}),[e,h]),i.useLayoutEffect((()=>{o?u.defines.USE_DASH="":delete u.defines.USE_DASH,u.needsUpdate=!0}),[o,u]),i.useEffect((()=>()=>p.dispose()),[p]),i.createElement("primitive",(0,r.c)({object:h,ref:c},l),i.createElement("primitive",{object:p,attach:"geometry"}),i.createElement("primitive",(0,r.c)({object:u,attach:"material",color:t,vertexColors:Boolean(n),resolution:d,linewidth:s,dashed:o},l)))})),cs=new a.Vector3,hs=i.forwardRef((function({start:e=[0,0,0],end:t=[0,0,0],mid:n,segments:s=20,...o},l){const c=i.useRef(null),[h]=i.useState((()=>new a.QuadraticBezierCurve3(void 0,void 0,void 0))),u=i.useCallback(((e,t,n,r=20)=>(e instanceof a.Vector3?h.v0.copy(e):h.v0.set(...e),t instanceof a.Vector3?h.v2.copy(t):h.v2.set(...t),n instanceof a.Vector3?h.v1.copy(n):h.v1.copy(h.v0.clone().add(h.v2.clone().sub(h.v0)).add(cs.set(0,h.v0.y-h.v2.y,0))),h.getPoints(r))),[]);i.useLayoutEffect((()=>{c.current.setPoints=(e,t,n)=>{const r=u(e,t,n);c.current.geometry&&c.current.geometry.setPositions(r.map((e=>e.toArray())).flat())}}),[]);const d=i.useMemo((()=>u(e,t,n,s)),[e,t,n,s]);return i.createElement(ls,(0,r.c)({ref:w([c,l]),points:d},o))})),us=i.forwardRef((function({start:e,end:t,midA:n,midB:s,segments:o=20,...l},c){const h=i.useMemo((()=>{const r=e instanceof a.Vector3?e:new a.Vector3(...e),i=t instanceof a.Vector3?t:new a.Vector3(...t),l=n instanceof a.Vector3?n:new a.Vector3(...n),c=s instanceof a.Vector3?s:new a.Vector3(...s);return new a.CubicBezierCurve3(r,l,c,i).getPoints(o)}),[e,t,n,s,o]);return i.createElement(ls,(0,r.c)({ref:c,points:h},l))})),ds=i.forwardRef((({url:e,distance:t=1,loop:n=!0,autoplay:s,...l},c)=>{const h=i.useRef(),u=(0,o.useThree)((({camera:e})=>e)),[d]=i.useState((()=>new a.AudioListener)),p=(0,o.useLoader)(a.AudioLoader,e);return i.useEffect((()=>{const e=h.current;e&&(e.setBuffer(p),e.setRefDistance(t),e.setLoop(n),s&&!e.isPlaying&&e.play())}),[p,u,t,n]),i.useEffect((()=>{const e=h.current;return u.add(d),()=>{u.remove(d),e&&(e.isPlaying&&e.stop(),e.source&&e.source._connected&&e.disconnect())}}),[]),i.createElement("positionalAudio",(0,r.c)({ref:w([h,c]),args:[d]},l))}));function ps(){var e,t=0,n=[],r=0,i=0;var s=d((function(e){i||o(1,e)})),a=d((function(e){i||o(-1,e)}));function o(n,r){i++;var s=0;try{r===m&&p();var a=n>0&&u(r);a?a.call(r,d((function(e){s++,o(1,e)})),d((function(e){s++,o(-1,e)}))):(t=n,e=r,l())}catch(za){t||s||o(-1,za)}}function l(){r||(setTimeout(c,0),r=1)}function c(){var e=n;r=0,n=[],e.forEach(h)}function h(e){e()}function u(e){var t=e&&(f(e)||"object"==typeof e)&&e.then;return f(t)&&t}function d(e){var t=0;return function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];t++||e.apply(this,n)}}function p(){throw new TypeError("Chaining cycle detected")}var f=function(e){return"function"==typeof e},m={then:function(r,i){var s=ps();return n.push((function(){var n=t>0?r:i;if(f(n))try{var a=n(e);a===s&&p();var o=u(a);o?o.call(a,s.resolve,s.reject):s.resolve(a)}catch(l){s.reject(l)}else s[t>0?"resolve":"reject"](e)})),t&&l(),s},resolve:s,reject:a};return m}function fs(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return{then:n.then.bind(n),resolve:e,reject:t}}ps.all=fs.all=function(e){var t=0,n=[],r=ms();return 0===e.length?r.resolve([]):e.forEach((function(i,s){var a=ms();a.resolve(i),a.then((function(i){t++,n[s]=i,t===e.length&&r.resolve(n)}),r.reject)})),r};var ms="function"==typeof Promise?fs:ps;function gs(){var e=Object.create(null);function t(r,i){var s=r.id,a=r.name,o=r.dependencies;void 0===o&&(o=[]);var l=r.init;void 0===l&&(l=function(){});var c=r.getTransferables;if(void 0===c&&(c=null),!e[s])try{o=o.map((function(n){return n&&n.isWorkerModule&&(t(n,(function(e){if(e instanceof Error)throw e})),n=e[n.id].value),n})),l=n("<"+a+">.init",l),c&&(c=n("<"+a+">.getTransferables",c));var h=null;"function"==typeof l?h=l.apply(void 0,o):console.error("worker module init function failed to rehydrate"),e[s]={id:s,value:h,getTransferables:c},i(h)}catch(u){u&&u.noLog||console.error(u),i(u)}}function n(e,t){var n=void 0;self.troikaDefine=function(e){return n=e};var r=URL.createObjectURL(new Blob(["/** "+e.replace(/\*/g,"")+" **/\n\ntroikaDefine(\n"+t+"\n)"],{type:"application/javascript"}));try{importScripts(r)}catch(i){console.error(i)}return URL.revokeObjectURL(r),delete self.troikaDefine,n}self.addEventListener("message",(function(n){var r=n.data,i=r.messageId,s=r.action,a=r.data;try{"registerModule"===s&&t(a,(function(e){e instanceof Error?postMessage({messageId:i,success:!1,error:e.message}):postMessage({messageId:i,success:!0,result:{isCallable:"function"==typeof e}})})),"callModule"===s&&function(t,n){var r,i=t.id,s=t.args;e[i]&&"function"==typeof e[i].value||n(new Error("Worker module "+i+": not found or its 'init' did not return a function"));try{var a=(r=e[i]).value.apply(r,s);a&&"function"==typeof a.then?a.then(o,(function(e){return n(e instanceof Error?e:new Error(""+e))})):o(a)}catch(l){n(l)}function o(t){try{var r=e[i].getTransferables&&e[i].getTransferables(t);r&&Array.isArray(r)&&r.length||(r=void 0),n(t,r)}catch(l){console.error(l),n(l)}}}(a,(function(e,t){e instanceof Error?postMessage({messageId:i,success:!1,error:e.message}):postMessage({messageId:i,success:!0,result:e},t||void 0)}))}catch(o){postMessage({messageId:i,success:!1,error:o.stack})}}))}var As=function(){var e=!1;if("undefined"!=typeof window&&void 0!==window.document)try{new Worker(URL.createObjectURL(new Blob([""],{type:"application/javascript"}))).terminate(),e=!0}catch(t){console.log("Troika createWorkerModule: web workers not allowed; falling back to main thread execution. Cause: ["+t.message+"]")}return As=function(){return e},e},vs=0,ys=0,xs=!1,bs=Object.create(null),Es=Object.create(null),_s=Object.create(null);function Ss(e){if(!(e&&"function"==typeof e.init||xs))throw new Error("requires `options.init` function");var t=e.dependencies,n=e.init,r=e.getTransferables,i=e.workerId;if(!As())return function(e){var t=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t._getInitResult().then((function(t){if("function"==typeof t)return t.apply(void 0,e);throw new Error("Worker module function was called but `init` did not return a callable function")}))};return t._getInitResult=function(){var n=e.dependencies,r=e.init;n=Array.isArray(n)?n.map((function(e){return e&&e._getInitResult?e._getInitResult():e})):[];var i=ms.all(n).then((function(e){return r.apply(null,e)}));return t._getInitResult=function(){return i},i},t}(e);null==i&&(i="#default");var s="workerModule"+ ++vs,a=e.name||s,o=null;function l(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(!o){o=ws(i,"registerModule",l.workerModuleData);var n=function(){o=null,Es[i].delete(n)};(Es[i]||(Es[i]=new Set)).add(n)}return o.then((function(t){if(t.isCallable)return ws(i,"callModule",{id:s,args:e});throw new Error("Worker module function was called but `init` did not return a callable function")}))}return t=t&&t.map((function(e){return"function"!=typeof e||e.workerModuleData||(xs=!0,e=Ss({workerId:i,name:"<"+a+"> function dependency: "+e.name,init:"function(){return (\n"+Ms(e)+"\n)}"}),xs=!1),e&&e.workerModuleData&&(e=e.workerModuleData),e})),l.workerModuleData={isWorkerModule:!0,id:s,name:a,dependencies:t,init:Ms(n),getTransferables:r&&Ms(r)},l}function Ms(e){var t=e.toString();return!/^function/.test(t)&&/^\w+\s*\(/.test(t)&&(t="function "+t),t}function ws(e,t,n){var r=ms(),i=++ys;return _s[i]=function(e){e.success?r.resolve(e.result):r.reject(new Error("Error in worker "+t+" call: "+e.error))},function(e){var t=bs[e];if(!t){var n=Ms(gs);(t=bs[e]=new Worker(URL.createObjectURL(new Blob(["/** Worker Module Bootstrap: "+e.replace(/\*/g,"")+" **/\n\n;("+n+")()"],{type:"application/javascript"})))).onmessage=function(e){var t=e.data,n=t.messageId,r=_s[n];if(!r)throw new Error("WorkerModule response with empty or unknown messageId");delete _s[n],r(t)}}return t}(e).postMessage({messageId:i,action:t,data:n}),r}var Cs=Ss({name:"Thenable",dependencies:[ms],init:function(e){return e}});function Ts(){var e=function(e){function t(e,t,n,r,i,s,a,o){var l=1-a;o.x=l*l*e+2*l*a*n+a*a*i,o.y=l*l*t+2*l*a*r+a*a*s}function n(e,t,n,r,i,s,a,o,l,c){var h=1-l;c.x=h*h*h*e+3*h*h*l*n+3*h*l*l*i+l*l*l*a,c.y=h*h*h*t+3*h*h*l*r+3*h*l*l*s+l*l*l*o}function r(e,t){for(var n,r,i,s,a,o=/([MLQCZ])([^MLQCZ]*)/g;n=o.exec(e);){var l=n[2].replace(/^\s*|\s*$/g,"").split(/[,\s]+/).map((function(e){return parseFloat(e)}));switch(n[1]){case"M":s=r=l[0],a=i=l[1];break;case"L":l[0]===s&&l[1]===a||t("L",s,a,s=l[0],a=l[1]);break;case"Q":t("Q",s,a,s=l[2],a=l[3],l[0],l[1]);break;case"C":t("C",s,a,s=l[4],a=l[5],l[0],l[1],l[2],l[3]);break;case"Z":s===r&&a===i||t("L",s,a,r,i)}}}function i(e,i,s){void 0===s&&(s=16);var a={x:0,y:0};r(e,(function(e,r,o,l,c,h,u,d,p){switch(e){case"L":i(r,o,l,c);break;case"Q":for(var f=r,m=o,g=1;g0;)r[i]=arguments[i+2];var s=l[t]||(l[t]=n.getUniformLocation(c,t));n["uniform"+e].apply(n,[s].concat(r))},setAttribute:function(e,t,r,s,a){var l=o[e];l||(l=o[e]={buf:n.createBuffer(),loc:n.getAttribLocation(c,e),data:null}),n.bindBuffer(n.ARRAY_BUFFER,l.buf),n.vertexAttribPointer(l.loc,t,n.FLOAT,!1,0,0),n.enableVertexAttribArray(l.loc),i?n.vertexAttribDivisor(l.loc,s):d("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(l.loc,s),a!==l.data&&(n.bufferData(n.ARRAY_BUFFER,a,r),l.data=a)}})}}}a[e].transaction(s)}function m(e,t){h++;try{n.activeTexture(n.TEXTURE0+h);var r=c[e];r||(r=c[e]=n.createTexture(),n.bindTexture(n.TEXTURE_2D,r),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST)),n.bindTexture(n.TEXTURE_2D,r),t(r,h)}finally{h--}}function g(e,t,r){var i=n.createFramebuffer();u.push(i),n.bindFramebuffer(n.FRAMEBUFFER,i),n.activeTexture(n.TEXTURE0+t),n.bindTexture(n.TEXTURE_2D,e),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0);try{r(i)}finally{n.deleteFramebuffer(i),n.bindFramebuffer(n.FRAMEBUFFER,u[--u.length-1]||null)}}function A(){s={},a={},c={},h=-1,u.length=0}n.canvas.addEventListener("webglcontextlost",(function(e){A(),e.preventDefault()}),!1),o.set(n,r={gl:n,isWebGL2:i,getExtension:d,withProgram:f,withTexture:m,withTextureFramebuffer:g,handleContextLoss:A})}t(r)}function h(e,t,n,r,i,o,l,h){void 0===l&&(l=15),void 0===h&&(h=null),c(e,(function(e){var c=e.gl,u=e.withProgram;(0,e.withTexture)("copy",(function(e,d){c.texImage2D(c.TEXTURE_2D,0,c.RGBA,i,o,0,c.RGBA,c.UNSIGNED_BYTE,t),u("copy",s,a,(function(e){var t=e.setUniform;(0,e.setAttribute)("aUV",2,c.STATIC_DRAW,0,new Float32Array([0,0,2,0,0,2])),t("1i","image",d),c.bindFramebuffer(c.FRAMEBUFFER,h||null),c.disable(c.BLEND),c.colorMask(8&l,4&l,2&l,1&l),c.viewport(n,r,i,o),c.scissor(n,r,i,o),c.drawArrays(c.TRIANGLES,0,3)}))}))}))}var u=Object.freeze({__proto__:null,withWebGLContext:c,renderImageData:h,resizeWebGLCanvasWithoutClearing:function(e,t,n){var r=e.width,i=e.height;c(e,(function(s){var a=s.gl,o=new Uint8Array(r*i*4);a.readPixels(0,0,r,i,a.RGBA,a.UNSIGNED_BYTE,o),e.width=t,e.height=n,h(a,o,0,0,r,i)}))}});function d(e,t,n,r,s,a){void 0===a&&(a=1);var o=new Uint8Array(e*t),l=r[2]-r[0],c=r[3]-r[1],h=[];i(n,(function(e,t,n,r){h.push({x1:e,y1:t,x2:n,y2:r,minX:Math.min(e,n),minY:Math.min(t,r),maxX:Math.max(e,n),maxY:Math.max(t,r)})})),h.sort((function(e,t){return e.maxX-t.maxX}));for(var u=0;us.minX&&t-rs.minY){var a=m(e,t,s.x1,s.y1,s.x2,s.y2);at!=i.y2>t&&e<(i.x2-i.x1)*(t-i.y1)/(i.y2-i.y1)+i.x1&&(n+=i.y1p.y!=seg.w>p.y)&&(p.x<(seg.z-seg.x)*(p.y-seg.y)/(seg.w-seg.y)+seg.x);bool crossingUp=crossing&&vLineSegment.y1,1e>2,u>2,2wt>1,1>1,1ge>1,1wp>1,1j>1,f>1,hm>1,1>1,u>1,u6>1,1>1,+5,28>1,w>1,1>1,+3,b8>1,1>1,+3,1>3,-1>-1,3>1,1>1,+2,1s>1,1>1,x>1,th>1,1>1,+2,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,4q>1,1e>2,u>2,2>1,+1",canonical:"6f1>-6dx,6dy>-6dx,6ec>-6ed,6ee>-6ed,6ww>2jj,-2ji>2jj,14r4>-1e7l,1e7m>-1e7l,1e7m>-1e5c,1e5d>-1e5b,1e5c>-14qx,14qy>-14qx,14vn>-1ecg,1ech>-1ecg,1edu>-1ecg,1eci>-1ecg,1eda>-1ecg,1eci>-1ecg,1eci>-168q,168r>-168q,168s>-14ye,14yf>-14ye"};function m(e,t){var n,r=0,i=new Map,s=t&&new Map;return e.split(",").forEach((function e(a){if(-1!==a.indexOf("+"))for(var o=+a;o--;)e(n);else{n=a;var l=a.split(">"),c=l[0],h=l[1];c=String.fromCodePoint(r+=parseInt(c,36)),h=String.fromCodePoint(r+=parseInt(h,36)),i.set(c,h),t&&s.set(h,c)}})),{map:i,reverseMap:s}}function g(){if(!u){var e=m(f.pairs,!0),t=e.map,n=e.reverseMap;u=t,d=n,p=m(f.canonical,!1).map}}function A(e){return g(),u.get(e)||null}function v(e){return g(),d.get(e)||null}function y(e){return g(),p.get(e)||null}var x=n.L,b=n.R,E=n.EN,_=n.ES,S=n.ET,M=n.AN,w=n.CS,C=n.B,T=n.S,I=n.ON,B=n.BN,R=n.NSM,P=n.AL,D=n.LRO,L=n.RLO,F=n.LRE,U=n.RLE,O=n.PDF,N=n.LRI,k=n.RLI,G=n.FSI,z=n.PDI;var Q,V="14>1,j>2,t>2,u>2,1a>g,2v3>1,1>1,1ge>1,1wd>1,b>1,1j>1,f>1,ai>3,-2>3,+1,8>1k0,-1jq>1y7,-1y6>1hf,-1he>1h6,-1h5>1ha,-1h8>1qi,-1pu>1,6>3u,-3s>7,6>1,1>1,f>1,1>1,+2,3>1,1>1,+13,4>1,1>1,6>1eo,-1ee>1,3>1mg,-1me>1mk,-1mj>1mi,-1mg>1mi,-1md>1,1>1,+2,1>10k,-103>1,1>1,4>1,5>1,1>1,+10,3>1,1>8,-7>8,+1,-6>7,+1,a>1,1>1,u>1,u6>1,1>1,+5,26>1,1>1,2>1,2>2,8>1,7>1,4>1,1>1,+5,b8>1,1>1,+3,1>3,-2>1,2>1,1>1,+2,c>1,3>1,1>1,+2,h>1,3>1,a>1,1>1,2>1,3>1,1>1,d>1,f>1,3>1,1a>1,1>1,6>1,7>1,13>1,k>1,1>1,+19,4>1,1>1,+2,2>1,1>1,+18,m>1,a>1,1>1,lk>1,1>1,4>1,2>1,f>1,3>1,1>1,+3,db>1,1>1,+3,3>1,1>1,+2,14qm>1,1>1,+1,6>1,4j>1,j>2,t>2,u>2,2>1,+1";function H(e){return function(){if(!Q){var e=m(V,!0),t=e.map;e.reverseMap.forEach((function(e,n){t.set(n,e)})),Q=t}}(),Q.get(e)||null}function j(e,t,n,r){var i=e.length;n=Math.max(0,null==n?0:+n),r=Math.min(i-1,null==r?i-1:+r);var s=[];return t.paragraphs.forEach((function(i){var a=Math.max(n,i.start),o=Math.min(r,i.end);if(a=a&&h(e[u])&l;u--)c[u]=i.level;for(var d=i.level,p=1/0,f=0;fd&&(d=m),m=p;g--)for(var A=0;A=g){for(var v=A;A+1=g;)A++;A>v&&s.push([v+a,A+a])}}})),s}function W(e,t,n,r){for(var i=j(e,t,n,r),s=[],a=0;a0)Y--;else if(K>0){for(q=0;!W[W.length-1]._isolate;)W.pop();var ne=W[W.length-1]._isolInitIndex;null!=ne&&(p.set(ne,J),p.set(J,ne)),W.pop(),K--}X=W[W.length-1],d[J]=X._level,X._override&&u(J,X._override)}else Z&O?(0===Y&&(q>0?q--:!X._isolate&&W.length>1&&(W.pop(),X=W[W.length-1])),d[J]=X._level):Z&C&&(d[J]=m.level);else d[J]=X._level,X._override&&Z!==B&&u(J,X._override)}for(var re=[],ie=null,se=m.start;se<=m.end;se++){var ae=n[se];if(!(ae&o)){var oe=d[se],le=ae&i,ce=ae===z;ie&&oe===ie._level?(ie._end=se,ie._endsWithIsolInit=le):re.push(ie={_start:se,_end:se,_level:oe,_startsWithPDI:ce,_endsWithIsolInit:le})}}for(var he=[],ue=0;ue=0;Ee--)if(!(n[Ee]&o)){be=d[Ee];break}var _e=ge[ge.length-1],Se=d[_e],Me=m.level;if(!(n[_e]&i))for(var we=_e+1;we<=m.end;we++)if(!(n[we]&o)){Me=d[we];break}he.push({_seqIndices:ge,_sosType:Math.max(be,xe)%2?b:x,_eosType:Math.max(Me,Se)%2?b:x})}}for(var Ce=0;Ce=0;Ue--)if(!(n[Ie[Ue]]&o)){Fe=n[Ie[Ue]];break}u(Le,Fe&(i|z)?I:Fe)}}if(c.get(E))for(var Oe=0;Oe=-1;ke--){var Ge=-1===ke?Be:n[Ie[ke]];if(Ge&s){Ge===P&&u(Ne,M);break}}}if(c.get(P))for(var ze=0;ze=0&&(je=n[Ie[Xe]])&o;Xe--);for(var Ye=Ve+1;Ye=0&&n[Ie[Je]]&(S|o);Je--)u(Ie[Je],E);for(qe++;qe=0&&n[Ie[et]]&o;et--)u(Ie[et],I);for(var tt=Ze+1;tt=0;pt--){var ft=ct[pt].char;if(ft===dt||ft===v(y(ut))||A(y(ft))===ut){lt.push([ct[pt].seqIndex,ht]),ct.length=pt;break}}}lt.sort((function(e,t){return e[0]-t[0]}));for(var mt=0;mt=0;St--){var Mt=Ie[St];if(n[Mt]&ot){var wt=n[Mt]&at?b:x;xt=wt!==Pe?wt:Pe;break}}}if(xt){if(n[Ie[At]]=n[Ie[vt]]=xt,xt!==Pe)for(var Ct=At+1;Ct=0;Dt--){if(!(n[Ie[Dt]]&o)){Pt=n[Ie[Dt]]&at?b:x;break}Bt=Dt}for(var Lt=Re,Ft=It+1;Ft=0&&h(e[Gt])&l;Gt--)d[Gt]=m.level}}return{levels:d,paragraphs:f};function zt(t,r){for(var s=t;s/gm,(function(e,t){let n=a.ShaderChunk[t];return n?Rs(n):e}))}const Ps=[];for(let lg=0;lg<256;lg++)Ps[lg]=(lg<16?"0":"")+lg.toString(16);const Ds=Object.assign||function(){let e=arguments[0];for(let t=1,n=arguments.length;t/gm,"\n//!BEGIN_POST_CHUNK $1\n$&\n//!END_POST_CHUNK\n")));if(d){let n=d({vertexShader:e,fragmentShader:t});e=n.vertexShader,t=n.fragmentShader}if(u){let e=[];t=t.replace(/^\/\/!BEGIN_POST_CHUNK[^]+?^\/\/!END_POST_CHUNK/gm,(t=>(e.push(t),""))),h=`${u}\n${e.join("\n")}\n${h}`}if(p){const e=`\nuniform float ${p};\n`;i=e+i,l=e+l}o&&(i=`${i}\nvoid troikaVertexTransform${r}(inout vec3 position, inout vec3 normal, inout vec2 uv) {\n ${o}\n}\n`,s=`\ntroika_position_${r} = vec3(position);\ntroika_normal_${r} = vec3(normal);\ntroika_uv_${r} = vec2(uv);\ntroikaVertexTransform${r}(troika_position_${r}, troika_normal_${r}, troika_uv_${r});\n${s}\n`,e=(e=`vec3 troika_position_${r};\nvec3 troika_normal_${r};\nvec2 troika_uv_${r};\n${e}\n`).replace(/\b(position|normal|uv)\b/g,((e,t,n,i)=>/\battribute\s+vec[23]\s+$/.test(i.substr(0,n))?t:`troika_${t}_${r}`)));return e=ks(e,r,i,s,a),t=ks(t,r,l,c,h),{vertexShader:e,fragmentShader:t}}(r,t,n);a=Us[s]=e}r.vertexShader=a.vertexShader,r.fragmentShader=a.fragmentShader,Ds(r.uniforms,this.uniforms),t.timeUniform&&(r.uniforms[t.timeUniform]={get value(){return Date.now()-Ls}}),this[i]&&this[i](r)},o=function(){return l(t.chained?e:e.clone())},l=function(r){const i=Object.create(r,c);return Object.defineProperty(i,"baseMaterial",{value:e}),Object.defineProperty(i,"id",{value:Os++}),i.uuid=function(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(Ps[255&e]+Ps[e>>8&255]+Ps[e>>16&255]+Ps[e>>24&255]+"-"+Ps[255&t]+Ps[t>>8&255]+"-"+Ps[t>>16&15|64]+Ps[t>>24&255]+"-"+Ps[63&n|128]+Ps[n>>8&255]+"-"+Ps[n>>16&255]+Ps[n>>24&255]+Ps[255&r]+Ps[r>>8&255]+Ps[r>>16&255]+Ps[r>>24&255]).toUpperCase()}(),i.uniforms=Ds({},r.uniforms,t.uniforms),i.defines=Ds({},r.defines,t.defines),i.defines[`TROIKA_DERIVED_MATERIAL_${n}`]="",i.extensions=Ds({},r.extensions,t.extensions),i._listeners=void 0,i},c={constructor:{value:o},isDerivedMaterial:{value:!0},customProgramCacheKey:{writable:!0,configurable:!0,value:function(){return e.customProgramCacheKey()+"|"+n}},onBeforeCompile:{get:()=>s,set(e){this[i]=e}},copy:{writable:!0,configurable:!0,value:function(t){return e.copy.call(this,t),e.isShaderMaterial||e.isDerivedMaterial||(Ds(this.extensions,t.extensions),Ds(this.defines,t.defines),Ds(this.uniforms,a.UniformsUtils.clone(t.uniforms))),this}},clone:{writable:!0,configurable:!0,value:function(){const t=new e.constructor;return l(t).copy(this)}},getDepthMaterial:{writable:!0,configurable:!0,value:function(){let n=this._depthMaterial;return n||(n=this._depthMaterial=Ns(e.isDerivedMaterial?e.getDepthMaterial():new a.MeshDepthMaterial({depthPacking:a.RGBADepthPacking}),t),n.defines.IS_DEPTH_MATERIAL="",n.uniforms=this.uniforms),n}},getDistanceMaterial:{writable:!0,configurable:!0,value:function(){let n=this._distanceMaterial;return n||(n=this._distanceMaterial=Ns(e.isDerivedMaterial?e.getDistanceMaterial():new a.MeshDistanceMaterial,t),n.defines.IS_DISTANCE_MATERIAL="",n.uniforms=this.uniforms),n}},dispose:{writable:!0,configurable:!0,value(){const{_depthMaterial:t,_distanceMaterial:n}=this;t&&t.dispose(),n&&n.dispose(),e.dispose.call(this)}}};return r[n]=o,new o}function ks(e,t,n,r,i){return(r||i||n)&&(e=e.replace(Bs,`\n${n}\nvoid troikaOrigMain${t}() {`),e+=`\nvoid main() {\n ${r}\n troikaOrigMain${t}();\n ${i}\n}`),e}function Gs(e,t){return"uniforms"===e?void 0:"function"==typeof t?t.toString():t}let zs=0;const Qs=new Map;a.DoubleSide;a.Mesh;const Vs=()=>(self.performance||Date).now(),Hs=Ts();let js;const Ws=function(){const e=[];let t=0;function n(){const r=Vs();for(;e.length&&Vs()-r<5;)e.shift()();t=e.length?setTimeout(n,0):0}return(...r)=>{const i=ms();return e.push((()=>{const e=Vs();try{Hs.webgl.generateIntoCanvas(...r),i.resolve({timing:Vs()-e})}catch(t){i.reject(t)}})),t||(t=setTimeout(n,0)),i}}(),Xs=function(){const e={};let t=0;return function(n,r,i,s,a,o,l,c,h,u){const d="TroikaTextSDFGenerator_JS_"+t++%4;let p=e[d];return p||(p=e[d]={workerModule:Ss({name:d,workerId:d,dependencies:[Ts,Vs],init(e,t){const n=e().javascript.generate;return function(...e){const r=t();return{textureData:n(...e),timing:t()-r}}},getTransferables:e=>[e.textureData.buffer]}),requests:0,idleTimer:null}),p.requests++,clearTimeout(p.idleTimer),p.workerModule(n,r,i,s,a,o).then((({textureData:e,timing:t})=>{const i=Vs(),s=new Uint8Array(4*e.length);for(let n=0;n{!function(e){Es[e]&&Es[e].forEach((function(e){e()})),bs[e]&&(bs[e].terminate(),delete bs[e])}(d)}),2e3)),{timing:t}}))}}();const Ys=Hs.webglUtils.resizeWebGLCanvasWithoutClearing;const qs=Ss({name:"Typr Font Parser",dependencies:[function(){return"undefined"==typeof window&&(self.window=self),function(e){var t={parse:function(e){var n=t._bin,r=new Uint8Array(e);if("ttcf"==n.readASCII(r,0,4)){var i=4;n.readUshort(r,i),i+=2,n.readUshort(r,i),i+=2;var s=n.readUint(r,i);i+=4;for(var a=[],o=0;o>>n&1)&&t++;return t},t._lctf.readClassDef=function(e,n){var r=t._bin,i=[],s=r.readUshort(e,n);if(n+=2,1==s){var a=r.readUshort(e,n);n+=2;var o=r.readUshort(e,n);n+=2;for(var l=0;l0&&(s.featureParams=i+a);var o=r.readUshort(e,n);n+=2,s.tab=[];for(var l=0;l255?-1:t.CFF.glyphByUnicode(e,t.CFF.tableSE[n])},t.CFF.readEncoding=function(e,n,r){t._bin;var i=[".notdef"],s=e[n];if(n++,0!=s)throw"error: unknown encoding format: "+s;var a=e[n];n++;for(var o=0;o>4,m=15&p;if(15!=f&&d.push(f),15!=m&&d.push(m),15==m)break}for(var g="",A=[0,1,2,3,4,5,6,7,8,9,".","e","e-","reserved","-","endOfNumber"],v=0;v=a.xMax||a.yMin>=a.yMax)return null;if(a.noc>0){a.endPts=[];for(var o=0;o=1&&o.fmt<=2){c=s.readUshort(e,r),r+=2;var u=s.readUshort(e,r);r+=2,h=t._lctf.numOfOnes(c);var d=t._lctf.numOfOnes(u);if(1==o.fmt){o.pairsets=[];var p=s.readUshort(e,r);r+=2;for(var f=0;f=1&&o.fmt<=2){if(1==o.fmt)o.delta=s.readShort(e,r),r+=2;else if(2==o.fmt){var c=s.readUshort(e,r);r+=2,o.newg=s.readUshorts(e,r,c),r+=2*o.newg.length}}else if(4==n){o.vals=[],c=s.readUshort(e,r),r+=2;for(var h=0;h>>8;if(0!=(u&=15))throw"unknown kern table format: "+u;n=t.kern.readFormat0(e,n,l)}return l},t.kern.parseV1=function(e,n,r,i){var s=t._bin;s.readFixed(e,n),n+=4;var a=s.readUint(e,n);n+=4;for(var o={glyph1:[],rval:[]},l=0;l>>8;if(0!=(h&=15))throw"unknown kern table format: "+h;n=t.kern.readFormat0(e,n,o)}return o},t.kern.readFormat0=function(e,n,r){var i=t._bin,s=-1,a=i.readUshort(e,n);n+=2,i.readUshort(e,n),n+=2,i.readUshort(e,n),n+=2,i.readUshort(e,n),n+=2;for(var o=0;o=i.map.length?0:i.map[t];if(4==i.format){for(var s=-1,a=0;at?0:65535&(0!=i.idRangeOffset[s]?i.glyphIdArray[t-i.startCount[s]+(i.idRangeOffset[s]>>1)-(i.idRangeOffset.length-s)]:t+i.idDelta[s])}if(12==i.format){if(t>i.groups[i.groups.length-1][1])return 0;for(a=0;a-1?t.U._simpleGlyph(i,r):t.U._compoGlyph(i,n,r))},t.U._simpleGlyph=function(e,n){for(var r=0;rs)){for(var p=!0,f=0,m=0;ms)){for(p=!0,m=0;m>1,a.length=0,l=!0;else if("o3"==M||"o23"==M)a.length%2!=0&&!l&&(c=a.shift()+i.nominalWidthX),o+=a.length>>1,a.length=0,l=!0;else if("o4"==M)a.length>1&&!l&&(c=a.shift()+i.nominalWidthX,l=!0),h&&t.U.P.closePath(s),p+=a.pop(),t.U.P.moveTo(s,d,p),h=!0;else if("o5"==M)for(;a.length>0;)d+=a.shift(),p+=a.shift(),t.U.P.lineTo(s,d,p);else if("o6"==M||"o7"==M)for(var w=a.length,C="o6"==M,T=0;TMath.abs(b-p)?d=x+a.shift():p=b+a.shift(),t.U.P.curveTo(s,f,m,g,A,E,_),t.U.P.curveTo(s,v,y,x,b,d,p));else if("o14"==M){if(a.length>0&&!l&&(c=a.shift()+r.nominalWidthX,l=!0),4==a.length){var R=a.shift(),P=a.shift(),D=a.shift(),L=a.shift(),F=t.CFF.glyphBySE(r,D),U=t.CFF.glyphBySE(r,L);t.U._drawCFF(r.CharStrings[F],n,r,i,s),n.x=R,n.y=P,t.U._drawCFF(r.CharStrings[U],n,r,i,s)}h&&(t.U.P.closePath(s),h=!1)}else if("o19"==M||"o20"==M)a.length%2!=0&&!l&&(c=a.shift()+i.nominalWidthX),o+=a.length>>1,a.length=0,l=!0,u+=o+7>>3;else if("o21"==M)a.length>2&&!l&&(c=a.shift()+i.nominalWidthX,l=!0),p+=a.pop(),d+=a.pop(),h&&t.U.P.closePath(s),t.U.P.moveTo(s,d,p),h=!0;else if("o22"==M)a.length>1&&!l&&(c=a.shift()+i.nominalWidthX,l=!0),d+=a.pop(),h&&t.U.P.closePath(s),t.U.P.moveTo(s,d,p),h=!0;else if("o25"==M){for(;a.length>6;)d+=a.shift(),p+=a.shift(),t.U.P.lineTo(s,d,p);f=d+a.shift(),m=p+a.shift(),g=f+a.shift(),A=m+a.shift(),d=g+a.shift(),p=A+a.shift(),t.U.P.curveTo(s,f,m,g,A,d,p)}else if("o26"==M)for(a.length%2&&(d+=a.shift());a.length>0;)f=d,m=p+a.shift(),d=g=f+a.shift(),p=(A=m+a.shift())+a.shift(),t.U.P.curveTo(s,f,m,g,A,d,p);else if("o27"==M)for(a.length%2&&(p+=a.shift());a.length>0;)m=p,g=(f=d+a.shift())+a.shift(),A=m+a.shift(),d=g+a.shift(),p=A,t.U.P.curveTo(s,f,m,g,A,d,p);else if("o10"==M||"o29"==M){var O="o10"==M?i:r;if(0==a.length)console.debug("error: empty stack");else{var N=a.pop(),k=O.Subrs[N+O.Bias];n.x=d,n.y=p,n.nStems=o,n.haveWidth=l,n.width=c,n.open=h,t.U._drawCFF(k,n,r,i,s),d=n.x,p=n.y,o=n.nStems,l=n.haveWidth,c=n.width,h=n.open}}else if("o30"==M||"o31"==M){var G=a.length,z=(B=0,"o31"==M);for(B+=G-(w=-3&G);B>>1|(21845&p)<<1;f=(61680&(f=(52428&f)>>>2|(13107&f)<<2))>>>4|(3855&f)<<4,d[p]=((65280&f)>>>8|(255&f)<<8)>>>1}var m=function(e,t,r){for(var i=e.length,s=0,a=new n(t);s>>c]=h}else for(o=new n(i),s=0;s>>15-e[s]);return o},g=new t(288);for(p=0;p<144;++p)g[p]=8;for(p=144;p<256;++p)g[p]=9;for(p=256;p<280;++p)g[p]=7;for(p=280;p<288;++p)g[p]=8;var A=new t(32);for(p=0;p<32;++p)A[p]=5;var v=m(g,9,1),y=m(A,5,1),x=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},b=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},E=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},_=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],S=function(e,t,n){var r=new Error(t||_[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,S),!n)throw r;return r},M=function(e,o,l){var h=e.length;if(!h||l&&!l.l&&h<5)return o||new t(0);var d=!o||l,p=!l||l.i;l||(l={}),o||(o=new t(3*h));var f,g=function(e){var n=o.length;if(e>n){var r=new t(Math.max(2*n,e));r.set(o),o=r}},A=l.f||0,_=l.p||0,M=l.b||0,w=l.l,C=l.d,T=l.m,I=l.n,B=8*h;do{if(!w){l.f=A=b(e,_,1);var R=b(e,_+1,3);if(_+=3,!R){var P=e[(V=((f=_)/8|0)+(7&f&&1)+4)-4]|e[V-3]<<8,D=V+P;if(D>h){p&&S(0);break}d&&g(M+P),o.set(e.subarray(V,D),M),l.b=M+=P,l.p=_=8*D;continue}if(1==R)w=v,C=y,T=9,I=5;else if(2==R){var L=b(e,_,31)+257,F=b(e,_+10,15)+4,U=L+b(e,_+5,31)+1;_+=14;for(var O=new t(U),N=new t(19),k=0;k>>4)<16)O[k++]=V;else{var j=0,W=0;for(16==V?(W=3+b(e,_,3),_+=2,j=O[k-1]):17==V?(W=3+b(e,_,7),_+=3):18==V&&(W=11+b(e,_,127),_+=7);W--;)O[k++]=j}}var X=O.subarray(0,L),Y=O.subarray(L);T=x(X),I=x(Y),w=m(X,T,1),C=m(Y,I,1)}else S(1);if(_>B){p&&S(0);break}}d&&g(M+131072);for(var q=(1<>>4;if((_+=15&j)>B){p&&S(0);break}if(j||S(2),Z<256)o[M++]=Z;else{if(256==Z){J=_,w=null;break}var $=Z-254;if(Z>264){var ee=i[k=Z-257];$=b(e,_,(1<>>4;if(te||S(3),_+=15&te,Y=u[ne],ne>3&&(ee=s[ne],Y+=E(e,_)&(1<B){p&&S(0);break}d&&g(M+131072);for(var re=M+$;Me.length)&&(s=e.length);var a=new(e instanceof n?n:e instanceof r?r:t)(s-i);return a.set(e.subarray(i,s)),a}(o,0,M)},w=new t(0),C="undefined"!=typeof TextDecoder&&new TextDecoder;try{C.decode(w,{stream:!0})}catch(e){}return e.convert_streams=function(e){var t=new DataView(e),n=0;function r(){var e=t.getUint16(n);return n+=2,e}function i(){var e=t.getUint32(n);return n+=4,e}function s(e){A.setUint16(v,e),v+=2}function a(e){A.setUint32(v,e),v+=4}for(var o={signature:i(),flavor:i(),length:i(),numTables:r(),reserved:r(),totalSfntSize:i(),majorVersion:r(),minorVersion:r(),metaOffset:i(),metaLength:i(),metaOrigLength:i(),privOffset:i(),privLength:i()},l=0;Math.pow(2,l)<=o.numTables;)l++;l--;for(var c=16*Math.pow(2,l),h=16*o.numTables-c,u=12,d=[],p=0;p{let[i,s]=r.split("+");i=parseInt(i,36),s=s?parseInt(s,36):0,h.set(n+=i,e[t]);for(let a=s;a--;)h.set(++n,e[t])}))}}return h.get(e)||c}const d=1,p=2,f=3,m=4,g=[null,"isol","init","fina","medi"];function A(e){const t=new Uint8Array(e.length);let n=c,r=d,h=-1;for(let g=0;g65535&&g++)}return t}function v(t){const r=Object.create(null),i={unitsPerEm:t.head.unitsPerEm,ascender:t.hhea.ascender,descender:t.hhea.descender,forEachGlyph(s,a,o,l){let c=0;const h=1/i.unitsPerEm*a,u=function(t,n){const r=[];for(let s=0;s65535&&s++,r.push(e.U.codeToGlyph(t,i))}const i=t.GSUB;if(i){const{lookupList:t,featureList:s}=i;let a;const o=/^(rlig|liga|mset|isol|init|fina|medi|half|pres|blws)$/,l=[];s.forEach((i=>{if(o.test(i.tag))for(let s=0;s{if(-1!==i){let s=r[i];if(!s){const{cmds:a,crds:o}=e.U.glyphToPath(t,i);let l,c,h,u,d="",p=0;for(let e=0,t=a.length;e1?",":"")+o[p++]}if(o.length){l=c=1/0,h=u=-1/0;for(let e=0,t=o.length;eh&&(h=t),n>u&&(u=n)}}else l=h=c=u=0;s=r[i]={index:i,advanceWidth:t.hmtx.aWidth[i],xMin:l,yMin:c,xMax:h,yMax:u,path:d,pathCommandCount:a.length}}-1!==p&&(c+=e.U.getPairAdjustment(t,p,i)*h),l.call(null,s,c,d),s.advanceWidth&&(c+=s.advanceWidth*h),o&&(c+=o*a),p=i}d+=s.codePointAt(d)>65535?2:1})),c}};return i}return function(n){const r=new Uint8Array(n,0,4),i=e._bin.readASCII(r,0,4);if("wOFF"===i)n=t(n);else if("wOF2"===i)throw new Error("woff2 fonts not supported");return v(e.parse(n)[0])}}],init:(e,t,n)=>n(e(),t())}),Ks={defaultFontURL:"https://fonts.gstatic.com/s/roboto/v18/KFOmCnqEu92Fr1Mu4mxM.woff",sdfGlyphSize:64,sdfMargin:1/16,sdfExponent:9,textureWidth:2048},Js=new a.Color;let Zs=!1;function $s(){return(self.performance||Date).now()}const ea=Object.create(null);function ta(e,t){Zs=!0,e=ra({},e);const n=$s();if(e.font=function(e){ia||(ia="undefined"==typeof document?{}:document.createElement("a"));return ia.href=e,ia.href}(e.font||Ks.defaultFontURL),e.text=""+e.text,e.sdfGlyphSize=e.sdfGlyphSize||Ks.sdfGlyphSize,null!=e.colorRanges){let t={};for(let n in e.colorRanges)if(e.colorRanges.hasOwnProperty(n)){let r=e.colorRanges[n];"number"!=typeof r&&(r=Js.set(r).getHex()),t[n]=r}e.colorRanges=t}Object.freeze(e);const{textureWidth:r,sdfExponent:i}=Ks,{sdfGlyphSize:s}=e,o=r/s*4;let l=ea[s];if(!l){const e=document.createElement("canvas");e.width=r,e.height=256*s/o,l=ea[s]={glyphCount:0,sdfGlyphSize:s,sdfCanvas:e,sdfTexture:new a.Texture(e,void 0,void 0,void 0,a.LinearFilter,a.LinearFilter),contextLost:!1,glyphsByFont:new Map},l.sdfTexture.generateMipmaps=!1,function(e){const t=e.sdfCanvas;t.addEventListener("webglcontextlost",(t=>{console.log("Context Lost",t),t.preventDefault(),e.contextLost=!0})),t.addEventListener("webglcontextrestored",(t=>{console.log("Context Restored",t),e.contextLost=!1;const n=[];e.glyphsByFont.forEach((t=>{t.forEach((t=>{n.push(na(t,e,!0))}))})),ms.all(n).then((()=>{sa(e),e.sdfTexture.needsUpdate=!0}))}))}(l)}const{sdfTexture:c,sdfCanvas:h}=l;let u=l.glyphsByFont.get(e.font);u||l.glyphsByFont.set(e.font,u=new Map),oa(e).then((a=>{const{glyphIds:d,glyphPositions:p,fontSize:f,unitsPerEm:m,timings:g}=a,A=[],v=new Float32Array(4*d.length),y=f/m;let x=0,b=0;const E=$s();d.forEach(((e,t)=>{let n=u.get(e);if(!n){const{path:t,pathBounds:r}=a.glyphData[e],i=Math.max(r[2]-r[0],r[3]-r[1])/s*(Ks.sdfMargin*s+.5),o=l.glyphCount++,c=[r[0]-i,r[1]-i,r[2]+i,r[3]+i];u.set(e,n={path:t,atlasIndex:o,sdfViewBox:c}),A.push(n)}const{sdfViewBox:r}=n,i=p[b++],o=p[b++];v[x++]=i+r[0]*y,v[x++]=o+r[1]*y,v[x++]=i+r[2]*y,v[x++]=o+r[3]*y,d[t]=n.atlasIndex})),g.quads=(g.quads||0)+($s()-E);const _=$s();g.sdf={};const S=h.height,M=Math.ceil(l.glyphCount/o),w=Math.pow(2,Math.ceil(Math.log2(M*s)));w>S&&(console.info(`Increasing SDF texture size ${S}->${w}`),Ys(h,r,w),c.dispose()),ms.all(A.map((t=>na(t,l,e.gpuAccelerateSDF).then((({timing:e})=>{g.sdf[t.atlasIndex]=e}))))).then((()=>{A.length&&!l.contextLost&&(sa(l),c.needsUpdate=!0),g.sdfTotal=$s()-_,g.total=$s()-n,t(Object.freeze({parameters:e,sdfTexture:c,sdfGlyphSize:s,sdfExponent:i,glyphBounds:v,glyphAtlasIndices:d,glyphColors:a.glyphColors,caretPositions:a.caretPositions,caretHeight:a.caretHeight,chunkedBounds:a.chunkedBounds,ascender:a.ascender,descender:a.descender,lineHeight:a.lineHeight,topBaseline:a.topBaseline,blockBounds:a.blockBounds,visibleBounds:a.visibleBounds,timings:a.timings,get totalBounds(){return console.log("totalBounds deprecated, use blockBounds instead"),a.blockBounds},get totalBlockSize(){console.log("totalBlockSize deprecated, use blockBounds instead");const[e,t,n,r]=a.blockBounds;return[n-e,r-t]}}))}))})),ms.all([]).then((()=>{var e;l.contextLost||(e=h)._warm||(Hs.webgl.isSupported(e),e._warm=!0)}))}function na({path:e,atlasIndex:t,sdfViewBox:n},{sdfGlyphSize:r,sdfCanvas:i,contextLost:s},a){if(s)return Promise.resolve({timing:-1});const{textureWidth:o,sdfExponent:l}=Ks,c=Math.max(n[2]-n[0],n[3]-n[1]),h=Math.floor(t/4);return function(e,t,n,r,i,s,a,o,l,c,h=!0){return h?Ws(e,t,n,r,i,s,a,o,l,c).then(null,(h=>(js||(console.warn("WebGL SDF generation failed, falling back to JS",h),js=!0),Xs(e,t,n,r,i,s,a,o,l,c)))):Xs(e,t,n,r,i,s,a,o,l,c)}(r,r,e,n,c,l,i,h%(o/r)*r,Math.floor(h/(o/r))*r,t%4,a)}function ra(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}let ia;function sa(e){if("function"!=typeof createImageBitmap){console.info("Safari<15: applying SDF canvas workaround");const{sdfCanvas:t,sdfTexture:n}=e,{width:r,height:i}=t,s=e.sdfCanvas.getContext("webgl");let a=n.image.data;a&&a.length===r*i*4||(a=new Uint8Array(r*i*4),n.image={width:r,height:i,data:a},n.flipY=!1,n.isDataTexture=!0),s.readPixels(0,0,r,i,s.RGBA,s.UNSIGNED_BYTE,a)}}const aa=Ss({name:"Typesetter",dependencies:[Ks,qs,function(e,t,n){const{defaultFontURL:r}=n,i=Object.create(null),s=1/0,a=/[\u00AD\u034F\u061C\u115F-\u1160\u17B4-\u17B5\u180B-\u180E\u200B-\u200F\u202A-\u202E\u2060-\u206F\u3164\uFE00-\uFE0F\uFEFF\uFFA0\uFFF0-\uFFF8]/,o=/[\s\-\u007C\u00AD\u2010\u2012-\u2014\u2027\u2056\u2E17\u2E40]/;function l(t,n){t||(t=r);let s=i[t];s?s.pending?s.pending.push(n):n(s):(i[t]={pending:[n]},function(t,n){!function i(){const s=e=>{console.error(`Failure loading font ${t}${t===r?"":"; trying fallback"}`,e),t!==r&&(t=r,i())};try{const r=new XMLHttpRequest;r.open("get",t,!0),r.responseType="arraybuffer",r.onload=function(){if(r.status>=400)s(new Error(r.statusText));else if(r.status>0)try{const t=e(r.response);n(t)}catch(za){s(za)}},r.onerror=s,r.send()}catch(a){s(a)}}()}(t,(e=>{let n=i[t].pending;i[t]=e,n.forEach((t=>t(e)))})))}function c({text:e="",font:n=r,sdfGlyphSize:i=64,fontSize:c=1,letterSpacing:f=0,lineHeight:m="normal",maxWidth:g=s,direction:A,textAlign:v="left",textIndent:y=0,whiteSpace:x="normal",overflowWrap:b="normal",anchorX:E=0,anchorY:_=0,includeCaretPositions:S=!1,chunkedBoundsSize:M=8192,colorRanges:w=null},C,T=!1){const I=d(),B={fontLoad:0,typesetting:0};e.indexOf("\r")>-1&&(console.info("Typesetter: got text with \\r chars; normalizing to \\n"),e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")),c=+c,f=+f,g=+g,m=m||"normal",y=+y,l(n,(n=>{const r=isFinite(g);let i=null,l=null,R=null,P=null,D=null,L=null,F=null,U=0,O=0,N="nowrap"!==x;const{ascender:k,descender:G,unitsPerEm:z}=n;B.fontLoad=d()-I;const Q=d(),V=c/z;"normal"===m&&(m=(k-G)/z);const H=((m*=c)-(k-G)*V)/2,j=-(k*V+H),W=Math.min(m,(k-G)*V),X=(k+G)/2*V-W/2;let Y=y,q=new p;const K=[q];n.forEachGlyph(e,c,f,((t,n,i)=>{const s=e.charAt(i),l=t.advanceWidth*V,h=q.count;let u;if("isEmpty"in t||(t.isWhitespace=!!s&&/\s/.test(s),t.canBreakAfter=!!s&&o.test(s),t.isEmpty=t.xMin===t.xMax||t.yMin===t.yMax||a.test(s)),t.isWhitespace||t.isEmpty||O++,N&&r&&!t.isWhitespace&&n+l+Y>g&&h){if(q.glyphAt(h-1).glyphObj.canBreakAfter)u=new p,Y=-n;else for(let e=h;e--;){if(0===e&&"break-word"===b){u=new p,Y=-n;break}if(q.glyphAt(e).glyphObj.canBreakAfter){u=q.splitAt(e+1);const t=u.glyphAt(0).x;Y-=t;for(let e=u.count;e--;)u.glyphAt(e).x-=t;break}}u&&(q.isSoftWrapped=!0,q=u,K.push(q),U=g)}let d=q.glyphAt(q.count);d.glyphObj=t,d.x=n+Y,d.width=l,d.charIndex=i,"\n"===s&&(q=new p,K.push(q),Y=-(n+l+f*c)+y)})),K.forEach((e=>{for(let t=e.count;t--;){let{glyphObj:n,x:r,width:i}=e.glyphAt(t);if(!n.isWhitespace)return e.width=r+i,void(e.width>U&&(U=e.width))}}));let J=0,Z=0;if(E&&("number"==typeof E?J=-E:"string"==typeof E&&(J=-U*("left"===E?0:"center"===E?.5:"right"===E?1:h(E)))),_)if("number"==typeof _)Z=-_;else if("string"==typeof _){let e=K.length*m;Z="top"===_?0:"top-baseline"===_?-j:"middle"===_?e/2:"bottom"===_?e:"bottom-baseline"===_?e-H+G*V:h(_)*e}if(!T){const r=t.getEmbeddingLevels(e,A);i=new Uint16Array(O),l=new Float32Array(2*O),R={},L=[s,s,-s,-s],F=[];let a=j;S&&(D=new Float32Array(3*e.length)),w&&(P=new Uint8Array(3*O));let o,c,h=0,d=-1,p=-1;if(K.forEach(((f,g)=>{let{count:A,width:y}=f;if(A>0){let m=0;for(let e=A;e--&&f.glyphAt(e).glyphObj.isWhitespace;)m++;let g=0,x=0;if("center"===v)g=(U-y)/2;else if("right"===v)g=U-y;else if("justify"===v&&f.isSoftWrapped){let e=0;for(let t=A-m;t--;)f.glyphAt(t).glyphObj.isWhitespace&&e++;x=(U-y)/e}if(x||g){let e=0;for(let t=0;t=t){let t=e,s=e;for(;sn)break;sE=e;for(let v=0;v1&&u(D,d,r),d=e}if(w){const{charIndex:e}=m;for(;e>p;)p++,w.hasOwnProperty(p)&&(c=w[p])}if(!E.isWhitespace&&!E.isEmpty){const e=h++;R[g]||(R[g]={path:E.path,pathBounds:[E.xMin,E.yMin,E.xMax,E.yMax]});const t=m.x+J,n=a+Z;l[2*e]=t,l[2*e+1]=n;const r=t+E.xMin*V,u=n+E.yMin*V,d=t+E.xMax*V,p=n+E.yMax*V;rL[2]&&(L[2]=d),p>L[3]&&(L[3]=p),e%M==0&&(o={start:e,end:e,rect:[s,s,-s,-s]},F.push(o)),o.end++;const f=o.rect;if(rf[2]&&(f[2]=d),p>f[3]&&(f[3]=p),i[e]=g,w){const t=3*e;P[t]=c>>16&255,P[t+1]=c>>8&255,P[t+2]=255&c}}}}a-=m})),D){const t=e.length-d;t>1&&u(D,d,t)}}B.typesetting=d()-Q,C({glyphIds:i,glyphPositions:l,glyphData:R,caretPositions:D,caretHeight:W,glyphColors:P,chunkedBounds:F,fontSize:c,unitsPerEm:z,ascender:k*V,descender:G*V,lineHeight:m,topBaseline:j,blockBounds:[J,Z-K.length*m,J+U,Z],visibleBounds:L,timings:B})}))}function h(e){let t=e.match(/^([\d.]+)%$/),n=t?parseFloat(t[1]):NaN;return isNaN(n)?0:n/100}function u(e,t,n){const r=e[3*t],i=e[3*t+1],s=e[3*t+2],a=(i-r)/n;for(let o=0;o(Object.defineProperty(e,t,{get(){return this.data[this.index*f.length+n]},set(e){this.data[this.index*f.length+n]=e}}),e)),{data:null,index:0}),{typeset:c,measure:function(e,t){c(e,(e=>{const[n,r,i,s]=e.blockBounds;t({width:i-n,height:s-r})}),{metricsOnly:!0})},loadFont:l}},Is],init(e,t,n,r){const{defaultFontURL:i}=e;return n(t,r(),{defaultFontURL:i})}}),oa=Ss({name:"Typesetter",dependencies:[aa,Cs],init:(e,t)=>function(n){const r=new t;return e.typeset(n,r.resolve),r},getTransferables(e){const t=[e.glyphPositions.buffer,e.glyphIds.buffer];return e.caretPositions&&t.push(e.caretPositions.buffer),e.glyphColors&&t.push(e.glyphColors.buffer),t}});const la=(()=>{const e={};const t="aTroikaGlyphIndex";class n extends a.InstancedBufferGeometry{constructor(){super(),this.detail=1,this.curveRadius=0,this.groups=[{start:0,count:1/0,materialIndex:0},{start:0,count:1/0,materialIndex:1}],this.boundingSphere=new a.Sphere,this.boundingBox=new a.Box3}computeBoundingSphere(){}computeBoundingBox(){}setSide(e){const t=this.getIndex().count;this.setDrawRange(e===a.BackSide?t/2:0,e===a.DoubleSide?t:t/2)}set detail(t){if(t!==this._detail){this._detail=t,("number"!=typeof t||t<1)&&(t=1);let n=function(t){let n=e[t];if(!n){const r=new a.PlaneBufferGeometry(1,1,t,t),i=r.clone(),s=r.attributes,o=i.attributes,l=new a.BufferGeometry,c=s.uv.count;for(let e=0;e{l.setAttribute(e,new a.Float32BufferAttribute([...s[e].array,...o[e].array],s[e].itemSize))})),l.setIndex([...r.index.array,...i.index.array.map((e=>e+c))]),l.translate(.5,.5,0),n=e[t]=l}return n}(t);["position","normal","uv"].forEach((e=>{this.attributes[e]=n.attributes[e].clone()})),this.setIndex(n.getIndex().clone())}}get detail(){return this._detail}set curveRadius(e){e!==this._curveRadius&&(this._curveRadius=e,this._updateBounds())}get curveRadius(){return this._curveRadius}updateGlyphs(e,n,s,a,o){r(this,"aTroikaGlyphBounds",e,4),r(this,t,n,1),r(this,"aTroikaGlyphColor",o,3),this._blockBounds=s,this._chunkedBounds=a,i(this,n.length),this._updateBounds()}_updateBounds(){const e=this._blockBounds;if(e){const{curveRadius:t,boundingBox:n}=this;if(t){const{PI:r,floor:i,min:s,max:a,sin:o,cos:l}=Math,c=r/2,h=2*r,u=Math.abs(t),d=e[0]/u,p=e[2]/u,f=i((d+c)/h)!==i((p+c)/h)?-u:s(o(d)*u,o(p)*u),m=i((d-c)/h)!==i((p-c)/h)?u:a(o(d)*u,o(p)*u),g=i((d+r)/h)!==i((p+r)/h)?2*u:a(u-l(d)*u,u-l(p)*u);n.min.set(f,e[1],t<0?-g:0),n.max.set(m,e[3],t<0?0:g)}else n.min.set(e[0],e[1],0),n.max.set(e[2],e[3],0);n.getBoundingSphere(this.boundingSphere)}}applyClipRect(e){let n=this.getAttribute(t).count,r=this._chunkedBounds;if(r)for(let t=r.length;t--;){n=r[t].end;let i=r[t].rect;if(i[1]e.y&&i[0]e.x)break}i(this,n)}}function r(e,t,n,r){const i=e.getAttribute(t);n?i&&i.array.length===n.length?(i.array.set(n),i.needsUpdate=!0):(e.setAttribute(t,new a.InstancedBufferAttribute(n,r)),delete e._maxInstanceCount,e.dispose()):i&&e.deleteAttribute(t)}function i(e,t){e[e.hasOwnProperty("instanceCount")?"instanceCount":"maxInstancedCount"]=t}return n.prototype.setAttribute||(n.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this}),n})();const ca=(()=>{const e=new a.MeshBasicMaterial({color:16777215,side:a.DoubleSide,transparent:!0}),t=8421504,n=new a.Matrix4,r=new a.Vector3,i=new a.Vector3,s=[],o=new a.Vector3,l="+x+y";function c(e){return Array.isArray(e)?e[0]:e}let h=()=>{const t=new a.Mesh(new a.PlaneBufferGeometry(1,1),e);return h=()=>t,t},u=()=>{const t=new a.Mesh(new a.PlaneBufferGeometry(1,1,32,1),e);return u=()=>t,t};const d={type:"syncstart"},p={type:"synccomplete"},f=["font","fontSize","letterSpacing","lineHeight","maxWidth","overflowWrap","text","direction","textAlign","textIndent","whiteSpace","anchorX","anchorY","colorRanges","sdfGlyphSize"],m=f.concat("material","color","depthOffset","clipRect","curveRadius","orientation","glyphGeometryDetail");class g extends a.Mesh{constructor(){super(new la,null),this.text="",this.anchorX=0,this.anchorY=0,this.curveRadius=0,this.direction="auto",this.font=null,this.fontSize=.1,this.letterSpacing=0,this.lineHeight="normal",this.maxWidth=1/0,this.overflowWrap="normal",this.textAlign="left",this.textIndent=0,this.whiteSpace="normal",this.material=null,this.color=null,this.colorRanges=null,this.outlineWidth=0,this.outlineColor=0,this.outlineOpacity=1,this.outlineBlur=0,this.outlineOffsetX=0,this.outlineOffsetY=0,this.strokeWidth=0,this.strokeColor=t,this.strokeOpacity=1,this.fillOpacity=1,this.depthOffset=0,this.clipRect=null,this.orientation=l,this.glyphGeometryDetail=1,this.sdfGlyphSize=null,this.gpuAccelerateSDF=!0,this.debugSDF=!1}sync(e){this._needsSync&&(this._needsSync=!1,this._isSyncing?(this._queuedSyncs||(this._queuedSyncs=[])).push(e):(this._isSyncing=!0,this.dispatchEvent(d),ta({text:this.text,font:this.font,fontSize:this.fontSize||.1,letterSpacing:this.letterSpacing||0,lineHeight:this.lineHeight||"normal",maxWidth:this.maxWidth,direction:this.direction||"auto",textAlign:this.textAlign,textIndent:this.textIndent,whiteSpace:this.whiteSpace,overflowWrap:this.overflowWrap,anchorX:this.anchorX,anchorY:this.anchorY,colorRanges:this.colorRanges,includeCaretPositions:!0,sdfGlyphSize:this.sdfGlyphSize,gpuAccelerateSDF:this.gpuAccelerateSDF},(t=>{this._isSyncing=!1,this._textRenderInfo=t,this.geometry.updateGlyphs(t.glyphBounds,t.glyphAtlasIndices,t.blockBounds,t.chunkedBounds,t.glyphColors);const n=this._queuedSyncs;n&&(this._queuedSyncs=null,this._needsSync=!0,this.sync((()=>{n.forEach((e=>e&&e()))}))),this.dispatchEvent(p),e&&e()}))))}onBeforeRender(e,t,n,r,i,s){this.sync(),i.isTroikaTextMaterial&&this._prepareForRender(i),i._hadOwnSide=i.hasOwnProperty("side"),this.geometry.setSide(i._actualSide=i.side),i.side=a.FrontSide}onAfterRender(e,t,n,r,i,s){i._hadOwnSide?i.side=i._actualSide:delete i.side}dispose(){this.geometry.dispose()}get textRenderInfo(){return this._textRenderInfo||null}get material(){let t=this._derivedMaterial;const n=this._baseMaterial||this._defaultMaterial||(this._defaultMaterial=e.clone());if(t&&t.baseMaterial===n||(t=this._derivedMaterial=function(e){const t=Ns(e,{chained:!0,extensions:{derivatives:!0},uniforms:{uTroikaSDFTexture:{value:null},uTroikaSDFTextureSize:{value:new a.Vector2},uTroikaSDFGlyphSize:{value:0},uTroikaSDFExponent:{value:0},uTroikaTotalBounds:{value:new a.Vector4(0,0,0,0)},uTroikaClipRect:{value:new a.Vector4(0,0,0,0)},uTroikaDistanceOffset:{value:0},uTroikaOutlineOpacity:{value:0},uTroikaFillOpacity:{value:1},uTroikaPositionOffset:{value:new a.Vector2},uTroikaCurveRadius:{value:0},uTroikaBlurRadius:{value:0},uTroikaStrokeWidth:{value:0},uTroikaStrokeColor:{value:new a.Color},uTroikaStrokeOpacity:{value:1},uTroikaOrient:{value:new a.Matrix3},uTroikaUseGlyphColors:{value:!0},uTroikaSDFDebug:{value:!1}},vertexDefs:"\nuniform vec2 uTroikaSDFTextureSize;\nuniform float uTroikaSDFGlyphSize;\nuniform vec4 uTroikaTotalBounds;\nuniform vec4 uTroikaClipRect;\nuniform mat3 uTroikaOrient;\nuniform bool uTroikaUseGlyphColors;\nuniform float uTroikaDistanceOffset;\nuniform float uTroikaBlurRadius;\nuniform vec2 uTroikaPositionOffset;\nuniform float uTroikaCurveRadius;\nattribute vec4 aTroikaGlyphBounds;\nattribute float aTroikaGlyphIndex;\nattribute vec3 aTroikaGlyphColor;\nvarying vec2 vTroikaGlyphUV;\nvarying vec4 vTroikaTextureUVBounds;\nvarying float vTroikaTextureChannel;\nvarying vec3 vTroikaGlyphColor;\nvarying vec2 vTroikaGlyphDimensions;\n",vertexTransform:"\nvec4 bounds = aTroikaGlyphBounds;\nbounds.xz += uTroikaPositionOffset.x;\nbounds.yw -= uTroikaPositionOffset.y;\n\nvec4 outlineBounds = vec4(\n bounds.xy - uTroikaDistanceOffset - uTroikaBlurRadius,\n bounds.zw + uTroikaDistanceOffset + uTroikaBlurRadius\n);\nvec4 clippedBounds = vec4(\n clamp(outlineBounds.xy, uTroikaClipRect.xy, uTroikaClipRect.zw),\n clamp(outlineBounds.zw, uTroikaClipRect.xy, uTroikaClipRect.zw)\n);\n\nvec2 clippedXY = (mix(clippedBounds.xy, clippedBounds.zw, position.xy) - bounds.xy) / (bounds.zw - bounds.xy);\n\nposition.xy = mix(bounds.xy, bounds.zw, clippedXY);\n\nuv = (position.xy - uTroikaTotalBounds.xy) / (uTroikaTotalBounds.zw - uTroikaTotalBounds.xy);\n\nfloat rad = uTroikaCurveRadius;\nif (rad != 0.0) {\n float angle = position.x / rad;\n position.xz = vec2(sin(angle) * rad, rad - cos(angle) * rad);\n normal.xz = vec2(sin(angle), cos(angle));\n}\n \nposition = uTroikaOrient * position;\nnormal = uTroikaOrient * normal;\n\nvTroikaGlyphUV = clippedXY.xy;\nvTroikaGlyphDimensions = vec2(bounds[2] - bounds[0], bounds[3] - bounds[1]);\n\n\nfloat txCols = uTroikaSDFTextureSize.x / uTroikaSDFGlyphSize;\nvec2 txUvPerSquare = uTroikaSDFGlyphSize / uTroikaSDFTextureSize;\nvec2 txStartUV = txUvPerSquare * vec2(\n mod(floor(aTroikaGlyphIndex / 4.0), txCols),\n floor(floor(aTroikaGlyphIndex / 4.0) / txCols)\n);\nvTroikaTextureUVBounds = vec4(txStartUV, vec2(txStartUV) + txUvPerSquare);\nvTroikaTextureChannel = mod(aTroikaGlyphIndex, 4.0);\n",fragmentDefs:"\nuniform sampler2D uTroikaSDFTexture;\nuniform vec2 uTroikaSDFTextureSize;\nuniform float uTroikaSDFGlyphSize;\nuniform float uTroikaSDFExponent;\nuniform float uTroikaDistanceOffset;\nuniform float uTroikaFillOpacity;\nuniform float uTroikaOutlineOpacity;\nuniform float uTroikaBlurRadius;\nuniform vec3 uTroikaStrokeColor;\nuniform float uTroikaStrokeWidth;\nuniform float uTroikaStrokeOpacity;\nuniform bool uTroikaSDFDebug;\nvarying vec2 vTroikaGlyphUV;\nvarying vec4 vTroikaTextureUVBounds;\nvarying float vTroikaTextureChannel;\nvarying vec2 vTroikaGlyphDimensions;\n\nfloat troikaSdfValueToSignedDistance(float alpha) {\n // Inverse of exponential encoding in webgl-sdf-generator\n \n float maxDimension = max(vTroikaGlyphDimensions.x, vTroikaGlyphDimensions.y);\n float absDist = (1.0 - pow(2.0 * (alpha > 0.5 ? 1.0 - alpha : alpha), 1.0 / uTroikaSDFExponent)) * maxDimension;\n float signedDist = absDist * (alpha > 0.5 ? -1.0 : 1.0);\n return signedDist;\n}\n\nfloat troikaGlyphUvToSdfValue(vec2 glyphUV) {\n vec2 textureUV = mix(vTroikaTextureUVBounds.xy, vTroikaTextureUVBounds.zw, glyphUV);\n vec4 rgba = texture2D(uTroikaSDFTexture, textureUV);\n float ch = floor(vTroikaTextureChannel + 0.5); //NOTE: can't use round() in WebGL1\n return ch == 0.0 ? rgba.r : ch == 1.0 ? rgba.g : ch == 2.0 ? rgba.b : rgba.a;\n}\n\nfloat troikaGlyphUvToDistance(vec2 uv) {\n return troikaSdfValueToSignedDistance(troikaGlyphUvToSdfValue(uv));\n}\n\nfloat troikaGetAADist() {\n \n #if defined(GL_OES_standard_derivatives) || __VERSION__ >= 300\n return length(fwidth(vTroikaGlyphUV * vTroikaGlyphDimensions)) * 0.5;\n #else\n return vTroikaGlyphDimensions.x / 64.0;\n #endif\n}\n\nfloat troikaGetFragDistValue() {\n vec2 clampedGlyphUV = clamp(vTroikaGlyphUV, 0.5 / uTroikaSDFGlyphSize, 1.0 - 0.5 / uTroikaSDFGlyphSize);\n float distance = troikaGlyphUvToDistance(clampedGlyphUV);\n \n // Extrapolate distance when outside bounds:\n distance += clampedGlyphUV == vTroikaGlyphUV ? 0.0 : \n length((vTroikaGlyphUV - clampedGlyphUV) * vTroikaGlyphDimensions);\n\n \n\n return distance;\n}\n\nfloat troikaGetEdgeAlpha(float distance, float distanceOffset, float aaDist) {\n #if defined(IS_DEPTH_MATERIAL) || defined(IS_DISTANCE_MATERIAL)\n float alpha = step(-distanceOffset, -distance);\n #else\n\n float alpha = smoothstep(\n distanceOffset + aaDist,\n distanceOffset - aaDist,\n distance\n );\n #endif\n\n return alpha;\n}\n",fragmentColorTransform:"\nfloat aaDist = troikaGetAADist();\nfloat fragDistance = troikaGetFragDistValue();\nfloat edgeAlpha = uTroikaSDFDebug ?\n troikaGlyphUvToSdfValue(vTroikaGlyphUV) :\n troikaGetEdgeAlpha(fragDistance, uTroikaDistanceOffset, max(aaDist, uTroikaBlurRadius));\n\n#if !defined(IS_DEPTH_MATERIAL) && !defined(IS_DISTANCE_MATERIAL)\nvec4 fillRGBA = gl_FragColor;\nfillRGBA.a *= uTroikaFillOpacity;\nvec4 strokeRGBA = uTroikaStrokeWidth == 0.0 ? fillRGBA : vec4(uTroikaStrokeColor, uTroikaStrokeOpacity);\nif (fillRGBA.a == 0.0) fillRGBA.rgb = strokeRGBA.rgb;\ngl_FragColor = mix(fillRGBA, strokeRGBA, smoothstep(\n -uTroikaStrokeWidth - aaDist,\n -uTroikaStrokeWidth + aaDist,\n fragDistance\n));\ngl_FragColor.a *= edgeAlpha;\n#endif\n\nif (edgeAlpha == 0.0) {\n discard;\n}\n",customRewriter({vertexShader:e,fragmentShader:t}){let n=/\buniform\s+vec3\s+diffuse\b/;return n.test(t)&&(t=t.replace(n,"varying vec3 vTroikaGlyphColor").replace(/\bdiffuse\b/g,"vTroikaGlyphColor"),n.test(e)||(e=e.replace(Bs,"uniform vec3 diffuse;\n$&\nvTroikaGlyphColor = uTroikaUseGlyphColors ? aTroikaGlyphColor / 255.0 : diffuse;\n"))),{vertexShader:e,fragmentShader:t}}});return t.transparent=!0,Object.defineProperties(t,{isTroikaTextMaterial:{value:!0},shadowSide:{get(){return this.side},set(){}}}),t}(n),n.addEventListener("dispose",(function e(){n.removeEventListener("dispose",e),t.dispose()}))),this.outlineWidth||this.outlineBlur||this.outlineOffsetX||this.outlineOffsetY){let e=t._outlineMtl;return e||(e=t._outlineMtl=Object.create(t,{id:{value:t.id+.1}}),e.isTextOutlineMaterial=!0,e.depthWrite=!1,e.map=null,t.addEventListener("dispose",(function n(){t.removeEventListener("dispose",n),e.dispose()}))),[e,t]}return t}set material(e){e&&e.isTroikaTextMaterial?(this._derivedMaterial=e,this._baseMaterial=e.baseMaterial):this._baseMaterial=e}get glyphGeometryDetail(){return this.geometry.detail}set glyphGeometryDetail(e){this.geometry.detail=e}get curveRadius(){return this.geometry.curveRadius}set curveRadius(e){this.geometry.curveRadius=e}get customDepthMaterial(){return c(this.material).getDepthMaterial()}get customDistanceMaterial(){return c(this.material).getDistanceMaterial()}_prepareForRender(e){const s=e.isTextOutlineMaterial,c=e.uniforms,h=this.textRenderInfo;if(h){const{sdfTexture:e,blockBounds:n}=h;c.uTroikaSDFTexture.value=e,c.uTroikaSDFTextureSize.value.set(e.image.width,e.image.height),c.uTroikaSDFGlyphSize.value=h.sdfGlyphSize,c.uTroikaSDFExponent.value=h.sdfExponent,c.uTroikaTotalBounds.value.fromArray(n),c.uTroikaUseGlyphColors.value=!s&&!!h.glyphColors;let r,i,a,o=0,l=0,u=0,d=0,p=0;if(s){let{outlineWidth:e,outlineOffsetX:t,outlineOffsetY:n,outlineBlur:i,outlineOpacity:s}=this;o=this._parsePercent(e)||0,l=Math.max(0,this._parsePercent(i)||0),r=s,d=this._parsePercent(t)||0,p=this._parsePercent(n)||0}else u=Math.max(0,this._parsePercent(this.strokeWidth)||0),u&&(a=this.strokeColor,c.uTroikaStrokeColor.value.set(null==a?t:a),i=this.strokeOpacity,null==i&&(i=1)),r=this.fillOpacity;c.uTroikaDistanceOffset.value=o,c.uTroikaPositionOffset.value.set(d,p),c.uTroikaBlurRadius.value=l,c.uTroikaStrokeWidth.value=u,c.uTroikaStrokeOpacity.value=i,c.uTroikaFillOpacity.value=null==r?1:r,c.uTroikaCurveRadius.value=this.curveRadius||0;let f=this.clipRect;if(f&&Array.isArray(f)&&4===f.length)c.uTroikaClipRect.value.fromArray(f);else{const e=100*(this.fontSize||.1);c.uTroikaClipRect.value.set(n[0]-e,n[1]-e,n[2]+e,n[3]+e)}this.geometry.applyClipRect(c.uTroikaClipRect.value)}c.uTroikaSDFDebug.value=!!this.debugSDF,e.polygonOffset=!!this.depthOffset,e.polygonOffsetFactor=e.polygonOffsetUnits=this.depthOffset||0;const u=s?this.outlineColor||0:this.color;if(null==u)delete e.color;else{const t=e.hasOwnProperty("color")?e.color:e.color=new a.Color;u===t._input&&"object"!=typeof u||t.set(t._input=u)}let d=this.orientation||l;if(d!==e._orientation){let t=c.uTroikaOrient.value;d=d.replace(/[^-+xyz]/g,"");let s=d!==l&&d.match(/^([-+])([xyz])([-+])([xyz])$/);if(s){let[,e,a,l,c]=s;r.set(0,0,0)[a]="-"===e?1:-1,i.set(0,0,0)[c]="-"===l?-1:1,n.lookAt(o,r.cross(i),i),t.setFromMatrix4(n)}else t.identity();e._orientation=d}}_parsePercent(e){if("string"==typeof e){let t=e.match(/^(-?[\d.]+)%$/),n=t?parseFloat(t[1]):NaN;e=(isNaN(n)?0:n/100)*this.fontSize}return e}localPositionToTextCoords(e,t=new a.Vector2){t.copy(e);const n=this.curveRadius;return n&&(t.x=Math.atan2(e.x,Math.abs(n)-Math.abs(e.z))*Math.abs(n)),t}worldPositionToTextCoords(e,t=new a.Vector2){return r.copy(e),this.localPositionToTextCoords(this.worldToLocal(r),t)}raycast(e,t){const{textRenderInfo:n,curveRadius:r}=this;if(n){const i=n.blockBounds,a=r?u():h(),o=a.geometry,{position:l,uv:c}=o.attributes;for(let e=0;e{this[t]=e[t]})),this}clone(){return(new this.constructor).copy(this)}}f.forEach((e=>{const t="_private_"+e;Object.defineProperty(g.prototype,e,{get(){return this[t]},set(e){e!==this[t]&&(this[t]=e,this._needsSync=!0)}})}));let A=!1;return Object.defineProperty(g.prototype,"anchor",{get(){return this._deprecated_anchor},set(e){this._deprecated_anchor=e,A||(console.warn("TextMesh: `anchor` has been deprecated; use `anchorX` and `anchorY` instead."),A=!0),Array.isArray(e)?(this.anchorX=100*(+e[0]||0)+"%",this.anchorY=100*(+e[1]||0)+"%"):this.anchorX=this.anchorY=0}}),g})();new WeakMap;new WeakMap;function ha(e,t,n=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;const r=e.length;if(t.length!==r)return!1;for(let i=0;ii.response=e)).then((()=>{r.lifespan&&r.lifespan>0&&setTimeout((()=>{const e=ua.indexOf(i);-1!==e&&ua.splice(e,1)}),r.lifespan)})).catch((e=>i.error=e))};if(ua.push(i),!n)throw i.promise}const pa=(e,t,n)=>da(e,t,!1,n),fa=i.forwardRef((({anchorX:e="center",anchorY:t="middle",font:n,children:s,characters:a,onSync:l,...c},h)=>{const u=(0,o.useThree)((({invalidate:e})=>e)),[d]=i.useState((()=>new ca)),[p,f]=i.useMemo((()=>{const e=[];let t="";return i.Children.forEach(s,(n=>{"string"==typeof n||"number"==typeof n?t+=n:e.push(n)})),[e,t]}),[s]);return pa((()=>new Promise((e=>function({font:e,characters:t,sdfGlyphSize:n},r){ta({font:e,sdfGlyphSize:n,text:Array.isArray(t)?t.join("\n"):""+t},r)}({font:n,characters:a},e)))),["troika-text",n,a]),i.useLayoutEffect((()=>{d.sync((()=>{u(),l&&l(d)}))})),i.useEffect((()=>()=>d.dispose()),[d]),i.createElement("primitive",(0,r.c)({object:d,ref:h,font:n,text:f,anchorX:e,anchorY:t},c),p)})),ma={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 texel = texture2D( tDiffuse, vUv );","\tgl_FragColor = opacity * texel;","}"].join("\n")};var ga=Object.defineProperty,Aa=(e,t,n)=>(((e,t,n)=>{t in e?ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class va{constructor(){Aa(this,"enabled",!0),Aa(this,"needsSwap",!0),Aa(this,"clear",!1),Aa(this,"renderToScreen",!1)}setSize(e,t){}render(e,t,n,r,i){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}class ya{constructor(e){Aa(this,"camera",new a.OrthographicCamera(-1,1,1,-1,0,1)),Aa(this,"geometry",new a.PlaneGeometry(2,2)),Aa(this,"mesh"),this.mesh=new a.Mesh(this.geometry,e)}get material(){return this.mesh.material}set material(e){this.mesh.material=e}dispose(){this.mesh.geometry.dispose()}render(e){e.render(this.mesh,this.camera)}}var xa=Object.defineProperty,ba=(e,t,n)=>(((e,t,n)=>{t in e?xa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class Ea extends va{constructor(e,t="tDiffuse"){super(),ba(this,"textureID"),ba(this,"uniforms"),ba(this,"material"),ba(this,"fsQuad"),this.textureID=t,e instanceof a.ShaderMaterial?(this.uniforms=e.uniforms,this.material=e):(this.uniforms=a.UniformsUtils.clone(e.uniforms),this.material=new a.ShaderMaterial({defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new ya(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}}var _a=Object.defineProperty,Sa=(e,t,n)=>(((e,t,n)=>{t in e?_a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class Ma extends va{constructor(e,t){super(),Sa(this,"scene"),Sa(this,"camera"),Sa(this,"inverse"),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const r=e.getContext(),i=e.state;let s,a;i.buffers.color.setMask(!1),i.buffers.depth.setMask(!1),i.buffers.color.setLocked(!0),i.buffers.depth.setLocked(!0),this.inverse?(s=0,a=1):(s=1,a=0),i.buffers.stencil.setTest(!0),i.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),i.buffers.stencil.setFunc(r.ALWAYS,s,4294967295),i.buffers.stencil.setClear(a),i.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),i.buffers.color.setLocked(!1),i.buffers.depth.setLocked(!1),i.buffers.stencil.setLocked(!1),i.buffers.stencil.setFunc(r.EQUAL,1,4294967295),i.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),i.buffers.stencil.setLocked(!0)}}class wa extends va{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}var Ca=Object.defineProperty,Ta=(e,t,n)=>(((e,t,n)=>{t in e?Ca(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);var Ia=Object.defineProperty,Ba=(e,t,n)=>(((e,t,n)=>{t in e?Ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const Ra={uniforms:{tDiffuse:{value:null}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 tex = texture2D( tDiffuse, vUv );","\tgl_FragColor = LinearTosRGB( tex );","}"].join("\n")};(0,o.extend)({EffectComposer:class{constructor(e,t){if(Ta(this,"renderer"),Ta(this,"_pixelRatio"),Ta(this,"_width"),Ta(this,"_height"),Ta(this,"renderTarget1"),Ta(this,"renderTarget2"),Ta(this,"writeBuffer"),Ta(this,"readBuffer"),Ta(this,"renderToScreen"),Ta(this,"passes",[]),Ta(this,"copyPass"),Ta(this,"clock"),this.renderer=e,void 0===t){const n={minFilter:a.LinearFilter,magFilter:a.LinearFilter,format:a.RGBAFormat},r=e.getSize(new a.Vector2);this._pixelRatio=e.getPixelRatio(),this._width=r.width,this._height=r.height,(t=new a.WebGLRenderTarget(this._width*this._pixelRatio,this._height*this._pixelRatio,n)).texture.name="EffectComposer.rt1"}else this._pixelRatio=1,this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,void 0===ma&&console.error("THREE.EffectComposer relies on CopyShader"),void 0===Ea&&console.error("THREE.EffectComposer relies on ShaderPass"),this.copyPass=new Ea(ma),this.copyPass.material.blending=a.NoBlending,this.clock=new a.Clock}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t{try{var e=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!e.getContext("webgl2"))}catch(za){return!1}},Da=i.forwardRef((({children:e,multisamping:t=8,renderIndex:n=1,disableGamma:s=!1,disableRenderPass:l=!1,...c},h)=>{const u=i.useRef(),d=(0,o.useThree)((({scene:e})=>e)),p=(0,o.useThree)((({camera:e})=>e)),f=(0,o.useThree)((({gl:e})=>e)),m=(0,o.useThree)((({size:e})=>e)),[g]=i.useState((()=>{if(Pa()&&t>0){const e=new a.WebGLRenderTarget(m.width,m.height,{format:a.RGBAFormat,encoding:a.sRGBEncoding});return e.samples=8,e}}));return i.useEffect((()=>{var e,t;null==(e=u.current)||e.setSize(m.width,m.height),null==(t=u.current)||t.setPixelRatio(f.getPixelRatio())}),[f,m]),(0,o.useFrame)((()=>{var e;return null==(e=u.current)?void 0:e.render()}),n),i.createElement("effectComposer",(0,r.c)({ref:w([h,u]),args:[f,g]},c),!l&&i.createElement("renderPass",{attachArray:"passes",args:[d,p]}),!s&&i.createElement("shaderPass",{attachArray:"passes",args:[Ra]}),e)}));function La({stops:e,colors:t,size:n=1024,...s}){const l=(0,o.useThree)((e=>e.gl)),c=i.useMemo((()=>{const r=document.createElement("canvas"),i=r.getContext("2d");r.width=16,r.height=n;const s=i.createLinearGradient(0,0,0,n);let o=e.length;for(;o--;)s.addColorStop(e[o],t[o]);i.fillStyle=s,i.fillRect(0,0,16,n);const l=new a.Texture(r);return l.needsUpdate=!0,l}),[e]);return i.useEffect((()=>()=>{c.dispose()}),[c]),i.createElement("primitive",(0,r.c)({object:c,attach:"map",encoding:l.outputEncoding},s))}function Fa(e,t,n,r){return class extends a.ShaderMaterial{constructor(){const i=Object.entries(e);super({uniforms:i.reduce(((e,[t,n])=>({...e,...a.UniformsUtils.clone({[t]:{value:n}})})),{}),vertexShader:t,fragmentShader:n}),i.forEach((([e])=>Object.defineProperty(this,e,{get:()=>this.uniforms[e].value,set:t=>this.uniforms[e].value=t}))),r&&r(this)}}}const Ua=e=>e===Object(e)&&!Array.isArray(e)&&"function"!=typeof e;function Oa(e){const t=(0,o.useThree)((e=>e.gl)),n=(0,o.useLoader)(a.TextureLoader,Ua(e)?Object.values(e):e);if((0,i.useEffect)((()=>{(Array.isArray(n)?n:[n]).forEach(t.initTexture)}),[t,n]),Ua(e)){const t=Object.keys(e),r={};return t.forEach((e=>Object.assign(r,{[e]:n[t.indexOf(e)]}))),r}return n}Oa.preload=e=>o.useLoader.preload(a.TextureLoader,e),Oa.clear=e=>o.useLoader.clear(a.TextureLoader,e);const Na=Fa({color:new a.Color("white"),scale:[1,1],imageBounds:[1,1],map:null,zoom:1,grayscale:0},"\n varying vec2 vUv;\n void main() {\n gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.);\n vUv = uv;\n }\n","\n // mostly from https://gist.github.com/statico/df64c5d167362ecf7b34fca0b1459a44\n varying vec2 vUv;\n uniform vec2 scale;\n uniform vec2 imageBounds;\n uniform vec3 color;\n uniform sampler2D map;\n uniform float zoom;\n uniform float grayscale;\n const vec3 luma = vec3(.299, 0.587, 0.114);\n vec4 toGrayscale(vec4 color, float intensity) {\n return vec4(mix(color.rgb, vec3(dot(color.rgb, luma)), intensity), color.a);\n }\n vec2 aspect(vec2 size) {\n return size / min(size.x, size.y);\n }\n void main() {\n vec2 s = aspect(scale);\n vec2 i = aspect(imageBounds);\n float rs = s.x / s.y;\n float ri = i.x / i.y;\n vec2 new = rs < ri ? vec2(i.x * s.y / i.y, s.y) : vec2(s.x, i.y * s.x / i.x);\n vec2 offset = (rs < ri ? vec2((new.x - s.x) / 2.0, 0.0) : vec2(0.0, (new.y - s.y) / 2.0)) / new;\n vec2 uv = vUv * s / new + offset;\n vec2 zUv = (uv - vec2(0.5, 0.5)) / zoom + vec2(0.5, 0.5);\n gl_FragColor = toGrayscale(texture2D(map, zUv) * vec4(color, 1.0), grayscale);\n \n #include \n #include \n }\n"),ka=i.forwardRef((({children:e,color:t,segments:n=1,scale:s=1,zoom:a=1,grayscale:l=0,url:c,toneMapped:h,...u},d)=>{(0,o.extend)({ImageMaterial:Na});const p=Oa(c),f=Array.isArray(s)?[s[0],s[1]]:[s,s],m=[p.image.width,p.image.height];return i.createElement("mesh",(0,r.c)({ref:d,scale:s},u),i.createElement("planeGeometry",{args:[1,1,n,n]}),i.createElement("imageMaterial",{color:t,map:p,zoom:a,grayscale:l,scale:f,imageBounds:m,toneMapped:h}),e)}));function Ga({userData:e,children:t,geometry:n,threshold:s=15,color:o="black",...l}){const c=i.useRef(null);return i.useLayoutEffect((()=>{const e=c.current.parent;if(e){const t=n||e.geometry;t===c.current.userData.currentGeom&&s===c.current.userData.currentThreshold||(c.current.userData.currentGeom=t,c.current.userData.currentThreshold=s,c.current.geometry=new a.EdgesGeometry(t,s))}})),i.createElement("lineSegments",(0,r.c)({ref:c,raycast:()=>null},l),t||i.createElement("lineBasicMaterial",{color:o}))}function za(e,t){const n=new a.Matrix4,r=new a.Ray,i=new a.Sphere,s=new a.Vector3,o=this.geometry;if(i.copy(o.boundingSphere),i.applyMatrix4(this.matrixWorld),!1===e.ray.intersectSphere(i,s))return;n.copy(this.matrixWorld).invert(),r.copy(e.ray).applyMatrix4(n);const l=new a.Vector3,c=new a.Vector3,h=new a.Vector3,u=this instanceof a.LineSegments?2:1,d=o.index,p=o.attributes;if(null!==d){const n=d.array,i=p.position.array,a=p.width.array;for(let o=0,d=n.length-1;og)continue;s.applyMatrix4(this.matrixWorld);const A=e.ray.origin.distanceTo(s);Ae.far||(t.push({distance:A,point:h.clone().applyMatrix4(this.matrixWorld),index:o,face:null,faceIndex:null,object:this}),o=d)}}}function Qa(e,t,n,r,i){let s;if(e=e.subarray||e.slice?e:e.buffer,n=n.subarray||n.slice?n:n.buffer,e=t?e.subarray?e.subarray(t,i&&t+i):e.slice(t,i&&t+i):e,n.set)n.set(e,r);else for(s=0;s0&&(n=this.copyV3(r),this.next.push(n[0],n[1],n[2]),this.next.push(n[0],n[1],n[2]))}n=this.compareV3(e-1,0)?this.copyV3(1):this.copyV3(e-1),this.next.push(n[0],n[1],n[2]),this.next.push(n[0],n[1],n[2]),this._attributes&&this._attributes.position.count===this.positions.length?(this._attributes.position.copyArray(new Float32Array(this.positions)),this._attributes.position.needsUpdate=!0,this._attributes.previous.copyArray(new Float32Array(this.previous)),this._attributes.previous.needsUpdate=!0,this._attributes.next.copyArray(new Float32Array(this.next)),this._attributes.next.needsUpdate=!0,this._attributes.side.copyArray(new Float32Array(this.side)),this._attributes.side.needsUpdate=!0,this._attributes.width.copyArray(new Float32Array(this.width)),this._attributes.width.needsUpdate=!0,this._attributes.uv.copyArray(new Float32Array(this.uvs)),this._attributes.uv.needsUpdate=!0,this._attributes.index.copyArray(new Uint16Array(this.indices_array)),this._attributes.index.needsUpdate=!0):this._attributes={position:new a.BufferAttribute(new Float32Array(this.positions),3),previous:new a.BufferAttribute(new Float32Array(this.previous),3),next:new a.BufferAttribute(new Float32Array(this.next),3),side:new a.BufferAttribute(new Float32Array(this.side),1),width:new a.BufferAttribute(new Float32Array(this.width),1),uv:new a.BufferAttribute(new Float32Array(this.uvs),2),index:new a.BufferAttribute(new Uint16Array(this.indices_array),1),counters:new a.BufferAttribute(new Float32Array(this.counters),1)},this.setAttribute("position",this._attributes.position),this.setAttribute("previous",this._attributes.previous),this.setAttribute("next",this._attributes.next),this.setAttribute("side",this._attributes.side),this.setAttribute("width",this._attributes.width),this.setAttribute("uv",this._attributes.uv),this.setAttribute("counters",this._attributes.counters),this.setIndex(this._attributes.index),this.computeBoundingSphere(),this.computeBoundingBox()}advance({x:e,y:t,z:n}){const r=this._attributes.position.array,i=this._attributes.previous.array,s=this._attributes.next.array,a=r.length;Qa(r,0,i,0,a),Qa(r,6,r,0,a-6),r[a-6]=e,r[a-5]=t,r[a-4]=n,r[a-3]=e,r[a-2]=t,r[a-1]=n,Qa(r,6,s,0,a-6),s[a-6]=e,s[a-5]=t,s[a-4]=n,s[a-3]=e,s[a-2]=t,s[a-1]=n,this._attributes.position.needsUpdate=!0,this._attributes.previous.needsUpdate=!0,this._attributes.next.needsUpdate=!0}}a.ShaderChunk.meshline_vert=["","#include ","",a.ShaderChunk.logdepthbuf_pars_vertex,a.ShaderChunk.fog_pars_vertex,"","attribute vec3 previous;","attribute vec3 next;","attribute float side;","attribute float width;","attribute float counters;","","uniform vec2 resolution;","uniform float lineWidth;","uniform vec3 color;","uniform float opacity;","uniform float sizeAttenuation;","","varying vec2 vUV;","varying vec4 vColor;","varying float vCounters;","","vec2 fix( vec4 i, float aspect ) {",""," vec2 res = i.xy / i.w;"," res.x *= aspect;","\t vCounters = counters;"," return res;","","}","","void main() {",""," float aspect = resolution.x / resolution.y;",""," vColor = vec4( color, opacity );"," vUV = uv;",""," mat4 m = projectionMatrix * modelViewMatrix;"," vec4 finalPosition = m * vec4( position, 1.0 );"," vec4 prevPos = m * vec4( previous, 1.0 );"," vec4 nextPos = m * vec4( next, 1.0 );",""," vec2 currentP = fix( finalPosition, aspect );"," vec2 prevP = fix( prevPos, aspect );"," vec2 nextP = fix( nextPos, aspect );",""," float w = lineWidth * width;",""," vec2 dir;"," if( nextP == currentP ) dir = normalize( currentP - prevP );"," else if( prevP == currentP ) dir = normalize( nextP - currentP );"," else {"," vec2 dir1 = normalize( currentP - prevP );"," vec2 dir2 = normalize( nextP - currentP );"," dir = normalize( dir1 + dir2 );",""," vec2 perp = vec2( -dir1.y, dir1.x );"," vec2 miter = vec2( -dir.y, dir.x );"," //w = clamp( w / dot( miter, perp ), 0., 4. * lineWidth * width );",""," }",""," //vec2 normal = ( cross( vec3( dir, 0. ), vec3( 0., 0., 1. ) ) ).xy;"," vec4 normal = vec4( -dir.y, dir.x, 0., 1. );"," normal.xy *= .5 * w;"," normal *= projectionMatrix;"," if( sizeAttenuation == 0. ) {"," normal.xy *= finalPosition.w;"," normal.xy /= ( vec4( resolution, 0., 1. ) * projectionMatrix ).xy;"," }",""," finalPosition.xy += normal.xy * side;",""," gl_Position = finalPosition;","",a.ShaderChunk.logdepthbuf_vertex,a.ShaderChunk.fog_vertex&&" vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",a.ShaderChunk.fog_vertex,"}"].join("\n"),a.ShaderChunk.meshline_frag=["",a.ShaderChunk.fog_pars_fragment,a.ShaderChunk.logdepthbuf_pars_fragment,"","uniform sampler2D map;","uniform sampler2D alphaMap;","uniform float useMap;","uniform float useAlphaMap;","uniform float useDash;","uniform float dashArray;","uniform float dashOffset;","uniform float dashRatio;","uniform float visibility;","uniform float alphaTest;","uniform vec2 repeat;","","varying vec2 vUV;","varying vec4 vColor;","varying float vCounters;","","void main() {","",a.ShaderChunk.logdepthbuf_fragment,""," vec4 c = vColor;"," if( useMap == 1. ) c *= texture2D( map, vUV * repeat );"," if( useAlphaMap == 1. ) c.a *= texture2D( alphaMap, vUV * repeat ).a;"," if( c.a < alphaTest ) discard;"," if( useDash == 1. ){"," c.a *= ceil(mod(vCounters + dashOffset, dashArray) - (dashArray * dashRatio));"," }"," gl_FragColor = c;"," gl_FragColor.a *= step(vCounters, visibility);","",a.ShaderChunk.fog_fragment,"}"].join("\n");class Ha extends a.ShaderMaterial{constructor(e){super({uniforms:Object.assign({},a.UniformsLib.fog,{lineWidth:{value:1},map:{value:null},useMap:{value:0},alphaMap:{value:null},useAlphaMap:{value:0},color:{value:new a.Color(16777215)},opacity:{value:1},resolution:{value:new a.Vector2(1,1)},sizeAttenuation:{value:1},dashArray:{value:0},dashOffset:{value:0},dashRatio:{value:.5},useDash:{value:0},visibility:{value:1},alphaTest:{value:0},repeat:{value:new a.Vector2(1,1)}}),vertexShader:a.ShaderChunk.meshline_vert,fragmentShader:a.ShaderChunk.meshline_frag}),this.type="MeshLineMaterial",Object.defineProperties(this,{lineWidth:{enumerable:!0,get(){return this.uniforms.lineWidth.value},set(e){this.uniforms.lineWidth.value=e}},map:{enumerable:!0,get(){return this.uniforms.map.value},set(e){this.uniforms.map.value=e}},useMap:{enumerable:!0,get(){return this.uniforms.useMap.value},set(e){this.uniforms.useMap.value=e}},alphaMap:{enumerable:!0,get(){return this.uniforms.alphaMap.value},set(e){this.uniforms.alphaMap.value=e}},useAlphaMap:{enumerable:!0,get(){return this.uniforms.useAlphaMap.value},set(e){this.uniforms.useAlphaMap.value=e}},color:{enumerable:!0,get(){return this.uniforms.color.value},set(e){this.uniforms.color.value=e}},opacity:{enumerable:!0,get(){return this.uniforms.opacity.value},set(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get(){return this.uniforms.resolution.value},set(e){this.uniforms.resolution.value.copy(e)}},sizeAttenuation:{enumerable:!0,get(){return this.uniforms.sizeAttenuation.value},set(e){this.uniforms.sizeAttenuation.value=e}},dashArray:{enumerable:!0,get(){return this.uniforms.dashArray.value},set(e){this.uniforms.dashArray.value=e,this.useDash=0!==e?1:0}},dashOffset:{enumerable:!0,get(){return this.uniforms.dashOffset.value},set(e){this.uniforms.dashOffset.value=e}},dashRatio:{enumerable:!0,get(){return this.uniforms.dashRatio.value},set(e){this.uniforms.dashRatio.value=e}},useDash:{enumerable:!0,get(){return this.uniforms.useDash.value},set(e){this.uniforms.useDash.value=e}},visibility:{enumerable:!0,get(){return this.uniforms.visibility.value},set(e){this.uniforms.visibility.value=e}},alphaTest:{enumerable:!0,get(){return this.uniforms.alphaTest.value},set(e){this.uniforms.alphaTest.value=e}},repeat:{enumerable:!0,get(){return this.uniforms.repeat.value},set(e){this.uniforms.repeat.value.copy(e)}}}),this.setValues(e)}copy(e){return super.copy(e),this.lineWidth=e.lineWidth,this.map=e.map,this.useMap=e.useMap,this.alphaMap=e.alphaMap,this.useAlphaMap=e.useAlphaMap,this.color.copy(e.color),this.opacity=e.opacity,this.resolution.copy(e.resolution),this.sizeAttenuation=e.sizeAttenuation,this.dashArray.copy(e.dashArray),this.dashOffset.copy(e.dashOffset),this.dashRatio.copy(e.dashRatio),this.useDash=e.useDash,this.visibility=e.visibility,this.alphaTest=e.alphaTest,this.repeat.copy(e.repeat),this}}const ja={width:.2,length:1,decay:1,local:!1,stride:0,interval:1},Wa=(e,t=1)=>(e.set(e.subarray(t)),e.fill(-1/0,-t),e);function Xa(e,t){const{length:n,local:r,decay:s,interval:l,stride:c}={...ja,...t},h=i.useRef(),[u]=i.useState((()=>new a.Vector3));i.useLayoutEffect((()=>{e&&(h.current=Float32Array.from({length:10*n*3},((t,n)=>e.position.getComponent(n%3))))}),[n,e]);const d=i.useRef(new a.Vector3),p=i.useRef(0);return(0,o.useFrame)((()=>{if(e&&h.current){if(0===p.current){let t;r?t=e.position:(e.getWorldPosition(u),t=u);const n=1*s;for(let e=0;e{const{children:n}=e,{width:r,length:s,decay:l,local:c,stride:h,interval:u}={...ja,...e},{color:d="hotpink",attenuation:p,target:f}=e,m=(0,o.useThree)((e=>e.size)),g=i.useRef(null),[A,v]=i.useState(null),y=Xa(A,{length:s,decay:l,local:c,stride:h,interval:u});i.useEffect((()=>{const e=(null==f?void 0:f.current)||g.current.children.find((e=>e instanceof a.Object3D));e&&v(e)}),[y,f]);const x=i.useMemo((()=>new Va),[]),b=i.useMemo((()=>{var e;const t=new Ha({lineWidth:.1*r,color:d,sizeAttenuation:1,resolution:new a.Vector2(m.width,m.height)});let i;if(n)if(Array.isArray(n))i=n.find((e=>{const t=e;return"string"==typeof t.type&&"meshLineMaterial"===t.type}));else{const e=n;"string"==typeof e.type&&"meshLineMaterial"===e.type&&(i=e)}return"object"==typeof(null==(e=i)?void 0:e.props)&&t.setValues(i.props),t}),[r,d,m,n]);return i.useEffect((()=>{b.uniforms.resolution.value.set(m.width,m.height)}),[m]),(0,o.useFrame)((()=>{y.current&&x.setPoints(y.current,p)})),i.createElement("group",null,i.createElement("mesh",{ref:t,geometry:x,material:b}),i.createElement("group",{ref:g},n))})),qa=new a.Triangle,Ka=new a.Vector3;class Ja{constructor(e){let t=e.geometry;t.index&&(console.warn("THREE.MeshSurfaceSampler: Converting geometry to non-indexed BufferGeometry."),t=t.toNonIndexed()),this.geometry=t,this.randomFunction=Math.random,this.positionAttribute=this.geometry.getAttribute("position"),this.colorAttribute=this.geometry.getAttribute("color"),this.weightAttribute=null,this.distribution=null}setWeightAttribute(e){return this.weightAttribute=e?this.geometry.getAttribute(e):null,this}build(){const e=this.positionAttribute,t=this.weightAttribute,n=new Float32Array(e.count/3);for(let i=0;ie){i=s;break}e1&&(i=1-i,s=1-s),qa.a.fromBufferAttribute(this.positionAttribute,3*e),qa.b.fromBufferAttribute(this.positionAttribute,3*e+1),qa.c.fromBufferAttribute(this.positionAttribute,3*e+2),t.set(0,0,0).addScaledVector(qa.a,i).addScaledVector(qa.b,s).addScaledVector(qa.c,1-(i+s)),void 0!==n&&qa.getNormal(n),void 0!==r&&void 0!==this.colorAttribute&&(qa.a.fromBufferAttribute(this.colorAttribute,3*e),qa.b.fromBufferAttribute(this.colorAttribute,3*e+1),qa.c.fromBufferAttribute(this.colorAttribute,3*e+2),Ka.set(0,0,0).addScaledVector(qa.a,i).addScaledVector(qa.b,s).addScaledVector(qa.c,1-(i+s)),r.r=Ka.x,r.g=Ka.y,r.b=Ka.z),this}}const Za=({children:e,weight:t,transform:n,instances:s,mesh:o,...l})=>{const c=i.useRef(null),h=i.useRef(null),u=i.useRef(null);return i.useEffect((()=>{var e,t;h.current=null!==(e=null==s?void 0:s.current)&&void 0!==e?e:c.current.children.find((e=>e.hasOwnProperty("instanceMatrix"))),u.current=null!==(t=null==o?void 0:o.current)&&void 0!==t?t:c.current.children.find((e=>"Mesh"===e.type))}),[e,null==o?void 0:o.current,null==s?void 0:s.current]),i.useEffect((()=>{if(void 0===u.current)return;if(void 0===h.current)return;const e=new Ja(u.current);t&&e.setWeightAttribute(t),e.build();const r=new a.Vector3,i=new a.Vector3,s=new a.Color,o=new a.Object3D;u.current.updateMatrixWorld(!0);for(let t=0;t{const[s]=i.useState((()=>new a.BufferAttribute(new Float32Array(0),1))),o=i.useRef(null);return i.useLayoutEffect((()=>{if(o.current){var t;const n=null!==(t=o.current.parent)&&void 0!==t?t:o.current.__r3f.parent,r=e(n);o.current.copy(r)}}),[e]),i.createElement("primitive",(0,r.c)({ref:o,object:s,attachObject:["attributes",t]},n))};var eo=n(49576),to=n.n(eo);function no(e,{keys:t=["near","far","color","distance","decay","penumbra","angle","intensity","skeleton","visible","castShadow","receiveShadow","morphTargetDictionary","morphTargetInfluences","name","geometry","material","position","rotation","scale","up","userData"],deep:n,inject:r,castShadow:s,receiveShadow:a}){let o=to()(e,t);return n&&(o.geometry&&"materialsOnly"!==n&&(o.geometry=o.geometry.clone()),o.material&&"geometriesOnly"!==n&&(o.material=o.material.clone())),r&&(o="function"==typeof r?{...o,children:r(e)}:i.isValidElement(r)?{...o,children:r}:{...o,...r}),"Mesh"===e.type&&(s&&(o.castShadow=!0),a&&(o.receiveShadow=!0)),o}const ro=i.forwardRef((({object:e,children:t,deep:n,castShadow:s,receiveShadow:a,inject:o,keys:l,...c},h)=>{const u={keys:l,deep:n,inject:o,castShadow:s,receiveShadow:a};if(Array.isArray(e))return i.createElement("group",(0,r.c)({},c,{ref:h}),e.map((e=>i.createElement(ro,(0,r.c)({key:e.uuid,object:e},u)))),t);const{children:d,...p}=no(e,u),f=e.type[0].toLowerCase()+e.type.slice(1);return i.createElement(f,(0,r.c)({},p,c,{ref:h}),(null==e?void 0:e.children).map((e=>{let t={},n=e.type[0].toLowerCase()+e.type.slice(1);return"group"===n||"object3D"===n?(n=ro,t={object:e,...u}):t=no(e,u),i.createElement(n,(0,r.c)({key:e.uuid},t))})),t,d)})),io=i.forwardRef((({makeDefault:e,...t},n)=>{const s=(0,o.useThree)((({set:e})=>e)),a=(0,o.useThree)((({camera:e})=>e)),l=(0,o.useThree)((({size:e})=>e)),c=i.useRef();return i.useLayoutEffect((()=>{c.current&&!t.manual&&c.current.updateProjectionMatrix()}),[l,t]),i.useLayoutEffect((()=>{if(e&&c.current){const e=a;return s((()=>({camera:c.current}))),()=>s((()=>({camera:e})))}}),[a,c,e,s]),i.createElement("orthographicCamera",(0,r.c)({left:l.width/-2,right:l.width/2,top:l.height/2,bottom:l.height/-2,ref:w([c,n])},t))})),so=i.forwardRef((({makeDefault:e,...t},n)=>{const s=(0,o.useThree)((({set:e})=>e)),a=(0,o.useThree)((({camera:e})=>e)),l=(0,o.useThree)((({size:e})=>e)),c=i.useRef();return i.useLayoutEffect((()=>{const{current:e}=c;e&&!t.manual&&(e.aspect=l.width/l.height,e.updateProjectionMatrix())}),[l,t]),i.useLayoutEffect((()=>{if(e&&c.current){const e=a;return s((()=>({camera:c.current}))),()=>s((()=>({camera:e})))}}),[a,c,e,s]),i.createElement("perspectiveCamera",(0,r.c)({ref:w([c,n])},t))}));function ao({children:e,fog:t,frames:n=1/0,resolution:r=256,near:s=1,far:l=1e3,...c}){const h=i.useRef(),[u,d]=i.useState(),p=(0,o.useThree)((({scene:e})=>e)),f=(0,o.useThree)((({gl:e})=>e)),m=i.useMemo((()=>{const e=new a.WebGLCubeRenderTarget(r);return e.texture.type=a.HalfFloatType,e}),[r]);let g=0;return(0,o.useFrame)((()=>{if(u&&h.current&&(n===1/0||ge.visible=!1));const e=p.fog;p.fog=t||e,u.update(f,p),p.fog=e,h.current.traverse((e=>e.visible=!0)),g++}})),i.createElement("group",c,i.createElement("cubeCamera",{ref:d,args:[s,l,m]}),i.createElement("group",{ref:h},e(m.texture)))}var oo=Object.defineProperty,lo=(e,t,n)=>(((e,t,n)=>{t in e?oo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class co extends a.EventDispatcher{constructor(e){super(),lo(this,"object"),lo(this,"changeEvent",{type:"change"}),lo(this,"EPS",1e-6),lo(this,"enabled",!0),lo(this,"deviceOrientation",{alpha:0,beta:0,gamma:0}),lo(this,"screenOrientation",0),lo(this,"alphaOffset",0),lo(this,"onDeviceOrientationChangeEvent",(e=>{this.deviceOrientation=e})),lo(this,"onScreenOrientationChangeEvent",(()=>{this.screenOrientation=window.orientation||0})),lo(this,"zee",new a.Vector3(0,0,1)),lo(this,"euler",new a.Euler),lo(this,"q0",new a.Quaternion),lo(this,"q1",new a.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5))),lo(this,"setObjectQuaternion",((e,t,n,r,i)=>{this.euler.set(n,t,-r,"YXZ"),e.setFromEuler(this.euler),e.multiply(this.q1),e.multiply(this.q0.setFromAxisAngle(this.zee,-i))})),lo(this,"connect",(()=>{this.onScreenOrientationChangeEvent(),void 0!==window.DeviceOrientationEvent&&"function"==typeof window.DeviceOrientationEvent.requestPermission?window.DeviceOrientationEvent.requestPermission().then((e=>{"granted"==e&&(window.addEventListener("orientationchange",this.onScreenOrientationChangeEvent),window.addEventListener("deviceorientation",this.onDeviceOrientationChangeEvent))})).catch((e=>{console.error("THREE.DeviceOrientationControls: Unable to use DeviceOrientation API:",e)})):(window.addEventListener("orientationchange",this.onScreenOrientationChangeEvent),window.addEventListener("deviceorientation",this.onDeviceOrientationChangeEvent)),this.enabled=!0})),lo(this,"disconnect",(()=>{window.removeEventListener("orientationchange",this.onScreenOrientationChangeEvent),window.removeEventListener("deviceorientation",this.onDeviceOrientationChangeEvent),this.enabled=!1})),lo(this,"lastQuaternion",new a.Quaternion),lo(this,"update",(()=>{if(!1===this.enabled)return;const e=this.deviceOrientation;if(e){const t=e.alpha?a.MathUtils.degToRad(e.alpha)+this.alphaOffset:0,n=e.beta?a.MathUtils.degToRad(e.beta):0,r=e.gamma?a.MathUtils.degToRad(e.gamma):0,i=this.screenOrientation?a.MathUtils.degToRad(this.screenOrientation):0;this.setObjectQuaternion(this.object.quaternion,t,n,r,i),8*(1-this.lastQuaternion.dot(this.object.quaternion))>this.EPS&&(this.lastQuaternion.copy(this.object.quaternion),this.dispatchEvent(this.changeEvent))}})),lo(this,"dispose",(()=>this.disconnect())),this.object=e,this.object.rotation.reorder("YXZ"),this.connect()}}const ho=i.forwardRef(((e,t)=>{const{camera:n,onChange:s,...a}=e,l=(0,o.useThree)((e=>e.camera)),c=(0,o.useThree)((e=>e.invalidate)),h=n||l,[u]=i.useState((()=>new co(h)));return i.useEffect((()=>{const e=e=>{c(),s&&s(e)};return null==u||null==u.addEventListener||u.addEventListener("change",e),()=>null==u||null==u.removeEventListener?void 0:u.removeEventListener("change",e)}),[s,u,c]),(0,o.useFrame)((()=>null==u?void 0:u.update())),i.useEffect((()=>{const e=u;return null==e||e.connect(),()=>null==e?void 0:e.dispose()}),[u]),u?i.createElement("primitive",(0,r.c)({ref:t,dispose:void 0,object:u},a)):null}));var uo=Object.defineProperty,po=(e,t,n)=>(((e,t,n)=>{t in e?uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function fo(e){e.preventDefault()}class mo extends a.EventDispatcher{constructor(e,t){super(),po(this,"object"),po(this,"domElement",null),po(this,"movementSpeed",1),po(this,"rollSpeed",.005),po(this,"dragToLook",!1),po(this,"autoForward",!1),po(this,"changeEvent",{type:"change"}),po(this,"EPS",1e-6),po(this,"tmpQuaternion",new a.Quaternion),po(this,"mouseStatus",0),po(this,"movementSpeedMultiplier",1),po(this,"moveState",{up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0}),po(this,"moveVector",new a.Vector3(0,0,0)),po(this,"rotationVector",new a.Vector3(0,0,0)),po(this,"keydown",(e=>{if(!e.altKey){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}})),po(this,"keyup",(e=>{switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()})),po(this,"pointerdown",(e=>{if(this.dragToLook)this.mouseStatus++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}})),po(this,"pointermove",(e=>{if(!this.dragToLook||this.mouseStatus>0){const t=this.getContainerDimensions(),n=t.size[0]/2,r=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-r)/r,this.updateRotationVector()}})),po(this,"pointerup",(e=>{if(this.dragToLook)this.mouseStatus--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()})),po(this,"lastQuaternion",new a.Quaternion),po(this,"lastPosition",new a.Vector3),po(this,"update",(e=>{const t=e*this.movementSpeed,n=e*this.rollSpeed;this.object.translateX(this.moveVector.x*t),this.object.translateY(this.moveVector.y*t),this.object.translateZ(this.moveVector.z*t),this.tmpQuaternion.set(this.rotationVector.x*n,this.rotationVector.y*n,this.rotationVector.z*n,1).normalize(),this.object.quaternion.multiply(this.tmpQuaternion),(this.lastPosition.distanceToSquared(this.object.position)>this.EPS||8*(1-this.lastQuaternion.dot(this.object.quaternion))>this.EPS)&&(this.dispatchEvent(this.changeEvent),this.lastQuaternion.copy(this.object.quaternion),this.lastPosition.copy(this.object.position))})),po(this,"updateMovementVector",(()=>{const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back})),po(this,"updateRotationVector",(()=>{this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft})),po(this,"getContainerDimensions",(()=>this.domElement==document||this.domElement instanceof Document?{size:[window.innerWidth,window.innerHeight],offset:[0,0]}:{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]})),po(this,"connect",(e=>{this.domElement=e,e instanceof Document||e.setAttribute("tabindex",-1),this.domElement.addEventListener("contextmenu",fo),this.domElement.addEventListener("pointermove",this.pointermove),this.domElement.addEventListener("pointerdown",this.pointerdown),this.domElement.addEventListener("pointerup",this.pointerup),window.addEventListener("keydown",this.keydown),window.addEventListener("keyup",this.keyup)})),po(this,"dispose",(()=>{this.domElement.removeEventListener("contextmenu",fo),this.domElement.removeEventListener("pointermove",this.pointermove),this.domElement.removeEventListener("pointerdown",this.pointerdown),this.domElement.removeEventListener("pointerup",this.pointerup),window.removeEventListener("keydown",this.keydown),window.removeEventListener("keyup",this.keyup)})),this.object=e,void 0!==t&&this.connect(t),this.updateMovementVector(),this.updateRotationVector()}}const go=i.forwardRef(((e,t)=>{const{onChange:n,...s}=e,a=(0,o.useThree)((({invalidate:e})=>e)),l=(0,o.useThree)((({camera:e})=>e)),c=(0,o.useThree)((({gl:e})=>e)),[h]=i.useState((()=>new mo(l,c.domElement)));return i.useEffect((()=>{const e=e=>{a(),n&&n(e)};return null==h||null==h.addEventListener||h.addEventListener("change",e),()=>null==h||null==h.removeEventListener?void 0:h.removeEventListener("change",e)}),[n,h,a]),(0,o.useFrame)(((e,t)=>null==h?void 0:h.update(t))),h?i.createElement("primitive",(0,r.c)({ref:t,dispose:void 0,object:h},s)):null}));var Ao=Object.defineProperty,vo=(e,t,n)=>(((e,t,n)=>{t in e?Ao(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const yo=new a.Ray,xo=new a.Plane,bo=Math.cos(Math.PI/180*70),Eo=(e,t)=>(e%t+t)%t;class _o extends a.EventDispatcher{constructor(e,t){super(),vo(this,"object"),vo(this,"domElement"),vo(this,"enabled",!0),vo(this,"target",new a.Vector3),vo(this,"minDistance",0),vo(this,"maxDistance",1/0),vo(this,"minZoom",0),vo(this,"maxZoom",1/0),vo(this,"minPolarAngle",0),vo(this,"maxPolarAngle",Math.PI),vo(this,"minAzimuthAngle",-1/0),vo(this,"maxAzimuthAngle",1/0),vo(this,"enableDamping",!1),vo(this,"dampingFactor",.05),vo(this,"enableZoom",!0),vo(this,"zoomSpeed",1),vo(this,"enableRotate",!0),vo(this,"rotateSpeed",1),vo(this,"enablePan",!0),vo(this,"panSpeed",1),vo(this,"screenSpacePanning",!0),vo(this,"keyPanSpeed",7),vo(this,"zoomToCursor",!1),vo(this,"autoRotate",!1),vo(this,"autoRotateSpeed",2),vo(this,"reverseOrbit",!1),vo(this,"reverseHorizontalOrbit",!1),vo(this,"reverseVerticalOrbit",!1),vo(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),vo(this,"mouseButtons",{LEFT:a.MOUSE.ROTATE,MIDDLE:a.MOUSE.DOLLY,RIGHT:a.MOUSE.PAN}),vo(this,"touches",{ONE:a.TOUCH.ROTATE,TWO:a.TOUCH.DOLLY_PAN}),vo(this,"target0"),vo(this,"position0"),vo(this,"zoom0"),vo(this,"_domElementKeyEvents",null),vo(this,"getPolarAngle"),vo(this,"getAzimuthalAngle"),vo(this,"setPolarAngle"),vo(this,"setAzimuthalAngle"),vo(this,"getDistance"),vo(this,"listenToKeyEvents"),vo(this,"stopListenToKeyEvents"),vo(this,"saveState"),vo(this,"reset"),vo(this,"update"),vo(this,"connect"),vo(this,"dispose"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=e=>{let t=Eo(e,2*Math.PI),r=h.phi;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i{let t=Eo(e,2*Math.PI),r=h.theta;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-in.object.position.distanceTo(n.target),this.listenToKeyEvents=e=>{e.addEventListener("keydown",J),this._domElementKeyEvents=e},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",J),this._domElementKeyEvents=null},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(r),n.update(),l=o.NONE},this.update=(()=>{const t=new a.Vector3,i=new a.Vector3(0,1,0),s=(new a.Quaternion).setFromUnitVectors(e.up,i),f=s.clone().invert(),m=new a.Vector3,g=new a.Quaternion,A=2*Math.PI;return function(){const v=n.object.position;s.setFromUnitVectors(e.up,i),f.copy(s).invert(),t.copy(v).sub(n.target),t.applyQuaternion(s),h.setFromVector3(t),n.autoRotate&&l===o.NONE&&I(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(h.theta+=u.theta*n.dampingFactor,h.phi+=u.phi*n.dampingFactor):(h.theta+=u.theta,h.phi+=u.phi);let y=n.minAzimuthAngle,x=n.maxAzimuthAngle;isFinite(y)&&isFinite(x)&&(y<-Math.PI?y+=A:y>Math.PI&&(y-=A),x<-Math.PI?x+=A:x>Math.PI&&(x-=A),h.theta=y<=x?Math.max(y,Math.min(x,h.theta)):h.theta>(y+x)/2?Math.max(y,h.theta):Math.min(x,h.theta)),h.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,h.phi)),h.makeSafe(),!0===n.enableDamping?n.target.addScaledVector(p,n.dampingFactor):n.target.add(p),n.zoomToCursor&&M||n.object.isOrthographicCamera?h.radius=O(h.radius):h.radius=O(h.radius*d),t.setFromSpherical(h),t.applyQuaternion(f),v.copy(n.target).add(t),n.object.matrixAutoUpdate||n.object.updateMatrix(),n.object.lookAt(n.target),!0===n.enableDamping?(u.theta*=1-n.dampingFactor,u.phi*=1-n.dampingFactor,p.multiplyScalar(1-n.dampingFactor)):(u.set(0,0,0),p.set(0,0,0));let b=!1;if(n.zoomToCursor&&M){let r=null;if(n.object instanceof a.PerspectiveCamera&&n.object.isPerspectiveCamera){const e=t.length();r=O(e*d);const i=e-r;n.object.position.addScaledVector(_,i),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const e=new a.Vector3(S.x,S.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/d)),n.object.updateProjectionMatrix(),b=!0;const i=new a.Vector3(S.x,S.y,0);i.unproject(n.object),n.object.position.sub(i).add(e),n.object.updateMatrixWorld(),r=t.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;null!==r&&(n.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(r).add(n.object.position):(yo.origin.copy(n.object.position),yo.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(yo.direction))c||8*(1-g.dot(n.object.quaternion))>c)&&(n.dispatchEvent(r),m.copy(n.object.position),g.copy(n.object.quaternion),b=!1,!0)}})(),this.connect=e=>{e===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),n.domElement=e,n.domElement.style.touchAction="none",n.domElement.addEventListener("contextmenu",Z),n.domElement.addEventListener("pointerdown",W),n.domElement.addEventListener("pointercancel",q),n.domElement.addEventListener("wheel",K)},this.dispose=()=>{var e,t,r,i,s,a;null==(e=n.domElement)||e.removeEventListener("contextmenu",Z),null==(t=n.domElement)||t.removeEventListener("pointerdown",W),null==(r=n.domElement)||r.removeEventListener("pointercancel",q),null==(i=n.domElement)||i.removeEventListener("wheel",K),null==(s=n.domElement)||s.ownerDocument.removeEventListener("pointermove",X),null==(a=n.domElement)||a.ownerDocument.removeEventListener("pointerup",Y),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",J)};const n=this,r={type:"change"},i={type:"start"},s={type:"end"},o={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=o.NONE;const c=1e-6,h=new a.Spherical,u=new a.Spherical;let d=1;const p=new a.Vector3,f=new a.Vector2,m=new a.Vector2,g=new a.Vector2,A=new a.Vector2,v=new a.Vector2,y=new a.Vector2,x=new a.Vector2,b=new a.Vector2,E=new a.Vector2,_=new a.Vector3,S=new a.Vector2;let M=!1;const w=[],C={};function T(){return Math.pow(.95,n.zoomSpeed)}function I(e){n.reverseOrbit||n.reverseHorizontalOrbit?u.theta+=e:u.theta-=e}function B(e){n.reverseOrbit||n.reverseVerticalOrbit?u.phi+=e:u.phi-=e}const R=(()=>{const e=new a.Vector3;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),p.add(e)}})(),P=(()=>{const e=new a.Vector3;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),p.add(e)}})(),D=(()=>{const e=new a.Vector3;return function(t,r){const i=n.domElement;if(i&&n.object instanceof a.PerspectiveCamera&&n.object.isPerspectiveCamera){const s=n.object.position;e.copy(s).sub(n.target);let a=e.length();a*=Math.tan(n.object.fov/2*Math.PI/180),R(2*t*a/i.clientHeight,n.object.matrix),P(2*r*a/i.clientHeight,n.object.matrix)}else i&&n.object instanceof a.OrthographicCamera&&n.object.isOrthographicCamera?(R(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),P(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}})();function L(e){n.object instanceof a.PerspectiveCamera&&n.object.isPerspectiveCamera||n.object instanceof a.OrthographicCamera&&n.object.isOrthographicCamera?d/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function F(e){n.object instanceof a.PerspectiveCamera&&n.object.isPerspectiveCamera||n.object instanceof a.OrthographicCamera&&n.object.isOrthographicCamera?d*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function U(e){if(!n.zoomToCursor||!n.domElement)return;M=!0;const t=n.domElement.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,s=t.width,a=t.height;S.x=r/s*2-1,S.y=-i/a*2+1,_.set(S.x,S.y,1).unproject(n.object).sub(n.object.position).normalize()}function O(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function N(e){f.set(e.clientX,e.clientY)}function k(e){A.set(e.clientX,e.clientY)}function G(){if(1==w.length)f.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);f.set(e,t)}}function z(){if(1==w.length)A.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);A.set(e,t)}}function Q(){const e=w[0].pageX-w[1].pageX,t=w[0].pageY-w[1].pageY,n=Math.sqrt(e*e+t*t);x.set(0,n)}function V(e){if(1==w.length)m.set(e.pageX,e.pageY);else{const t=te(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);m.set(n,r)}g.subVectors(m,f).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(I(2*Math.PI*g.x/t.clientHeight),B(2*Math.PI*g.y/t.clientHeight)),f.copy(m)}function H(e){if(1==w.length)v.set(e.pageX,e.pageY);else{const t=te(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);v.set(n,r)}y.subVectors(v,A).multiplyScalar(n.panSpeed),D(y.x,y.y),A.copy(v)}function j(e){const t=te(e),r=e.pageX-t.x,i=e.pageY-t.y,s=Math.sqrt(r*r+i*i);b.set(0,s),E.set(0,Math.pow(b.y/x.y,n.zoomSpeed)),L(E.y),x.copy(b)}function W(e){var t,r;!1!==n.enabled&&(0===w.length&&(null==(t=n.domElement)||t.ownerDocument.addEventListener("pointermove",X),null==(r=n.domElement)||r.ownerDocument.addEventListener("pointerup",Y)),function(e){w.push(e)}(e),"touch"===e.pointerType?function(e){switch(ee(e),w.length){case 1:switch(n.touches.ONE){case a.TOUCH.ROTATE:if(!1===n.enableRotate)return;G(),l=o.TOUCH_ROTATE;break;case a.TOUCH.PAN:if(!1===n.enablePan)return;z(),l=o.TOUCH_PAN;break;default:l=o.NONE}break;case 2:switch(n.touches.TWO){case a.TOUCH.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&Q(),n.enablePan&&z(),l=o.TOUCH_DOLLY_PAN;break;case a.TOUCH.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&Q(),n.enableRotate&&G(),l=o.TOUCH_DOLLY_ROTATE;break;default:l=o.NONE}break;default:l=o.NONE}l!==o.NONE&&n.dispatchEvent(i)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case a.MOUSE.DOLLY:if(!1===n.enableZoom)return;!function(e){U(e),x.set(e.clientX,e.clientY)}(e),l=o.DOLLY;break;case a.MOUSE.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;k(e),l=o.PAN}else{if(!1===n.enableRotate)return;N(e),l=o.ROTATE}break;case a.MOUSE.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;N(e),l=o.ROTATE}else{if(!1===n.enablePan)return;k(e),l=o.PAN}break;default:l=o.NONE}l!==o.NONE&&n.dispatchEvent(i)}(e))}function X(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(ee(e),l){case o.TOUCH_ROTATE:if(!1===n.enableRotate)return;V(e),n.update();break;case o.TOUCH_PAN:if(!1===n.enablePan)return;H(e),n.update();break;case o.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&j(e),n.enablePan&&H(e)}(e),n.update();break;case o.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&j(e),n.enableRotate&&V(e)}(e),n.update();break;default:l=o.NONE}}(e):function(e){if(!1===n.enabled)return;switch(l){case o.ROTATE:if(!1===n.enableRotate)return;!function(e){m.set(e.clientX,e.clientY),g.subVectors(m,f).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(I(2*Math.PI*g.x/t.clientHeight),B(2*Math.PI*g.y/t.clientHeight)),f.copy(m),n.update()}(e);break;case o.DOLLY:if(!1===n.enableZoom)return;!function(e){b.set(e.clientX,e.clientY),E.subVectors(b,x),E.y>0?L(T()):E.y<0&&F(T()),x.copy(b),n.update()}(e);break;case o.PAN:if(!1===n.enablePan)return;!function(e){v.set(e.clientX,e.clientY),y.subVectors(v,A).multiplyScalar(n.panSpeed),D(y.x,y.y),A.copy(v),n.update()}(e)}}(e))}function Y(e){var t,r,i;$(e),0===w.length&&(null==(t=n.domElement)||t.releasePointerCapture(e.pointerId),null==(r=n.domElement)||r.ownerDocument.removeEventListener("pointermove",X),null==(i=n.domElement)||i.ownerDocument.removeEventListener("pointerup",Y)),n.dispatchEvent(s),l=o.NONE}function q(e){$(e)}function K(e){!1===n.enabled||!1===n.enableZoom||l!==o.NONE&&l!==o.ROTATE||(e.preventDefault(),n.dispatchEvent(i),function(e){U(e),e.deltaY<0?F(T()):e.deltaY>0&&L(T()),n.update()}(e),n.dispatchEvent(s))}function J(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:D(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:D(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:D(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:D(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function Z(e){!1!==n.enabled&&e.preventDefault()}function $(e){delete C[e.pointerId];for(let t=0;t{const{camera:n,onChange:s,onStart:a,onEnd:l,...c}=e,h=(0,o.useThree)((({invalidate:e})=>e)),u=(0,o.useThree)((({camera:e})=>e)),d=(0,o.useThree)((({gl:e})=>e.domElement)),p=n||u,f=i.useMemo((()=>new So(p)),[p]);return i.useEffect((()=>{f.connect(d);const e=e=>{h(),s&&s(e)};return f.addEventListener("change",e),a&&f.addEventListener("start",a),l&&f.addEventListener("end",l),()=>{f.dispose(),f.removeEventListener("change",e),a&&f.removeEventListener("start",a),l&&f.removeEventListener("end",l)}}),[s,a,l,f,h,d]),(0,o.useFrame)((()=>f.update())),i.createElement("primitive",(0,r.c)({ref:t,dispose:void 0,object:f,enableDamping:!0},c))})),wo=i.forwardRef((({makeDefault:e,camera:t,regress:n,domElement:s,enableDamping:a=!0,onChange:l,onStart:c,onEnd:h,...u},d)=>{const p=(0,o.useThree)((e=>e.invalidate)),f=(0,o.useThree)((e=>e.camera)),m=(0,o.useThree)((e=>e.gl)),g=(0,o.useThree)((e=>e.events)),A=(0,o.useThree)((e=>e.set)),v=(0,o.useThree)((e=>e.get)),y=(0,o.useThree)((e=>e.performance)),x=t||f,b=s||g.connected||m.domElement,E=i.useMemo((()=>new _o(x)),[x]);return(0,o.useFrame)((()=>{E.enabled&&E.update()})),i.useEffect((()=>(E.connect(b),()=>{E.dispose()})),[b,n,E,p]),i.useEffect((()=>{const e=e=>{p(),n&&y.regress(),l&&l(e)};return E.addEventListener("change",e),c&&E.addEventListener("start",c),h&&E.addEventListener("end",h),()=>{c&&E.removeEventListener("start",c),h&&E.removeEventListener("end",h),E.removeEventListener("change",e)}}),[l,c,h]),i.useEffect((()=>{if(e){const e=v().controls;return A({controls:E}),()=>A({controls:e})}}),[e,E]),i.createElement("primitive",(0,r.c)({ref:d,object:E,enableDamping:a},u))}));var Co=Object.defineProperty,To=(e,t,n)=>(((e,t,n)=>{t in e?Co(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class Io extends a.EventDispatcher{constructor(e,t){super(),To(this,"enabled",!0),To(this,"screen",{left:0,top:0,width:0,height:0}),To(this,"rotateSpeed",1),To(this,"zoomSpeed",1.2),To(this,"panSpeed",.3),To(this,"noRotate",!1),To(this,"noZoom",!1),To(this,"noPan",!1),To(this,"staticMoving",!1),To(this,"dynamicDampingFactor",.2),To(this,"minDistance",0),To(this,"maxDistance",1/0),To(this,"keys",["KeyA","KeyS","KeyD"]),To(this,"mouseButtons",{LEFT:a.MOUSE.ROTATE,MIDDLE:a.MOUSE.DOLLY,RIGHT:a.MOUSE.PAN}),To(this,"object"),To(this,"domElement"),To(this,"cursorZoom",!1),To(this,"target",new a.Vector3),To(this,"mousePosition",new a.Vector2),To(this,"STATE",{NONE:-1,ROTATE:0,ZOOM:1,PAN:2,TOUCH_ROTATE:3,TOUCH_ZOOM_PAN:4}),To(this,"EPS",1e-6),To(this,"lastZoom",1),To(this,"lastPosition",new a.Vector3),To(this,"cursorVector",new a.Vector3),To(this,"targetVector",new a.Vector3),To(this,"_state",this.STATE.NONE),To(this,"_keyState",this.STATE.NONE),To(this,"_eye",new a.Vector3),To(this,"_movePrev",new a.Vector2),To(this,"_moveCurr",new a.Vector2),To(this,"_lastAxis",new a.Vector3),To(this,"_lastAngle",0),To(this,"_zoomStart",new a.Vector2),To(this,"_zoomEnd",new a.Vector2),To(this,"_touchZoomDistanceStart",0),To(this,"_touchZoomDistanceEnd",0),To(this,"_panStart",new a.Vector2),To(this,"_panEnd",new a.Vector2),To(this,"target0"),To(this,"position0"),To(this,"up0"),To(this,"zoom0"),To(this,"changeEvent",{type:"change"}),To(this,"startEvent",{type:"start"}),To(this,"endEvent",{type:"end"}),To(this,"onScreenVector",new a.Vector2),To(this,"getMouseOnScreen",((e,t)=>(this.onScreenVector.set((e-this.screen.left)/this.screen.width,(t-this.screen.top)/this.screen.height),this.onScreenVector))),To(this,"onCircleVector",new a.Vector2),To(this,"getMouseOnCircle",((e,t)=>(this.onCircleVector.set((e-.5*this.screen.width-this.screen.left)/(.5*this.screen.width),(this.screen.height+2*(this.screen.top-t))/this.screen.width),this.onCircleVector))),To(this,"axis",new a.Vector3),To(this,"quaternion",new a.Quaternion),To(this,"eyeDirection",new a.Vector3),To(this,"objectUpDirection",new a.Vector3),To(this,"objectSidewaysDirection",new a.Vector3),To(this,"moveDirection",new a.Vector3),To(this,"angle",0),To(this,"rotateCamera",(()=>{this.moveDirection.set(this._moveCurr.x-this._movePrev.x,this._moveCurr.y-this._movePrev.y,0),this.angle=this.moveDirection.length(),this.angle?(this._eye.copy(this.object.position).sub(this.target),this.eyeDirection.copy(this._eye).normalize(),this.objectUpDirection.copy(this.object.up).normalize(),this.objectSidewaysDirection.crossVectors(this.objectUpDirection,this.eyeDirection).normalize(),this.objectUpDirection.setLength(this._moveCurr.y-this._movePrev.y),this.objectSidewaysDirection.setLength(this._moveCurr.x-this._movePrev.x),this.moveDirection.copy(this.objectUpDirection.add(this.objectSidewaysDirection)),this.axis.crossVectors(this.moveDirection,this._eye).normalize(),this.angle*=this.rotateSpeed,this.quaternion.setFromAxisAngle(this.axis,this.angle),this._eye.applyQuaternion(this.quaternion),this.object.up.applyQuaternion(this.quaternion),this._lastAxis.copy(this.axis),this._lastAngle=this.angle):!this.staticMoving&&this._lastAngle&&(this._lastAngle*=Math.sqrt(1-this.dynamicDampingFactor),this._eye.copy(this.object.position).sub(this.target),this.quaternion.setFromAxisAngle(this._lastAxis,this._lastAngle),this._eye.applyQuaternion(this.quaternion),this.object.up.applyQuaternion(this.quaternion)),this._movePrev.copy(this._moveCurr)})),To(this,"zoomCamera",(()=>{let e;if(this._state===this.STATE.TOUCH_ZOOM_PAN)e=this._touchZoomDistanceStart/this._touchZoomDistanceEnd,this._touchZoomDistanceStart=this._touchZoomDistanceEnd,this.object.isPerspectiveCamera?this._eye.multiplyScalar(e):this.object.isOrthographicCamera?(this.object.zoom/=e,this.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type");else{if(e=1+(this._zoomEnd.y-this._zoomStart.y)*this.zoomSpeed,Math.abs(e-1)>this.EPS&&e>0&&(this.object.isPerspectiveCamera?(e>1&&this._eye.length()>=this.maxDistance-this.EPS&&(e=1),this._eye.multiplyScalar(e)):this.object.isOrthographicCamera?(e>1&&this.object.zoom{if(this.domElement&&(this.mouseChange.copy(this._panEnd).sub(this._panStart),this.mouseChange.lengthSq()>this.EPS)){if(this.object.isOrthographicCamera){const e=this.object,t=(e.right-e.left)/this.object.zoom,n=(e.top-e.bottom)/this.object.zoom;this.mouseChange.x*=t,this.mouseChange.y*=n}else this.mouseChange.multiplyScalar(this._eye.length()*this.panSpeed);this.pan.copy(this._eye).cross(this.object.up).setLength(this.mouseChange.x),this.pan.add(this.objectUp.copy(this.object.up).setLength(this.mouseChange.y)),this.object.position.add(this.pan),this.target.add(this.pan),this.staticMoving?this._panStart.copy(this._panEnd):this._panStart.add(this.mouseChange.subVectors(this._panEnd,this._panStart).multiplyScalar(this.dynamicDampingFactor))}})),To(this,"checkDistances",(()=>{this.noZoom&&this.noPan||(this._eye.lengthSq()>this.maxDistance*this.maxDistance&&(this.object.position.addVectors(this.target,this._eye.setLength(this.maxDistance)),this._zoomStart.copy(this._zoomEnd)),this._eye.lengthSq(){if(!this.domElement)return;const e=this.domElement.getBoundingClientRect(),t=this.domElement.ownerDocument.documentElement;this.screen.left=e.left+window.pageXOffset-t.clientLeft,this.screen.top=e.top+window.pageYOffset-t.clientTop,this.screen.width=e.width,this.screen.height=e.height})),To(this,"update",(()=>{this._eye.subVectors(this.object.position,this.target),this.noRotate||this.rotateCamera(),this.noZoom||this.zoomCamera(),this.noPan||this.panCamera(),this.object.position.addVectors(this.target,this._eye),this.object.isPerspectiveCamera?(this.checkDistances(),this.object.lookAt(this.target),this.lastPosition.distanceToSquared(this.object.position)>this.EPS&&(this.dispatchEvent(this.changeEvent),this.lastPosition.copy(this.object.position))):this.object.isOrthographicCamera?(this.object.lookAt(this.target),(this.lastPosition.distanceToSquared(this.object.position)>this.EPS||this.lastZoom!==this.object.zoom)&&(this.dispatchEvent(this.changeEvent),this.lastPosition.copy(this.object.position),this.lastZoom=this.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")})),To(this,"reset",(()=>{this._state=this.STATE.NONE,this._keyState=this.STATE.NONE,this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.up.copy(this.up0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this._eye.subVectors(this.object.position,this.target),this.object.lookAt(this.target),this.dispatchEvent(this.changeEvent),this.lastPosition.copy(this.object.position),this.lastZoom=this.object.zoom})),To(this,"keydown",(e=>{!1!==this.enabled&&(window.removeEventListener("keydown",this.keydown),this._keyState===this.STATE.NONE&&(e.code!==this.keys[this.STATE.ROTATE]||this.noRotate?e.code!==this.keys[this.STATE.ZOOM]||this.noZoom?e.code!==this.keys[this.STATE.PAN]||this.noPan||(this._keyState=this.STATE.PAN):this._keyState=this.STATE.ZOOM:this._keyState=this.STATE.ROTATE))})),To(this,"onPointerDown",(e=>{if(!1!==this.enabled)switch(e.pointerType){case"mouse":case"pen":this.onMouseDown(e)}})),To(this,"onPointerMove",(e=>{if(!1!==this.enabled)switch(e.pointerType){case"mouse":case"pen":this.onMouseMove(e)}})),To(this,"onPointerUp",(e=>{if(!1!==this.enabled)switch(e.pointerType){case"mouse":case"pen":this.onMouseUp()}})),To(this,"keyup",(()=>{!1!==this.enabled&&(this._keyState=this.STATE.NONE,window.addEventListener("keydown",this.keydown))})),To(this,"onMouseDown",(e=>{if(!this.domElement)return;if(this._state===this.STATE.NONE)switch(e.button){case this.mouseButtons.LEFT:this._state=this.STATE.ROTATE;break;case this.mouseButtons.MIDDLE:this._state=this.STATE.ZOOM;break;case this.mouseButtons.RIGHT:this._state=this.STATE.PAN}const t=this._keyState!==this.STATE.NONE?this._keyState:this._state;t!==this.STATE.ROTATE||this.noRotate?t!==this.STATE.ZOOM||this.noZoom?t!==this.STATE.PAN||this.noPan||(this._panStart.copy(this.getMouseOnScreen(e.pageX,e.pageY)),this._panEnd.copy(this._panStart)):(this._zoomStart.copy(this.getMouseOnScreen(e.pageX,e.pageY)),this._zoomEnd.copy(this._zoomStart)):(this._moveCurr.copy(this.getMouseOnCircle(e.pageX,e.pageY)),this._movePrev.copy(this._moveCurr)),this.domElement.ownerDocument.addEventListener("pointermove",this.onPointerMove),this.domElement.ownerDocument.addEventListener("pointerup",this.onPointerUp),this.dispatchEvent(this.startEvent)})),To(this,"onMouseMove",(e=>{if(!1===this.enabled)return;const t=this._keyState!==this.STATE.NONE?this._keyState:this._state;t!==this.STATE.ROTATE||this.noRotate?t!==this.STATE.ZOOM||this.noZoom?t!==this.STATE.PAN||this.noPan||this._panEnd.copy(this.getMouseOnScreen(e.pageX,e.pageY)):this._zoomEnd.copy(this.getMouseOnScreen(e.pageX,e.pageY)):(this._movePrev.copy(this._moveCurr),this._moveCurr.copy(this.getMouseOnCircle(e.pageX,e.pageY)))})),To(this,"onMouseUp",(()=>{this.domElement&&!1!==this.enabled&&(this._state=this.STATE.NONE,this.domElement.ownerDocument.removeEventListener("pointermove",this.onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this.onPointerUp),this.dispatchEvent(this.endEvent))})),To(this,"mousewheel",(e=>{if(!1!==this.enabled&&!0!==this.noZoom){switch(e.preventDefault(),e.deltaMode){case 2:this._zoomStart.y-=.025*e.deltaY;break;case 1:this._zoomStart.y-=.01*e.deltaY;break;default:this._zoomStart.y-=25e-5*e.deltaY}this.mousePosition.x=e.offsetX/this.screen.width*2-1,this.mousePosition.y=-e.offsetY/this.screen.height*2+1,this.dispatchEvent(this.startEvent),this.dispatchEvent(this.endEvent)}})),To(this,"touchstart",(e=>{if(!1!==this.enabled){if(e.preventDefault(),1===e.touches.length)this._state=this.STATE.TOUCH_ROTATE,this._moveCurr.copy(this.getMouseOnCircle(e.touches[0].pageX,e.touches[0].pageY)),this._movePrev.copy(this._moveCurr);else{this._state=this.STATE.TOUCH_ZOOM_PAN;const t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY;this._touchZoomDistanceEnd=this._touchZoomDistanceStart=Math.sqrt(t*t+n*n);const r=(e.touches[0].pageX+e.touches[1].pageX)/2,i=(e.touches[0].pageY+e.touches[1].pageY)/2;this._panStart.copy(this.getMouseOnScreen(r,i)),this._panEnd.copy(this._panStart)}this.dispatchEvent(this.startEvent)}})),To(this,"touchmove",(e=>{if(!1!==this.enabled)if(e.preventDefault(),1===e.touches.length)this._movePrev.copy(this._moveCurr),this._moveCurr.copy(this.getMouseOnCircle(e.touches[0].pageX,e.touches[0].pageY));else{const t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY;this._touchZoomDistanceEnd=Math.sqrt(t*t+n*n);const r=(e.touches[0].pageX+e.touches[1].pageX)/2,i=(e.touches[0].pageY+e.touches[1].pageY)/2;this._panEnd.copy(this.getMouseOnScreen(r,i))}})),To(this,"touchend",(e=>{if(!1!==this.enabled){switch(e.touches.length){case 0:this._state=this.STATE.NONE;break;case 1:this._state=this.STATE.TOUCH_ROTATE,this._moveCurr.copy(this.getMouseOnCircle(e.touches[0].pageX,e.touches[0].pageY)),this._movePrev.copy(this._moveCurr)}this.dispatchEvent(this.endEvent)}})),To(this,"contextmenu",(e=>{!1!==this.enabled&&e.preventDefault()})),To(this,"connect",(e=>{e===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.domElement=e,this.domElement.addEventListener("contextmenu",this.contextmenu),this.domElement.addEventListener("pointerdown",this.onPointerDown),this.domElement.addEventListener("wheel",this.mousewheel),this.domElement.addEventListener("touchstart",this.touchstart),this.domElement.addEventListener("touchend",this.touchend),this.domElement.addEventListener("touchmove",this.touchmove),this.domElement.ownerDocument.addEventListener("pointermove",this.onPointerMove),this.domElement.ownerDocument.addEventListener("pointerup",this.onPointerUp),window.addEventListener("keydown",this.keydown),window.addEventListener("keyup",this.keyup),this.handleResize()})),To(this,"dispose",(()=>{this.domElement&&(this.domElement.removeEventListener("contextmenu",this.contextmenu),this.domElement.removeEventListener("pointerdown",this.onPointerDown),this.domElement.removeEventListener("wheel",this.mousewheel),this.domElement.removeEventListener("touchstart",this.touchstart),this.domElement.removeEventListener("touchend",this.touchend),this.domElement.removeEventListener("touchmove",this.touchmove),this.domElement.ownerDocument.removeEventListener("pointermove",this.onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("keydown",this.keydown),window.removeEventListener("keyup",this.keyup))})),this.object=e,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,void 0!==t&&this.connect(t),this.update()}}const Bo=i.forwardRef((({makeDefault:e,camera:t,domElement:n,regress:s,onChange:a,onStart:l,onEnd:c,...h},u)=>{const{invalidate:d,camera:p,gl:f,events:m,set:g,get:A,performance:v,viewport:y}=(0,o.useThree)(),x=t||p,b=n||m.connected||f.domElement,E=i.useMemo((()=>new Io(x)),[x]);return(0,o.useFrame)((()=>{E.enabled&&E.update()})),i.useEffect((()=>(E.connect(b),()=>{E.dispose()})),[b,s,E,d]),i.useEffect((()=>{const e=e=>{d(),s&&v.regress(),a&&a(e)};return E.addEventListener("change",e),l&&E.addEventListener("start",l),c&&E.addEventListener("end",c),()=>{l&&E.removeEventListener("start",l),c&&E.removeEventListener("end",c),E.removeEventListener("change",e)}}),[a,l,c]),i.useEffect((()=>{E.handleResize()}),[y]),i.useEffect((()=>{if(e){const e=A().controls;return g({controls:E}),()=>g({controls:e})}}),[e,E]),i.createElement("primitive",(0,r.c)({ref:u,object:E},h))}));var Ro=Object.defineProperty,Po=(e,t,n)=>(((e,t,n)=>{t in e?Ro(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const Do={IDLE:Symbol(),ROTATE:Symbol(),PAN:Symbol(),SCALE:Symbol(),FOV:Symbol(),FOCUS:Symbol(),ZROTATE:Symbol(),TOUCH_MULTI:Symbol(),ANIMATION_FOCUS:Symbol(),ANIMATION_ROTATE:Symbol()},Lo={NONE:Symbol(),ONE_FINGER:Symbol(),ONE_FINGER_SWITCHED:Symbol(),TWO_FINGER:Symbol(),MULT_FINGER:Symbol(),CURSOR:Symbol()},Fo={x:0,y:0},Uo={camera:new a.Matrix4,gizmos:new a.Matrix4},Oo={type:"change"},No={type:"start"},ko={type:"end"};class Go extends a.EventDispatcher{constructor(e,t=null,n=null){super(),Po(this,"camera"),Po(this,"domElement"),Po(this,"scene"),Po(this,"mouseActions"),Po(this,"_mouseOp"),Po(this,"_v2_1"),Po(this,"_v3_1"),Po(this,"_v3_2"),Po(this,"_m4_1"),Po(this,"_m4_2"),Po(this,"_quat"),Po(this,"_translationMatrix"),Po(this,"_rotationMatrix"),Po(this,"_scaleMatrix"),Po(this,"_rotationAxis"),Po(this,"_cameraMatrixState"),Po(this,"_cameraProjectionState"),Po(this,"_fovState"),Po(this,"_upState"),Po(this,"_zoomState"),Po(this,"_nearPos"),Po(this,"_farPos"),Po(this,"_gizmoMatrixState"),Po(this,"_up0"),Po(this,"_zoom0"),Po(this,"_fov0"),Po(this,"_initialNear"),Po(this,"_nearPos0"),Po(this,"_initialFar"),Po(this,"_farPos0"),Po(this,"_cameraMatrixState0"),Po(this,"_gizmoMatrixState0"),Po(this,"_button"),Po(this,"_touchStart"),Po(this,"_touchCurrent"),Po(this,"_input"),Po(this,"_switchSensibility"),Po(this,"_startFingerDistance"),Po(this,"_currentFingerDistance"),Po(this,"_startFingerRotation"),Po(this,"_currentFingerRotation"),Po(this,"_devPxRatio"),Po(this,"_downValid"),Po(this,"_nclicks"),Po(this,"_downEvents"),Po(this,"_clickStart"),Po(this,"_maxDownTime"),Po(this,"_maxInterval"),Po(this,"_posThreshold"),Po(this,"_movementThreshold"),Po(this,"_currentCursorPosition"),Po(this,"_startCursorPosition"),Po(this,"_grid"),Po(this,"_gridPosition"),Po(this,"_gizmos"),Po(this,"_curvePts"),Po(this,"_timeStart"),Po(this,"_animationId"),Po(this,"focusAnimationTime"),Po(this,"_timePrev"),Po(this,"_timeCurrent"),Po(this,"_anglePrev"),Po(this,"_angleCurrent"),Po(this,"_cursorPosPrev"),Po(this,"_cursorPosCurr"),Po(this,"_wPrev"),Po(this,"_wCurr"),Po(this,"adjustNearFar"),Po(this,"scaleFactor"),Po(this,"dampingFactor"),Po(this,"wMax"),Po(this,"enableAnimations"),Po(this,"enableGrid"),Po(this,"cursorZoom"),Po(this,"minFov"),Po(this,"maxFov"),Po(this,"enabled"),Po(this,"enablePan"),Po(this,"enableRotate"),Po(this,"enableZoom"),Po(this,"minDistance"),Po(this,"maxDistance"),Po(this,"minZoom"),Po(this,"maxZoom"),Po(this,"target"),Po(this,"_currentTarget"),Po(this,"_tbRadius"),Po(this,"_state"),Po(this,"onWindowResize",(()=>{const e=(this._gizmos.scale.x+this._gizmos.scale.y+this._gizmos.scale.z)/3;if(this.camera){const e=this.calculateTbRadius(this.camera);void 0!==e&&(this._tbRadius=e)}const t=this._tbRadius/e,n=new a.EllipseCurve(0,0,t,t).getPoints(this._curvePts),r=(new a.BufferGeometry).setFromPoints(n);for(const i in this._gizmos.children){this._gizmos.children[i].geometry=r}this.dispatchEvent(Oo)})),Po(this,"onContextMenu",(e=>{if(this.enabled)for(let t=0;t{this._touchStart.splice(0,this._touchStart.length),this._touchCurrent.splice(0,this._touchCurrent.length),this._input=Lo.NONE})),Po(this,"onPointerDown",(e=>{if(0==e.button&&e.isPrimary?(this._downValid=!0,this._downEvents.push(e)):this._downValid=!1,"touch"==e.pointerType&&this._input!=Lo.CURSOR)switch(this._touchStart.push(e),this._touchCurrent.push(e),this._input){case Lo.NONE:this._input=Lo.ONE_FINGER,this.onSinglePanStart(e,"ROTATE"),window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp);break;case Lo.ONE_FINGER:case Lo.ONE_FINGER_SWITCHED:this._input=Lo.TWO_FINGER,this.onRotateStart(),this.onPinchStart(),this.onDoublePanStart();break;case Lo.TWO_FINGER:this._input=Lo.MULT_FINGER,this.onTriplePanStart()}else if("touch"!=e.pointerType&&this._input==Lo.NONE){let t=null;e.ctrlKey||e.metaKey?t="CTRL":e.shiftKey&&(t="SHIFT"),this._mouseOp=this.getOpFromAction(e.button,t),this._mouseOp&&(window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),this._input=Lo.CURSOR,this._button=e.button,this.onSinglePanStart(e,this._mouseOp))}})),Po(this,"onPointerMove",(e=>{if("touch"==e.pointerType&&this._input!=Lo.CURSOR)switch(this._input){case Lo.ONE_FINGER:this.updateTouchEvent(e),this.onSinglePanMove(e,Do.ROTATE);break;case Lo.ONE_FINGER_SWITCHED:if(this.calculatePointersDistance(this._touchCurrent[0],e)*this._devPxRatio>=this._switchSensibility){this._input=Lo.ONE_FINGER,this.updateTouchEvent(e),this.onSinglePanStart(e,"ROTATE");break}break;case Lo.TWO_FINGER:this.updateTouchEvent(e),this.onRotateMove(),this.onPinchMove(),this.onDoublePanMove();break;case Lo.MULT_FINGER:this.updateTouchEvent(e),this.onTriplePanMove()}else if("touch"!=e.pointerType&&this._input==Lo.CURSOR){let t=null;e.ctrlKey||e.metaKey?t="CTRL":e.shiftKey&&(t="SHIFT");const n=this.getOpStateFromAction(this._button,t);n&&this.onSinglePanMove(e,n)}if(this._downValid){this.calculatePointersDistance(this._downEvents[this._downEvents.length-1],e)*this._devPxRatio>this._movementThreshold&&(this._downValid=!1)}})),Po(this,"onPointerUp",(e=>{if("touch"==e.pointerType&&this._input!=Lo.CURSOR){const t=this._touchCurrent.length;for(let n=0;n{var t,n;if(this.enabled&&this.enableZoom&&this.domElement){let r=null;e.ctrlKey||e.metaKey?r="CTRL":e.shiftKey&&(r="SHIFT");const i=this.getOpFromAction("WHEEL",r);if(i){e.preventDefault(),this.dispatchEvent(No);const r=125;let s=e.deltaY/r,o=1;switch(s>0?o=1/this.scaleFactor:s<0&&(o=this.scaleFactor),i){case"ZOOM":if(this.updateTbState(Do.SCALE,!0),s>0?o=1/Math.pow(this.scaleFactor,s):s<0&&(o=Math.pow(this.scaleFactor,-s)),this.cursorZoom&&this.enablePan){let r;this.camera instanceof a.OrthographicCamera&&(r=null==(t=this.unprojectOnTbPlane(this.camera,e.clientX,e.clientY,this.domElement))?void 0:t.applyQuaternion(this.camera.quaternion).multiplyScalar(1/this.camera.zoom).add(this._gizmos.position)),this.camera instanceof a.PerspectiveCamera&&(r=null==(n=this.unprojectOnTbPlane(this.camera,e.clientX,e.clientY,this.domElement))?void 0:n.applyQuaternion(this.camera.quaternion).add(this._gizmos.position)),void 0!==r&&this.applyTransformMatrix(this.applyScale(o,r))}else this.applyTransformMatrix(this.applyScale(o,this._gizmos.position));this._grid&&(this.disposeGrid(),this.drawGrid()),this.updateTbState(Do.IDLE,!1),this.dispatchEvent(Oo),this.dispatchEvent(ko);break;case"FOV":if(this.camera instanceof a.PerspectiveCamera){this.updateTbState(Do.FOV,!0),0!=e.deltaX&&(s=e.deltaX/r,o=1,s>0?o=1/Math.pow(this.scaleFactor,s):s<0&&(o=Math.pow(this.scaleFactor,-s))),this._v3_1.setFromMatrixPosition(this._cameraMatrixState);const t=this._v3_1.distanceTo(this._gizmos.position);let n=t/o;n=a.MathUtils.clamp(n,this.minDistance,this.maxDistance);const i=t*Math.tan(a.MathUtils.DEG2RAD*this.camera.fov*.5);let l=a.MathUtils.RAD2DEG*(2*Math.atan(i/n));l>this.maxFov?l=this.maxFov:l{if(this.enabled&&this.domElement)switch(this.dispatchEvent(No),this.setCenter(e.clientX,e.clientY),t){case"PAN":if(!this.enablePan)return;if(-1!=this._animationId&&(cancelAnimationFrame(this._animationId),this._animationId=-1,this._timeStart=-1,this.activateGizmos(!1),this.dispatchEvent(Oo)),this.camera){this.updateTbState(Do.PAN,!0);const e=this.unprojectOnTbPlane(this.camera,Fo.x,Fo.y,this.domElement);void 0!==e&&this._startCursorPosition.copy(e),this.enableGrid&&(this.drawGrid(),this.dispatchEvent(Oo))}break;case"ROTATE":if(!this.enableRotate)return;if(-1!=this._animationId&&(cancelAnimationFrame(this._animationId),this._animationId=-1,this._timeStart=-1),this.camera){this.updateTbState(Do.ROTATE,!0);const e=this.unprojectOnTbSurface(this.camera,Fo.x,Fo.y,this.domElement,this._tbRadius);void 0!==e&&this._startCursorPosition.copy(e),this.activateGizmos(!0),this.enableAnimations&&(this._timePrev=this._timeCurrent=performance.now(),this._angleCurrent=this._anglePrev=0,this._cursorPosPrev.copy(this._startCursorPosition),this._cursorPosCurr.copy(this._cursorPosPrev),this._wCurr=0,this._wPrev=this._wCurr)}this.dispatchEvent(Oo);break;case"FOV":if(!this.enableZoom)return;this.camera instanceof a.PerspectiveCamera&&(-1!=this._animationId&&(cancelAnimationFrame(this._animationId),this._animationId=-1,this._timeStart=-1,this.activateGizmos(!1),this.dispatchEvent(Oo)),this.updateTbState(Do.FOV,!0),this._startCursorPosition.setY(.5*this.getCursorNDC(Fo.x,Fo.y,this.domElement).y),this._currentCursorPosition.copy(this._startCursorPosition));break;case"ZOOM":if(!this.enableZoom)return;-1!=this._animationId&&(cancelAnimationFrame(this._animationId),this._animationId=-1,this._timeStart=-1,this.activateGizmos(!1),this.dispatchEvent(Oo)),this.updateTbState(Do.SCALE,!0),this._startCursorPosition.setY(.5*this.getCursorNDC(Fo.x,Fo.y,this.domElement).y),this._currentCursorPosition.copy(this._startCursorPosition)}})),Po(this,"onSinglePanMove",((e,t)=>{if(this.enabled&&this.domElement){const n=t!=this._state;switch(this.setCenter(e.clientX,e.clientY),t){case Do.PAN:if(this.enablePan&&this.camera)if(n){this.dispatchEvent(ko),this.dispatchEvent(No),this.updateTbState(t,!0);const e=this.unprojectOnTbPlane(this.camera,Fo.x,Fo.y,this.domElement);void 0!==e&&this._startCursorPosition.copy(e),this.enableGrid&&this.drawGrid(),this.activateGizmos(!1)}else{const e=this.unprojectOnTbPlane(this.camera,Fo.x,Fo.y,this.domElement);void 0!==e&&this._currentCursorPosition.copy(e),this.applyTransformMatrix(this.pan(this._startCursorPosition,this._currentCursorPosition))}break;case Do.ROTATE:if(this.enableRotate&&this.camera)if(n){this.dispatchEvent(ko),this.dispatchEvent(No),this.updateTbState(t,!0);const e=this.unprojectOnTbSurface(this.camera,Fo.x,Fo.y,this.domElement,this._tbRadius);void 0!==e&&this._startCursorPosition.copy(e),this.enableGrid&&this.disposeGrid(),this.activateGizmos(!0)}else{const e=this.unprojectOnTbSurface(this.camera,Fo.x,Fo.y,this.domElement,this._tbRadius);void 0!==e&&this._currentCursorPosition.copy(e);const t=this._startCursorPosition.distanceTo(this._currentCursorPosition),n=this._startCursorPosition.angleTo(this._currentCursorPosition),r=Math.max(t/this._tbRadius,n);this.applyTransformMatrix(this.rotate(this.calculateRotationAxis(this._startCursorPosition,this._currentCursorPosition),r)),this.enableAnimations&&(this._timePrev=this._timeCurrent,this._timeCurrent=performance.now(),this._anglePrev=this._angleCurrent,this._angleCurrent=r,this._cursorPosPrev.copy(this._cursorPosCurr),this._cursorPosCurr.copy(this._currentCursorPosition),this._wPrev=this._wCurr,this._wCurr=this.calculateAngularSpeed(this._anglePrev,this._angleCurrent,this._timePrev,this._timeCurrent))}break;case Do.SCALE:if(this.enableZoom)if(n)this.dispatchEvent(ko),this.dispatchEvent(No),this.updateTbState(t,!0),this._startCursorPosition.setY(.5*this.getCursorNDC(Fo.x,Fo.y,this.domElement).y),this._currentCursorPosition.copy(this._startCursorPosition),this.enableGrid&&this.disposeGrid(),this.activateGizmos(!1);else{const e=8;this._currentCursorPosition.setY(.5*this.getCursorNDC(Fo.x,Fo.y,this.domElement).y);const t=this._currentCursorPosition.y-this._startCursorPosition.y;let n=1;t<0?n=1/Math.pow(this.scaleFactor,-t*e):t>0&&(n=Math.pow(this.scaleFactor,t*e)),this.applyTransformMatrix(this.applyScale(n,this._gizmos.position))}break;case Do.FOV:if(this.enableZoom&&this.camera instanceof a.PerspectiveCamera)if(n)this.dispatchEvent(ko),this.dispatchEvent(No),this.updateTbState(t,!0),this._startCursorPosition.setY(.5*this.getCursorNDC(Fo.x,Fo.y,this.domElement).y),this._currentCursorPosition.copy(this._startCursorPosition),this.enableGrid&&this.disposeGrid(),this.activateGizmos(!1);else{const e=8;this._currentCursorPosition.setY(.5*this.getCursorNDC(Fo.x,Fo.y,this.domElement).y);const t=this._currentCursorPosition.y-this._startCursorPosition.y;let n=1;t<0?n=1/Math.pow(this.scaleFactor,-t*e):t>0&&(n=Math.pow(this.scaleFactor,t*e)),this._v3_1.setFromMatrixPosition(this._cameraMatrixState);const r=this._v3_1.distanceTo(this._gizmos.position);let i=r/n;i=a.MathUtils.clamp(i,this.minDistance,this.maxDistance);const s=r*Math.tan(a.MathUtils.DEG2RAD*this._fovState*.5);let o=a.MathUtils.RAD2DEG*(2*Math.atan(s/i));o=a.MathUtils.clamp(o,this.minFov,this.maxFov);const l=s/Math.tan(a.MathUtils.DEG2RAD*(o/2));n=r/l,this._v3_2.setFromMatrixPosition(this._gizmoMatrixState),this.setFov(o),this.applyTransformMatrix(this.applyScale(n,this._v3_2,!1));const c=this._gizmos.position.clone().sub(this.camera.position).normalize().multiplyScalar(l/r);this._m4_1.makeTranslation(c.x,c.y,c.z)}}this.dispatchEvent(Oo)}})),Po(this,"onSinglePanEnd",(()=>{if(this._state==Do.ROTATE){if(!this.enableRotate)return;if(this.enableAnimations){if(performance.now()-this._timeCurrent<120){const e=Math.abs((this._wPrev+this._wCurr)/2),t=this;this._animationId=window.requestAnimationFrame((function(n){t.updateTbState(Do.ANIMATION_ROTATE,!0);const r=t.calculateRotationAxis(t._cursorPosPrev,t._cursorPosCurr);t.onRotationAnim(n,r,Math.min(e,t.wMax))}))}else this.updateTbState(Do.IDLE,!1),this.activateGizmos(!1),this.dispatchEvent(Oo)}else this.updateTbState(Do.IDLE,!1),this.activateGizmos(!1),this.dispatchEvent(Oo)}else this._state!=Do.PAN&&this._state!=Do.IDLE||(this.updateTbState(Do.IDLE,!1),this.enableGrid&&this.disposeGrid(),this.activateGizmos(!1),this.dispatchEvent(Oo));this.dispatchEvent(ko)})),Po(this,"onDoubleTap",(e=>{if(this.enabled&&this.enablePan&&this.scene&&this.camera&&this.domElement){this.dispatchEvent(No),this.setCenter(e.clientX,e.clientY);const t=this.unprojectOnObj(this.getCursorNDC(Fo.x,Fo.y,this.domElement),this.camera);if(t&&this.enableAnimations){const e=this;-1!=this._animationId&&window.cancelAnimationFrame(this._animationId),this._timeStart=-1,this._animationId=window.requestAnimationFrame((function(n){e.updateTbState(Do.ANIMATION_FOCUS,!0),e.onFocusAnim(n,t,e._cameraMatrixState,e._gizmoMatrixState)}))}else t&&!this.enableAnimations&&(this.updateTbState(Do.FOCUS,!0),this.focus(t,this.scaleFactor),this.updateTbState(Do.IDLE,!1),this.dispatchEvent(Oo))}this.dispatchEvent(ko)})),Po(this,"onDoublePanStart",(()=>{if(this.enabled&&this.enablePan&&this.camera&&this.domElement){this.dispatchEvent(No),this.updateTbState(Do.PAN,!0),this.setCenter((this._touchCurrent[0].clientX+this._touchCurrent[1].clientX)/2,(this._touchCurrent[0].clientY+this._touchCurrent[1].clientY)/2);const e=this.unprojectOnTbPlane(this.camera,Fo.x,Fo.y,this.domElement,!0);void 0!==e&&this._startCursorPosition.copy(e),this._currentCursorPosition.copy(this._startCursorPosition),this.activateGizmos(!1)}})),Po(this,"onDoublePanMove",(()=>{if(this.enabled&&this.enablePan&&this.camera&&this.domElement){this.setCenter((this._touchCurrent[0].clientX+this._touchCurrent[1].clientX)/2,(this._touchCurrent[0].clientY+this._touchCurrent[1].clientY)/2),this._state!=Do.PAN&&(this.updateTbState(Do.PAN,!0),this._startCursorPosition.copy(this._currentCursorPosition));const e=this.unprojectOnTbPlane(this.camera,Fo.x,Fo.y,this.domElement,!0);void 0!==e&&this._currentCursorPosition.copy(e),this.applyTransformMatrix(this.pan(this._startCursorPosition,this._currentCursorPosition,!0)),this.dispatchEvent(Oo)}})),Po(this,"onDoublePanEnd",(()=>{this.updateTbState(Do.IDLE,!1),this.dispatchEvent(ko)})),Po(this,"onRotateStart",(()=>{var e;this.enabled&&this.enableRotate&&(this.dispatchEvent(No),this.updateTbState(Do.ZROTATE,!0),this._startFingerRotation=this.getAngle(this._touchCurrent[1],this._touchCurrent[0])+this.getAngle(this._touchStart[1],this._touchStart[0]),this._currentFingerRotation=this._startFingerRotation,null==(e=this.camera)||e.getWorldDirection(this._rotationAxis),this.enablePan||this.enableZoom||this.activateGizmos(!0))})),Po(this,"onRotateMove",(()=>{var e;if(this.enabled&&this.enableRotate&&this.camera&&this.domElement){let t;this.setCenter((this._touchCurrent[0].clientX+this._touchCurrent[1].clientX)/2,(this._touchCurrent[0].clientY+this._touchCurrent[1].clientY)/2),this._state!=Do.ZROTATE&&(this.updateTbState(Do.ZROTATE,!0),this._startFingerRotation=this._currentFingerRotation),this._currentFingerRotation=this.getAngle(this._touchCurrent[1],this._touchCurrent[0])+this.getAngle(this._touchStart[1],this._touchStart[0]),this.enablePan?this.camera&&(this._v3_2.setFromMatrixPosition(this._gizmoMatrixState),t=null==(e=this.unprojectOnTbPlane(this.camera,Fo.x,Fo.y,this.domElement))?void 0:e.applyQuaternion(this.camera.quaternion).multiplyScalar(1/this.camera.zoom).add(this._v3_2)):t=(new a.Vector3).setFromMatrixPosition(this._gizmoMatrixState);const n=a.MathUtils.DEG2RAD*(this._startFingerRotation-this._currentFingerRotation);void 0!==t&&this.applyTransformMatrix(this.zRotate(t,n)),this.dispatchEvent(Oo)}})),Po(this,"onRotateEnd",(()=>{this.updateTbState(Do.IDLE,!1),this.activateGizmos(!1),this.dispatchEvent(ko)})),Po(this,"onPinchStart",(()=>{this.enabled&&this.enableZoom&&(this.dispatchEvent(No),this.updateTbState(Do.SCALE,!0),this._startFingerDistance=this.calculatePointersDistance(this._touchCurrent[0],this._touchCurrent[1]),this._currentFingerDistance=this._startFingerDistance,this.activateGizmos(!1))})),Po(this,"onPinchMove",(()=>{var e,t;if(this.enabled&&this.enableZoom&&this.domElement){this.setCenter((this._touchCurrent[0].clientX+this._touchCurrent[1].clientX)/2,(this._touchCurrent[0].clientY+this._touchCurrent[1].clientY)/2);const n=12;this._state!=Do.SCALE&&(this._startFingerDistance=this._currentFingerDistance,this.updateTbState(Do.SCALE,!0)),this._currentFingerDistance=Math.max(this.calculatePointersDistance(this._touchCurrent[0],this._touchCurrent[1]),n*this._devPxRatio);const r=this._currentFingerDistance/this._startFingerDistance;let i;this.enablePan?this.camera instanceof a.OrthographicCamera?i=null==(e=this.unprojectOnTbPlane(this.camera,Fo.x,Fo.y,this.domElement))?void 0:e.applyQuaternion(this.camera.quaternion).multiplyScalar(1/this.camera.zoom).add(this._gizmos.position):this.camera instanceof a.PerspectiveCamera&&(i=null==(t=this.unprojectOnTbPlane(this.camera,Fo.x,Fo.y,this.domElement))?void 0:t.applyQuaternion(this.camera.quaternion).add(this._gizmos.position)):i=this._gizmos.position,void 0!==i&&this.applyTransformMatrix(this.applyScale(r,i)),this.dispatchEvent(Oo)}})),Po(this,"onPinchEnd",(()=>{this.updateTbState(Do.IDLE,!1),this.dispatchEvent(ko)})),Po(this,"onTriplePanStart",(()=>{if(this.enabled&&this.enableZoom&&this.domElement){this.dispatchEvent(No),this.updateTbState(Do.SCALE,!0);let e=0,t=0;const n=this._touchCurrent.length;for(let r=0;r{if(this.enabled&&this.enableZoom&&this.camera&&this.domElement){let e=0,t=0;const n=this._touchCurrent.length;for(let a=0;a0&&(s=Math.pow(this.scaleFactor,i*r)),this._v3_1.setFromMatrixPosition(this._cameraMatrixState);const o=this._v3_1.distanceTo(this._gizmos.position);let l=o/s;l=a.MathUtils.clamp(l,this.minDistance,this.maxDistance);const c=o*Math.tan(a.MathUtils.DEG2RAD*this._fovState*.5);let h=a.MathUtils.RAD2DEG*(2*Math.atan(c/l));h=a.MathUtils.clamp(h,this.minFov,this.maxFov);const u=c/Math.tan(a.MathUtils.DEG2RAD*(h/2));s=o/u,this._v3_2.setFromMatrixPosition(this._gizmoMatrixState),this.setFov(h),this.applyTransformMatrix(this.applyScale(s,this._v3_2,!1));const d=this._gizmos.position.clone().sub(this.camera.position).normalize().multiplyScalar(u/o);this._m4_1.makeTranslation(d.x,d.y,d.z),this.dispatchEvent(Oo)}})),Po(this,"onTriplePanEnd",(()=>{this.updateTbState(Do.IDLE,!1),this.dispatchEvent(ko)})),Po(this,"setCenter",((e,t)=>{Fo.x=e,Fo.y=t})),Po(this,"initializeMouseActions",(()=>{this.setMouseAction("PAN",0,"CTRL"),this.setMouseAction("PAN",2),this.setMouseAction("ROTATE",0),this.setMouseAction("ZOOM","WHEEL"),this.setMouseAction("ZOOM",1),this.setMouseAction("FOV","WHEEL","SHIFT"),this.setMouseAction("FOV",1,"SHIFT")})),Po(this,"setMouseAction",((e,t,n=null)=>{let r;if(!["PAN","ROTATE","ZOOM","FOV"].includes(e)||![0,1,2,"WHEEL"].includes(t)||!["CTRL","SHIFT",null].includes(n))return!1;if("WHEEL"==t&&"ZOOM"!=e&&"FOV"!=e)return!1;switch(e){case"PAN":r=Do.PAN;break;case"ROTATE":r=Do.ROTATE;break;case"ZOOM":r=Do.SCALE;break;case"FOV":r=Do.FOV}const i={operation:e,mouse:t,key:n,state:r};for(let s=0;s{let n;for(let r=0;r{let n;for(let r=0;r180*Math.atan2(t.clientY-e.clientY,t.clientX-e.clientX)/Math.PI)),Po(this,"updateTouchEvent",(e=>{for(let t=0;t{const i=(r-n)/1e3;return 0==i?0:(t-e)/i})),Po(this,"calculatePointersDistance",((e,t)=>Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2)))),Po(this,"calculateRotationAxis",((e,t)=>(this._rotationMatrix.extractRotation(this._cameraMatrixState),this._quat.setFromRotationMatrix(this._rotationMatrix),this._rotationAxis.crossVectors(e,t).applyQuaternion(this._quat),this._rotationAxis.normalize().clone()))),Po(this,"calculateTbRadius",(e=>{const t=e.position.distanceTo(this._gizmos.position);if(e instanceof a.PerspectiveCamera){const n=a.MathUtils.DEG2RAD*e.fov*.5,r=Math.atan(e.aspect*Math.tan(n));return Math.tan(Math.min(n,r))*t*.67}if(e instanceof a.OrthographicCamera)return.67*Math.min(e.top,e.right)})),Po(this,"focus",((e,t,n=1)=>{if(this.camera){const r=e.clone();r.sub(this._gizmos.position).multiplyScalar(n),this._translationMatrix.makeTranslation(r.x,r.y,r.z);const i=this._gizmoMatrixState.clone();this._gizmoMatrixState.premultiply(this._translationMatrix),this._gizmoMatrixState.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale);const s=this._cameraMatrixState.clone();this._cameraMatrixState.premultiply(this._translationMatrix),this._cameraMatrixState.decompose(this.camera.position,this.camera.quaternion,this.camera.scale),this.enableZoom&&this.applyTransformMatrix(this.applyScale(t,this._gizmos.position)),this._gizmoMatrixState.copy(i),this._cameraMatrixState.copy(s)}})),Po(this,"drawGrid",(()=>{if(this.scene){const e=8947848,t=3;let n,r,i,s;if(this.camera instanceof a.OrthographicCamera){const e=this.camera.right-this.camera.left,a=this.camera.bottom-this.camera.top;i=Math.max(e,a),s=i/20,n=i/this.camera.zoom*t,r=n/s*this.camera.zoom}else if(this.camera instanceof a.PerspectiveCamera){const e=this.camera.position.distanceTo(this._gizmos.position),o=a.MathUtils.DEG2RAD*this.camera.fov*.5,l=Math.atan(this.camera.aspect*Math.tan(o));i=Math.tan(Math.max(o,l))*e*2,s=i/20,n=i*t,r=n/s}null==this._grid&&this.camera&&(this._grid=new a.GridHelper(n,r,e,e),this._grid.position.copy(this._gizmos.position),this._gridPosition.copy(this._grid.position),this._grid.quaternion.copy(this.camera.quaternion),this._grid.rotateX(.5*Math.PI),this.scene.add(this._grid))}})),Po(this,"connect",(e=>{e===document&&console.error('THREE.ArcballControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.domElement=e,this.domElement.style.touchAction="none",this.domElement.addEventListener("contextmenu",this.onContextMenu),this.domElement.addEventListener("pointerdown",this.onPointerDown),this.domElement.addEventListener("pointercancel",this.onPointerCancel),this.domElement.addEventListener("wheel",this.onWheel)})),Po(this,"dispose",(()=>{var e,t,n,r,i;-1!=this._animationId&&window.cancelAnimationFrame(this._animationId),null==(e=this.domElement)||e.removeEventListener("pointerdown",this.onPointerDown),null==(t=this.domElement)||t.removeEventListener("pointercancel",this.onPointerCancel),null==(n=this.domElement)||n.removeEventListener("wheel",this.onWheel),null==(r=this.domElement)||r.removeEventListener("contextmenu",this.onContextMenu),window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),null==(i=this.scene)||i.remove(this._gizmos),this.disposeGrid()})),Po(this,"disposeGrid",(()=>{this._grid&&this.scene&&(this.scene.remove(this._grid),this._grid=null)})),Po(this,"easeOutCubic",(e=>1-Math.pow(1-e,3))),Po(this,"activateGizmos",(e=>{for(const t of this._gizmos.children)t.material.setValues({opacity:e?1:.6})})),Po(this,"getCursorNDC",((e,t,n)=>{const r=n.getBoundingClientRect();return this._v2_1.setX((e-r.left)/r.width*2-1),this._v2_1.setY((r.bottom-t)/r.height*2-1),this._v2_1.clone()})),Po(this,"getCursorPosition",((e,t,n)=>(this._v2_1.copy(this.getCursorNDC(e,t,n)),this.camera instanceof a.OrthographicCamera&&(this._v2_1.x*=.5*(this.camera.right-this.camera.left),this._v2_1.y*=.5*(this.camera.top-this.camera.bottom)),this._v2_1.clone()))),Po(this,"setCamera",(e=>{if(e){e.lookAt(this.target),e.updateMatrix(),e instanceof a.PerspectiveCamera&&(this._fov0=e.fov,this._fovState=e.fov),this._cameraMatrixState0.copy(e.matrix),this._cameraMatrixState.copy(this._cameraMatrixState0),this._cameraProjectionState.copy(e.projectionMatrix),this._zoom0=e.zoom,this._zoomState=this._zoom0,this._initialNear=e.near,this._nearPos0=e.position.distanceTo(this.target)-e.near,this._nearPos=this._initialNear,this._initialFar=e.far,this._farPos0=e.position.distanceTo(this.target)-e.far,this._farPos=this._initialFar,this._up0.copy(e.up),this._upState.copy(e.up),this.camera=e,this.camera.updateProjectionMatrix();const t=this.calculateTbRadius(e);void 0!==t&&(this._tbRadius=t),this.makeGizmos(this.target,this._tbRadius)}})),Po(this,"makeGizmos",((e,t)=>{const n=new a.EllipseCurve(0,0,t,t).getPoints(this._curvePts),r=(new a.BufferGeometry).setFromPoints(n),i=new a.LineBasicMaterial({color:16744576,fog:!1,transparent:!0,opacity:.6}),s=new a.LineBasicMaterial({color:8454016,fog:!1,transparent:!0,opacity:.6}),o=new a.LineBasicMaterial({color:8421631,fog:!1,transparent:!0,opacity:.6}),l=new a.Line(r,i),c=new a.Line(r,s),h=new a.Line(r,o),u=.5*Math.PI;if(l.rotation.x=u,c.rotation.y=u,this._gizmoMatrixState0.identity().setPosition(e),this._gizmoMatrixState.copy(this._gizmoMatrixState0),this.camera&&1!=this.camera.zoom){const t=1/this.camera.zoom;this._scaleMatrix.makeScale(t,t,t),this._translationMatrix.makeTranslation(-e.x,-e.y,-e.z),this._gizmoMatrixState.premultiply(this._translationMatrix).premultiply(this._scaleMatrix),this._translationMatrix.makeTranslation(e.x,e.y,e.z),this._gizmoMatrixState.premultiply(this._translationMatrix)}this._gizmoMatrixState.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this._gizmos.clear(),this._gizmos.add(l),this._gizmos.add(c),this._gizmos.add(h)})),Po(this,"onFocusAnim",((e,t,n,r)=>{if(-1==this._timeStart&&(this._timeStart=e),this._state==Do.ANIMATION_FOCUS){const i=(e-this._timeStart)/this.focusAnimationTime;if(this._gizmoMatrixState.copy(r),i>=1)this._gizmoMatrixState.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this.focus(t,this.scaleFactor),this._timeStart=-1,this.updateTbState(Do.IDLE,!1),this.activateGizmos(!1),this.dispatchEvent(Oo);else{const e=this.easeOutCubic(i),s=1-e+this.scaleFactor*e;this._gizmoMatrixState.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this.focus(t,s,e),this.dispatchEvent(Oo);const a=this;this._animationId=window.requestAnimationFrame((function(e){a.onFocusAnim(e,t,n,r.clone())}))}}else this._animationId=-1,this._timeStart=-1})),Po(this,"onRotationAnim",((e,t,n)=>{if(-1==this._timeStart&&(this._anglePrev=0,this._angleCurrent=0,this._timeStart=e),this._state==Do.ANIMATION_ROTATE){const r=(e-this._timeStart)/1e3;if(n+-this.dampingFactor*r>0){this._angleCurrent=.5*-this.dampingFactor*Math.pow(r,2)+n*r+0,this.applyTransformMatrix(this.rotate(t,this._angleCurrent)),this.dispatchEvent(Oo);const e=this;this._animationId=window.requestAnimationFrame((function(r){e.onRotationAnim(r,t,n)}))}else this._animationId=-1,this._timeStart=-1,this.updateTbState(Do.IDLE,!1),this.activateGizmos(!1),this.dispatchEvent(Oo)}else this._animationId=-1,this._timeStart=-1,this._state!=Do.ROTATE&&(this.activateGizmos(!1),this.dispatchEvent(Oo))})),Po(this,"pan",((e,t,n=!1)=>{if(this.camera){const r=e.clone().sub(t);if(this.camera instanceof a.OrthographicCamera&&r.multiplyScalar(1/this.camera.zoom),this.camera instanceof a.PerspectiveCamera&&n){this._v3_1.setFromMatrixPosition(this._cameraMatrixState0),this._v3_2.setFromMatrixPosition(this._gizmoMatrixState0);const e=this._v3_1.distanceTo(this._v3_2)/this.camera.position.distanceTo(this._gizmos.position);r.multiplyScalar(1/e)}this._v3_1.set(r.x,r.y,0).applyQuaternion(this.camera.quaternion),this._m4_1.makeTranslation(this._v3_1.x,this._v3_1.y,this._v3_1.z),this.setTransformationMatrices(this._m4_1,this._m4_1)}return Uo})),Po(this,"reset",(()=>{if(this.camera){this.camera.zoom=this._zoom0,this.camera instanceof a.PerspectiveCamera&&(this.camera.fov=this._fov0),this.camera.near=this._nearPos,this.camera.far=this._farPos,this._cameraMatrixState.copy(this._cameraMatrixState0),this._cameraMatrixState.decompose(this.camera.position,this.camera.quaternion,this.camera.scale),this.camera.up.copy(this._up0),this.camera.updateMatrix(),this.camera.updateProjectionMatrix(),this._gizmoMatrixState.copy(this._gizmoMatrixState0),this._gizmoMatrixState0.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this._gizmos.updateMatrix();const e=this.calculateTbRadius(this.camera);void 0!==e&&(this._tbRadius=e),this.makeGizmos(this._gizmos.position,this._tbRadius),this.camera.lookAt(this._gizmos.position),this.updateTbState(Do.IDLE,!1),this.dispatchEvent(Oo)}})),Po(this,"rotate",((e,t)=>{const n=this._gizmos.position;return this._translationMatrix.makeTranslation(-n.x,-n.y,-n.z),this._rotationMatrix.makeRotationAxis(e,-t),this._m4_1.makeTranslation(n.x,n.y,n.z),this._m4_1.multiply(this._rotationMatrix),this._m4_1.multiply(this._translationMatrix),this.setTransformationMatrices(this._m4_1),Uo})),Po(this,"copyState",(()=>{if(this.camera){const e=JSON.stringify(this.camera instanceof a.OrthographicCamera?{arcballState:{cameraFar:this.camera.far,cameraMatrix:this.camera.matrix,cameraNear:this.camera.near,cameraUp:this.camera.up,cameraZoom:this.camera.zoom,gizmoMatrix:this._gizmos.matrix}}:{arcballState:{cameraFar:this.camera.far,cameraFov:this.camera.fov,cameraMatrix:this.camera.matrix,cameraNear:this.camera.near,cameraUp:this.camera.up,cameraZoom:this.camera.zoom,gizmoMatrix:this._gizmos.matrix}});navigator.clipboard.writeText(e)}})),Po(this,"pasteState",(()=>{const e=this;navigator.clipboard.readText().then((function(t){e.setStateFromJSON(t)}))})),Po(this,"saveState",(()=>{this.camera&&(this._cameraMatrixState0.copy(this.camera.matrix),this._gizmoMatrixState0.copy(this._gizmos.matrix),this._nearPos=this.camera.near,this._farPos=this.camera.far,this._zoom0=this.camera.zoom,this._up0.copy(this.camera.up),this.camera instanceof a.PerspectiveCamera&&(this._fov0=this.camera.fov))})),Po(this,"applyScale",((e,t,n=!0)=>{if(!this.camera)return;const r=t.clone();let i=1/e;if(this.camera instanceof a.OrthographicCamera){this.camera.zoom=this._zoomState,this.camera.zoom*=e,this.camera.zoom>this.maxZoom?(this.camera.zoom=this.maxZoom,i=this._zoomState/this.maxZoom):this.camera.zoomthis.maxDistance&&(i=this.maxDistance/e,t=e-e*i);let a=r.clone().sub(this._v3_1).normalize().multiplyScalar(t);if(this._m4_1.makeTranslation(a.x,a.y,a.z),n){const n=this._v3_2;e=n.distanceTo(r),t=e-e*i,a=r.clone().sub(this._v3_2).normalize().multiplyScalar(t),this._translationMatrix.makeTranslation(n.x,n.y,n.z),this._scaleMatrix.makeScale(i,i,i),this._m4_2.makeTranslation(a.x,a.y,a.z).multiply(this._translationMatrix),this._m4_2.multiply(this._scaleMatrix),this._translationMatrix.makeTranslation(-n.x,-n.y,-n.z),this._m4_2.multiply(this._translationMatrix),this.setTransformationMatrices(this._m4_1,this._m4_2)}else this.setTransformationMatrices(this._m4_1);return Uo}})),Po(this,"setFov",(e=>{this.camera instanceof a.PerspectiveCamera&&(this.camera.fov=a.MathUtils.clamp(e,this.minFov,this.maxFov),this.camera.updateProjectionMatrix())})),Po(this,"setTarget",((e,t,n)=>{if(this.camera){this.target.set(e,t,n),this._gizmos.position.set(e,t,n);const r=this.calculateTbRadius(this.camera);void 0!==r&&(this._tbRadius=r),this.makeGizmos(this.target,this._tbRadius),this.camera.lookAt(this.target)}})),Po(this,"zRotate",((e,t)=>(this._rotationMatrix.makeRotationAxis(this._rotationAxis,t),this._translationMatrix.makeTranslation(-e.x,-e.y,-e.z),this._m4_1.makeTranslation(e.x,e.y,e.z),this._m4_1.multiply(this._rotationMatrix),this._m4_1.multiply(this._translationMatrix),this._v3_1.setFromMatrixPosition(this._gizmoMatrixState).sub(e),this._v3_2.copy(this._v3_1).applyAxisAngle(this._rotationAxis,t),this._v3_2.sub(this._v3_1),this._m4_2.makeTranslation(this._v3_2.x,this._v3_2.y,this._v3_2.z),this.setTransformationMatrices(this._m4_1,this._m4_2),Uo))),Po(this,"unprojectOnObj",((e,t)=>{if(!this.scene)return null;const n=new a.Raycaster;n.near=t.near,n.far=t.far,n.setFromCamera(e,t);const r=n.intersectObjects(this.scene.children,!0);for(let i=0;i{if(e instanceof a.OrthographicCamera){this._v2_1.copy(this.getCursorPosition(t,n,r)),this._v3_1.set(this._v2_1.x,this._v2_1.y,0);const e=Math.pow(this._v2_1.x,2),i=Math.pow(this._v2_1.y,2),s=Math.pow(this._tbRadius,2);return e+i<=.5*s?this._v3_1.setZ(Math.sqrt(s-(e+i))):this._v3_1.setZ(.5*s/Math.sqrt(e+i)),this._v3_1}if(e instanceof a.PerspectiveCamera){this._v2_1.copy(this.getCursorNDC(t,n,r)),this._v3_1.set(this._v2_1.x,this._v2_1.y,-1),this._v3_1.applyMatrix4(e.projectionMatrixInverse);const s=this._v3_1.clone().normalize(),o=e.position.distanceTo(this._gizmos.position),l=Math.pow(i,2),c=this._v3_1.z,h=Math.sqrt(Math.pow(this._v3_1.x,2)+Math.pow(this._v3_1.y,2));if(0==h)return s.set(this._v3_1.x,this._v3_1.y,i),s;const u=c/h,d=o;let p=Math.pow(u,2)+1,f=2*u*d,m=Math.pow(d,2)-l,g=Math.pow(f,2)-4*p*m;if(g>=0){this._v2_1.setX((-f-Math.sqrt(g))/(2*p)),this._v2_1.setY(u*this._v2_1.x+d);if(a.MathUtils.RAD2DEG*this._v2_1.angle()>=45){const e=Math.sqrt(Math.pow(this._v2_1.x,2)+Math.pow(o-this._v2_1.y,2));return s.multiplyScalar(e),s.z+=o,s}}p=u,f=d,m=.5*-l,g=Math.pow(f,2)-4*p*m,this._v2_1.setX((-f-Math.sqrt(g))/(2*p)),this._v2_1.setY(u*this._v2_1.x+d);const A=Math.sqrt(Math.pow(this._v2_1.x,2)+Math.pow(o-this._v2_1.y,2));return s.multiplyScalar(A),s.z+=o,s}})),Po(this,"unprojectOnTbPlane",((e,t,n,r,i=!1)=>{if(e instanceof a.OrthographicCamera)return this._v2_1.copy(this.getCursorPosition(t,n,r)),this._v3_1.set(this._v2_1.x,this._v2_1.y,0),this._v3_1.clone();if(e instanceof a.PerspectiveCamera){this._v2_1.copy(this.getCursorNDC(t,n,r)),this._v3_1.set(this._v2_1.x,this._v2_1.y,-1),this._v3_1.applyMatrix4(e.projectionMatrixInverse);const s=this._v3_1.clone().normalize(),a=this._v3_1.z,o=Math.sqrt(Math.pow(this._v3_1.x,2)+Math.pow(this._v3_1.y,2));let l;if(l=i?this._v3_1.setFromMatrixPosition(this._cameraMatrixState0).distanceTo(this._v3_2.setFromMatrixPosition(this._gizmoMatrixState0)):e.position.distanceTo(this._gizmos.position),0==o)return s.set(0,0,0),s;const c=l,h=-c/(a/o),u=Math.sqrt(Math.pow(c,2)+Math.pow(h,2));return s.multiplyScalar(u),s.z=0,s}})),Po(this,"updateMatrixState",(()=>{this.camera&&(this._cameraMatrixState.copy(this.camera.matrix),this._gizmoMatrixState.copy(this._gizmos.matrix),this.camera instanceof a.OrthographicCamera&&(this._cameraProjectionState.copy(this.camera.projectionMatrix),this.camera.updateProjectionMatrix(),this._zoomState=this.camera.zoom),this.camera instanceof a.PerspectiveCamera&&(this._fovState=this.camera.fov))})),Po(this,"updateTbState",((e,t)=>{this._state=e,t&&this.updateMatrixState()})),Po(this,"update",(()=>{const e=1e-6;if(!this.target.equals(this._currentTarget)&&this.camera){this._gizmos.position.set(this.target.x,this.target.y,this.target.z);const e=this.calculateTbRadius(this.camera);void 0!==e&&(this._tbRadius=e),this.makeGizmos(this.target,this._tbRadius),this._currentTarget.copy(this.target)}if(this.camera){if(this.camera instanceof a.OrthographicCamera&&(this.camera.zoom>this.maxZoom||this.camera.zoomthis.maxDistance+e||tthis.maxFov)&&(this.camera.fov=a.MathUtils.clamp(this.camera.fov,this.minFov,this.maxFov),this.camera.updateProjectionMatrix());const n=this._tbRadius,r=this.calculateTbRadius(this.camera);if(void 0!==r&&(this._tbRadius=r),nthis._tbRadius+e){const e=(this._gizmos.scale.x+this._gizmos.scale.y+this._gizmos.scale.z)/3,t=this._tbRadius/e,n=new a.EllipseCurve(0,0,t,t).getPoints(this._curvePts),r=(new a.BufferGeometry).setFromPoints(n);for(const i in this._gizmos.children){this._gizmos.children[i].geometry=r}}}this.camera.lookAt(this._gizmos.position)}})),Po(this,"setStateFromJSON",(e=>{const t=JSON.parse(e);if(t.arcballState&&this.camera){this._cameraMatrixState.fromArray(t.arcballState.cameraMatrix.elements),this._cameraMatrixState.decompose(this.camera.position,this.camera.quaternion,this.camera.scale),this.camera.up.copy(t.arcballState.cameraUp),this.camera.near=t.arcballState.cameraNear,this.camera.far=t.arcballState.cameraFar,this.camera.zoom=t.arcballState.cameraZoom,this.camera instanceof a.PerspectiveCamera&&(this.camera.fov=t.arcballState.cameraFov),this._gizmoMatrixState.fromArray(t.arcballState.gizmoMatrix.elements),this._gizmoMatrixState.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this.camera.updateMatrix(),this.camera.updateProjectionMatrix(),this._gizmos.updateMatrix();const e=this.calculateTbRadius(this.camera);void 0!==e&&(this._tbRadius=e);const n=(new a.Matrix4).copy(this._gizmoMatrixState0);this.makeGizmos(this._gizmos.position,this._tbRadius),this._gizmoMatrixState0.copy(n),this.camera.lookAt(this._gizmos.position),this.updateTbState(Do.IDLE,!1),this.dispatchEvent(Oo)}})),this.camera=null,this.domElement=t,this.scene=n,this.mouseActions=[],this._mouseOp=null,this._v2_1=new a.Vector2,this._v3_1=new a.Vector3,this._v3_2=new a.Vector3,this._m4_1=new a.Matrix4,this._m4_2=new a.Matrix4,this._quat=new a.Quaternion,this._translationMatrix=new a.Matrix4,this._rotationMatrix=new a.Matrix4,this._scaleMatrix=new a.Matrix4,this._rotationAxis=new a.Vector3,this._cameraMatrixState=new a.Matrix4,this._cameraProjectionState=new a.Matrix4,this._fovState=1,this._upState=new a.Vector3,this._zoomState=1,this._nearPos=0,this._farPos=0,this._gizmoMatrixState=new a.Matrix4,this._up0=new a.Vector3,this._zoom0=1,this._fov0=0,this._initialNear=0,this._nearPos0=0,this._initialFar=0,this._farPos0=0,this._cameraMatrixState0=new a.Matrix4,this._gizmoMatrixState0=new a.Matrix4,this._button=-1,this._touchStart=[],this._touchCurrent=[],this._input=Lo.NONE,this._switchSensibility=32,this._startFingerDistance=0,this._currentFingerDistance=0,this._startFingerRotation=0,this._currentFingerRotation=0,this._devPxRatio=0,this._downValid=!0,this._nclicks=0,this._downEvents=[],this._clickStart=0,this._maxDownTime=250,this._maxInterval=300,this._posThreshold=24,this._movementThreshold=24,this._currentCursorPosition=new a.Vector3,this._startCursorPosition=new a.Vector3,this._grid=null,this._gridPosition=new a.Vector3,this._gizmos=new a.Group,this._curvePts=128,this._timeStart=-1,this._animationId=-1,this.focusAnimationTime=500,this._timePrev=0,this._timeCurrent=0,this._anglePrev=0,this._angleCurrent=0,this._cursorPosPrev=new a.Vector3,this._cursorPosCurr=new a.Vector3,this._wPrev=0,this._wCurr=0,this.adjustNearFar=!1,this.scaleFactor=1.1,this.dampingFactor=25,this.wMax=20,this.enableAnimations=!0,this.enableGrid=!1,this.cursorZoom=!1,this.minFov=5,this.maxFov=90,this.enabled=!0,this.enablePan=!0,this.enableRotate=!0,this.enableZoom=!0,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.target=new a.Vector3(0,0,0),this._currentTarget=new a.Vector3(0,0,0),this._tbRadius=1,this._state=Do.IDLE,this.setCamera(e),this.scene&&this.scene.add(this._gizmos),this._devPxRatio=window.devicePixelRatio,this.initializeMouseActions(),this.domElement&&this.connect(this.domElement),window.addEventListener("resize",this.onWindowResize)}applyTransformMatrix(e){if((null==e?void 0:e.camera)&&this.camera&&(this._m4_1.copy(this._cameraMatrixState).premultiply(e.camera),this._m4_1.decompose(this.camera.position,this.camera.quaternion,this.camera.scale),this.camera.updateMatrix(),this._state!=Do.ROTATE&&this._state!=Do.ZROTATE&&this._state!=Do.ANIMATION_ROTATE||this.camera.up.copy(this._upState).applyQuaternion(this.camera.quaternion)),(null==e?void 0:e.gizmos)&&(this._m4_1.copy(this._gizmoMatrixState).premultiply(e.gizmos),this._m4_1.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this._gizmos.updateMatrix()),(this._state==Do.SCALE||this._state==Do.FOCUS||this._state==Do.ANIMATION_FOCUS)&&this.camera){const e=this.calculateTbRadius(this.camera);if(void 0!==e&&(this._tbRadius=e),this.adjustNearFar){const e=this.camera.position.distanceTo(this._gizmos.position),t=new a.Box3;t.setFromObject(this._gizmos);const n=new a.Sphere;t.getBoundingSphere(n);const r=Math.max(this._nearPos0,n.radius+n.center.length()),i=e-this._initialNear,s=Math.min(r,i);this.camera.near=e-s;const o=Math.min(this._farPos0,-n.radius+n.center.length()),l=e-this._initialFar,c=Math.min(o,l);this.camera.far=e-c,this.camera.updateProjectionMatrix()}else{let e=!1;this.camera.near!=this._initialNear&&(this.camera.near=this._initialNear,e=!0),this.camera.far!=this._initialFar&&(this.camera.far=this._initialFar,e=!0),e&&this.camera.updateProjectionMatrix()}}}setGizmosVisible(e){this._gizmos.visible=e,this.dispatchEvent(Oo)}setTransformationMatrices(e=null,t=null){e?Uo.camera?Uo.camera.copy(e):Uo.camera=e.clone():Uo.camera=null,t?Uo.gizmos?Uo.gizmos.copy(t):Uo.gizmos=t.clone():Uo.gizmos=null}}const zo=(0,i.forwardRef)((({camera:e,makeDefault:t,regress:n,domElement:s,onChange:a,onStart:l,onEnd:c,...h},u)=>{const d=(0,o.useThree)((e=>e.invalidate)),p=(0,o.useThree)((e=>e.camera)),f=(0,o.useThree)((e=>e.gl)),m=(0,o.useThree)((e=>e.events)),g=(0,o.useThree)((e=>e.set)),A=(0,o.useThree)((e=>e.get)),v=(0,o.useThree)((e=>e.performance)),y=e||p,x=s||m.connected||f.domElement,b=(0,i.useMemo)((()=>new Go(y)),[y]);return(0,o.useFrame)((()=>{b.enabled&&b.update()})),(0,i.useEffect)((()=>(b.connect(x),()=>{b.dispose()})),[x,n,b,d]),(0,i.useEffect)((()=>{const e=e=>{d(),n&&v.regress(),a&&a(e)};return b.addEventListener("change",e),l&&b.addEventListener("start",l),c&&b.addEventListener("end",c),()=>{b.removeEventListener("change",e),l&&b.removeEventListener("start",l),c&&b.removeEventListener("end",c)}}),[a,l,c]),(0,i.useEffect)((()=>{if(t){const e=A().controls;return g({controls:b}),()=>g({controls:e})}}),[t,b]),i.createElement("primitive",(0,r.c)({ref:u,object:b},h))}));var Qo=n(15080),Vo=n.n(Qo),Ho=Object.defineProperty,jo=(e,t,n)=>(((e,t,n)=>{t in e?Ho(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class Wo extends a.Object3D{constructor(e,t){super(),jo(this,"isTransformControls",!0),jo(this,"visible",!1),jo(this,"domElement"),jo(this,"raycaster",new a.Raycaster),jo(this,"gizmo"),jo(this,"plane"),jo(this,"tempVector",new a.Vector3),jo(this,"tempVector2",new a.Vector3),jo(this,"tempQuaternion",new a.Quaternion),jo(this,"unit",{X:new a.Vector3(1,0,0),Y:new a.Vector3(0,1,0),Z:new a.Vector3(0,0,1)}),jo(this,"pointStart",new a.Vector3),jo(this,"pointEnd",new a.Vector3),jo(this,"offset",new a.Vector3),jo(this,"rotationAxis",new a.Vector3),jo(this,"startNorm",new a.Vector3),jo(this,"endNorm",new a.Vector3),jo(this,"rotationAngle",0),jo(this,"cameraPosition",new a.Vector3),jo(this,"cameraQuaternion",new a.Quaternion),jo(this,"cameraScale",new a.Vector3),jo(this,"parentPosition",new a.Vector3),jo(this,"parentQuaternion",new a.Quaternion),jo(this,"parentQuaternionInv",new a.Quaternion),jo(this,"parentScale",new a.Vector3),jo(this,"worldPositionStart",new a.Vector3),jo(this,"worldQuaternionStart",new a.Quaternion),jo(this,"worldScaleStart",new a.Vector3),jo(this,"worldPosition",new a.Vector3),jo(this,"worldQuaternion",new a.Quaternion),jo(this,"worldQuaternionInv",new a.Quaternion),jo(this,"worldScale",new a.Vector3),jo(this,"eye",new a.Vector3),jo(this,"positionStart",new a.Vector3),jo(this,"quaternionStart",new a.Quaternion),jo(this,"scaleStart",new a.Vector3),jo(this,"camera"),jo(this,"object"),jo(this,"enabled",!0),jo(this,"axis",null),jo(this,"mode","translate"),jo(this,"translationSnap",null),jo(this,"rotationSnap",null),jo(this,"scaleSnap",null),jo(this,"space","world"),jo(this,"size",1),jo(this,"dragging",!1),jo(this,"showX",!0),jo(this,"showY",!0),jo(this,"showZ",!0),jo(this,"changeEvent",{type:"change"}),jo(this,"mouseDownEvent",{type:"mouseDown",mode:this.mode}),jo(this,"mouseUpEvent",{type:"mouseUp",mode:this.mode}),jo(this,"objectChangeEvent",{type:"objectChange"}),jo(this,"intersectObjectWithRay",((e,t,n)=>{const r=t.intersectObject(e,!0);for(let i=0;i(this.object=e,this.visible=!0,this))),jo(this,"detach",(()=>(this.object=void 0,this.visible=!1,this.axis=null,this))),jo(this,"reset",(()=>this.enabled?(this.dragging&&void 0!==this.object&&(this.object.position.copy(this.positionStart),this.object.quaternion.copy(this.quaternionStart),this.object.scale.copy(this.scaleStart),this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent),this.pointStart.copy(this.pointEnd)),this):this)),jo(this,"updateMatrixWorld",(()=>{void 0!==this.object&&(this.object.updateMatrixWorld(),null===this.object.parent?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this.parentPosition,this.parentQuaternion,this.parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this.worldScale),this.parentQuaternionInv.copy(this.parentQuaternion).invert(),this.worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this.cameraScale),this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld()})),jo(this,"pointerHover",(e=>{if(void 0===this.object||!0===this.dragging)return;this.raycaster.setFromCamera(e,this.camera);const t=this.intersectObjectWithRay(this.gizmo.picker[this.mode],this.raycaster);this.axis=t?t.object.name:null})),jo(this,"pointerDown",(e=>{if(void 0!==this.object&&!0!==this.dragging&&0===e.button&&null!==this.axis){this.raycaster.setFromCamera(e,this.camera);const t=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(t){let e=this.space;if("scale"===this.mode?e="local":"E"!==this.axis&&"XYZE"!==this.axis&&"XYZ"!==this.axis||(e="world"),"local"===e&&"rotate"===this.mode){const e=this.rotationSnap;"X"===this.axis&&e&&(this.object.rotation.x=Math.round(this.object.rotation.x/e)*e),"Y"===this.axis&&e&&(this.object.rotation.y=Math.round(this.object.rotation.y/e)*e),"Z"===this.axis&&e&&(this.object.rotation.z=Math.round(this.object.rotation.z/e)*e)}this.object.updateMatrixWorld(),this.object.parent&&this.object.parent.updateMatrixWorld(),this.positionStart.copy(this.object.position),this.quaternionStart.copy(this.object.quaternion),this.scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this.worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)}this.dragging=!0,this.mouseDownEvent.mode=this.mode,this.dispatchEvent(this.mouseDownEvent)}})),jo(this,"pointerMove",(e=>{const t=this.axis,n=this.mode,r=this.object;let i=this.space;if("scale"===n?i="local":"E"!==t&&"XYZE"!==t&&"XYZ"!==t||(i="world"),void 0===r||null===t||!1===this.dragging||-1!==e.button)return;this.raycaster.setFromCamera(e,this.camera);const s=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(s){if(this.pointEnd.copy(s.point).sub(this.worldPositionStart),"translate"===n)this.offset.copy(this.pointEnd).sub(this.pointStart),"local"===i&&"XYZ"!==t&&this.offset.applyQuaternion(this.worldQuaternionInv),-1===t.indexOf("X")&&(this.offset.x=0),-1===t.indexOf("Y")&&(this.offset.y=0),-1===t.indexOf("Z")&&(this.offset.z=0),"local"===i&&"XYZ"!==t?this.offset.applyQuaternion(this.quaternionStart).divide(this.parentScale):this.offset.applyQuaternion(this.parentQuaternionInv).divide(this.parentScale),r.position.copy(this.offset).add(this.positionStart),this.translationSnap&&("local"===i&&(r.position.applyQuaternion(this.tempQuaternion.copy(this.quaternionStart).invert()),-1!==t.search("X")&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),-1!==t.search("Y")&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),-1!==t.search("Z")&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this.quaternionStart)),"world"===i&&(r.parent&&r.position.add(this.tempVector.setFromMatrixPosition(r.parent.matrixWorld)),-1!==t.search("X")&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),-1!==t.search("Y")&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),-1!==t.search("Z")&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(this.tempVector.setFromMatrixPosition(r.parent.matrixWorld))));else if("scale"===n){if(-1!==t.search("XYZ")){let e=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(e*=-1),this.tempVector2.set(e,e,e)}else this.tempVector.copy(this.pointStart),this.tempVector2.copy(this.pointEnd),this.tempVector.applyQuaternion(this.worldQuaternionInv),this.tempVector2.applyQuaternion(this.worldQuaternionInv),this.tempVector2.divide(this.tempVector),-1===t.search("X")&&(this.tempVector2.x=1),-1===t.search("Y")&&(this.tempVector2.y=1),-1===t.search("Z")&&(this.tempVector2.z=1);r.scale.copy(this.scaleStart).multiply(this.tempVector2),this.scaleSnap&&this.object&&(-1!==t.search("X")&&(this.object.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==t.search("Y")&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==t.search("Z")&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if("rotate"===n){this.offset.copy(this.pointEnd).sub(this.pointStart);const e=20/this.worldPosition.distanceTo(this.tempVector.setFromMatrixPosition(this.camera.matrixWorld));"E"===t?(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this.startNorm.copy(this.pointStart).normalize(),this.endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this.endNorm.cross(this.startNorm).dot(this.eye)<0?1:-1):"XYZE"===t?(this.rotationAxis.copy(this.offset).cross(this.eye).normalize(),this.rotationAngle=this.offset.dot(this.tempVector.copy(this.rotationAxis).cross(this.eye))*e):"X"!==t&&"Y"!==t&&"Z"!==t||(this.rotationAxis.copy(this.unit[t]),this.tempVector.copy(this.unit[t]),"local"===i&&this.tempVector.applyQuaternion(this.worldQuaternion),this.rotationAngle=this.offset.dot(this.tempVector.cross(this.eye).normalize())*e),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),"local"===i&&"E"!==t&&"XYZE"!==t?(r.quaternion.copy(this.quaternionStart),r.quaternion.multiply(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this.parentQuaternionInv),r.quaternion.copy(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this.quaternionStart).normalize())}this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent)}})),jo(this,"pointerUp",(e=>{0===e.button&&(this.dragging&&null!==this.axis&&(this.mouseUpEvent.mode=this.mode,this.dispatchEvent(this.mouseUpEvent)),this.dragging=!1,this.axis=null)})),jo(this,"getPointer",(e=>{var t;if(this.domElement&&(null==(t=this.domElement.ownerDocument)?void 0:t.pointerLockElement))return{x:0,y:0,button:e.button};{const t=e.changedTouches?e.changedTouches[0]:e,n=this.domElement.getBoundingClientRect();return{x:(t.clientX-n.left)/n.width*2-1,y:-(t.clientY-n.top)/n.height*2+1,button:e.button}}})),jo(this,"onPointerHover",(e=>{if(this.enabled)switch(e.pointerType){case"mouse":case"pen":this.pointerHover(this.getPointer(e))}})),jo(this,"onPointerDown",(e=>{this.enabled&&this.domElement&&(this.domElement.style.touchAction="none",this.domElement.ownerDocument.addEventListener("pointermove",this.onPointerMove),this.pointerHover(this.getPointer(e)),this.pointerDown(this.getPointer(e)))})),jo(this,"onPointerMove",(e=>{this.enabled&&this.pointerMove(this.getPointer(e))})),jo(this,"onPointerUp",(e=>{this.enabled&&this.domElement&&(this.domElement.style.touchAction="",this.domElement.ownerDocument.removeEventListener("pointermove",this.onPointerMove),this.pointerUp(this.getPointer(e)))})),jo(this,"getMode",(()=>this.mode)),jo(this,"setMode",(e=>{this.mode=e})),jo(this,"setTranslationSnap",(e=>{this.translationSnap=e})),jo(this,"setRotationSnap",(e=>{this.rotationSnap=e})),jo(this,"setScaleSnap",(e=>{this.scaleSnap=e})),jo(this,"setSize",(e=>{this.size=e})),jo(this,"setSpace",(e=>{this.space=e})),jo(this,"update",(()=>{console.warn("THREE.TransformControls: update function has no more functionality and therefore has been deprecated.")})),jo(this,"connect",(e=>{e===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.domElement=e,this.domElement.addEventListener("pointerdown",this.onPointerDown),this.domElement.addEventListener("pointermove",this.onPointerHover),this.domElement.ownerDocument.addEventListener("pointerup",this.onPointerUp)})),jo(this,"dispose",(()=>{var e,t,n,r,i,s;null==(e=this.domElement)||e.removeEventListener("pointerdown",this.onPointerDown),null==(t=this.domElement)||t.removeEventListener("pointermove",this.onPointerHover),null==(r=null==(n=this.domElement)?void 0:n.ownerDocument)||r.removeEventListener("pointermove",this.onPointerMove),null==(s=null==(i=this.domElement)?void 0:i.ownerDocument)||s.removeEventListener("pointerup",this.onPointerUp),this.traverse((e=>{const t=e;t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()}))})),this.domElement=t,this.camera=e,this.gizmo=new Xo,this.add(this.gizmo),this.plane=new Yo,this.add(this.plane);const n=(e,t)=>{let n=t;Object.defineProperty(this,e,{get:function(){return void 0!==n?n:t},set:function(t){n!==t&&(n=t,this.plane[e]=t,this.gizmo[e]=t,this.dispatchEvent({type:e+"-changed",value:t}),this.dispatchEvent(this.changeEvent))}}),this[e]=t,this.plane[e]=t,this.gizmo[e]=t};n("camera",this.camera),n("object",this.object),n("enabled",this.enabled),n("axis",this.axis),n("mode",this.mode),n("translationSnap",this.translationSnap),n("rotationSnap",this.rotationSnap),n("scaleSnap",this.scaleSnap),n("space",this.space),n("size",this.size),n("dragging",this.dragging),n("showX",this.showX),n("showY",this.showY),n("showZ",this.showZ),n("worldPosition",this.worldPosition),n("worldPositionStart",this.worldPositionStart),n("worldQuaternion",this.worldQuaternion),n("worldQuaternionStart",this.worldQuaternionStart),n("cameraPosition",this.cameraPosition),n("cameraQuaternion",this.cameraQuaternion),n("pointStart",this.pointStart),n("pointEnd",this.pointEnd),n("rotationAxis",this.rotationAxis),n("rotationAngle",this.rotationAngle),n("eye",this.eye),void 0!==t&&this.connect(t)}}class Xo extends a.Object3D{constructor(){super(),jo(this,"isTransformControlsGizmo",!0),jo(this,"type","TransformControlsGizmo"),jo(this,"tempVector",new a.Vector3(0,0,0)),jo(this,"tempEuler",new a.Euler),jo(this,"alignVector",new a.Vector3(0,1,0)),jo(this,"zeroVector",new a.Vector3(0,0,0)),jo(this,"lookAtMatrix",new a.Matrix4),jo(this,"tempQuaternion",new a.Quaternion),jo(this,"tempQuaternion2",new a.Quaternion),jo(this,"identityQuaternion",new a.Quaternion),jo(this,"unitX",new a.Vector3(1,0,0)),jo(this,"unitY",new a.Vector3(0,1,0)),jo(this,"unitZ",new a.Vector3(0,0,1)),jo(this,"gizmo"),jo(this,"picker"),jo(this,"helper"),jo(this,"rotationAxis",new a.Vector3),jo(this,"cameraPosition",new a.Vector3),jo(this,"worldPositionStart",new a.Vector3),jo(this,"worldQuaternionStart",new a.Quaternion),jo(this,"worldPosition",new a.Vector3),jo(this,"worldQuaternion",new a.Quaternion),jo(this,"eye",new a.Vector3),jo(this,"camera",null),jo(this,"enabled",!0),jo(this,"axis",null),jo(this,"mode","translate"),jo(this,"space","world"),jo(this,"size",1),jo(this,"dragging",!1),jo(this,"showX",!0),jo(this,"showY",!0),jo(this,"showZ",!0),jo(this,"updateMatrixWorld",(()=>{let e=this.space;"scale"===this.mode&&(e="local");const t="local"===e?this.worldQuaternion:this.identityQuaternion;this.gizmo.translate.visible="translate"===this.mode,this.gizmo.rotate.visible="rotate"===this.mode,this.gizmo.scale.visible="scale"===this.mode,this.helper.translate.visible="translate"===this.mode,this.helper.rotate.visible="rotate"===this.mode,this.helper.scale.visible="scale"===this.mode;let n=[];n=n.concat(this.picker[this.mode].children),n=n.concat(this.gizmo[this.mode].children),n=n.concat(this.helper[this.mode].children);for(let r=0;rn&&(e.scale.set(1e-10,1e-10,1e-10),e.visible=!1),"Y"!==e.name&&"XYZY"!==e.name||Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye))>n&&(e.scale.set(1e-10,1e-10,1e-10),e.visible=!1),"Z"!==e.name&&"XYZZ"!==e.name||Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye))>n&&(e.scale.set(1e-10,1e-10,1e-10),e.visible=!1),"XY"===e.name&&Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye)).9&&(e.visible=!1)),"Y"===this.axis&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,0,Math.PI/2)),e.quaternion.copy(t).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye))>.9&&(e.visible=!1)),"Z"===this.axis&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),e.quaternion.copy(t).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye))>.9&&(e.visible=!1)),"XYZE"===this.axis&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),this.alignVector.copy(this.rotationAxis),e.quaternion.setFromRotationMatrix(this.lookAtMatrix.lookAt(this.zeroVector,this.alignVector,this.unitY)),e.quaternion.multiply(this.tempQuaternion),e.visible=this.dragging),"E"===this.axis&&(e.visible=!1)):"START"===e.name?(e.position.copy(this.worldPositionStart),e.visible=this.dragging):"END"===e.name?(e.position.copy(this.worldPosition),e.visible=this.dragging):"DELTA"===e.name?(e.position.copy(this.worldPositionStart),e.quaternion.copy(this.worldQuaternionStart),this.tempVector.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),this.tempVector.applyQuaternion(this.worldQuaternionStart.clone().invert()),e.scale.copy(this.tempVector),e.visible=this.dragging):(e.quaternion.copy(t),this.dragging?e.position.copy(this.worldPositionStart):e.position.copy(this.worldPosition),this.axis&&(e.visible=-1!==this.axis.search(e.name)))}super.updateMatrixWorld()}));const e=new a.MeshBasicMaterial({depthTest:!1,depthWrite:!1,transparent:!0,side:a.DoubleSide,fog:!1,toneMapped:!1}),t=new a.LineBasicMaterial({depthTest:!1,depthWrite:!1,transparent:!0,linewidth:1,fog:!1,toneMapped:!1}),n=e.clone();n.opacity=.15;const r=e.clone();r.opacity=.33;const i=e.clone();i.color.set(16711680);const s=e.clone();s.color.set(65280);const o=e.clone();o.color.set(255);const l=e.clone();l.opacity=.25;const c=l.clone();c.color.set(16776960);const h=l.clone();h.color.set(65535);const u=l.clone();u.color.set(16711935);e.clone().color.set(16776960);const d=t.clone();d.color.set(16711680);const p=t.clone();p.color.set(65280);const f=t.clone();f.color.set(255);const m=t.clone();m.color.set(65535);const g=t.clone();g.color.set(16711935);const A=t.clone();A.color.set(16776960);const v=t.clone();v.color.set(7895160);const y=A.clone();y.opacity=.25;const x=new a.CylinderGeometry(0,.05,.2,12,1,!1),b=new a.BoxGeometry(.125,.125,.125),E=new a.BufferGeometry;E.setAttribute("position",new a.Float32BufferAttribute([0,0,0,1,0,0],3));const _=(e,t)=>{const n=new a.BufferGeometry,r=[];for(let i=0;i<=64*t;++i)r.push(0,Math.cos(i/32*Math.PI)*e,Math.sin(i/32*Math.PI)*e);return n.setAttribute("position",new a.Float32BufferAttribute(r,3)),n},S={X:[[new a.Mesh(x,i),[1,0,0],[0,0,-Math.PI/2],null,"fwd"],[new a.Mesh(x,i),[1,0,0],[0,0,Math.PI/2],null,"bwd"],[new a.Line(E,d)]],Y:[[new a.Mesh(x,s),[0,1,0],null,null,"fwd"],[new a.Mesh(x,s),[0,1,0],[Math.PI,0,0],null,"bwd"],[new a.Line(E,p),null,[0,0,Math.PI/2]]],Z:[[new a.Mesh(x,o),[0,0,1],[Math.PI/2,0,0],null,"fwd"],[new a.Mesh(x,o),[0,0,1],[-Math.PI/2,0,0],null,"bwd"],[new a.Line(E,f),null,[0,-Math.PI/2,0]]],XYZ:[[new a.Mesh(new a.OctahedronGeometry(.1,0),l.clone()),[0,0,0],[0,0,0]]],XY:[[new a.Mesh(new a.PlaneGeometry(.295,.295),c.clone()),[.15,.15,0]],[new a.Line(E,A),[.18,.3,0],null,[.125,1,1]],[new a.Line(E,A),[.3,.18,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new a.Mesh(new a.PlaneGeometry(.295,.295),h.clone()),[0,.15,.15],[0,Math.PI/2,0]],[new a.Line(E,m),[0,.18,.3],[0,0,Math.PI/2],[.125,1,1]],[new a.Line(E,m),[0,.3,.18],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new a.Mesh(new a.PlaneGeometry(.295,.295),u.clone()),[.15,0,.15],[-Math.PI/2,0,0]],[new a.Line(E,g),[.18,0,.3],null,[.125,1,1]],[new a.Line(E,g),[.3,0,.18],[0,-Math.PI/2,0],[.125,1,1]]]},M={X:[[new a.Mesh(new a.CylinderGeometry(.2,0,1,4,1,!1),n),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new a.Mesh(new a.CylinderGeometry(.2,0,1,4,1,!1),n),[0,.6,0]]],Z:[[new a.Mesh(new a.CylinderGeometry(.2,0,1,4,1,!1),n),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new a.Mesh(new a.OctahedronGeometry(.2,0),n)]],XY:[[new a.Mesh(new a.PlaneGeometry(.4,.4),n),[.2,.2,0]]],YZ:[[new a.Mesh(new a.PlaneGeometry(.4,.4),n),[0,.2,.2],[0,Math.PI/2,0]]],XZ:[[new a.Mesh(new a.PlaneGeometry(.4,.4),n),[.2,0,.2],[-Math.PI/2,0,0]]]},w={START:[[new a.Mesh(new a.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],END:[[new a.Mesh(new a.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],DELTA:[[new a.Line((()=>{const e=new a.BufferGeometry;return e.setAttribute("position",new a.Float32BufferAttribute([0,0,0,1,1,1],3)),e})(),r),null,null,null,"helper"]],X:[[new a.Line(E,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new a.Line(E,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new a.Line(E,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},C={X:[[new a.Line(_(1,.5),d)],[new a.Mesh(new a.OctahedronGeometry(.04,0),i),[0,0,.99],null,[1,3,1]]],Y:[[new a.Line(_(1,.5),p),null,[0,0,-Math.PI/2]],[new a.Mesh(new a.OctahedronGeometry(.04,0),s),[0,0,.99],null,[3,1,1]]],Z:[[new a.Line(_(1,.5),f),null,[0,Math.PI/2,0]],[new a.Mesh(new a.OctahedronGeometry(.04,0),o),[.99,0,0],null,[1,3,1]]],E:[[new a.Line(_(1.25,1),y),null,[0,Math.PI/2,0]],[new a.Mesh(new a.CylinderGeometry(.03,0,.15,4,1,!1),y),[1.17,0,0],[0,0,-Math.PI/2],[1,1,.001]],[new a.Mesh(new a.CylinderGeometry(.03,0,.15,4,1,!1),y),[-1.17,0,0],[0,0,Math.PI/2],[1,1,.001]],[new a.Mesh(new a.CylinderGeometry(.03,0,.15,4,1,!1),y),[0,-1.17,0],[Math.PI,0,0],[1,1,.001]],[new a.Mesh(new a.CylinderGeometry(.03,0,.15,4,1,!1),y),[0,1.17,0],[0,0,0],[1,1,.001]]],XYZE:[[new a.Line(_(1,1),v),null,[0,Math.PI/2,0]]]},T={AXIS:[[new a.Line(E,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},I={X:[[new a.Mesh(new a.TorusGeometry(1,.1,4,24),n),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new a.Mesh(new a.TorusGeometry(1,.1,4,24),n),[0,0,0],[Math.PI/2,0,0]]],Z:[[new a.Mesh(new a.TorusGeometry(1,.1,4,24),n),[0,0,0],[0,0,-Math.PI/2]]],E:[[new a.Mesh(new a.TorusGeometry(1.25,.1,2,24),n)]],XYZE:[[new a.Mesh(new a.SphereGeometry(.7,10,8),n)]]},B={X:[[new a.Mesh(b,i),[.8,0,0],[0,0,-Math.PI/2]],[new a.Line(E,d),null,null,[.8,1,1]]],Y:[[new a.Mesh(b,s),[0,.8,0]],[new a.Line(E,p),null,[0,0,Math.PI/2],[.8,1,1]]],Z:[[new a.Mesh(b,o),[0,0,.8],[Math.PI/2,0,0]],[new a.Line(E,f),null,[0,-Math.PI/2,0],[.8,1,1]]],XY:[[new a.Mesh(b,c),[.85,.85,0],null,[2,2,.2]],[new a.Line(E,A),[.855,.98,0],null,[.125,1,1]],[new a.Line(E,A),[.98,.855,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new a.Mesh(b,h),[0,.85,.85],null,[.2,2,2]],[new a.Line(E,m),[0,.855,.98],[0,0,Math.PI/2],[.125,1,1]],[new a.Line(E,m),[0,.98,.855],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new a.Mesh(b,u),[.85,0,.85],null,[2,.2,2]],[new a.Line(E,g),[.855,0,.98],null,[.125,1,1]],[new a.Line(E,g),[.98,0,.855],[0,-Math.PI/2,0],[.125,1,1]]],XYZX:[[new a.Mesh(new a.BoxGeometry(.125,.125,.125),l.clone()),[1.1,0,0]]],XYZY:[[new a.Mesh(new a.BoxGeometry(.125,.125,.125),l.clone()),[0,1.1,0]]],XYZZ:[[new a.Mesh(new a.BoxGeometry(.125,.125,.125),l.clone()),[0,0,1.1]]]},R={X:[[new a.Mesh(new a.CylinderGeometry(.2,0,.8,4,1,!1),n),[.5,0,0],[0,0,-Math.PI/2]]],Y:[[new a.Mesh(new a.CylinderGeometry(.2,0,.8,4,1,!1),n),[0,.5,0]]],Z:[[new a.Mesh(new a.CylinderGeometry(.2,0,.8,4,1,!1),n),[0,0,.5],[Math.PI/2,0,0]]],XY:[[new a.Mesh(b,n),[.85,.85,0],null,[3,3,.2]]],YZ:[[new a.Mesh(b,n),[0,.85,.85],null,[.2,3,3]]],XZ:[[new a.Mesh(b,n),[.85,0,.85],null,[3,.2,3]]],XYZX:[[new a.Mesh(new a.BoxGeometry(.2,.2,.2),n),[1.1,0,0]]],XYZY:[[new a.Mesh(new a.BoxGeometry(.2,.2,.2),n),[0,1.1,0]]],XYZZ:[[new a.Mesh(new a.BoxGeometry(.2,.2,.2),n),[0,0,1.1]]]},P={X:[[new a.Line(E,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new a.Line(E,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new a.Line(E,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},D=e=>{const t=new a.Object3D;for(let n in e)for(let r=e[n].length;r--;){const i=e[n][r][0].clone(),s=e[n][r][1],a=e[n][r][2],o=e[n][r][3],l=e[n][r][4];i.name=n,i.tag=l,s&&i.position.set(s[0],s[1],s[2]),a&&i.rotation.set(a[0],a[1],a[2]),o&&i.scale.set(o[0],o[1],o[2]),i.updateMatrix();const c=i.geometry.clone();c.applyMatrix4(i.matrix),i.geometry=c,i.renderOrder=1/0,i.position.set(0,0,0),i.rotation.set(0,0,0),i.scale.set(1,1,1),t.add(i)}return t};this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=D(S)),this.add(this.gizmo.rotate=D(C)),this.add(this.gizmo.scale=D(B)),this.add(this.picker.translate=D(M)),this.add(this.picker.rotate=D(I)),this.add(this.picker.scale=D(R)),this.add(this.helper.translate=D(w)),this.add(this.helper.rotate=D(T)),this.add(this.helper.scale=D(P)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}}class Yo extends a.Mesh{constructor(){super(new a.PlaneGeometry(1e5,1e5,2,2),new a.MeshBasicMaterial({visible:!1,wireframe:!0,side:a.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),jo(this,"isTransformControlsPlane",!0),jo(this,"type","TransformControlsPlane"),jo(this,"unitX",new a.Vector3(1,0,0)),jo(this,"unitY",new a.Vector3(0,1,0)),jo(this,"unitZ",new a.Vector3(0,0,1)),jo(this,"tempVector",new a.Vector3),jo(this,"dirVector",new a.Vector3),jo(this,"alignVector",new a.Vector3),jo(this,"tempMatrix",new a.Matrix4),jo(this,"identityQuaternion",new a.Quaternion),jo(this,"cameraQuaternion",new a.Quaternion),jo(this,"worldPosition",new a.Vector3),jo(this,"worldQuaternion",new a.Quaternion),jo(this,"eye",new a.Vector3),jo(this,"axis",null),jo(this,"mode","translate"),jo(this,"space","world"),jo(this,"updateMatrixWorld",(()=>{let e=this.space;switch(this.position.copy(this.worldPosition),"scale"===this.mode&&(e="local"),this.unitX.set(1,0,0).applyQuaternion("local"===e?this.worldQuaternion:this.identityQuaternion),this.unitY.set(0,1,0).applyQuaternion("local"===e?this.worldQuaternion:this.identityQuaternion),this.unitZ.set(0,0,1).applyQuaternion("local"===e?this.worldQuaternion:this.identityQuaternion),this.alignVector.copy(this.unitY),this.mode){case"translate":case"scale":switch(this.axis){case"X":this.alignVector.copy(this.eye).cross(this.unitX),this.dirVector.copy(this.unitX).cross(this.alignVector);break;case"Y":this.alignVector.copy(this.eye).cross(this.unitY),this.dirVector.copy(this.unitY).cross(this.alignVector);break;case"Z":this.alignVector.copy(this.eye).cross(this.unitZ),this.dirVector.copy(this.unitZ).cross(this.alignVector);break;case"XY":this.dirVector.copy(this.unitZ);break;case"YZ":this.dirVector.copy(this.unitX);break;case"XZ":this.alignVector.copy(this.unitZ),this.dirVector.copy(this.unitY);break;case"XYZ":case"E":this.dirVector.set(0,0,0)}break;default:this.dirVector.set(0,0,0)}0===this.dirVector.length()?this.quaternion.copy(this.cameraQuaternion):(this.tempMatrix.lookAt(this.tempVector.set(0,0,0),this.dirVector,this.alignVector),this.quaternion.setFromRotationMatrix(this.tempMatrix)),super.updateMatrixWorld()}))}}const qo=i.forwardRef((({children:e,domElement:t,onChange:n,onMouseDown:s,onMouseUp:l,onObjectChange:c,object:h,...u},d)=>{const p=["enabled","axis","mode","translationSnap","rotationSnap","scaleSnap","space","size","showX","showY","showZ"],{camera:f,...m}=u,g=to()(m,p),A=Vo()(m,p),v=(0,o.useThree)((e=>e.controls)),y=(0,o.useThree)((e=>e.gl)),x=(0,o.useThree)((e=>e.events)),b=(0,o.useThree)((e=>e.camera)),E=(0,o.useThree)((e=>e.invalidate)),_=f||b,S=t||x.connected||y.domElement,M=i.useMemo((()=>new Wo(_,S)),[_,S]),w=i.useRef();return i.useLayoutEffect((()=>(h?M.attach(h instanceof a.Object3D?h:h.current):w.current instanceof a.Object3D&&M.attach(w.current),()=>{M.detach()})),[h,e,M]),i.useEffect((()=>{if(v){const e=e=>v.enabled=!e.value;return M.addEventListener("dragging-changed",e),()=>M.removeEventListener("dragging-changed",e)}}),[M,v]),i.useEffect((()=>{const e=e=>{E(),n&&n(e)};return null==M||null==M.addEventListener||M.addEventListener("change",e),s&&(null==M||null==M.addEventListener||M.addEventListener("mouseDown",s)),l&&(null==M||null==M.addEventListener||M.addEventListener("mouseUp",l)),c&&(null==M||null==M.addEventListener||M.addEventListener("objectChange",c)),()=>{null==M||null==M.removeEventListener||M.removeEventListener("change",e),s&&(null==M||null==M.removeEventListener||M.removeEventListener("mouseDown",s)),l&&(null==M||null==M.removeEventListener||M.removeEventListener("mouseUp",l)),c&&(null==M||null==M.removeEventListener||M.removeEventListener("objectChange",c))}}),[n,s,l,c,M,E]),M?i.createElement(i.Fragment,null,i.createElement("primitive",(0,r.c)({ref:d,dispose:void 0,object:M},g)),i.createElement("group",(0,r.c)({ref:w},A),e)):null}));var Ko=Object.defineProperty,Jo=(e,t,n)=>(((e,t,n)=>{t in e?Ko(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const Zo=new a.Euler(0,0,0,"YXZ"),$o=new a.Vector3,el={type:"change"},tl={type:"lock"},nl={type:"unlock"},rl=Math.PI/2;class il extends a.EventDispatcher{constructor(e,t){super(),Jo(this,"camera"),Jo(this,"domElement"),Jo(this,"isLocked"),Jo(this,"minPolarAngle"),Jo(this,"maxPolarAngle"),Jo(this,"pointerSpeed"),Jo(this,"onMouseMove",(e=>{if(!this.domElement||!1===this.isLocked)return;const t=e.movementX||e.mozMovementX||e.webkitMovementX||0,n=e.movementY||e.mozMovementY||e.webkitMovementY||0;Zo.setFromQuaternion(this.camera.quaternion),Zo.y-=.002*t*this.pointerSpeed,Zo.x-=.002*n*this.pointerSpeed,Zo.x=Math.max(rl-this.maxPolarAngle,Math.min(rl-this.minPolarAngle,Zo.x)),this.camera.quaternion.setFromEuler(Zo),this.dispatchEvent(el)})),Jo(this,"onPointerlockChange",(()=>{this.domElement&&(this.domElement.ownerDocument.pointerLockElement===this.domElement?(this.dispatchEvent(tl),this.isLocked=!0):(this.dispatchEvent(nl),this.isLocked=!1))})),Jo(this,"onPointerlockError",(()=>{console.error("THREE.PointerLockControls: Unable to use Pointer Lock API")})),Jo(this,"connect",(e=>{this.domElement=e||this.domElement,this.domElement&&(this.domElement.ownerDocument.addEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.addEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.addEventListener("pointerlockerror",this.onPointerlockError))})),Jo(this,"disconnect",(()=>{this.domElement&&(this.domElement.ownerDocument.removeEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.removeEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.removeEventListener("pointerlockerror",this.onPointerlockError))})),Jo(this,"dispose",(()=>{this.disconnect()})),Jo(this,"getObject",(()=>this.camera)),Jo(this,"direction",new a.Vector3(0,0,-1)),Jo(this,"getDirection",(e=>e.copy(this.direction).applyQuaternion(this.camera.quaternion))),Jo(this,"moveForward",(e=>{$o.setFromMatrixColumn(this.camera.matrix,0),$o.crossVectors(this.camera.up,$o),this.camera.position.addScaledVector($o,e)})),Jo(this,"moveRight",(e=>{$o.setFromMatrixColumn(this.camera.matrix,0),this.camera.position.addScaledVector($o,e)})),Jo(this,"lock",(()=>{this.domElement&&this.domElement.requestPointerLock()})),Jo(this,"unlock",(()=>{this.domElement&&this.domElement.ownerDocument.exitPointerLock()})),this.camera=e,this.domElement=t,this.isLocked=!1,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.pointerSpeed=1,t&&this.connect(t)}}const sl=i.forwardRef((({domElement:e,selector:t,onChange:n,onLock:s,onUnlock:a,enabled:l=!0,...c},h)=>{const{camera:u,...d}=c,p=(0,o.useThree)((({gl:e})=>e)),f=(0,o.useThree)((e=>e.camera)),m=(0,o.useThree)((e=>e.invalidate)),g=(0,o.useThree)((e=>e.raycaster)),A=(0,o.useThree)((e=>e.events)),v=u||f,y=e||A.connected||p.domElement,[x]=i.useState((()=>new il(v)));return i.useEffect((()=>{if(l){x.connect(y);const e=g.computeOffsets;return g.computeOffsets=e=>({offsetX:e.target.width/2,offsetY:e.target.height/2}),()=>{x.disconnect(),g.computeOffsets=e}}}),[l,x]),i.useEffect((()=>{const e=e=>{m(),n&&n(e)};x.addEventListener("change",e),s&&x.addEventListener("lock",s),a&&x.addEventListener("unlock",a);const r=()=>x.lock(),i=t?Array.from(document.querySelectorAll(t)):[document];return i.forEach((e=>e&&e.addEventListener("click",r))),()=>{x.removeEventListener("change",e),s&&x.addEventListener("lock",s),a&&x.addEventListener("unlock",a),i.forEach((e=>e?e.removeEventListener("click",r):void 0))}}),[n,s,a,t]),i.createElement("primitive",(0,r.c)({ref:h,object:x},d))}));var al=Object.defineProperty,ol=(e,t,n)=>(((e,t,n)=>{t in e?al(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const ll=new a.Vector3;class cl extends a.EventDispatcher{constructor(e,t){super(),ol(this,"object"),ol(this,"domElement"),ol(this,"enabled",!0),ol(this,"movementSpeed",1),ol(this,"lookSpeed",.005),ol(this,"lookVertical",!0),ol(this,"autoForward",!1),ol(this,"activeLook",!0),ol(this,"heightSpeed",!1),ol(this,"heightCoef",1),ol(this,"heightMin",0),ol(this,"heightMax",1),ol(this,"constrainVertical",!1),ol(this,"verticalMin",0),ol(this,"verticalMax",Math.PI),ol(this,"mouseDragOn",!1),ol(this,"autoSpeedFactor",0),ol(this,"mouseX",0),ol(this,"mouseY",0),ol(this,"moveForward",!1),ol(this,"moveBackward",!1),ol(this,"moveLeft",!1),ol(this,"moveRight",!1),ol(this,"moveUp",!1),ol(this,"moveDown",!1),ol(this,"viewHalfX",0),ol(this,"viewHalfY",0),ol(this,"lat",0),ol(this,"lon",0),ol(this,"lookDirection",new a.Vector3),ol(this,"spherical",new a.Spherical),ol(this,"target",new a.Vector3),ol(this,"connect",(e=>{e.setAttribute("tabindex","-1"),e.style.touchAction="none",e.addEventListener("contextmenu",this.contextmenu),e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),this.domElement=e,window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp),this.handleResize()})),ol(this,"dispose",(()=>{var e,t,n,r;null==(e=this.domElement)||e.removeEventListener("contextmenu",this.contextmenu),null==(t=this.domElement)||t.removeEventListener("mousedown",this.onMouseDown),null==(n=this.domElement)||n.removeEventListener("mousemove",this.onMouseMove),null==(r=this.domElement)||r.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)})),ol(this,"handleResize",(()=>{this.domElement&&(this.viewHalfX=this.domElement.offsetWidth/2,this.viewHalfY=this.domElement.offsetHeight/2)})),ol(this,"onMouseDown",(e=>{var t;if(null==(t=this.domElement)||t.focus(),this.activeLook)switch(e.button){case 0:this.moveForward=!0;break;case 2:this.moveBackward=!0}this.mouseDragOn=!0})),ol(this,"onMouseUp",(e=>{if(this.activeLook)switch(e.button){case 0:this.moveForward=!1;break;case 2:this.moveBackward=!1}this.mouseDragOn=!1})),ol(this,"onMouseMove",(e=>{this.domElement&&(this.mouseX=e.pageX-this.domElement.offsetLeft-this.viewHalfX,this.mouseY=e.pageY-this.domElement.offsetTop-this.viewHalfY)})),ol(this,"onKeyDown",(e=>{switch(e.code){case"ArrowUp":case"KeyW":this.moveForward=!0;break;case"ArrowLeft":case"KeyA":this.moveLeft=!0;break;case"ArrowDown":case"KeyS":this.moveBackward=!0;break;case"ArrowRight":case"KeyD":this.moveRight=!0;break;case"KeyR":this.moveUp=!0;break;case"KeyF":this.moveDown=!0}})),ol(this,"onKeyUp",(e=>{switch(e.code){case"ArrowUp":case"KeyW":this.moveForward=!1;break;case"ArrowLeft":case"KeyA":this.moveLeft=!1;break;case"ArrowDown":case"KeyS":this.moveBackward=!1;break;case"ArrowRight":case"KeyD":this.moveRight=!1;break;case"KeyR":this.moveUp=!1;break;case"KeyF":this.moveDown=!1}})),ol(this,"lookAt",((e,t,n)=>(e instanceof a.Vector3?this.target.copy(e):t&&n&&this.target.set(e,t,n),this.object.lookAt(this.target),this.setOrientation(),this))),ol(this,"update",(e=>{if(!this.enabled)return;if(this.heightSpeed){const t=a.MathUtils.clamp(this.object.position.y,this.heightMin,this.heightMax)-this.heightMin;this.autoSpeedFactor=e*(t*this.heightCoef)}else this.autoSpeedFactor=0;const t=e*this.movementSpeed;(this.moveForward||this.autoForward&&!this.moveBackward)&&this.object.translateZ(-(t+this.autoSpeedFactor)),this.moveBackward&&this.object.translateZ(t),this.moveLeft&&this.object.translateX(-t),this.moveRight&&this.object.translateX(t),this.moveUp&&this.object.translateY(t),this.moveDown&&this.object.translateY(-t);let n=e*this.lookSpeed;this.activeLook||(n=0);let r=1;this.constrainVertical&&(r=Math.PI/(this.verticalMax-this.verticalMin)),this.lon-=this.mouseX*n,this.lookVertical&&(this.lat-=this.mouseY*n*r),this.lat=Math.max(-85,Math.min(85,this.lat));let i=a.MathUtils.degToRad(90-this.lat);const s=a.MathUtils.degToRad(this.lon);this.constrainVertical&&(i=a.MathUtils.mapLinear(i,0,Math.PI,this.verticalMin,this.verticalMax));const o=this.object.position;ll.setFromSphericalCoords(1,i,s).add(o),this.object.lookAt(ll)})),ol(this,"contextmenu",(e=>e.preventDefault())),ol(this,"setOrientation",(()=>{this.lookDirection.set(0,0,-1).applyQuaternion(this.object.quaternion),this.spherical.setFromVector3(this.lookDirection),this.lat=90-a.MathUtils.radToDeg(this.spherical.phi),this.lon=a.MathUtils.radToDeg(this.spherical.theta)})),this.object=e,this.domElement=t,this.setOrientation(),t&&this.connect(t)}}const hl=i.forwardRef(((e,t)=>{const n=(0,o.useThree)((e=>e.camera)),s=(0,o.useThree)((e=>e.gl)),[a]=i.useState((()=>new cl(n,s.domElement)));return(0,o.useFrame)(((e,t)=>{a.update(t)})),a?i.createElement("primitive",(0,r.c)({ref:t,object:a},e)):null}));function ul(e,t){const n=(0,o.useThree)((e=>e.mouse)),[r]=i.useState((()=>{const r=new a.Raycaster;return t&&(0,o.applyProps)(r,t,{}),function(t,i){r.setFromCamera(n,e instanceof a.Camera?e:e.current);const s=this.constructor.prototype.raycast.bind(this);s&&s(r,i)}}));return r}const dl=i.createContext({}),pl=()=>i.useContext(dl),fl=2*Math.PI,ml=new a.Object3D,gl=new a.Matrix4,[Al,vl]=[new a.Quaternion,new a.Quaternion],yl=new a.Vector3,xl=new a.Vector3,bl=({alignment:e="bottom-right",margin:t=[80,80],renderPriority:n=0,autoClear:r=!0,onUpdate:s,onTarget:l,children:c})=>{const h=(0,o.useThree)((({size:e})=>e)),u=(0,o.useThree)((({camera:e})=>e)),d=(0,o.useThree)((({controls:e})=>e)),p=(0,o.useThree)((({gl:e})=>e)),f=(0,o.useThree)((({scene:e})=>e)),m=(0,o.useThree)((({invalidate:e})=>e)),g=i.useRef(),A=i.useRef(),v=i.useRef(null),[y]=i.useState((()=>new a.Scene)),x=i.useRef(!1),b=i.useRef(0),E=i.useRef(new a.Vector3(0,0,0)),_=i.useCallback((e=>{x.current=!0,(d||l)&&(E.current=(null==d?void 0:d.target)||(null==l?void 0:l())),b.current=u.position.distanceTo(yl),Al.copy(u.quaternion),xl.copy(e).multiplyScalar(b.current).add(yl),ml.lookAt(xl),vl.copy(ml.quaternion),m()}),[d,u,l,m]);i.useEffect((()=>(f.background&&(g.current=f.background,f.background=null,y.background=g.current),()=>{g.current&&(f.background=g.current)})),[]),(0,o.useFrame)(((e,t)=>{if(v.current&&A.current){var n;if(x.current)if(Al.angleTo(vl)<.01)x.current=!1;else{const e=t*fl;Al.rotateTowards(vl,e),u.position.set(0,0,1).applyQuaternion(Al).multiplyScalar(b.current).add(E.current),u.up.set(0,1,0).applyQuaternion(Al).normalize(),u.quaternion.copy(Al),s?s():d&&d.update(),m()}gl.copy(u.matrix).invert(),null==(n=A.current)||n.quaternion.setFromRotationMatrix(gl),r&&(p.autoClear=!1),p.clearDepth(),p.render(y,v.current)}}),n);const S=ul(v),M=i.useMemo((()=>({tweenCamera:_,raycast:S})),[_]),[w,C]=t,T=e.endsWith("-left")?-h.width/2+w:h.width/2-w,I=e.startsWith("top-")?h.height/2-C:-h.height/2+C;return(0,o.createPortal)(i.createElement(dl.Provider,{value:M},i.createElement(io,{ref:v,position:[0,0,200]}),i.createElement("group",{ref:A,position:[T,I,0]},c)),y)},El="#f0f0f0",_l="#999",Sl="black",Ml="black",wl=["Right","Left","Top","Bottom","Front","Back"],Cl=e=>new a.Vector3(...e).multiplyScalar(.38),Tl=[[1,1,1],[1,1,-1],[1,-1,1],[1,-1,-1],[-1,1,1],[-1,1,-1],[-1,-1,1],[-1,-1,-1]].map(Cl),Il=[.25,.25,.25],Bl=[[1,1,0],[1,0,1],[1,0,-1],[1,-1,0],[0,1,1],[0,1,-1],[0,-1,1],[0,-1,-1],[-1,1,0],[-1,0,1],[-1,0,-1],[-1,-1,0]].map(Cl),Rl=Bl.map((e=>e.toArray().map((e=>0==e?.5:.25)))),Pl=({hover:e,index:t,font:n="20px Inter var, Arial, sans-serif",faces:r=wl,color:s=El,hoverColor:l=_l,textColor:c=Sl,strokeColor:h=Ml,opacity:u=1})=>{const d=(0,o.useThree)((e=>e.gl)),p=i.useMemo((()=>{const e=document.createElement("canvas");e.width=128,e.height=128;const i=e.getContext("2d");return i.fillStyle=s,i.fillRect(0,0,e.width,e.height),i.strokeStyle=h,i.strokeRect(0,0,e.width,e.height),i.font=n,i.textAlign="center",i.fillStyle=c,i.fillText(r[t].toUpperCase(),64,76),new a.CanvasTexture(e)}),[t,r,n,s,c,h]);return i.createElement("meshLambertMaterial",{map:p,"map-anisotropy":d.capabilities.getMaxAnisotropy()||1,attachArray:"material",color:e?l:"white",transparent:!0,opacity:u})},Dl=e=>{const{tweenCamera:t,raycast:n}=pl(),[s,a]=i.useState(null);return i.createElement("mesh",{raycast:n,onPointerOut:e=>{e.stopPropagation(),a(null)},onPointerMove:e=>{e.stopPropagation(),a(Math.floor(e.faceIndex/2))},onClick:e.onClick||(e=>{e.stopPropagation(),t(e.face.normal)})},[...Array(6)].map(((t,n)=>i.createElement(Pl,(0,r.c)({key:n,index:n,hover:s===n},e)))),i.createElement("boxGeometry",null))},Ll=({onClick:e,dimensions:t,position:n,hoverColor:r=_l})=>{const{tweenCamera:s,raycast:a}=pl(),[o,l]=i.useState(!1);return i.createElement("mesh",{scale:1.01,position:n,raycast:a,onPointerOver:e=>{e.stopPropagation(),l(!0)},onPointerOut:e=>{e.stopPropagation(),l(!1)},onClick:e||(e=>{e.stopPropagation(),s(n)})},i.createElement("meshBasicMaterial",{color:o?r:"white",transparent:!0,opacity:.6,visible:o}),i.createElement("boxGeometry",{args:t}))},Fl=e=>i.createElement("group",{scale:[60,60,60]},i.createElement(Dl,e),Bl.map(((t,n)=>i.createElement(Ll,(0,r.c)({key:n,position:t,dimensions:Rl[n]},e)))),Tl.map(((t,n)=>i.createElement(Ll,(0,r.c)({key:n,position:t,dimensions:Il},e)))),i.createElement("ambientLight",{intensity:.5}),i.createElement("pointLight",{position:[10,10,10],intensity:.5}));function Ul({scale:e=[.8,.05,.05],color:t,rotation:n}){return i.createElement("group",{rotation:n},i.createElement("mesh",{position:[.4,0,0]},i.createElement("boxGeometry",{args:e}),i.createElement("meshBasicMaterial",{color:t,toneMapped:!1})))}function Ol({onClick:e,font:t,disabled:n,arcStyle:s,label:l,labelColor:c,axisHeadScale:h=1,...u}){const d=(0,o.useThree)((e=>e.gl)),p=i.useMemo((()=>{const e=document.createElement("canvas");e.width=64,e.height=64;const n=e.getContext("2d");return n.beginPath(),n.arc(32,32,16,0,2*Math.PI),n.closePath(),n.fillStyle=s,n.fill(),l&&(n.font=t,n.textAlign="center",n.fillStyle=c,n.fillText(l,32,41)),new a.CanvasTexture(e)}),[s,l,c,t]),[f,m]=i.useState(!1),g=(l?1:.75)*(f?1.2:1)*h;return i.createElement("sprite",(0,r.c)({scale:g,onPointerOver:n?void 0:e=>{e.stopPropagation(),m(!0)},onPointerOut:n?void 0:e||(e=>{e.stopPropagation(),m(!1)})},u),i.createElement("spriteMaterial",{map:p,"map-anisotropy":d.capabilities.getMaxAnisotropy()||1,alphaTest:.3,opacity:l?1:.75,toneMapped:!1}))}const Nl=({hideNegativeAxes:e,hideAxisHeads:t,disabled:n,font:s="18px Inter var, Arial, sans-serif",axisColors:a=["#ff3653","#0adb50","#2c8fdf"],axisHeadScale:o=1,axisScale:l,labels:c=["X","Y","Z"],labelColor:h="#000",onClick:u,...d})=>{const[p,f,m]=a,{tweenCamera:g,raycast:A}=pl(),v={font:s,disabled:n,labelColor:h,raycast:A,onClick:u,axisHeadScale:o,onPointerDown:n?void 0:e=>{g(e.object.position),e.stopPropagation()}};return i.createElement("group",(0,r.c)({scale:40},d),i.createElement(Ul,{color:p,rotation:[0,0,0],scale:l}),i.createElement(Ul,{color:f,rotation:[0,0,Math.PI/2],scale:l}),i.createElement(Ul,{color:m,rotation:[0,-Math.PI/2,0],scale:l}),!t&&i.createElement(i.Fragment,null,i.createElement(Ol,(0,r.c)({arcStyle:p,position:[1,0,0],label:c[0]},v)),i.createElement(Ol,(0,r.c)({arcStyle:f,position:[0,1,0],label:c[1]},v)),i.createElement(Ol,(0,r.c)({arcStyle:m,position:[0,0,1],label:c[2]},v)),!e&&i.createElement(i.Fragment,null,i.createElement(Ol,(0,r.c)({arcStyle:p,position:[-1,0,0]},v)),i.createElement(Ol,(0,r.c)({arcStyle:f,position:[0,-1,0]},v)),i.createElement(Ol,(0,r.c)({arcStyle:m,position:[0,0,-1]},v)))),i.createElement("ambientLight",{intensity:.5}),i.createElement("pointLight",{position:[10,10,10],intensity:.5}))};function kl(e,{path:t}){const[n]=(0,o.useLoader)(a.CubeTextureLoader,[e],(e=>e.setPath(t)));return n}kl.preload=(e,{path:t})=>o.useLoader.preload(a.CubeTextureLoader,[e],(e=>e.setPath(t)));var Gl=Uint8Array,zl=Uint16Array,Ql=Uint32Array,Vl=new Gl([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Hl=new Gl([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),jl=new Gl([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Wl=function(e,t){for(var n=new zl(31),r=0;r<31;++r)n[r]=t+=1<>>1|(21845&$l)<<1;ec=(61680&(ec=(52428&ec)>>>2|(13107&ec)<<2))>>>4|(3855&ec)<<4,Zl[$l]=((65280&ec)>>>8|(255&ec)<<8)>>>1}var tc=function(e,t,n){for(var r=e.length,i=0,s=new zl(t);i>>l]=c}else for(a=new zl(r),i=0;i>>15-e[i]);return a},nc=new Gl(288);for($l=0;$l<144;++$l)nc[$l]=8;for($l=144;$l<256;++$l)nc[$l]=9;for($l=256;$l<280;++$l)nc[$l]=7;for($l=280;$l<288;++$l)nc[$l]=8;var rc=new Gl(32);for($l=0;$l<32;++$l)rc[$l]=5;var ic=tc(nc,9,1),sc=tc(rc,5,1),ac=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},oc=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},lc=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},cc=function(e){return(e/8|0)+(7&e&&1)},hc=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof zl?zl:e instanceof Ql?Ql:Gl)(n-t);return r.set(e.subarray(t,n)),r},uc=function(e,t,n){var r=e.length;if(!r||n&&!n.l&&r<5)return t||new Gl(0);var i=!t||n,s=!n||n.i;n||(n={}),t||(t=new Gl(3*r));var a=function(e){var n=t.length;if(e>n){var r=new Gl(Math.max(2*n,e));r.set(t),t=r}},o=n.f||0,l=n.p||0,c=n.b||0,h=n.l,u=n.d,d=n.m,p=n.n,f=8*r;do{if(!h){n.f=o=oc(e,l,1);var m=oc(e,l+1,3);if(l+=3,!m){var g=e[(C=cc(l)+4)-4]|e[C-3]<<8,A=C+g;if(A>r){if(s)throw"unexpected EOF";break}i&&a(c+g),t.set(e.subarray(C,A),c),n.b=c+=g,n.p=l=8*A;continue}if(1==m)h=ic,u=sc,d=9,p=5;else{if(2!=m)throw"invalid block type";var v=oc(e,l,31)+257,y=oc(e,l+10,15)+4,x=v+oc(e,l+5,31)+1;l+=14;for(var b=new Gl(x),E=new Gl(19),_=0;_>>4)<16)b[_++]=C;else{var I=0,B=0;for(16==C?(B=3+oc(e,l,3),l+=2,I=b[_-1]):17==C?(B=3+oc(e,l,7),l+=3):18==C&&(B=11+oc(e,l,127),l+=7);B--;)b[_++]=I}}var R=b.subarray(0,v),P=b.subarray(v);d=ac(R),p=ac(P),h=tc(R,d,1),u=tc(P,p,1)}if(l>f){if(s)throw"unexpected EOF";break}}i&&a(c+131072);for(var D=(1<>>4;if((l+=15&I)>f){if(s)throw"unexpected EOF";break}if(!I)throw"invalid length/literal";if(U<256)t[c++]=U;else{if(256==U){F=l,h=null;break}var O=U-254;if(U>264){var N=Vl[_=U-257];O=oc(e,l,(1<>>4;if(!k)throw"invalid distance";l+=15&k;P=Jl[G];if(G>3){N=Hl[G];P+=lc(e,l)&(1<f){if(s)throw"unexpected EOF";break}i&&a(c+131072);for(var z=c+O;c>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"};function fc(e,t){return uc((pc(e),e.subarray(2,-4)),t)}var mc="undefined"!=typeof TextDecoder&&new TextDecoder;try{mc.decode(dc,{stream:!0}),1}catch(za){}function gc(e,t,n){const r=n.length-e-1;if(t>=n[r])return r-1;if(t<=n[e])return e;let i=e,s=r,a=Math.floor((i+s)/2);for(;t=n[a+1];)t=s&&(i[t][0]=i[e][0]/o[c+1][l],r=i[t][0]*o[l][c]);const h=u-1<=c?s-1:n-u;for(let n=l>=-1?1:-l;n<=h;++n)i[t][n]=(i[e][n]-i[e][n-1])/o[c+1][l+n],r+=i[t][n]*o[l+n][c];u<=c&&(i[t][s]=-i[e][s-1]/o[c+1][u],r+=i[t][s]*o[u][c]),a[s][u]=r;const d=e;e=t,t=d}}let h=n;for(let u=1;u<=r;++u){for(let e=0;e<=n;++e)a[u][e]*=h;h*=n-u}return a}(l,r,e,s,t),h=[];for(let a=0;a=t.length&&t===zc(e,0,t.length)}(e))bc=(new Ic).parse(e);else{const t=zc(e);if(!function(e){const t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"];let n=0;function r(t){const r=e[t-1];return e=e.slice(n+t),n++,r}for(let i=0;i0,s="string"==typeof i.Content&&""!==i.Content;if(e||s){const e=this.parseImage(n[r]);t[i.RelativeFilename||i.Filename]=e}}}}for(const n in e){const r=e[n];void 0!==t[r]?e[n]=t[r]:e[n]=e[n].split("\\").pop()}return e}parseImage(e){const t=e.Content,n=e.RelativeFilename||e.Filename,r=n.slice(n.lastIndexOf(".")+1).toLowerCase();let i;switch(r){case"bmp":i="image/bmp";break;case"jpg":case"jpeg":i="image/jpeg";break;case"png":i="image/png";break;case"tif":i="image/tiff";break;case"tga":null===this.manager.getHandler(".tga")&&console.warn("FBXLoader: TGA loader not found, skipping ",n),i="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+r+'" is not supported.')}if("string"==typeof t)return"data:"+i+";base64,"+t;{const e=new Uint8Array(t);return window.URL.createObjectURL(new Blob([e],{type:i}))}}parseTextures(e){const t=new Map;if("Texture"in bc.Objects){const n=bc.Objects.Texture;for(const r in n){const i=this.parseTexture(n[r],e);t.set(parseInt(r),i)}}return t}parseTexture(e,t){const n=this.loadTexture(e,t);n.ID=e.id,n.name=e.attrName;const r=e.WrapModeU,i=e.WrapModeV,s=void 0!==r?r.value:0,o=void 0!==i?i.value:0;if(n.wrapS=0===s?a.RepeatWrapping:a.ClampToEdgeWrapping,n.wrapT=0===o?a.RepeatWrapping:a.ClampToEdgeWrapping,"Scaling"in e){const t=e.Scaling.value;n.repeat.x=t[0],n.repeat.y=t[1]}return n}loadTexture(e,t){let n;const r=this.textureLoader.path,i=Ec.get(e.id).children;let s;void 0!==i&&i.length>0&&void 0!==t[i[0].ID]&&(n=t[i[0].ID],0!==n.indexOf("blob:")&&0!==n.indexOf("data:")||this.textureLoader.setPath(void 0));const o=e.FileName.slice(-3).toLowerCase();if("tga"===o){const t=this.manager.getHandler(".tga");null===t?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",e.RelativeFilename),s=new a.Texture):(t.setPath(this.textureLoader.path),s=t.load(n))}else"psd"===o?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",e.RelativeFilename),s=new a.Texture):s=this.textureLoader.load(n);return this.textureLoader.setPath(r),s}parseMaterials(e){const t=new Map;if("Material"in bc.Objects){const n=bc.Objects.Material;for(const r in n){const i=this.parseMaterial(n[r],e);null!==i&&t.set(parseInt(r),i)}}return t}parseMaterial(e,t){const n=e.id,r=e.attrName;let i=e.ShadingModel;if("object"==typeof i&&(i=i.value),!Ec.has(n))return null;const s=this.parseParameters(e,t,n);let o;switch(i.toLowerCase()){case"phong":o=new a.MeshPhongMaterial;break;case"lambert":o=new a.MeshLambertMaterial;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',i),o=new a.MeshPhongMaterial}return o.setValues(s),o.name=r,o}parseParameters(e,t,n){const r={};e.BumpFactor&&(r.bumpScale=e.BumpFactor.value),e.Diffuse?r.color=(new a.Color).fromArray(e.Diffuse.value):!e.DiffuseColor||"Color"!==e.DiffuseColor.type&&"ColorRGB"!==e.DiffuseColor.type||(r.color=(new a.Color).fromArray(e.DiffuseColor.value)),e.DisplacementFactor&&(r.displacementScale=e.DisplacementFactor.value),e.Emissive?r.emissive=(new a.Color).fromArray(e.Emissive.value):!e.EmissiveColor||"Color"!==e.EmissiveColor.type&&"ColorRGB"!==e.EmissiveColor.type||(r.emissive=(new a.Color).fromArray(e.EmissiveColor.value)),e.EmissiveFactor&&(r.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(r.opacity=parseFloat(e.Opacity.value)),r.opacity<1&&(r.transparent=!0),e.ReflectionFactor&&(r.reflectivity=e.ReflectionFactor.value),e.Shininess&&(r.shininess=e.Shininess.value),e.Specular?r.specular=(new a.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(r.specular=(new a.Color).fromArray(e.SpecularColor.value));const i=this;return Ec.get(n).children.forEach((function(e){const n=e.relationship;switch(n){case"Bump":r.bumpMap=i.getTexture(t,e.ID);break;case"Maya|TEX_ao_map":r.aoMap=i.getTexture(t,e.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":r.map=i.getTexture(t,e.ID),void 0!==r.map&&("colorSpace"in r.map?r.map.colorSpace="srgb":r.map.encoding=3001);break;case"DisplacementColor":r.displacementMap=i.getTexture(t,e.ID);break;case"EmissiveColor":r.emissiveMap=i.getTexture(t,e.ID),void 0!==r.emissiveMap&&("colorSpace"in r.emissiveMap?r.emissiveMap.colorSpace="srgb":r.emissiveMap.encoding=3001);break;case"NormalMap":case"Maya|TEX_normal_map":r.normalMap=i.getTexture(t,e.ID);break;case"ReflectionColor":r.envMap=i.getTexture(t,e.ID),void 0!==r.envMap&&(r.envMap.mapping=a.EquirectangularReflectionMapping,"colorSpace"in r.envMap?r.envMap.colorSpace="srgb":r.envMap.encoding=3001);break;case"SpecularColor":r.specularMap=i.getTexture(t,e.ID),void 0!==r.specularMap&&("colorSpace"in r.specularMap?r.specularMap.colorSpace="srgb":r.specularMap.encoding=3001);break;case"TransparentColor":case"TransparencyFactor":r.alphaMap=i.getTexture(t,e.ID),r.transparent=!0;break;default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",n)}})),r}getTexture(e,t){return"LayeredTexture"in bc.Objects&&t in bc.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),t=Ec.get(t).children[0].ID),e.get(t)}parseDeformers(){const e={},t={};if("Deformer"in bc.Objects){const n=bc.Objects.Deformer;for(const r in n){const i=n[r],s=Ec.get(parseInt(r));if("Skin"===i.attrType){const t=this.parseSkeleton(s,n);t.ID=r,s.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),t.geometryID=s.parents[0].ID,e[r]=t}else if("BlendShape"===i.attrType){const e={id:r};e.rawTargets=this.parseMorphTargets(s,n),e.id=r,s.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),t[r]=e}}}return{skeletons:e,morphTargets:t}}parseSkeleton(e,t){const n=[];return e.children.forEach((function(e){const r=t[e.ID];if("Cluster"!==r.attrType)return;const i={ID:e.ID,indices:[],weights:[],transformLink:(new a.Matrix4).fromArray(r.TransformLink.a)};"Indexes"in r&&(i.indices=r.Indexes.a,i.weights=r.Weights.a),n.push(i)})),{rawBones:n,bones:[]}}parseMorphTargets(e,t){const n=[];for(let r=0;r1?s=o:o.length>0?s=o[0]:(s=new a.MeshPhongMaterial({color:13421772}),o.push(s)),"color"in i.attributes&&o.forEach((function(e){e.vertexColors=!0})),i.FBX_Deformer?(r=new a.SkinnedMesh(i,s),r.normalizeSkinWeights()):r=new a.Mesh(i,s),r}createCurve(e,t){const n=e.children.reduce((function(e,n){return t.has(n.ID)&&(e=t.get(n.ID)),e}),null),r=new a.LineBasicMaterial({color:3342591,linewidth:1});return new a.Line(n,r)}getTransformData(e,t){const n={};"InheritType"in t&&(n.inheritType=parseInt(t.InheritType.value)),n.eulerOrder="RotationOrder"in t?kc(t.RotationOrder.value):"ZYX","Lcl_Translation"in t&&(n.translation=t.Lcl_Translation.value),"PreRotation"in t&&(n.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(n.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(n.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(n.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(n.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(n.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(n.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(n.rotationPivot=t.RotationPivot.value),e.userData.transformData=n}setLookAtProperties(e,t){if("LookAtProperty"in t){Ec.get(e.ID).children.forEach((function(t){if("LookAtProperty"===t.relationship){const n=bc.Objects.Model[t.ID];if("Lcl_Translation"in n){const t=n.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(t),_c.add(e.target)):e.lookAt((new a.Vector3).fromArray(t))}}}))}}bindSkeleton(e,t,n){const r=this.parsePoseNodes();for(const i in e){const s=e[i];Ec.get(parseInt(s.ID)).parents.forEach((function(e){if(t.has(e.ID)){const t=e.ID;Ec.get(t).parents.forEach((function(e){if(n.has(e.ID)){n.get(e.ID).bind(new a.Skeleton(s.bones),r[e.ID])}}))}}))}}parsePoseNodes(){const e={};if("Pose"in bc.Objects){const t=bc.Objects.Pose;for(const n in t)if("BindPose"===t[n].attrType&&t[n].NbPoseNodes>0){const r=t[n].PoseNode;Array.isArray(r)?r.forEach((function(t){e[t.Node]=(new a.Matrix4).fromArray(t.Matrix.a)})):e[r.Node]=(new a.Matrix4).fromArray(r.Matrix.a)}}return e}createAmbientLight(){if("GlobalSettings"in bc&&"AmbientColor"in bc.GlobalSettings){const e=bc.GlobalSettings.AmbientColor.value,t=e[0],n=e[1],r=e[2];if(0!==t||0!==n||0!==r){const e=new a.Color(t,n,r);_c.add(new a.AmbientLight(e,1))}}}}class wc{parse(e){const t=new Map;if("Geometry"in bc.Objects){const n=bc.Objects.Geometry;for(const r in n){const i=Ec.get(parseInt(r)),s=this.parseGeometry(i,n[r],e);t.set(parseInt(r),s)}}return t}parseGeometry(e,t,n){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,n);case"NurbsCurve":return this.parseNurbsGeometry(t)}}parseMeshGeometry(e,t,n){const r=n.skeletons,i=[],s=e.parents.map((function(e){return bc.Objects.Model[e.ID]}));if(0===s.length)return;const a=e.children.reduce((function(e,t){return void 0!==r[t.ID]&&(e=r[t.ID]),e}),null);e.children.forEach((function(e){void 0!==n.morphTargets[e.ID]&&i.push(n.morphTargets[e.ID])}));const o=s[0],l={};"RotationOrder"in o&&(l.eulerOrder=kc(o.RotationOrder.value)),"InheritType"in o&&(l.inheritType=parseInt(o.InheritType.value)),"GeometricTranslation"in o&&(l.translation=o.GeometricTranslation.value),"GeometricRotation"in o&&(l.rotation=o.GeometricRotation.value),"GeometricScaling"in o&&(l.scale=o.GeometricScaling.value);const c=Nc(l);return this.genGeometry(t,a,i,c)}genGeometry(e,t,n,r){const i=new a.BufferGeometry;e.attrName&&(i.name=e.attrName);const s=this.parseGeoNode(e,t),o=this.genBuffers(s),l=new a.Float32BufferAttribute(o.vertex,3);if(l.applyMatrix4(r),i.setAttribute("position",l),o.colors.length>0&&i.setAttribute("color",new a.Float32BufferAttribute(o.colors,3)),t&&(i.setAttribute("skinIndex",new a.Uint16BufferAttribute(o.weightsIndices,4)),i.setAttribute("skinWeight",new a.Float32BufferAttribute(o.vertexWeights,4)),i.FBX_Deformer=t),o.normal.length>0){const e=(new a.Matrix3).getNormalMatrix(r),t=new a.Float32BufferAttribute(o.normal,3);t.applyNormalMatrix(e),i.setAttribute("normal",t)}if(o.uvs.forEach((function(e,t){let n="uv"+(t+1).toString();0===t&&(n="uv"),i.setAttribute(n,new a.Float32BufferAttribute(o.uvs[t],2))})),s.material&&"AllSame"!==s.material.mappingType){let e=o.materialIndex[0],t=0;if(o.materialIndex.forEach((function(n,r){n!==e&&(i.addGroup(t,r-t,e),e=n,t=r)})),i.groups.length>0){const t=i.groups[i.groups.length-1],n=t.start+t.count;n!==o.materialIndex.length&&i.addGroup(n,o.materialIndex.length-n,e)}0===i.groups.length&&i.addGroup(0,o.materialIndex.length,o.materialIndex[0])}return this.addMorphTargets(i,e,n,r),i}parseGeoNode(e,t){const n={};if(n.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],n.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(n.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(n.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(n.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){n.uv=[];let t=0;for(;e.LayerElementUV[t];)e.LayerElementUV[t].UV&&n.uv.push(this.parseUVs(e.LayerElementUV[t])),t++}return n.weightTable={},null!==t&&(n.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:t,weight:e.weights[i]})}))}))),n}genBuffers(e){const t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]};let n=0,r=0,i=!1,s=[],a=[],o=[],l=[],c=[],h=[];const u=this;return e.vertexIndices.forEach((function(d,p){let f,m=!1;d<0&&(d^=-1,m=!0);let g=[],A=[];if(s.push(3*d,3*d+1,3*d+2),e.color){const t=Fc(p,n,d,e.color);o.push(t[0],t[1],t[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach((function(e){A.push(e.weight),g.push(e.id)})),A.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);const e=[0,0,0,0],t=[0,0,0,0];A.forEach((function(n,r){let i=n,s=g[r];t.forEach((function(t,n,r){if(i>t){r[n]=i,i=t;const a=e[n];e[n]=s,s=a}}))})),g=e,A=t}for(;A.length<4;)A.push(0),g.push(0);for(let e=0;e<4;++e)c.push(A[e]),h.push(g[e])}if(e.normal){const t=Fc(p,n,d,e.normal);a.push(t[0],t[1],t[2])}e.material&&"AllSame"!==e.material.mappingType&&(f=Fc(p,n,d,e.material)[0]),e.uv&&e.uv.forEach((function(e,t){const r=Fc(p,n,d,e);void 0===l[t]&&(l[t]=[]),l[t].push(r[0]),l[t].push(r[1])})),r++,m&&(u.genFace(t,e,s,f,a,o,l,c,h,r),n++,r=0,s=[],a=[],o=[],l=[],c=[],h=[])})),t}genFace(e,t,n,r,i,s,a,o,l,c){for(let h=2;h1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");const s=e.get(i[0].ID);n[r]={name:t[r].attrName,layer:s}}return n}addClip(e){let t=[];const n=this;return e.layer.forEach((function(e){t=t.concat(n.generateTracks(e))})),new a.AnimationClip(e.name,-1,t)}generateTracks(e){const t=[];let n=new a.Vector3,r=new a.Quaternion,i=new a.Vector3;if(e.transform&&e.transform.decompose(n,r,i),n=n.toArray(),r=(new a.Euler).setFromQuaternion(r,e.eulerOrder).toArray(),i=i.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){const r=this.generateVectorTrack(e.modelName,e.T.curves,n,"position");void 0!==r&&t.push(r)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){const n=this.generateRotationTrack(e.modelName,e.R.curves,r,e.preRotation,e.postRotation,e.eulerOrder);void 0!==n&&t.push(n)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){const n=this.generateVectorTrack(e.modelName,e.S.curves,i,"scale");void 0!==n&&t.push(n)}if(void 0!==e.DeformPercent){const n=this.generateMorphTrack(e);void 0!==n&&t.push(n)}return t}generateVectorTrack(e,t,n,r){const i=this.getTimesForAllAxes(t),s=this.getKeyframeTrackValues(i,t,n);return new a.VectorKeyframeTrack(e+"."+r,i,s)}generateRotationTrack(e,t,n,r,i,s){void 0!==t.x&&(this.interpolateRotations(t.x),t.x.values=t.x.values.map(a.MathUtils.degToRad)),void 0!==t.y&&(this.interpolateRotations(t.y),t.y.values=t.y.values.map(a.MathUtils.degToRad)),void 0!==t.z&&(this.interpolateRotations(t.z),t.z.values=t.z.values.map(a.MathUtils.degToRad));const o=this.getTimesForAllAxes(t),l=this.getKeyframeTrackValues(o,t,n);void 0!==r&&((r=r.map(a.MathUtils.degToRad)).push(s),r=(new a.Euler).fromArray(r),r=(new a.Quaternion).setFromEuler(r)),void 0!==i&&((i=i.map(a.MathUtils.degToRad)).push(s),i=(new a.Euler).fromArray(i),i=(new a.Quaternion).setFromEuler(i).invert());const c=new a.Quaternion,h=new a.Euler,u=[];for(let a=0;a1){let e=1,n=t[0];for(let r=1;r=180){const s=i/180,a=r/s;let o=n+a;const l=e.times[t-1],c=(e.times[t]-l)/s;let h=l+c;const u=[],d=[];for(;h1&&(n=e[1].replace(/^(\w+)::/,""),r=e[2]),{id:t,name:n,type:r}}parseNodeProperty(e,t,n){let r=t[1].replace(/^"/,"").replace(/"$/,"").trim(),i=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());const s=this.getCurrentNode();if("Properties70"!==s.name){if("C"===r){const e=i.split(",").slice(1),t=parseInt(e[0]),n=parseInt(e[1]);let a=i.split(",").slice(3);a=a.map((function(e){return e.trim().replace(/^"/,"")})),r="connections",i=[t,n],function(e,t){for(let n=0,r=e.length,i=t.length;n=e.size():e.getOffset()+160+16>=e.size()}parseNode(e,t){const n={},r=t>=7500?e.getUint64():e.getUint32(),i=t>=7500?e.getUint64():e.getUint32();t>=7500?e.getUint64():e.getUint32();const s=e.getUint8(),a=e.getString(s);if(0===r)return null;const o=[];for(let u=0;u0?o[0]:"",c=o.length>1?o[1]:"",h=o.length>2?o[2]:"";for(n.singleProperty=1===i&&e.getOffset()===r;r>e.getOffset();){const r=this.parseNode(e,t);null!==r&&this.parseSubNode(a,n,r)}return n.propertyList=o,"number"==typeof l&&(n.id=l),""!==c&&(n.attrName=c),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n}parseSubNode(e,t,n){if(!0===n.singleProperty){const e=n.propertyList[0];Array.isArray(e)?(t[n.name]=n,n.a=e):t[n.name]=e}else if("Connections"===e&&"C"===n.name){const e=[];n.propertyList.forEach((function(t,n){0!==n&&e.push(t)})),void 0===t.connections&&(t.connections=[]),t.connections.push(e)}else if("Properties70"===n.name){Object.keys(n).forEach((function(e){t[e]=n[e]}))}else if("Properties70"===e&&"P"===n.name){let e=n.propertyList[0],r=n.propertyList[1];const i=n.propertyList[2],s=n.propertyList[3];let a;0===e.indexOf("Lcl ")&&(e=e.replace("Lcl ","Lcl_")),0===r.indexOf("Lcl ")&&(r=r.replace("Lcl ","Lcl_")),a="Color"===r||"ColorRGB"===r||"Vector"===r||"Vector3D"===r||0===r.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],t[e]={type:r,type2:i,flag:s,value:a}}else void 0===t[n.name]?"number"==typeof n.id?(t[n.name]={},t[n.name][n.id]=n):t[n.name]=n:"PoseNode"===n.name?(Array.isArray(t[n.name])||(t[n.name]=[t[n.name]]),t[n.name].push(n)):void 0===t[n.name][n.id]&&(t[n.name][n.id]=n)}parseProperty(e){const t=e.getString(1);let n;switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":return n=e.getUint32(),e.getArrayBuffer(n);case"S":return n=e.getUint32(),e.getString(n);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":const r=e.getUint32(),i=e.getUint32(),s=e.getUint32();if(0===i)switch(t){case"b":case"c":return e.getBooleanArray(r);case"d":return e.getFloat64Array(r);case"f":return e.getFloat32Array(r);case"i":return e.getInt32Array(r);case"l":return e.getInt64Array(r)}const a=fc(new Uint8Array(e.getArrayBuffer(s))),o=new Bc(a.buffer);switch(t){case"b":case"c":return o.getBooleanArray(r);case"d":return o.getFloat64Array(r);case"f":return o.getFloat32Array(r);case"i":return o.getInt32Array(r);case"l":return o.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}}class Bc{constructor(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t}getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(e){this.offset+=e}getBoolean(){return 1==(1&this.getUint8())}getBooleanArray(e){const t=[];for(let n=0;n=0&&(t=t.slice(0,n)),a.LoaderUtils.decodeText(new Uint8Array(t))}}class Rc{add(e,t){this[e]=t}}function Pc(e){const t=e.match(/FBXVersion: (\d+)/);if(t){return parseInt(t[1])}throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function Dc(e){return e/46186158e3}const Lc=[];function Fc(e,t,n,r){let i;switch(r.mappingType){case"ByPolygonVertex":i=e;break;case"ByPolygon":i=t;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);const s=i*r.dataSize,a=s+r.dataSize;return function(e,t,n,r){for(let i=n,s=0;io.useLoader.preload(Sc,e),Vc.clear=e=>o.useLoader.clear(Sc,e);const Hc=new WeakMap;class jc extends a.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,r){const i=new a.FileLoader(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,(e=>{const n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(r)}),n,r)}decodeDracoFile(e,t,n,r){const i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)}decodeGeometry(e,t){for(const o in t.attributeTypes){const e=t.attributeTypes[o];void 0!==e.BYTES_PER_ELEMENT&&(t.attributeTypes[o]=e.name)}const n=JSON.stringify(t);if(Hc.has(e)){const t=Hc.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const i=this.workerNextTaskID++,s=e.byteLength,a=this._getWorker(i,s).then((n=>(r=n,new Promise(((n,s)=>{r._callbacks[i]={resolve:n,reject:s},r.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return a.catch((()=>!0)).then((()=>{r&&i&&this._releaseTask(r,i)})),Hc.set(e,{key:n,promise:a}),a}_createGeometry(e){const t=new a.BufferGeometry;e.index&&t.setIndex(new a.BufferAttribute(e.index.array,1));for(let n=0;n{n.load(e,t,void 0,r)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{const n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const r=Wc.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))})),this.decoderPending}_getWorker(e,t){return this._initDecoder().then((()=>{if(this.workerPool.lengtht._taskLoad?-1:1}));const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))}dispose(){for(let e=0;e{const t=e.draco,a=new t.Decoder,o=new t.DecoderBuffer;o.Init(new Int8Array(r),r.byteLength);try{const e=function(e,t,r,i){const s=i.attributeIDs,a=i.attributeTypes;let o,l;const c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)o=new e.Mesh,l=t.DecodeBufferToMesh(r,o);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");o=new e.PointCloud,l=t.DecodeBufferToPointCloud(r,o)}if(!l.ok()||0===o.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const h={index:null,attributes:[]};for(const u in s){const r=self[a[u]];let l,c;if(i.useUniqueIDs)c=s[u],l=t.GetAttributeByUniqueId(o,c);else{if(c=t.GetAttributeId(o,e[s[u]]),-1===c)continue;l=t.GetAttribute(o,c)}h.attributes.push(n(e,t,o,u,r,l))}c===e.TRIANGULAR_MESH&&(h.index=function(e,t,n){const r=n.num_faces(),i=3*r,s=4*i,a=e._malloc(s);t.GetTrianglesUInt32Array(n,s,a);const o=new Uint32Array(e.HEAPF32.buffer,a,i).slice();return e._free(a),{array:o,itemSize:1}}(e,t,o));return e.destroy(o),h}(t,a,o,s),r=e.attributes.map((e=>e.array.buffer));e.index&&r.push(e.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:e},r)}catch(l){console.error(l),self.postMessage({type:"error",id:i.id,error:l.message})}finally{t.destroy(o),t.destroy(a)}}))}}}let Xc;const Yc=()=>{if(Xc)return Xc;const e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if("object"!=typeof WebAssembly)return{supported:!1};let n,r="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB";WebAssembly.validate(e)&&(r="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");const i=WebAssembly.instantiate(function(e){const n=new Uint8Array(e.length);for(let t=0;t96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let r=0;for(let i=0;i{n=e.instance,n.exports.__wasm_call_ctors()}));function s(e,t,r,i,s,a){const o=n.exports.sbrk,l=r+3&-4,c=o(l*i),h=o(s.length),u=new Uint8Array(n.exports.memory.buffer);u.set(s,h);const d=e(c,r,i,h,s.length);if(0===d&&a&&a(c,l,i),t.set(u.subarray(c,c+r*i)),o(c-o(0)),0!==d)throw new Error(`Malformed buffer data: ${d}`)}const a={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},o={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return Xc={ready:i,supported:!0,decodeVertexBuffer(e,t,r,i,o){s(n.exports.meshopt_decodeVertexBuffer,e,t,r,i,n.exports[a[o]])},decodeIndexBuffer(e,t,r,i){s(n.exports.meshopt_decodeIndexBuffer,e,t,r,i)},decodeIndexSequence(e,t,r,i){s(n.exports.meshopt_decodeIndexSequence,e,t,r,i)},decodeGltfBuffer(e,t,r,i,l,c){s(n.exports[o[l]],e,t,r,i,n.exports[a[c]])}},Xc};function qc(e,t){if(t===a.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===a.TriangleFanDrawMode||t===a.TriangleStripDrawMode){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e=2.0 are supported.")));const l=new Hh(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let a=0;a=0&&void 0===o[e]&&console.warn('THREE.GLTFLoader: Unknown extension "'+e+'".')}}l.setExtensions(s),l.setPlugins(o),l.parse(n,r)}parseAsync(e,t){const n=this;return new Promise((function(r,i){n.parse(e,t,r,i)}))}}function Zc(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const $c={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class eh{constructor(e){this.parser=e,this.name=$c.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,s)}}class dh{constructor(e){this.parser=e,this.name=$c.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const s=i.extensions[t],a=r.images[s.source];let o=n.textureLoader;if(a.uri){const e=n.options.manager.getHandler(a.uri);null!==e&&(o=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,s.source,o);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class ph{constructor(e){this.parser=e,this.name=$c.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const s=i.extensions[t],a=r.images[s.source];let o=n.textureLoader;if(a.uri){const e=n.options.manager.getHandler(a.uri);null!==e&&(o=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,s.source,o);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class fh{constructor(e){this.name=$c.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const e=n.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then((function(t){const n=e.byteOffset||0,r=e.byteLength||0,s=e.count,a=e.byteStride,o=new Uint8Array(t,n,r);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(s,a,o,e.mode,e.filter).then((function(e){return e.buffer})):i.ready.then((function(){const t=new ArrayBuffer(s*a);return i.decodeGltfBuffer(new Uint8Array(t),s,a,o,e.mode,e.filter),t}))}))}return null}}class mh{constructor(e){this.name=$c.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||void 0===n.mesh)return null;const r=t.meshes[n.mesh];for(const a of r.primitives)if(a.mode!==wh.TRIANGLES&&a.mode!==wh.TRIANGLE_STRIP&&a.mode!==wh.TRIANGLE_FAN&&void 0!==a.mode)return null;const i=n.extensions[this.name].attributes,s=[],o={};for(const a in i)s.push(this.parser.getDependency("accessor",i[a]).then((e=>(o[a]=e,o[a]))));return s.length<1?null:(s.push(this.parser.createNodeMesh(e)),Promise.all(s).then((e=>{const t=e.pop(),n=t.isGroup?t.children:[t],r=e[0].count,i=[];for(const s of n){const e=new a.Matrix4,t=new a.Vector3,n=new a.Quaternion,l=new a.Vector3(1,1,1),c=new a.InstancedMesh(s.geometry,s.material,r);for(let i=0;i=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Ph={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Dh={CUBICSPLINE:void 0,LINEAR:a.InterpolateLinear,STEP:a.InterpolateDiscrete},Lh="OPAQUE",Fh="MASK",Uh="BLEND";function Oh(e,t,n){for(const r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function Nh(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function kh(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,r=t.weights.length;n-1,i=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||n||r&&i<98?this.textureLoader=new a.TextureLoader(this.options.manager):this.textureLoader=new a.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new a.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])})).then((function(t){const s={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};Oh(i,s,r),Nh(s,r),Promise.all(n._invokeAll((function(e){return e.afterRoot&&e.afterRoot(s)}))).then((function(){e(s)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let r=0,i=t.length;r{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[r,s]of e.children.entries())i(s,t.children[r])};return i(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n=2&&f.setY(t,u[e*s+1]),s>=3&&f.setZ(t,u[e*s+2]),s>=4&&f.setW(t,u[e*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return f}))}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,i=t.images[r];let s=this.textureLoader;if(i.uri){const e=n.manager.getHandler(i.uri);null!==e&&(s=e)}return this.loadTextureImage(e,r,s)}loadTextureImage(e,t,n){const r=this,i=this.json,s=i.textures[e],o=i.images[t],l=(o.uri||o.bufferView)+":"+s.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(t,n).then((function(t){t.flipY=!1,t.name=s.name||o.name||"",""===t.name&&"string"==typeof o.uri&&!1===o.uri.startsWith("data:image/")&&(t.name=o.uri);const n=(i.samplers||{})[s.sampler]||{};return t.magFilter=Th[n.magFilter]||a.LinearFilter,t.minFilter=Th[n.minFilter]||a.LinearMipmapLinearFilter,t.wrapS=Ih[n.wrapS]||a.RepeatWrapping,t.wrapT=Ih[n.wrapT]||a.RepeatWrapping,r.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[l]=c,c}loadImageSource(e,t){const n=this,r=this.json,i=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const s=r.images[e],o=self.URL||self.webkitURL;let l=s.uri||"",c=!1;if(void 0!==s.bufferView)l=n.getDependency("bufferView",s.bufferView).then((function(e){c=!0;const t=new Blob([e],{type:s.mimeType});return l=o.createObjectURL(t),l}));else if(void 0===s.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const h=Promise.resolve(l).then((function(e){return new Promise((function(n,r){let s=n;!0===t.isImageBitmapLoader&&(s=function(e){const t=new a.Texture(e);t.needsUpdate=!0,n(t)}),t.load(a.LoaderUtils.resolveURL(e,i.path),s,void 0,r)}))})).then((function(e){var t;return!0===c&&o.revokeObjectURL(l),e.userData.mimeType=s.mimeType||((t=s.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),e}));return this.sourceCache[e]=h,h}assignTexture(e,t,n,r){const i=this;return this.getDependency("texture",n.index).then((function(s){if(!s)return null;if(void 0!==n.texCoord&&n.texCoord>0&&((s=s.clone()).channel=n.texCoord),i.extensions[$c.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[$c.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=i.associations.get(s);s=i.extensions[$c.KHR_TEXTURE_TRANSFORM].extendTexture(s,e),i.associations.set(s,t)}}return void 0!==r&&("colorSpace"in s?s.colorSpace=3001===r?"srgb":"srgb-linear":s.encoding=r),e[t]=s,s}))}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const r=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,s=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new a.PointsMaterial,a.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e="LineBasicMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new a.LineBasicMaterial,a.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,this.cache.add(e,t)),n=t}if(r||i||s){let e="ClonedMaterial:"+n.uuid+":";r&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),s&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),i&&(t.vertexColors=!0),s&&(t.flatShading=!0),r&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}e.material=n}getMaterialType(){return a.MeshStandardMaterial}loadMaterial(e){const t=this,n=this.json,r=this.extensions,i=n.materials[e];let s;const o={},l=[];if((i.extensions||{})[$c.KHR_MATERIALS_UNLIT]){const e=r[$c.KHR_MATERIALS_UNLIT];s=e.getMaterialType(),l.push(e.extendParams(o,i,t))}else{const n=i.pbrMetallicRoughness||{};if(o.color=new a.Color(1,1,1),o.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;o.color.fromArray(e),o.opacity=e[3]}void 0!==n.baseColorTexture&&l.push(t.assignTexture(o,"map",n.baseColorTexture,3001)),o.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,o.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(l.push(t.assignTexture(o,"metalnessMap",n.metallicRoughnessTexture)),l.push(t.assignTexture(o,"roughnessMap",n.metallicRoughnessTexture))),s=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),l.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,o)}))))}!0===i.doubleSided&&(o.side=a.DoubleSide);const c=i.alphaMode||Lh;if(c===Uh?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,c===Fh&&(o.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&s!==a.MeshBasicMaterial&&(l.push(t.assignTexture(o,"normalMap",i.normalTexture)),o.normalScale=new a.Vector2(1,1),void 0!==i.normalTexture.scale)){const e=i.normalTexture.scale;o.normalScale.set(e,e)}return void 0!==i.occlusionTexture&&s!==a.MeshBasicMaterial&&(l.push(t.assignTexture(o,"aoMap",i.occlusionTexture)),void 0!==i.occlusionTexture.strength&&(o.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&s!==a.MeshBasicMaterial&&(o.emissive=(new a.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&s!==a.MeshBasicMaterial&&l.push(t.assignTexture(o,"emissiveMap",i.emissiveTexture,3001)),Promise.all(l).then((function(){const n=new s(o);return i.name&&(n.name=i.name),Nh(n,i),t.associations.set(n,{materials:e}),i.extensions&&Oh(r,n,i),n}))}createUniqueName(e){const t=a.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function i(e){return n[$c.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return jh(n,e,t)}))}const s=[];for(let o=0,l=e.length;o0&&kh(d,i),d.name=t.createUniqueName(i.name||"mesh_"+e),Nh(d,i),h.extensions&&Oh(r,d,h),t.assignFinalMaterial(d),c.push(d)}for(let r=0,i=c.length;r1?new a.Group:1===t.length?t[0]:new a.Object3D,o!==t[0])for(let e=0,n=t.length;e{const t=new Map;for(const[n,i]of r.associations)(n instanceof a.Material||n instanceof a.Texture)&&t.set(n,i);return e.traverse((e=>{const n=r.associations.get(e);null!=n&&t.set(e,n)})),t})(i),i}))}}function jh(e,t,n){const r=t.attributes,i=[];function s(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(const a in r){const t=Rh[a]||a.toLowerCase();t in e.attributes||i.push(s(r[a],t))}if(void 0!==t.indices&&!e.index){const r=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));i.push(r)}return Nh(e,t),function(e,t,n){const r=t.attributes,i=new a.Box3;if(void 0===r.POSITION)return;{const e=n.json.accessors[r.POSITION],t=e.min,s=e.max;if(void 0===t||void 0===s)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(i.set(new a.Vector3(t[0],t[1],t[2]),new a.Vector3(s[0],s[1],s[2])),e.normalized){const t=Qh(Ch[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}const s=t.targets;if(void 0!==s){const e=new a.Vector3,t=new a.Vector3;for(let r=0,i=s.length;r{n&&n(r),e&&(Wh||(Wh=new jc),Wh.setDecoderPath("string"==typeof e?e:"https://www.gstatic.com/draco/versioned/decoders/1.4.3/"),r.setDRACOLoader(Wh)),t&&r.setMeshoptDecoder("function"==typeof Yc?Yc():Yc)}}function Yh(e,t=!0,n=!0,r){return(0,o.useLoader)(Jc,e,Xh(t,n,r))}Yh.preload=(e,t=!0,n=!0,r)=>o.useLoader.preload(Jc,e,Xh(t,n,r)),Yh.clear=e=>o.useLoader.clear(Jc,e);class qh{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e{const r=this._getIdleWorker();-1!==r?(this._initWorker(r),this.workerStatus|=1<e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const Kh=2,Jh=0,Zh=1,$h=10;class eu{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:Zh,transferFunction:Kh,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class tu{constructor(e,t,n,r){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(e.buffer,e.byteOffset+t,n),this._littleEndian=r,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){const e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint8Array(e){const t=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,e);return this._offset+=e,t}_skip(e){return this._offset+=e,this}_scan(e,t){void 0===t&&(t=0);const n=this._offset;let r=0;for(;this._dataView.getUint8(this._offset)!==t&&re.arrayBuffer())).then((e=>WebAssembly.instantiate(e,ou))).then(this._init):WebAssembly.instantiate(Buffer.from(cu,"base64"),ou).then(this._init),iu)}_init(e){su=e.instance,ou.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!su)throw new Error("ZSTDDecoder: Await .init() before decoding.");const n=e.byteLength,r=su.exports.malloc(n);au.set(e,r),t=t||Number(su.exports.ZSTD_findDecompressedSize(r,n));const i=su.exports.malloc(t),s=su.exports.ZSTD_decompress(i,t,r,n),a=au.slice(i,i+s);return su.exports.free(r),su.exports.free(i),a}}const cu="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ";class hu extends a.CompressedTexture{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,a.CubeReflectionMapping),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class uu extends a.CompressedTexture{constructor(e,t,n,r,i,s){super(e,t,n,i,s),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=a.ClampToEdgeWrapping}}class du extends a.Texture{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=a.NearestFilter,this.minFilter=a.NearestFilter,this.wrapR=a.ClampToEdgeWrapping,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}var pu=Object.defineProperty,fu=(e,t,n)=>(((e,t,n)=>{t in e?pu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const mu=3e3,gu=3001,Au="",vu="display-p3",yu="display-p3-linear",xu="srgb-linear",bu="srgb",Eu=new WeakMap;let _u,Su=0;const Mu=class extends a.Loader{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new qh,this.workerSourceURL="",this.workerConfig=null,"undefined"!=typeof MSC_TRANSCODER&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}detectSupport(e){return this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},e.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1),this}init(){if(!this.transcoderPending){const e=new a.FileLoader(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),n=new a.FileLoader(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);const r=n.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([t,r]).then((([e,t])=>{const n=Mu.BasisWorker.toString(),r=["/* constants */","let _EngineFormat = "+JSON.stringify(Mu.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(Mu.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(Mu.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([r])),this.transcoderBinary=t,this.workerPool.setWorkerCreator((()=>{const e=new Worker(this.workerSourceURL),t=this.transcoderBinary.slice(0);return e.postMessage({type:"init",config:this.workerConfig,transcoderBinary:t},[t]),e}))})),Su>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),Su++}return this.transcoderPending}load(e,t,n,r){if(null===this.workerConfig)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const i=new a.FileLoader(this.manager);i.setResponseType("arraybuffer"),i.setWithCredentials(this.withCredentials),i.load(e,(e=>{if(Eu.has(e)){return Eu.get(e).promise.then(t).catch(r)}this._createTexture(e).then((e=>t?t(e):null)).catch(r)}),n,r)}_createTextureFrom(e,t){const{faces:n,width:r,height:i,format:s,type:o,error:l,dfdFlags:c}=e;if("error"===o)return Promise.reject(l);let h;if(6===t.faceCount)h=new hu(n,s,a.UnsignedByteType);else{const e=n[0].mipmaps;h=t.layerCount>1?new uu(e,r,i,t.layerCount,s,a.UnsignedByteType):new a.CompressedTexture(e,r,i,s,a.UnsignedByteType)}h.minFilter=1===n[0].mipmaps.length?a.LinearFilter:a.LinearMipmapLinearFilter,h.magFilter=a.LinearFilter,h.generateMipmaps=!1,h.needsUpdate=!0;const u=Bu(t);return"colorSpace"in h?h.colorSpace=u:h.encoding=u===bu?3001:3e3,h.premultiplyAlpha=!!(1&c),h}async _createTexture(e,t={}){const n=function(e){const t=new Uint8Array(e.buffer,e.byteOffset,nu.length);if(t[0]!==nu[0]||t[1]!==nu[1]||t[2]!==nu[2]||t[3]!==nu[3]||t[4]!==nu[4]||t[5]!==nu[5]||t[6]!==nu[6]||t[7]!==nu[7]||t[8]!==nu[8]||t[9]!==nu[9]||t[10]!==nu[10]||t[11]!==nu[11])throw new Error("Missing KTX 2.0 identifier.");const n=new eu,r=17*Uint32Array.BYTES_PER_ELEMENT,i=new tu(e,nu.length,r,!0);n.vkFormat=i._nextUint32(),n.typeSize=i._nextUint32(),n.pixelWidth=i._nextUint32(),n.pixelHeight=i._nextUint32(),n.pixelDepth=i._nextUint32(),n.layerCount=i._nextUint32(),n.faceCount=i._nextUint32();const s=i._nextUint32();n.supercompressionScheme=i._nextUint32();const a=i._nextUint32(),o=i._nextUint32(),l=i._nextUint32(),c=i._nextUint32(),h=i._nextUint64(),u=i._nextUint64(),d=new tu(e,nu.length+r,3*s*8,!0);for(let D=0;D{const t=new lu;await t.init(),e(t)}))),n=await _u);const r=[];for(let o=0;o>o),s=Math.max(1,e.pixelHeight>>o),l=e.pixelDepth?Math.max(1,e.pixelDepth>>o):0,c=e.levels[o];let h,u;if(0===e.supercompressionScheme)h=c.levelData;else{if(2!==e.supercompressionScheme)throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");h=n.decode(c.levelData,c.uncompressedByteLength)}u=Iu[t]===a.FloatType?new Float32Array(h.buffer,h.byteOffset,h.byteLength/Float32Array.BYTES_PER_ELEMENT):Iu[t]===a.HalfFloatType?new Uint16Array(h.buffer,h.byteOffset,h.byteLength/Uint16Array.BYTES_PER_ELEMENT):h,r.push({data:u,width:i,height:s,depth:l})}let i;if(Cu.has(Tu[t]))i=0===e.pixelDepth?new a.DataTexture(r[0].data,e.pixelWidth,e.pixelHeight):new du(r[0].data,e.pixelWidth,e.pixelHeight,e.pixelDepth);else{if(e.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");i=new a.CompressedTexture(r,e.pixelWidth,e.pixelHeight)}i.mipmaps=r,i.type=Iu[t],i.format=Tu[t],i.needsUpdate=!0;const s=Bu(e);"colorSpace"in i?i.colorSpace=s:i.encoding=s===bu?gu:mu;return Promise.resolve(i)}(n);const r=t,i=this.init().then((()=>this.workerPool.postMessage({type:"transcode",buffer:e,taskConfig:r},[e]))).then((e=>this._createTextureFrom(e.data,n)));return Eu.set(e,{promise:i}),i}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),Su--,this}};let wu=Mu;fu(wu,"BasisFormat",{ETC1S:0,UASTC_4x4:1}),fu(wu,"TranscoderFormat",{ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16}),fu(wu,"EngineFormat",{RGBAFormat:a.RGBAFormat,RGBA_ASTC_4x4_Format:a.RGBA_ASTC_4x4_Format,RGBA_BPTC_Format:a.RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:a.RGBA_ETC2_EAC_Format,RGBA_PVRTC_4BPPV1_Format:a.RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT5_Format:a.RGBA_S3TC_DXT5_Format,RGB_ETC1_Format:a.RGB_ETC1_Format,RGB_ETC2_Format:a.RGB_ETC2_Format,RGB_PVRTC_4BPPV1_Format:a.RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format:a.RGB_S3TC_DXT1_Format}),fu(wu,"BasisWorker",(function(){let e,t,n;const r=Mu.EngineFormat,i=Mu.TranscoderFormat,s=Mu.BasisFormat;self.addEventListener("message",(function(a){const u=a.data;switch(u.type){case"init":e=u.config,d=u.transcoderBinary,t=new Promise((e=>{n={wasmBinary:d,onRuntimeInitialized:e},BASIS(n)})).then((()=>{n.initializeBasis(),void 0===n.KTX2File&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((()=>{try{const{faces:t,buffers:a,width:d,height:p,hasAlpha:f,format:m,dfdFlags:g}=function(t){const a=new n.KTX2File(new Uint8Array(t));function u(){a.close(),a.delete()}if(!a.isValid())throw u(),new Error("THREE.KTX2Loader:\tInvalid or unsupported .ktx2 file");const d=a.isUASTC()?s.UASTC_4x4:s.ETC1S,p=a.getWidth(),f=a.getHeight(),m=a.getLayers()||1,g=a.getLevels(),A=a.getFaces(),v=a.getHasAlpha(),y=a.getDFDFlags(),{transcoderFormat:x,engineFormat:b}=function(t,n,a,h){let u,d;const p=t===s.ETC1S?o:l;for(let r=0;r1?(i=o.origWidth,s=o.origHeight):(i=o.width,s=o.height);const l=new Uint8Array(a.getImageTranscodedSizeInBytes(n,t,0,x));if(!a.transcodeImage(l,n,t,e,x,0,-1,-1))throw u(),new Error("THREE.KTX2Loader: .transcodeImage failed.");r.push(l)}const o=h(r);t.push({data:o,width:i,height:s}),_.push(o.buffer)}E.push({mipmaps:t,width:p,height:f,format:b})}return u(),{faces:E,buffers:_,width:p,height:f,hasAlpha:v,format:b,dfdFlags:y}}(u.buffer);self.postMessage({type:"transcode",id:u.id,faces:t,width:d,height:p,hasAlpha:f,format:m,dfdFlags:g},a)}catch(t){console.error(t),self.postMessage({type:"error",id:u.id,error:t.message})}}))}var d}));const a=[{if:"astcSupported",basisFormat:[s.UASTC_4x4],transcoderFormat:[i.ASTC_4x4,i.ASTC_4x4],engineFormat:[r.RGBA_ASTC_4x4_Format,r.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.BC7_M5,i.BC7_M5],engineFormat:[r.RGBA_BPTC_Format,r.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.BC1,i.BC3],engineFormat:[r.RGB_S3TC_DXT1_Format,r.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.ETC1,i.ETC2],engineFormat:[r.RGB_ETC2_Format,r.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.ETC1],engineFormat:[r.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.PVRTC1_4_RGB,i.PVRTC1_4_RGBA],engineFormat:[r.RGB_PVRTC_4BPPV1_Format,r.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],o=a.sort((function(e,t){return e.priorityETC1S-t.priorityETC1S})),l=a.sort((function(e,t){return e.priorityUASTC-t.priorityUASTC}));function c(e){return e<=2||0==(e&e-1)&&0!==e}function h(e){if(1===e.length)return e[0];let t=0;for(let i=0;ie.gl)),r=(0,o.useLoader)(wu,Ua(e)?Object.values(e):e,(e=>{e.detectSupport(n),e.setTranscoderPath(t)}));if((0,i.useEffect)((()=>{(Array.isArray(r)?r:[r]).forEach(n.initTexture)}),[n,r]),Ua(e)){const t=Object.keys(e),n={};return t.forEach((e=>Object.assign(n,{[e]:r[t.indexOf(e)]}))),n}return r}Pu.preload=(e,t=`${Ru}/basis/`)=>o.useLoader.preload(wu,e,(e=>{e.setTranscoderPath(t)})),Pu.clear=e=>o.useLoader.clear(wu,e);var Du=n(4700),Lu=n.n(Du);function Fu(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Uu({showPanel:e=0,className:t,parent:n}){const r=function(e,t=[],n){const[r,s]=i.useState();return i.useLayoutEffect((()=>{const t=e();return s(t),Fu(n,t),()=>Fu(n,null)}),t),r}((()=>new(Lu())),[]);return i.useEffect((()=>{if(r){const i=n&&n.current||document.body;r.showPanel(e),null==i||i.appendChild(r.dom),t&&r.dom.classList.add(...t.split(" ").filter((e=>e)));const s=(0,o.addEffect)((()=>r.begin())),a=(0,o.addAfterEffect)((()=>r.end()));return()=>{null==i||i.removeChild(r.dom),s(),a()}}}),[n,r,t,e]),null}function Ou(e,t,n){const{gl:r,size:s}=(0,o.useThree)(),l=i.useMemo((()=>r.getPixelRatio()),[r]),c="number"==typeof e?e:s.width*l,h="number"==typeof t?t:s.height*l,u=("number"==typeof e?n:e)||{},{samples:d,...p}=u,f=i.useMemo((()=>{let e;return e=new a.WebGLRenderTarget(c,h,{minFilter:a.LinearFilter,magFilter:a.LinearFilter,encoding:r.outputEncoding,type:a.HalfFloatType,...p}),e.samples=d,e}),[]);return i.useLayoutEffect((()=>{f.setSize(c,h),d&&(f.samples=d)}),[d,f,c,h]),i.useEffect((()=>()=>f.dispose()),[]),f}function Nu({size:e=256,frames:t=1/0}={}){const n=(0,o.useThree)((e=>e.viewport.dpr)),{width:r,height:s}=(0,o.useThree)((e=>e.size)),l=e||r*n,c=e||s*n,h=i.useMemo((()=>{const e=new a.DepthTexture(l,c);return e.format=a.DepthFormat,e.type=a.UnsignedShortType,{depthTexture:e}}),[l,c]);let u=0;const d=Ou(l,c,h);return(0,o.useFrame)((e=>{(t===1/0||ue.viewport)),i=t*(r.aspect>e/t?r.width/e:r.height/t);return[e*(r.aspect>e/t?r.width/e:r.height/t)*n,i*n,1]}function Gu(e,t,n,r){return new(n||(n=Promise))((function(i,s){function a(e){try{l(r.next(e))}catch(e){s(e)}}function o(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}l((r=r.apply(e,t||[])).next())}))}const zu=["geforce 320m","geforce 8600","geforce 8600m gt","geforce 8800 gs","geforce 8800 gt","geforce 9400","geforce 9400m g","geforce 9400m","geforce 9600m gt","geforce 9600m","geforce fx go5200","geforce gt 120","geforce gt 130","geforce gt 330m","geforce gtx 285","google swiftshader","intel g41","intel g45","intel gma 4500mhd","intel gma x3100","intel hd 3000","intel q45","legacy","mali-2","mali-3","mali-4","quadro fx 1500","quadro fx 4","quadro fx 5","radeon hd 2400","radeon hd 2600","radeon hd 4670","radeon hd 4850","radeon hd 4870","radeon hd 5670","radeon hd 5750","radeon hd 6290","radeon hd 6300","radeon hd 6310","radeon hd 6320","radeon hd 6490m","radeon hd 6630m","radeon hd 6750m","radeon hd 6770m","radeon hd 6970m","sgx 543","sgx543"];function Qu(e){return e.toLowerCase().replace(/^angle ?\((.+)\)*$/,"$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g,"").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/,"$1")}const Vu="undefined"==typeof window,Hu=(()=>{if(Vu)return;const{userAgent:e,platform:t,maxTouchPoints:n}=window.navigator,r=/(iphone|ipod|ipad)/i.test(e),i="iPad"===t||"MacIntel"===t&&n>0&&!window.MSStream;return{isIpad:i,isMobile:/android/i.test(e)||r||i,isSafari12:/Version\/12.+Safari/.test(e)}})();const ju=[],Wu=[];function Xu(e,t){if(e===t)return 0;const n=e;e.length>t.length&&(e=t,t=n);let r=e.length,i=t.length;for(;r>0&&e.charCodeAt(~-r)===t.charCodeAt(~-i);)r--,i--;let s,a=0;for(;ac?l>c?c+1:l:l>o?o+1:l;return c}function Yu(e){return null!=e}class qu extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}}const Ku=({mobileTiers:e=[0,15,30,60],desktopTiers:t=[0,15,30,60],override:n={},glContext:r,failIfMajorPerformanceCaveat:i=!1,benchmarksURL:s="https://unpkg.com/detect-gpu@4.0.50/dist/benchmarks"}={})=>Gu(void 0,void 0,void 0,(function*(){const a={};if(Vu)return{tier:0,type:"SSR"};const{isIpad:o=!!(null==Hu?void 0:Hu.isIpad),isMobile:l=!!(null==Hu?void 0:Hu.isMobile),screenSize:c=window.screen,loadBenchmarks:h=(e=>Gu(void 0,void 0,void 0,(function*(){const t=yield fetch(`${s}/${e}`).then((e=>e.json()));if(parseInt(t.shift().split(".")[0],10)<4)throw new qu("Detect GPU benchmark data is out of date. Please update to version 4x");return t})))}=n;let{renderer:u}=n;const d=(e,t,n,r,i)=>({device:i,fps:r,gpu:n,isMobile:l,tier:e,type:t});let p,f="";if(u)u=Qu(u),p=[u];else{const e=r||function(e,t=!1){const n={alpha:!1,antialias:!1,depth:!1,failIfMajorPerformanceCaveat:t,powerPreference:"high-performance",stencil:!1};e&&delete n.powerPreference;const r=window.document.createElement("canvas"),i=r.getContext("webgl",n)||r.getContext("experimental-webgl",n);return null!=i?i:void 0}(null==Hu?void 0:Hu.isSafari12,i);if(!e)return d(0,"WEBGL_UNSUPPORTED");const t=e.getExtension("WEBGL_debug_renderer_info");if(t&&(u=e.getParameter(t.UNMASKED_RENDERER_WEBGL)),!u)return d(1,"FALLBACK");f=u,u=Qu(u),p=function(e,t,n){return"apple gpu"===t?function(e,t,n){if(!n)return[t];const r=function(e){const t=e.createShader(35633),n=e.createShader(35632),r=e.createProgram();if(!(n&&t&&r))return;e.shaderSource(t,"\n precision highp float;\n attribute vec3 aPosition;\n varying float vvv;\n void main() {\n vvv = 0.31622776601683794;\n gl_Position = vec4(aPosition, 1.0);\n }\n "),e.shaderSource(n,"\n precision highp float;\n varying float vvv;\n void main() {\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * vvv;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n gl_FragColor = enc;\n }\n "),e.compileShader(t),e.compileShader(n),e.attachShader(r,t),e.attachShader(r,n),e.linkProgram(r),e.detachShader(r,t),e.detachShader(r,n),e.deleteShader(t),e.deleteShader(n),e.useProgram(r);const i=e.createBuffer();e.bindBuffer(34962,i),e.bufferData(34962,new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),35044);const s=e.getAttribLocation(r,"aPosition");e.vertexAttribPointer(s,3,5126,!1,0,0),e.enableVertexAttribArray(s),e.clearColor(1,1,1,1),e.clear(16384),e.viewport(0,0,1,1),e.drawArrays(4,0,3);const a=new Uint8Array(4);return e.readPixels(0,0,1,1,6408,5121,a),e.deleteProgram(r),e.deleteBuffer(i),a.join("")}(e),i="801621810",s="8016218135",a="80162181161",o=(null==Hu?void 0:Hu.isIpad)?[["a7",a,12],["a8",s,15],["a8x",s,15],["a9",s,15],["a9x",s,15],["a10",s,15],["a10x",s,15],["a12",i,15],["a12x",i,15],["a12z",i,15],["a14",i,15],["m1",i,15]]:[["a7",a,12],["a8",s,12],["a9",s,15],["a10",s,15],["a11",i,15],["a12",i,15],["a13",i,15],["a14",i,15]];let l;return"80162181255"===r?l=o.filter((([,,e])=>e>=14)):(l=o.filter((([,e])=>e===r)),l.length||(l=o)),l.map((([e])=>`apple ${e} gpu`))}(e,t,n):[t]}(e,u,l)}const m=(yield Promise.all(p.map((function(e){var t;return Gu(this,void 0,void 0,(function*(){const n=(e=>{const t=l?["adreno","apple","mali-t","mali","nvidia","powervr"]:["intel","apple","amd","radeon","nvidia","geforce"];for(const n of t)if(e.includes(n))return n})(e);if(!n)return;const r=`${l?"m":"d"}-${n}${o?"-ipad":""}.json`,i=a[r]=null!==(t=a[r])&&void 0!==t?t:h(r);let s;try{s=yield i}catch(n){if(n instanceof qu)throw n;return}const u=function(e){var t;const n=(e=e.replace(/\([^)]+\)/,"")).match(/\d+/)||e.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);return null!==(t=null==n?void 0:n.join("").replace(/\W|amd/g,""))&&void 0!==t?t:""}(e);let d=s.filter((([,e])=>e===u));d.length||(d=s.filter((([t])=>t.includes(e))));const p=d.length;if(0===p)return;let f,[m,,,g]=p>1?d.map((t=>[t,Xu(e,t[0])])).sort((([,e],[,t])=>e-t))[0][0]:d[0],A=Number.MAX_VALUE;const{devicePixelRatio:v}=window,y=c.width*v*c.height*v;for(const e of g){const[t,n]=e,r=t*n,i=Math.abs(y-r);ie===n?t-r:e-n));if(!m.length){const e=zu.find((e=>u.includes(e)));return e?d(0,"BLOCKLISTED",e):d(1,"FALLBACK",`${u} (${f})`)}const[,g,A,v]=m[0];if(-1===g)return d(0,"BLOCKLISTED",A,g,v);const y=l?e:t;let x=0;for(let e=0;e=y[e]&&(x=e);return d(x,"BENCHMARK",A,g,v)})),Ju=e=>pa((()=>Ku(e)),["useDetectGPU"]);function Zu(e,t,...n){const r=i.useRef(),s=(0,o.useThree)((e=>e.scene));return i.useEffect((()=>(e&&t&&null!=e&&e.current&&(r.current=new t(e.current,...n),r.current&&s.add(r.current)),!e&&r.current&&s.remove(r.current),()=>{r.current&&s.remove(r.current)})),[s,t,e,n]),(0,o.useFrame)((()=>{var e;null!=(e=r.current)&&e.update&&r.current.update()})),r}const $u=new a.Vector3,ed=new a.Vector3,td=new a.Vector3,nd=new a.Vector2,rd=new a.Vector2,id=new a.Vector2,sd=new a.Vector3;function ad(e,t,n,r,i,s,o){$u.fromBufferAttribute(t,r),ed.fromBufferAttribute(t,i),td.fromBufferAttribute(t,s);const l=function(e,t,n,r,i,s){let o;return o=s===a.BackSide?e.intersectTriangle(r,n,t,!0,i):e.intersectTriangle(t,n,r,s!==a.DoubleSide,i),null===o?null:{distance:e.origin.distanceTo(i),point:i.clone()}}(e,$u,ed,td,sd,o);if(l){n&&(nd.fromBufferAttribute(n,r),rd.fromBufferAttribute(n,i),id.fromBufferAttribute(n,s),l.uv=a.Triangle.getUV(sd,$u,ed,td,nd,rd,id,new a.Vector2));const e={a:r,b:i,c:s,normal:new a.Vector3,materialIndex:0};a.Triangle.getNormal($u,ed,td,e.normal),l.face=e,l.faceIndex=r}return l}function od(e,t,n,r,i){const s=3*r,a=e.index.getX(s),o=e.index.getX(s+1),l=e.index.getX(s+2),c=ad(n,e.attributes.position,e.attributes.uv,a,o,l,t);return c?(c.faceIndex=r,i&&i.push(c),c):null}function ld(e,t,n){return null===e?null:(e.point.applyMatrix4(t.matrixWorld),e.distance=e.point.distanceTo(n.ray.origin),e.object=t,e.distancen.far?null:e)}const cd=0,hd=1,ud=2,dd=1.25,pd=1,fd=65535,md=Math.pow(2,-24);class gd{constructor(){}}function Ad(e,t,n){return n.min.x=t[e],n.min.y=t[e+1],n.min.z=t[e+2],n.max.x=t[e+3],n.max.y=t[e+4],n.max.z=t[e+5],n}function vd(e){let t=-1,n=-1/0;for(let r=0;r<3;r++){const i=e[r+3]-e[r];i>n&&(n=i,t=r)}return t}function yd(e,t){t.set(e)}function xd(e,t,n){let r,i;for(let s=0;s<3;s++){const a=s+3;r=e[s],i=t[s],n[s]=ri?r:i}}function bd(e,t,n){for(let r=0;r<3;r++){const i=t[e+2*r],s=t[e+2*r+1],a=i-s,o=i+s;an[r+3]&&(n[r+3]=o)}}function Ed(e){const t=e[3]-e[0],n=e[4]-e[1],r=e[5]-e[2];return 2*(t*n+n*r+r*t)}function _d(e,t,n,r,i=null){let s=1/0,a=1/0,o=1/0,l=-1/0,c=-1/0,h=-1/0,u=1/0,d=1/0,p=1/0,f=-1/0,m=-1/0,g=-1/0;const A=null!==i;for(let v=6*t,y=6*(t+n);vl&&(l=i),A&&tf&&(f=t);const y=e[v+2],x=e[v+3],b=y-x,E=y+x;bc&&(c=E),A&&ym&&(m=y);const _=e[v+4],S=e[v+5],M=_-S,w=_+S;Mh&&(h=w),A&&_g&&(g=_)}r[0]=s,r[1]=a,r[2]=o,r[3]=l,r[4]=c,r[5]=h,A&&(i[0]=u,i[1]=d,i[2]=p,i[3]=f,i[4]=m,i[5]=g)}const Sd=32,Md=(e,t)=>e.candidate-t.candidate,wd=new Array(Sd).fill().map((()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0}))),Cd=new Float32Array(6);function Td(e,t){function n(e){p&&p(e/f)}function r(t,i,a,p=null,f=0){if(!m&&f>=c&&(m=!0,h&&(console.warn(`MeshBVH: Max depth of ${c} reached when generating BVH. Consider increasing maxDepth.`),console.warn(e))),a<=u||f>=c)return n(i+a),t.offset=i,t.count=a,t;const g=function(e,t,n,r,i,s){let a=-1,o=0;if(s===cd)a=vd(t),-1!==a&&(o=(t[a]+t[a+3])/2);else if(s===hd)a=vd(e),-1!==a&&(o=function(e,t,n,r){let i=0;for(let s=t,a=t+n;s=s.candidate?bd(i,n,s.rightCacheBounds):(bd(i,n,s.leftCacheBounds),s.count++)}}for(let n=0;n=Sd&&(t=Sd-1);const s=wd[t];s.count++,bd(i,n,s.bounds)}const t=wd[Sd-1];yd(t.bounds,t.rightCacheBounds);for(let e=Sd-2;e>=0;e--){const t=wd[e],n=wd[e+1];xd(t.bounds,n.rightCacheBounds,t.rightCacheBounds)}let d=0;for(let n=0;n=o;)a--;if(!(s65535?new Uint32Array(new r(4*n)):new Uint16Array(new r(2*n)),e.setIndex(new a.BufferAttribute(i,1));for(let e=0;em&&(m=l),c>m&&(m=c);const g=(m-u)/2,A=2*r;s[i+A+0]=u+g,s[i+A+1]=g+(Math.abs(u)+g)*md,ut[r+3]&&(t[r+3]=m)}}return s}(e,i),l=e.index.array,c=t.maxDepth,h=t.verbose,u=t.maxLeafTris,d=t.strategy,p=t.onProgress,f=e.index.count/3;let m=!1;const g=[],A=function(e){if(!e.groups||!e.groups.length)return[{offset:0,count:e.index.count/3}];const t=[],n=new Set;for(const i of e.groups)n.add(i.start),n.add(i.start+i.count);const r=Array.from(n.values()).sort(((e,t)=>e-t));for(let i=0;io&&(o=t);const n=e[h+2];nl&&(l=n);const r=e[h+4];rc&&(c=r)}r[0]=i,r[1]=s,r[2]=a,r[3]=o,r[4]=l,r[5]=c}(o,e.offset,e.count,s),r(t,e.offset,e.count,s),g.push(t)}else for(let a of A){const e=new gd;e.boundingData=new Float32Array(6),_d(o,a.offset,a.count,e.boundingData,s),r(e,a.offset,a.count,s),g.push(e)}return g}class Id{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let n=1/0,r=-1/0;for(let i=0,s=e.length;ir?s:r}this.min=n,this.max=r}setFromPoints(e,t){let n=1/0,r=-1/0;for(let i=0,s=t.length;ir?a:r}this.min=n,this.max=r}isSeparated(e){return this.min>e.max||e.min>this.max}}Id.prototype.setFromBox=function(){const e=new a.Vector3;return function(t,n){const r=n.min,i=n.max;let s=1/0,a=-1/0;for(let o=0;o<=1;o++)for(let n=0;n<=1;n++)for(let l=0;l<=1;l++){e.x=r.x*o+i.x*(1-o),e.y=r.y*n+i.y*(1-n),e.z=r.z*l+i.z*(1-l);const c=t.dot(e);s=Math.min(c,s),a=Math.max(c,a)}this.min=s,this.max=a}}();!function(){const e=new Id}();const Bd=function(){const e=new a.Vector3,t=new a.Vector3,n=new a.Vector3;return function(r,i,s){const a=r.start,o=e,l=i.start,c=t;n.subVectors(a,l),e.subVectors(r.end,r.start),t.subVectors(i.end,i.start);const h=n.dot(c),u=c.dot(o),d=c.dot(c),p=n.dot(o),f=o.dot(o)*d-u*u;let m,g;m=0!==f?(h*u-p*d)/f:0,g=(h+m*u)/d,s.x=m,s.y=g}}(),Rd=function(){const e=new a.Vector2,t=new a.Vector3,n=new a.Vector3;return function(r,i,s,a){Bd(r,i,e);let o=e.x,l=e.y;if(o>=0&&o<=1&&l>=0&&l<=1)return r.at(o,s),void i.at(l,a);if(o>=0&&o<=1)return l<0?i.at(0,a):i.at(1,a),void r.closestPointToPoint(a,!0,s);if(l>=0&&l<=1)return o<0?r.at(0,s):r.at(1,s),void i.closestPointToPoint(s,!0,a);{let e,c;e=o<0?r.start:r.end,c=l<0?i.start:i.end;const h=t,u=n;return r.closestPointToPoint(c,!0,t),i.closestPointToPoint(e,!0,n),h.distanceToSquared(c)<=u.distanceToSquared(e)?(s.copy(h),void a.copy(c)):(s.copy(e),void a.copy(u))}}}(),Pd=function(){const e=new a.Vector3,t=new a.Vector3,n=new a.Plane,r=new a.Line3;return function(i,s){const{radius:a,center:o}=i,{a:l,b:c,c:h}=s;r.start=l,r.end=c;if(r.closestPointToPoint(o,!0,e).distanceTo(o)<=a)return!0;r.start=l,r.end=h;if(r.closestPointToPoint(o,!0,e).distanceTo(o)<=a)return!0;r.start=c,r.end=h;if(r.closestPointToPoint(o,!0,e).distanceTo(o)<=a)return!0;const u=s.getPlane(n);if(Math.abs(u.distanceToPoint(o))<=a){const e=u.projectPoint(o,t);if(s.containsPoint(e))return!0}return!1}}();function Dd(e){return Math.abs(e)<1e-15}class Ld extends a.Triangle{constructor(...e){super(...e),this.isExtendedTriangle=!0,this.satAxes=new Array(4).fill().map((()=>new a.Vector3)),this.satBounds=new Array(4).fill().map((()=>new Id)),this.points=[this.a,this.b,this.c],this.sphere=new a.Sphere,this.plane=new a.Plane,this.needsUpdate=!0}intersectsSphere(e){return Pd(e,this)}update(){const e=this.a,t=this.b,n=this.c,r=this.points,i=this.satAxes,s=this.satBounds,a=i[0],o=s[0];this.getNormal(a),o.setFromPoints(a,r);const l=i[1],c=s[1];l.subVectors(e,t),c.setFromPoints(l,r);const h=i[2],u=s[2];h.subVectors(t,n),u.setFromPoints(h,r);const d=i[3],p=s[3];d.subVectors(n,e),p.setFromPoints(d,r),this.sphere.setFromPoints(this.points),this.plane.setFromNormalAndCoplanarPoint(a,e),this.needsUpdate=!1}}Ld.prototype.closestPointToSegment=function(){const e=new a.Vector3,t=new a.Vector3,n=new a.Line3;return function(r,i=null,s=null){const{start:a,end:o}=r,l=this.points;let c,h=1/0;for(let u=0;u<3;u++){const a=(u+1)%3;n.start.copy(l[u]),n.end.copy(l[a]),Rd(n,r,e,t),c=e.distanceToSquared(t),c1-1e-10){const e=this.satBounds,o=this.satAxes;n[0]=a.a,n[1]=a.b,n[2]=a.c;for(let t=0;t<4;t++){const i=e[t],s=o[t];if(r.setFromPoints(s,n),i.isSeparated(r))return!1}const l=a.satBounds,c=a.satAxes;t[0]=this.a,t[1]=this.b,t[2]=this.c;for(let n=0;n<4;n++){const e=l[n],i=c[n];if(r.setFromPoints(i,t),e.isSeparated(r))return!1}for(let a=0;a<4;a++){const e=o[a];for(let a=0;a<4;a++){const o=c[a];if(s.crossVectors(e,o),r.setFromPoints(s,t),i.setFromPoints(s,n),r.isSeparated(i))return!1}}return p&&(f||console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."),p.start.set(0,0,0),p.end.set(0,0,0)),!0}{const e=this.points;let t=!1,n=0;for(let a=0;a<3;a++){const r=e[a],i=e[(a+1)%3];h.start.copy(r),h.end.copy(i),h.delta(o);const s=t?u.start:u.end,l=Dd(g.distanceToPoint(r));if(Dd(g.normal.dot(o))&&l){u.copy(h),n=2;break}if((g.intersectLine(h,s)||l)&&!Dd(s.distanceTo(i))){if(n++,t)break;t=!0}}if(1===n&&a.containsPoint(u.end))return p&&(p.start.copy(u.end),p.end.copy(u.end)),!0;if(2!==n)return!1;const r=a.points;let i=!1,s=0;for(let a=0;a<3;a++){const e=r[a],t=r[(a+1)%3];h.start.copy(e),h.end.copy(t),h.delta(l);const n=i?d.start:d.end,o=Dd(m.distanceToPoint(e));if(Dd(m.normal.dot(l))&&o){d.copy(h),s=2;break}if((m.intersectLine(h,n)||o)&&!Dd(n.distanceTo(t))){if(s++,i)break;i=!0}}if(1===s&&this.containsPoint(d.end))return p&&(p.start.copy(d.end),p.end.copy(d.end)),!0;if(2!==s)return!1;if(u.delta(o),d.delta(l),o.dot(l)<0){let e=d.start;d.start=d.end,d.end=e}const f=u.start.dot(o),A=u.end.dot(o),v=d.start.dot(o),y=d.end.dot(o);return(f===y||v===A||A0?p.start.copy(u.start):p.start.copy(d.start),c.subVectors(u.end,d.end),c.dot(o)<0?p.end.copy(u.end):p.end.copy(d.end)),!0)}}}(),Ld.prototype.distanceToPoint=function(){const e=new a.Vector3;return function(t){return this.closestPointToPoint(t,e),t.distanceTo(e)}}(),Ld.prototype.distanceToTriangle=function(){const e=new a.Vector3,t=new a.Vector3,n=["a","b","c"],r=new a.Line3,i=new a.Line3;return function(s,a=null,o=null){const l=a||o?r:null;if(this.intersectsTriangle(s,l))return(a||o)&&(a&&l.getCenter(a),o&&l.getCenter(o)),0;let c=1/0;for(let t=0;t<3;t++){let r;const i=n[t],l=s[i];this.closestPointToPoint(l,e),r=l.distanceToSquared(e),rnew a.Vector3)),this.satAxes=new Array(3).fill().map((()=>new a.Vector3)),this.satBounds=new Array(3).fill().map((()=>new Id)),this.alignedSatBounds=new Array(3).fill().map((()=>new Id)),this.needsUpdate=!1,e&&this.min.copy(e),t&&this.max.copy(t),n&&this.matrix.copy(n)}set(e,t,n){this.min.copy(e),this.max.copy(t),this.matrix.copy(n),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}function Ud(e,t,n,r){const i=e.a,s=e.b,a=e.c;let o=t,l=t+1,c=t+2;n&&(o=n.getX(t),l=n.getX(t+1),c=n.getX(t+2)),i.x=r.getX(o),i.y=r.getY(o),i.z=r.getZ(o),s.x=r.getX(l),s.y=r.getY(l),s.z=r.getZ(l),a.x=r.getX(c),a.y=r.getY(c),a.z=r.getZ(c)}function Od(e,t,n,r,i,s,a){const o=n.index,l=n.attributes.position;for(let c=e,h=t+e;cnew a.Line3)),n=new Array(12).fill().map((()=>new a.Line3)),r=new a.Vector3,i=new a.Vector3;return function(s,a=0,o=null,l=null){if(this.needsUpdate&&this.update(),this.intersectsBox(s))return(o||l)&&(s.getCenter(i),this.closestPointToPoint(i,r),s.closestPointToPoint(r,i),o&&o.copy(r),l&&l.copy(i)),0;const c=a*a,h=s.min,u=s.max,d=this.points;let p=1/0;for(let e=0;e<8;e++){const t=d[e];i.copy(t).clamp(h,u);const n=t.distanceToSquared(i);if(n=0;let c,h;l?(c=Qd(e),h=Vd(e,o)):(c=Vd(e,o),h=Qd(e));const u=Jd(c,s,r,jd)?Yd(c,t,n,r):null;if(u){const e=u.point[a];if(l?e<=s[h+i]:e>=s[h+i+3])return u}const d=Jd(h,s,r,jd)?Yd(h,t,n,r):null;return u&&d?u.distance<=d.distance?u:d:u||d||null}}const qd=function(){let e,t;const n=[],r=new Nd((()=>new a.Box3));return function(...s){e=r.getPrimitive(),t=r.getPrimitive(),n.push(e,t);const a=i(...s);r.releasePrimitive(e),r.releasePrimitive(t),n.pop(),n.pop();const o=n.length;return o>0&&(t=n[o-1],e=n[o-2]),a};function i(n,r,s,a,o=null,l=0,c=0){function h(e){let t=2*e,n=tp,r=np;for(;!kd(t,n);)t=2*(e=Qd(e));return Gd(e,r)}function u(e){let t=2*e,n=tp,r=np;for(;!kd(t,n);)t=2*(e=Vd(e,r));return Gd(e,r)+zd(t,n)}let d=2*n,p=ep,f=tp,m=np;if(kd(d,f)){const t=Gd(n,m),r=zd(d,f);return Ad(n,p,e),a(t,r,!1,c,l+n,e)}{const d=Qd(n),g=Vd(n,m);let A,v,y,x,b=d,E=g;if(o&&(y=e,x=t,Ad(b,p,y),Ad(E,p,x),A=o(y),v=o(x),vi.intersectsBox(e),intersectsTriangle:e=>{e.a.applyMatrix4(c),e.b.applyMatrix4(c),e.c.applyMatrix4(c),e.needsUpdate=!0;for(let n=3*A,r=3*(v+A);nnew Ld));class vp{static serialize(e,t={}){if(t.isBufferGeometry)return console.warn("MeshBVH.serialize: The arguments for the function have changed. See documentation for new signature."),vp.serialize(arguments[0],{cloneBuffers:void 0===arguments[2]||arguments[2]});t={cloneBuffers:!0,...t};const n=e.geometry,r=e._roots,i=n.getIndex();let s;return s=t.cloneBuffers?{roots:r.map((e=>e.slice())),index:i.array.slice()}:{roots:r,index:i.array},s}static deserialize(e,t,n={}){if("boolean"==typeof n)return console.warn("MeshBVH.deserialize: The arguments for the function have changed. See documentation for new signature."),vp.deserialize(arguments[0],arguments[1],{setIndex:void 0===arguments[2]||arguments[2]});n={setIndex:!0,...n};const{index:r,roots:i}=e,s=new vp(t,{...n,[sp]:!0});if(s._roots=i,n.setIndex){const n=t.getIndex();if(null===n){const n=new a.BufferAttribute(e.index,1,!1);t.setIndex(n)}else n.array!==r&&(n.array.set(r),n.needsUpdate=!0)}return s}constructor(e,t={}){if(!e.isBufferGeometry)throw new Error("MeshBVH: Only BufferGeometries are supported.");if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.");if((t=Object.assign({strategy:cd,maxDepth:40,maxLeafTris:10,verbose:!0,useSharedArrayBuffer:!1,setBoundingBox:!0,onProgress:null,[sp]:!1},t)).useSharedArrayBuffer&&"undefined"==typeof SharedArrayBuffer)throw new Error("MeshBVH: SharedArrayBuffer is not available.");this._roots=null,t[sp]||(this._roots=function(e,t){const n=Td(e,t);let r,i,s;const a=[],o=t.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer;for(let h=0;hMath.pow(2,32))throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return i[n+6]=o/4,o=c(o,s),i[n+7]=a,o}}}(e,t),!e.boundingBox&&t.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new a.Box3))),this.geometry=e}refit(e=null){e&&Array.isArray(e)&&(e=new Set(e));const t=this.geometry,n=t.index.array,r=t.attributes.position;let i,s,a,o,l=0;const c=this._roots;for(let u=0,d=c.length;uu&&(u=s),ad&&(d=a),op&&(p=o)}return(o[t+0]!==i||o[t+1]!==l||o[t+2]!==h||o[t+3]!==u||o[t+4]!==d||o[t+5]!==p)&&(o[t+0]=i,o[t+1]=l,o[t+2]=h,o[t+3]=u,o[t+4]=d,o[t+5]=p,!0)}{const n=t+8,r=s[t+6],a=n+i,c=r+i;let u=l,d=!1,p=!1;e?u||(d=e.has(a),p=e.has(c),u=!d&&!p):(d=!0,p=!0);const f=u||p;let m=!1;(u||d)&&(m=h(n,i,u));let g=!1;f&&(g=h(r,i,u));const A=m||g;if(A)for(let e=0;e<3;e++){const i=n+e,s=r+e,a=o[i],l=o[i+3],c=o[s],h=o[s+3];o[t+e]=ah?l:h}return A}}}traverse(e,t=0){const n=this._roots[t],r=new Uint32Array(n),i=new Uint16Array(n);!function t(s,a=0){const o=2*s,l=i[o+15]===fd;if(l){const t=r[s+6],c=i[o+14];e(a,l,new Float32Array(n,4*s,6),t,c)}else{const i=s+8,o=r[s+6],c=r[s+7];e(a,l,new Float32Array(n,4*s,6),c)||(t(i,a+1),t(o,a+1))}}(0)}raycast(e,t=a.FrontSide){const n=this._roots,r=this.geometry,i=[],s=t.isMaterial,o=Array.isArray(t),l=r.groups,c=s?t.side:t;for(let a=0,h=n.length;a{const s=3*n;return e(t,s,s+1,s+2,r,i)}}e={boundsTraverseOrder:n,intersectsBounds:e,intersectsTriangle:t,intersectsRange:null},console.warn("MeshBVH: Shapecast function signature has changed and now takes an object of callbacks as a second argument. See docs for new signature.")}const i=Ap.getPrimitive();let{boundsTraverseOrder:s,intersectsBounds:a,intersectsRange:o,intersectsTriangle:l}=e;if(o&&l){const e=o;o=(t,n,s,a,o)=>!!e(t,n,s,a,o)||Od(t,n,r,l,s,a,i)}else o||(o=l?(e,t,n,s)=>Od(e,t,r,l,n,s,i):(e,t,n)=>n);let c=!1,h=0;for(const u of this._roots){if(rp(u),c=qd(0,r,a,o,s,h),ip(),c)break;h+=u.byteLength}return Ap.releasePrimitive(i),c}bvhcast(e,t,n){let{intersectsRanges:r,intersectsTriangles:i}=n;const s=this.geometry.index,a=this.geometry.attributes.position,o=e.geometry.index,l=e.geometry.attributes.position;lp.copy(t).invert();const c=Ap.getPrimitive(),h=Ap.getPrimitive();if(i){function d(e,n,r,u,d,p,f,m){for(let g=r,A=r+u;gop.intersectsBox(e),intersectsRange:(t,n,i,s,a,o)=>(ap.copy(o),ap.applyMatrix4(lp),e.shapecast({intersectsBounds:e=>ap.intersectsBox(e),intersectsRange:(e,i,o,l,c)=>r(t,n,e,i,s,a,l,c)}))});return Ap.releasePrimitive(c),Ap.releasePrimitive(h),u}intersectsBox(e,t){return cp.set(e.min,e.max,t),cp.needsUpdate=!0,this.shapecast({intersectsBounds:e=>cp.intersectsBox(e),intersectsTriangle:e=>cp.intersectsTriangle(e)})}intersectsSphere(e){return this.shapecast({intersectsBounds:t=>e.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(e)})}closestPointToGeometry(e,t,n={},r={},i=0,s=1/0){e.boundingBox||e.computeBoundingBox(),cp.set(e.boundingBox.min,e.boundingBox.max,t),cp.needsUpdate=!0;const a=this.geometry,o=a.attributes.position,l=a.index,c=e.attributes.position,h=e.index,u=Ap.getPrimitive(),d=Ap.getPrimitive();let p=dp,f=pp,m=null,g=null;r&&(m=fp,g=mp);let A=1/0,v=null,y=null;return lp.copy(t).invert(),hp.matrix.copy(lp),this.shapecast({boundsTraverseOrder:e=>cp.distanceToBox(e),intersectsBounds:(e,t,n)=>n{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:e=>hp.distanceToBox(e),intersectsBounds:(e,t,n)=>n{for(let a=3*e,x=3*(e+s);a(up.copy(e).clamp(t.min,t.max),up.distanceToSquared(e)),intersectsBounds:(e,t,n)=>n{t.closestPointToPoint(e,up);const r=e.distanceToSquared(up);return r{Ad(0,new Float32Array(t),gp),e.union(gp)})),e}}const yp=new a.Ray,xp=new a.Matrix4,bp=a.Mesh.prototype.raycast;function Ep(e,t){if(this.geometry.boundsTree){if(void 0===this.material)return;xp.copy(this.matrixWorld).invert(),yp.copy(e.ray).applyMatrix4(xp);const n=this.geometry.boundsTree;if(!0===e.firstHitOnly){const r=ld(n.raycastFirst(yp,this.material),this,e);r&&t.push(r)}else{const r=n.raycast(yp,this.material);for(let n=0,i=r.length;n{if(e.current){e.current.raycast=Ep;const n=e.current.geometry;return n.computeBoundsTree=_p,n.disposeBoundsTree=Sp,n.computeBoundsTree(t),()=>{n.boundsTree&&n.disposeBoundsTree()}}}),[e,t])}function wp(...e){const t=i.useRef([]);return t.current=e.map((e=>i.useContext(e))),i.useMemo((()=>({children:n})=>e.reduceRight(((e,n,r)=>i.createElement(n.Provider,{value:t.current[r],children:e})),n)),[])}function Cp(e,t){const n=i.useRef(),[r]=i.useState((()=>t?t instanceof a.Object3D?{current:t}:t:n)),[s]=i.useState((()=>new a.AnimationMixer(void 0))),l=i.useRef({}),[c]=i.useState((()=>{const t={};return e.forEach((e=>Object.defineProperty(t,e.name,{enumerable:!0,get(){if(r.current)return l.current[e.name]||(l.current[e.name]=s.clipAction(e,r.current))}}))),{ref:r,clips:e,actions:t,names:e.map((e=>e.name)),mixer:s}}));return(0,o.useFrame)(((e,t)=>s.update(t))),i.useEffect((()=>{const e=r.current;return()=>{l.current={},Object.values(c.actions).forEach((t=>{e&&s.uncacheAction(t,e)}))}}),[e]),c}function Tp(e){const t=i.useRef(null),n=i.useRef(!1),r=i.useRef(!1);return i.useEffect((()=>{const i=t.current;if(i){const t=(0,o.addEffect)((()=>(n.current=!1,!0))),s=i.onBeforeRender;i.onBeforeRender=()=>n.current=!0;const a=(0,o.addAfterEffect)((()=>(n.current!==r.current&&e(r.current=n.current),!0)));return()=>{i.onBeforeRender=s,t(),a()}}}),[]),t}const Ip="\n#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n #ifdef BOX_PROJECTED_ENV_MAP\n vWorldPosition = worldPosition.xyz;\n #endif\n#endif\n",Bp="\n#ifdef BOX_PROJECTED_ENV_MAP\n uniform vec3 envMapSize;\n uniform vec3 envMapPosition;\n varying vec3 vWorldPosition;\n \n vec3 parallaxCorrectNormal( vec3 v, vec3 cubeSize, vec3 cubePos ) {\n vec3 nDir = normalize( v );\n vec3 rbmax = ( .5 * cubeSize + cubePos - vWorldPosition ) / nDir;\n vec3 rbmin = ( -.5 * cubeSize + cubePos - vWorldPosition ) / nDir;\n vec3 rbminmax;\n rbminmax.x = ( nDir.x > 0. ) ? rbmax.x : rbmin.x;\n rbminmax.y = ( nDir.y > 0. ) ? rbmax.y : rbmin.y;\n rbminmax.z = ( nDir.z > 0. ) ? rbmax.z : rbmin.z;\n float correction = min( min( rbminmax.x, rbminmax.y ), rbminmax.z );\n vec3 boxIntersection = vWorldPosition + nDir * correction; \n return boxIntersection - cubePos;\n }\n#endif\n",Rp="\n#ifdef BOX_PROJECTED_ENV_MAP\n worldNormal = parallaxCorrectNormal( worldNormal, envMapSize, envMapPosition );\n#endif\n",Pp="\n#ifdef BOX_PROJECTED_ENV_MAP\n reflectVec = parallaxCorrectNormal( reflectVec, envMapSize, envMapPosition );\n#endif\n";function Dp(e=new a.Vector3,t=new a.Vector3){const[n]=i.useState((()=>({position:new a.Vector3,size:new a.Vector3})));(0,o.applyProps)(n,{position:e,size:t});const r=i.useRef(null),s=i.useMemo((()=>({ref:r,onBeforeCompile:e=>function(e,t,n){e.defines.BOX_PROJECTED_ENV_MAP=!0,e.uniforms.envMapPosition={value:t},e.uniforms.envMapSize={value:n},e.vertexShader=`\n varying vec3 vWorldPosition;\n ${e.vertexShader.replace("#include ",Ip)}`,e.fragmentShader=`\n ${Bp}\n ${e.fragmentShader.replace("#include ",a.ShaderChunk.envmap_physical_pars_fragment).replace("vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );",`vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n ${Rp}\n `).replace("reflectVec = inverseTransformDirection( reflectVec, viewMatrix );",`reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n ${Pp}\n `)}`}(e,n.position,n.size),customProgramCacheKey:()=>JSON.stringify(n.position.toArray())+JSON.stringify(n.size.toArray())})),[...n.position.toArray(),...n.size.toArray()]);return i.useLayoutEffect((()=>{r.current.needsUpdate=!0}),[n]),s}var Lp=Object.defineProperty,Fp=(e,t,n)=>(((e,t,n)=>{t in e?Lp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const Up=1024,Op=(e,t,n,r,i,s)=>{const a=e.image,{data:o}=a,l=4096*s;o[4*t+l+0]=n,o[4*t+l+1]=r,o[4*t+l+2]=i,o[4*t+l+3]=1};class Np{constructor(e,t=1){Fp(this,"curveArray"),Fp(this,"curveLengthArray"),Fp(this,"object3D"),Fp(this,"splineTexure"),Fp(this,"uniforms");const n=e.clone(),r=((e=1)=>{const t=new Float32Array(4096*e*4),n=new a.DataTexture(t,Up,4*e,a.RGBAFormat,a.FloatType);return n.wrapS=a.RepeatWrapping,n.wrapT=a.RepeatWrapping,n.magFilter=a.NearestFilter,n.needsUpdate=!0,n})(t),i={spineTexture:{value:r},pathOffset:{type:"f",value:0},pathSegment:{type:"f",value:1},spineOffset:{type:"f",value:161},spineLength:{type:"f",value:400},flow:{type:"i",value:1}};n.traverse((e=>{(e instanceof a.Mesh||e instanceof a.InstancedMesh)&&(e.material=e.material.clone(),function(e,t,n=1){e.__ok||(e.__ok=!0,e.onBeforeCompile=e=>{if(e.__modified)return;e.__modified=!0,Object.assign(e.uniforms,t);const r=`\n\t\tuniform sampler2D spineTexture;\n\t\tuniform float pathOffset;\n\t\tuniform float pathSegment;\n\t\tuniform float spineOffset;\n\t\tuniform float spineLength;\n\t\tuniform int flow;\n\n\t\tfloat textureLayers = ${4*n}.;\n\t\tfloat textureStacks = 1.;\n\n\t\t${e.vertexShader}\n\t\t`.replace("#include ","").replace("#include ","").replace("#include ","").replace(/void\s*main\s*\(\)\s*\{/,"\n void main() {\n #include \n\n vec4 worldPos = modelMatrix * vec4(position, 1.);\n\n bool bend = flow > 0;\n float xWeight = bend ? 0. : 1.;\n\n #ifdef USE_INSTANCING\n float pathOffsetFromInstanceMatrix = instanceMatrix[3][2];\n float spineLengthFromInstanceMatrix = instanceMatrix[3][0];\n float spinePortion = bend ? (worldPos.x + spineOffset) / spineLengthFromInstanceMatrix : 0.;\n float mt = (spinePortion * pathSegment + pathOffset + pathOffsetFromInstanceMatrix)*textureStacks;\n #else\n float spinePortion = bend ? (worldPos.x + spineOffset) / spineLength : 0.;\n float mt = (spinePortion * pathSegment + pathOffset)*textureStacks;\n #endif\n\n mt = mod(mt, textureStacks);\n float rowOffset = floor(mt);\n\n #ifdef USE_INSTANCING\n rowOffset += instanceMatrix[3][1] * 4.;\n #endif\n\n vec3 spinePos = texture2D(spineTexture, vec2(mt, (0. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 a = texture2D(spineTexture, vec2(mt, (1. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 b = texture2D(spineTexture, vec2(mt, (2. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 c = texture2D(spineTexture, vec2(mt, (3. + rowOffset + 0.5) / textureLayers)).xyz;\n mat3 basis = mat3(a, b, c);\n\n vec3 transformed = basis\n * vec3(worldPos.x * xWeight, worldPos.y * 1., worldPos.z * 1.)\n + spinePos;\n\n vec3 transformedNormal = normalMatrix * (basis * objectNormal);\n\t\t\t").replace("#include ","vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n\t\t\t\tgl_Position = projectionMatrix * mvPosition;");e.vertexShader=r})}(e.material,i,t))})),this.curveArray=new Array(t),this.curveLengthArray=new Array(t),this.object3D=n,this.splineTexure=r,this.uniforms=i}updateCurve(e,t){if(e>=this.curveArray.length)throw Error("Index out of range for Flow");const n=t.getLength();this.uniforms.spineLength.value=n,this.curveLengthArray[e]=n,this.curveArray[e]=t,((e,t,n=0)=>{const r=Math.floor(1024);t.arcLengthDivisions=r/2,t.updateArcLengths();const i=t.getSpacedPoints(r),s=t.computeFrenetFrames(r,!0);for(let a=0;a{const[r]=i.useState((()=>new a.Scene)),[s,l]=i.useState(),c=i.useRef();return i.useEffect((()=>{c.current=new Np(r.children[0]),l(c.current.object3D)}),[e]),i.useEffect((()=>{var e;t&&(null==(e=c.current)||e.updateCurve(0,t))}),[t]),i.useImperativeHandle(n,(()=>({moveAlongCurve:e=>{var t;null==(t=c.current)||t.moveAlongCurve(e)}}))),i.createElement(i.Fragment,null,(0,o.createPortal)(e,r),s&&i.createElement("primitive",{object:s}))}));class Gp extends a.MeshPhysicalMaterial{constructor(e={}){super(e),this.setValues(e),this._time={value:0},this._distort={value:.4},this._radius={value:1}}onBeforeCompile(e){e.uniforms.time=this._time,e.uniforms.radius=this._radius,e.uniforms.distort=this._distort,e.vertexShader=`\n uniform float time;\n uniform float radius;\n uniform float distort;\n #define GLSLIFY 1\nvec3 mod289(vec3 x){return x-floor(x*(1.0/289.0))*289.0;}vec4 mod289(vec4 x){return x-floor(x*(1.0/289.0))*289.0;}vec4 permute(vec4 x){return mod289(((x*34.0)+1.0)*x);}vec4 taylorInvSqrt(vec4 r){return 1.79284291400159-0.85373472095314*r;}float snoise(vec3 v){const vec2 C=vec2(1.0/6.0,1.0/3.0);const vec4 D=vec4(0.0,0.5,1.0,2.0);vec3 i=floor(v+dot(v,C.yyy));vec3 x0=v-i+dot(i,C.xxx);vec3 g=step(x0.yzx,x0.xyz);vec3 l=1.0-g;vec3 i1=min(g.xyz,l.zxy);vec3 i2=max(g.xyz,l.zxy);vec3 x1=x0-i1+C.xxx;vec3 x2=x0-i2+C.yyy;vec3 x3=x0-D.yyy;i=mod289(i);vec4 p=permute(permute(permute(i.z+vec4(0.0,i1.z,i2.z,1.0))+i.y+vec4(0.0,i1.y,i2.y,1.0))+i.x+vec4(0.0,i1.x,i2.x,1.0));float n_=0.142857142857;vec3 ns=n_*D.wyz-D.xzx;vec4 j=p-49.0*floor(p*ns.z*ns.z);vec4 x_=floor(j*ns.z);vec4 y_=floor(j-7.0*x_);vec4 x=x_*ns.x+ns.yyyy;vec4 y=y_*ns.x+ns.yyyy;vec4 h=1.0-abs(x)-abs(y);vec4 b0=vec4(x.xy,y.xy);vec4 b1=vec4(x.zw,y.zw);vec4 s0=floor(b0)*2.0+1.0;vec4 s1=floor(b1)*2.0+1.0;vec4 sh=-step(h,vec4(0.0));vec4 a0=b0.xzyw+s0.xzyw*sh.xxyy;vec4 a1=b1.xzyw+s1.xzyw*sh.zzww;vec3 p0=vec3(a0.xy,h.x);vec3 p1=vec3(a0.zw,h.y);vec3 p2=vec3(a1.xy,h.z);vec3 p3=vec3(a1.zw,h.w);vec4 norm=taylorInvSqrt(vec4(dot(p0,p0),dot(p1,p1),dot(p2,p2),dot(p3,p3)));p0*=norm.x;p1*=norm.y;p2*=norm.z;p3*=norm.w;vec4 m=max(0.6-vec4(dot(x0,x0),dot(x1,x1),dot(x2,x2),dot(x3,x3)),0.0);m=m*m;return 42.0*dot(m*m,vec4(dot(p0,x0),dot(p1,x1),dot(p2,x2),dot(p3,x3)));}\n ${e.vertexShader}\n `,e.vertexShader=e.vertexShader.replace("#include ","\n float updateTime = time / 50.0;\n float noise = snoise(vec3(position / 2.0 + updateTime * 5.0));\n vec3 transformed = vec3(position * (noise * pow(distort, 2.0) + radius));\n ")}get time(){return this._time.value}set time(e){this._time.value=e}get distort(){return this._distort.value}set distort(e){this._distort.value=e}get radius(){return this._radius.value}set radius(e){this._radius.value=e}}const zp=i.forwardRef((({speed:e=1,...t},n)=>{const[s]=i.useState((()=>new Gp));return(0,o.useFrame)((t=>s&&(s.time=t.clock.getElapsedTime()*e))),i.createElement("primitive",(0,r.c)({dispose:void 0,object:s,ref:n,attach:"material"},t))}));class Qp extends a.MeshStandardMaterial{constructor(e={}){super(e),this.setValues(e),this._time={value:0},this._factor={value:1}}onBeforeCompile(e){e.uniforms.time=this._time,e.uniforms.factor=this._factor,e.vertexShader=`\n uniform float time;\n uniform float factor;\n ${e.vertexShader}\n `,e.vertexShader=e.vertexShader.replace("#include ","float theta = sin( time + position.y ) / 2.0 * factor;\n float c = cos( theta );\n float s = sin( theta );\n mat3 m = mat3( c, 0, s, 0, 1, 0, -s, 0, c );\n vec3 transformed = vec3( position ) * m;\n vNormal = vNormal * m;")}get time(){return this._time.value}set time(e){this._time.value=e}get factor(){return this._factor.value}set factor(e){this._factor.value=e}}const Vp=i.forwardRef((({speed:e=1,...t},n)=>{const[s]=i.useState((()=>new Qp));return(0,o.useFrame)((t=>s&&(s.time=t.clock.getElapsedTime()*e))),i.createElement("primitive",(0,r.c)({dispose:void 0,object:s,ref:n,attach:"material"},t))}));class Hp extends a.ShaderMaterial{constructor(e=new a.Vector2){super({uniforms:{inputBuffer:new a.Uniform(null),depthBuffer:new a.Uniform(null),resolution:new a.Uniform(new a.Vector2),texelSize:new a.Uniform(new a.Vector2),halfTexelSize:new a.Uniform(new a.Vector2),kernel:new a.Uniform(0),scale:new a.Uniform(1),cameraNear:new a.Uniform(0),cameraFar:new a.Uniform(1),minDepthThreshold:new a.Uniform(0),maxDepthThreshold:new a.Uniform(1),depthScale:new a.Uniform(0),depthToBlurRatioBias:new a.Uniform(.25)},fragmentShader:"#include \n #include \n uniform sampler2D inputBuffer;\n uniform sampler2D depthBuffer;\n uniform float cameraNear;\n uniform float cameraFar;\n uniform float minDepthThreshold;\n uniform float maxDepthThreshold;\n uniform float depthScale;\n uniform float depthToBlurRatioBias;\n varying vec2 vUv;\n varying vec2 vUv0;\n varying vec2 vUv1;\n varying vec2 vUv2;\n varying vec2 vUv3;\n\n void main() {\n float depthFactor = 0.0;\n \n #ifdef USE_DEPTH\n vec4 depth = texture2D(depthBuffer, vUv);\n depthFactor = smoothstep(minDepthThreshold, maxDepthThreshold, 1.0-(depth.r * depth.a));\n depthFactor *= depthScale;\n depthFactor = max(0.0, min(1.0, depthFactor + 0.25));\n #endif\n \n vec4 sum = texture2D(inputBuffer, mix(vUv0, vUv, depthFactor));\n sum += texture2D(inputBuffer, mix(vUv1, vUv, depthFactor));\n sum += texture2D(inputBuffer, mix(vUv2, vUv, depthFactor));\n sum += texture2D(inputBuffer, mix(vUv3, vUv, depthFactor));\n gl_FragColor = sum * 0.25 ;\n\n #include \n #include \n #include \n }",vertexShader:"uniform vec2 texelSize;\n uniform vec2 halfTexelSize;\n uniform float kernel;\n uniform float scale;\n varying vec2 vUv;\n varying vec2 vUv0;\n varying vec2 vUv1;\n varying vec2 vUv2;\n varying vec2 vUv3;\n\n void main() {\n vec2 uv = position.xy * 0.5 + 0.5;\n vUv = uv;\n\n vec2 dUv = (texelSize * vec2(kernel) + halfTexelSize) * scale;\n vUv0 = vec2(uv.x - dUv.x, uv.y + dUv.y);\n vUv1 = vec2(uv.x + dUv.x, uv.y + dUv.y);\n vUv2 = vec2(uv.x + dUv.x, uv.y - dUv.y);\n vUv3 = vec2(uv.x - dUv.x, uv.y - dUv.y);\n\n gl_Position = vec4(position.xy, 1.0, 1.0);\n }",blending:a.NoBlending,depthWrite:!1,depthTest:!1}),this.toneMapped=!1,this.setTexelSize(e.x,e.y),this.kernel=new Float32Array([0,1,2,2,3])}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t),this.uniforms.halfTexelSize.value.set(e,t).multiplyScalar(.5)}setResolution(e){this.uniforms.resolution.value.copy(e)}}class jp{constructor({gl:e,resolution:t,width:n=500,height:r=500,minDepthThreshold:i=0,maxDepthThreshold:s=1,depthScale:o=0,depthToBlurRatioBias:l=.25}){this.renderToScreen=!1,this.renderTargetA=new a.WebGLRenderTarget(t,t,{minFilter:a.LinearFilter,magFilter:a.LinearFilter,stencilBuffer:!1,depthBuffer:!1,encoding:e.outputEncoding}),this.renderTargetB=this.renderTargetA.clone(),this.convolutionMaterial=new Hp,this.convolutionMaterial.setTexelSize(1/n,1/r),this.convolutionMaterial.setResolution(new a.Vector2(n,r)),this.scene=new a.Scene,this.camera=new a.Camera,this.convolutionMaterial.uniforms.minDepthThreshold.value=i,this.convolutionMaterial.uniforms.maxDepthThreshold.value=s,this.convolutionMaterial.uniforms.depthScale.value=o,this.convolutionMaterial.uniforms.depthToBlurRatioBias.value=l,this.convolutionMaterial.defines.USE_DEPTH=o>0;const c=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),h=new Float32Array([0,0,2,0,0,2]),u=new a.BufferGeometry;u.setAttribute("position",new a.BufferAttribute(c,3)),u.setAttribute("uv",new a.BufferAttribute(h,2)),this.screen=new a.Mesh(u,this.convolutionMaterial),this.screen.frustumCulled=!1,this.scene.add(this.screen)}render(e,t,n){const r=this.scene,i=this.camera,s=this.renderTargetA,a=this.renderTargetB;let o=this.convolutionMaterial,l=o.uniforms;l.depthBuffer.value=t.depthTexture;const c=o.kernel;let h,u,d,p=t;for(u=0,d=c.length-1;u","#include \n my_vUv = textureMatrix * vec4( position, 1.0 );\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );"),e.fragmentShader=`\n uniform sampler2D tDiffuse;\n uniform sampler2D tDiffuseBlur;\n uniform sampler2D tDepth;\n uniform sampler2D distortionMap;\n uniform float distortion;\n uniform float cameraNear;\n\t\t\t uniform float cameraFar;\n uniform bool hasBlur;\n uniform float mixBlur;\n uniform float mirror;\n uniform float mixStrength;\n uniform float minDepthThreshold;\n uniform float maxDepthThreshold;\n uniform float mixContrast;\n uniform float depthScale;\n uniform float depthToBlurRatioBias;\n varying vec4 my_vUv; \n ${e.fragmentShader}`,e.fragmentShader=e.fragmentShader.replace("#include ","#include \n \n float distortionFactor = 0.0;\n #ifdef USE_DISTORTION\n distortionFactor = texture2D(distortionMap, vUv).r * distortion;\n #endif\n\n vec4 new_vUv = my_vUv;\n new_vUv.x += distortionFactor;\n new_vUv.y += distortionFactor;\n\n vec4 base = texture2DProj(tDiffuse, new_vUv);\n vec4 blur = texture2DProj(tDiffuseBlur, new_vUv);\n \n vec4 merge = base;\n \n #ifdef USE_NORMALMAP\n vec2 normal_uv = vec2(0.0);\n vec4 normalColor = texture2D(normalMap, vUv * normalScale);\n vec3 my_normal = normalize( vec3( normalColor.r * 2.0 - 1.0, normalColor.b, normalColor.g * 2.0 - 1.0 ) );\n vec3 coord = new_vUv.xyz / new_vUv.w;\n normal_uv = coord.xy + coord.z * my_normal.xz * 0.05;\n vec4 base_normal = texture2D(tDiffuse, normal_uv);\n vec4 blur_normal = texture2D(tDiffuseBlur, normal_uv);\n merge = base_normal;\n blur = blur_normal;\n #endif\n\n float depthFactor = 0.0001;\n float blurFactor = 0.0;\n\n #ifdef USE_DEPTH\n vec4 depth = texture2DProj(tDepth, new_vUv);\n depthFactor = smoothstep(minDepthThreshold, maxDepthThreshold, 1.0-(depth.r * depth.a));\n depthFactor *= depthScale;\n depthFactor = max(0.0001, min(1.0, depthFactor));\n\n #ifdef USE_BLUR\n blur = blur * min(1.0, depthFactor + depthToBlurRatioBias);\n merge = merge * min(1.0, depthFactor + 0.5);\n #else\n merge = merge * depthFactor;\n #endif\n \n #endif\n\n float reflectorRoughnessFactor = roughness;\n #ifdef USE_ROUGHNESSMAP\n vec4 reflectorTexelRoughness = texture2D( roughnessMap, vUv );\n reflectorRoughnessFactor *= reflectorTexelRoughness.g;\n #endif\n \n #ifdef USE_BLUR\n blurFactor = min(1.0, mixBlur * reflectorRoughnessFactor);\n merge = mix(merge, blur, blurFactor);\n #endif\n\n vec4 newMerge = vec4(0.0, 0.0, 0.0, 1.0);\n newMerge.r = (merge.r - 0.5) * mixContrast + 0.5;\n newMerge.g = (merge.g - 0.5) * mixContrast + 0.5;\n newMerge.b = (merge.b - 0.5) * mixContrast + 0.5;\n\n diffuseColor.rgb = diffuseColor.rgb * ((1.0 - min(1.0, mirror)) + newMerge.rgb * mixStrength);\n ")}get tDiffuse(){return this._tDiffuse.value}set tDiffuse(e){this._tDiffuse.value=e}get tDepth(){return this._tDepth.value}set tDepth(e){this._tDepth.value=e}get distortionMap(){return this._distortionMap.value}set distortionMap(e){this._distortionMap.value=e}get tDiffuseBlur(){return this._tDiffuseBlur.value}set tDiffuseBlur(e){this._tDiffuseBlur.value=e}get textureMatrix(){return this._textureMatrix.value}set textureMatrix(e){this._textureMatrix.value=e}get hasBlur(){return this._hasBlur.value}set hasBlur(e){this._hasBlur.value=e}get mirror(){return this._mirror.value}set mirror(e){this._mirror.value=e}get mixBlur(){return this._mixBlur.value}set mixBlur(e){this._mixBlur.value=e}get mixStrength(){return this._blurStrength.value}set mixStrength(e){this._blurStrength.value=e}get minDepthThreshold(){return this._minDepthThreshold.value}set minDepthThreshold(e){this._minDepthThreshold.value=e}get maxDepthThreshold(){return this._maxDepthThreshold.value}set maxDepthThreshold(e){this._maxDepthThreshold.value=e}get depthScale(){return this._depthScale.value}set depthScale(e){this._depthScale.value=e}get depthToBlurRatioBias(){return this._depthToBlurRatioBias.value}set depthToBlurRatioBias(e){this._depthToBlurRatioBias.value=e}get distortion(){return this._distortion.value}set distortion(e){this._distortion.value=e}get mixContrast(){return this._mixContrast.value}set mixContrast(e){this._mixContrast.value=e}}(0,o.extend)({MeshReflectorMaterialImpl:Wp});const Xp=i.forwardRef((({mixBlur:e=0,mixStrength:t=1,resolution:n=256,blur:s=[0,0],minDepthThreshold:l=.9,maxDepthThreshold:c=1,depthScale:h=0,depthToBlurRatioBias:u=.25,mirror:d=0,distortion:p=1,mixContrast:f=1,distortionMap:m,reflectorOffset:g=0,...A},v)=>{const y=(0,o.useThree)((({gl:e})=>e)),x=(0,o.useThree)((({camera:e})=>e)),b=(0,o.useThree)((({scene:e})=>e)),E=(s=Array.isArray(s)?s:[s,s])[0]+s[1]>0,_=i.useRef(null),[S]=i.useState((()=>new a.Plane)),[M]=i.useState((()=>new a.Vector3)),[C]=i.useState((()=>new a.Vector3)),[T]=i.useState((()=>new a.Vector3)),[I]=i.useState((()=>new a.Matrix4)),[B]=i.useState((()=>new a.Vector3(0,0,-1))),[R]=i.useState((()=>new a.Vector4)),[P]=i.useState((()=>new a.Vector3)),[D]=i.useState((()=>new a.Vector3)),[L]=i.useState((()=>new a.Vector4)),[F]=i.useState((()=>new a.Matrix4)),[U]=i.useState((()=>new a.PerspectiveCamera)),O=i.useCallback((()=>{var e;const t=_.current.parent||(null==(e=_.current)?void 0:e.__r3f.parent);if(!t)return;if(C.setFromMatrixPosition(t.matrixWorld),T.setFromMatrixPosition(x.matrixWorld),I.extractRotation(t.matrixWorld),M.set(0,0,1),M.applyMatrix4(I),C.addScaledVector(M,g),P.subVectors(C,T),P.dot(M)>0)return;P.reflect(M).negate(),P.add(C),I.extractRotation(x.matrixWorld),B.set(0,0,-1),B.applyMatrix4(I),B.add(T),D.subVectors(C,B),D.reflect(M).negate(),D.add(C),U.position.copy(P),U.up.set(0,1,0),U.up.applyMatrix4(I),U.up.reflect(M),U.lookAt(D),U.far=x.far,U.updateMatrixWorld(),U.projectionMatrix.copy(x.projectionMatrix),F.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),F.multiply(U.projectionMatrix),F.multiply(U.matrixWorldInverse),F.multiply(t.matrixWorld),S.setFromNormalAndCoplanarPoint(M,C),S.applyMatrix4(U.matrixWorldInverse),R.set(S.normal.x,S.normal.y,S.normal.z,S.constant);const n=U.projectionMatrix;L.x=(Math.sign(R.x)+n.elements[8])/n.elements[0],L.y=(Math.sign(R.y)+n.elements[9])/n.elements[5],L.z=-1,L.w=(1+n.elements[10])/n.elements[14],R.multiplyScalar(2/R.dot(L)),n.elements[2]=R.x,n.elements[6]=R.y,n.elements[10]=R.z+1,n.elements[14]=R.w}),[x,g]),[N,k,G,z]=i.useMemo((()=>{const r={minFilter:a.LinearFilter,magFilter:a.LinearFilter,encoding:y.outputEncoding,type:a.HalfFloatType},i=new a.WebGLRenderTarget(n,n,r);i.depthBuffer=!0,i.depthTexture=new a.DepthTexture(n,n),i.depthTexture.format=a.DepthFormat,i.depthTexture.type=a.UnsignedShortType;const o=new a.WebGLRenderTarget(n,n,r);return[i,o,new jp({gl:y,resolution:n,width:s[0],height:s[1],minDepthThreshold:l,maxDepthThreshold:c,depthScale:h,depthToBlurRatioBias:u}),{mirror:d,textureMatrix:F,mixBlur:e,tDiffuse:i.texture,tDepth:i.depthTexture,tDiffuseBlur:o.texture,hasBlur:E,mixStrength:t,minDepthThreshold:l,maxDepthThreshold:c,depthScale:h,depthToBlurRatioBias:u,transparent:!0,distortion:p,distortionMap:m,mixContrast:f,"defines-USE_BLUR":E?"":void 0,"defines-USE_DEPTH":h>0?"":void 0,"defines-USE_DISTORTION":m?"":void 0}]}),[y,s,F,n,d,E,e,t,l,c,h,u,p,m,f]);return(0,o.useFrame)((()=>{var e;const t=_.current.parent||(null==(e=_.current)?void 0:e.__r3f.parent);if(!t)return;t.visible=!1;const n=y.xr.enabled,r=y.shadowMap.autoUpdate;O(),y.xr.enabled=!1,y.shadowMap.autoUpdate=!1,y.setRenderTarget(N),y.state.buffers.depth.setMask(!0),y.autoClear||y.clear(),y.render(b,U),E&&G.render(y,N,k),y.xr.enabled=n,y.shadowMap.autoUpdate=r,t.visible=!0,y.setRenderTarget(null)})),i.createElement("meshReflectorMaterialImpl",(0,r.c)({attach:"material",key:"key"+z["defines-USE_BLUR"]+z["defines-USE_DEPTH"]+z["defines-USE_DISTORTION"],ref:w([_,v])},z,A))}));class Yp extends a.PointsMaterial{constructor(e){super(e),this.onBeforeCompile=e=>{e.fragmentShader=e.fragmentShader.replace("#include ","\n #include \n vec2 cxy = 2.0 * gl_PointCoord - 1.0;\n float r = dot(cxy, cxy);\n float delta = fwidth(r); \n float mask = 1.0 - smoothstep(1.0 - delta, 1.0 + delta, r);\n gl_FragColor = vec4(gl_FragColor.rgb, mask * gl_FragColor.a );\n ")}}}const qp=i.forwardRef(((e,t)=>{const[n]=i.useState((()=>new Yp(null)));return i.createElement("primitive",(0,r.c)({},e,{object:n,ref:t,attach:"material"}))}));let Kp=!1;const Jp=e=>{if(!Kp){Kp=!0;let t=a.ShaderChunk.shadowmap_pars_fragment;t=t.replace("#ifdef USE_SHADOWMAP","#ifdef USE_SHADOWMAP\n"+(({frustum:e=3.75,size:t=.005,near:n=9.5,samples:r=17,rings:i=11}={})=>`#define LIGHT_WORLD_SIZE ${t}\n#define LIGHT_FRUSTUM_WIDTH ${e}\n#define LIGHT_SIZE_UV (LIGHT_WORLD_SIZE / LIGHT_FRUSTUM_WIDTH)\n#define NEAR_PLANE ${n}\n\n#define NUM_SAMPLES ${r}\n#define NUM_RINGS ${i}\n#define BLOCKER_SEARCH_NUM_SAMPLES NUM_SAMPLES\n#define PCF_NUM_SAMPLES NUM_SAMPLES\n\nvec2 poissonDisk[NUM_SAMPLES];\n\nvoid initPoissonSamples(const in vec2 randomSeed) {\n float ANGLE_STEP = PI2 * float(NUM_RINGS) / float(NUM_SAMPLES);\n float INV_NUM_SAMPLES = 1.0 / float(NUM_SAMPLES);\n float angle = rand(randomSeed) * PI2;\n float radius = INV_NUM_SAMPLES;\n float radiusStep = radius;\n for (int i = 0; i < NUM_SAMPLES; i++) {\n poissonDisk[i] = vec2(cos(angle), sin(angle)) * pow(radius, 0.75);\n radius += radiusStep;\n angle += ANGLE_STEP;\n }\n}\n\nfloat penumbraSize(const in float zReceiver, const in float zBlocker) { // Parallel plane estimation\n return (zReceiver - zBlocker) / zBlocker;\n}\n\nfloat findBlocker(sampler2D shadowMap, const in vec2 uv, const in float zReceiver) {\n float searchRadius = LIGHT_SIZE_UV * (zReceiver - NEAR_PLANE) / zReceiver;\n float blockerDepthSum = 0.0;\n int numBlockers = 0;\n for (int i = 0; i < BLOCKER_SEARCH_NUM_SAMPLES; i++) {\n float shadowMapDepth = unpackRGBAToDepth(texture2D(shadowMap, uv + poissonDisk[i] * searchRadius));\n if (shadowMapDepth < zReceiver) {\n blockerDepthSum += shadowMapDepth;\n numBlockers++;\n }\n }\n if (numBlockers == 0) return -1.0;\n return blockerDepthSum / float(numBlockers);\n}\n\nfloat PCF_Filter(sampler2D shadowMap, vec2 uv, float zReceiver, float filterRadius) {\n float sum = 0.0;\n for (int i = 0; i < PCF_NUM_SAMPLES; i++) {\n float depth = unpackRGBAToDepth(texture2D(shadowMap, uv + poissonDisk[ i ] * filterRadius));\n if (zReceiver <= depth) sum += 1.0;\n }\n for (int i = 0; i < PCF_NUM_SAMPLES; i++) {\n float depth = unpackRGBAToDepth(texture2D(shadowMap, uv + -poissonDisk[ i ].yx * filterRadius));\n if (zReceiver <= depth) sum += 1.0;\n }\n return sum / (2.0 * float(PCF_NUM_SAMPLES));\n}\n\nfloat PCSS(sampler2D shadowMap, vec4 coords) {\n vec2 uv = coords.xy;\n float zReceiver = coords.z; // Assumed to be eye-space z in this code\n initPoissonSamples(uv);\n float avgBlockerDepth = findBlocker(shadowMap, uv, zReceiver);\n if (avgBlockerDepth == -1.0) return 1.0;\n float penumbraRatio = penumbraSize(zReceiver, avgBlockerDepth);\n float filterRadius = penumbraRatio * LIGHT_SIZE_UV * NEAR_PLANE / zReceiver;\n return PCF_Filter(shadowMap, uv, zReceiver, filterRadius);\n}`)({...e})),t=t.replace("#if defined( SHADOWMAP_TYPE_PCF )","\nreturn PCSS(shadowMap, shadowCoord);\n#if defined( SHADOWMAP_TYPE_PCF )"),a.ShaderChunk.shadowmap_pars_fragment=t}};function Zp(e){const t=e+"BufferGeometry";return i.forwardRef((({args:e,children:n,...s},a)=>i.createElement("mesh",(0,r.c)({ref:a},s),i.createElement(t,{attach:"geometry",args:e}),n)))}const $p=Zp("box"),ef=Zp("circle"),tf=Zp("cone"),nf=Zp("cylinder"),rf=Zp("sphere"),sf=Zp("plane"),af=Zp("tube"),of=Zp("torus"),lf=Zp("torusKnot"),cf=Zp("tetrahedron"),hf=Zp("ring"),uf=Zp("polyhedron"),df=Zp("icosahedron"),pf=Zp("octahedron"),ff=Zp("dodecahedron"),mf=Zp("extrude"),gf=Zp("lathe"),Af=1e-5;const vf=i.forwardRef((function({args:[e=1,t=1,n=1]=[],radius:s=.05,steps:o=1,smoothness:l=4,children:c,...h},u){const d=i.useMemo((()=>function(e,t,n){const r=new a.Shape,i=n-Af;return r.absarc(Af,Af,Af,-Math.PI/2,-Math.PI,!0),r.absarc(Af,t-2*i,Af,Math.PI,Math.PI/2,!0),r.absarc(e-2*i,t-2*i,Af,Math.PI/2,0,!0),r.absarc(e-2*i,Af,Af,0,-Math.PI/2,!0),r}(e,t,s)),[e,t,s]),p=i.useMemo((()=>({depth:n-2*s,bevelEnabled:!0,bevelSegments:2*l,steps:o,bevelSize:s-Af,bevelThickness:s,curveSegments:l})),[n,s,l]),f=i.useRef();return i.useLayoutEffect((()=>{f.current&&f.current.center()}),[d,p]),i.createElement("mesh",(0,r.c)({ref:u},h),i.createElement("extrudeBufferGeometry",{attach:"geometry",ref:f,args:[d,p]}),c)}));function yf(){const e=new a.BufferGeometry,t=new Float32Array([-1,-1,3,-1,-1,3]);return e.setAttribute("position",new a.BufferAttribute(t,2)),e}const xf=i.forwardRef((function({children:e,...t},n){const s=i.useMemo(yf,[]);return i.createElement("mesh",(0,r.c)({ref:n,geometry:s,frustumCulled:!1},t),e)})),bf=i.forwardRef((function({children:e,alignTop:t,...n},s){const o=i.useRef(null),l=i.useRef(null);return i.useLayoutEffect((()=>{o.current.position.set(0,0,0),o.current.updateWorldMatrix(!0,!0);const e=(new a.Box3).setFromObject(l.current),n=new a.Vector3,r=new a.Sphere,i=e.max.y-e.min.y;e.getCenter(n),e.getBoundingSphere(r),o.current.position.set(-n.x,-n.y+(t?i/2:0),-n.z)}),[e]),i.createElement("group",(0,r.c)({ref:s},n),i.createElement("group",{ref:o},i.createElement("group",{ref:l},e)))})),Ef=e=>e&&e.isOrthographicCamera,_f=e=>e&&e.isBox3,Sf=i.createContext(null);function Mf({children:e,damping:t=6,fit:n,clip:r,observe:s,margin:l=1.2,eps:c=.01,onFit:h}){const u=i.useRef(null),{camera:d,invalidate:p,size:f,controls:m}=(0,o.useThree)(),g=i.useRef(h);function A(e,t){return Math.abs(e.x-t.x)({animating:!1,focus:new a.Vector3,camera:new a.Vector3,zoom:1}))),[x]=i.useState((()=>({focus:new a.Vector3,camera:new a.Vector3,zoom:1}))),[b]=i.useState((()=>new a.Box3)),E=i.useMemo((()=>{function e(){const e=b.getSize(new a.Vector3),t=b.getCenter(new a.Vector3),n=Math.max(e.x,e.y,e.z),r=Ef(d)?4*n:n/(2*Math.atan(Math.PI*d.fov/360)),i=Ef(d)?4*n:r/d.aspect,s=l*Math.max(r,i);return{box:b,size:e,center:t,distance:s}}return{getSize:e,refresh(t){if(_f(t))b.copy(t);else{const e=t||u.current;e.updateWorldMatrix(!0,!0),b.setFromObject(e)}if(b.isEmpty()){const e=d.position.length()||10;b.setFromCenterAndSize(new a.Vector3,new a.Vector3(e,e,e))}if("OrthographicTrackballControls"===(null==m?void 0:m.constructor.name)){const{distance:t}=e(),n=d.position.clone().sub(m.target).normalize().multiplyScalar(t),r=m.target.clone().add(n);d.position.copy(r)}return this},clip(){const{distance:t}=e();return m&&(m.maxDistance=10*t),d.near=t/100,d.far=100*t,d.updateProjectionMatrix(),m&&m.update(),p(),this},fit(){y.camera.copy(d.position),m&&y.focus.copy(m.target);const{center:n,distance:r}=e(),i=n.clone().sub(d.position).normalize().multiplyScalar(r);if(x.camera.copy(n).sub(i),x.focus.copy(n),Ef(d)){y.zoom=d.zoom;let e=0,r=0;const i=[new a.Vector3(b.min.x,b.min.y,b.min.z),new a.Vector3(b.min.x,b.max.y,b.min.z),new a.Vector3(b.min.x,b.min.y,b.max.z),new a.Vector3(b.min.x,b.max.y,b.max.z),new a.Vector3(b.max.x,b.max.y,b.max.z),new a.Vector3(b.max.x,b.max.y,b.min.z),new a.Vector3(b.max.x,b.min.y,b.max.z),new a.Vector3(b.max.x,b.min.y,b.min.z)];n.applyMatrix4(d.matrixWorldInverse);for(const t of i)t.applyMatrix4(d.matrixWorldInverse),e=Math.max(e,Math.abs(t.y-n.y)),r=Math.max(r,Math.abs(t.x-n.x));e*=2,r*=2;const s=(d.top-d.bottom)/e,o=(d.right-d.left)/r;x.zoom=Math.min(s,o)/l,t||(d.zoom=x.zoom,d.updateProjectionMatrix())}return t?y.animating=!0:(d.position.copy(x.camera),d.lookAt(x.focus),m&&(m.target.copy(x.focus),m.update())),g.current&&g.current(this.getSize()),p(),this}}}),[b,d,m,l,t,p]);i.useLayoutEffect((()=>{if(m){const e=()=>y.animating=!1;return m.addEventListener("start",e),()=>m.removeEventListener("start",e)}}),[m]);const _=i.useRef(0);return i.useLayoutEffect((()=>{(s||0==_.current++)&&(E.refresh(),n&&E.fit(),r&&E.clip())}),[f,r,n,s]),(0,o.useFrame)(((e,n)=>{if(y.animating){if(v(y.focus,x.focus,t,n),v(y.camera,x.camera,t,n),y.zoom=a.MathUtils.damp(y.zoom,x.zoom,t,n),d.position.copy(y.camera),Ef(d)&&(d.zoom=y.zoom,d.updateProjectionMatrix()),m?(m.target.copy(y.focus),m.update()):d.lookAt(y.focus),p(),Ef(d)&&!(Math.abs(y.zoom-x.zoom)(((e,t,n)=>{t in e?Cf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class If{constructor(e=Math){Tf(this,"grad3",[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]]),Tf(this,"grad4",[[0,1,1,1],[0,1,1,-1],[0,1,-1,1],[0,1,-1,-1],[0,-1,1,1],[0,-1,1,-1],[0,-1,-1,1],[0,-1,-1,-1],[1,0,1,1],[1,0,1,-1],[1,0,-1,1],[1,0,-1,-1],[-1,0,1,1],[-1,0,1,-1],[-1,0,-1,1],[-1,0,-1,-1],[1,1,0,1],[1,1,0,-1],[1,-1,0,1],[1,-1,0,-1],[-1,1,0,1],[-1,1,0,-1],[-1,-1,0,1],[-1,-1,0,-1],[1,1,1,0],[1,1,-1,0],[1,-1,1,0],[1,-1,-1,0],[-1,1,1,0],[-1,1,-1,0],[-1,-1,1,0],[-1,-1,-1,0]]),Tf(this,"p",[]),Tf(this,"perm",[]),Tf(this,"simplex",[[0,1,2,3],[0,1,3,2],[0,0,0,0],[0,2,3,1],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,2,3,0],[0,2,1,3],[0,0,0,0],[0,3,1,2],[0,3,2,1],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,3,2,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,2,0,3],[0,0,0,0],[1,3,0,2],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,3,0,1],[2,3,1,0],[1,0,2,3],[1,0,3,2],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,0,3,1],[0,0,0,0],[2,1,3,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,0,1,3],[0,0,0,0],[0,0,0,0],[0,0,0,0],[3,0,1,2],[3,0,2,1],[0,0,0,0],[3,1,2,0],[2,1,0,3],[0,0,0,0],[0,0,0,0],[0,0,0,0],[3,1,0,2],[0,0,0,0],[3,2,0,1],[3,2,1,0]]),Tf(this,"dot",((e,t,n)=>e[0]*t+e[1]*n)),Tf(this,"dot3",((e,t,n,r)=>e[0]*t+e[1]*n+e[2]*r)),Tf(this,"dot4",((e,t,n,r,i)=>e[0]*t+e[1]*n+e[2]*r+e[3]*i)),Tf(this,"noise",((e,t)=>{let n,r,i;const s=(e+t)*(.5*(Math.sqrt(3)-1)),a=Math.floor(e+s),o=Math.floor(t+s),l=(3-Math.sqrt(3))/6,c=(a+o)*l,h=e-(a-c),u=t-(o-c);let d=0,p=1;h>u&&(d=1,p=0);const f=h-d+l,m=u-p+l,g=h-1+2*l,A=u-1+2*l,v=255&a,y=255&o,x=this.perm[v+this.perm[y]]%12,b=this.perm[v+d+this.perm[y+p]]%12,E=this.perm[v+1+this.perm[y+1]]%12;let _=.5-h*h-u*u;_<0?n=0:(_*=_,n=_*_*this.dot(this.grad3[x],h,u));let S=.5-f*f-m*m;S<0?r=0:(S*=S,r=S*S*this.dot(this.grad3[b],f,m));let M=.5-g*g-A*A;return M<0?i=0:(M*=M,i=M*M*this.dot(this.grad3[E],g,A)),70*(n+r+i)})),Tf(this,"noise3d",((e,t,n)=>{let r,i,s,a;const o=(e+t+n)*(1/3),l=Math.floor(e+o),c=Math.floor(t+o),h=Math.floor(n+o),u=1/6,d=(l+c+h)*u,p=e-(l-d),f=t-(c-d),m=n-(h-d);let g,A,v,y,x,b;p>=f?f>=m?(g=1,A=0,v=0,y=1,x=1,b=0):p>=m?(g=1,A=0,v=0,y=1,x=0,b=1):(g=0,A=0,v=1,y=1,x=0,b=1):f{const i=this.grad4,s=this.simplex,a=this.perm,o=(Math.sqrt(5)-1)/4,l=(5-Math.sqrt(5))/20;let c,h,u,d,p;const f=(e+t+n+r)*o,m=Math.floor(e+f),g=Math.floor(t+f),A=Math.floor(n+f),v=Math.floor(r+f),y=(m+g+A+v)*l,x=e-(m-y),b=t-(g-y),E=n-(A-y),_=r-(v-y),S=(x>b?32:0)+(x>E?16:0)+(b>E?8:0)+(x>_?4:0)+(b>_?2:0)+(E>_?1:0);let M,w,C,T,I,B,R,P,D,L,F,U;M=s[S][0]>=3?1:0,w=s[S][1]>=3?1:0,C=s[S][2]>=3?1:0,T=s[S][3]>=3?1:0,I=s[S][0]>=2?1:0,B=s[S][1]>=2?1:0,R=s[S][2]>=2?1:0,P=s[S][3]>=2?1:0,D=s[S][0]>=1?1:0,L=s[S][1]>=1?1:0,F=s[S][2]>=1?1:0,U=s[S][3]>=1?1:0;const O=x-M+l,N=b-w+l,k=E-C+l,G=_-T+l,z=x-I+2*l,Q=b-B+2*l,V=E-R+2*l,H=_-P+2*l,j=x-D+3*l,W=b-L+3*l,X=E-F+3*l,Y=_-U+3*l,q=x-1+4*l,K=b-1+4*l,J=E-1+4*l,Z=_-1+4*l,$=255&m,ee=255&g,te=255&A,ne=255&v,re=a[$+a[ee+a[te+a[ne]]]]%32,ie=a[$+M+a[ee+w+a[te+C+a[ne+T]]]]%32,se=a[$+I+a[ee+B+a[te+R+a[ne+P]]]]%32,ae=a[$+D+a[ee+L+a[te+F+a[ne+U]]]]%32,oe=a[$+1+a[ee+1+a[te+1+a[ne+1]]]]%32;let le=.6-x*x-b*b-E*E-_*_;le<0?c=0:(le*=le,c=le*le*this.dot4(i[re],x,b,E,_));let ce=.6-O*O-N*N-k*k-G*G;ce<0?h=0:(ce*=ce,h=ce*ce*this.dot4(i[ie],O,N,k,G));let he=.6-z*z-Q*Q-V*V-H*H;he<0?u=0:(he*=he,u=he*he*this.dot4(i[se],z,Q,V,H));let ue=.6-j*j-W*W-X*X-Y*Y;ue<0?d=0:(ue*=ue,d=ue*ue*this.dot4(i[ae],j,W,X,Y));let de=.6-q*q-K*K-J*J-Z*Z;return de<0?p=0:(de*=de,p=de*de*this.dot4(i[oe],q,K,J,Z)),27*(c+h+u+d+p)}));for(let t=0;t<256;t++)this.p[t]=Math.floor(256*e.random());for(let t=0;t<512;t++)this.perm[t]=this.p[255&t]}}const Bf=i.forwardRef((({intensity:e=1,decay:t,decayRate:n=.65,maxYaw:r=.1,maxPitch:s=.1,maxRoll:a=.1,yawFrequency:l=.1,pitchFrequency:c=.1,rollFrequency:h=.1,controls:u},d)=>{const p=(0,o.useThree)((e=>e.camera)),f=(0,o.useThree)((e=>e.controls)),m=i.useRef(e),g=i.useRef(p.rotation.clone()),[A]=i.useState((()=>new If)),[v]=i.useState((()=>new If)),[y]=i.useState((()=>new If)),x=()=>{(m.current<0||m.current>1)&&(m.current=m.current<0?0:1)};return i.useImperativeHandle(d,(()=>({getIntensity:()=>m.current,setIntensity:e=>{m.current=e,x()}})),[]),i.useEffect((()=>{const e=f||(null==u?void 0:u.current),t=()=>{g.current=p.rotation.clone()};return null==e||e.addEventListener("change",t),()=>{null==e||e.removeEventListener("change",t)}}),[u,f]),(0,o.useFrame)((({clock:e},i)=>{const o=Math.pow(m.current,2),u=r*o*A.noise(e.elapsedTime*l,1),d=s*o*v.noise(e.elapsedTime*c,1),f=a*o*y.noise(e.elapsedTime*h,1);p.rotation.set(g.current.x+d,g.current.y+u,g.current.z+f),t&&m.current>0&&(m.current-=n*i,x())})),null})),Rf=i.forwardRef((({children:e,speed:t=1,rotationIntensity:n=1,floatIntensity:r=1,...s},a)=>{const l=i.useRef(null),c=i.useRef(1e4*Math.random());return(0,o.useFrame)((e=>{const i=c.current+e.clock.getElapsedTime();l.current.rotation.x=Math.cos(i/4*t)/8*n,l.current.rotation.y=Math.sin(i/4*t)/8*n,l.current.rotation.z=Math.sin(i/4*t)/20*n,l.current.position.y=Math.sin(i/4*t)/10*r})),i.createElement("group",s,i.createElement("group",{ref:w([l,a])},e))}));class Pf extends a.DataTextureLoader{constructor(e){super(e),this.type=a.HalfFloatType}parse(e){const t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},n=function(e,t,n){t=t||1024;let r=e.pos,i=-1,s=0,a="",o=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));for(;0>(i=o.indexOf("\n"))&&s=e.byteLength||!(l=n(e)))return t(1,"no header found");if(!(c=l.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(o.valid|=1,o.programtype=c[1],o.string+=l+"\n";l=n(e),!1!==l;)if(o.string+=l+"\n","#"!==l.charAt(0)){if((c=l.match(r))&&(o.gamma=parseFloat(c[1])),(c=l.match(i))&&(o.exposure=parseFloat(c[1])),(c=l.match(s))&&(o.valid|=2,o.format=c[1]),(c=l.match(a))&&(o.valid|=4,o.height=parseInt(c[1],10),o.width=parseInt(c[2],10)),2&o.valid&&4&o.valid)break}else o.comments+=l+"\n";return 2&o.valid?4&o.valid?o:t(3,"missing image size specifier"):t(3,"missing format specifier")}(s);if(-1!==o){const e=o.width,n=o.height,l=function(e,n,r){const i=n;if(i<8||i>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(i!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");const s=new Uint8Array(4*n*r);if(!s.length)return t(4,"unable to allocate buffer space");let a=0,o=0;const l=4*i,c=new Uint8Array(4),h=new Uint8Array(l);let u=r;for(;u>0&&oe.byteLength)return t(1);if(c[0]=e[o++],c[1]=e[o++],c[2]=e[o++],c[3]=e[o++],2!=c[0]||2!=c[1]||(c[2]<<8|c[3])!=i)return t(3,"bad rgbe scanline format");let n,r=0;for(;r128;if(i&&(n-=128),0===n||r+n>l)return t(3,"bad scanline data");if(i){const t=e[o++];for(let e=0;e{return(t=e).current&&t.current.isScene?e.current:e;var t};function Uf(e){return e.map?i.createElement(Of,e):e.children?i.createElement(Nf,e):i.createElement(kf,e)}function Of({scene:e,background:t=!1,map:n}){const r=(0,o.useThree)((e=>e.scene));return i.useLayoutEffect((()=>{if(n){const i=Ff(e||r),s=i.background,a=i.environment;return"only"!==t&&(i.environment=n),t&&(i.background=n),()=>{"only"!==t&&(i.environment=a),t&&(i.background=s)}}}),[e,n]),null}function Nf({children:e,near:t=1,far:n=1e3,resolution:r=256,frames:s=1,background:l=!1,scene:c,files:h,path:u,preset:d,extensions:p}){const f=(0,o.useThree)((e=>e.gl)),m=(0,o.useThree)((e=>e.scene)),g=i.useRef(null),[A]=i.useState((()=>new a.Scene)),v=i.useMemo((()=>{const e=new a.WebGLCubeRenderTarget(r);return e.texture.type=a.HalfFloatType,e}),[r]);i.useLayoutEffect((()=>{1===s&&g.current.update(f,A);const e=Ff(c||m),t=e.background,n=e.environment;return"only"!==l&&(e.environment=v.texture),l&&(e.background=v.texture),()=>{"only"!==l&&(e.environment=n),l&&(e.background=t)}}),[e,c]);let y=1;return(0,o.useFrame)((()=>{(s===1/0||ye.scene)),h=Array.isArray(t),u=h?a.CubeTextureLoader:Pf,d=(0,o.useLoader)(u,h?[t]:t,(e=>{e.setPath(n),null==e.setDataType||e.setDataType(a.FloatType),l&&l(e)})),p=h?d[0]:d;return p.mapping=h?a.CubeReflectionMapping:a.EquirectangularReflectionMapping,i.useLayoutEffect((()=>{const t=Ff(s||c),n=t.background,r=t.environment;return"only"!==e&&(t.environment=p),e&&(t.background=p),()=>{"only"!==e&&(t.environment=r),e&&(t.background=n)}}),[p,e,s]),null}const Gf={uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:"\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ",fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform float h;\n\n varying vec2 vUv;\n\n void main() {\n\n \tvec4 sum = vec4( 0.0 );\n\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;\n\n \tgl_FragColor = sum;\n\n }\n "},zf={uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:"\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ",fragmentShader:"\n\n uniform sampler2D tDiffuse;\n uniform float v;\n\n varying vec2 vUv;\n\n void main() {\n\n vec4 sum = vec4( 0.0 );\n\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;\n\n gl_FragColor = sum;\n\n }\n "},Qf=i.forwardRef((({scale:e,frames:t=1/0,opacity:n=1,width:s=1,height:l=1,blur:c=1,far:h=10,resolution:u=256,smooth:d=!0,color:p="#000000",...f},m)=>{const g=(0,o.useThree)((({scene:e})=>e)),A=(0,o.useThree)((({gl:e})=>e)),v=i.useRef(null);s*=Array.isArray(e)?e[0]:e||1,l*=Array.isArray(e)?e[1]:e||1;const[y,x,b,E,_,S,M]=i.useMemo((()=>{const e=new a.WebGLRenderTarget(u,u),t=new a.WebGLRenderTarget(u,u);t.texture.generateMipmaps=e.texture.generateMipmaps=!1;const n=new a.PlaneBufferGeometry(s,l).rotateX(Math.PI/2),r=new a.Mesh(n),i=new a.MeshDepthMaterial;i.depthTest=i.depthWrite=!1,i.onBeforeCompile=e=>{e.uniforms={...e.uniforms,ucolor:{value:new a.Color(p).convertSRGBToLinear()}},e.fragmentShader=e.fragmentShader.replace("void main() {","uniform vec3 ucolor;\n void main() {\n "),e.fragmentShader=e.fragmentShader.replace("vec4( vec3( 1.0 - fragCoordZ ), opacity );","vec4( ucolor, ( 1.0 - fragCoordZ ) * 1.0 );")};const o=new a.ShaderMaterial(Gf),c=new a.ShaderMaterial(zf);return c.depthTest=o.depthTest=!1,[e,n,i,r,o,c,t]}),[u,s,l,e]),w=i.useCallback((e=>{E.visible=!0,E.material=_,_.uniforms.tDiffuse.value=y.texture,_.uniforms.h.value=1*e/256,A.setRenderTarget(M),A.render(E,v.current),E.material=S,S.uniforms.tDiffuse.value=M.texture,S.uniforms.v.value=1*e/256,A.setRenderTarget(y),A.render(E,v.current),E.visible=!1}),[]);let C=0;return(0,o.useFrame)((()=>{if(v.current&&(t===1/0||Ce.camera)),g=(0,o.useThree)((e=>e.controls)),A=i.useRef(null),v=i.useRef(null),[{radius:y,width:x,height:b},E]=i.useState({radius:0,width:0,height:0});return i.useLayoutEffect((()=>{A.current.position.set(0,0,0),A.current.updateWorldMatrix(!0,!0);const e=(new a.Box3).setFromObject(v.current),t=new a.Vector3,n=new a.Sphere,r=e.max.y-e.min.y,i=e.max.x-e.min.x;e.getCenter(t),e.getBoundingSphere(n),E({radius:n.radius,width:i,height:r}),A.current.position.set(-t.x,-t.y+r/2,-t.z)}),[e]),i.useLayoutEffect((()=>{if(s){const e=y/(b>x?1.5:2.5);m.position.set(0,.5*y,2.5*y),m.near=.1,m.far=Math.max(5e3,4*y),m.lookAt(0,e,0);const n=g||(null==t?void 0:t.current);n&&(n.target.set(0,e,0),n.update())}}),[g,y,b,x,s]),i.createElement("group",p,i.createElement("group",{ref:A},i.createElement("group",{ref:v},e)),d&&i.createElement(Qf,(0,r.c)({scale:2*y,far:y/2},d)),l&&i.createElement(Uf,{preset:l}),i.createElement("ambientLight",{intensity:c/3}),i.createElement("spotLight",{penumbra:1,position:[f.main[0]*y,f.main[1]*y,f.main[2]*y],intensity:2*c,castShadow:n,"shadow-bias":u}),i.createElement("pointLight",{position:[f.fill[0]*y,f.fill[1]*y,f.fill[2]*y],intensity:c}))}const jf=e=>0===e?0:Math.pow(2,10*e-10);function Wf({children:e,floor:t=.25,segments:n=20,receiveShadow:r,...s}){const a=i.useRef(null);return i.useLayoutEffect((()=>{let e=0;const r=n/n/2,i=a.current.attributes.position;for(let s=0;s{const c=i.useMemo((()=>{const e=document.createElement("canvas");e.width=128,e.height=128;const r=e.getContext("2d"),i=r.createRadialGradient(e.width/2,e.height/2,0,e.width/2,e.height/2,e.width/2);return i.addColorStop(t,new a.Color(n).getStyle()),i.addColorStop(1,"rgba(0,0,0,0)"),r.fillStyle=i,r.fillRect(0,0,e.width,e.height),e}),[n,t]);return i.createElement("mesh",(0,r.c)({ref:l},o),i.createElement("planeBufferGeometry",{attach:"geometry",args:[1,1]}),i.createElement("meshBasicMaterial",{attach:"material",transparent:!0,opacity:s,fog:e},i.createElement("canvasTexture",{attach:"map",args:[c]})))}));(0,o.extend)({MeshReflectorMaterial:Wp});const Yf=i.forwardRef((({mixBlur:e=0,mixStrength:t=.5,resolution:n=256,blur:s=[0,0],args:l=[1,1],minDepthThreshold:c=.9,maxDepthThreshold:h=1,depthScale:u=0,depthToBlurRatioBias:d=.25,mirror:p=0,children:f,debug:m=0,distortion:g=1,mixContrast:A=1,distortionMap:v,...y},x)=>{i.useEffect((()=>{console.warn("Reflector has been deprecated and will be removed next major. Replace it with !")}),[]);const b=(0,o.useThree)((({gl:e})=>e)),E=(0,o.useThree)((({camera:e})=>e)),_=(0,o.useThree)((({scene:e})=>e)),S=(s=Array.isArray(s)?s:[s,s])[0]+s[1]>0,M=i.useRef(null),[C]=i.useState((()=>new a.Plane)),[T]=i.useState((()=>new a.Vector3)),[I]=i.useState((()=>new a.Vector3)),[B]=i.useState((()=>new a.Vector3)),[R]=i.useState((()=>new a.Matrix4)),[P]=i.useState((()=>new a.Vector3(0,0,-1))),[D]=i.useState((()=>new a.Vector4)),[L]=i.useState((()=>new a.Vector3)),[F]=i.useState((()=>new a.Vector3)),[U]=i.useState((()=>new a.Vector4)),[O]=i.useState((()=>new a.Matrix4)),[N]=i.useState((()=>new a.PerspectiveCamera)),k=i.useCallback((()=>{if(I.setFromMatrixPosition(M.current.matrixWorld),B.setFromMatrixPosition(E.matrixWorld),R.extractRotation(M.current.matrixWorld),T.set(0,0,1),T.applyMatrix4(R),L.subVectors(I,B),L.dot(T)>0)return;L.reflect(T).negate(),L.add(I),R.extractRotation(E.matrixWorld),P.set(0,0,-1),P.applyMatrix4(R),P.add(B),F.subVectors(I,P),F.reflect(T).negate(),F.add(I),N.position.copy(L),N.up.set(0,1,0),N.up.applyMatrix4(R),N.up.reflect(T),N.lookAt(F),N.far=E.far,N.updateMatrixWorld(),N.projectionMatrix.copy(E.projectionMatrix),O.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),O.multiply(N.projectionMatrix),O.multiply(N.matrixWorldInverse),O.multiply(M.current.matrixWorld),C.setFromNormalAndCoplanarPoint(T,I),C.applyMatrix4(N.matrixWorldInverse),D.set(C.normal.x,C.normal.y,C.normal.z,C.constant);const e=N.projectionMatrix;U.x=(Math.sign(D.x)+e.elements[8])/e.elements[0],U.y=(Math.sign(D.y)+e.elements[9])/e.elements[5],U.z=-1,U.w=(1+e.elements[10])/e.elements[14],D.multiplyScalar(2/D.dot(U)),e.elements[2]=D.x,e.elements[6]=D.y,e.elements[10]=D.z+1,e.elements[14]=D.w}),[]),[G,z,Q,V]=i.useMemo((()=>{const r={minFilter:a.LinearFilter,magFilter:a.LinearFilter,encoding:b.outputEncoding},i=new a.WebGLRenderTarget(n,n,r);i.depthBuffer=!0,i.depthTexture=new a.DepthTexture(n,n),i.depthTexture.format=a.DepthFormat,i.depthTexture.type=a.UnsignedShortType;const o=new a.WebGLRenderTarget(n,n,r);return[i,o,new jp({gl:b,resolution:n,width:s[0],height:s[1],minDepthThreshold:c,maxDepthThreshold:h,depthScale:u,depthToBlurRatioBias:d}),{mirror:p,textureMatrix:O,mixBlur:e,tDiffuse:i.texture,tDepth:i.depthTexture,tDiffuseBlur:o.texture,hasBlur:S,mixStrength:t,minDepthThreshold:c,maxDepthThreshold:h,depthScale:u,depthToBlurRatioBias:d,transparent:!0,debug:m,distortion:g,distortionMap:v,mixContrast:A,"defines-USE_BLUR":S?"":void 0,"defines-USE_DEPTH":u>0?"":void 0,"defines-USE_DISTORTION":v?"":void 0}]}),[b,s,O,n,p,S,e,t,c,h,u,d,m,g,v,A]);return(0,o.useFrame)((()=>{if(null==M||!M.current)return;M.current.visible=!1;const e=b.xr.enabled,t=b.shadowMap.autoUpdate;k(),b.xr.enabled=!1,b.shadowMap.autoUpdate=!1,b.setRenderTarget(G),b.state.buffers.depth.setMask(!0),b.autoClear||b.clear(),b.render(_,N),S&&Q.render(b,G,z),b.xr.enabled=e,b.shadowMap.autoUpdate=t,M.current.visible=!0,b.setRenderTarget(null)})),i.createElement("mesh",(0,r.c)({ref:w([M,x])},y),i.createElement("planeBufferGeometry",{args:l}),f?f("meshReflectorMaterial",V):i.createElement("meshReflectorMaterial",V))}));class qf extends a.ShaderMaterial{constructor(){super({uniforms:{depth:{value:null},opacity:{value:1},attenuation:{value:2.5},anglePower:{value:12},spotPosition:{value:new a.Vector3(0,0,0)},lightColor:{value:new a.Color("white")},cameraNear:{value:0},cameraFar:{value:1},resolution:{value:new a.Vector2(0,0)}},transparent:!0,depthWrite:!1,vertexShader:"\n varying vec3 vNormal;\n varying vec3 vWorldPosition;\n varying float vViewZ;\n varying float vIntensity;\n uniform vec3 spotPosition;\n uniform float attenuation; \n\n void main() {\n // compute intensity\n vNormal = normalize( normalMatrix * normal );\n vec4 worldPosition\t= modelMatrix * vec4( position, 1.0 );\n vWorldPosition = worldPosition.xyz;\n vec4 viewPosition = viewMatrix * worldPosition;\n vViewZ = viewPosition.z;\n float intensity\t= distance(worldPosition.xyz, spotPosition) / attenuation;\n intensity\t= 1.0 - clamp(intensity, 0.0, 1.0);\n vIntensity = intensity; \n // set gl_Position\n gl_Position\t= projectionMatrix * viewPosition;\n\n }",fragmentShader:"\n #include \n\n varying vec3 vNormal;\n varying vec3 vWorldPosition;\n uniform vec3 lightColor;\n uniform vec3 spotPosition;\n uniform float attenuation;\n uniform float anglePower;\n uniform sampler2D depth;\n uniform vec2 resolution;\n uniform float cameraNear;\n uniform float cameraFar;\n varying float vViewZ;\n varying float vIntensity;\n uniform float opacity;\n\n float readDepth( sampler2D depthSampler, vec2 coord ) {\n float fragCoordZ = texture2D( depthSampler, coord ).x;\n float viewZ = perspectiveDepthToViewZ(fragCoordZ, cameraNear, cameraFar);\n return viewZ;\n }\n\n void main() {\n float d = 1.0;\n bool isSoft = resolution[0] > 0.0 && resolution[1] > 0.0;\n if (isSoft) {\n vec2 sUv = gl_FragCoord.xy / resolution;\n d = readDepth(depth, sUv);\n }\n float intensity = vIntensity;\n vec3 normal\t= vec3(vNormal.x, vNormal.y, abs(vNormal.z));\n float angleIntensity\t= pow( dot(normal, vec3(0.0, 0.0, 1.0)), anglePower );\n intensity\t*= angleIntensity;\n // fades when z is close to sampled depth, meaning the cone is intersecting existing geometry\n if (isSoft) {\n intensity\t*= smoothstep(0., 1., vViewZ - d);\n }\n gl_FragColor = vec4(lightColor, intensity * opacity);\n\n #include \n\t #include \n }"})}}const Kf=new a.Vector3,Jf=i.forwardRef((({opacity:e=1,radiusTop:t,radiusBottom:n,depthBuffer:s,color:l="white",distance:c=5,angle:h=.15,attenuation:u=5,anglePower:d=5,...p},f)=>{const m=i.useRef(null),g=(0,o.useThree)((e=>e.size)),A=(0,o.useThree)((e=>e.camera)),v=(0,o.useThree)((e=>e.viewport.dpr)),[y]=i.useState((()=>new qf));t=void 0===t?.1:t,n=void 0===n?7*h:n,(0,o.useFrame)((()=>{y.uniforms.spotPosition.value.copy(m.current.getWorldPosition(Kf)),m.current.lookAt(m.current.parent.target.getWorldPosition(Kf))}));const x=i.useMemo((()=>{const e=new a.CylinderGeometry(t,n,c,128,64,!0);return e.applyMatrix4((new a.Matrix4).makeTranslation(0,-c/2,0)),e.applyMatrix4((new a.Matrix4).makeRotationX(-Math.PI/2)),e}),[h,c,t,n]);return i.createElement("spotLight",(0,r.c)({ref:f,angle:h,color:l,distance:c},p),i.createElement("mesh",{ref:m,geometry:x,raycast:()=>null},i.createElement("primitive",{object:y,attach:"material","uniforms-opacity-value":e,"uniforms-lightColor-value":l,"uniforms-attenuation-value":u,"uniforms-anglePower-value":d,"uniforms-depth-value":s,"uniforms-cameraNear-value":A.near,"uniforms-cameraFar-value":A.far,"uniforms-resolution-value":s?[g.width*v,g.height*v]:[0,0]})))})),Zf=i.forwardRef((({args:e,map:t,toneMapped:n=!1,color:s="white",form:l="rect",intensity:c=1,scale:h=1,target:u,children:d,...p},f)=>{const m=i.useRef(null);return i.useLayoutEffect((()=>{d||p.material||((0,o.applyProps)(m.current.material,{color:s}),m.current.material.color.multiplyScalar(c))}),[s,c,d,p.material]),i.useLayoutEffect((()=>{u&&m.current.lookAt(Array.isArray(u)?new a.Vector3(...u):u)}),[u]),h=Array.isArray(h)&&2===h.length?[h[0],h[1],1]:h,i.createElement("mesh",(0,r.c)({ref:w([m,f]),scale:h},p),"circle"===l?i.createElement("ringGeometry",{args:[0,1,64]}):"ring"===l?i.createElement("ringGeometry",{args:[.5,1,64]}):"rect"===l?i.createElement("planeGeometry",null):i.createElement(l,{args:e}),d||(p.material?null:i.createElement("meshBasicMaterial",{toneMapped:n,map:t,side:a.DoubleSide})))}));var $f=Object.defineProperty,em=(e,t,n)=>(((e,t,n)=>{t in e?$f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const tm={uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new a.Vector3},up:{value:new a.Vector3(0,1,0)}},vertexShader:"\n uniform vec3 sunPosition;\n uniform float rayleigh;\n uniform float turbidity;\n uniform float mieCoefficient;\n uniform vec3 up;\n\n varying vec3 vWorldPosition;\n varying vec3 vSunDirection;\n varying float vSunfade;\n varying vec3 vBetaR;\n varying vec3 vBetaM;\n varying float vSunE;\n\n // constants for atmospheric scattering\n const float e = 2.71828182845904523536028747135266249775724709369995957;\n const float pi = 3.141592653589793238462643383279502884197169;\n\n // wavelength of used primaries, according to preetham\n const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );\n // this pre-calcuation replaces older TotalRayleigh(vec3 lambda) function:\n // (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn))\n const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );\n\n // mie stuff\n // K coefficient for the primaries\n const float v = 4.0;\n const vec3 K = vec3( 0.686, 0.678, 0.666 );\n // MieConst = pi * pow( ( 2.0 * pi ) / lambda, vec3( v - 2.0 ) ) * K\n const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );\n\n // earth shadow hack\n // cutoffAngle = pi / 1.95;\n const float cutoffAngle = 1.6110731556870734;\n const float steepness = 1.5;\n const float EE = 1000.0;\n\n float sunIntensity( float zenithAngleCos ) {\n zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );\n return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );\n }\n\n vec3 totalMie( float T ) {\n float c = ( 0.2 * T ) * 10E-18;\n return 0.434 * c * MieConst;\n }\n\n void main() {\n\n vec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n vWorldPosition = worldPosition.xyz;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n gl_Position.z = gl_Position.w; // set z to camera.far\n\n vSunDirection = normalize( sunPosition );\n\n vSunE = sunIntensity( dot( vSunDirection, up ) );\n\n vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );\n\n float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );\n\n // extinction (absorbtion + out scattering)\n // rayleigh coefficients\n vBetaR = totalRayleigh * rayleighCoefficient;\n\n // mie coefficients\n vBetaM = totalMie( turbidity ) * mieCoefficient;\n\n }\n ",fragmentShader:`\n varying vec3 vWorldPosition;\n varying vec3 vSunDirection;\n varying float vSunfade;\n varying vec3 vBetaR;\n varying vec3 vBetaM;\n varying float vSunE;\n\n uniform float mieDirectionalG;\n uniform vec3 up;\n\n const vec3 cameraPos = vec3( 0.0, 0.0, 0.0 );\n\n // constants for atmospheric scattering\n const float pi = 3.141592653589793238462643383279502884197169;\n\n const float n = 1.0003; // refractive index of air\n const float N = 2.545E25; // number of molecules per unit volume for air at 288.15K and 1013mb (sea level -45 celsius)\n\n // optical length at zenith for molecules\n const float rayleighZenithLength = 8.4E3;\n const float mieZenithLength = 1.25E3;\n // 66 arc seconds -> degrees, and the cosine of that\n const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;\n\n // 3.0 / ( 16.0 * pi )\n const float THREE_OVER_SIXTEENPI = 0.05968310365946075;\n // 1.0 / ( 4.0 * pi )\n const float ONE_OVER_FOURPI = 0.07957747154594767;\n\n float rayleighPhase( float cosTheta ) {\n return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );\n }\n\n float hgPhase( float cosTheta, float g ) {\n float g2 = pow( g, 2.0 );\n float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );\n return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );\n }\n\n void main() {\n\n vec3 direction = normalize( vWorldPosition - cameraPos );\n\n // optical length\n // cutoff angle at 90 to avoid singularity in next formula.\n float zenithAngle = acos( max( 0.0, dot( up, direction ) ) );\n float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );\n float sR = rayleighZenithLength * inverse;\n float sM = mieZenithLength * inverse;\n\n // combined extinction factor\n vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );\n\n // in scattering\n float cosTheta = dot( direction, vSunDirection );\n\n float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );\n vec3 betaRTheta = vBetaR * rPhase;\n\n float mPhase = hgPhase( cosTheta, mieDirectionalG );\n vec3 betaMTheta = vBetaM * mPhase;\n\n vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );\n Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );\n\n // nightsky\n float theta = acos( direction.y ); // elevation --\x3e y-axis, [-pi/2, pi/2]\n float phi = atan( direction.z, direction.x ); // azimuth --\x3e x-axis [-pi/2, pi/2]\n vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );\n vec3 L0 = vec3( 0.1 ) * Fex;\n\n // composition + solar disc\n float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );\n L0 += ( vSunE * 19000.0 * Fex ) * sundisk;\n\n vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );\n\n vec3 retColor = pow( texColor, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );\n\n gl_FragColor = vec4( retColor, 1.0 );\n\n #include \n #include <${Kc>=154?"colorspace_fragment":"encodings_fragment"}>\n\n }\n `},nm=new a.ShaderMaterial({name:"SkyShader",fragmentShader:tm.fragmentShader,vertexShader:tm.vertexShader,uniforms:a.UniformsUtils.clone(tm.uniforms),side:a.BackSide,depthWrite:!1});class rm extends a.Mesh{constructor(){super(new a.BoxGeometry(1,1,1),nm)}}function im(e,t,n=new a.Vector3){const r=Math.PI*(e-.5),i=2*Math.PI*(t-.5);return n.x=Math.cos(i),n.y=Math.sin(r),n.z=Math.sin(i),n}em(rm,"SkyShader",tm),em(rm,"material",nm);const sm=i.forwardRef((({inclination:e=.6,azimuth:t=.1,distance:n=1e3,mieCoefficient:s=.005,mieDirectionalG:o=.8,rayleigh:l=.5,turbidity:c=10,sunPosition:h=im(e,t),...u},d)=>{const p=i.useMemo((()=>(new a.Vector3).setScalar(n)),[n]),[f]=i.useState((()=>new rm));return i.createElement("primitive",(0,r.c)({dispose:void 0,object:f,ref:d,"material-uniforms-mieCoefficient-value":s,"material-uniforms-mieDirectionalG-value":o,"material-uniforms-rayleigh-value":l,"material-uniforms-sunPosition-value":h,"material-uniforms-turbidity-value":c,scale:p},u))}));class am extends a.ShaderMaterial{constructor(){super({uniforms:{time:{value:0},fade:{value:1}},vertexShader:"\n uniform float time;\n attribute float size;\n varying vec3 vColor;\n void main() {\n vColor = color;\n vec4 mvPosition = modelViewMatrix * vec4(position, 0.5);\n gl_PointSize = size * (30.0 / -mvPosition.z) * (3.0 + sin(mvPosition.x + 2.0 * time + 100.0));\n gl_Position = projectionMatrix * mvPosition;\n }",fragmentShader:"\n uniform sampler2D pointTexture;\n uniform float fade;\n varying vec3 vColor;\n void main() {\n float opacity = 1.0;\n if (fade == 1.0) {\n float d = distance(gl_PointCoord, vec2(0.5, 0.5));\n opacity = 1.0 / (1.0 + exp(16.0 * (d - 0.25)));\n }\n gl_FragColor = vec4(vColor, opacity);\n\n #include \n\t #include \n }"})}}const om=e=>(new a.Vector3).setFromSpherical(new a.Spherical(e,Math.acos(1-2*Math.random()),2*Math.random()*Math.PI)),lm=i.forwardRef((({radius:e=100,depth:t=50,count:n=5e3,saturation:r=0,factor:s=4,fade:l=!1},c)=>{const h=i.useRef(),[u,d,p]=i.useMemo((()=>{const i=[],o=[],l=Array.from({length:n},(()=>(.5+.5*Math.random())*s)),c=new a.Color;let h=e+t;const u=t/n;for(let e=0;eh.current&&(h.current.uniforms.time.value=e.clock.getElapsedTime())));const[f]=i.useState((()=>new am));return i.createElement("points",{ref:c},i.createElement("bufferGeometry",{attach:"geometry"},i.createElement("bufferAttribute",{attachObject:["attributes","position"],args:[u,3]}),i.createElement("bufferAttribute",{attachObject:["attributes","color"],args:[d,3]}),i.createElement("bufferAttribute",{attachObject:["attributes","size"],args:[p,1]})),i.createElement("primitive",{dispose:void 0,ref:h,object:f,attach:"material",blending:a.AdditiveBlending,"uniforms-fade-value":l,transparent:!0,vertexColors:!0}))})),cm="https://rawcdn.githack.com/pmndrs/drei-assets/9225a9f1fbd449d9411125c2f419b843d0308c9f/cloud.png";function hm({opacity:e=.5,speed:t=.4,width:n=10,depth:r=1.5,segments:s=20,texture:a=cm,color:l="#ffffff",depthTest:c=!0,...h}){const u=i.useRef(),d=Oa(a),p=i.useMemo((()=>[...new Array(s)].map(((e,r)=>({x:n/2-Math.random()*n,y:n/2-Math.random()*n,scale:.4+Math.sin((r+1)/s*Math.PI)*(10*(.2+Math.random())),density:Math.max(.2,Math.random()),rotation:Math.max(.002,.005*Math.random())*t})))),[n,s,t]);return(0,o.useFrame)((e=>{var t;return null==(t=u.current)?void 0:t.children.forEach(((t,n)=>{t.children[0].rotation.z+=p[n].rotation,t.children[0].scale.setScalar(p[n].scale+(1+Math.sin(e.clock.getElapsedTime()/10))/2*n/10)}))})),i.createElement("group",h,i.createElement("group",{position:[0,0,s/2*r],ref:u},p.map((({x:t,y:n,scale:s,density:a},o)=>i.createElement(Oi,{key:o,position:[t,n,-o*r]},i.createElement(sf,{scale:s,rotation:[0,0,0]},i.createElement("meshStandardMaterial",{map:d,transparent:!0,opacity:s/6*a*e,depthTest:c,color:l})))))))}const um="https://cdn.jsdelivr.net/gh/pmndrs/drei-assets@master/matcaps.json",dm="https://rawcdn.githack.com/emmelleppi/matcaps/9b36ccaaf0a24881a39062d05566c9e92be4aa0d";function pm(e=0,t=1024){const n=pa((()=>fetch(um).then((e=>e.json()))),["matcapList"]),r=n[0],s=i.useMemo((()=>Object.keys(n).length),[]),a=`${i.useMemo((()=>"string"==typeof e?e:"number"==typeof e?n[e]:null),[e])||r}${function(e){switch(e){case 64:return"-64px";case 128:return"-128px";case 256:return"-256px";case 512:return"-512px";default:return""}}(t)}.png`,o=`${dm}/${t}/${a}`;return[Oa(o),o,s]}const fm="https://rawcdn.githack.com/pmndrs/drei-assets/7a3104997e1576f83472829815b00880d88b32fb",mm="https://cdn.jsdelivr.net/gh/pmndrs/drei-assets@master/normals/normals.json";function gm(e=0,t={}){const{repeat:n=[1,1],anisotropy:r=1,offset:s=[0,0]}=t,o=pa((()=>fetch(mm).then((e=>e.json()))),["normalsList"]),l=i.useMemo((()=>Object.keys(o).length),[]),c=o[0],h=o[e]||c,u=`${fm}/normals/${h}`,d=Oa(u);return i.useLayoutEffect((()=>{d&&(d.wrapS=d.wrapT=a.RepeatWrapping,d.repeat=new a.Vector2(n[0],n[1]),d.offset=new a.Vector2(s[0],s[1]),d.anisotropy=r)}),[d,r,n,s]),[d,u,l]}const Am=new a.Matrix4,vm=new a.Matrix4,ym=[],xm=new a.Mesh;class bm extends a.Group{constructor(){super(),this.color=new a.Color("white"),this.instance={current:void 0},this.instanceKey={current:void 0}}get geometry(){var e;return null==(e=this.instance.current)?void 0:e.geometry}raycast(e,t){const n=this.instance.current;if(!n)return;if(!n.geometry||!n.material)return;xm.geometry=n.geometry;const r=n.matrixWorld;let i=n.userData.instances.indexOf(this.instanceKey);if(!(-1===i||i>n.count)){n.getMatrixAt(i,Am),vm.multiplyMatrices(r,Am),xm.matrixWorld=vm,xm.raycast(e,ym);for(let e=0,n=ym.length;e{const c=i.useRef(null),[h,u]=i.useState([]),[[d,p,f]]=i.useState((()=>[new Float32Array(3*n),Float32Array.from({length:3*n},(()=>1)),Float32Array.from({length:n},(()=>1))]));i.useLayoutEffect((()=>{c.current.geometry.drawRange.count=Math.min(n,void 0!==t?t:n,h.length)}),[h,t]),i.useEffect((()=>{c.current.geometry.attributes.position.needsUpdate=!0})),(0,o.useFrame)((()=>{for(c.current.updateMatrix(),c.current.updateMatrixWorld(),Mm.copy(c.current.matrixWorld).invert(),Em=0;Em{const e={};for(Em=0;Em({...e,[t]:e=>{var n,r,i;const s=null==(n=h[e.index])?void 0:n.current;return null==s||null==(r=s.__r3f)||null==(i=r.handlers)?void 0:i[t]({...e,object:s})}})),{})}),[e,h]),g=i.useMemo((()=>({subscribe:e=>(u((t=>[...t,e])),()=>u((t=>t.filter((t=>t.current!==e.current)))))})),[]);return i.createElement("points",(0,r.c)({matrixAutoUpdate:!1,ref:w([l,c])},m,s),i.createElement("bufferGeometry",null,i.createElement("bufferAttribute",{attachObject:["attributes","position"],count:d.length/3,array:d,itemSize:3,usage:a.DynamicDrawUsage}),i.createElement("bufferAttribute",{attachObject:["attributes","color"],count:p.length/3,array:p,itemSize:3,usage:a.DynamicDrawUsage}),i.createElement("bufferAttribute",{attachObject:["attributes","size"],count:f.length,array:f,itemSize:1,usage:a.DynamicDrawUsage})),i.createElement(Sm.Provider,{value:g},e))})),Tm=i.forwardRef((({children:e,...t},n)=>{i.useMemo((()=>(0,o.extend)({Position:bm})),[]);const s=i.useRef(),{subscribe:a}=i.useContext(Sm);return i.useLayoutEffect((()=>a(s)),[]),i.createElement("position",(0,r.c)({ref:w([n,s])},t),e)})),Im=i.forwardRef((({children:e,positions:t,colors:n,sizes:s,stride:l=3,...c},h)=>{const u=i.useRef(null);return(0,o.useFrame)((()=>{const e=u.current.geometry.attributes;e.position.needsUpdate=!0,n&&(e.color.needsUpdate=!0),s&&(e.size.needsUpdate=!0)})),i.createElement("points",(0,r.c)({ref:w([h,u])},c),i.createElement("bufferGeometry",null,i.createElement("bufferAttribute",{attachObject:["attributes","position"],count:t.length/l,array:t,itemSize:l,usage:a.DynamicDrawUsage}),n&&i.createElement("bufferAttribute",{attachObject:["attributes","color"],count:n.length/l,array:n,itemSize:3,usage:a.DynamicDrawUsage}),s&&i.createElement("bufferAttribute",{attachObject:["attributes","size"],count:s.length/l,array:s,itemSize:1,usage:a.DynamicDrawUsage})),e)})),Bm=i.forwardRef(((e,t)=>e.positions instanceof Float32Array?i.createElement(Im,(0,r.c)({},e,{ref:t})):i.createElement(Cm,(0,r.c)({},e,{ref:t}))));var Rm=n(3268),Pm=n.n(Rm);function Dm(e){return Lm(e.children,e.components)}function Lm(e,t,n){if(n=n||[],!t[0])return e(n);function r(r){return Lm(e,t.slice(1),n.concat([r]))}return"function"==typeof t[0]?t[0]({results:n,render:r}):(0,i.cloneElement)(t[0],{children:r})}let Fm,Um;Dm.propTypes={children:Pm().func.isRequired,components:Pm().arrayOf(Pm().oneOfType([Pm().element,Pm().func])).isRequired};const Om=i.createContext(null),Nm=new a.Matrix4,km=new a.Matrix4,Gm=new a.Matrix4;new a.Color;const zm=new a.Vector3,Qm=new a.Quaternion,Vm=new a.Vector3,Hm=i.forwardRef((({context:e,children:t,...n},s)=>{i.useMemo((()=>(0,o.extend)({Position:bm})),[]);const a=i.useRef(),{subscribe:l,getParent:c}=i.useContext(e||Om);return i.useLayoutEffect((()=>l(a)),[]),i.createElement("position",(0,r.c)({instance:c(),instanceKey:a,ref:w([s,a])},n),t)})),jm=i.forwardRef((({children:e,range:t,limit:n=1e3,frames:s=1/0,...l},c)=>{const[{context:h,instance:u}]=i.useState((()=>{const e=i.createContext(null);return{context:e,instance:i.forwardRef(((t,n)=>i.createElement(Hm,(0,r.c)({context:e},t,{ref:n}))))}})),d=i.useRef(null),[p,f]=i.useState([]),[[m,g]]=i.useState((()=>{const e=new Float32Array(16*n);for(Fm=0;Fm1)))]}));i.useLayoutEffect((()=>{d.current.count=d.current.instanceMatrix.updateRange.count=d.current.instanceColor.updateRange.count=Math.min(n,void 0!==t?t:n,p.length)}),[p,t]),i.useEffect((()=>{d.current.instanceMatrix.needsUpdate=!0}));let A=0;(0,o.useFrame)((()=>{if(s===1/0||A({getParent:()=>d,subscribe:e=>(f((t=>[...t,e])),()=>f((t=>t.filter((t=>t.current!==e.current)))))})),[]);return i.createElement("instancedMesh",(0,r.c)({userData:{instances:p},matrixAutoUpdate:!1,ref:w([c,d]),args:[null,null,0],raycast:()=>null},l),i.createElement("instancedBufferAttribute",{attach:"instanceMatrix",count:m.length/16,array:m,itemSize:16,usage:a.DynamicDrawUsage}),i.createElement("instancedBufferAttribute",{attach:"instanceColor",count:g.length/3,array:g,itemSize:3,usage:a.DynamicDrawUsage}),"function"==typeof e?i.createElement(h.Provider,{value:v},e(u)):i.createElement(Om.Provider,{value:v},e))}));function Wm({meshes:e,children:t,...n}){const s=Array.isArray(e);if(!s)for(const r of Object.keys(e))e[r].isMesh||delete e[r];return i.createElement(Dm,{components:(s?e:Object.values(e)).map((({geometry:e,material:t})=>i.createElement(jm,(0,r.c)({key:e.uuid,geometry:e,material:t},n))))},(n=>s?t(...n):t(Object.keys(e).filter((t=>e[t].isMesh)).reduce(((e,t,r)=>({...e,[t]:n[r]})),{}))))}const Xm=i.createContext(null),Ym=e=>e instanceof a.Vector3?e.toArray():e,qm=i.forwardRef(((e,t)=>{const{limit:n=1e3,lineWidth:s=1,children:l,...c}=e,[h,u]=i.useState([]),[d]=i.useState((()=>new os)),[p]=i.useState((()=>new zi)),[f]=i.useState((()=>new Gi)),[m]=i.useState((()=>new a.Vector2(512,512))),[g]=i.useState((()=>Array(6*n).fill(0))),[A]=i.useState((()=>Array(6*n).fill(0))),v=i.useMemo((()=>({subscribe:e=>(u((t=>[...t,e])),()=>u((t=>t.filter((t=>t.current!==e.current)))))})),[]);return(0,o.useFrame)((()=>{for(let i=0;i{const n=i.useContext(Xm);if(!n)throw"Segment must used inside Segments component.";const s=i.useRef();return i.useMemo((()=>(0,o.extend)({SegmentObject:Km})),[]),i.useLayoutEffect((()=>n.subscribe(s)),[]),i.createElement("segmentObject",(0,r.c)({ref:w([s,t])},e))})),Zm=i.forwardRef((({children:e,distances:t,...n},s)=>{const a=i.useRef(null);return i.useLayoutEffect((()=>{const{current:e}=a;e.levels.length=0,e.children.forEach(((n,r)=>e.levels.push({object:n,distance:t[r]})))})),(0,o.useFrame)((e=>{var t;return null==(t=a.current)?void 0:t.update(e.camera)})),i.createElement("lOD",(0,r.c)({ref:w([a,s])},n),e)}));function $m({all:e,scene:t,camera:n}){const r=(0,o.useThree)((({gl:e})=>e)),s=(0,o.useThree)((({camera:e})=>e)),l=(0,o.useThree)((({scene:e})=>e));return i.useLayoutEffect((()=>{const i=[];e&&(t||l).traverse((e=>{!1===e.visible&&(i.push(e),e.visible=!0)})),r.compile(t||l,n||s);const o=new a.WebGLCubeRenderTarget(128);new a.CubeCamera(.01,1e5,o).update(r,t||l),o.dispose(),i.forEach((e=>e.visible=!1))}),[]),null}function eg(){const e=(0,o.useThree)((e=>e.gl));return(0,i.useEffect)((()=>(e.shadowMap.autoUpdate=!1,e.shadowMap.needsUpdate=!0,()=>{e.shadowMap.autoUpdate=e.shadowMap.needsUpdate=!0})),[e.shadowMap]),null}const tg=new a.Matrix4,ng=new a.Ray,rg=new a.Sphere,ig=new a.Vector3;function sg(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;void 0!==r&&(null===n.boundingSphere&&n.computeBoundingSphere(),rg.copy(n.boundingSphere),rg.applyMatrix4(i),!1!==e.ray.intersectsSphere(rg)&&(tg.copy(i).invert(),ng.copy(e.ray).applyMatrix4(tg),null!==n.boundingBox&&null===ng.intersectBox(n.boundingBox,ig)||t.push({distance:ig.distanceTo(e.ray.origin),point:ig.clone(),object:this})))}function ag({pixelated:e}){const t=(0,o.useThree)((e=>e.gl)),n=(0,o.useThree)((e=>e.internal.active)),r=(0,o.useThree)((e=>e.performance.current)),s=(0,o.useThree)((e=>e.viewport.initialDpr)),a=(0,o.useThree)((e=>e.setDpr));return i.useEffect((()=>{const r=t.domElement;return()=>{n&&a(s),e&&r&&(r.style.imageRendering="auto")}}),[]),i.useEffect((()=>{a(r*s),e&&t.domElement&&(t.domElement.style.imageRendering=1===r?"auto":"pixelated")}),[r]),null}function og(){const e=(0,o.useThree)((e=>e.get)),t=(0,o.useThree)((e=>e.performance.current));return i.useEffect((()=>{const t=e().raycaster.enabled;return()=>{e().raycaster.enabled=t}}),[]),i.useEffect((()=>{e().raycaster.enabled=1===t}),[t]),null}},44644:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Canvas:()=>J,ReactThreeFiber:()=>E,_roots:()=>ie,act:()=>me,addAfterEffect:()=>V,addEffect:()=>Q,addTail:()=>H,advance:()=>oe,applyProps:()=>ce,context:()=>F,createPortal:()=>Ae,dispose:()=>fe,events:()=>X,extend:()=>P,invalidate:()=>ae,reconciler:()=>le,render:()=>ue,unmountComponentAtNode:()=>pe,useFrame:()=>$,useGraph:()=>te,useLoader:()=>re,useThree:()=>Z});var r=n(79224),i=n(11504),s=n(52584),a=n(19156),o=n(44408),l=n.n(o),c=n(14712),h=n(72144),u=n.n(h);const d=[];function p(e,t,n,r=0,i=!1){for(const a of t)if(u()(n,a.args)){if(i)return;if(a.error)throw a.error;if(a.response)return a.response;throw a.promise}const s={args:n,promise:e(...n).then((e=>s.response=null==e||e)).catch((e=>s.error=null!=e?e:"unknown error")).then((()=>{r>0&&setTimeout((()=>{const e=t.indexOf(s);-1!==e&&t.splice(e,1)}),r)}))};if(t.push(s),!i)throw s.promise}function f(e,...t){if(void 0===t||0===t.length)e.splice(0,e.length);else{const n=e.find((e=>u()(t,e.args)));if(n){const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}}function m(e,...t){return p(e,d,t,m.lifespan)}m.lifespan=0,m.clear=(...e)=>f(d,...e),m.preload=(e,...t)=>{p(e,d,t,m.lifespan,!0)},m.peek=(...e)=>{var t;return null==(t=d.find((t=>u()(e,t.args))))?void 0:t.response};var g=n(96068),A=n.n(g);function v(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:s}=void 0===e?{debounce:0,scroll:!1,offsetSize:!1}:e;const a=r||("undefined"==typeof window?class{}:window.ResizeObserver);if(!a)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,l]=(0,i.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=(0,i.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),h=t?"number"==typeof t?t:t.scroll:null,u=t?"number"==typeof t?t:t.resize:null,d=(0,i.useRef)(!1);(0,i.useEffect)((()=>(d.current=!0,()=>{d.current=!1})));const[p,f,m]=(0,i.useMemo)((()=>{const e=()=>{if(!c.current.element)return;const{left:e,top:t,width:n,height:r,bottom:i,right:a,x:o,y:h}=c.current.element.getBoundingClientRect(),u={left:e,top:t,width:n,height:r,bottom:i,right:a,x:o,y:h};c.current.element instanceof HTMLElement&&s&&(u.height=c.current.element.offsetHeight,u.width=c.current.element.offsetWidth),Object.freeze(u),d.current&&!b(c.current.lastBounds,u)&&l(c.current.lastBounds=u)};return[e,u?A()(e,u):e,h?A()(e,h):e]}),[l,s,h,u]);function g(){c.current.scrollContainers&&(c.current.scrollContainers.forEach((e=>e.removeEventListener("scroll",m,!0))),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function v(){c.current.element&&(c.current.resizeObserver=new a(m),c.current.resizeObserver.observe(c.current.element),n&&c.current.scrollContainers&&c.current.scrollContainers.forEach((e=>e.addEventListener("scroll",m,{capture:!0,passive:!0}))))}var x;return function(e,t){(0,i.useEffect)((()=>{if(t){const t=e;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",t,!0)}}}),[e,t])}(m,Boolean(n)),x=f,(0,i.useEffect)((()=>{const e=x;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[x]),(0,i.useEffect)((()=>{g(),v()}),[n,m,f]),(0,i.useEffect)((()=>g),[]),[e=>{e&&e!==c.current.element&&(g(),c.current.element=e,c.current.scrollContainers=y(e),v())},o,p]}function y(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some((e=>"auto"===e||"scroll"===e))&&t.push(e),[...t,...y(e.parentElement)]}const x=["x","y","top","bottom","left","right","width","height"],b=(e,t)=>x.every((n=>e[n]===t[n]));var E=Object.freeze({__proto__:null});const _={obj:e=>e===Object(e)&&!_.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e,arr:e=>Array.isArray(e),equ(e,t){if(typeof e!=typeof t||!!e!=!!t)return!1;if(_.str(e)||_.num(e)||_.obj(e))return e===t;if(_.arr(e)&&e==t)return!0;let n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!_.und(n)||e===t}};function S(e){return(e.eventObject||e.object).uuid+"/"+e.index}function M(e){const t=new r.Vector3;function n(t){const{internal:n}=e.getState(),r=t.offsetX-n.initialClick[0],i=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(r*r+i*i))}function i(e){return e.filter((e=>["Move","Over","Enter","Out","Leave"].some((t=>{var n;return null==(n=e.__r3f.handlers)?void 0:n["onPointer"+t]}))))}function s(t){const{internal:n}=e.getState();Array.from(n.hovered.values()).forEach((e=>{if(!t.length||!t.find((t=>t.object===e.object&&t.index===e.index))){const r=e.eventObject.__r3f.handlers;if(n.hovered.delete(S(e)),r){const n={...e,intersections:t||[]};null==r.onPointerOut||r.onPointerOut(n),null==r.onPointerLeave||r.onPointerLeave(n)}}}))}function a(e,t){t.forEach((t=>{var n;return null==(n=t.__r3f.handlers)||null==n.onPointerMissed?void 0:n.onPointerMissed(e)}))}return{handlePointer:r=>{switch(r){case"onPointerLeave":case"onPointerCancel":return()=>s([]);case"onLostPointerCapture":return t=>{"pointerId"in t&&e.getState().internal.capturedMap.delete(t.pointerId),s([])}}return o=>{const{onPointerMissed:l,internal:c}=e.getState();!function(t){var n;const r=e.getState(),{raycaster:i,mouse:s,camera:a,size:o}=r,{offsetX:l,offsetY:c}=null!=(n=null==i.computeOffsets?void 0:i.computeOffsets(t,r))?n:t,{width:h,height:u}=o;s.set(l/h*2-1,-c/u*2+1),i.setFromCamera(s,a)}(o);const h="onPointerMove"===r,u=function(t,n){const{internal:r}=e.getState();return"pointerId"in n&&r.capturedMap.has(n.pointerId)&&t.push(...r.capturedMap.get(n.pointerId).values()),t}(function(t){const n=e.getState(),{raycaster:r,internal:i}=n;if(!r.enabled)return[];const s=new Set,a=[],o=t?t(i.interaction):i.interaction;let l=r.intersectObjects(o,!0).filter((e=>{const t=S(e);return!s.has(t)&&(s.add(t),!0)}));r.filter&&(l=r.filter(l,n));for(const e of l){let t=e.object;for(;t;){var c;(null==(c=t.__r3f)?void 0:c.handlers)&&a.push({...e,eventObject:t}),t=t.parent}}return a}(h?i:void 0),o);h&&s(u),function(r,i,a){const{raycaster:o,mouse:l,camera:c,internal:h}=e.getState();if(r.length){const e=t.set(l.x,l.y,0).unproject(c),u="click"===i.type?n(i):0,d=e=>i.target.releasePointerCapture(e),p={stopped:!1};for(const t of r){const n=e=>{var n,r;return null!=(n=null==(r=h.capturedMap.get(e))?void 0:r.has(t.eventObject))&&n},f=e=>{h.capturedMap.has(e)?h.capturedMap.get(e).set(t.eventObject,t):h.capturedMap.set(e,new Map([[t.eventObject,t]])),i.target.setPointerCapture(e)};let m={};for(let e in Object.getPrototypeOf(i)){let t=i[e];"function"!=typeof t&&(m[e]=t)}let g={...t,...m,spaceX:l.x,spaceY:l.y,intersections:r,stopped:p.stopped,delta:u,unprojectedPoint:e,ray:o.ray,camera:c,stopPropagation:()=>{const e="pointerId"in i&&h.capturedMap.get(i.pointerId);(!e||e.has(t.eventObject))&&(g.stopped=p.stopped=!0,h.hovered.size&&Array.from(h.hovered.values()).find((e=>e.eventObject===t.eventObject)))&&s([...r.slice(0,r.indexOf(t)),t])},target:{hasPointerCapture:n,setPointerCapture:f,releasePointerCapture:d},currentTarget:{hasPointerCapture:n,setPointerCapture:f,releasePointerCapture:d},sourceEvent:i,nativeEvent:i};if(a(g),!0===p.stopped)break}}}(u,o,(e=>{const t=e.eventObject,n=t.__r3f.handlers;if(n)if(h){if(n.onPointerOver||n.onPointerEnter||n.onPointerOut||n.onPointerLeave){const t=S(e),r=c.hovered.get(t);r?r.stopped&&e.stopPropagation():(c.hovered.set(t,e),null==n.onPointerOver||n.onPointerOver(e),null==n.onPointerEnter||n.onPointerEnter(e))}null==n.onPointerMove||n.onPointerMove(e)}else{const i=null==n?void 0:n[r];i&&("onClick"!==r&&"onContextMenu"!==r&&"onDoubleClick"!==r||c.initialHits.includes(t))&&(i(e),a(o,c.interaction.filter((e=>e!==t))))}})),"onPointerDown"===r&&(c.initialClick=[o.offsetX,o.offsetY],c.initialHits=u.map((e=>e.eventObject))),"onClick"!==r&&"onContextMenu"!==r&&"onDoubleClick"!==r||u.length||n(o)<=2&&(a(o,c.interaction),l&&l(o))}}}}const w=e=>e&&!!e.getState,C=(e,t)=>{var n,r;return{root:w(e)?e:null!=(n=null==(r=e.__r3f)?void 0:r.root)?n:t.__r3f.root,container:w(e)?e.getState().scene:e}},T="__default",I={},B=["children","key","ref"];let R={},P=e=>{R={...R,...e}};function D(e,t){const n=e;return(null!=t&&t.instance||!n.__r3f)&&(n.__r3f={root:null,memoizedProps:{},objects:[],...t}),e}const L=e=>e&&e.isOrthographicCamera,F=i.createContext(null),U=(e,t,n,i)=>{const{gl:o,size:l,shadows:c=!1,linear:h=!1,flat:u=!1,vr:d=!1,orthographic:p=!1,frameloop:f="always",dpr:m=1,performance:g,clock:A=new r.Clock,raycaster:v,camera:y,onPointerMissed:x}=i;c&&(o.shadowMap.enabled=!0,"object"==typeof c?Object.assign(o.shadowMap,c):o.shadowMap.type=r.PCFSoftShadowMap),h||(u||(o.toneMapping=r.ACESFilmicToneMapping),o.outputEncoding=r.sRGBEncoding),"never"===f&&(A.stop(),A.elapsedTime=0);const b=(0,s.c)(((s,a)=>{const l=new r.Raycaster,{params:c,...b}=v||{};e(l,{enabled:!0,...b,params:{...l.params,...c}},{});const E=y instanceof r.Camera,_=E?y:p?new r.OrthographicCamera(0,0,0,0,.1,1e3):new r.PerspectiveCamera(75,0,.1,1e3);function S(e){return Array.isArray(e)?Math.min(Math.max(e[0],window.devicePixelRatio),e[1]):e}E||(_.position.z=5,y&&e(_,y,{}),_.lookAt(0,0,0));const M=S(m),w=new r.Vector3,C=new r.Vector3;function T(e=a().camera,t=C,n=a().size){const{width:r,height:i}=n,s=r/i,o=e.getWorldPosition(w).distanceTo(t);if(L(e))return{width:r/e.zoom,height:i/e.zoom,factor:1,distance:o,aspect:s};{const t=e.fov*Math.PI/180,n=2*Math.tan(t/2)*o,a=n*(r/i);return{width:a,height:n,factor:r/a,distance:o,aspect:s}}}let I;const B=e=>s((t=>({performance:{...t.performance,current:e}})));return{gl:o,set:s,get:a,invalidate:()=>t(a()),advance:(e,t)=>n(e,t,a()),linear:h,flat:u,scene:D(new r.Scene),camera:_,raycaster:l,clock:A,mouse:new r.Vector2,vr:d,frameloop:f,onPointerMissed:x,performance:{current:1,min:.5,max:1,debounce:200,...g,regress:()=>{const e=a();I&&clearTimeout(I),e.performance.current!==e.performance.min&&B(e.performance.min),I=setTimeout((()=>B(a().performance.max)),e.performance.debounce)}},size:{width:0,height:0},viewport:{initialDpr:M,dpr:M,width:0,height:0,aspect:0,distance:0,factor:0,getCurrentViewport:T},setSize:(e,t)=>{const n={width:e,height:t};s((e=>({size:n,viewport:{...e.viewport,...T(_,C,n)}})))},setDpr:e=>s((t=>({viewport:{...t.viewport,dpr:S(e)}}))),events:{connected:!1},internal:{active:!1,priority:0,frames:0,lastProps:i,interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(e,t=0)=>(s((({internal:n})=>({internal:{...n,priority:n.priority+(t?1:0),subscribers:[...n.subscribers,{ref:e,priority:t}].sort(((e,t)=>e.priority-t.priority))}}))),()=>{s((({internal:n})=>({internal:{...n,priority:n.priority-(t?1:0),subscribers:n.subscribers.filter((t=>t.ref!==e))}})))})}}}));b.subscribe((()=>{const{camera:e,size:t,viewport:n,internal:i}=b.getState();i.lastProps.camera instanceof r.Camera||(L(e)?(e.left=t.width/-2,e.right=t.width/2,e.top=t.height/2,e.bottom=t.height/-2):e.aspect=t.width/t.height,e.updateProjectionMatrix(),e.updateMatrixWorld()),o.setPixelRatio(n.dpr),o.setSize(t.width,t.height)}),(e=>[e.viewport.dpr,e.size]),a.c);const E=b.getState();return l&&E.setSize(l.width,l.height),b.subscribe((e=>t(e))),b};function O(e,t){const n=t.length;return t.push(e),()=>{t.splice(n,1)}}let N,k=[],G=[],z=[];const Q=e=>O(e,k),V=e=>O(e,G),H=e=>O(e,z);function j(e,t){for(N=0;N({...e,[n]:t(n)})),{}),connect:t=>{var r;const{set:i,events:s}=e.getState();null==s.disconnect||s.disconnect(),i((e=>({events:{...e.events,connected:t}}))),Object.entries(null!=(r=null==s?void 0:s.handlers)?r:[]).forEach((([e,r])=>{const[i,s]=n[e];t.addEventListener(i,r,{passive:s})}))},disconnect:()=>{const{set:t,events:r}=e.getState();var i;r.connected&&(Object.entries(null!=(i=r.handlers)?i:[]).forEach((([e,t])=>{if(r&&r.connected instanceof HTMLElement){const[i]=n[e];r.connected.removeEventListener(i,t)}})),t((e=>({events:{...e.events,connected:!1}}))))}}}const Y="undefined"!=typeof window?i.useLayoutEffect:i.useEffect;function q({set:e}){return Y((()=>(e(new Promise((()=>null))),()=>e(!1))),[]),null}class K extends i.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}function J({children:e,fallback:t,tabIndex:n,resize:r,id:s,style:a,className:o,events:l,...c}){const[h,u]=v({scroll:!0,debounce:{scroll:50,resize:0},...r}),d=i.useRef(null),[p,f]=i.useState(!1),[m,g]=i.useState(!1);if(p)throw p;if(m)throw m;return Y((()=>{u.width>0&&u.height>0&&ue(i.createElement(K,{set:g},i.createElement(i.Suspense,{fallback:i.createElement(q,{set:f})},e)),d.current,{...c,size:u,events:l||X})}),[u,e]),Y((()=>{const e=d.current;return()=>pe(e)}),[]),i.createElement("div",{ref:h,id:s,className:o,tabIndex:n,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",...a}},i.createElement("canvas",{ref:d,style:{display:"block"}},t))}function Z(e=(e=>e),t){const n=i.useContext(F);if(!n)throw"R3F hooks can only be used within the Canvas component!";return n(e,t)}function $(e,t=0){const{subscribe:n}=i.useContext(F).getState().internal,r=i.useRef(e);return i.useLayoutEffect((()=>{r.current=e}),[e]),i.useLayoutEffect((()=>{const e=n(r,t);return()=>e()}),[t,n]),null}function ee(e){const t={nodes:{},materials:{}};return e&&e.traverse((e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material)})),t}function te(e){return i.useMemo((()=>ee(e)),[e])}function ne(e,t){return function(n,...r){const i=new n;return e&&e(i),Promise.all(r.map((e=>new Promise(((n,r)=>i.load(e,(e=>{e.scene&&Object.assign(e,ee(e.scene)),n(e)}),t,(t=>r(`Could not load ${e}: ${t.message}`))))))))}}function re(e,t,n,r){const i=Array.isArray(t)?t:[t],s=m(ne(n,r),e,...i);return Array.isArray(t)?s:s[0]}K.getDerivedStateFromError=()=>({error:!0}),re.preload=function(e,t,n){const r=Array.isArray(t)?t:[t];return m.preload(ne(n),e,...r)};const ie=new Map,se=["legacy","blocking","concurrent"],{invalidate:ae,advance:oe}=function(e){let t,n=!1;function r(i){if(n=!0,t=0,j(k,i),e.forEach((e=>{const n=e.store.getState();n.internal.active&&("always"===n.frameloop||n.internal.frames>0)&&(t+=W(i,n))})),j(G,i),t>0)return requestAnimationFrame(r);j(z,i),n=!1}return{loop:r,invalidate:function t(i){if(!i)return e.forEach((e=>t(e.store.getState())));!i.vr&&i.internal.active&&"never"!==i.frameloop&&(i.internal.frames=Math.min(60,i.internal.frames+1),n||(n=!0,requestAnimationFrame(r)))},advance:function(t,n=!0,r){n&&j(k,t),r?W(t,r):e.forEach((e=>W(t,e.store.getState()))),n&&j(G,t)}}}(ie),{reconciler:le,applyProps:ce}=function(e){function t(e,t,s={},a=!1){var o,l,c;const h=null!=(o=null==e?void 0:e.__r3f)?o:{},u=h.root,d=null!=(l=null==u||null==u.getState?void 0:u.getState())?l:{},p=[],f=[],m={};let g=0;Object.entries(t).forEach((([e,t])=>{-1===B.indexOf(e)&&(m[e]=t)})),h.memoizedProps&&h.memoizedProps.args&&(m.args=h.memoizedProps.args),h.memoizedProps&&h.memoizedProps.attach&&(m.attach=h.memoizedProps.attach),e.__r3f&&(e.__r3f.memoizedProps=m);let A=Object.keys(t);for(g=0;g-1&&delete x[A[g]];const b=Object.entries(x);for(g=0;g0){if(b.forEach((([t,i])=>{if(!f.includes(t)){let s=e,a=s[t];if(t.includes("-")){const n=t.split("-");if(a=n.reduce(((e,t)=>e[t]),e),!a||!a.set){const[r,...i]=n.reverse();s=i.reverse().reduce(((e,t)=>e[t]),e),t=r}}if(i===T+"remove")if(a&&a.constructor)i=new a.constructor(m.args);else if(s.constructor){const e=new s.constructor(s.__r3f.memoizedProps.args);i=e[a],e.dispose&&e.dispose()}else i=0;if(a&&a.set&&(a.copy||a instanceof r.Layers)){if(Array.isArray(i))a.fromArray?a.fromArray(i):a.set(...i);else if(a.copy&&i&&i.constructor&&a.constructor.name===i.constructor.name)a.copy(i);else if(void 0!==i){const e=a instanceof r.Color;!e&&a.setScalar?a.setScalar(i):a instanceof r.Layers&&i instanceof r.Layers?a.mask=i.mask:a.set(i),!d.linear&&e&&a.convertSRGBToLinear()}}else s[t]=i,!d.linear&&s[t]instanceof r.Texture&&(s[t].encoding=r.sRGBEncoding);n(e)}})),a&&u&&e.raycast&&h.handlers){h.handlers=void 0;const t=d.internal.interaction.indexOf(e);t>-1&&d.internal.interaction.splice(t,1)}f.length&&(a&&u&&e.raycast&&d.internal.interaction.push(e),h.handlers=f.reduce(((e,n)=>({...e,[n]:t[n]})),{})),e.parent&&i(e)}}function n(e){var t,n;const r=null==(t=e.__r3f)||null==(n=t.root)||null==n.getState?void 0:n.getState();r&&0===r.internal.frames&&r.invalidate()}function i(e){null==e.onUpdate||e.onUpdate(e)}function s(e,{args:n=[],...i},s,a,o){let l,c=`${e[0].toUpperCase()}${e.slice(1)}`;if(!w(s)&&o){const e=t=>t.return?e(t.return):t.stateNode&&t.stateNode.containerInfo;s=e(o)}if(!s||!w(s))throw`No valid root for ${c}!`;if("primitive"===e){if(void 0===i.object)throw"Primitives without 'object' are invalid!";l=D(i.object,{root:s,instance:!0})}else{const e=R[c]||r[c];if(!e)throw`${c} is not part of the THREE namespace! Did you forget to extend? See: https://github.com/pmndrs/react-three-fiber/blob/master/markdown/api.md#using-3rd-party-objects-declaratively`;const t=_.arr(n);l=D(t?new e(...n):new e(n),{root:s,memoizedProps:{args:t&&0===n.length?null:n}})}return c.endsWith("Geometry")?i={attach:"geometry",...i}:c.endsWith("Material")&&(i={attach:"material",...i}),t(l,i,{}),l}function a(e,t){let r=!1;t&&(t.attachArray?(_.arr(e[t.attachArray])||(e[t.attachArray]=[]),e[t.attachArray].push(t)):t.attachObject?(_.obj(e[t.attachObject[0]])||(e[t.attachObject[0]]={}),e[t.attachObject[0]][t.attachObject[1]]=t):t.attach&&!_.fun(t.attach)?e[t.attach]=t:t.isObject3D&&(e.add(t),r=!0),r||(e.__r3f.objects.push(t),t.parent=e),i(t),n(t))}function o(e,t,r){let s=!1;if(t){if(t.attachArray){const n=e[t.attachArray];_.arr(n)||(e[t.attachArray]=[]),n.splice(n.indexOf(r),0,t)}else{if(t.attachObject||t.attach&&!_.fun(t.attach))return s=!0,a(e,t);if(t.isObject3D){t.parent=e,t.dispatchEvent({type:"added"});const n=e.children.filter((e=>e!==t)),i=n.indexOf(r);e.children=[...n.slice(0,i),t,...n.slice(i)],s=!0}}s||(e.__r3f.objects.push(t),t.parent=e),i(t),n(t)}}function h(e,t,n=!1){e&&[...e].forEach((e=>u(t,e,n)))}function u(e,t,r){if(t){var i;if(e.__r3f.objects){const n=e.__r3f.objects.length;e.__r3f.objects=e.__r3f.objects.filter((e=>e!==t));e.__r3f.objects.lengthe!==t));else if(t.attachObject)delete e[t.attachObject[0]][t.attachObject[1]];else if(t.attach&&!_.fun(t.attach))e[t.attach]=null;else if(t.isObject3D){var s;e.remove(t),null!=(s=t.__r3f)&&s.root&&function(e,t){const{internal:n}=e.getState();n.interaction=n.interaction.filter((e=>e!==t)),n.initialHits=n.initialHits.filter((e=>e!==t)),n.hovered.forEach(((e,r)=>{e.eventObject!==t&&e.object!==t||n.hovered.delete(r)}))}(t.__r3f.root,t)}const o=null==(i=t.__r3f)?void 0:i.instance,l=void 0===r?null!==t.dispose&&!o:r;var a;if(!o)h(null==(a=t.__r3f)?void 0:a.objects,t,l),h(t.children,t,l);t.__r3f&&(delete t.__r3f.root,delete t.__r3f.objects,delete t.__r3f.handlers,delete t.__r3f.memoizedProps,o||delete t.__r3f),l&&t.dispose&&"Scene"!==t.type&&(0,c.unstable_runWithPriority)(c.unstable_IdlePriority,(()=>t.dispose())),n(e)}}function d(e,t,n,r){const i=e.parent;if(!i)return;const o=s(t,n,e.__r3f.root);e.children&&(e.children.forEach((e=>a(o,e))),e.children=[]),e.__r3f.objects.forEach((e=>a(o,e))),e.__r3f.objects=[],u(i,e),a(i,o),[r,r.alternate].forEach((e=>{null!==e&&(e.stateNode=o,e.ref&&("function"==typeof e.ref?e.ref(o):e.ref.current=o))}))}return{reconciler:l()({now:c.unstable_now,createInstance:s,removeChild:u,appendChild:a,appendInitialChild:a,insertBefore:o,warnsIfNotActing:!0,supportsMutation:!0,isPrimaryRenderer:!1,scheduleTimeout:_.fun(setTimeout)?setTimeout:void 0,cancelTimeout:_.fun(clearTimeout)?clearTimeout:void 0,setTimeout:_.fun(setTimeout)?setTimeout:void 0,clearTimeout:_.fun(clearTimeout)?clearTimeout:void 0,noTimeout:-1,appendChildToContainer:(e,t)=>{const{container:n,root:r}=C(e,t);n.__r3f.root=r,a(n,t)},removeChildFromContainer:(e,t)=>{const{container:n}=C(e,t);u(n,t)},insertInContainerBefore:(e,t,n)=>{const{container:r}=C(e,t);o(r,t,n)},commitUpdate(e,n,r,i,s,a){if(e.__r3f.instance&&s.object&&s.object!==e)d(e,r,s,a);else{const{args:n=[],...o}=s,{args:l=[],...c}=i;n.some(((e,t)=>_.obj(e)?Object.entries(e).some((([e,n])=>n!==l[t][e])):e!==l[t]))?d(e,r,s,a):t(e,o,c,!0)}},hideInstance(e){e.isObject3D&&(e.visible=!1,n(e))},unhideInstance(e,t){(e.isObject3D&&null==t.visible||t.visible)&&(e.visible=!0,n(e))},hideTextInstance(){throw new Error("Text is not allowed in the R3F tree.")},getPublicInstance:e=>e,getRootHostContext:e=>I,getChildHostContext:e=>I,createTextInstance(){},finalizeInitialChildren:e=>!!e.__r3f.handlers,commitMount(e){e.raycast&&e.__r3f.handlers&&e.__r3f.root.getState().internal.interaction.push(e)},prepareUpdate:()=>I,shouldDeprioritizeSubtree:()=>!1,prepareForCommit:()=>null,preparePortalMount(...e){},resetAfterCommit(){},shouldSetTextContent:()=>!1,clearContainer:()=>!1}),applyProps:t}}(),he=(e,t)=>{return(n=e)&&n.render?e:new r.WebGLRenderer({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0,...e});var n};function ue(e,t,{gl:n,size:r,mode:s=se[1],events:a,onCreated:o,...l}={}){var c,h,u,d,p;r||(r={width:null!=(h=null==(u=t.parentElement)?void 0:u.clientWidth)?h:0,height:null!=(d=null==(p=t.parentElement)?void 0:p.clientHeight)?d:0});let f=ie.get(t),m=null==f?void 0:f.fiber,g=null==f?void 0:f.store,A=null==(c=g)?void 0:c.getState();if(m&&A){const e=A.internal.lastProps;void 0===l.dpr||_.equ(e.dpr,l.dpr)||A.setDpr(l.dpr),void 0===r||_.equ(e.size,r)||A.setSize(r.width,r.height);l.linear!==e.linear&&(pe(t),m=void 0)}if(!m){const e=he(n,t);l.vr&&(e.xr.enabled=!0,e.setAnimationLoop((e=>oe(e,!0)))),g=U(ce,ae,oe,{gl:e,size:r,...l});const i=g.getState();i.get,m=le.createContainer(g,se.indexOf(s),!1,null),ie.set(t,{fiber:m,store:g}),a&&i.set({events:a(g)})}if(g&&m)return le.updateContainer(i.createElement(de,{store:g,element:e,onCreated:o,target:t}),m,null,(()=>{})),g;throw"Error creating root!"}function de({store:e,element:t,onCreated:n,target:r}){return i.useEffect((()=>{const t=e.getState();t.set((e=>({internal:{...e.internal,active:!0}}))),null==t.events.connect||t.events.connect(r),n&&n(t)}),[]),i.createElement(F.Provider,{value:e},t)}function pe(e,t){const n=ie.get(e),r=null==n?void 0:n.fiber;if(r){const i=null==n?void 0:n.store.getState();i&&(i.internal.active=!1),le.updateContainer(null,r,null,(()=>{i&&setTimeout((()=>{var n,r,s;null==i.events.disconnect||i.events.disconnect(),null==(n=i.gl)||null==(r=n.renderLists)||null==r.dispose||r.dispose(),null==(s=i.gl)||null==s.forceContextLoss||s.forceContextLoss(),fe(i),ie.delete(e),t&&t(e)}),500)}))}}function fe(e){e.dispose&&"Scene"!==e.type&&e.dispose();for(const r in e){var t,n;null==(t=(n=r).dispose)||t.call(n),delete e[r]}}const me=le.act,ge=_.fun(Symbol)&&Symbol.for?Symbol.for("react.portal"):60106;function Ae(e,t,n,r=null){return{$$typeof:ge,key:null==r?null:""+r,children:e,containerInfo:D(t),implementation:n}}le.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:"17.0.2"})},49148:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeepRatio=void 0;const r=n(81316),i=r.__importDefault(n(14971)),s=r.__importDefault(n(11504)),a=r.__importDefault(n(41272));t.KeepRatio=e=>{let{children:t,width:n,height:r,fullHeight:o=!1,fullWidth:l=!0,rootProps:c,contentProps:h,containerWidth:u,containerHeight:d,keep:p=!0}=e;const f=!o&&l,m=!f,g=100*(m?r/n:n/r);return s.default.createElement("div",{...c??{},className:(0,i.default)(a.default.root,f&&a.default.fullWidth,m&&a.default.fullHeight,p&&a.default.keep,c?.className)},s.default.createElement("div",{...h??{},className:(0,i.default)(a.default.content,h?.className)},t),p&&s.default.createElement("svg",{style:{pointerEvents:"none",height:m?"100%":d?`calc(${r} / ${n} * ${u})`:"auto",width:f?"100%":d?`calc(${n} / ${r} * ${d})`:"auto"},viewBox:`0 0 ${f?g:100} ${m?g:100}`}))}},47156:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(49148),t)},71416:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccordionItem=void 0;const r=n(81316),i=r.__importDefault(n(14971)),s=r.__importStar(n(11504));n(61504);const a=n(81595),o=n(34640),l=r.__importDefault(n(87776));t.AccordionItem=e=>{let{open:t,onToggle:n,title:r,className:c,children:h,...u}=e;const d=(0,l.default)("accordion-item-"),[p,f]=(0,s.useState)(t??!1);void 0!==t&&t!==p&&f(t);return s.default.createElement("div",{className:(0,i.default)(c,"mdx-accordion-item",p&&"mdx-accordion-item--open"),...u},s.default.createElement("input",{type:"checkbox",id:d,checked:p}),s.default.createElement("div",{role:"button",className:"mdx-accordion-item__header",onClick:()=>{void 0!==t?n&&n(!p):f((e=>!e))}},s.default.createElement(a.Typography,{className:"mdx-accordion-item__title",variant:"h5",component:"label",htmlFor:d},r),s.default.createElement("div",{className:"mdx-accordion-item__icon"},p?s.default.createElement(o.IconRemove,null):s.default.createElement(o.IconAdd,null))),s.default.createElement("div",{className:"mdx-accordion-item__content-wrapper"},s.default.createElement("div",{className:"mdx-accordion-item__content"},h)))}},53636:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(71416),t)},66756:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppCard=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(74012)),a=r.__importDefault(n(14971)),o=r.__importDefault(n(11504));n(46752);t.AppCard=e=>{let{logoSrc:t,logoSrcDark:n,name:r,description:l,link:c,linkLabel:h,...u}=e;return o.default.createElement("div",{...u,className:(0,a.default)(u.className,"mdx-app-card")},(t||n)&&o.default.createElement(s.default,{sources:{dark:n??t??"",light:t??n??""},alt:"string"==typeof r?r:"",className:"mdx-app-card__logo"}),o.default.createElement(i.Typography,{component:"span",variant:"h5",className:"mdx-app-card__name"},r),o.default.createElement(i.Typography,{variant:"subtitle1",className:"mdx-app-card__description"},l),c&&o.default.createElement("a",{href:c,target:"_blank",className:"mdx-app-card__link"},o.default.createElement(i.Button,{size:"large",variant:"outlined"},o.default.createElement(i.Typography,{variant:"label1",component:"span"},h??o.default.createElement(o.default.Fragment,null,"Visit ",r)),o.default.createElement("span",null,o.default.createElement(i.PickIcon,{color:"primary"})))))}},61136:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(66756),t)},88112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AssetCard=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(14971)),a=r.__importDefault(n(11504)),o=n(34640),l=n(47156);n(25512);t.AssetCard=e=>{let{title:t,previewSrc:n,downloadable:r,forceDownload:c=!1,...h}=e;const u=r&&r.length>0;return a.default.createElement("div",{...h,className:(0,s.default)(h.className,"mdx-asset-card",u&&"mdx-asset-card--downloadable")},a.default.createElement("div",{className:"mdx-asset-card__inner"},t&&a.default.createElement(i.Typography,{component:"div",variant:"subtitle2",className:"mdx-asset-card__title"},t),a.default.createElement(l.KeepRatio,{width:16,height:9,fullWidth:!0,rootProps:{className:"mdx-asset-card__image"}},a.default.createElement("img",{src:n,alt:"string"==typeof t&&t||"asset image"}))),u&&a.default.createElement("div",{className:"mdx-asset-card__downloadables"},r.map(((e,n)=>a.default.createElement("a",{href:e.src,target:"_blank",download:!0,onClick:n=>((e,n)=>{if(!c)return;e.preventDefault();const{src:r,filename:i}=n,s=document.createElement("a");s.download=i||"string"==typeof t&&t||"",fetch(r).then((e=>e.blob())).then((e=>{const t=window.URL.createObjectURL(e);s.href=t,window.document.body.appendChild(s),s.click(),window.document.body.removeChild(s)})).catch((e=>{console.error("failed to download asset:"+e),s.href=r,s.target="_blank",window.document.body.appendChild(s),s.click(),window.document.body.removeChild(s)}))})(n,e)},a.default.createElement(i.Button,{key:n,variant:"outlined",size:"small",icon:a.default.createElement(o.IconDownload,null)},e.title))))))}},9128:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(88112),t)},64360:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Box=void 0;const r=n(81316),i=r.__importDefault(n(14971)),s=r.__importDefault(n(11504)),a=n(35569);function o(e,t,n,r){const i="string"==typeof t||"number"==typeof t?{xs:t}:t,s=[],a=e=>"number"==typeof e&&r?`${e}${r}`:`${e}`;return["xs","sm","md","lg","xl"].forEach(((t,r)=>{const o=i[t];if(o)s.push([`${e}-${t}`,a(o)]);else{const i=s[r-1]?.[1];s.push([`${e}-${t}`,i||a(n)])}})),Object.fromEntries(s)}n(46720);t.Box=e=>{let{top:t=0,bottom:n=0,className:r,style:l={},children:c,...h}=e;return s.default.createElement("div",{className:(0,i.default)(r,"mdx-box"),style:(0,a.makeStyle)({...l},{...o("mdx-box-top",t,0,"px"),...o("mdx-box-bottom",n,0,"px")}),...h},c)}},96288:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(64360),t)},75964:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallToActionButton=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(76016)),a=r.__importDefault(n(14971)),o=r.__importDefault(n(11504));n(40792);t.CallToActionButton=e=>{let{className:t,variant:n="filled",size:r="large",children:l,...c}=e;return o.default.createElement(s.default,{className:(0,a.default)("mdx-cta-button",t),...c},o.default.createElement(i.Typography,{component:"span",variant:"large"===r?"label1":"label2"},o.default.createElement(i.Button,{size:r,variant:n},l)))}},56772:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(75964),t)},42712:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallToActionSection=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(14971)),a=r.__importDefault(n(11504)),o=n(39160);n(46632);t.CallToActionSection=e=>{let{label:t,href:n,title:r,columns:l=1,description:c,list:h=[],target:u,className:d,children:p,variant:f="outlined",...m}=e;const g=!!c,A=h.length>0,v=!!n,y=!r||g||v||A?r&&!c&&!A&&v?"title-button":r&&c&&2===l?"full-width":r&&c&&h.length>0?"list":"simple":"title-only";return a.default.createElement("div",{className:(0,s.default)(d,"mdx-cta-section",`mdx-cta-section--${y}`),...m},a.default.createElement("div",{className:"mdx-cta-section__container"},a.default.createElement(i.Typography,{component:"h2",className:"mdx-cta-section__title"},r),a.default.createElement(i.Typography,{component:"h3",className:"mdx-cta-section__description"},c),n&&a.default.createElement(o.CallToActionButton,{target:u,href:n,className:"mdx-cta-section__link",variant:f},t)),h.length>0&&a.default.createElement("div",{className:"mdx-cta-section__list"},h.map(((e,t)=>{const n=a.default.createElement("div",{className:"mdx-cta-section__list-item",key:t},a.default.createElement(i.Typography,{component:"div",variant:"subtitle2",className:"mdx-cta-section__item-title"},e.title),a.default.createElement(i.Typography,{variant:"h2",component:"p",className:"mdx-cta-section__item-description"},e.description));return e.href?a.default.createElement("a",{href:e.href,target:"_blank"},n):n}))))}},10380:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(42712),t)},66400:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocMetadata=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(76016)),a=r.__importDefault(n(14971)),o=r.__importDefault(n(11504)),l=n(56644);n(6568);const c=n(39676);t.DocMetadata=e=>{let{className:t,children:n,...r}=e;const{date:h,authors:u}=(0,c.useDocMetadata)(),{content:{authorPage:d}={}}=(0,l.useDocThemeOptions)();return o.default.createElement("div",{className:(0,a.default)(t,"mdx-doc-metadata"),...r},h&&o.default.createElement(i.Typography,{variant:"body2"},h),u&&u.length>0&&o.default.createElement(o.default.Fragment,null,o.default.createElement(i.Typography,{variant:"body2"},"by"," ",u.map(((e,t)=>o.default.createElement(o.default.Fragment,{key:e.key},d?o.default.createElement(s.default,{to:`author/${e.key}`},e.name):e.name,t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(66400),t)},39676:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDocMetadata=void 0;const r=n(81316),i=n(49784),s=n(56644),a=r.__importDefault(n(33948));t.useDocMetadata=()=>{const e=(0,s.useDocThemeOptions)(),{content:{authors:t=[]}={}}=e,{frontMatter:n={}}=(0,i.useDoc)(),{author:r=[],date:o}=n,l=(Array.isArray(r)?r:[r]).map((e=>t.find((t=>e===t.key)))).filter((e=>!!e));return{date:o?(0,a.default)(new Date(o),"MMM d yyyy"):"",authors:l}}},46532:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventAbout=void 0;const r=n(81316).__importDefault(n(11504));n(71100);const i=n(81595);t.EventAbout=e=>{let{children:t}=e;return r.default.createElement("div",{className:"mdx-event-about__container"},r.default.createElement(i.Typography,{variant:"h2",component:"h2",className:"mdx-event-about__title"},"About"),r.default.createElement(i.Typography,{variant:"body1"},t))}},69285:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(46532),t)},97896:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventBanner=void 0;const r=n(81316),i=r.__importDefault(n(74012)),s=r.__importDefault(n(11504));n(13735);t.EventBanner=e=>{let{src:t}=e;return s.default.createElement(i.default,{sources:{dark:t,light:t},alt:"event thumbnail",className:"mdx-event-banner__thumbnail"})}},55192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(97896),t)},32516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventCTA=void 0;const r=n(81316),i=r.__importDefault(n(11504));n(26112);const s=n(81595),a=r.__importDefault(n(76016)),o=n(34640);t.EventCTA=e=>{let{title:t,label:n,link:r,linkProps:l}=e;return i.default.createElement("div",{className:"mdx-event-cta__container"},t&&i.default.createElement(s.Typography,{variant:"h2",component:"h2",className:"mdx-event-cta__title"},t),i.default.createElement(a.default,{to:r,...l},i.default.createElement(s.Button,{className:"mdx-event-cta__button"},i.default.createElement(s.Typography,{variant:"body1"},n),i.default.createElement(o.IconExternalLink,null))))}},64816:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(32516),t)},96016:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventCTASection=void 0;const r=n(81316),i=r.__importDefault(n(11504));n(75736);const s=n(81595),a=r.__importDefault(n(76016));t.EventCTASection=e=>{let{title:t,description:n,label:r,link:o,linkProps:l,formInput:c,formListId:h}=e;const[u,d]=i.default.useState({email:"",name:""}),[p,f]=i.default.useState(""),m=e=>{d({...u,[e.target.name]:e.target.value})};return i.default.createElement("div",{className:"mdx-event-cta-section__container"},i.default.createElement(s.Typography,{variant:"subtitle1",component:"p",className:"mdx-event-cta-section__title"},t),i.default.createElement(s.Typography,{component:"h3",variant:"h3",className:"mdx-event-cta-section__description"},n),c?.length?i.default.createElement("form",{className:"mdx-event-cta-section__form",onSubmit:async e=>{e.preventDefault();try{const e=await fetch("https://odoo.logos.co/website_mass_mailing/subscribe2",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",method:"call",params:{value:u?.email,name:u?.name||"",list_id:h,subscription_type:"email"}})}),t=await e.json();f(t.result.message)}catch(t){console.log(t),f("There was an error submitting the form. Please try again.")}}},i.default.createElement("div",{className:"mdx-event-cta-section__input-fields"},c.map(((e,t)=>i.default.createElement(s.TextField,{key:t,className:"mdx-event-cta-section__input",onChange:m,value:u[e.name],inputProps:{...e}})))),i.default.createElement("div",null,i.default.createElement(s.Button,{type:"submit",className:"mdx-event-cta-section__cta"},i.default.createElement(s.Typography,{variant:"body1"},r)),i.default.createElement(s.Typography,{variant:"body2"},p))):i.default.createElement(a.default,{to:o,...l},i.default.createElement(s.Button,{className:"mdx-event-cta-section__cta"},i.default.createElement(s.Typography,{variant:"body1"},r))))}},74456:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(96016),t)},29112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventCard=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(74012)),a=r.__importDefault(n(14971)),o=r.__importDefault(n(11504));n(90340);t.EventCard=e=>{let{thumbnail:t,title:n,date:r,location:l,...c}=e;return o.default.createElement("a",{target:"_self",...c,className:(0,a.default)(c.className,"mdx-event-card")},o.default.createElement(s.default,{sources:{dark:t,light:t},alt:n??"event thumbnail",className:"mdx-event-card__thumbnail"}),o.default.createElement(i.Typography,{component:"h5",variant:"h5",className:"mdx-event-card__title"},n),o.default.createElement("div",{className:"mdx-event-card__row"},o.default.createElement("div",{className:"mdx-event-card__info"},o.default.createElement(i.Typography,{className:"mdx-event-card__label",variant:"body2"},"Date"),o.default.createElement(i.Typography,{variant:"body2"},r)),o.default.createElement("div",{className:"mdx-event-card__info"},o.default.createElement(i.Typography,{className:"mdx-event-card__label",variant:"body2"},"Location"),o.default.createElement(i.Typography,{variant:"body2"},l))))}},6476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(29112),t)},71032:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventCardList=void 0;const r=n(81316).__importStar(n(11504));n(77107);const i=n(81595),s=n(39160);t.EventCardList=e=>{let{data:t}=e;const[n,a]=(0,r.useState)(t?.length>6),[o,l]=(0,r.useState)(6);return r.default.createElement("div",{className:"mdx-event-card-list__container"},r.default.createElement(s.Box,{top:56,bottom:80},r.default.createElement(s.Grid,{xs:{cols:1,gap:"80px 16px"},md:{cols:2}},t.slice(0,o).map(((e,t)=>r.default.createElement(s.Grid.Item,{xs:1,key:t},r.default.createElement(s.EventCard,{...e})))))),n&&r.default.createElement(i.Button,{className:"mdx-event-card-list__button",onClick:()=>{l((e=>e+6)),o+6>=t?.length&&a(!1)},size:"large"},"See more"))}},39808:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(71032),t)},49861:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventHeader=void 0;const r=n(81316).__importDefault(n(11504));n(42168);const i=n(81595);t.EventHeader=e=>{let{title:t,description:n}=e;return r.default.createElement("div",{className:"mdx-event-header__container"},r.default.createElement(i.Typography,{variant:"h1",component:"h1",className:"mdx-event-header__label"},t),r.default.createElement(i.Typography,{variant:"subtitle1",className:"mdx-event-header__content"},n))}},92436:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(49861),t)},11740:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventInfo=void 0;const r=n(81316).__importDefault(n(11504));n(80592);const i=n(81595);t.EventInfo=e=>{let{label:t,content:n}=e;return r.default.createElement("div",{className:"mdx-event-info__container"},r.default.createElement(i.Typography,{variant:"body2",className:"mdx-event-info__label"},t),r.default.createElement(i.Typography,{variant:"body1",className:"mdx-event-info__content"},n))}},43240:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(11740),t)},21068:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventProfile=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(74012)),a=r.__importDefault(n(11504));n(30672);const o=n(34640);t.EventProfile=e=>{let{image:t,name:n,role:r,email:l,linkedin:c,...h}=e;return a.default.createElement("div",{...h,className:"mdx-event-profile"},a.default.createElement(s.default,{sources:{dark:t,light:t},alt:t??"event profile",className:"mdx-event-profile__image"}),a.default.createElement("div",{className:"mdx-event-profile__info"},a.default.createElement(i.Typography,{component:"p",variant:"subtitle1",className:"mdx-event-profile__title"},n),a.default.createElement(i.Typography,{variant:"body2",className:"mdx-event-profile__role"},r),a.default.createElement("div",{className:"mdx-event-profile__social"},l&&a.default.createElement("a",{href:`mailto:${l}`,target:"_blank",rel:"noopener noreferrer"},a.default.createElement(o.IconEmail,null)),c&&a.default.createElement("a",{href:c,target:"_blank",rel:"noopener noreferrer"},a.default.createElement(o.IconLinkedin,null)))))}},62668:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(21068),t)},6964:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventProfileList=void 0;const r=n(81316).__importDefault(n(11504));n(40960);const i=n(81595),s=n(39160);t.EventProfileList=e=>{let{title:t,description:n,data:a}=e;return r.default.createElement("div",{className:"mdx-event-profile-list__container"},t&&r.default.createElement(i.Typography,{variant:"h2",component:"h2",className:"mdx-event-profile-list__title"},t),n&&r.default.createElement(i.Typography,{variant:"subtitle1"},n),r.default.createElement(s.Box,{top:40},r.default.createElement(s.Grid,{xs:{cols:1,gap:"16px"},md:{cols:3}},a.map(((e,t)=>r.default.createElement(s.Grid.Item,{xs:1,key:t},r.default.createElement(s.EventProfile,{...e})))))))}},13456:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(6964),t)},90780:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExternalResourceCard=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(74012)),a=r.__importDefault(n(14971)),o=r.__importDefault(n(11504)),l=n(34640);n(34592);const c=n(47156);t.ExternalResourceCard=e=>{let{title:t,logoSrc:n,logoSrcDark:r,description:h,previewSrc:u,previewSrcDark:d,...p}=e;const f=!(!u&&!d);return o.default.createElement("a",{target:"_blank",...p,className:(0,a.default)(p.className,"mdx-erc",f&&"mdx-erc--with-preview")},f&&o.default.createElement(c.KeepRatio,{width:16,height:9,fullWidth:!0},o.default.createElement(s.default,{sources:{dark:d??u??"",light:u??d??""},alt:"string"==typeof t&&t||"preview image",className:"mdx-erc__preview-image"})),o.default.createElement("div",{className:"mdx-erc__inner"},(n||r)&&o.default.createElement(s.default,{sources:{dark:r??n??"",light:n??r??""},alt:"string"==typeof t&&t||"logo",className:"mdx-erc__logo"}),o.default.createElement(i.Typography,{variant:"body1",component:"div",className:"mdx-erc__title"},t),h&&o.default.createElement(i.Typography,{variant:"label2",component:"div",className:"mdx-erc__description"},h)),o.default.createElement("div",{className:"mdx-erc__icon"},o.default.createElement(l.IconExternalLink,{className:"mdx-erc__external-link"})))}},88440:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(90780),t)},54404:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FeatureList=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(14971)),a=r.__importDefault(n(11504));n(97376);t.FeatureList=e=>{let{title:t="Features",alignment:n="bottom",features:r=[],className:o,ctaPosition:l="bottom",children:c,...h}=e;return a.default.createElement("div",{className:(0,s.default)(o,"mdx-feature-list",`mdx-feature-list--${n}-aligned`,`mdx-feature-list--cta-${l}`),...h},a.default.createElement("div",{className:"mdx-feature-list__header"},a.default.createElement(i.Typography,{variant:"h5",component:"h1",className:"mdx-feature-list__title"},t),c&&"top"===l&&a.default.createElement("div",{className:"mdx-feature-list__extra"},c)),a.default.createElement("div",{className:"mdx-feature-list__list"},r.map(((e,t)=>a.default.createElement("div",{key:t,className:(0,s.default)("mdx-feature-list__feature")},a.default.createElement("div",{className:"mdx-feature-list__feature-inner"},a.default.createElement(i.Typography,{variant:"subtitle1",component:"div",className:"mdx-feature-list__feature-index"},t+1),a.default.createElement(i.Typography,{variant:"h2",component:"h2",className:"mdx-feature-list__feature-title"},e.title),a.default.createElement(i.Typography,{variant:"h5",component:"h3",className:"mdx-feature-list__feature-description"},a.default.createElement("span",null,e.description))),a.default.createElement("div",{className:"mdx-feature-list__feature-border"}))))),c&&"bottom"===l&&a.default.createElement("div",{className:"mdx-feature-list__extra"},c))}},48040:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(54404),t)},76624:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GithubChallenges=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(11504)),a=n(66712),o=n(72716),l=e=>{let{message:t}=e;return s.default.createElement(s.default.Fragment,null,s.default.createElement(i.Typography,{variant:"h1",className:"mdx-ghc__header"},"Open challenges"),!!t&&s.default.createElement(i.Typography,{variant:"body1"},t))};t.GithubChallenges=e=>{let{challengesData:t,useDummyData:n,subheaderText:r,filterByName:c,...h}=e,u=n?[a.dummyGithubIssue]:(e=>{let t=[];return Object.keys(e).forEach((n=>{if(!isNaN(Number(n))){const r=Object.values(e[n])[0];Array.isArray(r)&&(t=t.concat(r))}})),t})(t);if(!u||(d=u,!Array.isArray(d)||!d.length))return s.default.createElement(l,{message:"No challenges to show"});var d;if(c)try{const e=new RegExp(c,"i");u=u?.filter((t=>e.test(t.title)))}catch(p){console.error("Invalid regex pattern:",p)}return s.default.createElement("div",{...h},s.default.createElement(l,null),!!r&&s.default.createElement(i.Typography,{variant:"body1",className:"mdx-ghc-subheader-text",component:"div"},r),u.map((e=>s.default.createElement(o.SingleGithubChallenge,{key:e.id,issue:e}))))}},72716:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SingleGithubChallenge=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(11504)),a=n(34640);n(83384);const o=r.__importDefault(n(76016));function l(e,t){void 0===t&&(t=24);const n=new URL(e),r=new URLSearchParams(n.search);return r.set("s",t.toString()),n.search=Array.from(r.entries()).map((e=>{let[t,n]=e;return`${t}=${n}`})).join("&"),n.toString()}t.SingleGithubChallenge=e=>{let{issue:t}=e;const n=(e=>{const t=new Map;return t.set(e.user.login,{name:e.user.login,avatarUrl:e.user.avatarUrl}),e.assignees.forEach((e=>{t.set(e.login,{name:e.login,avatarUrl:e.avatarUrl})})),e.comments.forEach((e=>{t.set(e.author.login,{name:e.author.login,avatarUrl:e.author.avatarUrl})})),Array.from(t.values())})(t),r=(e=>{const t=e.projects.map((e=>e.name));return 0===t.length?"":Array.from(new Set(t)).join(", ")})(t),c=""!==r,h=!!t.milestone,u=[];return c&&u.push(s.default.createElement(s.default.Fragment,null,s.default.createElement(i.Typography,{variant:"body3",className:"mdx-ghc__label"},r.includes(", ")?"Projects":"Project"),s.default.createElement(i.Typography,{variant:"body3",className:"mdx-ghc__project-name"},r))),h&&u.push(s.default.createElement(s.default.Fragment,null,s.default.createElement(i.Typography,{variant:"body3",className:"mdx-ghc__label"},"Milestone"),s.default.createElement(i.Typography,{variant:"body3",className:"mdx-ghc__milestone-text"},t.milestone))),s.default.createElement("div",{className:"mdx-ghc__container"},s.default.createElement(o.default,{href:t.url,className:"mdx-ghc__issue-title-link"},s.default.createElement(i.Typography,{variant:"h5",className:"mdx-ghc__issue-title"},t.title)),s.default.createElement("div",{className:"mdx-ghc__challenge-labels"},t.labels.map(((e,t)=>s.default.createElement(i.Typography,{variant:"body3",key:t,className:"mdx-ghc__challenge-label"},e)))),s.default.createElement("div",{className:"mdx-ghc__issue-content-grid"},s.default.createElement(i.Typography,{variant:"body3",className:"mdx-ghc__label"},"Participants"),s.default.createElement("div",{className:"mdx-ghc__participant-photo-container"},s.default.createElement(i.Typography,{variant:"body3",className:"mdx-ghc__comment-count",component:"div"},n.length),n.map(((e,t)=>s.default.createElement("img",{key:t,className:"mdx-ghc__participant-photo",src:l(e.avatarUrl),alt:e.name})))),u.map(((e,t)=>s.default.createElement(s.default.Fragment,{key:t},e)))),s.default.createElement(o.default,{href:t.url,className:"mdx-ghc__view-on-github-link"},s.default.createElement(i.Button,{className:"mdx-ghc__view-on-github-button",icon:s.default.createElement(a.IconExternalLink,null)},"View on GitHub")))}},66712:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dummyGithubIssue=void 0,t.dummyGithubIssue={id:"12345",title:"Bug in pagination",body:"When navigating to the second page, the first item repeats.",url:"https://github.com/user/repo/issues/12345",user:{login:"user123",avatarUrl:"https://avatars.githubusercontent.com/u/8811422?v=4"},labels:["bug","frontend"],commentCount:3,comments:[{id:"c1",author:{login:"alice123",avatarUrl:"https://avatars.githubusercontent.com/u/8811422?v=4"},body:"I have also noticed this issue. Working on a fix now.",createdAt:"2021-01-01T12:00:00Z"},{id:"c2",author:{login:"bob456",avatarUrl:"https://avatars.githubusercontent.com/u/8811422?v=4"},body:"Any updates on this?",createdAt:"2021-01-02T15:30:00Z"},{id:"c3",author:{login:"jaquim",avatarUrl:"https://avatars.githubusercontent.com/u/8811422?v=4"},body:"I like turtles.",createdAt:"2021-01-03T09:45:00Z"}],assignees:[{login:"alice123",avatarUrl:"https://avatars.githubusercontent.com/u/8811422?v=4"},{login:"bob456",avatarUrl:"https://avatars.githubusercontent.com/u/8811422?v=4"}],milestone:"v1.0.0",created_at:"2020-12-31T11:00:00Z",updated_at:"2021-01-04T13:00:00Z",projects:[{name:"Awesome Project"}]}},62516:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(76624),t)},75476:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Grid=void 0;const r=n(81316),i=n(81595),s=n(81712),a=r.__importDefault(n(24292)),o=r.__importDefault(n(14971)),l=r.__importStar(n(11504)),c=n(67760),h=n(1960),u=n(79632);t.Grid=e=>{let{actions:t,leftLabel:n="",rightLabel:r="",spacingButtons:i=!1,children:s,...a}=e;const c=(0,l.useRef)(null);return l.default.createElement(d,{...a,className:(0,o.default)(a.className,"mdx-grid")},l.default.createElement("div",{className:"mdx-grid__actions"},t,l.default.createElement(h.ScrollButtons,{containerRef:c,className:"mdx-grid__scroll",leftLabel:n,rightLabel:r,spacing:i?"spaced":"grouped"})),l.default.createElement("div",{ref:c,className:(0,o.default)("mdx-grid__content","hidden-scrollbar")},s))},t.Grid.Item=u.GridItem;const d=a.default.div` + width: 100%; + + .mdx-grid__scroll { + display: flex; + } + + .mdx-grid__content { + display: grid; + gap: var(--grid-gap); + grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr)); + overflow: hidden; + } + + .mdx-grid__actions { + display: flex; + flex-direction: row; + align-items: center; + gap: 1rem; + + & > * { + margin-bottom: 3rem; + } + } + + ${e=>i.THEME_BREAKPOINTS.map((t=>{if(!e[t])return null;const n=e[t];return c.lsdUtils.responsive(e.theme,t,"up")(s.css` + ${void 0!==n.cols&&`\n --grid-cols: ${n.cols};\n `} + + ${void 0!==n.gap&&`\n --grid-gap: ${n.gap};\n `} + + ${(void 0===n.wrap||!0===n.wrap)&&s.css` + .mdx-grid__scroll { + display: none; + } + .mdx-grid__content { + display: grid; + flex-wrap: unset; + overflow-x: unset; + overflow-y: unset; + scroll-snap-type: unset; + } + `} + + ${void 0!==n.wrap&&!1===n.wrap&&s.css` + .mdx-grid__scroll { + display: flex; + } + .mdx-grid__content { + display: flex; + flex-wrap: nowrap; + overflow-x: scroll; + overflow-y: hidden; + scroll-snap-type: x mandatory; + } + `} + + ${!1===n.scrollButtons&&s.css` + .mdx-grid__scroll { + display: none; + } + `} + `)}))} +`},79632:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GridItem=void 0;const r=n(81316),i=r.__importDefault(n(14971)),s=r.__importDefault(n(11504)),a=r.__importDefault(n(24292)),o=n(81595),l=n(67760),c=n(81712);t.GridItem=e=>{let{children:t,...n}=e;return s.default.createElement(h,{...n,className:(0,i.default)(n.className)},t)};const h=a.default.div` + ${e=>o.THEME_BREAKPOINTS.map((t=>{if(!e[t])return null;const n=e[t];return l.lsdUtils.responsive(e.theme,t,"up")(c.css` + grid-column: span ${n}; + flex-basis: calc(100% / var(--grid-cols) * ${n}); + `)}))} +`},26572:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(81316);r.__exportStar(n(75476),t),r.__exportStar(n(79632),t)},91092:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useHero=t.HeroContext=void 0;const r=n(81316).__importStar(n(11504));t.HeroContext=r.default.createContext({size:"medium"});t.useHero=()=>(0,r.useContext)(t.HeroContext)},29676:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hero=void 0;const r=n(81316),i=r.__importDefault(n(14971)),s=r.__importDefault(n(11504)),a=n(91092);n(18240);t.Hero=e=>{let{size:t="medium",className:n,children:r,...o}=e;return s.default.createElement(a.HeroContext.Provider,{value:{size:t}},s.default.createElement("div",{className:(0,i.default)(n,"mdx-hero",`mdx-hero--${t}`),...o},r))}},63376:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(29676),t)},95068:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeroAction=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(76016)),a=r.__importDefault(n(14971)),o=r.__importDefault(n(11504));n(48648);t.HeroAction=e=>{let{size:t="large",variant:n="outlined",className:r,children:l,...c}=e;return o.default.createElement(s.default,{className:(0,a.default)(r,"mdx-hero-action",`mdx-hero-action--${t}`),...c},o.default.createElement(i.Button,{variant:n,size:t},o.default.createElement(i.Typography,{component:"span",variant:"label1",style:{color:"inherit"}},l)))}},1280:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(95068),t)},46204:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeroActions=void 0;const r=n(81316),i=r.__importDefault(n(14971)),s=r.__importDefault(n(11504));n(16092);t.HeroActions=e=>{let{className:t,children:n,...r}=e;return s.default.createElement("div",{className:(0,i.default)(t,"mdx-hero-actions"),...r},n)}},68292:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(46204),t)},80164:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeroDescription=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(14971)),a=r.__importDefault(n(11504)),o=n(91092);n(11904);t.HeroDescription=e=>{let{size:t,className:n,uppercase:r=!1,children:l,...c}=e;const h=(0,o.useHero)(),u=t??(h?h.size:"medium");return a.default.createElement(i.Typography,{variant:"h4",className:(0,s.default)(n,"mdx-hero-description",`mdx-hero-description--${u}`,r?"mdx-hero-description--uppercase":""),...c},l)}},69396:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(80164),t)},62872:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeroInfo=void 0;const r=n(81316),i=r.__importDefault(n(14971)),s=r.__importDefault(n(11504)),a=n(7575),o=n(91092),l=n(39160);n(40764);t.HeroInfo=e=>{let{size:t,className:n,children:r,...c}=e;const h=(0,o.useHero)(),u=(0,a.useHydrated)(),d=t||(h?h.size:"medium");return s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:(0,i.default)(n,"mdx-hero-info",`mdx-hero-info--${d}`),...c},r),u&&s.default.createElement(l.ScrollToBottom,null))}},87648:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(62872),t)},98656:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsciiRenderer=void 0;const r=n(81316),i=n(57572),s=n(44644),a=r.__importStar(n(11504)),o=n(78880),l=n(45080);t.AsciiRenderer=e=>(function(e){void 0===e&&(e={});const{renderIndex:t=i.defaultAsciiConfigs.renderIndex,characters:n=i.defaultAsciiConfigs.characters,invert:r=i.defaultAsciiConfigs.invert,color:c=i.defaultAsciiConfigs.color,resolution:h=i.defaultAsciiConfigs.resolution,bgColor:u=i.defaultAsciiConfigs.bgColor,fgColor:d=i.defaultAsciiConfigs.fgColor,textShadowSize:p=i.defaultAsciiConfigs.textShadowSize,withTextShadow:f=!1}=e,{gl:m,size:g,scene:A,camera:v,viewport:y}=(0,s.useThree)(),x=(0,a.useMemo)((()=>{const e=new o.AsciiEffect(m,n,{invert:r,color:c,resolution:h});return e.domElement.style.position="absolute",e.domElement.style.top="0px",e.domElement.style.left="0px",e.domElement.style.pointerEvents="none",e}),[n,r,c,h]);(0,a.useLayoutEffect)((()=>{x.domElement.style.color=d}),[d,u]),(0,a.useEffect)((()=>{if(m.domElement.style.opacity="0",m.domElement.parentNode.appendChild(x.domElement),f){const e=document.createElement("style");e.innerHTML=`table *{text-shadow: ${(0,l.generateTextShadow)(p)};`,x.domElement.appendChild(e)}return()=>{m.domElement.style.opacity="1",m.domElement.parentNode.removeChild(x.domElement)}}),[x]),(0,a.useEffect)((()=>{x.setSize(g.width,g.height)}),[x,g]),(0,s.useFrame)((e=>{x.render(A,v)}),t)}(e),a.default.createElement(a.default.Fragment,null))},59560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Controls=void 0;const r=n(81316),i=n(57572),s=r.__importStar(n(11504)),a=n(72176),o=n(44644),l=n(65888),c=n(45080),h=(e,t,n)=>(1-n)*e+n*t;function u(e,t,n,r){const i=Math.min(e,t)/t,s=[0,0,0];for(let a=0;a<3;a++)s[a]=h(n[a],r[a],i);return s}t.Controls=e=>{let{rotateSpeed:t=i.ROTATE_SPEED,enableZoom:n=!0,enableRotateOnScroll:r=!0,preset:h,targetPreset:d,children:p,...f}=e;const m=(0,s.useRef)(),g=(0,a.useScrollY)(),{camera:A,size:v}=(0,o.useThree)(),y=(0,s.useRef)(),[x,b]=s.default.useState(!1),[E,_]=s.default.useState(1),[S,M]=s.default.useState(0);return(0,o.useFrame)(((e,n)=>{m.current.rotation.y-=n*((0,c.isMobile)()?.6*t:t)})),(0,s.useEffect)((()=>{const e=()=>{console.log(JSON.stringify({cameraPos:A.position.toArray(),cameraRot:A.rotation.toArray().slice(0,3),controlsTarget:y.current.target.toArray()},null,2))};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)}),[A]),(0,s.useEffect)((()=>{(0,c.isTouchDevice)()&&(y.current.minPolarAngle=Math.PI/2,y.current.maxPolarAngle=Math.PI/2,setTimeout((()=>{b(!0)}),1e3))}),[]),(0,s.useEffect)((()=>{(0,c.isMobile)()&&(_((0,c.mapFloat)(g,0,(0,c.calcScrollThreshold)(),1,.65)),M((0,c.mapFloat)(g,0,(0,c.calcScrollThreshold)(),0,.35)))}),[g]),(0,s.useEffect)((()=>{if(!n)return;if(!d)return;const e=u(g,400,h.cameraPos,d.cameraPos),t=u(g,400,h.cameraRot,d.cameraRot),r=u(g,400,h.controlsTarget,d.controlsTarget);A.position.set(...e),A.rotation.set(...t),y.current.target.set(...r),A.updateProjectionMatrix()}),[g,A]),s.default.createElement("group",{ref:m,...f,scale:E,"position-y":S},p,s.default.createElement(l.OrbitControls,{ref:y,enableZoom:!1,target:y.current?y.current.target:h.controlsTarget,enabled:!x}))}},57572:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OBJECTS_PRESETS=t.defaultPresets=t.defaultAsciiConfigs=t.INITIAL_ZOOM=t.RESIZE_SPEED_FACTOR=t.MIN_ZOOM=t.MAX_ROTATE_SPEED=t.MIN_ROTATE_SPEED=t.ROTATE_SPEED=void 0,t.ROTATE_SPEED=.1,t.MIN_ROTATE_SPEED=0,t.MAX_ROTATE_SPEED=1,t.MIN_ZOOM=.22,t.RESIZE_SPEED_FACTOR=.9,t.INITIAL_ZOOM=3,t.defaultAsciiConfigs={renderIndex:1,bgColor:"rgb(var(--lsd-surface-primary))",fgColor:"rgb(var(--lsd-text-primary))",characters:" l.o.g.o.s ",invert:!1,color:!1,resolution:.21,textShadowSize:15},t.defaultPresets={modelId:"default",simple:{cameraPos:[6.898858137575106,4.772099506970454,-3.1821660872368627],cameraRot:[-2.733342169570335,1.127956558492365,2.7690180385429666],controlsTarget:[-.2185887974027981,3.4320197290105474,-.08409377618890646]},abstract:{cameraPos:[-1.4826176635786852,4.021180061821954,-1.5929058418153597],cameraRot:[-2.9244096935808908,-.8625529112689497,-2.9755407843387185],controlsTarget:[-.3236695017538898,3.8072918272567,-.6236093222013962]}},t.OBJECTS_PRESETS=[t.defaultPresets,{modelId:"architecture01",simple:{cameraPos:[6.898858137575106,4.772099506970454,-3.1821660872368627],cameraRot:[0,0,0],controlsTarget:[0,0,0]},abstract:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]}},{modelId:"architecture02",simple:{cameraPos:[6.898858137575106,4.772099506970454,-3.1821660872368627],cameraRot:[0,0,0],controlsTarget:[0,0,0]},abstract:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]}},{modelId:"architecture03",simple:{cameraPos:[6.898858137575106,4.772099506970454,-3.1821660872368627],cameraRot:[0,0,0],controlsTarget:[0,0,0]},abstract:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]}},{modelId:"architecture04",simple:{cameraPos:[2.263701079468784,.6448855513810133,-1.1446840846564066],cameraRot:[-2.3314571674867457,.984733935216302,2.422537357648925],controlsTarget:[.6593539926170827,-.1266335925222026,-.4104215479626598]},abstract:{cameraPos:[1.8397825927313005,.5006635210357668,-.7112749496103248],cameraRot:[-2.0637769654190388,.941591559117755,2.1572780914058356],controlsTarget:[.7525282128865571,-.19650999135957886,-.33673737792715125]},targetLook:{cameraPos:[1.2775067913826557,1.3342390202957728,-3.123518037652026],cameraRot:[-2.6905895797482686,.32826936260575107,2.9867046984290964],controlsTarget:[.27965301570358253,.05724884619536415,-.48670374558576035]}},{modelId:"architecture05",simple:{cameraPos:[2.783916402572475,.8560027544276005,2.7596737879252995],cameraRot:[-.16075199314229247,.8310730403125255,.11920589473418516],controlsTarget:[-.13283501637059433,.4299574965789378,.13221598116033606]},abstract:{cameraPos:[-.5465903796360435,.8773980794748312,.08538618930043433],cameraRot:[-.26855166005001807,-1.1713993239674987,-.24830772343977955],controlsTarget:[-.0544632211815667,.8222830795164463,-.1148867151943581]},targetLook:{cameraPos:[-.08633866196975185,1.065498410363367,3.299441795447572],cameraRot:[-.30705338387773307,-.04232616594886318,-.01341603621000156],controlsTarget:[.057360484222938594,.03995565554668334,.06512362298065871]}},{modelId:"architecture06",simple:{cameraPos:[6.898858137575106,4.772099506970454,-3.1821660872368627],cameraRot:[0,0,0],controlsTarget:[0,0,0]},abstract:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]}},{modelId:"architecture07",simple:{cameraPos:[6.898858137575106,4.772099506970454,-3.1821660872368627],cameraRot:[0,0,0],controlsTarget:[0,0,0]},abstract:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]}},{modelId:"atlas",simple:{cameraPos:[-.05747471409961126,1.1561369169508278,.2934743027588207],cameraRot:[.13523803197626882,-.45004875426349367,.05912213357583956],controlsTarget:[-.03052411570622545,1.1636581998026059,.23819862568800665]},abstract:{cameraPos:[-.18886266143333627,1.0759713173211645,.49472614307040697],cameraRot:[.11827338438455919,-.49355424749746096,.056236459481599846],controlsTarget:[-.03586918676122722,1.1095292429426495,.21231853618809665]},targetLook:{cameraPos:[-.6194495673706852,.6791728914823414,1.1145248759455844],cameraRot:[.08253419059538356,-.589296072042965,.045942607479927136],controlsTarget:[.09058057232790886,.7667301800204325,.05607398084523753]}},{modelId:"bust01",simple:{cameraPos:[-.6865425525854476,.9101267370893742,.6192780523604176],cameraRot:[-.39660492694232563,-.962317303218196,-.3309893133032883],controlsTarget:[.008888669206507317,.7229784900626205,.17240700391361993]},abstract:{cameraPos:[.025758408225725123,.9432728632646389,.5085343068565109],cameraRot:[-.016796160047877214,.23199352927595504,.003862085219634371],controlsTarget:[-.04849025797636223,.9379943498483801,.19429480114059927]},targetLook:{cameraPos:[-.0995637601904456,.9905193985583883,1.2844592429465957],cameraRot:[-.21489715158374015,-.011908392248228742,-.002599147273856083],controlsTarget:[-.08519853311178426,.7332893758986562,.10595091334036527]}},{modelId:"bust02",simple:{cameraPos:[-1.4566842350476759,1.3228318382357354,.3529107224325513],cameraRot:[-.7212161402570414,-1.161345100016008,-.6787189972933454],controlsTarget:[.13759890903780844,.8659810364239205,-.1666973840261623]},abstract:{cameraPos:[-.3488062269042841,1.3111379960412364,.033354968216059155],cameraRot:[-.7212161402570405,-1.1613451000160089,-.6787189972933446],controlsTarget:[.2227218365835886,1.147363414950647,-.15291722311874764]}},{modelId:"bust03",simple:{cameraPos:[6.898858137575106,4.772099506970454,-3.1821660872368627],cameraRot:[0,0,0],controlsTarget:[0,0,0]},abstract:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]}},{modelId:"discobolus",simple:{cameraPos:[.9321278495515372,1.1243517299151449,1.0437243089401456],cameraRot:[-.05449607597993083,.5948614803388417,.030560026854436973],controlsTarget:[.17851738112859908,1.0636847191934362,-.06840974825492452]},abstract:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]}},{modelId:"hand",simple:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]},abstract:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]}},{modelId:"vase01",simple:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]},abstract:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]}},{modelId:"venus",simple:{cameraPos:[-.33960257176056113,1.3731114512210183,.5843851218219973],cameraRot:[.19165735697369993,-.4160172409280952,.07825504508386714],controlsTarget:[.1766806722765915,1.595709756901872,-.5627979418735829]},abstract:{cameraPos:[-.2543046264127692,1.591894996466899,.21161310295797725],cameraRot:[.17078534527374745,-.637502107706861,.10229142114685894],controlsTarget:[.2766995177502174,1.7137410300309837,-.49488235116491014]}},{modelId:"flower",simple:{cameraPos:[-.33960257176056113,1.3731114512210183,.5843851218219973],cameraRot:[0,0,0],controlsTarget:[0,0,0]},abstract:{cameraPos:[0,0,0],cameraRot:[0,0,0],controlsTarget:[0,0,0]}}]},7656:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeroModel=void 0;const r=n(81316),i=n(65888),s=n(44644),a=r.__importDefault(n(14971)),o=r.__importStar(n(11504)),l=n(57572),c=n(45080),h=n(98656),u=n(59560);n(83568);const d=n(72176);function p(e){let{url:t,onMount:n=(()=>{}),...r}=e;const{scene:s}=(0,i.useGLTF)(t,"/scripts/draco-1.4.3/");return(0,o.useEffect)((()=>{n()}),[]),o.default.createElement("primitive",{object:s,...r})}t.HeroModel=e=>{const{modelId:t,preset:n,mode:r="simple",className:i,children:f,asciiConfig:m,rotateSpeed:g=l.ROTATE_SPEED,enableZoom:A,enableRotateOnScroll:v,withParallelEffect:y=!0,startY:x="bottom",...b}=e,E=((e,t,n)=>(0,o.useMemo)((()=>{if(t)return{...l.defaultPresets,[e]:t};if(!n)return l.defaultPresets;return l.OBJECTS_PRESETS.find((e=>e.modelId===n))||l.defaultPresets}),[t,n]))(r,n,t),_=(0,d.useScrollY)();return o.default.createElement("div",{className:(0,a.default)(i,"mdx-hero-model","mdx-hero-model--ascii",`mdx-hero-model--${r}`,`mdx-hero-model--${x}`),...b},o.default.createElement("div",{className:"mdx-hero-model--inner",style:{...y?{transform:"translateY(0px) scale(var(--mdx-hero-model-wrapper-scale))"}:{}}},o.default.createElement(o.Suspense,{fallback:o.default.createElement("span",null," ")},o.default.createElement(s.Canvas,{dpr:[1,2],style:{height:"100vh"},camera:{fov:50,position:E[r].cameraPos,rotation:E[r].cameraRot}},o.default.createElement("directionalLight",{position:[-10,10,0],intensity:1.5}),o.default.createElement("directionalLight",{position:[-10,10,5],intensity:.3}),o.default.createElement("directionalLight",{position:[-10,20,0],intensity:1.5}),o.default.createElement("directionalLight",{position:[100,-10,0],intensity:.25}),o.default.createElement(u.Controls,{rotateSpeed:g,preset:E[r],targetPreset:E.targetLook,enableZoom:"simple"!==r},o.default.createElement(o.Suspense,{fallback:o.default.createElement(p,{url:`/hero/${E.modelId}/lo.glb`})},o.default.createElement(p,{url:`/hero/${E.modelId}/hi.glb`}),o.default.createElement(h.AsciiRenderer,{...m})))))),o.default.createElement("div",{className:"mdx-hero-model--shade",style:{opacity:(0,c.mapFloat)(_,0,(0,c.calcScrollThreshold)()*l.RESIZE_SPEED_FACTOR,0,1)}}))}},49832:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeroModel=void 0;const r=n(81316).__importDefault(n(11504)),i=n(45080),s=n(72176),a=n(7656);t.HeroModel=e=>{if("undefined"==typeof window)return null;const t=(0,s.useScrollY)();(0,i.mapFloat)(t,0,(0,i.calcScrollThreshold)(),0,.1*window.innerHeight);return r.default.createElement("div",{style:{position:"absolute",top:0,left:0}},r.default.createElement(a.HeroModel,{...e}))}},50608:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeroTitle=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(14971)),a=r.__importDefault(n(11504)),o=n(91092);n(98332);t.HeroTitle=e=>{let{size:t,uppercase:n,className:r,children:l,...c}=e;const h=(0,o.useHero)(),u=t||(h?h.size:"medium"),d=void 0!==n?n:"large"===h?.size;return a.default.createElement(i.Typography,{variant:"h1",component:"h1",className:(0,s.default)(r,"mdx-hero-title",`mdx-hero-title--${u}`,d&&"mdx-hero-title--uppercase"),...c},l)}},96464:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(50608),t)},14232:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeroVideo=void 0;const r=n(81316),i=r.__importDefault(n(14971)),s=r.__importStar(n(11504)),a=n(35569),o=n(33980),l=n(7575),c=n(91092);n(33576);t.HeroVideo=e=>{let{placeholderSrc:t,desktop:n,mobile:r,className:h,style:u={},children:d,...p}=e;(0,c.useHero)();const f=(0,l.useHydrated)(),m=(0,s.useRef)(null),[g,A]=(0,s.useState)(!0),v=async()=>{const e=m.current;if(!e)return;e.muted=!0,e.defaultMuted=!0;const[t,n]=await(0,o.settle)((()=>e.play()));n||A(!1)};return(0,s.useEffect)((()=>{const e=document.querySelector(".col > article");if(e)return e.classList.add("overflow-hidden"),()=>{e.classList.remove("overflow-hidden")}}),[]),s.default.createElement(s.default.Fragment,null,s.default.createElement("div",{className:(0,i.default)(h,"mdx-hero-video",g&&"mdx-hero-video--loading"),style:(0,a.makeStyle)({...u},{"hero-video-scale":n?.scale??"1.70951586","hero-video-offset-y":n?.offsetY??"-150px","hero-video-height":n?.height??"100%","hero-video-min-height":n?.minHeight??"min(100vh, var(--hero-max-height))","hero-video-scale-mobile":r?.scale??"1.70951586","hero-video-offset-y-mobile":r?.offsetY??"-50px","hero-video-height-mobile":r?.height??"120%","hero-video-min-height-mobile":r?.minHeight??"100vh"}),...p},s.default.createElement("div",{className:"mdx-hero-video__placeholder"},s.default.createElement("img",{src:t,alt:""})),s.default.createElement("div",{className:"mdx-hero-video__video"},f&&s.default.createElement("video",{ref:m,loop:!0,muted:!0,autoPlay:!0,playsInline:!0,onCanPlay:v,onLoadedMetadata:v},d))))}},57348:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(14232),t)},86288:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JobsPerDepartment=void 0;const r=n(81316),i=n(81595),s=n(65768),a=r.__importDefault(n(11504)),o=n(7736),l=e=>{let{message:t}=e;return a.default.createElement(a.default.Fragment,null,a.default.createElement(i.Typography,{variant:"h1",className:"mdx-jpd__header"},"Current job openings"),!!t&&a.default.createElement(i.Typography,{variant:"body1"},t))};t.JobsPerDepartment=e=>{let{jobData:t,titleFilter:n="",useDummyData:r=!1,...i}=e,c=r?o.jobsPerDepartmentDummyData:t?.departments;return c&&(h=c)&&h.some((e=>e.jobs&&e.jobs.length>0))?(c&&n&&(c=c.map((e=>({...e,jobs:e.jobs.filter((e=>e.title.includes(n)))})))),a.default.createElement("div",{...i},a.default.createElement(l,null),c.map((e=>a.default.createElement(s.SingleDepartmentJobs,{key:e.name,department:e}))))):a.default.createElement(l,{message:"No job openings to show"});var h}},65768:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SingleDepartmentJobs=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(11504)),a=n(34640);n(20192);const o=r.__importDefault(n(76016));t.SingleDepartmentJobs=e=>{let{department:t}=e;return t.jobs&&0!==t.jobs.length?s.default.createElement("div",{className:"mdx-jpd__single-job-department-container"},s.default.createElement(i.Typography,{variant:"subtitle2",className:"mdx-jpd__department-title"},t.name),s.default.createElement("ul",{className:"mdx-jpd__job-list"},t.jobs.map(((e,t)=>s.default.createElement("li",{key:t,className:"mdx-jpd__job-list-item"},s.default.createElement(o.default,{href:e.absolute_url,target:"_blank",className:"mdx-jpd__job-link"},s.default.createElement("div",{className:"mdx-jpd__job-title-container"},s.default.createElement(i.Typography,{variant:"h5",className:"mdx-jpd__job-title"},e.title),s.default.createElement(a.IconExternalLink,{className:"mdx-jpd__external-link-icon"})),!!e.location?.name&&s.default.createElement(i.Typography,{variant:"subtitle2",component:"div"},e.location.name))))))):null}},79696:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(86288),t)},7736:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.jobsPerDepartmentDummyData=void 0,t.jobsPerDepartmentDummyData=[{id:87842,name:"App",parent_id:43806,child_ids:[87847,87852,87850,87848,45530,87849],jobs:[]},{id:54504,name:"Brand Design Studio",parent_id:null,child_ids:[],jobs:[]},{id:45532,name:"Business Development",parent_id:null,child_ids:[],jobs:[]},{id:87841,name:"Codex",parent_id:43806,child_ids:[],jobs:[{absolute_url:"https://jobs.status.im/?gh_jid=5329400",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2662332,location:{name:"Remote (Worldwide)"},metadata:null,id:5329400,updated_at:"2023-10-13T09:40:03-04:00",requisition_id:"Cod-6",title:"Technical Business Development Lead [Codex]"}]},{id:84549,name:"Communications",parent_id:null,child_ids:[],jobs:[{absolute_url:"https://jobs.status.im/?gh_jid=5276254",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2645076,location:{name:"Remote (Worldwide)"},metadata:null,id:5276254,updated_at:"2023-10-19T03:08:59-04:00",requisition_id:"PROV-Com-16",title:"Motion Designer"}]},{id:45531,name:"Design",parent_id:null,child_ids:[],jobs:[]},{id:87847,name:"Desktop",parent_id:87842,child_ids:[],jobs:[]},{id:87852,name:"Documentation",parent_id:87842,child_ids:[],jobs:[]},{id:45547,name:"Engineering ",parent_id:null,child_ids:[],jobs:[{absolute_url:"https://jobs.status.im/?gh_jid=5419957",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2693761,location:{name:"Remote (Worldwide)"},metadata:null,id:5419957,updated_at:"2023-10-24T07:30:00-04:00",requisition_id:"APP-QA-2",title:"Desktop QA Engineer "},{absolute_url:"https://jobs.status.im/?gh_jid=3694379",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2055210,location:{name:"Remote (Worldwide)"},metadata:null,id:3694379,updated_at:"2023-10-24T16:23:12-04:00",requisition_id:"BACK-1050",title:"Senior C++ Qt/QML developer for blockchain app"},{absolute_url:"https://jobs.status.im/?gh_jid=3702173",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2058858,location:{name:"Remote (Worldwide)"},metadata:null,id:3702173,updated_at:"2023-10-24T16:21:54-04:00",requisition_id:"93",title:"Senior Mobile ClojureScript UI Developer "}]},{id:49925,name:"Finance",parent_id:87845,child_ids:[],jobs:[]},{id:87854,name:"Infrastructure",parent_id:43806,child_ids:[],jobs:[]},{id:87853,name:"Insights",parent_id:87845,child_ids:[],jobs:[]},{id:87850,name:"Keycard",parent_id:87842,child_ids:[],jobs:[]},{id:145838,name:"Leadership",parent_id:null,child_ids:[],jobs:[{absolute_url:"https://jobs.status.im/?gh_jid=5447463",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2704948,location:{name:"Remote (Worldwide)"},metadata:null,id:5447463,updated_at:"2023-10-24T09:07:22-04:00",requisition_id:"LEAD-1",title:"Chief of Staff [whole ecosystem]"}]},{id:74156,name:"Legal",parent_id:87845,child_ids:[],jobs:[]},{id:91698,name:"Logos",parent_id:null,child_ids:[],jobs:[]},{id:43807,name:"Marketing",parent_id:null,child_ids:[],jobs:[]},{id:87848,name:"Mobile",parent_id:87842,child_ids:[],jobs:[]},{id:87843,name:"Nimbus",parent_id:43806,child_ids:[],jobs:[{absolute_url:"https://jobs.status.im/?gh_jid=5370820",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2679527,location:{name:"Remote (Worldwide)"},metadata:null,id:5370820,updated_at:"2023-10-19T03:05:07-04:00",requisition_id:"LIDO-1",title:"Senior DevOps Engineer (Blockchain)"}]},{id:144866,name:"Nomos",parent_id:43806,child_ids:[],jobs:[{absolute_url:"https://jobs.status.im/?gh_jid=5433423",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2315608,location:{name:"Remote (Worldwide)"},metadata:null,id:5433423,updated_at:"2023-10-12T11:20:52-04:00",requisition_id:"PROV-Nom-5",title:"Applied Network Researcher"}]},{id:45548,name:"People Operations",parent_id:87845,child_ids:[],jobs:[]},{id:45530,name:"Product Design",parent_id:87842,child_ids:[],jobs:[]},{id:90941,name:"Program Management",parent_id:null,child_ids:[],jobs:[]},{id:43806,name:"Research & Development",parent_id:null,child_ids:[87842,87841,87854,87843,144866,87846,87981,87847,87852,87850,87848,45530,87849],jobs:[]},{id:87851,name:"Security",parent_id:87845,child_ids:[],jobs:[]},{id:87845,name:"Services",parent_id:null,child_ids:[49925,87853,74156,45548,87851],jobs:[]},{id:91697,name:"Status App ",parent_id:null,child_ids:[],jobs:[]},{id:54783,name:"Technical Writing ",parent_id:null,child_ids:[],jobs:[]},{id:87846,name:"Vac",parent_id:43806,child_ids:[],jobs:[{absolute_url:"https://jobs.status.im/?gh_jid=4460860",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2331302,location:{name:"Remote (Worldwide)"},metadata:null,id:4460860,updated_at:"2023-10-04T05:13:53-04:00",requisition_id:"PROV-zkV-1",title:"Zero Knowledge Research Engineer "}]},{id:87981,name:"Waku",parent_id:43806,child_ids:[],jobs:[{absolute_url:"https://jobs.status.im/?gh_jid=5456032",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2707470,location:{name:"Remote (Worldwide)"},metadata:null,id:5456032,updated_at:"2023-10-23T11:40:19-04:00",requisition_id:"WAK-GL-1",title:"Growth Lead"},{absolute_url:"https://jobs.status.im/?gh_jid=3693623",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2055187,location:{name:"Remote (Worldwide)"},metadata:null,id:3693623,updated_at:"2023-10-04T05:13:53-04:00",requisition_id:"PROV-Sec-2",title:"Protocol Engineer"},{absolute_url:"https://jobs.status.im/?gh_jid=3157908",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:1830496,location:{name:"Remote, Worldwide"},metadata:null,id:3157908,updated_at:"2023-10-04T05:13:53-04:00",requisition_id:"PROV-Sec-3",title:"Protocol Researcher (Distributed Systems)"},{absolute_url:"https://jobs.status.im/?gh_jid=5175038",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2584916,location:{name:"Remote (Worldwide)"},metadata:null,id:5175038,updated_at:"2023-10-09T05:53:53-04:00",requisition_id:"SDK-2",title:"Software Engineer (Chat SDK)"},{absolute_url:"https://jobs.status.im/?gh_jid=5310503",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2656108,location:{name:"Remote (Worldwide)"},metadata:null,id:5310503,updated_at:"2023-10-19T03:12:53-04:00",requisition_id:"PROV-Wak-13",title:"Software Engineer Distributed Systems Testing"},{absolute_url:"https://jobs.status.im/?gh_jid=5423094",data_compliance:[{type:"gdpr",requires_consent:!1,requires_processing_consent:!1,requires_retention_consent:!1,retention_period:null}],internal_job_id:2694724,location:{name:"Remote (Worldwide)"},metadata:null,id:5423094,updated_at:"2023-10-24T12:39:05-04:00",requisition_id:"WAK-BD-1",title:"Technical Business Development Lead "}]},{id:87849,name:"Web",parent_id:87842,child_ids:[],jobs:[]},{id:0,name:"No Department",parent_id:null,child_ids:[],jobs:[]}]},20544:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogoCarousel=void 0;const r=n(81316),i=r.__importDefault(n(74012)),s=r.__importDefault(n(14971)),a=r.__importStar(n(11504));n(88952);const o=n(39160),l=n(1960),c=n(7575);t.LogoCarousel=e=>{let{title:t,className:n,items:r=[],children:h,...u}=e;const d=(0,c.useHydrated)(),p=(0,a.useRef)(null),f=(0,a.useRef)(null);return"undefined"!=typeof window&&d&&!f.current&&(f.current=p.current?.querySelector(".mdx-grid__content")??null,console.log(f.current,p.current)),a.default.createElement("div",{ref:p,className:(0,s.default)(n,"mdx-logo-carousel"),...u},a.default.createElement(o.SectionHeader,{title:t},a.default.createElement(l.ScrollButtons,{containerRef:f})),a.default.createElement(o.Grid,{className:"mdx-logo-carousel__inner",xs:{wrap:!1,gap:"96px",scrollButtons:!1}},r.map((e=>a.default.createElement(o.Grid.Item,{className:"mdx-logo-carousel__item"},a.default.createElement(i.default,{className:"mdx-logo-carousel__logo",title:e.title,sources:{dark:e.logoSrcDark??e.logoSrc??"",light:e.logoSrc??e.logoSrcDark??""}}))))))}},5688:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(20544),t)},91020:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NewsletterSubscription=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(14971)),a=r.__importDefault(n(11504)),o=n(39160),l=n(33732),c=n(56644);n(99280);t.NewsletterSubscription=e=>{let{title:t,description:n,mailingListId:r,...h}=e;const u=(0,c.useThemeOptions)()?.newsletterSubscription?.mailingListId??0,d=r??u,p=(0,l.useNewsletterApi)(),f=!p.message||p.error,m=t??"Newsletter",g=n??a.default.createElement(a.default.Fragment,null,"Subscribe",a.default.createElement("br",null),"to our newsletter");return a.default.createElement(o.CallToActionSection,{className:"mdx-ns",title:a.default.createElement("span",{className:"mdx-ns__title"},m),description:a.default.createElement("div",{className:"mdx-ns__inner"},a.default.createElement("span",{className:"mdx-ns__description"},g),a.default.createElement("form",{onSubmit:e=>{e.preventDefault();const t=e.target,n=t.elements.namedItem("name").value,r=t.elements.namedItem("email").value;p.subscribe(d,r,n)}},p.message&&a.default.createElement(i.Toast,{title:p.message,className:"mdx-ns__toast",icon:p.error?i.ErrorIcon:i.CheckIcon}),a.default.createElement("div",{className:(0,s.default)("mdx-ns__inputs",!f&&"hidden")},a.default.createElement(i.TextField,{inputProps:{type:"text",name:"name"},variant:"underlined",placeholder:"First name or pseudonym"}),a.default.createElement(i.TextField,{inputProps:{type:"email",name:"email",required:!0},variant:"underlined",placeholder:"Email address (required)"})),a.default.createElement(i.Button,{size:"large",color:"primary",variant:"outlined",className:(0,s.default)("mdx-ns__submit-button",!f&&"hidden"),disabled:p.busy},"Subscribe"))),columns:2})}},30416:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(91020),t)},38512:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PoweredBy=void 0;const r=n(81316),i=r.__importDefault(n(14971)),s=r.__importDefault(n(11504)),a=n(39160);n(14656);t.PoweredBy=e=>{let{items:t=[],className:n,...r}=e;return s.default.createElement(a.Grid,{className:(0,i.default)(n,"mdx-powered-by"),xs:{cols:1,wrap:!0,gap:"0 1rem"},lg:{cols:2},...r},t.map(((e,t)=>s.default.createElement(a.Grid.Item,{key:t,xs:1},s.default.createElement(a.AppCard,{...e})))))}},72036:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(38512),t)},37884:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileCard=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(76016)),a=r.__importDefault(n(11504)),o=n(34640);n(50240);const l=r.__importDefault(n(14971));t.ProfileCard=e=>{let{imgSrc:t,name:n,githubUsername:r,githubLink:c,discordUsername:h,discordLink:u,...d}=e;return a.default.createElement("div",{...d,className:(0,l.default)("mdx-profile-card",d.className)},a.default.createElement("div",{className:"mdx-profile-card__profile"},void 0===t?a.default.createElement(o.IconAvatar,{className:"mdx-profile-card__avatar"}):a.default.createElement("img",{alt:"string"==typeof n?n:"",className:"mdx-profile-card__avatar",src:t}),a.default.createElement(i.Typography,{className:"mdx-profile-card__name",variant:"h3",component:"h4"},n)),a.default.createElement("div",{className:"mdx-profile-card__buttons"},r&&c&&a.default.createElement(s.default,{href:c,target:"_blank",className:"mdx-profile-card__link"},a.default.createElement(o.IconGithub,null)),h&&u&&a.default.createElement(s.default,{href:u,target:"_blank",className:"mdx-profile-card__link"},a.default.createElement(o.IconDiscordWhite,null))))}},83612:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(37884),t)},56048:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Roadmap=void 0;const r=n(81316),i=r.__importDefault(n(14971)),s=r.__importDefault(n(11504)),a=n(39160),o=n(38848);n(59584);t.Roadmap=e=>{let{title:t,description:n,timeline:r=[],className:l,children:c,...h}=e;const u=(new Date).getFullYear(),d=(e,t,n)=>{if(t===n.length-1)return"none";return e.period[0]===n[t+1].period[0]?"solid":"dashed"},p=e=>{const t=(new Date).getFullYear(),n=(()=>{const e=(new Date).getMonth();return"Q"+Math.ceil((e+1)/3)})();let r,i;return Array.isArray(e)?[r,i]=e:r=e,rt?"transparent":i&&"+"!==i?i<=n?"filled":"transparent":"filled"};return s.default.createElement("div",{className:(0,i.default)(l,"mdx-roadmap"),...h},s.default.createElement(a.SectionHeader,{className:"mdx-roadmap__header",title:t,description:n},c),r.length>0&&s.default.createElement(a.Grid,{className:"mdx-roadmap__timeline",xs:{cols:6,wrap:!1,gap:"0 1rem",scrollButtons:!0},spacingButtons:!0,leftLabel:"Past",rightLabel:"Future"},r.map(((e,t)=>s.default.createElement(a.Grid.Item,{key:t,xs:1},s.default.createElement(o.TimelineItem,{...e,index:t,period:e.period??u,description:e.description,borderStyle:d(e,t,r),periodStyle:p(e?.period??u),className:(0,i.default)("mdx-roadmap__timeline-item",e.className)}))))))}},82944:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(56048),t)},96:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollButtons=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(14971)),a=r.__importDefault(n(11504));n(9104);t.ScrollButtons=e=>{let{leftLabel:t,rightLabel:n,containerRef:r,containerId:o,spacing:l="grouped",...c}=e;const h=e=>{const t=r?r.current:document.querySelector(`#${o}`);if(!t)return;const n=t.children[0]?.getBoundingClientRect?.()?.width??236;t.scrollTo({behavior:"smooth",left:t.scrollLeft+(t.getBoundingClientRect()?.width-n)*e})};return a.default.createElement("div",{...c,className:(0,s.default)(c.className,"mdx-scroll-buttons","spaced"===l&&"mdx-scroll-buttons--spaced")},a.default.createElement(i.IconButtonGroup,{size:"small",color:"primary"},a.default.createElement(i.IconButton,{className:(0,s.default)("mdx-scroll-buttons__button",t&&t.length>0&&"mdx-scroll-buttons__button--with-label"),size:"small",onClick:h.bind(null,-1)},a.default.createElement(i.ChevronLeftIcon,null),t&&t.length>0&&a.default.createElement("span",{className:"mdx-scroll-buttons__label"},t)),a.default.createElement(i.IconButton,{className:(0,s.default)("mdx-scroll-buttons__button",n&&n.length&&"mdx-scroll-buttons__button--with-label"),size:"small",onClick:h.bind(null,1)},n&&n.length>0&&a.default.createElement("span",{className:"mdx-scroll-buttons__label"},n),a.default.createElement(i.ChevronRightIcon,null))))}},1960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(96),t)},41276:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollToBottom=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(14971)),a=r.__importStar(n(11504)),o=n(56429),l=n(35569),c=n(61592),h=n(72176),u=r.__importDefault(n(36148));t.ScrollToBottom=e=>{const{children:t,className:n,style:r,...d}=e,p=(0,h.useScrollY)(),f=(0,c.useIsMobile)(),m=(0,o.useWindowSize)(),g=(0,a.useMemo)((()=>(document.querySelector(".mdx-hero")?.getBoundingClientRect()?.bottom??0)+window.scrollY),[m.height]);return a.default.createElement(i.IconButton,{onClick:()=>{const e=document.querySelector(".main-wrapper article"),t=e?.children?.[1];if(t)return window.scrollTo({left:0,top:t.getBoundingClientRect().top-(f?200:0),behavior:"smooth"});window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})},size:f?"small":"large",className:(0,s.default)(u.default.scrollToBottom,n,p>20&&u.default.hide),style:(0,l.makeStyle)({...r??{}},{vh:m.height/100+"px",maxTop:g+"px"}),...d},a.default.createElement(i.ChevronDownIcon,{color:"primary"}))}},56800:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(41276),t)},23232:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SectionHeader=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(14971)),a=r.__importDefault(n(11504)),o=n(39160);n(52824);t.SectionHeader=e=>{let{title:t,description:n,className:r,children:l,...c}=e;const h=!!n;return a.default.createElement(o.Box,{className:(0,s.default)(r,"mdx-section-header",h&&"mdx-section-header--with-description"),...c},a.default.createElement(i.Typography,{className:"mdx-section-header__title",component:"h2",variant:"h5"},t,!h&&l&&a.default.createElement("div",{className:"mdx-section-header__extra"},l)),n&&a.default.createElement(i.Typography,{className:"mdx-section-header__description",component:"p",variant:"h3"},n,a.default.createElement("div",{className:"mdx-section-header__extra"},l)))}},42936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(23232),t)},29772:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Showcase=void 0;const r=n(81316),i=r.__importDefault(n(14971)),s=r.__importDefault(n(11504)),a=n(39160);n(89836);t.Showcase=e=>{let{items:t=[],className:n,...r}=e;return s.default.createElement(a.Grid,{className:(0,i.default)(n,"mdx-showcase"),xs:{cols:2,wrap:!0,gap:"1.5rem 1em"},lg:{cols:3,gap:"1rem"},...r},t.map(((e,t)=>s.default.createElement(a.Grid.Item,{key:t,className:"mdx-showcase__item",xs:1},s.default.createElement(a.ShowcaseCard,{...e})))))}},21700:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(29772),t)},87308:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowcaseCard=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(74012)),a=r.__importDefault(n(14971)),o=r.__importDefault(n(11504));n(70956);t.ShowcaseCard=e=>{let{index:t,name:n,logoSrc:r,logoSrcDark:l,description:c,className:h,size:u="large",borderStyle:d="solid",children:p,...f}=e;return o.default.createElement("div",{className:(0,a.default)(h,"mdx-showcase-card",`mdx-showcase-card--${u}`,`mdx-showcase-card--border-${d}`),...f},o.default.createElement("div",{className:"mdx-showcase-card__inner"},t&&o.default.createElement(i.Typography,{className:"mdx-showcase-card__index",variant:"subtitle2",component:"div"},t),(r||l)&&o.default.createElement(s.default,{sources:{dark:l??r??"",light:r??l??""},alt:"string"==typeof n?n:"",className:"mdx-showcase-card__logo"}),n&&o.default.createElement(i.Typography,{variant:"h2",component:"h2",className:"mdx-showcase-card__name"},n),c&&o.default.createElement(i.Typography,{variant:"body1",component:"p",className:"mdx-showcase-card__description"},c)))}},61548:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(87308),t)},16032:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocialCard=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(74012)),a=r.__importDefault(n(14971)),o=r.__importDefault(n(11504)),l=n(34640);n(69500);t.SocialCard=e=>{let{title:t,logoSrc:n,logoSrcDark:r,description:c,...h}=e;return o.default.createElement("a",{target:"_blank",...h,className:(0,a.default)(h.className,"mdx-social-card")},o.default.createElement("div",{className:"mdx-social-card__row"},(n||r)&&o.default.createElement(s.default,{sources:{dark:r??n??"",light:n??r??""},alt:t??"social card logo",className:"mdx-social-card__logo"}),o.default.createElement(l.IconExternalLink,{className:"mdx-social-card__external-link"})),o.default.createElement(i.Typography,{variant:"body1",component:"span",className:"mdx-social-card__description"},c))}},27012:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(16032),t)},61660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimelineItem=void 0;const r=n(81316),i=n(81595),s=r.__importDefault(n(14971)),a=r.__importDefault(n(11504));n(18040);t.TimelineItem=e=>{let{index:t,period:n,description:r,borderStyle:o,periodStyle:l,className:c,children:h,...u}=e;return a.default.createElement("div",{className:(0,s.default)(c,"mdx-timeline-item","dashed"===o&&"mdx-timeline-item--border-dashed"),...u},a.default.createElement("div",{className:"mdx-timeline-item__header"},a.default.createElement("div",{className:"mdx-timeline-item__period-container"},"none"!==o&&a.default.createElement("div",{className:(0,s.default)("mdx-timeline-item__border")}),a.default.createElement(i.Typography,{variant:"subtitle2",component:"span",className:(0,s.default)("mdx-timeline-item__period",`mdx-timeline-item__period--${l}`)},(e=>{if(Array.isArray(e)&&e.length>0){let t=e[0].toString();return e.length>1&&("+"===e[1]?t+="+":t+=" "+e[1]),t}return""})(n))),a.default.createElement(i.Typography,{variant:"h2",component:"span",className:"mdx-timeline-item__index"},"number"==typeof t?`${t<9?"0":""}${t+1}`:t)),a.default.createElement(i.Typography,{variant:"h5",component:"p",className:"mdx-timeline-item__description"},r))}},38848:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});n(81316).__exportStar(n(61660),t)},39160:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(81316);r.__exportStar(n(53636),t),r.__exportStar(n(61136),t),r.__exportStar(n(9128),t),r.__exportStar(n(96288),t),r.__exportStar(n(56772),t),r.__exportStar(n(10380),t),r.__exportStar(n(26356),t),r.__exportStar(n(88440),t),r.__exportStar(n(48040),t),r.__exportStar(n(62516),t),r.__exportStar(n(26572),t),r.__exportStar(n(63376),t),r.__exportStar(n(1280),t),r.__exportStar(n(68292),t),r.__exportStar(n(69396),t),r.__exportStar(n(87648),t),r.__exportStar(n(49832),t),r.__exportStar(n(96464),t),r.__exportStar(n(57348),t),r.__exportStar(n(79696),t),r.__exportStar(n(5688),t),r.__exportStar(n(30416),t),r.__exportStar(n(72036),t),r.__exportStar(n(83612),t),r.__exportStar(n(82944),t),r.__exportStar(n(56800),t),r.__exportStar(n(42936),t),r.__exportStar(n(21700),t),r.__exportStar(n(61548),t),r.__exportStar(n(27012),t),r.__exportStar(n(38848),t),r.__exportStar(n(6476),t),r.__exportStar(n(39808),t),r.__exportStar(n(55192),t),r.__exportStar(n(43240),t),r.__exportStar(n(69285),t),r.__exportStar(n(62668),t),r.__exportStar(n(13456),t),r.__exportStar(n(64816),t),r.__exportStar(n(74456),t),r.__exportStar(n(92436),t)},67760:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lsdUtils=t.LsdUtils=void 0;const r=n(81595),i=n(81712);class s{_breakpoints={};getBreakpoints=e=>{if(this._breakpoints[e.name])return this._breakpoints[e.name];const t={};for(let n=0;nthis.getBreakpoints(e)[t];breakpoints=(()=>function(e){return void 0===e&&(e=[]),r.THEME_BREAKPOINTS.filter((t=>!e.find((e=>e===t))))})();typography=function(e,t){return void 0===t&&(t=!1),"subtitle3"===e?"\n font-size: 12px !important;\n font-weight: 400 !important;\n line-height: 16px !important;\n ":`\n font-size: var(--lsd-${e}-fontSize)${t?"!important":""};\n font-weight: var(--lsd-${e}-fontWeight)${t?"!important":""};\n line-height: var(--lsd-${e}-lineHeight)${t?"!important":""};\n `};breakpoint=(()=>{var e=this;return function(t,n,r,i){void 0===r&&(r="up");const{min:s,max:a}=e.getBreakpoint(t,n);let o="@media ";if("up"===r)o+=`(min-width: ${s}px)`;else if("down"===r)o+=`(max-width: ${a}px)`;else if("between"===r&&i){o+=`(min-width: ${s}px) and (max-width: ${e.getBreakpoint(t,i).min-1}px)`}else o+=`(min-width: ${s}px) and (max-width: ${a}px)`;return`${o}`}})();responsive=(()=>function(e,n,r){void 0===r&&(r="up");const s=t.lsdUtils.breakpoint(e,n,r);return e=>i.css` + ${s} { + ${e} + } + `})()}t.LsdUtils=s,t.lsdUtils=new s},35569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.makeStyle=void 0;t.makeStyle=function(e,t){return void 0===t&&(t={}),{...e,...Object.entries(t).reduce(((e,t)=>{let[n,r]=t;return{...e,[`--${n}`]:r}}),{})}}},45080:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calcHeroInfoMb=t.isMobile=t.generateTextShadow=t.isTouchDevice=t.calcScrollThreshold=t.mapFloat=t.random=void 0;t.random=(e,t)=>Math.random()*(t-e)+e;t.mapFloat=(e,t,n,r,i)=>(e-t)*(i-r)/(n-t)+r;t.calcScrollThreshold=()=>.4*window.innerHeight;t.isTouchDevice=()=>"undefined"!=typeof window&&("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints>0);t.generateTextShadow=e=>{let t="";for(let n=0;n"undefined"!=typeof window&&window.innerWidth<997;t.calcHeroInfoMb=e=>(0,t.mapFloat)(scrollY,0,(0,t.calcScrollThreshold)(),0,100)},33732:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useNewsletterApi=void 0;const r=n(11504);t.useNewsletterApi=()=>{const[e,t]=(0,r.useState)(!1),[n,i]=(0,r.useState)({error:!1,message:""});return{busy:e,error:n.error,message:n.message,subscribe:async(e,n,r)=>{t(!0);try{const t=await fetch("https://odoo.logos.co/website_mass_mailing/subscribe2",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonrpc:"2.0",method:"call",params:{name:r,value:n,list_id:e,subscription_type:"email"}})}),s=await t.json();i({error:!1,message:s.result.message})}catch(s){i({error:!0,message:"Something went wrong!"})}t(!1)}}}},72176:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useScrollY=void 0;const r=n(59608),i=n(11504);t.useScrollY=()=>{const[e,t]=(0,i.useState)(0);return(0,r.useWindowEventListener)("scroll",(()=>{t(window.scrollY)})),e}},33948:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function s(e){i(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===r(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function a(e){if(i(1,arguments),!function(e){return i(1,arguments),e instanceof Date||"object"===r(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=s(e);return!isNaN(Number(t))}function o(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function l(e,t){return i(2,arguments),function(e,t){i(2,arguments);var n=s(e).getTime(),r=o(t);return new Date(n+r)}(e,-o(t))}n.r(t),n.d(t,{default:()=>J});function c(e){i(1,arguments);var t=s(e),n=t.getUTCDay(),r=(n<1?7:0)+n-1;return t.setUTCDate(t.getUTCDate()-r),t.setUTCHours(0,0,0,0),t}function h(e){i(1,arguments);var t=s(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var a=c(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var l=c(o);return t.getTime()>=a.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}function u(e){i(1,arguments);var t=s(e),n=c(t).getTime()-function(e){i(1,arguments);var t=h(e),n=new Date(0);return n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0),c(n)}(t).getTime();return Math.round(n/6048e5)+1}var d={};function p(){return d}function f(e,t){var n,r,a,l,c,h,u,d;i(1,arguments);var f=p(),m=o(null!==(n=null!==(r=null!==(a=null!==(l=null==t?void 0:t.weekStartsOn)&&void 0!==l?l:null==t||null===(c=t.locale)||void 0===c||null===(h=c.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==a?a:f.weekStartsOn)&&void 0!==r?r:null===(u=f.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==n?n:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=s(e),A=g.getUTCDay(),v=(A=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(g+1,0,v),y.setUTCHours(0,0,0,0);var x=f(y,t),b=new Date(0);b.setUTCFullYear(g,0,v),b.setUTCHours(0,0,0,0);var E=f(b,t);return m.getTime()>=x.getTime()?g+1:m.getTime()>=E.getTime()?g:g-1}function g(e,t){i(1,arguments);var n=s(e),r=f(n,t).getTime()-function(e,t){var n,r,s,a,l,c,h,u;i(1,arguments);var d=p(),g=o(null!==(n=null!==(r=null!==(s=null!==(a=null==t?void 0:t.firstWeekContainsDate)&&void 0!==a?a:null==t||null===(l=t.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==s?s:d.firstWeekContainsDate)&&void 0!==r?r:null===(h=d.locale)||void 0===h||null===(u=h.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:1),A=m(e,t),v=new Date(0);return v.setUTCFullYear(A,0,g),v.setUTCHours(0,0,0,0),f(v,t)}(n,t).getTime();return Math.round(r/6048e5)+1}function A(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?n:1-n;return A("yy"===t?r%100:r,t.length)},M:function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):A(n+1,2)},d:function(e,t){return A(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(e,t){return A(e.getUTCHours()%12||12,t.length)},H:function(e,t){return A(e.getUTCHours(),t.length)},m:function(e,t){return A(e.getUTCMinutes(),t.length)},s:function(e,t){return A(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,r=e.getUTCMilliseconds();return A(Math.floor(r*Math.pow(10,n-3)),t.length)}};var y="midnight",x="noon",b="morning",E="afternoon",_="evening",S="night",M={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return v.y(e,t)},Y:function(e,t,n,r){var i=m(e,r),s=i>0?i:1-i;return"YY"===t?A(s%100,2):"Yo"===t?n.ordinalNumber(s,{unit:"year"}):A(s,t.length)},R:function(e,t){return A(h(e),t.length)},u:function(e,t){return A(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return A(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return A(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return v.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return A(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var i=g(e,r);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):A(i,t.length)},I:function(e,t,n){var r=u(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):A(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):v.d(e,t)},D:function(e,t,n){var r=function(e){i(1,arguments);var t=s(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=n-t.getTime();return Math.floor(r/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):A(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var i=e.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return A(s,2);case"eo":return n.ordinalNumber(s,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var i=e.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return A(s,t.length);case"co":return n.ordinalNumber(s,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),i=0===r?7:r;switch(t){case"i":return String(i);case"ii":return A(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,i=e.getUTCHours();switch(r=12===i?x:0===i?y:i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,i=e.getUTCHours();switch(r=i>=17?_:i>=12?E:i>=4?b:S,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return v.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):v.H(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):A(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):A(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):v.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):v.s(e,t)},S:function(e,t){return v.S(e,t)},X:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return C(i);case"XXXX":case"XX":return T(i);default:return T(i,":")}},x:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return C(i);case"xxxx":case"xx":return T(i);default:return T(i,":")}},O:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+w(i,":");default:return"GMT"+T(i,":")}},z:function(e,t,n,r){var i=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+w(i,":");default:return"GMT"+T(i,":")}},t:function(e,t,n,r){var i=r._originalDate||e;return A(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,r){return A((r._originalDate||e).getTime(),t.length)}};function w(e,t){var n=e>0?"-":"+",r=Math.abs(e),i=Math.floor(r/60),s=r%60;if(0===s)return n+String(i);var a=t||"";return n+String(i)+a+A(s,2)}function C(e,t){return e%60==0?(e>0?"-":"+")+A(Math.abs(e)/60,2):T(e,t)}function T(e,t){var n=t||"",r=e>0?"-":"+",i=Math.abs(e);return r+A(Math.floor(i/60),2)+n+A(i%60,2)}const I=M;var B=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},R=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},P={p:R,P:function(e,t){var n,r=e.match(/(P+)(p+)?/)||[],i=r[1],s=r[2];if(!s)return B(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",B(i,t)).replace("{{time}}",R(s,t))}};const D=P;var L=["D","DD"],F=["YY","YYYY"];function U(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var O={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const N=function(e,t,n){var r,i=O[e];return r="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function k(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var G={date:k({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:k({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:k({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var z={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Q(e){return function(t,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,s=null!=n&&n.width?String(n.width):i;r=e.formattingValues[s]||e.formattingValues[i]}else{var a=e.defaultWidth,o=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}function V(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(i);if(!s)return null;var a,o=s[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(var n=0;n20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Q({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Q({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Q({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Q({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Q({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(H={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(H.matchPattern);if(!n)return null;var r=n[0],i=e.match(H.parsePattern);if(!i)return null;var s=H.valueCallback?H.valueCallback(i[0]):i[0];return{value:s=t.valueCallback?t.valueCallback(s):s,rest:e.slice(r.length)}}),era:V({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:V({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:V({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:V({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:V({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var W=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,X=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Y=/^'([^]*?)'?$/,q=/''/g,K=/[a-zA-Z]/;function J(e,t,n){var r,c,h,u,d,f,m,g,A,v,y,x,b,E,_,S,M,w;i(2,arguments);var C=String(t),T=p(),B=null!==(r=null!==(c=null==n?void 0:n.locale)&&void 0!==c?c:T.locale)&&void 0!==r?r:j,R=o(null!==(h=null!==(u=null!==(d=null!==(f=null==n?void 0:n.firstWeekContainsDate)&&void 0!==f?f:null==n||null===(m=n.locale)||void 0===m||null===(g=m.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==d?d:T.firstWeekContainsDate)&&void 0!==u?u:null===(A=T.locale)||void 0===A||null===(v=A.options)||void 0===v?void 0:v.firstWeekContainsDate)&&void 0!==h?h:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var P=o(null!==(y=null!==(x=null!==(b=null!==(E=null==n?void 0:n.weekStartsOn)&&void 0!==E?E:null==n||null===(_=n.locale)||void 0===_||null===(S=_.options)||void 0===S?void 0:S.weekStartsOn)&&void 0!==b?b:T.weekStartsOn)&&void 0!==x?x:null===(M=T.locale)||void 0===M||null===(w=M.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==y?y:0);if(!(P>=0&&P<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!B.localize)throw new RangeError("locale must contain localize property");if(!B.formatLong)throw new RangeError("locale must contain formatLong property");var O=s(e);if(!a(O))throw new RangeError("Invalid time value");var N=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}(O),k=l(O,N),G={firstWeekContainsDate:R,weekStartsOn:P,locale:B,_originalDate:O};return C.match(X).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,D[t])(e,B.formatLong):e})).join("").match(W).map((function(r){if("''"===r)return"'";var i=r[0];if("'"===i)return function(e){var t=e.match(Y);if(!t)return e;return t[1].replace(q,"'")}(r);var s,a=I[i];if(a)return null!=n&&n.useAdditionalWeekYearTokens||(s=r,-1===F.indexOf(s))||U(r,t,String(e)),null!=n&&n.useAdditionalDayOfYearTokens||!function(e){return-1!==L.indexOf(e)}(r)||U(r,t,String(e)),a(k,r,B.localize,G);if(i.match(K))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return r})).join("")}},96068:e=>{function t(e,t,n){var r,i,s,a,o;function l(){var c=Date.now()-a;c=0?r=setTimeout(l,t-c):(r=null,n||(o=e.apply(s,i),s=i=null))}null==t&&(t=100);var c=function(){s=this,i=arguments,a=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(o=e.apply(s,i),s=i=null),o};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(o=e.apply(s,i),s=i=null,clearTimeout(r),r=null)},c}t.debounce=t,e.exports=t},72144:e=>{"use strict";e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,i,s;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(s=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.prototype.hasOwnProperty.call(n,s[i]))return!1;for(i=r;0!=i--;){var a=s[i];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n}},15080:(e,t,n)=>{var r="__lodash_hash_undefined__",i=9007199254740991,s="[object Arguments]",a="[object Function]",o="[object GeneratorFunction]",l="[object Symbol]",c=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,u="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,d="object"==typeof self&&self&&self.Object===Object&&self,p=u||d||Function("return this")();function f(e,t){return!!(e?e.length:0)&&function(e,t,n){if(t!=t)return function(e,t,n,r){var i=e.length,s=n+(r?1:-1);for(;r?s--:++s-1}function m(e,t,n){for(var r=-1,i=e?e.length:0;++r0&&n(o)?t>1?W(o,t-1,n,r,i):A(i,o):r||(i[i.length]=o)}return i}function X(e){if(!oe(e)||(t=e,w&&w in t))return!1;var t,n=ae(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(n){}return t}(e)?B:c;return n.test(function(e){if(null!=e){try{return C.call(e)}catch(t){}try{return e+""}catch(t){}}return""}(e))}function Y(e){if(!oe(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t,n,r,i=(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||S,t===r),s=[];for(var a in e)("constructor"!=a||!i&&T.call(e,a))&&s.push(a);return s}function q(e){return function(e,t,n){var r=t(e);return ie(e)?r:A(r,n(e))}(e,ce,$)}function K(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function J(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return X(n)?n:void 0}G.prototype.clear=function(){this.__data__=k?k(null):{}},G.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},G.prototype.get=function(e){var t=this.__data__;if(k){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},G.prototype.has=function(e){var t=this.__data__;return k?void 0!==t[e]:T.call(t,e)},G.prototype.set=function(e,t){return this.__data__[e]=k&&void 0===t?r:t,this},z.prototype.clear=function(){this.__data__=[]},z.prototype.delete=function(e){var t=this.__data__,n=j(t,e);return!(n<0)&&(n==t.length-1?t.pop():L.call(t,n,1),!0)},z.prototype.get=function(e){var t=this.__data__,n=j(t,e);return n<0?void 0:t[n][1]},z.prototype.has=function(e){return j(this.__data__,e)>-1},z.prototype.set=function(e,t){var n=this.__data__,r=j(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Q.prototype.clear=function(){this.__data__={hash:new G,map:new(N||z),string:new G}},Q.prototype.delete=function(e){return K(this,e).delete(e)},Q.prototype.get=function(e){return K(this,e).get(e)},Q.prototype.has=function(e){return K(this,e).has(e)},Q.prototype.set=function(e,t){return K(this,e).set(e,t),this},V.prototype.add=V.prototype.push=function(e){return this.__data__.set(e,r),this},V.prototype.has=function(e){return this.__data__.has(e)};var Z=U?x(U,Object):pe,$=U?function(e){for(var t=[];e;)A(t,Z(e)),e=P(e);return t}:pe;function ee(e){return ie(e)||re(e)||!!(F&&e&&e[F])}function te(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||h.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=i}(e.length)&&!ae(e)}function ae(e){var t=oe(e)?I.call(e):"";return t==a||t==o}function oe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function le(e){return!!e&&"object"==typeof e}function ce(e){return se(e)?H(e,!0):Y(e)}var he,ue,de=(he=function(e,t){return null==e?{}:(t=g(W(t,1),ne),function(e,t){return function(e,t,n){for(var r=-1,i=t.length,s={};++r=200&&(a=y,o=!1,t=new V(t));e:for(;++s{var r=9007199254740991,i="[object Arguments]",s="[object Function]",a="[object GeneratorFunction]",o="[object Symbol]",l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,c="object"==typeof self&&self&&self.Object===Object&&self,h=l||c||Function("return this")();function u(e,t){for(var n=-1,r=t.length,i=e.length;++n0&&n(o)?t>1?y(o,t-1,n,r,i):u(i,o):r||(i[i.length]=o)}return i}function x(e){return E(e)||function(e){return function(e){return _(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?f.call(e):"";return t==s||t==a}(e)}(e)}(e)&&p.call(e,"callee")&&(!g.call(e,"callee")||f.call(e)==i)}(e)||!!(A&&e&&e[A])}function b(e){if("string"==typeof e||function(e){return"symbol"==typeof e||_(e)&&f.call(e)==o}(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t}var E=Array.isArray;function _(e){return!!e&&"object"==typeof e}var S,M,w=(S=function(e,t){return null==e?{}:function(e,t){return function(e,t,n){for(var r=-1,i=t.length,s={};++r{var r=n(71972),i=0;e.exports=function(e){var t=++i;return r(e)+t}},41272:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={root:"root_TTsz",fullWidth:"fullWidth_HBtH",fullHeight:"fullHeight_ls1u",content:"content_feMR",keep:"keep_Y9Ea"}},36148:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={scrollToBottom:"scrollToBottom_NE5w",hide:"hide_q_kn"}},61504:(e,t,n)=>{"use strict";n.r(t)},46752:(e,t,n)=>{"use strict";n.r(t)},25512:(e,t,n)=>{"use strict";n.r(t)},46720:(e,t,n)=>{"use strict";n.r(t)},40792:(e,t,n)=>{"use strict";n.r(t)},46632:(e,t,n)=>{"use strict";n.r(t)},6568:(e,t,n)=>{"use strict";n.r(t)},71100:(e,t,n)=>{"use strict";n.r(t)},13735:(e,t,n)=>{"use strict";n.r(t)},26112:(e,t,n)=>{"use strict";n.r(t)},75736:(e,t,n)=>{"use strict";n.r(t)},90340:(e,t,n)=>{"use strict";n.r(t)},77107:(e,t,n)=>{"use strict";n.r(t)},42168:(e,t,n)=>{"use strict";n.r(t)},80592:(e,t,n)=>{"use strict";n.r(t)},30672:(e,t,n)=>{"use strict";n.r(t)},40960:(e,t,n)=>{"use strict";n.r(t)},34592:(e,t,n)=>{"use strict";n.r(t)},97376:(e,t,n)=>{"use strict";n.r(t)},83384:(e,t,n)=>{"use strict";n.r(t)},18240:(e,t,n)=>{"use strict";n.r(t)},48648:(e,t,n)=>{"use strict";n.r(t)},16092:(e,t,n)=>{"use strict";n.r(t)},11904:(e,t,n)=>{"use strict";n.r(t)},40764:(e,t,n)=>{"use strict";n.r(t)},83568:(e,t,n)=>{"use strict";n.r(t)},98332:(e,t,n)=>{"use strict";n.r(t)},33576:(e,t,n)=>{"use strict";n.r(t)},20192:(e,t,n)=>{"use strict";n.r(t)},88952:(e,t,n)=>{"use strict";n.r(t)},99280:(e,t,n)=>{"use strict";n.r(t)},14656:(e,t,n)=>{"use strict";n.r(t)},50240:(e,t,n)=>{"use strict";n.r(t)},59584:(e,t,n)=>{"use strict";n.r(t)},9104:(e,t,n)=>{"use strict";n.r(t)},52824:(e,t,n)=>{"use strict";n.r(t)},89836:(e,t,n)=>{"use strict";n.r(t)},70956:(e,t,n)=>{"use strict";n.r(t)},69500:(e,t,n)=>{"use strict";n.r(t)},18040:(e,t,n)=>{"use strict";n.r(t)},92292:(e,t,n)=>{(e=n.nmd(e)).exports=function(t){var r={},i=n(89456),s=n(11504),a=n(14712);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n--o||i[a]!==s[o])return"\n"+i[a].replace(" at new "," at ")}while(1<=a&&0<=o);break}}}finally{Xe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?We(e):""}var qe=[],Ke=-1;function Je(e){return{current:e}}function Ze(e){0>Ke||(e.current=qe[Ke],qe[Ke]=null,Ke--)}function $e(e,t){Ke++,qe[Ke]=e.current,e.current=t}var et={},tt=Je(et),nt=Je(!1),rt=et;function it(e,t){var n=e.type.contextTypes;if(!n)return et;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,s={};for(i in n)s[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function st(e){return null!=(e=e.childContextTypes)}function at(){Ze(nt),Ze(tt)}function ot(e,t,n){if(tt.current!==et)throw Error(o(168));$e(tt,t),$e(nt,n)}function lt(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var s in r=r.getChildContext())if(!(s in e))throw Error(o(108,T(t)||"Unknown",s));return i({},n,r)}function ct(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||et,rt=tt.current,$e(tt,e),$e(nt,nt.current),!0}function ht(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=lt(e,t,rt),r.__reactInternalMemoizedMergedChildContext=e,Ze(nt),Ze(tt),$e(tt,e)):Ze(nt),$e(nt,n)}var ut=null,dt=null;(0,a.unstable_now)();var pt=0,ft=8;function mt(e){if(0!=(1&e))return ft=15,1;if(0!=(2&e))return ft=14,2;if(0!=(4&e))return ft=13,4;var t=24&e;return 0!==t?(ft=12,t):0!=(32&e)?(ft=11,32):0!==(t=192&e)?(ft=10,t):0!=(256&e)?(ft=9,256):0!==(t=3584&e)?(ft=8,t):0!=(4096&e)?(ft=7,4096):0!==(t=4186112&e)?(ft=6,t):0!==(t=62914560&e)?(ft=5,t):67108864&e?(ft=4,67108864):0!=(134217728&e)?(ft=3,134217728):0!==(t=805306368&e)?(ft=2,t):0!=(1073741824&e)?(ft=1,1073741824):(ft=8,e)}function gt(e,t){var n=e.pendingLanes;if(0===n)return ft=0;var r=0,i=0,s=e.expiredLanes,a=e.suspendedLanes,o=e.pingedLanes;if(0!==s)r=s,i=ft=15;else if(0!==(s=134217727&n)){var l=s&~a;0!==l?(r=mt(l),i=ft):0!==(o&=s)&&(r=mt(o),i=ft)}else 0!==(s=n&~a)?(r=mt(s),i=ft):0!==o&&(r=mt(o),i=ft);if(0===r)return 0;if(r=n&((0>(r=31-Et(r))?0:1<n;n++)t.push(e);return t}function bt(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Et(t)]=n}var Et=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(_t(e)/St|0)|0},_t=Math.log,St=Math.LN2;var Mt=a.unstable_runWithPriority,wt=a.unstable_scheduleCallback,Ct=a.unstable_cancelCallback,Tt=a.unstable_shouldYield,It=a.unstable_requestPaint,Bt=a.unstable_now,Rt=a.unstable_getCurrentPriorityLevel,Pt=a.unstable_ImmediatePriority,Dt=a.unstable_UserBlockingPriority,Lt=a.unstable_NormalPriority,Ft=a.unstable_LowPriority,Ut=a.unstable_IdlePriority,Ot={},Nt=void 0!==It?It:function(){},kt=null,Gt=null,zt=!1,Qt=Bt(),Vt=1e4>Qt?Bt:function(){return Bt()-Qt};function Ht(){switch(Rt()){case Pt:return 99;case Dt:return 98;case Lt:return 97;case Ft:return 96;case Ut:return 95;default:throw Error(o(332))}}function jt(e){switch(e){case 99:return Pt;case 98:return Dt;case 97:return Lt;case 96:return Ft;case 95:return Ut;default:throw Error(o(332))}}function Wt(e,t){return e=jt(e),Mt(e,t)}function Xt(e,t,n){return e=jt(e),wt(e,t,n)}function Yt(){if(null!==Gt){var e=Gt;Gt=null,Ct(e)}qt()}function qt(){if(!zt&&null!==kt){zt=!0;var e=0;try{var t=kt;Wt(99,(function(){for(;ed?(p=u,u=null):p=u.sibling;var f=g(i,u,o[d],l);if(null===f){null===u&&(u=p);break}e&&u&&null===f.alternate&&t(i,u),a=s(f,a,d),null===h?c=f:h.sibling=f,h=f,u=p}if(d===o.length)return n(i,u),c;if(null===u){for(;dp?(f=d,d=null):f=d.sibling;var y=g(i,d,v.value,c);if(null===y){null===d&&(d=f);break}e&&d&&null===y.alternate&&t(i,d),a=s(y,a,p),null===u?h=y:u.sibling=y,u=y,d=f}if(v.done)return n(i,d),h;if(null===d){for(;!v.done;p++,v=l.next())null!==(v=m(i,v.value,c))&&(a=s(v,a,p),null===u?h=v:u.sibling=v,u=v);return h}for(d=r(i,d);!v.done;p++,v=l.next())null!==(v=A(d,i,p,v.value,c))&&(e&&null!==v.alternate&&d.delete(null===v.key?p:v.key),a=s(v,a,p),null===u?h=v:u.sibling=v,u=v);return e&&d.forEach((function(e){return t(i,e)})),h}return function(e,r,s,l){var d="object"==typeof s&&null!==s&&s.type===u&&null===s.key;d&&(s=s.props.children);var p="object"==typeof s&&null!==s;if(p)switch(s.$$typeof){case c:e:{for(p=s.key,d=r;null!==d;){if(d.key===p){if(7===d.tag){if(s.type===u){n(e,d.sibling),(r=i(d,s.props.children)).return=e,e=r;break e}}else if(d.elementType===s.type){n(e,d.sibling),(r=i(d,s.props)).ref=In(e,d,s),r.return=e,e=r;break e}n(e,d);break}t(e,d),d=d.sibling}s.type===u?((r=Ma(s.props.children,e.mode,l,s.key)).return=e,e=r):((l=Sa(s.type,s.key,s.props,null,e.mode,l)).ref=In(e,r,s),l.return=e,e=l)}return a(e);case h:e:{for(d=s.key;null!==r;){if(r.key===d){if(4===r.tag&&r.stateNode.containerInfo===s.containerInfo&&r.stateNode.implementation===s.implementation){n(e,r.sibling),(r=i(r,s.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Ta(s,e.mode,l)).return=e,e=r}return a(e)}if("string"==typeof s||"number"==typeof s)return s=""+s,null!==r&&6===r.tag?(n(e,r.sibling),(r=i(r,s)).return=e,e=r):(n(e,r),(r=Ca(s,e.mode,l)).return=e,e=r),a(e);if(Tn(s))return v(e,r,s,l);if(C(s))return y(e,r,s,l);if(p&&Bn(e,s),void 0===s&&!d)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(o(152,T(e.type)||"Component"))}return n(e,r)}}var Pn=Rn(!0),Dn=Rn(!1),Ln={},Fn=Je(Ln),Un=Je(Ln),On=Je(Ln);function Nn(e){if(e===Ln)throw Error(o(174));return e}function kn(e,t){$e(On,t),$e(Un,e),$e(Fn,Ln),e=U(t),Ze(Fn),$e(Fn,e)}function Gn(){Ze(Fn),Ze(Un),Ze(On)}function zn(e){var t=Nn(On.current),n=Nn(Fn.current);n!==(t=O(n,e.type,t))&&($e(Un,e),$e(Fn,t))}function Qn(e){Un.current===e&&(Ze(Fn),Ze(Un))}var Vn=Je(0);function Hn(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Oe(n)||Ne(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var jn=null,Wn=null,Xn=!1;function Yn(e,t){var n=ba(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function qn(e,t){switch(e.tag){case 5:return null!==(t=Fe(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=Ue(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function Kn(e){if(Xn){var t=Wn;if(t){var n=t;if(!qn(e,t)){if(!(t=ke(n))||!qn(e,t))return e.flags=-1025&e.flags|2,Xn=!1,void(jn=e);Yn(jn,n)}jn=e,Wn=Ge(t)}else e.flags=-1025&e.flags|2,Xn=!1,jn=e}}function Jn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;jn=e}function Zn(e){if(!Z||e!==jn)return!1;if(!Xn)return Jn(e),Xn=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!H(t,e.memoizedProps))for(t=Wn;t;)Yn(e,t),t=ke(t);if(Jn(e),13===e.tag){if(!Z)throw Error(o(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));Wn=Ve(e)}else Wn=jn?ke(e.stateNode):null;return!0}function $n(){Z&&(Wn=jn=null,Xn=!1)}var er=[];function tr(){for(var e=0;es))throw Error(o(301));s+=1,or=ar=null,t.updateQueue=null,nr.current=Gr,e=n(r,i)}while(cr)}if(nr.current=Or,t=null!==ar&&null!==ar.next,ir=0,or=ar=sr=null,lr=!1,t)throw Error(o(300));return e}function pr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===or?sr.memoizedState=or=e:or=or.next=e,or}function fr(){if(null===ar){var e=sr.alternate;e=null!==e?e.memoizedState:null}else e=ar.next;var t=null===or?sr.memoizedState:or.next;if(null!==t)or=t,ar=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ar=e).memoizedState,baseState:ar.baseState,baseQueue:ar.baseQueue,queue:ar.queue,next:null},null===or?sr.memoizedState=or=e:or=or.next=e}return or}function mr(e,t){return"function"==typeof t?t(e):t}function gr(e){var t=fr(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=ar,i=r.baseQueue,s=n.pending;if(null!==s){if(null!==i){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(null!==i){i=i.next,r=r.baseState;var l=a=s=null,c=i;do{var h=c.lane;if((ir&h)===h)null!==l&&(l=l.next={lane:0,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),r=c.eagerReducer===e?c.eagerState:e(r,c.action);else{var u={lane:h,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(a=l=u,s=r):l=l.next=u,sr.lanes|=h,us|=h}c=c.next}while(null!==c&&c!==i);null===l?s=r:l.next=a,Jt(r,t.memoizedState)||(Qr=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Ar(e){var t=fr(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{s=e(s,a.action),a=a.next}while(a!==i);Jt(s,t.memoizedState)||(Qr=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function vr(e,t,n){var r=t._getVersion;r=r(t._source);var i=q?t._workInProgressVersionPrimary:t._workInProgressVersionSecondary;if(null!==i?e=i===r:(e=e.mutableReadLanes,(e=(ir&e)===e)&&(q?t._workInProgressVersionPrimary=r:t._workInProgressVersionSecondary=r,er.push(t))),e)return n(t._source);throw er.push(t),Error(o(350))}function yr(e,t,n,r){var i=rs;if(null===i)throw Error(o(349));var s=t._getVersion,a=s(t._source),l=nr.current,c=l.useState((function(){return vr(i,t,n)})),h=c[1],u=c[0];c=or;var d=e.memoizedState,p=d.refs,f=p.getSnapshot,m=d.source;d=d.subscribe;var g=sr;return e.memoizedState={refs:p,source:t,subscribe:r},l.useEffect((function(){p.getSnapshot=n,p.setSnapshot=h;var e=s(t._source);if(!Jt(a,e)){e=n(t._source),Jt(u,e)||(h(e),e=Os(g),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,o=e;0n?98:n,(function(){e(!0)})),Wt(97gs&&(t.flags|=64,i=!0,fi(r,!1),t.lanes=33554432)}else{if(!i)if(null!==(e=Hn(s))){if(t.flags|=64,i=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),fi(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate&&!Xn)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Vt()-r.renderingStartTime>gs&&1073741824!==n&&(t.flags|=64,i=!0,fi(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(e=r.last)?e.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Vt(),e.sibling=null,t=Vn.current,$e(Vn,i?1&t|2:1&t),e):null;case 23:case 24:return Xs(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(o(156,t.tag))}function gi(e){switch(e.tag){case 1:st(e.type)&&at();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Gn(),Ze(nt),Ze(tt),tr(),0!=(64&(t=e.flags)))throw Error(o(285));return e.flags=-4097&t|64,e;case 5:return Qn(e),null;case 13:return Ze(Vn),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return Ze(Vn),null;case 4:return Gn(),null;case 10:return cn(e),null;case 23:case 24:return Xs(),null;default:return null}}function Ai(e,t){try{var n="",r=t;do{n+=en(r),r=r.return}while(r);var i=n}catch(s){i="\nError generating stack: "+s.message+"\n"+s.stack}return{value:e,source:t,stack:i}}function vi(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var yi="function"==typeof WeakMap?WeakMap:Map;function xi(e,t,n){(n=gn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xs||(xs=!0,bs=r),vi(0,t)},n}function bi(e,t,n){(n=gn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return vi(0,t),r(i)}}var s=e.stateNode;return null!==s&&"function"==typeof s.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Es?Es=new Set([this]):Es.add(this),vi(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var Ei="function"==typeof WeakSet?WeakSet:Set;function _i(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(n){ha(e,n)}else t.current=null}function Si(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:tn(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(K&&256&t.flags&&Ce(t.stateNode.containerInfo))}throw Error(o(163))}function Mi(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function wi(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var i=e;r=i.next,0!=(4&(i=i.tag))&&0!=(1&i)&&(oa(n,e),aa(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:tn(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&xn(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=F(n.child.stateNode);break;case 1:e=n.child.stateNode}xn(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&ge(e,n.type,n.memoizedProps,n));case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(Z&&null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&je(n)))))}throw Error(o(163))}function Ci(e,t){if(K)for(var n=e;;){if(5===n.tag){var r=n.stateNode;t?_e(r):Me(n.stateNode,n.memoizedProps)}else if(6===n.tag)r=n.stateNode,t?Se(r):we(r,n.memoizedProps);else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function Ti(e,t){if(dt&&"function"==typeof dt.onCommitFiberUnmount)try{dt.onCommitFiberUnmount(ut,t)}catch(s){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,i=r.destroy;if(r=r.tag,void 0!==i)if(0!=(4&r))oa(t,n);else{r=t;try{i()}catch(s){ha(r,s)}}n=n.next}while(n!==e)}break;case 1:if(_i(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(s){ha(t,s)}break;case 5:_i(t);break;case 4:K?Fi(e,t):J&&J&&(t=t.stateNode.containerInfo,e=Ie(t),Pe(t,e))}}function Ii(e,t){for(var n=t;;)if(Ti(e,n),null===n.child||K&&4===n.tag){if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}else n.child.return=n,n=n.child}function Bi(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Ri(e){return 5===e.tag||3===e.tag||4===e.tag}function Pi(e){if(K){e:{for(var t=e.return;null!==t;){if(Ri(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(o(161))}16&n.flags&&(Ee(t),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||Ri(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?Di(e,n,t):Li(e,n,t)}}function Di(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?ye(n,e,t):fe(n,e);else if(4!==r&&null!==(e=e.child))for(Di(e,t,n),e=e.sibling;null!==e;)Di(e,t,n),e=e.sibling}function Li(e,t,n){var r=e.tag,i=5===r||6===r;if(i)e=i?e.stateNode:e.stateNode.instance,t?ve(n,e,t):pe(n,e);else if(4!==r&&null!==(e=e.child))for(Li(e,t,n),e=e.sibling;null!==e;)Li(e,t,n),e=e.sibling}function Fi(e,t){for(var n,r,i=t,s=!1;;){if(!s){s=i.return;e:for(;;){if(null===s)throw Error(o(160));switch(n=s.stateNode,s.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}s=s.return}s=!0}if(5===i.tag||6===i.tag)Ii(e,i),r?be(n,i.stateNode):xe(n,i.stateNode);else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,r=!0,i.child.return=i,i=i.child;continue}}else if(Ti(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(s=!1)}i.sibling.return=i.return,i=i.sibling}}function Ui(e,t){if(K){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Mi(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,s=t.updateQueue;t.updateQueue=null,null!==s&&Ae(n,s,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(o(162));return n=t.memoizedProps,void me(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(Z&&(t=t.stateNode,t.hydrate&&(t.hydrate=!1,He(t.containerInfo))));case 13:return Oi(t),void Ni(t);case 19:return void Ni(t);case 23:case 24:return void Ci(t,null!==t.memoizedState)}throw Error(o(163))}switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void Mi(3,t);case 12:case 23:case 24:return;case 13:return Oi(t),void Ni(t);case 19:return void Ni(t);case 3:Z&&((n=t.stateNode).hydrate&&(n.hydrate=!1,He(n.containerInfo)))}e:if(J){switch(t.tag){case 1:case 5:case 6:case 20:break e;case 3:case 4:t=t.stateNode,Pe(t.containerInfo,t.pendingChildren);break e}throw Error(o(163))}}function Oi(e){null!==e.memoizedState&&(ms=Vt(),K&&Ci(e.child,!0))}function Ni(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ei),t.forEach((function(t){var r=da.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ki(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&(null!==(t=t.memoizedState)&&null===t.dehydrated)}var Gi=0,zi=1,Qi=2,Vi=3,Hi=4;if("function"==typeof Symbol&&Symbol.for){var ji=Symbol.for;Gi=ji("selector.component"),zi=ji("selector.has_pseudo_class"),Qi=ji("selector.role"),Vi=ji("selector.test_id"),Hi=ji("selector.text")}function Wi(e){var t=$(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(o(364));return t}if(null===(e=ae(e)))throw Error(o(362));return e.stateNode.current}function Xi(e,t){switch(t.$$typeof){case Gi:if(e.type===t.value)return!0;break;case zi:e:{t=t.value,e=[e,0];for(var n=0;n";case zi:return":has("+(Yi(e)||"")+")";case Qi:return'[role="'+e.value+'"]';case Hi:return'"'+e.value+'"';case Vi:return'[data-testname="'+e.value+'"]';default:throw Error(o(365,e))}}function qi(e,t){var n=[];e=[e,0];for(var r=0;ri&&(i=a),n&=~s}if(n=i,10<(n=(120>(n=Vt()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Zi(n/1960))-n)){e.timeoutHandle=W(na.bind(null,e),n);break}na(e);break;default:throw Error(o(329))}}return Gs(e,Vt()),e.callbackNode===t?zs.bind(null,e):null}function Qs(e,t){for(t&=~ps,t&=~ds,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==ls&&(ls=2),l=Ai(l,o),d=a;do{switch(d.tag){case 3:s=l,d.flags|=4096,t&=-t,d.lanes|=t,vn(d,xi(0,s,t));break e;case 1:s=l;var b=d.type,E=d.stateNode;if(0==(64&d.flags)&&("function"==typeof b.getDerivedStateFromError||null!==E&&"function"==typeof E.componentDidCatch&&(null===Es||!Es.has(E)))){d.flags|=4096,t&=-t,d.lanes|=t,vn(d,bi(d,s,t));break e}}d=d.return}while(null!==d)}ta(n)}catch(_){t=_,is===n&&null!==n&&(is=n=n.return);continue}break}}function Ks(){var e=$i.current;return $i.current=Or,null===e?Or:e}function Js(e,t){var n=ns;ns|=16;var r=Ks();for(rs===e&&ss===t||Ys(e,t);;)try{Zs();break}catch(i){qs(e,i)}if(on(),ns=n,$i.current=r,null!==is)throw Error(o(261));return rs=null,ss=0,ls}function Zs(){for(;null!==is;)ea(is)}function $s(){for(;null!==is&&!Tt();)ea(is)}function ea(e){var t=vs(e.alternate,e,as);e.memoizedProps=e.pendingProps,null===t?ta(e):is=t,es.current=null}function ta(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=mi(n,t,as)))return void(is=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&as)||0==(4&n.mode)){for(var r=0,i=n.child;null!==i;)r|=i.lanes|i.childLanes,i=i.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1Vt()-ms?Ys(e,0):ps|=n),Gs(e,t)}function da(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Ht()?1:2:(0===Ps&&(Ps=hs),0===(t=yt(62914560&~Ps))&&(t=4194304))),n=Us(),null!==(e=ks(e,t))&&(bt(e,t,n),Gs(e,n))}vs=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||nt.current)Qr=!0;else{if(0==(n&r)){switch(Qr=!1,t.tag){case 3:Zr(t),$n();break;case 5:zn(t);break;case 1:st(t.type)&&ct(t);break;case 4:kn(t,t.stateNode.containerInfo);break;case 10:ln(t,t.memoizedProps.value);break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?ii(e,t,n):($e(Vn,1&Vn.current),null!==(t=ui(e,t,n))?t.sibling:null);$e(Vn,1&Vn.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return hi(e,t,n);t.flags|=64}var i=t.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),$e(Vn,Vn.current),r)break;return null;case 23:case 24:return t.lanes=0,Xr(e,t,n)}return ui(e,t,n)}Qr=0!=(16384&e.flags)}else Qr=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=it(t,tt.current),un(t,n),i=dr(null,t,r,e,i,n),t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,st(r)){var s=!0;ct(t)}else s=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,fn(t);var a=r.getDerivedStateFromProps;"function"==typeof a&&En(t,r,a,e),i.updater=_n,t.stateNode=i,i._reactInternals=t,Cn(t,r,e,n),t=Jr(null,t,r,!0,s,n)}else t.tag=0,Vr(null,t,i,n),t=t.child;return t;case 16:i=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=(s=i._init)(i._payload),t.type=i,s=t.tag=function(e){if("function"==typeof e)return Ea(e)?1:0;if(null!=e){if((e=e.$$typeof)===g)return 11;if(e===y)return 14}return 2}(i),e=tn(i,e),s){case 0:t=qr(null,t,i,e,n);break e;case 1:t=Kr(null,t,i,e,n);break e;case 11:t=Hr(null,t,i,e,n);break e;case 14:t=jr(null,t,i,tn(i.type,e),r,n);break e}throw Error(o(306,i,""))}return t;case 0:return r=t.type,i=t.pendingProps,qr(e,t,r,i=t.elementType===r?i:tn(r,i),n);case 1:return r=t.type,i=t.pendingProps,Kr(e,t,r,i=t.elementType===r?i:tn(r,i),n);case 3:if(Zr(t),r=t.updateQueue,null===e||null===r)throw Error(o(282));if(r=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,mn(e,t),yn(t,r,null,n),(r=t.memoizedState.element)===i)$n(),t=ui(e,t,n);else{if((s=(i=t.stateNode).hydrate)&&(Z?(Wn=Ge(t.stateNode.containerInfo),jn=t,s=Xn=!0):s=!1),s){if(Z&&null!=(e=i.mutableSourceEagerHydrationData))for(i=0;i=h&&s>=d&&i<=u&&a<=p){e.splice(t,1);break}if(!(r!==h||n.width!==c.width||pa)){d>s&&(c.height+=d-s,c.y=s),pi)){h>r&&(c.width+=h-r,c.x=r),un&&(n=a)),a ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},r.getPublicRootInstance=function(e){return(e=e.current).child?5===e.child.tag?F(e.child.stateNode):e.child.stateNode:null},r.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:l.ReactCurrentDispatcher,findHostInstanceByFiber:Da,findFiberByHostInstance:e.findFiberByHostInstance||La,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t.isDisabled&&t.supportsFiber)try{ut=t.inject(e),dt=t}catch(n){}e=!0}return e},r.observeVisibleRects=function(e,t,n,r){if(!se)throw Error(o(363));e=Ki(e,t);var i=de(e,n,r).disconnect;return{disconnect:function(){i()}}},r.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},r.runWithPriority=function(e,t){var n=pt;try{return pt=e,t()}finally{pt=n}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(e,t){var n=ns;ns&=-2,ns|=8;try{return e(t)}finally{0===(ns=n)&&(As(),Yt())}},r.updateContainer=function(e,t,n,r){var i=t.current,s=Us(),a=Os(i);e:if(n){t:{if(I(n=n._reactInternals)!==n||1!==n.tag)throw Error(o(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(st(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(o(171))}if(1===n.tag){var c=n.type;if(st(c)){n=lt(n,c,l);break e}}n=l}else n=et;return null===t.context?t.context=n:t.pendingContext=n,(t=gn(s,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),An(i,t),Ns(i,a,s),a},r}},44408:(e,t,n)=>{"use strict";e.exports=n(92292)},4700:function(e){var t;e.exports=((t=function(){function e(e){return i.appendChild(e.dom),e}function n(e){for(var t=0;ta+1e3&&(l.update(1e3*o/(e-a),100),a=e,o=0,h)){var t=performance.memory;h.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){s=this.end()},domElement:i,setMode:n}}).Panel=function(e,t,n){var r=1/0,i=0,s=Math.round,a=s(window.devicePixelRatio||1),o=80*a,l=48*a,c=3*a,h=2*a,u=3*a,d=15*a,p=74*a,f=30*a,m=document.createElement("canvas");m.width=o,m.height=l,m.style.cssText="width:80px;height:48px";var g=m.getContext("2d");return g.font="bold "+9*a+"px Helvetica,Arial,sans-serif",g.textBaseline="top",g.fillStyle=n,g.fillRect(0,0,o,l),g.fillStyle=t,g.fillText(e,c,h),g.fillRect(u,d,p,f),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(u,d,p,f),{dom:m,update:function(l,A){r=Math.min(r,l),i=Math.max(i,l),g.fillStyle=n,g.globalAlpha=1,g.fillRect(0,0,o,d),g.fillStyle=t,g.fillText(s(l)+" "+e+" ("+s(r)+"-"+s(i)+")",c,h),g.drawImage(m,u+a,d,p-a,f,u,d,p-a,f),g.fillRect(u+p-a,d,a,f),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(u+p-a,d,a,s((1-l/A)*f))}}},t)},52584:(e,t,n)=>{"use strict";n.d(t,{c:()=>a});var r=n(11504);function i(e){let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(i!==t){const e=t;t=r?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,s={setState:r,getState:i,subscribe:(e,r,s)=>r||s?((e,r=i,s=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let a=r(t);function o(){const n=r(t);if(!s(a,n)){const t=a;e(a=n,t)}}return n.add(o),()=>n.delete(o)})(e,r,s):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,i,s),s}const s="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?r.useEffect:r.useLayoutEffect;function a(e){const t="function"==typeof e?i(e):e,n=(e=t.getState,n=Object.is)=>{const[,i]=(0,r.useReducer)((e=>e+1),0),a=t.getState(),o=(0,r.useRef)(a),l=(0,r.useRef)(e),c=(0,r.useRef)(n),h=(0,r.useRef)(!1),u=(0,r.useRef)();let d;void 0===u.current&&(u.current=e(a));let p=!1;(o.current!==a||l.current!==e||c.current!==n||h.current)&&(d=e(a),p=!n(u.current,d)),s((()=>{p&&(u.current=d),o.current=a,l.current=e,c.current=n,h.current=!1}));const f=(0,r.useRef)(a);s((()=>{const e=()=>{try{const e=t.getState(),n=l.current(e);c.current(u.current,n)||(o.current=e,u.current=n,i())}catch(e){h.current=!0,i()}},n=t.subscribe(e);return t.getState()!==f.current&&e(),n}),[]);const m=p?d:u.current;return(0,r.useDebugValue)(m),m};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const e=[n,t];return{next(){const t=e.length<=0;return{value:e.shift(),done:t}}}},n}},19156:(e,t,n)=>{"use strict";function r(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;rr})},91952:(e,t,n)=>{"use strict";var r=n(29416),i=Uint8Array,s=Uint16Array,a=Uint32Array,o=new i([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),l=new i([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),c=new i([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),h=function(e,t){for(var n=new s(31),r=0;r<31;++r)n[r]=t+=1<>>1|(21845&v)<<1;y=(61680&(y=(52428&y)>>>2|(13107&y)<<2))>>>4|(3855&y)<<4,A[v]=((65280&y)>>>8|(255&y)<<8)>>>1}var x=function(e,t,n){for(var r=e.length,i=0,a=new s(t);i>>c]=h}else for(o=new s(r),i=0;i>>15-e[i]);return o},b=new i(288);for(v=0;v<144;++v)b[v]=8;for(v=144;v<256;++v)b[v]=9;for(v=256;v<280;++v)b[v]=7;for(v=280;v<288;++v)b[v]=8;var E=new i(32);for(v=0;v<32;++v)E[v]=5;var _=x(b,9,0),S=x(b,9,1),M=x(E,5,0),w=x(E,5,1),C=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},T=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},I=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},B=function(e){return(e/8|0)+(7&e&&1)},R=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof s?s:e instanceof a?a:i)(n-t);return r.set(e.subarray(t,n)),r},P=function(e,t,n){var r=e.length;if(!r||n&&!n.l&&r<5)return t||new i(0);var s=!t||n,a=!n||n.i;n||(n={}),t||(t=new i(3*r));var h=function(e){var n=t.length;if(e>n){var r=new i(Math.max(2*n,e));r.set(t),t=r}},u=n.f||0,p=n.p||0,f=n.b||0,g=n.l,A=n.d,v=n.m,y=n.n,b=8*r;do{if(!g){n.f=u=T(e,p,1);var E=T(e,p+1,3);if(p+=3,!E){var _=e[(z=B(p)+4)-4]|e[z-3]<<8,M=z+_;if(M>r){if(a)throw"unexpected EOF";break}s&&h(f+_),t.set(e.subarray(z,M),f),n.b=f+=_,n.p=p=8*M;continue}if(1==E)g=S,A=w,v=9,y=5;else{if(2!=E)throw"invalid block type";var P=T(e,p,31)+257,D=T(e,p+10,15)+4,L=P+T(e,p+5,31)+1;p+=14;for(var F=new i(L),U=new i(19),O=0;O>>4)<16)F[O++]=z;else{var V=0,H=0;for(16==z?(H=3+T(e,p,3),p+=2,V=F[O-1]):17==z?(H=3+T(e,p,7),p+=3):18==z&&(H=11+T(e,p,127),p+=7);H--;)F[O++]=V}}var j=F.subarray(0,P),W=F.subarray(P);v=C(j),y=C(W),g=x(j,v,1),A=x(W,y,1)}if(p>b){if(a)throw"unexpected EOF";break}}s&&h(f+131072);for(var X=(1<>>4;if((p+=15&V)>b){if(a)throw"unexpected EOF";break}if(!V)throw"invalid length/literal";if(K<256)t[f++]=K;else{if(256==K){q=p,g=null;break}var J=K-254;if(K>264){var Z=o[O=K-257];J=T(e,p,(1<>>4;if(!$)throw"invalid distance";p+=15&$;W=m[ee];if(ee>3){Z=l[ee];W+=I(e,p)&(1<b){if(a)throw"unexpected EOF";break}s&&h(f+131072);for(var te=f+J;f>>8},L=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},F=function(e,t){for(var n=[],r=0;rf&&(f=o[r].s);var m=new s(f+1),g=U(n[d-1],m,0);if(g>t){r=0;var A=0,v=g-t,y=1<t))break;A+=y-(1<>>=v;A>0;){var b=o[r].s;m[b]=0&&A;--r){var E=o[r].s;m[E]==t&&(--m[E],++A)}g=t}return[new i(m),g]},U=function(e,t,n){return-1==e.s?Math.max(U(e.l,t,n+1),U(e.r,t,n+1)):t[e.s]=n},O=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new s(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},l=1;l<=t;++l)if(e[l]==i&&l!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[l]}return[n.subarray(0,r),t]},N=function(e,t){for(var n=0,r=0;r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var s=0;s4&&!z[c[V-1]];--V);var H,j,W,X,Y=p+5<<3,q=N(i,b)+N(a,E)+h,K=N(i,g)+N(a,y)+h+14+3*V+N(P,z)+(2*P[16]+3*P[17]+7*P[18]);if(Y<=q&&Y<=K)return k(t,f,e.subarray(d,d+p));if(D(t,f,1+(K15&&(D(t,f,ee[U]>>>5&127),f+=ee[U]>>>12)}}}else H=_,j=b,W=M,X=E;for(U=0;U255){te=r[U]>>>18&31;L(t,f,H[te+257]),f+=j[te+257],te>7&&(D(t,f,r[U]>>>23&31),f+=o[te]);var ne=31&r[U];L(t,f,W[ne]),f+=X[ne],ne>3&&(L(t,f,r[U]>>>5&8191),f+=l[ne])}else L(t,f,H[r[U]]),f+=j[r[U]];return L(t,f,H[256]),f+j[256]},z=new a([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Q=new i(0),V=function(e,t,n,r,c,h){var u=e.length,d=new i(r+u+5*(1+Math.ceil(u/7e3))+c),f=d.subarray(r,d.length-c),m=0;if(!t||u<8)for(var A=0;A<=u;A+=65535){var v=A+65535;v>>13,b=8191&y,E=(1<7e3||F>24576)&&j>423){m=G(e,f,0,T,I,P,L,F,O,A-O,m),F=D=L=0,O=A;for(var W=0;W<286;++W)I[W]=0;for(W=0;W<30;++W)P[W]=0}var X=2,Y=0,q=b,K=V-H&32767;if(j>2&&N==C(A-K))for(var J=Math.min(x,j)-1,Z=Math.min(32767,A),$=Math.min(258,j);K<=Z&&--q&&V!=H;){if(e[A+X]==e[A+X-K]){for(var ee=0;ee<$&&e[A+ee]==e[A+ee-K];++ee);if(ee>X){if(X=ee,Y=K,ee>J)break;var te=Math.min(K,ee-2),ne=0;for(W=0;Wne&&(ne=ie,H=re)}}}K+=(V=H)-(H=_[V])+32768&32767}if(Y){T[F++]=268435456|p[X]<<18|g[Y];var se=31&p[X],ae=31&g[Y];L+=o[se]+l[ae],++I[257+se],++P[ae],U=A+X,++D}else T[F++]=e[A],++I[e[A]]}}m=G(e,f,h,T,I,P,L,F,O,A-O,m),!h&&7&m&&(m=k(f,m+1,Q))}return R(d,0,r+B(m)+c)},H=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),j=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r>>8;e=n},d:function(){return~e}}},W=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,s=n.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}},X=function(e,t,n,r,i){return V(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)},Y=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},q=function(e,t,n){for(var r=e(),i=e.toString(),s=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/ /g,"").split(","),a=0;a>>0},ue=function(e,t){return he(e,t)+4294967296*he(e,t+4)},de=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},pe=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&de(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},fe=function(e){if(31!=e[0]||139!=e[1]||8!=e[2])throw"invalid gzip data";var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},me=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},ge=function(e){return 10+(e.filename&&e.filename.length+1||0)},Ae=function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)},ve=function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"};function ye(e,t){return t||"function"!=typeof e||(t=e,e={}),this.ondata=t,e}var xe=function(){function e(e,t){t||"function"!=typeof e||(t=e,e={}),this.ondata=t,this.o=e||{}}return e.prototype.p=function(e,t){this.ondata(X(e,this.o,0,0,!t),t)},e.prototype.push=function(e,t){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=t,this.p(e,t||!1)},e}();t.Deflate=xe;var be=function(){return function(e,t){le([$,function(){return[oe,xe]}],this,ye.call(this,e,t),(function(e){var t=new xe(e.data);onmessage=oe(t)}),6)}}();function Ee(e,t,n){if(n||(n=t,t={}),"function"!=typeof n)throw"no callback";return ae(e,t,[$],(function(e){return ie(_e(e.data[0],e.data[1]))}),0,n)}function _e(e,t){return X(e,t||{},0,0)}t.AsyncDeflate=be,t.deflate=Ee,t.deflateSync=_e;var Se=function(){function e(e){this.s={},this.p=new i(0),this.ondata=e}return e.prototype.e=function(e){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var t=this.p.length,n=new i(t+e.length);n.set(this.p),n.set(e,t),this.p=n},e.prototype.c=function(e){this.d=this.s.i=e||!1;var t=this.s.b,n=P(this.p,this.o,this.s);this.ondata(R(n,t,this.s.b),this.d),this.o=R(n,this.s.b-32768),this.s.b=this.o.length,this.p=R(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}();t.Inflate=Se;var Me=function(){return function(e){this.ondata=e,le([Z,function(){return[oe,Se]}],this,0,(function(){var e=new Se;onmessage=oe(e)}),7)}}();function we(e,t,n){if(n||(n=t,t={}),"function"!=typeof n)throw"no callback";return ae(e,t,[Z],(function(e){return ie(Ce(e.data[0],se(e.data[1])))}),1,n)}function Ce(e,t){return P(e,t)}t.AsyncInflate=Me,t.inflate=we,t.inflateSync=Ce;var Te=function(){function e(e,t){this.c=j(),this.l=0,this.v=1,xe.call(this,e,t)}return e.prototype.push=function(e,t){xe.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e),this.l+=e.length;var n=X(e,this.o,this.v&&ge(this.o),t&&8,!t);this.v&&(pe(n,this.o),this.v=0),t&&(de(n,n.length-8,this.c.d()),de(n,n.length-4,this.l)),this.ondata(n,t)},e}();t.Gzip=Te,t.Compress=Te;var Ie=function(){return function(e,t){le([$,ee,function(){return[oe,xe,Te]}],this,ye.call(this,e,t),(function(e){var t=new Te(e.data);onmessage=oe(t)}),8)}}();function Be(e,t,n){if(n||(n=t,t={}),"function"!=typeof n)throw"no callback";return ae(e,t,[$,ee,function(){return[Re]}],(function(e){return ie(Re(e.data[0],e.data[1]))}),2,n)}function Re(e,t){t||(t={});var n=j(),r=e.length;n.p(e);var i=X(e,t,ge(t),8),s=i.length;return pe(i,t),de(i,s-8,n.d()),de(i,s-4,r),i}t.AsyncGzip=Ie,t.AsyncCompress=Ie,t.gzip=Be,t.compress=Be,t.gzipSync=Re,t.compressSync=Re;var Pe=function(){function e(e){this.v=1,Se.call(this,e)}return e.prototype.push=function(e,t){if(Se.prototype.e.call(this,e),this.v){var n=this.p.length>3?fe(this.p):4;if(n>=this.p.length&&!t)return;this.p=this.p.subarray(n),this.v=0}if(t){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}Se.prototype.c.call(this,t)},e}();t.Gunzip=Pe;var De=function(){return function(e){this.ondata=e,le([Z,te,function(){return[oe,Se,Pe]}],this,0,(function(){var e=new Pe;onmessage=oe(e)}),9)}}();function Le(e,t,n){if(n||(n=t,t={}),"function"!=typeof n)throw"no callback";return ae(e,t,[Z,te,function(){return[Fe]}],(function(e){return ie(Fe(e.data[0]))}),3,n)}function Fe(e,t){return P(e.subarray(fe(e),-8),t||new i(me(e)))}t.AsyncGunzip=De,t.gunzip=Le,t.gunzipSync=Fe;var Ue=function(){function e(e,t){this.c=W(),this.v=1,xe.call(this,e,t)}return e.prototype.push=function(e,t){xe.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e);var n=X(e,this.o,this.v&&2,t&&4,!t);this.v&&(Ae(n,this.o),this.v=0),t&&de(n,n.length-4,this.c.d()),this.ondata(n,t)},e}();t.Zlib=Ue;var Oe=function(){return function(e,t){le([$,ne,function(){return[oe,xe,Ue]}],this,ye.call(this,e,t),(function(e){var t=new Ue(e.data);onmessage=oe(t)}),10)}}();function Ne(e,t){t||(t={});var n=W();n.p(e);var r=X(e,t,2,4);return Ae(r,t),de(r,r.length-4,n.d()),r}t.AsyncZlib=Oe,t.zlib=function(e,t,n){if(n||(n=t,t={}),"function"!=typeof n)throw"no callback";return ae(e,t,[$,ne,function(){return[Ne]}],(function(e){return ie(Ne(e.data[0],e.data[1]))}),4,n)},t.zlibSync=Ne;var ke=function(){function e(e){this.v=1,Se.call(this,e)}return e.prototype.push=function(e,t){if(Se.prototype.e.call(this,e),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}if(t){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}Se.prototype.c.call(this,t)},e}();t.Unzlib=ke;var Ge=function(){return function(e){this.ondata=e,le([Z,re,function(){return[oe,Se,ke]}],this,0,(function(){var e=new ke;onmessage=oe(e)}),11)}}();function ze(e,t,n){if(n||(n=t,t={}),"function"!=typeof n)throw"no callback";return ae(e,t,[Z,re,function(){return[Qe]}],(function(e){return ie(Qe(e.data[0],se(e.data[1])))}),5,n)}function Qe(e,t){return P((ve(e),e.subarray(2,-4)),t)}t.AsyncUnzlib=Ge,t.unzlib=ze,t.unzlibSync=Qe;var Ve=function(){function e(e){this.G=Pe,this.I=Se,this.Z=ke,this.ondata=e}return e.prototype.push=function(e,t){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(e,t);else{if(this.p&&this.p.length){var n=new i(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var r=this,s=function(){r.ondata.apply(r,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(s):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(s):new this.Z(s),this.s.push(this.p,t),this.p=null}}},e}();t.Decompress=Ve;var He=function(){function e(e){this.G=De,this.I=Me,this.Z=Ge,this.ondata=e}return e.prototype.push=function(e,t){Ve.prototype.push.call(this,e,t)},e}();t.AsyncDecompress=He,t.decompress=function(e,t,n){if(n||(n=t,t={}),"function"!=typeof n)throw"no callback";return 31==e[0]&&139==e[1]&&8==e[2]?Le(e,t,n):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?we(e,t,n):ze(e,t,n)},t.decompressSync=function(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?Fe(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Ce(e,t):Qe(e,t)};var je=function(e,t,n,r){for(var s in e){var a=e[s],o=t+s;a instanceof i?n[o]=[a,r]:Array.isArray(a)?n[o]=[a[0],Y(r,a[1])]:je(a,o+"/",n,r)}},We="undefined"!=typeof TextEncoder&&new TextEncoder,Xe="undefined"!=typeof TextDecoder&&new TextDecoder,Ye=0;try{Xe.decode(Q,{stream:!0}),Ye=1}catch(mt){}var qe=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return[t,R(e,n-1)];i?3==i?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&i?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}},Ke=function(){function e(e){this.ondata=e,Ye?this.t=new TextDecoder:this.p=Q}return e.prototype.push=function(e,t){if(!this.ondata)throw"no callback";if(t=!!t,this.t){if(this.ondata(this.t.decode(e,{stream:!0}),t),t){if(this.t.decode().length)throw"invalid utf-8 data";this.t=null}}else{if(!this.p)throw"stream finished";var n=new i(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length);var r=qe(n),s=r[0],a=r[1];if(t){if(a.length)throw"invalid utf-8 data";this.p=null}else this.p=a;this.ondata(s,t)}},e}();t.DecodeUTF8=Ke;var Je=function(){function e(e){this.ondata=e}return e.prototype.push=function(e,t){if(!this.ondata)throw"no callback";if(this.d)throw"stream finished";this.ondata(Ze(e),this.d=t||!1)},e}();function Ze(e,t){if(t){for(var n=new i(e.length),r=0;r>1)),o=0,l=function(e){a[o++]=e};for(r=0;ra.length){var c=new i(o+8+(s-r<<1));c.set(a),a=c}var h=e.charCodeAt(r);h<128||t?l(h):h<2048?(l(192|h>>6),l(128|63&h)):h>55295&&h<57344?(l(240|(h=65536+(1047552&h)|1023&e.charCodeAt(++r))>>18),l(128|h>>12&63),l(128|h>>6&63),l(128|63&h)):(l(224|h>>12),l(128|h>>6&63),l(128|63&h))}return R(a,0,o)}function $e(e,t){if(t){for(var n="",r=0;r65535)throw"extra field too long";t+=r+4}return t},st=function(e,t,n,r,i,s,a,o){var l=r.length,c=n.extra,h=o&&o.length,u=it(c);de(e,t,null!=a?33639248:67324752),t+=4,null!=a&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(null==s&&8),e[t++]=i&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),p=d.getFullYear()-1980;if(p<0||p>119)throw"date not in range 1980-2099";if(de(e,t,p<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),t+=4,null!=s&&(de(e,t,n.crc),de(e,t+4,s),de(e,t+8,n.size)),de(e,t+12,l),de(e,t+14,u),t+=16,null!=a&&(de(e,t,h),de(e,t+6,n.attrs),de(e,t+10,a),t+=14),e.set(r,t),t+=l,u)for(var f in c){var m=c[f],g=m.length;de(e,t,+f),de(e,t+2,g),e.set(m,t+4),t+=4+g}return h&&(e.set(o,t),t+=h),t},at=function(e,t,n,r,i){de(e,t,101010256),de(e,t+8,n),de(e,t+10,n),de(e,t+12,r),de(e,t+16,i)},ot=function(){function e(e){this.filename=e,this.c=j(),this.size=0,this.compression=0}return e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){if(!this.ondata)throw"no callback - add to ZIP archive before pushing";this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}();t.ZipPassThrough=ot;var lt=function(){function e(e,t){var n=this;t||(t={}),ot.call(this,e),this.d=new xe(t,(function(e,t){n.ondata(null,e,t)})),this.compression=8,this.flag=et(t.level)}return e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(mt){this.ondata(mt,null,t)}},e.prototype.push=function(e,t){ot.prototype.push.call(this,e,t)},e}();t.ZipDeflate=lt;var ct=function(){function e(e,t){var n=this;t||(t={}),ot.call(this,e),this.d=new be(t,(function(e,t,r){n.ondata(e,t,r)})),this.compression=8,this.flag=et(t.level),this.terminate=this.d.terminate}return e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){ot.prototype.push.call(this,e,t)},e}();t.AsyncZipDeflate=ct;var ht=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return e.prototype.add=function(e){var t=this;if(2&this.d)throw"stream finished";var n=Ze(e.filename),r=n.length,s=e.comment,a=s&&Ze(s),o=r!=e.filename.length||a&&s.length!=a.length,l=r+it(e.extra)+30;if(r>65535)throw"filename too long";var c=new i(l);st(c,0,e,n,o);var h=[c],u=function(){for(var e=0,n=h;e65535&&S("filename too long",null),_)if(g<16e4)try{S(null,_e(c,f))}catch(mt){S(mt,null)}else u.push(Ee(c,f,S));else S(null,c)},m=0;m65535)throw"filename too long";var A=u?_e(c,h):c,v=A.length,y=j();y.p(c),r.push(Y(h,{size:c.length,crc:y.d(),c:A,f:S,m:f,u:d!=o.length||f&&p.length!=m,o:s,compression:u})),s+=30+d+g+v,a+=76+2*(d+g)+(m||0)+v}for(var x=new i(a+22),b=s,E=a-s,_=0;_0){var r=Math.min(this.c,e.length),s=e.subarray(0,r);if(this.c-=r,this.d?this.d.push(s,!this.c):this.k[0].push(s),(e=e.subarray(r)).length)return this.push(e,t)}else{var a=0,o=0,l=void 0,c=void 0;this.p.length?e.length?((c=new i(this.p.length+e.length)).set(this.p),c.set(e,this.p.length)):c=this.p:c=e;for(var h=c.length,u=this.c,d=u&&this.d,p=function(){var e,t=he(c,o);if(67324752==t){a=1,l=o,f.d=null,f.c=0;var r=ce(c,o+6),i=ce(c,o+8),s=2048&r,d=8&r,p=ce(c,o+26),m=ce(c,o+28);if(h>o+30+p+m){var g=[];f.k.unshift(g),a=2;var A,v=he(c,o+18),y=he(c,o+22),x=$e(c.subarray(o+30,o+=30+p),!s);4294967295==v?(e=d?[-2]:rt(c,o),v=e[0],y=e[1]):d&&(v=-1),o+=m,f.c=v;var b={name:x,compression:i,start:function(){if(!b.ondata)throw"no callback";if(v){var e=n.o[i];if(!e)throw"unknown compression type "+i;(A=v<0?new e(x):new e(x,v,y)).ondata=function(e,t,n){b.ondata(e,t,n)};for(var t=0,r=g;t=0&&(b.size=v,b.originalSize=y),f.onfile(b)}return"break"}if(u){if(134695760==t)return l=o+=12+(-2==u&&8),a=3,f.c=0,"break";if(33639248==t)return l=o-=4,a=3,f.c=0,"break"}},f=this;o65558)return void t("invalid zip file",null);var o=ce(e,a+8);o||t(null,{});var l=o,c=he(e,a+16),h=4294967295==c;if(h){if(a=he(e,a-12),101075792!=he(e,a))return void t("invalid zip file",null);l=o=he(e,a+32),c=he(e,a+48)}for(var u=function(l){var u=nt(e,c,h),d=u[0],p=u[1],f=u[2],m=u[3],g=u[4],A=u[5],v=tt(e,A);c=g;var y=function(e,n){e?(r(),t(e,null)):(s[m]=n,--o||t(null,s))};if(d)if(8==d){var x=e.subarray(v,v+p);if(p<32e4)try{y(null,Ce(x,new i(f)))}catch(a){y(a,null)}else n.push(we(x,{size:f},y))}else y("unknown compression type "+d,null);else y(null,R(e,v,v+p))},d=0;d65558)throw"invalid zip file";var r=ce(e,n+8);if(!r)return{};var s=he(e,n+16),a=4294967295==s;if(a){if(n=he(e,n-12),101075792!=he(e,n))throw"invalid zip file";r=he(e,n+32),s=he(e,n+48)}for(var o=0;o{"use strict";var n={};t.default=function(e,t,r,i,s){var a=new Worker(n[t]||(n[t]=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))));return a.onerror=function(e){return s(e.error,null)},a.onmessage=function(e){return s(null,e.data)},a.postMessage(r,i),a}},80008:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.LatheGeometry{constructor(e=1,t=1,n=4,i=8){const s=new r.Path;s.absarc(0,-t/2,e,1.5*Math.PI,0),s.absarc(0,t/2,e,0,.5*Math.PI),super(s.getPoints(n),i),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:i}}static fromJSON(e){return new i(e.radius,e.length,e.capSegments,e.radialSegments)}}t.CapsuleGeometry=i},44108:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.CompressedTexture{constructor(e,t,n,i,s,a){super(e,t,n,s,a),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=r.ClampToEdgeWrapping}}t.CompressedArrayTexture=i},56328:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.CompressedTexture{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,r.CubeReflectionMapping),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}t.CompressedCubeTexture=i},1192:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Texture{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=r.NearestFilter,this.minFilter=r.NearestFilter,this.wrapR=r.ClampToEdgeWrapping,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}t.Data3DTexture=i},26840:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=parseInt(r.REVISION.replace(/\D+/g,""));t.version=i},97940:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.AnimationClipCreator=class{static CreateRotationAnimation(e,t="x"){const n=[0,e],i=".rotation["+t+"]",s=new r.NumberKeyframeTrack(i,n,[0,360]);return new r.AnimationClip(null,e,[s])}static CreateScaleAxisAnimation(e,t="x"){const n=[0,e],i=".scale["+t+"]",s=new r.NumberKeyframeTrack(i,n,[0,1]);return new r.AnimationClip(null,e,[s])}static CreateShakeAnimation(e,t){const n=[],i=[],s=new r.Vector3;for(let r=0;r<10*e;r++)n.push(r/10),s.set(2*Math.random()-1,2*Math.random()-1,2*Math.random()-1).multiply(t).toArray(i,i.length);const a=new r.VectorKeyframeTrack(".position",n,i);return new r.AnimationClip(null,e,[a])}static CreatePulsationAnimation(e,t){const n=[],i=[],s=new r.Vector3;for(let r=0;r<10*e;r++){n.push(r/10);const e=Math.random()*t;s.set(e,e,e).toArray(i,i.length)}const a=new r.VectorKeyframeTrack(".scale",n,i);return new r.AnimationClip(null,e,[a])}static CreateVisibilityAnimation(e){const t=[0,e/2,e],n=new r.BooleanKeyframeTrack(".visible",t,[!0,!1,!0]);return new r.AnimationClip(null,e,[n])}static CreateMaterialColorAnimation(e,t){const n=[],i=[],s=e/t.length;for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Quaternion,s=new r.Vector3,a=new r.Vector3,o=new r.Vector3,l=new r.Vector3,c=new r.Vector3,h=new r.Quaternion,u=new r.Vector3,d=new r.Vector3,p=new r.Vector3,f=new r.Matrix4;function m(e,t){return p.setFromMatrixPosition(e.matrixWorld).applyMatrix4(t)}function g(e,t,n,r){const i=m(n,r);e[3*t+0]=i.x,e[3*t+1]=i.y,e[3*t+2]=i.z}class A extends r.Object3D{constructor(e,t=[],n=.25){super(),this.root=e,this.iks=t,this.matrix.copy(e.matrixWorld),this.matrixAutoUpdate=!1,this.sphereGeometry=new r.SphereGeometry(n,16,8),this.targetSphereMaterial=new r.MeshBasicMaterial({color:new r.Color(16746632),depthTest:!1,depthWrite:!1,transparent:!0}),this.effectorSphereMaterial=new r.MeshBasicMaterial({color:new r.Color(8978312),depthTest:!1,depthWrite:!1,transparent:!0}),this.linkSphereMaterial=new r.MeshBasicMaterial({color:new r.Color(8947967),depthTest:!1,depthWrite:!1,transparent:!0}),this.lineMaterial=new r.LineBasicMaterial({color:new r.Color(16711680),depthTest:!1,depthWrite:!1,transparent:!0}),this._init()}updateMatrixWorld(e){const t=this.root;if(this.visible){let e=0;const n=this.iks,r=t.skeleton.bones;f.copy(t.matrixWorld).invert();for(let t=0,i=n.length;t1?b=1:b<-1&&(b=-1),b=n.acos(b),!(b<1e-5)){if(void 0!==e.minAngle&&be.maxAngle&&(b=e.maxAngle),d.crossVectors(l,a),d.normalize(),i.setFromAxisAngle(d,b),A.quaternion.multiply(i),void 0!==v){let e=A.quaternion.w;e>1&&(e=1);const t=n.sqrt(1-e*e);A.quaternion.set(v.x*t,v.y*t,v.z*t,e)}void 0!==y&&A.rotation.setFromVector3(p.setFromEuler(A.rotation).max(y)),void 0!==x&&A.rotation.setFromVector3(p.setFromEuler(A.rotation).min(x)),A.updateMatrixWorld(!0),f=!0}}if(!f)break}return this}createHelper(){return new A(this.mesh,this.iks)}_valid(){const e=this.iks,t=this.mesh.skeleton.bones;for(let n=0,r=e.length;n{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(36180),s=n(45584);const a=[];let o=0;const l=new Map;function c(e,t,n,i){const s=e.skeleton.bones,h=e.geometry.userData.MMD.bones[t],u=s[t];if(l.has(t))return;const d=(o>=a.length&&a.push(new r.Quaternion),a[o++]);if(l.set(t,d.copy(u.quaternion)),i&&h.grant&&!h.grant.isLocal&&h.grant.affectRotation){const t=h.grant.parentIndex,r=h.grant.ratio;l.has(t)||c(e,t,n,i),i.addGrantRotation(u,l.get(t),r)}if(n&&h.ik){e.updateMatrixWorld(!0),n.updateOne(h.ik);const t=h.ik.links;for(let e=0,n=t.length;e=this.duration;)this.currentTime-=this.duration;return!(this.currentTimethis.audioDuration)}_shouldStopAudio(){return this.audio.isPlaying&&this.currentTime>=this.duration}}const u=new r.Quaternion;class d{constructor(e,t=[]){this.mesh=e,this.grants=t}update(){const e=this.grants;for(let t=0,n=e.length;t=0)throw new Error("THREE.MMDAnimationHelper._addMesh: SkinnedMesh '"+e.name+"' has already been added.");return this.meshes.push(e),this.objects.set(e,{looped:!1}),this._setupMeshAnimation(e,t.animation),!1!==t.physics&&this._setupMeshPhysics(e,t),this}_setupCamera(e,t){if(this.camera===e)throw new Error("THREE.MMDAnimationHelper._setupCamera: Camera '"+e.name+"' has already been set.");return this.camera&&this.clearCamera(this.camera),this.camera=e,e.add(this.cameraTarget),this.objects.set(e,{}),void 0!==t.animation&&this._setupCameraAnimation(e,t.animation),this}_setupAudio(e,t){if(this.audio===e)throw new Error("THREE.MMDAnimationHelper._setupAudio: Audio '"+e.name+"' has already been set.");return this.audio&&this.clearAudio(this.audio),this.audio=e,this.audioManager=new h(e,t),this.objects.set(this.audioManager,{duration:this.audioManager.duration}),this}_removeMesh(e){let t=!1,n=0;for(let r=0,i=this.meshes.length;r0&&".bones"!==t[0].name.slice(0,6)||(n.looped=!0)}))}return n.ikSolver=this._createCCDIKSolver(e),n.grantSolver=this.createGrantSolver(e),this}_setupCameraAnimation(e,t){const n=Array.isArray(t)?t:[t],i=this.objects.get(e);i.mixer=new r.AnimationMixer(e);for(let r=0,s=n.length;r0)}}}_createCCDIKSolver(e){if(void 0===i.CCDIKSolver)throw new Error("THREE.MMDAnimationHelper: Import CCDIKSolver.");return new i.CCDIKSolver(e,e.geometry.userData.MMD.iks)}_createMMDPhysics(e,t){if(void 0===s.MMDPhysics)throw new Error("THREE.MMDPhysics: Import MMDPhysics.");return new s.MMDPhysics(e,e.geometry.userData.MMD.rigidBodies,e.geometry.userData.MMD.constraints,t)}_syncDuration(){let e=0;const t=this.objects,n=this.meshes,r=this.camera,i=this.audioManager;for(let s=0,a=n.length;s{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(80008);class s{constructor(){this.threeVector3s=[],this.threeMatrix4s=[],this.threeQuaternions=[],this.threeEulers=[],this.transforms=[],this.quaternions=[],this.vector3s=[]}allocThreeVector3(){return this.threeVector3s.length>0?this.threeVector3s.pop():new r.Vector3}freeThreeVector3(e){this.threeVector3s.push(e)}allocThreeMatrix4(){return this.threeMatrix4s.length>0?this.threeMatrix4s.pop():new r.Matrix4}freeThreeMatrix4(e){this.threeMatrix4s.push(e)}allocThreeQuaternion(){return this.threeQuaternions.length>0?this.threeQuaternions.pop():new r.Quaternion}freeThreeQuaternion(e){this.threeQuaternions.push(e)}allocThreeEuler(){return this.threeEulers.length>0?this.threeEulers.pop():new r.Euler}freeThreeEuler(e){this.threeEulers.push(e)}allocTransform(){return this.transforms.length>0?this.transforms.pop():new Ammo.btTransform}freeTransform(e){this.transforms.push(e)}allocQuaternion(){return this.quaternions.length>0?this.quaternions.pop():new Ammo.btQuaternion}freeQuaternion(e){this.quaternions.push(e)}allocVector3(){return this.vector3s.length>0?this.vector3s.pop():new Ammo.btVector3}freeVector3(e){this.vector3s.push(e)}setIdentity(e){e.setIdentity()}getBasis(e){var t=this.allocQuaternion();return e.getBasis().getRotation(t),t}getBasisAsMatrix3(e){var t=this.getBasis(e),n=this.quaternionToMatrix3(t);return this.freeQuaternion(t),n}getOrigin(e){return e.getOrigin()}setOrigin(e,t){e.getOrigin().setValue(t.x(),t.y(),t.z())}copyOrigin(e,t){var n=t.getOrigin();this.setOrigin(e,n)}setBasis(e,t){e.setRotation(t)}setBasisFromMatrix3(e,t){var n=this.matrix3ToQuaternion(t);this.setBasis(e,n),this.freeQuaternion(n)}setOriginFromArray3(e,t){e.getOrigin().setValue(t[0],t[1],t[2])}setOriginFromThreeVector3(e,t){e.getOrigin().setValue(t.x,t.y,t.z)}setBasisFromArray3(e,t){var n=this.allocThreeQuaternion(),r=this.allocThreeEuler();r.set(t[0],t[1],t[2]),this.setBasisFromThreeQuaternion(e,n.setFromEuler(r)),this.freeThreeEuler(r),this.freeThreeQuaternion(n)}setBasisFromThreeQuaternion(e,t){var n=this.allocQuaternion();n.setX(t.x),n.setY(t.y),n.setZ(t.z),n.setW(t.w),this.setBasis(e,n),this.freeQuaternion(n)}multiplyTransforms(e,t){var n=this.allocTransform();this.setIdentity(n);var r=this.getBasisAsMatrix3(e),i=this.getBasisAsMatrix3(t),s=this.getOrigin(e),a=this.getOrigin(t),o=this.multiplyMatrix3ByVector3(r,a),l=this.addVector3(o,s);this.setOrigin(n,l);var c=this.multiplyMatrices3(r,i);return this.setBasisFromMatrix3(n,c),this.freeVector3(o),this.freeVector3(l),n}inverseTransform(e){var t=this.allocTransform(),n=this.getBasisAsMatrix3(e),r=this.getOrigin(e),i=this.transposeMatrix3(n),s=this.negativeVector3(r),a=this.multiplyMatrix3ByVector3(i,s);return this.setOrigin(t,a),this.setBasisFromMatrix3(t,i),this.freeVector3(s),this.freeVector3(a),t}multiplyMatrices3(e,t){var n=[],r=this.rowOfMatrix3(e,0),i=this.rowOfMatrix3(e,1),s=this.rowOfMatrix3(e,2),a=this.columnOfMatrix3(t,0),o=this.columnOfMatrix3(t,1),l=this.columnOfMatrix3(t,2);return n[0]=this.dotVectors3(r,a),n[1]=this.dotVectors3(r,o),n[2]=this.dotVectors3(r,l),n[3]=this.dotVectors3(i,a),n[4]=this.dotVectors3(i,o),n[5]=this.dotVectors3(i,l),n[6]=this.dotVectors3(s,a),n[7]=this.dotVectors3(s,o),n[8]=this.dotVectors3(s,l),this.freeVector3(r),this.freeVector3(i),this.freeVector3(s),this.freeVector3(a),this.freeVector3(o),this.freeVector3(l),n}addVector3(e,t){var n=this.allocVector3();return n.setValue(e.x()+t.x(),e.y()+t.y(),e.z()+t.z()),n}dotVectors3(e,t){return e.x()*t.x()+e.y()*t.y()+e.z()*t.z()}rowOfMatrix3(e,t){var n=this.allocVector3();return n.setValue(e[3*t+0],e[3*t+1],e[3*t+2]),n}columnOfMatrix3(e,t){var n=this.allocVector3();return n.setValue(e[t+0],e[t+3],e[t+6]),n}negativeVector3(e){var t=this.allocVector3();return t.setValue(-e.x(),-e.y(),-e.z()),t}multiplyMatrix3ByVector3(e,t){var n=this.allocVector3(),r=this.rowOfMatrix3(e,0),i=this.rowOfMatrix3(e,1),s=this.rowOfMatrix3(e,2),a=this.dotVectors3(r,t),o=this.dotVectors3(i,t),l=this.dotVectors3(s,t);return n.setValue(a,o,l),this.freeVector3(r),this.freeVector3(i),this.freeVector3(s),n}transposeMatrix3(e){var t=[];return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],t}quaternionToMatrix3(e){var t=[],n=e.x(),r=e.y(),i=e.z(),s=e.w(),a=n*n,o=r*r,l=i*i,c=n*r,h=r*i,u=i*n,d=n*s,p=r*s,f=i*s;return t[0]=1-2*(o+l),t[1]=2*(c-f),t[2]=2*(u+p),t[3]=2*(c+f),t[4]=1-2*(l+a),t[5]=2*(h-d),t[6]=2*(u-p),t[7]=2*(h+d),t[8]=1-2*(a+o),t}matrix3ToQuaternion(e){var t,n,r,i,s,a=e[0]+e[4]+e[8];a>0?(s=.25*(t=2*Math.sqrt(a+1)),n=(e[7]-e[5])/t,r=(e[2]-e[6])/t,i=(e[3]-e[1])/t):e[0]>e[4]&&e[0]>e[8]?(t=2*Math.sqrt(1+e[0]-e[4]-e[8]),s=(e[7]-e[5])/t,n=.25*t,r=(e[1]+e[3])/t,i=(e[2]+e[6])/t):e[4]>e[8]?(t=2*Math.sqrt(1+e[4]-e[0]-e[8]),s=(e[2]-e[6])/t,n=(e[1]+e[3])/t,r=.25*t,i=(e[5]+e[7])/t):(t=2*Math.sqrt(1+e[8]-e[0]-e[4]),s=(e[3]-e[1])/t,n=(e[2]+e[6])/t,r=(e[5]+e[7])/t,i=.25*t);var o=this.allocQuaternion();return o.setX(n),o.setY(r),o.setZ(i),o.setW(s),o}}class a{constructor(e,t,n,r){this.mesh=e,this.world=t,this.params=n,this.manager=r,this.body=null,this.bone=null,this.boneOffsetForm=null,this.boneOffsetFormInverse=null,this._init()}reset(){return this._setTransformFromBone(),this}updateFromBone(){return-1!==this.params.boneIndex&&0===this.params.type&&this._setTransformFromBone(),this}updateBone(){return 0===this.params.type||-1===this.params.boneIndex||(this._updateBoneRotation(),1===this.params.type&&this._updateBonePosition(),this.bone.updateMatrixWorld(!0),2===this.params.type&&this._setPositionFromBone()),this}_init(){const e=this.manager,t=this.params,n=this.mesh.skeleton.bones,i=-1===t.boneIndex?new r.Bone:n[t.boneIndex],s=function(e){switch(e.shapeType){case 0:return new Ammo.btSphereShape(e.width);case 1:return new Ammo.btBoxShape(new Ammo.btVector3(e.width,e.height,e.depth));case 2:return new Ammo.btCapsuleShape(e.width,e.height);default:throw new Error("unknown shape type "+e.shapeType)}}(t),a=0===t.type?0:t.weight,o=e.allocVector3();o.setValue(0,0,0),0!==a&&s.calculateLocalInertia(a,o);const l=e.allocTransform();e.setIdentity(l),e.setOriginFromArray3(l,t.position),e.setBasisFromArray3(l,t.rotation);const c=e.allocThreeVector3(),h=e.allocTransform();e.setIdentity(h),e.setOriginFromThreeVector3(h,i.getWorldPosition(c));const u=e.multiplyTransforms(h,l),d=new Ammo.btDefaultMotionState(u),p=new Ammo.btRigidBodyConstructionInfo(a,d,s,o);p.set_m_friction(t.friction),p.set_m_restitution(t.restitution);const f=new Ammo.btRigidBody(p);0===t.type&&(f.setCollisionFlags(2|f.getCollisionFlags()),f.setActivationState(4)),f.setDamping(t.positionDamping,t.rotationDamping),f.setSleepingThresholds(0,0),this.world.addRigidBody(f,1<this.maxStepNum&&(r=this.maxStepNum),this.world.stepSimulation(n,r,t)}_updateRigidBodies(){for(let e=0,t=this.bodies.length;e{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(45075);class s extends r.PerspectiveCamera{constructor(e,t,n,s){super(e,t,n,s),this.type="CinematicCamera",this.postprocessing={enabled:!0},this.shaderSettings={rings:3,samples:4};const a=i.BokehDepthShader;this.materialDepth=new r.ShaderMaterial({uniforms:a.uniforms,vertexShader:a.vertexShader,fragmentShader:a.fragmentShader}),this.materialDepth.uniforms.mNear.value=n,this.materialDepth.uniforms.mFar.value=s,this.setLens(),this.initPostProcessing()}setLens(e,t,n,r){void 0===e&&(e=35),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e),void 0===n&&(n=8),void 0===r&&(r=.019),this.fNumber=n,this.coc=r,this.aperture=e/this.fNumber,this.hyperFocal=e*e/(this.aperture*this.coc)}linearize(e){const t=this.far,n=this.near;return-t*n/(e*(t-n)-t)}smoothstep(e,t,n){const r=this.saturate((n-e)/(t-e));return r*r*(3-2*r)}saturate(e){return Math.max(0,Math.min(1,e))}focusAt(e){void 0===e&&(e=20);const t=this.getFocalLength();this.focus=e,this.nearPoint=this.hyperFocal*this.focus/(this.hyperFocal+(this.focus-t)),this.farPoint=this.hyperFocal*this.focus/(this.hyperFocal-(this.focus-t)),this.depthOfField=this.farPoint-this.nearPoint,this.depthOfField<0&&(this.depthOfField=0),this.sdistance=this.smoothstep(this.near,this.far,this.focus),this.ldistance=this.linearize(1-this.sdistance),this.postprocessing.bokeh_uniforms.focalDepth.value=this.ldistance}initPostProcessing(){if(this.postprocessing.enabled){this.postprocessing.scene=new r.Scene,this.postprocessing.camera=new r.OrthographicCamera(window.innerWidth/-2,window.innerWidth/2,window.innerHeight/2,window.innerHeight/-2,-1e4,1e4),this.postprocessing.scene.add(this.postprocessing.camera),this.postprocessing.rtTextureDepth=new r.WebGLRenderTarget(window.innerWidth,window.innerHeight),this.postprocessing.rtTextureColor=new r.WebGLRenderTarget(window.innerWidth,window.innerHeight);const e=i.BokehShader2;this.postprocessing.bokeh_uniforms=r.UniformsUtils.clone(e.uniforms),this.postprocessing.bokeh_uniforms.tColor.value=this.postprocessing.rtTextureColor.texture,this.postprocessing.bokeh_uniforms.tDepth.value=this.postprocessing.rtTextureDepth.texture,this.postprocessing.bokeh_uniforms.manualdof.value=0,this.postprocessing.bokeh_uniforms.shaderFocus.value=0,this.postprocessing.bokeh_uniforms.fstop.value=2.8,this.postprocessing.bokeh_uniforms.showFocus.value=1,this.postprocessing.bokeh_uniforms.focalDepth.value=.1,this.postprocessing.bokeh_uniforms.znear.value=this.near,this.postprocessing.bokeh_uniforms.zfar.value=this.near,this.postprocessing.bokeh_uniforms.textureWidth.value=window.innerWidth,this.postprocessing.bokeh_uniforms.textureHeight.value=window.innerHeight,this.postprocessing.materialBokeh=new r.ShaderMaterial({uniforms:this.postprocessing.bokeh_uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader,defines:{RINGS:this.shaderSettings.rings,SAMPLES:this.shaderSettings.samples,DEPTH_PACKING:1}}),this.postprocessing.quad=new r.Mesh(new r.PlaneGeometry(window.innerWidth,window.innerHeight),this.postprocessing.materialBokeh),this.postprocessing.quad.position.z=-500,this.postprocessing.scene.add(this.postprocessing.quad)}}renderCinematic(e,t){if(this.postprocessing.enabled){const n=t.getRenderTarget();t.clear(),e.overrideMaterial=null,t.setRenderTarget(this.postprocessing.rtTextureColor),t.clear(),t.render(e,this),e.overrideMaterial=this.materialDepth,t.setRenderTarget(this.postprocessing.rtTextureDepth),t.clear(),t.render(e,this),t.setRenderTarget(null),t.render(this.postprocessing.scene,this.postprocessing.camera),t.setRenderTarget(n)}}}t.CinematicCamera=s},69152:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a={IDLE:Symbol(),ROTATE:Symbol(),PAN:Symbol(),SCALE:Symbol(),FOV:Symbol(),FOCUS:Symbol(),ZROTATE:Symbol(),TOUCH_MULTI:Symbol(),ANIMATION_FOCUS:Symbol(),ANIMATION_ROTATE:Symbol()},o={NONE:Symbol(),ONE_FINGER:Symbol(),ONE_FINGER_SWITCHED:Symbol(),TWO_FINGER:Symbol(),MULT_FINGER:Symbol(),CURSOR:Symbol()},l={x:0,y:0},c={camera:new s.Matrix4,gizmos:new s.Matrix4},h={type:"change"},u={type:"start"},d={type:"end"};class p extends s.EventDispatcher{constructor(e,t=null,n=null){super(),i(this,"camera"),i(this,"domElement"),i(this,"scene"),i(this,"mouseActions"),i(this,"_mouseOp"),i(this,"_v2_1"),i(this,"_v3_1"),i(this,"_v3_2"),i(this,"_m4_1"),i(this,"_m4_2"),i(this,"_quat"),i(this,"_translationMatrix"),i(this,"_rotationMatrix"),i(this,"_scaleMatrix"),i(this,"_rotationAxis"),i(this,"_cameraMatrixState"),i(this,"_cameraProjectionState"),i(this,"_fovState"),i(this,"_upState"),i(this,"_zoomState"),i(this,"_nearPos"),i(this,"_farPos"),i(this,"_gizmoMatrixState"),i(this,"_up0"),i(this,"_zoom0"),i(this,"_fov0"),i(this,"_initialNear"),i(this,"_nearPos0"),i(this,"_initialFar"),i(this,"_farPos0"),i(this,"_cameraMatrixState0"),i(this,"_gizmoMatrixState0"),i(this,"_button"),i(this,"_touchStart"),i(this,"_touchCurrent"),i(this,"_input"),i(this,"_switchSensibility"),i(this,"_startFingerDistance"),i(this,"_currentFingerDistance"),i(this,"_startFingerRotation"),i(this,"_currentFingerRotation"),i(this,"_devPxRatio"),i(this,"_downValid"),i(this,"_nclicks"),i(this,"_downEvents"),i(this,"_clickStart"),i(this,"_maxDownTime"),i(this,"_maxInterval"),i(this,"_posThreshold"),i(this,"_movementThreshold"),i(this,"_currentCursorPosition"),i(this,"_startCursorPosition"),i(this,"_grid"),i(this,"_gridPosition"),i(this,"_gizmos"),i(this,"_curvePts"),i(this,"_timeStart"),i(this,"_animationId"),i(this,"focusAnimationTime"),i(this,"_timePrev"),i(this,"_timeCurrent"),i(this,"_anglePrev"),i(this,"_angleCurrent"),i(this,"_cursorPosPrev"),i(this,"_cursorPosCurr"),i(this,"_wPrev"),i(this,"_wCurr"),i(this,"adjustNearFar"),i(this,"scaleFactor"),i(this,"dampingFactor"),i(this,"wMax"),i(this,"enableAnimations"),i(this,"enableGrid"),i(this,"cursorZoom"),i(this,"minFov"),i(this,"maxFov"),i(this,"enabled"),i(this,"enablePan"),i(this,"enableRotate"),i(this,"enableZoom"),i(this,"minDistance"),i(this,"maxDistance"),i(this,"minZoom"),i(this,"maxZoom"),i(this,"target"),i(this,"_currentTarget"),i(this,"_tbRadius"),i(this,"_state"),i(this,"onWindowResize",(()=>{const e=(this._gizmos.scale.x+this._gizmos.scale.y+this._gizmos.scale.z)/3;if(this.camera){const e=this.calculateTbRadius(this.camera);void 0!==e&&(this._tbRadius=e)}const t=this._tbRadius/e,n=new s.EllipseCurve(0,0,t,t).getPoints(this._curvePts),r=(new s.BufferGeometry).setFromPoints(n);for(const i in this._gizmos.children){this._gizmos.children[i].geometry=r}this.dispatchEvent(h)})),i(this,"onContextMenu",(e=>{if(this.enabled)for(let t=0;t{this._touchStart.splice(0,this._touchStart.length),this._touchCurrent.splice(0,this._touchCurrent.length),this._input=o.NONE})),i(this,"onPointerDown",(e=>{if(0==e.button&&e.isPrimary?(this._downValid=!0,this._downEvents.push(e)):this._downValid=!1,"touch"==e.pointerType&&this._input!=o.CURSOR)switch(this._touchStart.push(e),this._touchCurrent.push(e),this._input){case o.NONE:this._input=o.ONE_FINGER,this.onSinglePanStart(e,"ROTATE"),window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp);break;case o.ONE_FINGER:case o.ONE_FINGER_SWITCHED:this._input=o.TWO_FINGER,this.onRotateStart(),this.onPinchStart(),this.onDoublePanStart();break;case o.TWO_FINGER:this._input=o.MULT_FINGER,this.onTriplePanStart()}else if("touch"!=e.pointerType&&this._input==o.NONE){let t=null;e.ctrlKey||e.metaKey?t="CTRL":e.shiftKey&&(t="SHIFT"),this._mouseOp=this.getOpFromAction(e.button,t),this._mouseOp&&(window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),this._input=o.CURSOR,this._button=e.button,this.onSinglePanStart(e,this._mouseOp))}})),i(this,"onPointerMove",(e=>{if("touch"==e.pointerType&&this._input!=o.CURSOR)switch(this._input){case o.ONE_FINGER:this.updateTouchEvent(e),this.onSinglePanMove(e,a.ROTATE);break;case o.ONE_FINGER_SWITCHED:if(this.calculatePointersDistance(this._touchCurrent[0],e)*this._devPxRatio>=this._switchSensibility){this._input=o.ONE_FINGER,this.updateTouchEvent(e),this.onSinglePanStart(e,"ROTATE");break}break;case o.TWO_FINGER:this.updateTouchEvent(e),this.onRotateMove(),this.onPinchMove(),this.onDoublePanMove();break;case o.MULT_FINGER:this.updateTouchEvent(e),this.onTriplePanMove()}else if("touch"!=e.pointerType&&this._input==o.CURSOR){let t=null;e.ctrlKey||e.metaKey?t="CTRL":e.shiftKey&&(t="SHIFT");const n=this.getOpStateFromAction(this._button,t);n&&this.onSinglePanMove(e,n)}if(this._downValid){this.calculatePointersDistance(this._downEvents[this._downEvents.length-1],e)*this._devPxRatio>this._movementThreshold&&(this._downValid=!1)}})),i(this,"onPointerUp",(e=>{if("touch"==e.pointerType&&this._input!=o.CURSOR){const t=this._touchCurrent.length;for(let n=0;n{var t,n;if(this.enabled&&this.enableZoom&&this.domElement){let r=null;e.ctrlKey||e.metaKey?r="CTRL":e.shiftKey&&(r="SHIFT");const i=this.getOpFromAction("WHEEL",r);if(i){e.preventDefault(),this.dispatchEvent(u);const r=125;let o=e.deltaY/r,l=1;switch(o>0?l=1/this.scaleFactor:o<0&&(l=this.scaleFactor),i){case"ZOOM":if(this.updateTbState(a.SCALE,!0),o>0?l=1/Math.pow(this.scaleFactor,o):o<0&&(l=Math.pow(this.scaleFactor,-o)),this.cursorZoom&&this.enablePan){let r;this.camera instanceof s.OrthographicCamera&&(r=null==(t=this.unprojectOnTbPlane(this.camera,e.clientX,e.clientY,this.domElement))?void 0:t.applyQuaternion(this.camera.quaternion).multiplyScalar(1/this.camera.zoom).add(this._gizmos.position)),this.camera instanceof s.PerspectiveCamera&&(r=null==(n=this.unprojectOnTbPlane(this.camera,e.clientX,e.clientY,this.domElement))?void 0:n.applyQuaternion(this.camera.quaternion).add(this._gizmos.position)),void 0!==r&&this.applyTransformMatrix(this.applyScale(l,r))}else this.applyTransformMatrix(this.applyScale(l,this._gizmos.position));this._grid&&(this.disposeGrid(),this.drawGrid()),this.updateTbState(a.IDLE,!1),this.dispatchEvent(h),this.dispatchEvent(d);break;case"FOV":if(this.camera instanceof s.PerspectiveCamera){this.updateTbState(a.FOV,!0),0!=e.deltaX&&(o=e.deltaX/r,l=1,o>0?l=1/Math.pow(this.scaleFactor,o):o<0&&(l=Math.pow(this.scaleFactor,-o))),this._v3_1.setFromMatrixPosition(this._cameraMatrixState);const t=this._v3_1.distanceTo(this._gizmos.position);let n=t/l;n=s.MathUtils.clamp(n,this.minDistance,this.maxDistance);const i=t*Math.tan(s.MathUtils.DEG2RAD*this.camera.fov*.5);let c=s.MathUtils.RAD2DEG*(2*Math.atan(i/n));c>this.maxFov?c=this.maxFov:c{if(this.enabled&&this.domElement)switch(this.dispatchEvent(u),this.setCenter(e.clientX,e.clientY),t){case"PAN":if(!this.enablePan)return;if(-1!=this._animationId&&(cancelAnimationFrame(this._animationId),this._animationId=-1,this._timeStart=-1,this.activateGizmos(!1),this.dispatchEvent(h)),this.camera){this.updateTbState(a.PAN,!0);const e=this.unprojectOnTbPlane(this.camera,l.x,l.y,this.domElement);void 0!==e&&this._startCursorPosition.copy(e),this.enableGrid&&(this.drawGrid(),this.dispatchEvent(h))}break;case"ROTATE":if(!this.enableRotate)return;if(-1!=this._animationId&&(cancelAnimationFrame(this._animationId),this._animationId=-1,this._timeStart=-1),this.camera){this.updateTbState(a.ROTATE,!0);const e=this.unprojectOnTbSurface(this.camera,l.x,l.y,this.domElement,this._tbRadius);void 0!==e&&this._startCursorPosition.copy(e),this.activateGizmos(!0),this.enableAnimations&&(this._timePrev=this._timeCurrent=performance.now(),this._angleCurrent=this._anglePrev=0,this._cursorPosPrev.copy(this._startCursorPosition),this._cursorPosCurr.copy(this._cursorPosPrev),this._wCurr=0,this._wPrev=this._wCurr)}this.dispatchEvent(h);break;case"FOV":if(!this.enableZoom)return;this.camera instanceof s.PerspectiveCamera&&(-1!=this._animationId&&(cancelAnimationFrame(this._animationId),this._animationId=-1,this._timeStart=-1,this.activateGizmos(!1),this.dispatchEvent(h)),this.updateTbState(a.FOV,!0),this._startCursorPosition.setY(.5*this.getCursorNDC(l.x,l.y,this.domElement).y),this._currentCursorPosition.copy(this._startCursorPosition));break;case"ZOOM":if(!this.enableZoom)return;-1!=this._animationId&&(cancelAnimationFrame(this._animationId),this._animationId=-1,this._timeStart=-1,this.activateGizmos(!1),this.dispatchEvent(h)),this.updateTbState(a.SCALE,!0),this._startCursorPosition.setY(.5*this.getCursorNDC(l.x,l.y,this.domElement).y),this._currentCursorPosition.copy(this._startCursorPosition)}})),i(this,"onSinglePanMove",((e,t)=>{if(this.enabled&&this.domElement){const n=t!=this._state;switch(this.setCenter(e.clientX,e.clientY),t){case a.PAN:if(this.enablePan&&this.camera)if(n){this.dispatchEvent(d),this.dispatchEvent(u),this.updateTbState(t,!0);const e=this.unprojectOnTbPlane(this.camera,l.x,l.y,this.domElement);void 0!==e&&this._startCursorPosition.copy(e),this.enableGrid&&this.drawGrid(),this.activateGizmos(!1)}else{const e=this.unprojectOnTbPlane(this.camera,l.x,l.y,this.domElement);void 0!==e&&this._currentCursorPosition.copy(e),this.applyTransformMatrix(this.pan(this._startCursorPosition,this._currentCursorPosition))}break;case a.ROTATE:if(this.enableRotate&&this.camera)if(n){this.dispatchEvent(d),this.dispatchEvent(u),this.updateTbState(t,!0);const e=this.unprojectOnTbSurface(this.camera,l.x,l.y,this.domElement,this._tbRadius);void 0!==e&&this._startCursorPosition.copy(e),this.enableGrid&&this.disposeGrid(),this.activateGizmos(!0)}else{const e=this.unprojectOnTbSurface(this.camera,l.x,l.y,this.domElement,this._tbRadius);void 0!==e&&this._currentCursorPosition.copy(e);const t=this._startCursorPosition.distanceTo(this._currentCursorPosition),n=this._startCursorPosition.angleTo(this._currentCursorPosition),r=Math.max(t/this._tbRadius,n);this.applyTransformMatrix(this.rotate(this.calculateRotationAxis(this._startCursorPosition,this._currentCursorPosition),r)),this.enableAnimations&&(this._timePrev=this._timeCurrent,this._timeCurrent=performance.now(),this._anglePrev=this._angleCurrent,this._angleCurrent=r,this._cursorPosPrev.copy(this._cursorPosCurr),this._cursorPosCurr.copy(this._currentCursorPosition),this._wPrev=this._wCurr,this._wCurr=this.calculateAngularSpeed(this._anglePrev,this._angleCurrent,this._timePrev,this._timeCurrent))}break;case a.SCALE:if(this.enableZoom)if(n)this.dispatchEvent(d),this.dispatchEvent(u),this.updateTbState(t,!0),this._startCursorPosition.setY(.5*this.getCursorNDC(l.x,l.y,this.domElement).y),this._currentCursorPosition.copy(this._startCursorPosition),this.enableGrid&&this.disposeGrid(),this.activateGizmos(!1);else{const e=8;this._currentCursorPosition.setY(.5*this.getCursorNDC(l.x,l.y,this.domElement).y);const t=this._currentCursorPosition.y-this._startCursorPosition.y;let n=1;t<0?n=1/Math.pow(this.scaleFactor,-t*e):t>0&&(n=Math.pow(this.scaleFactor,t*e)),this.applyTransformMatrix(this.applyScale(n,this._gizmos.position))}break;case a.FOV:if(this.enableZoom&&this.camera instanceof s.PerspectiveCamera)if(n)this.dispatchEvent(d),this.dispatchEvent(u),this.updateTbState(t,!0),this._startCursorPosition.setY(.5*this.getCursorNDC(l.x,l.y,this.domElement).y),this._currentCursorPosition.copy(this._startCursorPosition),this.enableGrid&&this.disposeGrid(),this.activateGizmos(!1);else{const e=8;this._currentCursorPosition.setY(.5*this.getCursorNDC(l.x,l.y,this.domElement).y);const t=this._currentCursorPosition.y-this._startCursorPosition.y;let n=1;t<0?n=1/Math.pow(this.scaleFactor,-t*e):t>0&&(n=Math.pow(this.scaleFactor,t*e)),this._v3_1.setFromMatrixPosition(this._cameraMatrixState);const r=this._v3_1.distanceTo(this._gizmos.position);let i=r/n;i=s.MathUtils.clamp(i,this.minDistance,this.maxDistance);const a=r*Math.tan(s.MathUtils.DEG2RAD*this._fovState*.5);let o=s.MathUtils.RAD2DEG*(2*Math.atan(a/i));o=s.MathUtils.clamp(o,this.minFov,this.maxFov);const c=a/Math.tan(s.MathUtils.DEG2RAD*(o/2));n=r/c,this._v3_2.setFromMatrixPosition(this._gizmoMatrixState),this.setFov(o),this.applyTransformMatrix(this.applyScale(n,this._v3_2,!1));const h=this._gizmos.position.clone().sub(this.camera.position).normalize().multiplyScalar(c/r);this._m4_1.makeTranslation(h.x,h.y,h.z)}}this.dispatchEvent(h)}})),i(this,"onSinglePanEnd",(()=>{if(this._state==a.ROTATE){if(!this.enableRotate)return;if(this.enableAnimations){if(performance.now()-this._timeCurrent<120){const e=Math.abs((this._wPrev+this._wCurr)/2),t=this;this._animationId=window.requestAnimationFrame((function(n){t.updateTbState(a.ANIMATION_ROTATE,!0);const r=t.calculateRotationAxis(t._cursorPosPrev,t._cursorPosCurr);t.onRotationAnim(n,r,Math.min(e,t.wMax))}))}else this.updateTbState(a.IDLE,!1),this.activateGizmos(!1),this.dispatchEvent(h)}else this.updateTbState(a.IDLE,!1),this.activateGizmos(!1),this.dispatchEvent(h)}else this._state!=a.PAN&&this._state!=a.IDLE||(this.updateTbState(a.IDLE,!1),this.enableGrid&&this.disposeGrid(),this.activateGizmos(!1),this.dispatchEvent(h));this.dispatchEvent(d)})),i(this,"onDoubleTap",(e=>{if(this.enabled&&this.enablePan&&this.scene&&this.camera&&this.domElement){this.dispatchEvent(u),this.setCenter(e.clientX,e.clientY);const t=this.unprojectOnObj(this.getCursorNDC(l.x,l.y,this.domElement),this.camera);if(t&&this.enableAnimations){const e=this;-1!=this._animationId&&window.cancelAnimationFrame(this._animationId),this._timeStart=-1,this._animationId=window.requestAnimationFrame((function(n){e.updateTbState(a.ANIMATION_FOCUS,!0),e.onFocusAnim(n,t,e._cameraMatrixState,e._gizmoMatrixState)}))}else t&&!this.enableAnimations&&(this.updateTbState(a.FOCUS,!0),this.focus(t,this.scaleFactor),this.updateTbState(a.IDLE,!1),this.dispatchEvent(h))}this.dispatchEvent(d)})),i(this,"onDoublePanStart",(()=>{if(this.enabled&&this.enablePan&&this.camera&&this.domElement){this.dispatchEvent(u),this.updateTbState(a.PAN,!0),this.setCenter((this._touchCurrent[0].clientX+this._touchCurrent[1].clientX)/2,(this._touchCurrent[0].clientY+this._touchCurrent[1].clientY)/2);const e=this.unprojectOnTbPlane(this.camera,l.x,l.y,this.domElement,!0);void 0!==e&&this._startCursorPosition.copy(e),this._currentCursorPosition.copy(this._startCursorPosition),this.activateGizmos(!1)}})),i(this,"onDoublePanMove",(()=>{if(this.enabled&&this.enablePan&&this.camera&&this.domElement){this.setCenter((this._touchCurrent[0].clientX+this._touchCurrent[1].clientX)/2,(this._touchCurrent[0].clientY+this._touchCurrent[1].clientY)/2),this._state!=a.PAN&&(this.updateTbState(a.PAN,!0),this._startCursorPosition.copy(this._currentCursorPosition));const e=this.unprojectOnTbPlane(this.camera,l.x,l.y,this.domElement,!0);void 0!==e&&this._currentCursorPosition.copy(e),this.applyTransformMatrix(this.pan(this._startCursorPosition,this._currentCursorPosition,!0)),this.dispatchEvent(h)}})),i(this,"onDoublePanEnd",(()=>{this.updateTbState(a.IDLE,!1),this.dispatchEvent(d)})),i(this,"onRotateStart",(()=>{var e;this.enabled&&this.enableRotate&&(this.dispatchEvent(u),this.updateTbState(a.ZROTATE,!0),this._startFingerRotation=this.getAngle(this._touchCurrent[1],this._touchCurrent[0])+this.getAngle(this._touchStart[1],this._touchStart[0]),this._currentFingerRotation=this._startFingerRotation,null==(e=this.camera)||e.getWorldDirection(this._rotationAxis),this.enablePan||this.enableZoom||this.activateGizmos(!0))})),i(this,"onRotateMove",(()=>{var e;if(this.enabled&&this.enableRotate&&this.camera&&this.domElement){let t;this.setCenter((this._touchCurrent[0].clientX+this._touchCurrent[1].clientX)/2,(this._touchCurrent[0].clientY+this._touchCurrent[1].clientY)/2),this._state!=a.ZROTATE&&(this.updateTbState(a.ZROTATE,!0),this._startFingerRotation=this._currentFingerRotation),this._currentFingerRotation=this.getAngle(this._touchCurrent[1],this._touchCurrent[0])+this.getAngle(this._touchStart[1],this._touchStart[0]),this.enablePan?this.camera&&(this._v3_2.setFromMatrixPosition(this._gizmoMatrixState),t=null==(e=this.unprojectOnTbPlane(this.camera,l.x,l.y,this.domElement))?void 0:e.applyQuaternion(this.camera.quaternion).multiplyScalar(1/this.camera.zoom).add(this._v3_2)):t=(new s.Vector3).setFromMatrixPosition(this._gizmoMatrixState);const n=s.MathUtils.DEG2RAD*(this._startFingerRotation-this._currentFingerRotation);void 0!==t&&this.applyTransformMatrix(this.zRotate(t,n)),this.dispatchEvent(h)}})),i(this,"onRotateEnd",(()=>{this.updateTbState(a.IDLE,!1),this.activateGizmos(!1),this.dispatchEvent(d)})),i(this,"onPinchStart",(()=>{this.enabled&&this.enableZoom&&(this.dispatchEvent(u),this.updateTbState(a.SCALE,!0),this._startFingerDistance=this.calculatePointersDistance(this._touchCurrent[0],this._touchCurrent[1]),this._currentFingerDistance=this._startFingerDistance,this.activateGizmos(!1))})),i(this,"onPinchMove",(()=>{var e,t;if(this.enabled&&this.enableZoom&&this.domElement){this.setCenter((this._touchCurrent[0].clientX+this._touchCurrent[1].clientX)/2,(this._touchCurrent[0].clientY+this._touchCurrent[1].clientY)/2);const n=12;this._state!=a.SCALE&&(this._startFingerDistance=this._currentFingerDistance,this.updateTbState(a.SCALE,!0)),this._currentFingerDistance=Math.max(this.calculatePointersDistance(this._touchCurrent[0],this._touchCurrent[1]),n*this._devPxRatio);const r=this._currentFingerDistance/this._startFingerDistance;let i;this.enablePan?this.camera instanceof s.OrthographicCamera?i=null==(e=this.unprojectOnTbPlane(this.camera,l.x,l.y,this.domElement))?void 0:e.applyQuaternion(this.camera.quaternion).multiplyScalar(1/this.camera.zoom).add(this._gizmos.position):this.camera instanceof s.PerspectiveCamera&&(i=null==(t=this.unprojectOnTbPlane(this.camera,l.x,l.y,this.domElement))?void 0:t.applyQuaternion(this.camera.quaternion).add(this._gizmos.position)):i=this._gizmos.position,void 0!==i&&this.applyTransformMatrix(this.applyScale(r,i)),this.dispatchEvent(h)}})),i(this,"onPinchEnd",(()=>{this.updateTbState(a.IDLE,!1),this.dispatchEvent(d)})),i(this,"onTriplePanStart",(()=>{if(this.enabled&&this.enableZoom&&this.domElement){this.dispatchEvent(u),this.updateTbState(a.SCALE,!0);let e=0,t=0;const n=this._touchCurrent.length;for(let r=0;r{if(this.enabled&&this.enableZoom&&this.camera&&this.domElement){let e=0,t=0;const n=this._touchCurrent.length;for(let s=0;s0&&(a=Math.pow(this.scaleFactor,i*r)),this._v3_1.setFromMatrixPosition(this._cameraMatrixState);const o=this._v3_1.distanceTo(this._gizmos.position);let c=o/a;c=s.MathUtils.clamp(c,this.minDistance,this.maxDistance);const u=o*Math.tan(s.MathUtils.DEG2RAD*this._fovState*.5);let d=s.MathUtils.RAD2DEG*(2*Math.atan(u/c));d=s.MathUtils.clamp(d,this.minFov,this.maxFov);const p=u/Math.tan(s.MathUtils.DEG2RAD*(d/2));a=o/p,this._v3_2.setFromMatrixPosition(this._gizmoMatrixState),this.setFov(d),this.applyTransformMatrix(this.applyScale(a,this._v3_2,!1));const f=this._gizmos.position.clone().sub(this.camera.position).normalize().multiplyScalar(p/o);this._m4_1.makeTranslation(f.x,f.y,f.z),this.dispatchEvent(h)}})),i(this,"onTriplePanEnd",(()=>{this.updateTbState(a.IDLE,!1),this.dispatchEvent(d)})),i(this,"setCenter",((e,t)=>{l.x=e,l.y=t})),i(this,"initializeMouseActions",(()=>{this.setMouseAction("PAN",0,"CTRL"),this.setMouseAction("PAN",2),this.setMouseAction("ROTATE",0),this.setMouseAction("ZOOM","WHEEL"),this.setMouseAction("ZOOM",1),this.setMouseAction("FOV","WHEEL","SHIFT"),this.setMouseAction("FOV",1,"SHIFT")})),i(this,"setMouseAction",((e,t,n=null)=>{let r;if(!["PAN","ROTATE","ZOOM","FOV"].includes(e)||![0,1,2,"WHEEL"].includes(t)||!["CTRL","SHIFT",null].includes(n))return!1;if("WHEEL"==t&&"ZOOM"!=e&&"FOV"!=e)return!1;switch(e){case"PAN":r=a.PAN;break;case"ROTATE":r=a.ROTATE;break;case"ZOOM":r=a.SCALE;break;case"FOV":r=a.FOV}const i={operation:e,mouse:t,key:n,state:r};for(let s=0;s{let n;for(let r=0;r{let n;for(let r=0;r180*Math.atan2(t.clientY-e.clientY,t.clientX-e.clientX)/Math.PI)),i(this,"updateTouchEvent",(e=>{for(let t=0;t{const i=(r-n)/1e3;return 0==i?0:(t-e)/i})),i(this,"calculatePointersDistance",((e,t)=>Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2)))),i(this,"calculateRotationAxis",((e,t)=>(this._rotationMatrix.extractRotation(this._cameraMatrixState),this._quat.setFromRotationMatrix(this._rotationMatrix),this._rotationAxis.crossVectors(e,t).applyQuaternion(this._quat),this._rotationAxis.normalize().clone()))),i(this,"calculateTbRadius",(e=>{const t=e.position.distanceTo(this._gizmos.position);if(e instanceof s.PerspectiveCamera){const n=s.MathUtils.DEG2RAD*e.fov*.5,r=Math.atan(e.aspect*Math.tan(n));return Math.tan(Math.min(n,r))*t*.67}if(e instanceof s.OrthographicCamera)return.67*Math.min(e.top,e.right)})),i(this,"focus",((e,t,n=1)=>{if(this.camera){const r=e.clone();r.sub(this._gizmos.position).multiplyScalar(n),this._translationMatrix.makeTranslation(r.x,r.y,r.z);const i=this._gizmoMatrixState.clone();this._gizmoMatrixState.premultiply(this._translationMatrix),this._gizmoMatrixState.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale);const s=this._cameraMatrixState.clone();this._cameraMatrixState.premultiply(this._translationMatrix),this._cameraMatrixState.decompose(this.camera.position,this.camera.quaternion,this.camera.scale),this.enableZoom&&this.applyTransformMatrix(this.applyScale(t,this._gizmos.position)),this._gizmoMatrixState.copy(i),this._cameraMatrixState.copy(s)}})),i(this,"drawGrid",(()=>{if(this.scene){const e=8947848,t=3;let n,r,i,a;if(this.camera instanceof s.OrthographicCamera){const e=this.camera.right-this.camera.left,s=this.camera.bottom-this.camera.top;i=Math.max(e,s),a=i/20,n=i/this.camera.zoom*t,r=n/a*this.camera.zoom}else if(this.camera instanceof s.PerspectiveCamera){const e=this.camera.position.distanceTo(this._gizmos.position),o=s.MathUtils.DEG2RAD*this.camera.fov*.5,l=Math.atan(this.camera.aspect*Math.tan(o));i=Math.tan(Math.max(o,l))*e*2,a=i/20,n=i*t,r=n/a}null==this._grid&&this.camera&&(this._grid=new s.GridHelper(n,r,e,e),this._grid.position.copy(this._gizmos.position),this._gridPosition.copy(this._grid.position),this._grid.quaternion.copy(this.camera.quaternion),this._grid.rotateX(.5*Math.PI),this.scene.add(this._grid))}})),i(this,"connect",(e=>{e===document&&console.error('THREE.ArcballControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.domElement=e,this.domElement.style.touchAction="none",this.domElement.addEventListener("contextmenu",this.onContextMenu),this.domElement.addEventListener("pointerdown",this.onPointerDown),this.domElement.addEventListener("pointercancel",this.onPointerCancel),this.domElement.addEventListener("wheel",this.onWheel)})),i(this,"dispose",(()=>{var e,t,n,r,i;-1!=this._animationId&&window.cancelAnimationFrame(this._animationId),null==(e=this.domElement)||e.removeEventListener("pointerdown",this.onPointerDown),null==(t=this.domElement)||t.removeEventListener("pointercancel",this.onPointerCancel),null==(n=this.domElement)||n.removeEventListener("wheel",this.onWheel),null==(r=this.domElement)||r.removeEventListener("contextmenu",this.onContextMenu),window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),null==(i=this.scene)||i.remove(this._gizmos),this.disposeGrid()})),i(this,"disposeGrid",(()=>{this._grid&&this.scene&&(this.scene.remove(this._grid),this._grid=null)})),i(this,"easeOutCubic",(e=>1-Math.pow(1-e,3))),i(this,"activateGizmos",(e=>{for(const t of this._gizmos.children)t.material.setValues({opacity:e?1:.6})})),i(this,"getCursorNDC",((e,t,n)=>{const r=n.getBoundingClientRect();return this._v2_1.setX((e-r.left)/r.width*2-1),this._v2_1.setY((r.bottom-t)/r.height*2-1),this._v2_1.clone()})),i(this,"getCursorPosition",((e,t,n)=>(this._v2_1.copy(this.getCursorNDC(e,t,n)),this.camera instanceof s.OrthographicCamera&&(this._v2_1.x*=.5*(this.camera.right-this.camera.left),this._v2_1.y*=.5*(this.camera.top-this.camera.bottom)),this._v2_1.clone()))),i(this,"setCamera",(e=>{if(e){e.lookAt(this.target),e.updateMatrix(),e instanceof s.PerspectiveCamera&&(this._fov0=e.fov,this._fovState=e.fov),this._cameraMatrixState0.copy(e.matrix),this._cameraMatrixState.copy(this._cameraMatrixState0),this._cameraProjectionState.copy(e.projectionMatrix),this._zoom0=e.zoom,this._zoomState=this._zoom0,this._initialNear=e.near,this._nearPos0=e.position.distanceTo(this.target)-e.near,this._nearPos=this._initialNear,this._initialFar=e.far,this._farPos0=e.position.distanceTo(this.target)-e.far,this._farPos=this._initialFar,this._up0.copy(e.up),this._upState.copy(e.up),this.camera=e,this.camera.updateProjectionMatrix();const t=this.calculateTbRadius(e);void 0!==t&&(this._tbRadius=t),this.makeGizmos(this.target,this._tbRadius)}})),i(this,"makeGizmos",((e,t)=>{const n=new s.EllipseCurve(0,0,t,t).getPoints(this._curvePts),r=(new s.BufferGeometry).setFromPoints(n),i=new s.LineBasicMaterial({color:16744576,fog:!1,transparent:!0,opacity:.6}),a=new s.LineBasicMaterial({color:8454016,fog:!1,transparent:!0,opacity:.6}),o=new s.LineBasicMaterial({color:8421631,fog:!1,transparent:!0,opacity:.6}),l=new s.Line(r,i),c=new s.Line(r,a),h=new s.Line(r,o),u=.5*Math.PI;if(l.rotation.x=u,c.rotation.y=u,this._gizmoMatrixState0.identity().setPosition(e),this._gizmoMatrixState.copy(this._gizmoMatrixState0),this.camera&&1!=this.camera.zoom){const t=1/this.camera.zoom;this._scaleMatrix.makeScale(t,t,t),this._translationMatrix.makeTranslation(-e.x,-e.y,-e.z),this._gizmoMatrixState.premultiply(this._translationMatrix).premultiply(this._scaleMatrix),this._translationMatrix.makeTranslation(e.x,e.y,e.z),this._gizmoMatrixState.premultiply(this._translationMatrix)}this._gizmoMatrixState.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this._gizmos.clear(),this._gizmos.add(l),this._gizmos.add(c),this._gizmos.add(h)})),i(this,"onFocusAnim",((e,t,n,r)=>{if(-1==this._timeStart&&(this._timeStart=e),this._state==a.ANIMATION_FOCUS){const i=(e-this._timeStart)/this.focusAnimationTime;if(this._gizmoMatrixState.copy(r),i>=1)this._gizmoMatrixState.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this.focus(t,this.scaleFactor),this._timeStart=-1,this.updateTbState(a.IDLE,!1),this.activateGizmos(!1),this.dispatchEvent(h);else{const e=this.easeOutCubic(i),s=1-e+this.scaleFactor*e;this._gizmoMatrixState.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this.focus(t,s,e),this.dispatchEvent(h);const a=this;this._animationId=window.requestAnimationFrame((function(e){a.onFocusAnim(e,t,n,r.clone())}))}}else this._animationId=-1,this._timeStart=-1})),i(this,"onRotationAnim",((e,t,n)=>{if(-1==this._timeStart&&(this._anglePrev=0,this._angleCurrent=0,this._timeStart=e),this._state==a.ANIMATION_ROTATE){const r=(e-this._timeStart)/1e3;if(n+-this.dampingFactor*r>0){this._angleCurrent=.5*-this.dampingFactor*Math.pow(r,2)+n*r+0,this.applyTransformMatrix(this.rotate(t,this._angleCurrent)),this.dispatchEvent(h);const e=this;this._animationId=window.requestAnimationFrame((function(r){e.onRotationAnim(r,t,n)}))}else this._animationId=-1,this._timeStart=-1,this.updateTbState(a.IDLE,!1),this.activateGizmos(!1),this.dispatchEvent(h)}else this._animationId=-1,this._timeStart=-1,this._state!=a.ROTATE&&(this.activateGizmos(!1),this.dispatchEvent(h))})),i(this,"pan",((e,t,n=!1)=>{if(this.camera){const r=e.clone().sub(t);if(this.camera instanceof s.OrthographicCamera&&r.multiplyScalar(1/this.camera.zoom),this.camera instanceof s.PerspectiveCamera&&n){this._v3_1.setFromMatrixPosition(this._cameraMatrixState0),this._v3_2.setFromMatrixPosition(this._gizmoMatrixState0);const e=this._v3_1.distanceTo(this._v3_2)/this.camera.position.distanceTo(this._gizmos.position);r.multiplyScalar(1/e)}this._v3_1.set(r.x,r.y,0).applyQuaternion(this.camera.quaternion),this._m4_1.makeTranslation(this._v3_1.x,this._v3_1.y,this._v3_1.z),this.setTransformationMatrices(this._m4_1,this._m4_1)}return c})),i(this,"reset",(()=>{if(this.camera){this.camera.zoom=this._zoom0,this.camera instanceof s.PerspectiveCamera&&(this.camera.fov=this._fov0),this.camera.near=this._nearPos,this.camera.far=this._farPos,this._cameraMatrixState.copy(this._cameraMatrixState0),this._cameraMatrixState.decompose(this.camera.position,this.camera.quaternion,this.camera.scale),this.camera.up.copy(this._up0),this.camera.updateMatrix(),this.camera.updateProjectionMatrix(),this._gizmoMatrixState.copy(this._gizmoMatrixState0),this._gizmoMatrixState0.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this._gizmos.updateMatrix();const e=this.calculateTbRadius(this.camera);void 0!==e&&(this._tbRadius=e),this.makeGizmos(this._gizmos.position,this._tbRadius),this.camera.lookAt(this._gizmos.position),this.updateTbState(a.IDLE,!1),this.dispatchEvent(h)}})),i(this,"rotate",((e,t)=>{const n=this._gizmos.position;return this._translationMatrix.makeTranslation(-n.x,-n.y,-n.z),this._rotationMatrix.makeRotationAxis(e,-t),this._m4_1.makeTranslation(n.x,n.y,n.z),this._m4_1.multiply(this._rotationMatrix),this._m4_1.multiply(this._translationMatrix),this.setTransformationMatrices(this._m4_1),c})),i(this,"copyState",(()=>{if(this.camera){const e=JSON.stringify(this.camera instanceof s.OrthographicCamera?{arcballState:{cameraFar:this.camera.far,cameraMatrix:this.camera.matrix,cameraNear:this.camera.near,cameraUp:this.camera.up,cameraZoom:this.camera.zoom,gizmoMatrix:this._gizmos.matrix}}:{arcballState:{cameraFar:this.camera.far,cameraFov:this.camera.fov,cameraMatrix:this.camera.matrix,cameraNear:this.camera.near,cameraUp:this.camera.up,cameraZoom:this.camera.zoom,gizmoMatrix:this._gizmos.matrix}});navigator.clipboard.writeText(e)}})),i(this,"pasteState",(()=>{const e=this;navigator.clipboard.readText().then((function(t){e.setStateFromJSON(t)}))})),i(this,"saveState",(()=>{this.camera&&(this._cameraMatrixState0.copy(this.camera.matrix),this._gizmoMatrixState0.copy(this._gizmos.matrix),this._nearPos=this.camera.near,this._farPos=this.camera.far,this._zoom0=this.camera.zoom,this._up0.copy(this.camera.up),this.camera instanceof s.PerspectiveCamera&&(this._fov0=this.camera.fov))})),i(this,"applyScale",((e,t,n=!0)=>{if(!this.camera)return;const r=t.clone();let i=1/e;if(this.camera instanceof s.OrthographicCamera){this.camera.zoom=this._zoomState,this.camera.zoom*=e,this.camera.zoom>this.maxZoom?(this.camera.zoom=this.maxZoom,i=this._zoomState/this.maxZoom):this.camera.zoomthis.maxDistance&&(i=this.maxDistance/e,t=e-e*i);let a=r.clone().sub(this._v3_1).normalize().multiplyScalar(t);if(this._m4_1.makeTranslation(a.x,a.y,a.z),n){const n=this._v3_2;e=n.distanceTo(r),t=e-e*i,a=r.clone().sub(this._v3_2).normalize().multiplyScalar(t),this._translationMatrix.makeTranslation(n.x,n.y,n.z),this._scaleMatrix.makeScale(i,i,i),this._m4_2.makeTranslation(a.x,a.y,a.z).multiply(this._translationMatrix),this._m4_2.multiply(this._scaleMatrix),this._translationMatrix.makeTranslation(-n.x,-n.y,-n.z),this._m4_2.multiply(this._translationMatrix),this.setTransformationMatrices(this._m4_1,this._m4_2)}else this.setTransformationMatrices(this._m4_1);return c}})),i(this,"setFov",(e=>{this.camera instanceof s.PerspectiveCamera&&(this.camera.fov=s.MathUtils.clamp(e,this.minFov,this.maxFov),this.camera.updateProjectionMatrix())})),i(this,"setTarget",((e,t,n)=>{if(this.camera){this.target.set(e,t,n),this._gizmos.position.set(e,t,n);const r=this.calculateTbRadius(this.camera);void 0!==r&&(this._tbRadius=r),this.makeGizmos(this.target,this._tbRadius),this.camera.lookAt(this.target)}})),i(this,"zRotate",((e,t)=>(this._rotationMatrix.makeRotationAxis(this._rotationAxis,t),this._translationMatrix.makeTranslation(-e.x,-e.y,-e.z),this._m4_1.makeTranslation(e.x,e.y,e.z),this._m4_1.multiply(this._rotationMatrix),this._m4_1.multiply(this._translationMatrix),this._v3_1.setFromMatrixPosition(this._gizmoMatrixState).sub(e),this._v3_2.copy(this._v3_1).applyAxisAngle(this._rotationAxis,t),this._v3_2.sub(this._v3_1),this._m4_2.makeTranslation(this._v3_2.x,this._v3_2.y,this._v3_2.z),this.setTransformationMatrices(this._m4_1,this._m4_2),c))),i(this,"unprojectOnObj",((e,t)=>{if(!this.scene)return null;const n=new s.Raycaster;n.near=t.near,n.far=t.far,n.setFromCamera(e,t);const r=n.intersectObjects(this.scene.children,!0);for(let i=0;i{if(e instanceof s.OrthographicCamera){this._v2_1.copy(this.getCursorPosition(t,n,r)),this._v3_1.set(this._v2_1.x,this._v2_1.y,0);const e=Math.pow(this._v2_1.x,2),i=Math.pow(this._v2_1.y,2),s=Math.pow(this._tbRadius,2);return e+i<=.5*s?this._v3_1.setZ(Math.sqrt(s-(e+i))):this._v3_1.setZ(.5*s/Math.sqrt(e+i)),this._v3_1}if(e instanceof s.PerspectiveCamera){this._v2_1.copy(this.getCursorNDC(t,n,r)),this._v3_1.set(this._v2_1.x,this._v2_1.y,-1),this._v3_1.applyMatrix4(e.projectionMatrixInverse);const a=this._v3_1.clone().normalize(),o=e.position.distanceTo(this._gizmos.position),l=Math.pow(i,2),c=this._v3_1.z,h=Math.sqrt(Math.pow(this._v3_1.x,2)+Math.pow(this._v3_1.y,2));if(0==h)return a.set(this._v3_1.x,this._v3_1.y,i),a;const u=c/h,d=o;let p=Math.pow(u,2)+1,f=2*u*d,m=Math.pow(d,2)-l,g=Math.pow(f,2)-4*p*m;if(g>=0){this._v2_1.setX((-f-Math.sqrt(g))/(2*p)),this._v2_1.setY(u*this._v2_1.x+d);if(s.MathUtils.RAD2DEG*this._v2_1.angle()>=45){const e=Math.sqrt(Math.pow(this._v2_1.x,2)+Math.pow(o-this._v2_1.y,2));return a.multiplyScalar(e),a.z+=o,a}}p=u,f=d,m=.5*-l,g=Math.pow(f,2)-4*p*m,this._v2_1.setX((-f-Math.sqrt(g))/(2*p)),this._v2_1.setY(u*this._v2_1.x+d);const A=Math.sqrt(Math.pow(this._v2_1.x,2)+Math.pow(o-this._v2_1.y,2));return a.multiplyScalar(A),a.z+=o,a}})),i(this,"unprojectOnTbPlane",((e,t,n,r,i=!1)=>{if(e instanceof s.OrthographicCamera)return this._v2_1.copy(this.getCursorPosition(t,n,r)),this._v3_1.set(this._v2_1.x,this._v2_1.y,0),this._v3_1.clone();if(e instanceof s.PerspectiveCamera){this._v2_1.copy(this.getCursorNDC(t,n,r)),this._v3_1.set(this._v2_1.x,this._v2_1.y,-1),this._v3_1.applyMatrix4(e.projectionMatrixInverse);const s=this._v3_1.clone().normalize(),a=this._v3_1.z,o=Math.sqrt(Math.pow(this._v3_1.x,2)+Math.pow(this._v3_1.y,2));let l;if(l=i?this._v3_1.setFromMatrixPosition(this._cameraMatrixState0).distanceTo(this._v3_2.setFromMatrixPosition(this._gizmoMatrixState0)):e.position.distanceTo(this._gizmos.position),0==o)return s.set(0,0,0),s;const c=l,h=-c/(a/o),u=Math.sqrt(Math.pow(c,2)+Math.pow(h,2));return s.multiplyScalar(u),s.z=0,s}})),i(this,"updateMatrixState",(()=>{this.camera&&(this._cameraMatrixState.copy(this.camera.matrix),this._gizmoMatrixState.copy(this._gizmos.matrix),this.camera instanceof s.OrthographicCamera&&(this._cameraProjectionState.copy(this.camera.projectionMatrix),this.camera.updateProjectionMatrix(),this._zoomState=this.camera.zoom),this.camera instanceof s.PerspectiveCamera&&(this._fovState=this.camera.fov))})),i(this,"updateTbState",((e,t)=>{this._state=e,t&&this.updateMatrixState()})),i(this,"update",(()=>{const e=1e-6;if(!this.target.equals(this._currentTarget)&&this.camera){this._gizmos.position.set(this.target.x,this.target.y,this.target.z);const e=this.calculateTbRadius(this.camera);void 0!==e&&(this._tbRadius=e),this.makeGizmos(this.target,this._tbRadius),this._currentTarget.copy(this.target)}if(this.camera){if(this.camera instanceof s.OrthographicCamera&&(this.camera.zoom>this.maxZoom||this.camera.zoomthis.maxDistance+e||tthis.maxFov)&&(this.camera.fov=s.MathUtils.clamp(this.camera.fov,this.minFov,this.maxFov),this.camera.updateProjectionMatrix());const n=this._tbRadius,r=this.calculateTbRadius(this.camera);if(void 0!==r&&(this._tbRadius=r),nthis._tbRadius+e){const e=(this._gizmos.scale.x+this._gizmos.scale.y+this._gizmos.scale.z)/3,t=this._tbRadius/e,n=new s.EllipseCurve(0,0,t,t).getPoints(this._curvePts),r=(new s.BufferGeometry).setFromPoints(n);for(const i in this._gizmos.children){this._gizmos.children[i].geometry=r}}}this.camera.lookAt(this._gizmos.position)}})),i(this,"setStateFromJSON",(e=>{const t=JSON.parse(e);if(t.arcballState&&this.camera){this._cameraMatrixState.fromArray(t.arcballState.cameraMatrix.elements),this._cameraMatrixState.decompose(this.camera.position,this.camera.quaternion,this.camera.scale),this.camera.up.copy(t.arcballState.cameraUp),this.camera.near=t.arcballState.cameraNear,this.camera.far=t.arcballState.cameraFar,this.camera.zoom=t.arcballState.cameraZoom,this.camera instanceof s.PerspectiveCamera&&(this.camera.fov=t.arcballState.cameraFov),this._gizmoMatrixState.fromArray(t.arcballState.gizmoMatrix.elements),this._gizmoMatrixState.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this.camera.updateMatrix(),this.camera.updateProjectionMatrix(),this._gizmos.updateMatrix();const e=this.calculateTbRadius(this.camera);void 0!==e&&(this._tbRadius=e);const n=(new s.Matrix4).copy(this._gizmoMatrixState0);this.makeGizmos(this._gizmos.position,this._tbRadius),this._gizmoMatrixState0.copy(n),this.camera.lookAt(this._gizmos.position),this.updateTbState(a.IDLE,!1),this.dispatchEvent(h)}})),this.camera=null,this.domElement=t,this.scene=n,this.mouseActions=[],this._mouseOp=null,this._v2_1=new s.Vector2,this._v3_1=new s.Vector3,this._v3_2=new s.Vector3,this._m4_1=new s.Matrix4,this._m4_2=new s.Matrix4,this._quat=new s.Quaternion,this._translationMatrix=new s.Matrix4,this._rotationMatrix=new s.Matrix4,this._scaleMatrix=new s.Matrix4,this._rotationAxis=new s.Vector3,this._cameraMatrixState=new s.Matrix4,this._cameraProjectionState=new s.Matrix4,this._fovState=1,this._upState=new s.Vector3,this._zoomState=1,this._nearPos=0,this._farPos=0,this._gizmoMatrixState=new s.Matrix4,this._up0=new s.Vector3,this._zoom0=1,this._fov0=0,this._initialNear=0,this._nearPos0=0,this._initialFar=0,this._farPos0=0,this._cameraMatrixState0=new s.Matrix4,this._gizmoMatrixState0=new s.Matrix4,this._button=-1,this._touchStart=[],this._touchCurrent=[],this._input=o.NONE,this._switchSensibility=32,this._startFingerDistance=0,this._currentFingerDistance=0,this._startFingerRotation=0,this._currentFingerRotation=0,this._devPxRatio=0,this._downValid=!0,this._nclicks=0,this._downEvents=[],this._clickStart=0,this._maxDownTime=250,this._maxInterval=300,this._posThreshold=24,this._movementThreshold=24,this._currentCursorPosition=new s.Vector3,this._startCursorPosition=new s.Vector3,this._grid=null,this._gridPosition=new s.Vector3,this._gizmos=new s.Group,this._curvePts=128,this._timeStart=-1,this._animationId=-1,this.focusAnimationTime=500,this._timePrev=0,this._timeCurrent=0,this._anglePrev=0,this._angleCurrent=0,this._cursorPosPrev=new s.Vector3,this._cursorPosCurr=new s.Vector3,this._wPrev=0,this._wCurr=0,this.adjustNearFar=!1,this.scaleFactor=1.1,this.dampingFactor=25,this.wMax=20,this.enableAnimations=!0,this.enableGrid=!1,this.cursorZoom=!1,this.minFov=5,this.maxFov=90,this.enabled=!0,this.enablePan=!0,this.enableRotate=!0,this.enableZoom=!0,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.target=new s.Vector3(0,0,0),this._currentTarget=new s.Vector3(0,0,0),this._tbRadius=1,this._state=a.IDLE,this.setCamera(e),this.scene&&this.scene.add(this._gizmos),this._devPxRatio=window.devicePixelRatio,this.initializeMouseActions(),this.domElement&&this.connect(this.domElement),window.addEventListener("resize",this.onWindowResize)}applyTransformMatrix(e){if((null==e?void 0:e.camera)&&this.camera&&(this._m4_1.copy(this._cameraMatrixState).premultiply(e.camera),this._m4_1.decompose(this.camera.position,this.camera.quaternion,this.camera.scale),this.camera.updateMatrix(),this._state!=a.ROTATE&&this._state!=a.ZROTATE&&this._state!=a.ANIMATION_ROTATE||this.camera.up.copy(this._upState).applyQuaternion(this.camera.quaternion)),(null==e?void 0:e.gizmos)&&(this._m4_1.copy(this._gizmoMatrixState).premultiply(e.gizmos),this._m4_1.decompose(this._gizmos.position,this._gizmos.quaternion,this._gizmos.scale),this._gizmos.updateMatrix()),(this._state==a.SCALE||this._state==a.FOCUS||this._state==a.ANIMATION_FOCUS)&&this.camera){const e=this.calculateTbRadius(this.camera);if(void 0!==e&&(this._tbRadius=e),this.adjustNearFar){const e=this.camera.position.distanceTo(this._gizmos.position),t=new s.Box3;t.setFromObject(this._gizmos);const n=new s.Sphere;t.getBoundingSphere(n);const r=Math.max(this._nearPos0,n.radius+n.center.length()),i=e-this._initialNear,a=Math.min(r,i);this.camera.near=e-a;const o=Math.min(this._farPos0,-n.radius+n.center.length()),l=e-this._initialFar,c=Math.min(o,l);this.camera.far=e-c,this.camera.updateProjectionMatrix()}else{let e=!1;this.camera.near!=this._initialNear&&(this.camera.near=this._initialNear,e=!0),this.camera.far!=this._initialFar&&(this.camera.far=this._initialFar,e=!0),e&&this.camera.updateProjectionMatrix()}}}setGizmosVisible(e){this._gizmos.visible=e,this.dispatchEvent(h)}setTransformationMatrices(e=null,t=null){e?c.camera?c.camera.copy(e):c.camera=e.clone():c.camera=null,t?c.gizmos?c.gizmos.copy(t):c.gizmos=t.clone():c.gizmos=null}}t.ArcballControls=p},78888:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);class a extends s.EventDispatcher{constructor(e){super(),i(this,"object"),i(this,"changeEvent",{type:"change"}),i(this,"EPS",1e-6),i(this,"enabled",!0),i(this,"deviceOrientation",{alpha:0,beta:0,gamma:0}),i(this,"screenOrientation",0),i(this,"alphaOffset",0),i(this,"onDeviceOrientationChangeEvent",(e=>{this.deviceOrientation=e})),i(this,"onScreenOrientationChangeEvent",(()=>{this.screenOrientation=window.orientation||0})),i(this,"zee",new s.Vector3(0,0,1)),i(this,"euler",new s.Euler),i(this,"q0",new s.Quaternion),i(this,"q1",new s.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5))),i(this,"setObjectQuaternion",((e,t,n,r,i)=>{this.euler.set(n,t,-r,"YXZ"),e.setFromEuler(this.euler),e.multiply(this.q1),e.multiply(this.q0.setFromAxisAngle(this.zee,-i))})),i(this,"connect",(()=>{this.onScreenOrientationChangeEvent(),void 0!==window.DeviceOrientationEvent&&"function"==typeof window.DeviceOrientationEvent.requestPermission?window.DeviceOrientationEvent.requestPermission().then((e=>{"granted"==e&&(window.addEventListener("orientationchange",this.onScreenOrientationChangeEvent),window.addEventListener("deviceorientation",this.onDeviceOrientationChangeEvent))})).catch((e=>{console.error("THREE.DeviceOrientationControls: Unable to use DeviceOrientation API:",e)})):(window.addEventListener("orientationchange",this.onScreenOrientationChangeEvent),window.addEventListener("deviceorientation",this.onDeviceOrientationChangeEvent)),this.enabled=!0})),i(this,"disconnect",(()=>{window.removeEventListener("orientationchange",this.onScreenOrientationChangeEvent),window.removeEventListener("deviceorientation",this.onDeviceOrientationChangeEvent),this.enabled=!1})),i(this,"lastQuaternion",new s.Quaternion),i(this,"update",(()=>{if(!1===this.enabled)return;const e=this.deviceOrientation;if(e){const t=e.alpha?s.MathUtils.degToRad(e.alpha)+this.alphaOffset:0,n=e.beta?s.MathUtils.degToRad(e.beta):0,r=e.gamma?s.MathUtils.degToRad(e.gamma):0,i=this.screenOrientation?s.MathUtils.degToRad(this.screenOrientation):0;this.setObjectQuaternion(this.object.quaternion,t,n,r,i),8*(1-this.lastQuaternion.dot(this.object.quaternion))>this.EPS&&(this.lastQuaternion.copy(this.object.quaternion),this.dispatchEvent(this.changeEvent))}})),i(this,"dispose",(()=>this.disconnect())),this.object=e,this.object.rotation.reorder("YXZ"),this.connect()}}t.DeviceOrientationControls=a},76548:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);class a extends s.EventDispatcher{constructor(e,t,n){super(),i(this,"enabled",!0),i(this,"transformGroup",!1),i(this,"_objects"),i(this,"_camera"),i(this,"_domElement"),i(this,"_plane",new s.Plane),i(this,"_raycaster",new s.Raycaster),i(this,"_mouse",new s.Vector2),i(this,"_offset",new s.Vector3),i(this,"_intersection",new s.Vector3),i(this,"_worldPosition",new s.Vector3),i(this,"_inverseMatrix",new s.Matrix4),i(this,"_intersections",[]),i(this,"_selected",null),i(this,"_hovered",null),i(this,"activate",(()=>{this._domElement.addEventListener("pointermove",this.onPointerMove),this._domElement.addEventListener("pointerdown",this.onPointerDown),this._domElement.addEventListener("pointerup",this.onPointerCancel),this._domElement.addEventListener("pointerleave",this.onPointerCancel),this._domElement.addEventListener("touchmove",this.onTouchMove),this._domElement.addEventListener("touchstart",this.onTouchStart),this._domElement.addEventListener("touchend",this.onTouchEnd)})),i(this,"deactivate",(()=>{this._domElement.removeEventListener("pointermove",this.onPointerMove),this._domElement.removeEventListener("pointerdown",this.onPointerDown),this._domElement.removeEventListener("pointerup",this.onPointerCancel),this._domElement.removeEventListener("pointerleave",this.onPointerCancel),this._domElement.removeEventListener("touchmove",this.onTouchMove),this._domElement.removeEventListener("touchstart",this.onTouchStart),this._domElement.removeEventListener("touchend",this.onTouchEnd),this._domElement.style.cursor=""})),i(this,"dispose",(()=>this.deactivate())),i(this,"getObjects",(()=>this._objects)),i(this,"getRaycaster",(()=>this._raycaster)),i(this,"onMouseMove",(e=>{const t=this._domElement.getBoundingClientRect();if(this._mouse.x=(e.clientX-t.left)/t.width*2-1,this._mouse.y=-(e.clientY-t.top)/t.height*2+1,this._raycaster.setFromCamera(this._mouse,this._camera),this._selected&&this.enabled)return this._raycaster.ray.intersectPlane(this._plane,this._intersection)&&this._selected.position.copy(this._intersection.sub(this._offset).applyMatrix4(this._inverseMatrix)),void this.dispatchEvent({type:"drag",object:this._selected});if(this._intersections.length=0,this._raycaster.setFromCamera(this._mouse,this._camera),this._raycaster.intersectObjects(this._objects,!0,this._intersections),this._intersections.length>0){const e=this._intersections[0].object;this._plane.setFromNormalAndCoplanarPoint(this._camera.getWorldDirection(this._plane.normal),this._worldPosition.setFromMatrixPosition(e.matrixWorld)),this._hovered!==e&&(this.dispatchEvent({type:"hoveron",object:e}),this._domElement.style.cursor="pointer",this._hovered=e)}else null!==this._hovered&&(this.dispatchEvent({type:"hoveroff",object:this._hovered}),this._domElement.style.cursor="auto",this._hovered=null)})),i(this,"onMouseDown",(()=>{this._intersections.length=0,this._raycaster.setFromCamera(this._mouse,this._camera),this._raycaster.intersectObjects(this._objects,!0,this._intersections),this._intersections.length>0&&(this._selected=!0===this.transformGroup?this._objects[0]:this._intersections[0].object,this._raycaster.ray.intersectPlane(this._plane,this._intersection)&&this._selected.parent&&(this._inverseMatrix.copy(this._selected.parent.matrixWorld).invert(),this._offset.copy(this._intersection).sub(this._worldPosition.setFromMatrixPosition(this._selected.matrixWorld))),this._domElement.style.cursor="move",this.dispatchEvent({type:"dragstart",object:this._selected}))})),i(this,"onMouseCancel",(()=>{this._selected&&(this.dispatchEvent({type:"dragend",object:this._selected}),this._selected=null),this._domElement.style.cursor=this._hovered?"pointer":"auto"})),i(this,"onPointerMove",(e=>{switch(e.pointerType){case"mouse":case"pen":this.onMouseMove(e)}})),i(this,"onPointerDown",(e=>{switch(e.pointerType){case"mouse":case"pen":this.onMouseDown()}})),i(this,"onPointerCancel",(e=>{switch(e.pointerType){case"mouse":case"pen":this.onMouseCancel()}})),i(this,"onTouchMove",(e=>{e.preventDefault();const t=e.changedTouches[0],n=this._domElement.getBoundingClientRect();if(this._mouse.x=(t.clientX-n.left)/n.width*2-1,this._mouse.y=-(t.clientY-n.top)/n.height*2+1,this._raycaster.setFromCamera(this._mouse,this._camera),this._selected&&this.enabled)return this._raycaster.ray.intersectPlane(this._plane,this._intersection)&&this._selected.position.copy(this._intersection.sub(this._offset).applyMatrix4(this._inverseMatrix)),void this.dispatchEvent({type:"drag",object:this._selected})})),i(this,"onTouchStart",(e=>{e.preventDefault();const t=e.changedTouches[0],n=this._domElement.getBoundingClientRect();this._mouse.x=(t.clientX-n.left)/n.width*2-1,this._mouse.y=-(t.clientY-n.top)/n.height*2+1,this._intersections.length=0,this._raycaster.setFromCamera(this._mouse,this._camera),this._raycaster.intersectObjects(this._objects,!0,this._intersections),this._intersections.length>0&&(this._selected=!0===this.transformGroup?this._objects[0]:this._intersections[0].object,this._plane.setFromNormalAndCoplanarPoint(this._camera.getWorldDirection(this._plane.normal),this._worldPosition.setFromMatrixPosition(this._selected.matrixWorld)),this._raycaster.ray.intersectPlane(this._plane,this._intersection)&&this._selected.parent&&(this._inverseMatrix.copy(this._selected.parent.matrixWorld).invert(),this._offset.copy(this._intersection).sub(this._worldPosition.setFromMatrixPosition(this._selected.matrixWorld))),this._domElement.style.cursor="move",this.dispatchEvent({type:"dragstart",object:this._selected}))})),i(this,"onTouchEnd",(e=>{e.preventDefault(),this._selected&&(this.dispatchEvent({type:"dragend",object:this._selected}),this._selected=null),this._domElement.style.cursor="auto"})),this._objects=e,this._camera=t,this._domElement=n,this.activate()}}t.DragControls=a},55047:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=new s.Vector3;class o extends s.EventDispatcher{constructor(e,t){super(),i(this,"object"),i(this,"domElement"),i(this,"enabled",!0),i(this,"movementSpeed",1),i(this,"lookSpeed",.005),i(this,"lookVertical",!0),i(this,"autoForward",!1),i(this,"activeLook",!0),i(this,"heightSpeed",!1),i(this,"heightCoef",1),i(this,"heightMin",0),i(this,"heightMax",1),i(this,"constrainVertical",!1),i(this,"verticalMin",0),i(this,"verticalMax",Math.PI),i(this,"mouseDragOn",!1),i(this,"autoSpeedFactor",0),i(this,"mouseX",0),i(this,"mouseY",0),i(this,"moveForward",!1),i(this,"moveBackward",!1),i(this,"moveLeft",!1),i(this,"moveRight",!1),i(this,"moveUp",!1),i(this,"moveDown",!1),i(this,"viewHalfX",0),i(this,"viewHalfY",0),i(this,"lat",0),i(this,"lon",0),i(this,"lookDirection",new s.Vector3),i(this,"spherical",new s.Spherical),i(this,"target",new s.Vector3),i(this,"connect",(e=>{e.setAttribute("tabindex","-1"),e.style.touchAction="none",e.addEventListener("contextmenu",this.contextmenu),e.addEventListener("mousemove",this.onMouseMove),e.addEventListener("mousedown",this.onMouseDown),e.addEventListener("mouseup",this.onMouseUp),this.domElement=e,window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp),this.handleResize()})),i(this,"dispose",(()=>{var e,t,n,r;null==(e=this.domElement)||e.removeEventListener("contextmenu",this.contextmenu),null==(t=this.domElement)||t.removeEventListener("mousedown",this.onMouseDown),null==(n=this.domElement)||n.removeEventListener("mousemove",this.onMouseMove),null==(r=this.domElement)||r.removeEventListener("mouseup",this.onMouseUp),window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)})),i(this,"handleResize",(()=>{this.domElement&&(this.viewHalfX=this.domElement.offsetWidth/2,this.viewHalfY=this.domElement.offsetHeight/2)})),i(this,"onMouseDown",(e=>{var t;if(null==(t=this.domElement)||t.focus(),this.activeLook)switch(e.button){case 0:this.moveForward=!0;break;case 2:this.moveBackward=!0}this.mouseDragOn=!0})),i(this,"onMouseUp",(e=>{if(this.activeLook)switch(e.button){case 0:this.moveForward=!1;break;case 2:this.moveBackward=!1}this.mouseDragOn=!1})),i(this,"onMouseMove",(e=>{this.domElement&&(this.mouseX=e.pageX-this.domElement.offsetLeft-this.viewHalfX,this.mouseY=e.pageY-this.domElement.offsetTop-this.viewHalfY)})),i(this,"onKeyDown",(e=>{switch(e.code){case"ArrowUp":case"KeyW":this.moveForward=!0;break;case"ArrowLeft":case"KeyA":this.moveLeft=!0;break;case"ArrowDown":case"KeyS":this.moveBackward=!0;break;case"ArrowRight":case"KeyD":this.moveRight=!0;break;case"KeyR":this.moveUp=!0;break;case"KeyF":this.moveDown=!0}})),i(this,"onKeyUp",(e=>{switch(e.code){case"ArrowUp":case"KeyW":this.moveForward=!1;break;case"ArrowLeft":case"KeyA":this.moveLeft=!1;break;case"ArrowDown":case"KeyS":this.moveBackward=!1;break;case"ArrowRight":case"KeyD":this.moveRight=!1;break;case"KeyR":this.moveUp=!1;break;case"KeyF":this.moveDown=!1}})),i(this,"lookAt",((e,t,n)=>(e instanceof s.Vector3?this.target.copy(e):t&&n&&this.target.set(e,t,n),this.object.lookAt(this.target),this.setOrientation(),this))),i(this,"update",(e=>{if(!this.enabled)return;if(this.heightSpeed){const t=s.MathUtils.clamp(this.object.position.y,this.heightMin,this.heightMax)-this.heightMin;this.autoSpeedFactor=e*(t*this.heightCoef)}else this.autoSpeedFactor=0;const t=e*this.movementSpeed;(this.moveForward||this.autoForward&&!this.moveBackward)&&this.object.translateZ(-(t+this.autoSpeedFactor)),this.moveBackward&&this.object.translateZ(t),this.moveLeft&&this.object.translateX(-t),this.moveRight&&this.object.translateX(t),this.moveUp&&this.object.translateY(t),this.moveDown&&this.object.translateY(-t);let n=e*this.lookSpeed;this.activeLook||(n=0);let r=1;this.constrainVertical&&(r=Math.PI/(this.verticalMax-this.verticalMin)),this.lon-=this.mouseX*n,this.lookVertical&&(this.lat-=this.mouseY*n*r),this.lat=Math.max(-85,Math.min(85,this.lat));let i=s.MathUtils.degToRad(90-this.lat);const o=s.MathUtils.degToRad(this.lon);this.constrainVertical&&(i=s.MathUtils.mapLinear(i,0,Math.PI,this.verticalMin,this.verticalMax));const l=this.object.position;a.setFromSphericalCoords(1,i,o).add(l),this.object.lookAt(a)})),i(this,"contextmenu",(e=>e.preventDefault())),i(this,"setOrientation",(()=>{this.lookDirection.set(0,0,-1).applyQuaternion(this.object.quaternion),this.spherical.setFromVector3(this.lookDirection),this.lat=90-s.MathUtils.radToDeg(this.spherical.phi),this.lon=s.MathUtils.radToDeg(this.spherical.theta)})),this.object=e,this.domElement=t,this.setOrientation(),t&&this.connect(t)}}t.FirstPersonControls=o},9236:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);function a(e){e.preventDefault()}class o extends s.EventDispatcher{constructor(e,t){super(),i(this,"object"),i(this,"domElement",null),i(this,"movementSpeed",1),i(this,"rollSpeed",.005),i(this,"dragToLook",!1),i(this,"autoForward",!1),i(this,"changeEvent",{type:"change"}),i(this,"EPS",1e-6),i(this,"tmpQuaternion",new s.Quaternion),i(this,"mouseStatus",0),i(this,"movementSpeedMultiplier",1),i(this,"moveState",{up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0}),i(this,"moveVector",new s.Vector3(0,0,0)),i(this,"rotationVector",new s.Vector3(0,0,0)),i(this,"keydown",(e=>{if(!e.altKey){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}})),i(this,"keyup",(e=>{switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()})),i(this,"pointerdown",(e=>{if(this.dragToLook)this.mouseStatus++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}})),i(this,"pointermove",(e=>{if(!this.dragToLook||this.mouseStatus>0){const t=this.getContainerDimensions(),n=t.size[0]/2,r=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-r)/r,this.updateRotationVector()}})),i(this,"pointerup",(e=>{if(this.dragToLook)this.mouseStatus--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()})),i(this,"lastQuaternion",new s.Quaternion),i(this,"lastPosition",new s.Vector3),i(this,"update",(e=>{const t=e*this.movementSpeed,n=e*this.rollSpeed;this.object.translateX(this.moveVector.x*t),this.object.translateY(this.moveVector.y*t),this.object.translateZ(this.moveVector.z*t),this.tmpQuaternion.set(this.rotationVector.x*n,this.rotationVector.y*n,this.rotationVector.z*n,1).normalize(),this.object.quaternion.multiply(this.tmpQuaternion),(this.lastPosition.distanceToSquared(this.object.position)>this.EPS||8*(1-this.lastQuaternion.dot(this.object.quaternion))>this.EPS)&&(this.dispatchEvent(this.changeEvent),this.lastQuaternion.copy(this.object.quaternion),this.lastPosition.copy(this.object.position))})),i(this,"updateMovementVector",(()=>{const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back})),i(this,"updateRotationVector",(()=>{this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft})),i(this,"getContainerDimensions",(()=>this.domElement==document||this.domElement instanceof Document?{size:[window.innerWidth,window.innerHeight],offset:[0,0]}:{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]})),i(this,"connect",(e=>{this.domElement=e,e instanceof Document||e.setAttribute("tabindex",-1),this.domElement.addEventListener("contextmenu",a),this.domElement.addEventListener("pointermove",this.pointermove),this.domElement.addEventListener("pointerdown",this.pointerdown),this.domElement.addEventListener("pointerup",this.pointerup),window.addEventListener("keydown",this.keydown),window.addEventListener("keyup",this.keyup)})),i(this,"dispose",(()=>{this.domElement.removeEventListener("contextmenu",a),this.domElement.removeEventListener("pointermove",this.pointermove),this.domElement.removeEventListener("pointerdown",this.pointerdown),this.domElement.removeEventListener("pointerup",this.pointerup),window.removeEventListener("keydown",this.keydown),window.removeEventListener("keyup",this.keyup)})),this.object=e,void 0!==t&&this.connect(t),this.updateMovementVector(),this.updateRotationVector()}}t.FlyControls=o},53072:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=new s.Ray,o=new s.Plane,l=Math.cos(Math.PI/180*70),c=(e,t)=>(e%t+t)%t;class h extends s.EventDispatcher{constructor(e,t){super(),i(this,"object"),i(this,"domElement"),i(this,"enabled",!0),i(this,"target",new s.Vector3),i(this,"minDistance",0),i(this,"maxDistance",1/0),i(this,"minZoom",0),i(this,"maxZoom",1/0),i(this,"minPolarAngle",0),i(this,"maxPolarAngle",Math.PI),i(this,"minAzimuthAngle",-1/0),i(this,"maxAzimuthAngle",1/0),i(this,"enableDamping",!1),i(this,"dampingFactor",.05),i(this,"enableZoom",!0),i(this,"zoomSpeed",1),i(this,"enableRotate",!0),i(this,"rotateSpeed",1),i(this,"enablePan",!0),i(this,"panSpeed",1),i(this,"screenSpacePanning",!0),i(this,"keyPanSpeed",7),i(this,"zoomToCursor",!1),i(this,"autoRotate",!1),i(this,"autoRotateSpeed",2),i(this,"reverseOrbit",!1),i(this,"reverseHorizontalOrbit",!1),i(this,"reverseVerticalOrbit",!1),i(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),i(this,"mouseButtons",{LEFT:s.MOUSE.ROTATE,MIDDLE:s.MOUSE.DOLLY,RIGHT:s.MOUSE.PAN}),i(this,"touches",{ONE:s.TOUCH.ROTATE,TWO:s.TOUCH.DOLLY_PAN}),i(this,"target0"),i(this,"position0"),i(this,"zoom0"),i(this,"_domElementKeyEvents",null),i(this,"getPolarAngle"),i(this,"getAzimuthalAngle"),i(this,"setPolarAngle"),i(this,"setAzimuthalAngle"),i(this,"getDistance"),i(this,"listenToKeyEvents"),i(this,"stopListenToKeyEvents"),i(this,"saveState"),i(this,"reset"),i(this,"update"),i(this,"connect"),i(this,"dispose"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>m.phi,this.getAzimuthalAngle=()=>m.theta,this.setPolarAngle=e=>{let t=c(e,2*Math.PI),r=m.phi;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i{let t=c(e,2*Math.PI),r=m.theta;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-in.object.position.distanceTo(n.target),this.listenToKeyEvents=e=>{e.addEventListener("keydown",ne),this._domElementKeyEvents=e},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",ne),this._domElementKeyEvents=null},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(r),n.update(),p=d.NONE},this.update=(()=>{const t=new s.Vector3,i=new s.Vector3(0,1,0),c=(new s.Quaternion).setFromUnitVectors(e.up,i),h=c.clone().invert(),u=new s.Vector3,y=new s.Quaternion,x=2*Math.PI;return function(){const b=n.object.position;c.setFromUnitVectors(e.up,i),h.copy(c).invert(),t.copy(b).sub(n.target),t.applyQuaternion(c),m.setFromVector3(t),n.autoRotate&&p===d.NONE&&L(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(m.theta+=g.theta*n.dampingFactor,m.phi+=g.phi*n.dampingFactor):(m.theta+=g.theta,m.phi+=g.phi);let E=n.minAzimuthAngle,_=n.maxAzimuthAngle;isFinite(E)&&isFinite(_)&&(E<-Math.PI?E+=x:E>Math.PI&&(E-=x),_<-Math.PI?_+=x:_>Math.PI&&(_-=x),m.theta=E<=_?Math.max(E,Math.min(_,m.theta)):m.theta>(E+_)/2?Math.max(E,m.theta):Math.min(_,m.theta)),m.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,m.phi)),m.makeSafe(),!0===n.enableDamping?n.target.addScaledVector(v,n.dampingFactor):n.target.add(v),n.zoomToCursor&&B||n.object.isOrthographicCamera?m.radius=Q(m.radius):m.radius=Q(m.radius*A),t.setFromSpherical(m),t.applyQuaternion(h),b.copy(n.target).add(t),n.object.matrixAutoUpdate||n.object.updateMatrix(),n.object.lookAt(n.target),!0===n.enableDamping?(g.theta*=1-n.dampingFactor,g.phi*=1-n.dampingFactor,v.multiplyScalar(1-n.dampingFactor)):(g.set(0,0,0),v.set(0,0,0));let S=!1;if(n.zoomToCursor&&B){let r=null;if(n.object instanceof s.PerspectiveCamera&&n.object.isPerspectiveCamera){const e=t.length();r=Q(e*A);const i=e-r;n.object.position.addScaledVector(T,i),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const e=new s.Vector3(I.x,I.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/A)),n.object.updateProjectionMatrix(),S=!0;const i=new s.Vector3(I.x,I.y,0);i.unproject(n.object),n.object.position.sub(i).add(e),n.object.updateMatrixWorld(),r=t.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;null!==r&&(n.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(r).add(n.object.position):(a.origin.copy(n.object.position),a.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(a.direction))f||8*(1-y.dot(n.object.quaternion))>f)&&(n.dispatchEvent(r),u.copy(n.object.position),y.copy(n.object.quaternion),S=!1,!0)}})(),this.connect=e=>{e===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),n.domElement=e,n.domElement.style.touchAction="none",n.domElement.addEventListener("contextmenu",re),n.domElement.addEventListener("pointerdown",J),n.domElement.addEventListener("pointercancel",ee),n.domElement.addEventListener("wheel",te)},this.dispose=()=>{var e,t,r,i,s,a;null==(e=n.domElement)||e.removeEventListener("contextmenu",re),null==(t=n.domElement)||t.removeEventListener("pointerdown",J),null==(r=n.domElement)||r.removeEventListener("pointercancel",ee),null==(i=n.domElement)||i.removeEventListener("wheel",te),null==(s=n.domElement)||s.ownerDocument.removeEventListener("pointermove",Z),null==(a=n.domElement)||a.ownerDocument.removeEventListener("pointerup",$),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",ne)};const n=this,r={type:"change"},h={type:"start"},u={type:"end"},d={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let p=d.NONE;const f=1e-6,m=new s.Spherical,g=new s.Spherical;let A=1;const v=new s.Vector3,y=new s.Vector2,x=new s.Vector2,b=new s.Vector2,E=new s.Vector2,_=new s.Vector2,S=new s.Vector2,M=new s.Vector2,w=new s.Vector2,C=new s.Vector2,T=new s.Vector3,I=new s.Vector2;let B=!1;const R=[],P={};function D(){return Math.pow(.95,n.zoomSpeed)}function L(e){n.reverseOrbit||n.reverseHorizontalOrbit?g.theta+=e:g.theta-=e}function F(e){n.reverseOrbit||n.reverseVerticalOrbit?g.phi+=e:g.phi-=e}const U=(()=>{const e=new s.Vector3;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),v.add(e)}})(),O=(()=>{const e=new s.Vector3;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),v.add(e)}})(),N=(()=>{const e=new s.Vector3;return function(t,r){const i=n.domElement;if(i&&n.object instanceof s.PerspectiveCamera&&n.object.isPerspectiveCamera){const s=n.object.position;e.copy(s).sub(n.target);let a=e.length();a*=Math.tan(n.object.fov/2*Math.PI/180),U(2*t*a/i.clientHeight,n.object.matrix),O(2*r*a/i.clientHeight,n.object.matrix)}else i&&n.object instanceof s.OrthographicCamera&&n.object.isOrthographicCamera?(U(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),O(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}})();function k(e){n.object instanceof s.PerspectiveCamera&&n.object.isPerspectiveCamera||n.object instanceof s.OrthographicCamera&&n.object.isOrthographicCamera?A/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function G(e){n.object instanceof s.PerspectiveCamera&&n.object.isPerspectiveCamera||n.object instanceof s.OrthographicCamera&&n.object.isOrthographicCamera?A*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function z(e){if(!n.zoomToCursor||!n.domElement)return;B=!0;const t=n.domElement.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,s=t.width,a=t.height;I.x=r/s*2-1,I.y=-i/a*2+1,T.set(I.x,I.y,1).unproject(n.object).sub(n.object.position).normalize()}function Q(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function V(e){y.set(e.clientX,e.clientY)}function H(e){E.set(e.clientX,e.clientY)}function j(){if(1==R.length)y.set(R[0].pageX,R[0].pageY);else{const e=.5*(R[0].pageX+R[1].pageX),t=.5*(R[0].pageY+R[1].pageY);y.set(e,t)}}function W(){if(1==R.length)E.set(R[0].pageX,R[0].pageY);else{const e=.5*(R[0].pageX+R[1].pageX),t=.5*(R[0].pageY+R[1].pageY);E.set(e,t)}}function X(){const e=R[0].pageX-R[1].pageX,t=R[0].pageY-R[1].pageY,n=Math.sqrt(e*e+t*t);M.set(0,n)}function Y(e){if(1==R.length)x.set(e.pageX,e.pageY);else{const t=ae(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);x.set(n,r)}b.subVectors(x,y).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(L(2*Math.PI*b.x/t.clientHeight),F(2*Math.PI*b.y/t.clientHeight)),y.copy(x)}function q(e){if(1==R.length)_.set(e.pageX,e.pageY);else{const t=ae(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);_.set(n,r)}S.subVectors(_,E).multiplyScalar(n.panSpeed),N(S.x,S.y),E.copy(_)}function K(e){const t=ae(e),r=e.pageX-t.x,i=e.pageY-t.y,s=Math.sqrt(r*r+i*i);w.set(0,s),C.set(0,Math.pow(w.y/M.y,n.zoomSpeed)),k(C.y),M.copy(w)}function J(e){var t,r;!1!==n.enabled&&(0===R.length&&(null==(t=n.domElement)||t.ownerDocument.addEventListener("pointermove",Z),null==(r=n.domElement)||r.ownerDocument.addEventListener("pointerup",$)),function(e){R.push(e)}(e),"touch"===e.pointerType?function(e){switch(se(e),R.length){case 1:switch(n.touches.ONE){case s.TOUCH.ROTATE:if(!1===n.enableRotate)return;j(),p=d.TOUCH_ROTATE;break;case s.TOUCH.PAN:if(!1===n.enablePan)return;W(),p=d.TOUCH_PAN;break;default:p=d.NONE}break;case 2:switch(n.touches.TWO){case s.TOUCH.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&X(),n.enablePan&&W(),p=d.TOUCH_DOLLY_PAN;break;case s.TOUCH.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&X(),n.enableRotate&&j(),p=d.TOUCH_DOLLY_ROTATE;break;default:p=d.NONE}break;default:p=d.NONE}p!==d.NONE&&n.dispatchEvent(h)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case s.MOUSE.DOLLY:if(!1===n.enableZoom)return;!function(e){z(e),M.set(e.clientX,e.clientY)}(e),p=d.DOLLY;break;case s.MOUSE.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;H(e),p=d.PAN}else{if(!1===n.enableRotate)return;V(e),p=d.ROTATE}break;case s.MOUSE.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;V(e),p=d.ROTATE}else{if(!1===n.enablePan)return;H(e),p=d.PAN}break;default:p=d.NONE}p!==d.NONE&&n.dispatchEvent(h)}(e))}function Z(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(se(e),p){case d.TOUCH_ROTATE:if(!1===n.enableRotate)return;Y(e),n.update();break;case d.TOUCH_PAN:if(!1===n.enablePan)return;q(e),n.update();break;case d.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&K(e),n.enablePan&&q(e)}(e),n.update();break;case d.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&K(e),n.enableRotate&&Y(e)}(e),n.update();break;default:p=d.NONE}}(e):function(e){if(!1===n.enabled)return;switch(p){case d.ROTATE:if(!1===n.enableRotate)return;!function(e){x.set(e.clientX,e.clientY),b.subVectors(x,y).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(L(2*Math.PI*b.x/t.clientHeight),F(2*Math.PI*b.y/t.clientHeight)),y.copy(x),n.update()}(e);break;case d.DOLLY:if(!1===n.enableZoom)return;!function(e){w.set(e.clientX,e.clientY),C.subVectors(w,M),C.y>0?k(D()):C.y<0&&G(D()),M.copy(w),n.update()}(e);break;case d.PAN:if(!1===n.enablePan)return;!function(e){_.set(e.clientX,e.clientY),S.subVectors(_,E).multiplyScalar(n.panSpeed),N(S.x,S.y),E.copy(_),n.update()}(e)}}(e))}function $(e){var t,r,i;ie(e),0===R.length&&(null==(t=n.domElement)||t.releasePointerCapture(e.pointerId),null==(r=n.domElement)||r.ownerDocument.removeEventListener("pointermove",Z),null==(i=n.domElement)||i.ownerDocument.removeEventListener("pointerup",$)),n.dispatchEvent(u),p=d.NONE}function ee(e){ie(e)}function te(e){!1===n.enabled||!1===n.enableZoom||p!==d.NONE&&p!==d.ROTATE||(e.preventDefault(),n.dispatchEvent(h),function(e){z(e),e.deltaY<0?G(D()):e.deltaY>0&&k(D()),n.update()}(e),n.dispatchEvent(u))}function ne(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:N(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:N(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:N(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:N(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function re(e){!1!==n.enabled&&e.preventDefault()}function ie(e){delete P[e.pointerId];for(let t=0;t{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=new s.Euler(0,0,0,"YXZ"),o=new s.Vector3,l={type:"change"},c={type:"lock"},h={type:"unlock"},u=Math.PI/2;class d extends s.EventDispatcher{constructor(e,t){super(),i(this,"camera"),i(this,"domElement"),i(this,"isLocked"),i(this,"minPolarAngle"),i(this,"maxPolarAngle"),i(this,"pointerSpeed"),i(this,"onMouseMove",(e=>{if(!this.domElement||!1===this.isLocked)return;const t=e.movementX||e.mozMovementX||e.webkitMovementX||0,n=e.movementY||e.mozMovementY||e.webkitMovementY||0;a.setFromQuaternion(this.camera.quaternion),a.y-=.002*t*this.pointerSpeed,a.x-=.002*n*this.pointerSpeed,a.x=Math.max(u-this.maxPolarAngle,Math.min(u-this.minPolarAngle,a.x)),this.camera.quaternion.setFromEuler(a),this.dispatchEvent(l)})),i(this,"onPointerlockChange",(()=>{this.domElement&&(this.domElement.ownerDocument.pointerLockElement===this.domElement?(this.dispatchEvent(c),this.isLocked=!0):(this.dispatchEvent(h),this.isLocked=!1))})),i(this,"onPointerlockError",(()=>{console.error("THREE.PointerLockControls: Unable to use Pointer Lock API")})),i(this,"connect",(e=>{this.domElement=e||this.domElement,this.domElement&&(this.domElement.ownerDocument.addEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.addEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.addEventListener("pointerlockerror",this.onPointerlockError))})),i(this,"disconnect",(()=>{this.domElement&&(this.domElement.ownerDocument.removeEventListener("mousemove",this.onMouseMove),this.domElement.ownerDocument.removeEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.removeEventListener("pointerlockerror",this.onPointerlockError))})),i(this,"dispose",(()=>{this.disconnect()})),i(this,"getObject",(()=>this.camera)),i(this,"direction",new s.Vector3(0,0,-1)),i(this,"getDirection",(e=>e.copy(this.direction).applyQuaternion(this.camera.quaternion))),i(this,"moveForward",(e=>{o.setFromMatrixColumn(this.camera.matrix,0),o.crossVectors(this.camera.up,o),this.camera.position.addScaledVector(o,e)})),i(this,"moveRight",(e=>{o.setFromMatrixColumn(this.camera.matrix,0),this.camera.position.addScaledVector(o,e)})),i(this,"lock",(()=>{this.domElement&&this.domElement.requestPointerLock()})),i(this,"unlock",(()=>{this.domElement&&this.domElement.ownerDocument.exitPointerLock()})),this.camera=e,this.domElement=t,this.isLocked=!1,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.pointerSpeed=1,t&&this.connect(t)}}t.PointerLockControls=d},63603:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);class a extends s.EventDispatcher{constructor(e,t){super(),i(this,"enabled",!0),i(this,"screen",{left:0,top:0,width:0,height:0}),i(this,"rotateSpeed",1),i(this,"zoomSpeed",1.2),i(this,"panSpeed",.3),i(this,"noRotate",!1),i(this,"noZoom",!1),i(this,"noPan",!1),i(this,"staticMoving",!1),i(this,"dynamicDampingFactor",.2),i(this,"minDistance",0),i(this,"maxDistance",1/0),i(this,"keys",["KeyA","KeyS","KeyD"]),i(this,"mouseButtons",{LEFT:s.MOUSE.ROTATE,MIDDLE:s.MOUSE.DOLLY,RIGHT:s.MOUSE.PAN}),i(this,"object"),i(this,"domElement"),i(this,"cursorZoom",!1),i(this,"target",new s.Vector3),i(this,"mousePosition",new s.Vector2),i(this,"STATE",{NONE:-1,ROTATE:0,ZOOM:1,PAN:2,TOUCH_ROTATE:3,TOUCH_ZOOM_PAN:4}),i(this,"EPS",1e-6),i(this,"lastZoom",1),i(this,"lastPosition",new s.Vector3),i(this,"cursorVector",new s.Vector3),i(this,"targetVector",new s.Vector3),i(this,"_state",this.STATE.NONE),i(this,"_keyState",this.STATE.NONE),i(this,"_eye",new s.Vector3),i(this,"_movePrev",new s.Vector2),i(this,"_moveCurr",new s.Vector2),i(this,"_lastAxis",new s.Vector3),i(this,"_lastAngle",0),i(this,"_zoomStart",new s.Vector2),i(this,"_zoomEnd",new s.Vector2),i(this,"_touchZoomDistanceStart",0),i(this,"_touchZoomDistanceEnd",0),i(this,"_panStart",new s.Vector2),i(this,"_panEnd",new s.Vector2),i(this,"target0"),i(this,"position0"),i(this,"up0"),i(this,"zoom0"),i(this,"changeEvent",{type:"change"}),i(this,"startEvent",{type:"start"}),i(this,"endEvent",{type:"end"}),i(this,"onScreenVector",new s.Vector2),i(this,"getMouseOnScreen",((e,t)=>(this.onScreenVector.set((e-this.screen.left)/this.screen.width,(t-this.screen.top)/this.screen.height),this.onScreenVector))),i(this,"onCircleVector",new s.Vector2),i(this,"getMouseOnCircle",((e,t)=>(this.onCircleVector.set((e-.5*this.screen.width-this.screen.left)/(.5*this.screen.width),(this.screen.height+2*(this.screen.top-t))/this.screen.width),this.onCircleVector))),i(this,"axis",new s.Vector3),i(this,"quaternion",new s.Quaternion),i(this,"eyeDirection",new s.Vector3),i(this,"objectUpDirection",new s.Vector3),i(this,"objectSidewaysDirection",new s.Vector3),i(this,"moveDirection",new s.Vector3),i(this,"angle",0),i(this,"rotateCamera",(()=>{this.moveDirection.set(this._moveCurr.x-this._movePrev.x,this._moveCurr.y-this._movePrev.y,0),this.angle=this.moveDirection.length(),this.angle?(this._eye.copy(this.object.position).sub(this.target),this.eyeDirection.copy(this._eye).normalize(),this.objectUpDirection.copy(this.object.up).normalize(),this.objectSidewaysDirection.crossVectors(this.objectUpDirection,this.eyeDirection).normalize(),this.objectUpDirection.setLength(this._moveCurr.y-this._movePrev.y),this.objectSidewaysDirection.setLength(this._moveCurr.x-this._movePrev.x),this.moveDirection.copy(this.objectUpDirection.add(this.objectSidewaysDirection)),this.axis.crossVectors(this.moveDirection,this._eye).normalize(),this.angle*=this.rotateSpeed,this.quaternion.setFromAxisAngle(this.axis,this.angle),this._eye.applyQuaternion(this.quaternion),this.object.up.applyQuaternion(this.quaternion),this._lastAxis.copy(this.axis),this._lastAngle=this.angle):!this.staticMoving&&this._lastAngle&&(this._lastAngle*=Math.sqrt(1-this.dynamicDampingFactor),this._eye.copy(this.object.position).sub(this.target),this.quaternion.setFromAxisAngle(this._lastAxis,this._lastAngle),this._eye.applyQuaternion(this.quaternion),this.object.up.applyQuaternion(this.quaternion)),this._movePrev.copy(this._moveCurr)})),i(this,"zoomCamera",(()=>{let e;if(this._state===this.STATE.TOUCH_ZOOM_PAN)e=this._touchZoomDistanceStart/this._touchZoomDistanceEnd,this._touchZoomDistanceStart=this._touchZoomDistanceEnd,this.object.isPerspectiveCamera?this._eye.multiplyScalar(e):this.object.isOrthographicCamera?(this.object.zoom/=e,this.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type");else{if(e=1+(this._zoomEnd.y-this._zoomStart.y)*this.zoomSpeed,Math.abs(e-1)>this.EPS&&e>0&&(this.object.isPerspectiveCamera?(e>1&&this._eye.length()>=this.maxDistance-this.EPS&&(e=1),this._eye.multiplyScalar(e)):this.object.isOrthographicCamera?(e>1&&this.object.zoom{if(this.domElement&&(this.mouseChange.copy(this._panEnd).sub(this._panStart),this.mouseChange.lengthSq()>this.EPS)){if(this.object.isOrthographicCamera){const e=this.object,t=(e.right-e.left)/this.object.zoom,n=(e.top-e.bottom)/this.object.zoom;this.mouseChange.x*=t,this.mouseChange.y*=n}else this.mouseChange.multiplyScalar(this._eye.length()*this.panSpeed);this.pan.copy(this._eye).cross(this.object.up).setLength(this.mouseChange.x),this.pan.add(this.objectUp.copy(this.object.up).setLength(this.mouseChange.y)),this.object.position.add(this.pan),this.target.add(this.pan),this.staticMoving?this._panStart.copy(this._panEnd):this._panStart.add(this.mouseChange.subVectors(this._panEnd,this._panStart).multiplyScalar(this.dynamicDampingFactor))}})),i(this,"checkDistances",(()=>{this.noZoom&&this.noPan||(this._eye.lengthSq()>this.maxDistance*this.maxDistance&&(this.object.position.addVectors(this.target,this._eye.setLength(this.maxDistance)),this._zoomStart.copy(this._zoomEnd)),this._eye.lengthSq(){if(!this.domElement)return;const e=this.domElement.getBoundingClientRect(),t=this.domElement.ownerDocument.documentElement;this.screen.left=e.left+window.pageXOffset-t.clientLeft,this.screen.top=e.top+window.pageYOffset-t.clientTop,this.screen.width=e.width,this.screen.height=e.height})),i(this,"update",(()=>{this._eye.subVectors(this.object.position,this.target),this.noRotate||this.rotateCamera(),this.noZoom||this.zoomCamera(),this.noPan||this.panCamera(),this.object.position.addVectors(this.target,this._eye),this.object.isPerspectiveCamera?(this.checkDistances(),this.object.lookAt(this.target),this.lastPosition.distanceToSquared(this.object.position)>this.EPS&&(this.dispatchEvent(this.changeEvent),this.lastPosition.copy(this.object.position))):this.object.isOrthographicCamera?(this.object.lookAt(this.target),(this.lastPosition.distanceToSquared(this.object.position)>this.EPS||this.lastZoom!==this.object.zoom)&&(this.dispatchEvent(this.changeEvent),this.lastPosition.copy(this.object.position),this.lastZoom=this.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")})),i(this,"reset",(()=>{this._state=this.STATE.NONE,this._keyState=this.STATE.NONE,this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.up.copy(this.up0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this._eye.subVectors(this.object.position,this.target),this.object.lookAt(this.target),this.dispatchEvent(this.changeEvent),this.lastPosition.copy(this.object.position),this.lastZoom=this.object.zoom})),i(this,"keydown",(e=>{!1!==this.enabled&&(window.removeEventListener("keydown",this.keydown),this._keyState===this.STATE.NONE&&(e.code!==this.keys[this.STATE.ROTATE]||this.noRotate?e.code!==this.keys[this.STATE.ZOOM]||this.noZoom?e.code!==this.keys[this.STATE.PAN]||this.noPan||(this._keyState=this.STATE.PAN):this._keyState=this.STATE.ZOOM:this._keyState=this.STATE.ROTATE))})),i(this,"onPointerDown",(e=>{if(!1!==this.enabled)switch(e.pointerType){case"mouse":case"pen":this.onMouseDown(e)}})),i(this,"onPointerMove",(e=>{if(!1!==this.enabled)switch(e.pointerType){case"mouse":case"pen":this.onMouseMove(e)}})),i(this,"onPointerUp",(e=>{if(!1!==this.enabled)switch(e.pointerType){case"mouse":case"pen":this.onMouseUp()}})),i(this,"keyup",(()=>{!1!==this.enabled&&(this._keyState=this.STATE.NONE,window.addEventListener("keydown",this.keydown))})),i(this,"onMouseDown",(e=>{if(!this.domElement)return;if(this._state===this.STATE.NONE)switch(e.button){case this.mouseButtons.LEFT:this._state=this.STATE.ROTATE;break;case this.mouseButtons.MIDDLE:this._state=this.STATE.ZOOM;break;case this.mouseButtons.RIGHT:this._state=this.STATE.PAN}const t=this._keyState!==this.STATE.NONE?this._keyState:this._state;t!==this.STATE.ROTATE||this.noRotate?t!==this.STATE.ZOOM||this.noZoom?t!==this.STATE.PAN||this.noPan||(this._panStart.copy(this.getMouseOnScreen(e.pageX,e.pageY)),this._panEnd.copy(this._panStart)):(this._zoomStart.copy(this.getMouseOnScreen(e.pageX,e.pageY)),this._zoomEnd.copy(this._zoomStart)):(this._moveCurr.copy(this.getMouseOnCircle(e.pageX,e.pageY)),this._movePrev.copy(this._moveCurr)),this.domElement.ownerDocument.addEventListener("pointermove",this.onPointerMove),this.domElement.ownerDocument.addEventListener("pointerup",this.onPointerUp),this.dispatchEvent(this.startEvent)})),i(this,"onMouseMove",(e=>{if(!1===this.enabled)return;const t=this._keyState!==this.STATE.NONE?this._keyState:this._state;t!==this.STATE.ROTATE||this.noRotate?t!==this.STATE.ZOOM||this.noZoom?t!==this.STATE.PAN||this.noPan||this._panEnd.copy(this.getMouseOnScreen(e.pageX,e.pageY)):this._zoomEnd.copy(this.getMouseOnScreen(e.pageX,e.pageY)):(this._movePrev.copy(this._moveCurr),this._moveCurr.copy(this.getMouseOnCircle(e.pageX,e.pageY)))})),i(this,"onMouseUp",(()=>{this.domElement&&!1!==this.enabled&&(this._state=this.STATE.NONE,this.domElement.ownerDocument.removeEventListener("pointermove",this.onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this.onPointerUp),this.dispatchEvent(this.endEvent))})),i(this,"mousewheel",(e=>{if(!1!==this.enabled&&!0!==this.noZoom){switch(e.preventDefault(),e.deltaMode){case 2:this._zoomStart.y-=.025*e.deltaY;break;case 1:this._zoomStart.y-=.01*e.deltaY;break;default:this._zoomStart.y-=25e-5*e.deltaY}this.mousePosition.x=e.offsetX/this.screen.width*2-1,this.mousePosition.y=-e.offsetY/this.screen.height*2+1,this.dispatchEvent(this.startEvent),this.dispatchEvent(this.endEvent)}})),i(this,"touchstart",(e=>{if(!1!==this.enabled){if(e.preventDefault(),1===e.touches.length)this._state=this.STATE.TOUCH_ROTATE,this._moveCurr.copy(this.getMouseOnCircle(e.touches[0].pageX,e.touches[0].pageY)),this._movePrev.copy(this._moveCurr);else{this._state=this.STATE.TOUCH_ZOOM_PAN;const t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY;this._touchZoomDistanceEnd=this._touchZoomDistanceStart=Math.sqrt(t*t+n*n);const r=(e.touches[0].pageX+e.touches[1].pageX)/2,i=(e.touches[0].pageY+e.touches[1].pageY)/2;this._panStart.copy(this.getMouseOnScreen(r,i)),this._panEnd.copy(this._panStart)}this.dispatchEvent(this.startEvent)}})),i(this,"touchmove",(e=>{if(!1!==this.enabled)if(e.preventDefault(),1===e.touches.length)this._movePrev.copy(this._moveCurr),this._moveCurr.copy(this.getMouseOnCircle(e.touches[0].pageX,e.touches[0].pageY));else{const t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY;this._touchZoomDistanceEnd=Math.sqrt(t*t+n*n);const r=(e.touches[0].pageX+e.touches[1].pageX)/2,i=(e.touches[0].pageY+e.touches[1].pageY)/2;this._panEnd.copy(this.getMouseOnScreen(r,i))}})),i(this,"touchend",(e=>{if(!1!==this.enabled){switch(e.touches.length){case 0:this._state=this.STATE.NONE;break;case 1:this._state=this.STATE.TOUCH_ROTATE,this._moveCurr.copy(this.getMouseOnCircle(e.touches[0].pageX,e.touches[0].pageY)),this._movePrev.copy(this._moveCurr)}this.dispatchEvent(this.endEvent)}})),i(this,"contextmenu",(e=>{!1!==this.enabled&&e.preventDefault()})),i(this,"connect",(e=>{e===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.domElement=e,this.domElement.addEventListener("contextmenu",this.contextmenu),this.domElement.addEventListener("pointerdown",this.onPointerDown),this.domElement.addEventListener("wheel",this.mousewheel),this.domElement.addEventListener("touchstart",this.touchstart),this.domElement.addEventListener("touchend",this.touchend),this.domElement.addEventListener("touchmove",this.touchmove),this.domElement.ownerDocument.addEventListener("pointermove",this.onPointerMove),this.domElement.ownerDocument.addEventListener("pointerup",this.onPointerUp),window.addEventListener("keydown",this.keydown),window.addEventListener("keyup",this.keyup),this.handleResize()})),i(this,"dispose",(()=>{this.domElement&&(this.domElement.removeEventListener("contextmenu",this.contextmenu),this.domElement.removeEventListener("pointerdown",this.onPointerDown),this.domElement.removeEventListener("wheel",this.mousewheel),this.domElement.removeEventListener("touchstart",this.touchstart),this.domElement.removeEventListener("touchend",this.touchend),this.domElement.removeEventListener("touchmove",this.touchmove),this.domElement.ownerDocument.removeEventListener("pointermove",this.onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("keydown",this.keydown),window.removeEventListener("keyup",this.keyup))})),this.object=e,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,void 0!==t&&this.connect(t),this.update()}}t.TrackballControls=a},84339:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);class a extends s.Object3D{constructor(e,t){super(),i(this,"isTransformControls",!0),i(this,"visible",!1),i(this,"domElement"),i(this,"raycaster",new s.Raycaster),i(this,"gizmo"),i(this,"plane"),i(this,"tempVector",new s.Vector3),i(this,"tempVector2",new s.Vector3),i(this,"tempQuaternion",new s.Quaternion),i(this,"unit",{X:new s.Vector3(1,0,0),Y:new s.Vector3(0,1,0),Z:new s.Vector3(0,0,1)}),i(this,"pointStart",new s.Vector3),i(this,"pointEnd",new s.Vector3),i(this,"offset",new s.Vector3),i(this,"rotationAxis",new s.Vector3),i(this,"startNorm",new s.Vector3),i(this,"endNorm",new s.Vector3),i(this,"rotationAngle",0),i(this,"cameraPosition",new s.Vector3),i(this,"cameraQuaternion",new s.Quaternion),i(this,"cameraScale",new s.Vector3),i(this,"parentPosition",new s.Vector3),i(this,"parentQuaternion",new s.Quaternion),i(this,"parentQuaternionInv",new s.Quaternion),i(this,"parentScale",new s.Vector3),i(this,"worldPositionStart",new s.Vector3),i(this,"worldQuaternionStart",new s.Quaternion),i(this,"worldScaleStart",new s.Vector3),i(this,"worldPosition",new s.Vector3),i(this,"worldQuaternion",new s.Quaternion),i(this,"worldQuaternionInv",new s.Quaternion),i(this,"worldScale",new s.Vector3),i(this,"eye",new s.Vector3),i(this,"positionStart",new s.Vector3),i(this,"quaternionStart",new s.Quaternion),i(this,"scaleStart",new s.Vector3),i(this,"camera"),i(this,"object"),i(this,"enabled",!0),i(this,"axis",null),i(this,"mode","translate"),i(this,"translationSnap",null),i(this,"rotationSnap",null),i(this,"scaleSnap",null),i(this,"space","world"),i(this,"size",1),i(this,"dragging",!1),i(this,"showX",!0),i(this,"showY",!0),i(this,"showZ",!0),i(this,"changeEvent",{type:"change"}),i(this,"mouseDownEvent",{type:"mouseDown",mode:this.mode}),i(this,"mouseUpEvent",{type:"mouseUp",mode:this.mode}),i(this,"objectChangeEvent",{type:"objectChange"}),i(this,"intersectObjectWithRay",((e,t,n)=>{const r=t.intersectObject(e,!0);for(let i=0;i(this.object=e,this.visible=!0,this))),i(this,"detach",(()=>(this.object=void 0,this.visible=!1,this.axis=null,this))),i(this,"reset",(()=>this.enabled?(this.dragging&&void 0!==this.object&&(this.object.position.copy(this.positionStart),this.object.quaternion.copy(this.quaternionStart),this.object.scale.copy(this.scaleStart),this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent),this.pointStart.copy(this.pointEnd)),this):this)),i(this,"updateMatrixWorld",(()=>{void 0!==this.object&&(this.object.updateMatrixWorld(),null===this.object.parent?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):this.object.parent.matrixWorld.decompose(this.parentPosition,this.parentQuaternion,this.parentScale),this.object.matrixWorld.decompose(this.worldPosition,this.worldQuaternion,this.worldScale),this.parentQuaternionInv.copy(this.parentQuaternion).invert(),this.worldQuaternionInv.copy(this.worldQuaternion).invert()),this.camera.updateMatrixWorld(),this.camera.matrixWorld.decompose(this.cameraPosition,this.cameraQuaternion,this.cameraScale),this.eye.copy(this.cameraPosition).sub(this.worldPosition).normalize(),super.updateMatrixWorld()})),i(this,"pointerHover",(e=>{if(void 0===this.object||!0===this.dragging)return;this.raycaster.setFromCamera(e,this.camera);const t=this.intersectObjectWithRay(this.gizmo.picker[this.mode],this.raycaster);this.axis=t?t.object.name:null})),i(this,"pointerDown",(e=>{if(void 0!==this.object&&!0!==this.dragging&&0===e.button&&null!==this.axis){this.raycaster.setFromCamera(e,this.camera);const t=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(t){let e=this.space;if("scale"===this.mode?e="local":"E"!==this.axis&&"XYZE"!==this.axis&&"XYZ"!==this.axis||(e="world"),"local"===e&&"rotate"===this.mode){const e=this.rotationSnap;"X"===this.axis&&e&&(this.object.rotation.x=Math.round(this.object.rotation.x/e)*e),"Y"===this.axis&&e&&(this.object.rotation.y=Math.round(this.object.rotation.y/e)*e),"Z"===this.axis&&e&&(this.object.rotation.z=Math.round(this.object.rotation.z/e)*e)}this.object.updateMatrixWorld(),this.object.parent&&this.object.parent.updateMatrixWorld(),this.positionStart.copy(this.object.position),this.quaternionStart.copy(this.object.quaternion),this.scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this.worldScaleStart),this.pointStart.copy(t.point).sub(this.worldPositionStart)}this.dragging=!0,this.mouseDownEvent.mode=this.mode,this.dispatchEvent(this.mouseDownEvent)}})),i(this,"pointerMove",(e=>{const t=this.axis,n=this.mode,r=this.object;let i=this.space;if("scale"===n?i="local":"E"!==t&&"XYZE"!==t&&"XYZ"!==t||(i="world"),void 0===r||null===t||!1===this.dragging||-1!==e.button)return;this.raycaster.setFromCamera(e,this.camera);const s=this.intersectObjectWithRay(this.plane,this.raycaster,!0);if(s){if(this.pointEnd.copy(s.point).sub(this.worldPositionStart),"translate"===n)this.offset.copy(this.pointEnd).sub(this.pointStart),"local"===i&&"XYZ"!==t&&this.offset.applyQuaternion(this.worldQuaternionInv),-1===t.indexOf("X")&&(this.offset.x=0),-1===t.indexOf("Y")&&(this.offset.y=0),-1===t.indexOf("Z")&&(this.offset.z=0),"local"===i&&"XYZ"!==t?this.offset.applyQuaternion(this.quaternionStart).divide(this.parentScale):this.offset.applyQuaternion(this.parentQuaternionInv).divide(this.parentScale),r.position.copy(this.offset).add(this.positionStart),this.translationSnap&&("local"===i&&(r.position.applyQuaternion(this.tempQuaternion.copy(this.quaternionStart).invert()),-1!==t.search("X")&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),-1!==t.search("Y")&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),-1!==t.search("Z")&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.position.applyQuaternion(this.quaternionStart)),"world"===i&&(r.parent&&r.position.add(this.tempVector.setFromMatrixPosition(r.parent.matrixWorld)),-1!==t.search("X")&&(r.position.x=Math.round(r.position.x/this.translationSnap)*this.translationSnap),-1!==t.search("Y")&&(r.position.y=Math.round(r.position.y/this.translationSnap)*this.translationSnap),-1!==t.search("Z")&&(r.position.z=Math.round(r.position.z/this.translationSnap)*this.translationSnap),r.parent&&r.position.sub(this.tempVector.setFromMatrixPosition(r.parent.matrixWorld))));else if("scale"===n){if(-1!==t.search("XYZ")){let e=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(e*=-1),this.tempVector2.set(e,e,e)}else this.tempVector.copy(this.pointStart),this.tempVector2.copy(this.pointEnd),this.tempVector.applyQuaternion(this.worldQuaternionInv),this.tempVector2.applyQuaternion(this.worldQuaternionInv),this.tempVector2.divide(this.tempVector),-1===t.search("X")&&(this.tempVector2.x=1),-1===t.search("Y")&&(this.tempVector2.y=1),-1===t.search("Z")&&(this.tempVector2.z=1);r.scale.copy(this.scaleStart).multiply(this.tempVector2),this.scaleSnap&&this.object&&(-1!==t.search("X")&&(this.object.scale.x=Math.round(r.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==t.search("Y")&&(r.scale.y=Math.round(r.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),-1!==t.search("Z")&&(r.scale.z=Math.round(r.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if("rotate"===n){this.offset.copy(this.pointEnd).sub(this.pointStart);const e=20/this.worldPosition.distanceTo(this.tempVector.setFromMatrixPosition(this.camera.matrixWorld));"E"===t?(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this.startNorm.copy(this.pointStart).normalize(),this.endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this.endNorm.cross(this.startNorm).dot(this.eye)<0?1:-1):"XYZE"===t?(this.rotationAxis.copy(this.offset).cross(this.eye).normalize(),this.rotationAngle=this.offset.dot(this.tempVector.copy(this.rotationAxis).cross(this.eye))*e):"X"!==t&&"Y"!==t&&"Z"!==t||(this.rotationAxis.copy(this.unit[t]),this.tempVector.copy(this.unit[t]),"local"===i&&this.tempVector.applyQuaternion(this.worldQuaternion),this.rotationAngle=this.offset.dot(this.tempVector.cross(this.eye).normalize())*e),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),"local"===i&&"E"!==t&&"XYZE"!==t?(r.quaternion.copy(this.quaternionStart),r.quaternion.multiply(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this.parentQuaternionInv),r.quaternion.copy(this.tempQuaternion.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),r.quaternion.multiply(this.quaternionStart).normalize())}this.dispatchEvent(this.changeEvent),this.dispatchEvent(this.objectChangeEvent)}})),i(this,"pointerUp",(e=>{0===e.button&&(this.dragging&&null!==this.axis&&(this.mouseUpEvent.mode=this.mode,this.dispatchEvent(this.mouseUpEvent)),this.dragging=!1,this.axis=null)})),i(this,"getPointer",(e=>{var t;if(this.domElement&&(null==(t=this.domElement.ownerDocument)?void 0:t.pointerLockElement))return{x:0,y:0,button:e.button};{const t=e.changedTouches?e.changedTouches[0]:e,n=this.domElement.getBoundingClientRect();return{x:(t.clientX-n.left)/n.width*2-1,y:-(t.clientY-n.top)/n.height*2+1,button:e.button}}})),i(this,"onPointerHover",(e=>{if(this.enabled)switch(e.pointerType){case"mouse":case"pen":this.pointerHover(this.getPointer(e))}})),i(this,"onPointerDown",(e=>{this.enabled&&this.domElement&&(this.domElement.style.touchAction="none",this.domElement.ownerDocument.addEventListener("pointermove",this.onPointerMove),this.pointerHover(this.getPointer(e)),this.pointerDown(this.getPointer(e)))})),i(this,"onPointerMove",(e=>{this.enabled&&this.pointerMove(this.getPointer(e))})),i(this,"onPointerUp",(e=>{this.enabled&&this.domElement&&(this.domElement.style.touchAction="",this.domElement.ownerDocument.removeEventListener("pointermove",this.onPointerMove),this.pointerUp(this.getPointer(e)))})),i(this,"getMode",(()=>this.mode)),i(this,"setMode",(e=>{this.mode=e})),i(this,"setTranslationSnap",(e=>{this.translationSnap=e})),i(this,"setRotationSnap",(e=>{this.rotationSnap=e})),i(this,"setScaleSnap",(e=>{this.scaleSnap=e})),i(this,"setSize",(e=>{this.size=e})),i(this,"setSpace",(e=>{this.space=e})),i(this,"update",(()=>{console.warn("THREE.TransformControls: update function has no more functionality and therefore has been deprecated.")})),i(this,"connect",(e=>{e===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.domElement=e,this.domElement.addEventListener("pointerdown",this.onPointerDown),this.domElement.addEventListener("pointermove",this.onPointerHover),this.domElement.ownerDocument.addEventListener("pointerup",this.onPointerUp)})),i(this,"dispose",(()=>{var e,t,n,r,i,s;null==(e=this.domElement)||e.removeEventListener("pointerdown",this.onPointerDown),null==(t=this.domElement)||t.removeEventListener("pointermove",this.onPointerHover),null==(r=null==(n=this.domElement)?void 0:n.ownerDocument)||r.removeEventListener("pointermove",this.onPointerMove),null==(s=null==(i=this.domElement)?void 0:i.ownerDocument)||s.removeEventListener("pointerup",this.onPointerUp),this.traverse((e=>{const t=e;t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()}))})),this.domElement=t,this.camera=e,this.gizmo=new o,this.add(this.gizmo),this.plane=new l,this.add(this.plane);const n=(e,t)=>{let n=t;Object.defineProperty(this,e,{get:function(){return void 0!==n?n:t},set:function(t){n!==t&&(n=t,this.plane[e]=t,this.gizmo[e]=t,this.dispatchEvent({type:e+"-changed",value:t}),this.dispatchEvent(this.changeEvent))}}),this[e]=t,this.plane[e]=t,this.gizmo[e]=t};n("camera",this.camera),n("object",this.object),n("enabled",this.enabled),n("axis",this.axis),n("mode",this.mode),n("translationSnap",this.translationSnap),n("rotationSnap",this.rotationSnap),n("scaleSnap",this.scaleSnap),n("space",this.space),n("size",this.size),n("dragging",this.dragging),n("showX",this.showX),n("showY",this.showY),n("showZ",this.showZ),n("worldPosition",this.worldPosition),n("worldPositionStart",this.worldPositionStart),n("worldQuaternion",this.worldQuaternion),n("worldQuaternionStart",this.worldQuaternionStart),n("cameraPosition",this.cameraPosition),n("cameraQuaternion",this.cameraQuaternion),n("pointStart",this.pointStart),n("pointEnd",this.pointEnd),n("rotationAxis",this.rotationAxis),n("rotationAngle",this.rotationAngle),n("eye",this.eye),void 0!==t&&this.connect(t)}}class o extends s.Object3D{constructor(){super(),i(this,"isTransformControlsGizmo",!0),i(this,"type","TransformControlsGizmo"),i(this,"tempVector",new s.Vector3(0,0,0)),i(this,"tempEuler",new s.Euler),i(this,"alignVector",new s.Vector3(0,1,0)),i(this,"zeroVector",new s.Vector3(0,0,0)),i(this,"lookAtMatrix",new s.Matrix4),i(this,"tempQuaternion",new s.Quaternion),i(this,"tempQuaternion2",new s.Quaternion),i(this,"identityQuaternion",new s.Quaternion),i(this,"unitX",new s.Vector3(1,0,0)),i(this,"unitY",new s.Vector3(0,1,0)),i(this,"unitZ",new s.Vector3(0,0,1)),i(this,"gizmo"),i(this,"picker"),i(this,"helper"),i(this,"rotationAxis",new s.Vector3),i(this,"cameraPosition",new s.Vector3),i(this,"worldPositionStart",new s.Vector3),i(this,"worldQuaternionStart",new s.Quaternion),i(this,"worldPosition",new s.Vector3),i(this,"worldQuaternion",new s.Quaternion),i(this,"eye",new s.Vector3),i(this,"camera",null),i(this,"enabled",!0),i(this,"axis",null),i(this,"mode","translate"),i(this,"space","world"),i(this,"size",1),i(this,"dragging",!1),i(this,"showX",!0),i(this,"showY",!0),i(this,"showZ",!0),i(this,"updateMatrixWorld",(()=>{let e=this.space;"scale"===this.mode&&(e="local");const t="local"===e?this.worldQuaternion:this.identityQuaternion;this.gizmo.translate.visible="translate"===this.mode,this.gizmo.rotate.visible="rotate"===this.mode,this.gizmo.scale.visible="scale"===this.mode,this.helper.translate.visible="translate"===this.mode,this.helper.rotate.visible="rotate"===this.mode,this.helper.scale.visible="scale"===this.mode;let n=[];n=n.concat(this.picker[this.mode].children),n=n.concat(this.gizmo[this.mode].children),n=n.concat(this.helper[this.mode].children);for(let r=0;rn&&(e.scale.set(1e-10,1e-10,1e-10),e.visible=!1),"Y"!==e.name&&"XYZY"!==e.name||Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye))>n&&(e.scale.set(1e-10,1e-10,1e-10),e.visible=!1),"Z"!==e.name&&"XYZZ"!==e.name||Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye))>n&&(e.scale.set(1e-10,1e-10,1e-10),e.visible=!1),"XY"===e.name&&Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye)).9&&(e.visible=!1)),"Y"===this.axis&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,0,Math.PI/2)),e.quaternion.copy(t).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitY).applyQuaternion(t).dot(this.eye))>.9&&(e.visible=!1)),"Z"===this.axis&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),e.quaternion.copy(t).multiply(this.tempQuaternion),Math.abs(this.alignVector.copy(this.unitZ).applyQuaternion(t).dot(this.eye))>.9&&(e.visible=!1)),"XYZE"===this.axis&&(this.tempQuaternion.setFromEuler(this.tempEuler.set(0,Math.PI/2,0)),this.alignVector.copy(this.rotationAxis),e.quaternion.setFromRotationMatrix(this.lookAtMatrix.lookAt(this.zeroVector,this.alignVector,this.unitY)),e.quaternion.multiply(this.tempQuaternion),e.visible=this.dragging),"E"===this.axis&&(e.visible=!1)):"START"===e.name?(e.position.copy(this.worldPositionStart),e.visible=this.dragging):"END"===e.name?(e.position.copy(this.worldPosition),e.visible=this.dragging):"DELTA"===e.name?(e.position.copy(this.worldPositionStart),e.quaternion.copy(this.worldQuaternionStart),this.tempVector.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),this.tempVector.applyQuaternion(this.worldQuaternionStart.clone().invert()),e.scale.copy(this.tempVector),e.visible=this.dragging):(e.quaternion.copy(t),this.dragging?e.position.copy(this.worldPositionStart):e.position.copy(this.worldPosition),this.axis&&(e.visible=-1!==this.axis.search(e.name)))}super.updateMatrixWorld()}));const e=new s.MeshBasicMaterial({depthTest:!1,depthWrite:!1,transparent:!0,side:s.DoubleSide,fog:!1,toneMapped:!1}),t=new s.LineBasicMaterial({depthTest:!1,depthWrite:!1,transparent:!0,linewidth:1,fog:!1,toneMapped:!1}),n=e.clone();n.opacity=.15;const r=e.clone();r.opacity=.33;const a=e.clone();a.color.set(16711680);const o=e.clone();o.color.set(65280);const l=e.clone();l.color.set(255);const c=e.clone();c.opacity=.25;const h=c.clone();h.color.set(16776960);const u=c.clone();u.color.set(65535);const d=c.clone();d.color.set(16711935);e.clone().color.set(16776960);const p=t.clone();p.color.set(16711680);const f=t.clone();f.color.set(65280);const m=t.clone();m.color.set(255);const g=t.clone();g.color.set(65535);const A=t.clone();A.color.set(16711935);const v=t.clone();v.color.set(16776960);const y=t.clone();y.color.set(7895160);const x=v.clone();x.opacity=.25;const b=new s.CylinderGeometry(0,.05,.2,12,1,!1),E=new s.BoxGeometry(.125,.125,.125),_=new s.BufferGeometry;_.setAttribute("position",new s.Float32BufferAttribute([0,0,0,1,0,0],3));const S=(e,t)=>{const n=new s.BufferGeometry,r=[];for(let i=0;i<=64*t;++i)r.push(0,Math.cos(i/32*Math.PI)*e,Math.sin(i/32*Math.PI)*e);return n.setAttribute("position",new s.Float32BufferAttribute(r,3)),n},M={X:[[new s.Mesh(b,a),[1,0,0],[0,0,-Math.PI/2],null,"fwd"],[new s.Mesh(b,a),[1,0,0],[0,0,Math.PI/2],null,"bwd"],[new s.Line(_,p)]],Y:[[new s.Mesh(b,o),[0,1,0],null,null,"fwd"],[new s.Mesh(b,o),[0,1,0],[Math.PI,0,0],null,"bwd"],[new s.Line(_,f),null,[0,0,Math.PI/2]]],Z:[[new s.Mesh(b,l),[0,0,1],[Math.PI/2,0,0],null,"fwd"],[new s.Mesh(b,l),[0,0,1],[-Math.PI/2,0,0],null,"bwd"],[new s.Line(_,m),null,[0,-Math.PI/2,0]]],XYZ:[[new s.Mesh(new s.OctahedronGeometry(.1,0),c.clone()),[0,0,0],[0,0,0]]],XY:[[new s.Mesh(new s.PlaneGeometry(.295,.295),h.clone()),[.15,.15,0]],[new s.Line(_,v),[.18,.3,0],null,[.125,1,1]],[new s.Line(_,v),[.3,.18,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new s.Mesh(new s.PlaneGeometry(.295,.295),u.clone()),[0,.15,.15],[0,Math.PI/2,0]],[new s.Line(_,g),[0,.18,.3],[0,0,Math.PI/2],[.125,1,1]],[new s.Line(_,g),[0,.3,.18],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new s.Mesh(new s.PlaneGeometry(.295,.295),d.clone()),[.15,0,.15],[-Math.PI/2,0,0]],[new s.Line(_,A),[.18,0,.3],null,[.125,1,1]],[new s.Line(_,A),[.3,0,.18],[0,-Math.PI/2,0],[.125,1,1]]]},w={X:[[new s.Mesh(new s.CylinderGeometry(.2,0,1,4,1,!1),n),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new s.Mesh(new s.CylinderGeometry(.2,0,1,4,1,!1),n),[0,.6,0]]],Z:[[new s.Mesh(new s.CylinderGeometry(.2,0,1,4,1,!1),n),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new s.Mesh(new s.OctahedronGeometry(.2,0),n)]],XY:[[new s.Mesh(new s.PlaneGeometry(.4,.4),n),[.2,.2,0]]],YZ:[[new s.Mesh(new s.PlaneGeometry(.4,.4),n),[0,.2,.2],[0,Math.PI/2,0]]],XZ:[[new s.Mesh(new s.PlaneGeometry(.4,.4),n),[.2,0,.2],[-Math.PI/2,0,0]]]},C={START:[[new s.Mesh(new s.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],END:[[new s.Mesh(new s.OctahedronGeometry(.01,2),r),null,null,null,"helper"]],DELTA:[[new s.Line((()=>{const e=new s.BufferGeometry;return e.setAttribute("position",new s.Float32BufferAttribute([0,0,0,1,1,1],3)),e})(),r),null,null,null,"helper"]],X:[[new s.Line(_,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new s.Line(_,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new s.Line(_,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},T={X:[[new s.Line(S(1,.5),p)],[new s.Mesh(new s.OctahedronGeometry(.04,0),a),[0,0,.99],null,[1,3,1]]],Y:[[new s.Line(S(1,.5),f),null,[0,0,-Math.PI/2]],[new s.Mesh(new s.OctahedronGeometry(.04,0),o),[0,0,.99],null,[3,1,1]]],Z:[[new s.Line(S(1,.5),m),null,[0,Math.PI/2,0]],[new s.Mesh(new s.OctahedronGeometry(.04,0),l),[.99,0,0],null,[1,3,1]]],E:[[new s.Line(S(1.25,1),x),null,[0,Math.PI/2,0]],[new s.Mesh(new s.CylinderGeometry(.03,0,.15,4,1,!1),x),[1.17,0,0],[0,0,-Math.PI/2],[1,1,.001]],[new s.Mesh(new s.CylinderGeometry(.03,0,.15,4,1,!1),x),[-1.17,0,0],[0,0,Math.PI/2],[1,1,.001]],[new s.Mesh(new s.CylinderGeometry(.03,0,.15,4,1,!1),x),[0,-1.17,0],[Math.PI,0,0],[1,1,.001]],[new s.Mesh(new s.CylinderGeometry(.03,0,.15,4,1,!1),x),[0,1.17,0],[0,0,0],[1,1,.001]]],XYZE:[[new s.Line(S(1,1),y),null,[0,Math.PI/2,0]]]},I={AXIS:[[new s.Line(_,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]]},B={X:[[new s.Mesh(new s.TorusGeometry(1,.1,4,24),n),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new s.Mesh(new s.TorusGeometry(1,.1,4,24),n),[0,0,0],[Math.PI/2,0,0]]],Z:[[new s.Mesh(new s.TorusGeometry(1,.1,4,24),n),[0,0,0],[0,0,-Math.PI/2]]],E:[[new s.Mesh(new s.TorusGeometry(1.25,.1,2,24),n)]],XYZE:[[new s.Mesh(new s.SphereGeometry(.7,10,8),n)]]},R={X:[[new s.Mesh(E,a),[.8,0,0],[0,0,-Math.PI/2]],[new s.Line(_,p),null,null,[.8,1,1]]],Y:[[new s.Mesh(E,o),[0,.8,0]],[new s.Line(_,f),null,[0,0,Math.PI/2],[.8,1,1]]],Z:[[new s.Mesh(E,l),[0,0,.8],[Math.PI/2,0,0]],[new s.Line(_,m),null,[0,-Math.PI/2,0],[.8,1,1]]],XY:[[new s.Mesh(E,h),[.85,.85,0],null,[2,2,.2]],[new s.Line(_,v),[.855,.98,0],null,[.125,1,1]],[new s.Line(_,v),[.98,.855,0],[0,0,Math.PI/2],[.125,1,1]]],YZ:[[new s.Mesh(E,u),[0,.85,.85],null,[.2,2,2]],[new s.Line(_,g),[0,.855,.98],[0,0,Math.PI/2],[.125,1,1]],[new s.Line(_,g),[0,.98,.855],[0,-Math.PI/2,0],[.125,1,1]]],XZ:[[new s.Mesh(E,d),[.85,0,.85],null,[2,.2,2]],[new s.Line(_,A),[.855,0,.98],null,[.125,1,1]],[new s.Line(_,A),[.98,0,.855],[0,-Math.PI/2,0],[.125,1,1]]],XYZX:[[new s.Mesh(new s.BoxGeometry(.125,.125,.125),c.clone()),[1.1,0,0]]],XYZY:[[new s.Mesh(new s.BoxGeometry(.125,.125,.125),c.clone()),[0,1.1,0]]],XYZZ:[[new s.Mesh(new s.BoxGeometry(.125,.125,.125),c.clone()),[0,0,1.1]]]},P={X:[[new s.Mesh(new s.CylinderGeometry(.2,0,.8,4,1,!1),n),[.5,0,0],[0,0,-Math.PI/2]]],Y:[[new s.Mesh(new s.CylinderGeometry(.2,0,.8,4,1,!1),n),[0,.5,0]]],Z:[[new s.Mesh(new s.CylinderGeometry(.2,0,.8,4,1,!1),n),[0,0,.5],[Math.PI/2,0,0]]],XY:[[new s.Mesh(E,n),[.85,.85,0],null,[3,3,.2]]],YZ:[[new s.Mesh(E,n),[0,.85,.85],null,[.2,3,3]]],XZ:[[new s.Mesh(E,n),[.85,0,.85],null,[3,.2,3]]],XYZX:[[new s.Mesh(new s.BoxGeometry(.2,.2,.2),n),[1.1,0,0]]],XYZY:[[new s.Mesh(new s.BoxGeometry(.2,.2,.2),n),[0,1.1,0]]],XYZZ:[[new s.Mesh(new s.BoxGeometry(.2,.2,.2),n),[0,0,1.1]]]},D={X:[[new s.Line(_,r.clone()),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new s.Line(_,r.clone()),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new s.Line(_,r.clone()),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},L=e=>{const t=new s.Object3D;for(let n in e)for(let r=e[n].length;r--;){const i=e[n][r][0].clone(),s=e[n][r][1],a=e[n][r][2],o=e[n][r][3],l=e[n][r][4];i.name=n,i.tag=l,s&&i.position.set(s[0],s[1],s[2]),a&&i.rotation.set(a[0],a[1],a[2]),o&&i.scale.set(o[0],o[1],o[2]),i.updateMatrix();const c=i.geometry.clone();c.applyMatrix4(i.matrix),i.geometry=c,i.renderOrder=1/0,i.position.set(0,0,0),i.rotation.set(0,0,0),i.scale.set(1,1,1),t.add(i)}return t};this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=L(M)),this.add(this.gizmo.rotate=L(T)),this.add(this.gizmo.scale=L(R)),this.add(this.picker.translate=L(w)),this.add(this.picker.rotate=L(B)),this.add(this.picker.scale=L(P)),this.add(this.helper.translate=L(C)),this.add(this.helper.rotate=L(I)),this.add(this.helper.scale=L(D)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}}class l extends s.Mesh{constructor(){super(new s.PlaneGeometry(1e5,1e5,2,2),new s.MeshBasicMaterial({visible:!1,wireframe:!0,side:s.DoubleSide,transparent:!0,opacity:.1,toneMapped:!1})),i(this,"isTransformControlsPlane",!0),i(this,"type","TransformControlsPlane"),i(this,"unitX",new s.Vector3(1,0,0)),i(this,"unitY",new s.Vector3(0,1,0)),i(this,"unitZ",new s.Vector3(0,0,1)),i(this,"tempVector",new s.Vector3),i(this,"dirVector",new s.Vector3),i(this,"alignVector",new s.Vector3),i(this,"tempMatrix",new s.Matrix4),i(this,"identityQuaternion",new s.Quaternion),i(this,"cameraQuaternion",new s.Quaternion),i(this,"worldPosition",new s.Vector3),i(this,"worldQuaternion",new s.Quaternion),i(this,"eye",new s.Vector3),i(this,"axis",null),i(this,"mode","translate"),i(this,"space","world"),i(this,"updateMatrixWorld",(()=>{let e=this.space;switch(this.position.copy(this.worldPosition),"scale"===this.mode&&(e="local"),this.unitX.set(1,0,0).applyQuaternion("local"===e?this.worldQuaternion:this.identityQuaternion),this.unitY.set(0,1,0).applyQuaternion("local"===e?this.worldQuaternion:this.identityQuaternion),this.unitZ.set(0,0,1).applyQuaternion("local"===e?this.worldQuaternion:this.identityQuaternion),this.alignVector.copy(this.unitY),this.mode){case"translate":case"scale":switch(this.axis){case"X":this.alignVector.copy(this.eye).cross(this.unitX),this.dirVector.copy(this.unitX).cross(this.alignVector);break;case"Y":this.alignVector.copy(this.eye).cross(this.unitY),this.dirVector.copy(this.unitY).cross(this.alignVector);break;case"Z":this.alignVector.copy(this.eye).cross(this.unitZ),this.dirVector.copy(this.unitZ).cross(this.alignVector);break;case"XY":this.dirVector.copy(this.unitZ);break;case"YZ":this.dirVector.copy(this.unitX);break;case"XZ":this.alignVector.copy(this.unitZ),this.dirVector.copy(this.unitY);break;case"XYZ":case"E":this.dirVector.set(0,0,0)}break;default:this.dirVector.set(0,0,0)}0===this.dirVector.length()?this.quaternion.copy(this.cameraQuaternion):(this.tempMatrix.lookAt(this.tempVector.set(0,0,0),this.dirVector,this.alignVector),this.quaternion.setFromRotationMatrix(this.tempMatrix)),super.updateMatrixWorld()}))}}t.TransformControls=a,t.TransformControlsGizmo=o,t.TransformControlsPlane=l},3596:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};class o extends s.EventDispatcher{constructor(e,t){super(),i(this,"object"),i(this,"domElement"),i(this,"enabled",!0),i(this,"target",new s.Vector3),i(this,"trackball",!1),i(this,"minDistance",0),i(this,"maxDistance",1/0),i(this,"minZoom",0),i(this,"maxZoom",1/0),i(this,"minPolarAngle",0),i(this,"maxPolarAngle",Math.PI),i(this,"minAzimuthAngle",-1/0),i(this,"maxAzimuthAngle",1/0),i(this,"enableDamping",!1),i(this,"dampingFactor",.05),i(this,"enableZoom",!0),i(this,"zoomSpeed",1),i(this,"enableRotate",!0),i(this,"rotateSpeed",1),i(this,"enablePan",!0),i(this,"panSpeed",1),i(this,"screenSpacePanning",!1),i(this,"keyPanSpeed",7),i(this,"autoRotate",!1),i(this,"autoRotateSpeed",2),i(this,"enableKeys",!0),i(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),i(this,"mouseButtons"),i(this,"touches",{ONE:s.TOUCH.ROTATE,TWO:s.TOUCH.DOLLY_PAN}),i(this,"target0"),i(this,"position0"),i(this,"quaternion0"),i(this,"zoom0"),i(this,"spherical",new s.Spherical),i(this,"sphericalDelta",new s.Spherical),i(this,"changeEvent",{type:"change"}),i(this,"startEvent",{type:"start"}),i(this,"endEvent",{type:"end"}),i(this,"state",a.NONE),i(this,"EPS",1e-6),i(this,"scale",1),i(this,"panOffset",new s.Vector3),i(this,"zoomChanged",!1),i(this,"rotateStart",new s.Vector2),i(this,"rotateEnd",new s.Vector2),i(this,"rotateDelta",new s.Vector2),i(this,"panStart",new s.Vector2),i(this,"panEnd",new s.Vector2),i(this,"panDelta",new s.Vector2),i(this,"dollyStart",new s.Vector2),i(this,"dollyEnd",new s.Vector2),i(this,"dollyDelta",new s.Vector2),i(this,"offset",new s.Vector3),i(this,"lastPosition",new s.Vector3),i(this,"lastQuaternion",new s.Quaternion),i(this,"q",new s.Quaternion),i(this,"v",new s.Vector3),i(this,"vec",new s.Vector3),i(this,"quat"),i(this,"quatInverse"),i(this,"getPolarAngle",(()=>this.spherical.phi)),i(this,"getAzimuthalAngle",(()=>this.spherical.theta)),i(this,"saveState",(()=>{this.target0.copy(this.target),this.position0.copy(this.object.position),this.quaternion0.copy(this.object.quaternion),this.zoom0=this.object.zoom})),i(this,"reset",(()=>{this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.quaternion.copy(this.quaternion0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(this.changeEvent),this.update(),this.state=a.NONE})),i(this,"dispose",(()=>{this.domElement.removeEventListener("contextmenu",this.onContextMenu,!1),this.domElement.removeEventListener("mousedown",this.onMouseDown,!1),this.domElement.removeEventListener("wheel",this.onMouseWheel,!1),this.domElement.removeEventListener("touchstart",this.onTouchStart,!1),this.domElement.removeEventListener("touchend",this.onTouchEnd,!1),this.domElement.removeEventListener("touchmove",this.onTouchMove,!1),document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),this.domElement.removeEventListener("keydown",this.onKeyDown,!1)})),i(this,"update",(()=>{const e=this.object.position;if(this.offset.copy(e).sub(this.target),this.trackball){if(this.sphericalDelta.theta){this.vec.set(0,1,0).applyQuaternion(this.object.quaternion);const e=this.enableDamping?this.dampingFactor:1;this.q.setFromAxisAngle(this.vec,this.sphericalDelta.theta*e),this.object.quaternion.premultiply(this.q),this.offset.applyQuaternion(this.q)}if(this.sphericalDelta.phi){this.vec.set(1,0,0).applyQuaternion(this.object.quaternion);const e=this.enableDamping?this.dampingFactor:1;this.q.setFromAxisAngle(this.vec,this.sphericalDelta.phi*e),this.object.quaternion.premultiply(this.q),this.offset.applyQuaternion(this.q)}this.offset.multiplyScalar(this.scale),this.offset.clampLength(this.minDistance,this.maxDistance)}else this.offset.applyQuaternion(this.quat),this.autoRotate&&this.state===a.NONE&&this.rotateLeft(this.getAutoRotationAngle()),this.spherical.setFromVector3(this.offset),this.enableDamping?(this.spherical.theta+=this.sphericalDelta.theta*this.dampingFactor,this.spherical.phi+=this.sphericalDelta.phi*this.dampingFactor):(this.spherical.theta+=this.sphericalDelta.theta,this.spherical.phi+=this.sphericalDelta.phi),this.spherical.theta=Math.max(this.minAzimuthAngle,Math.min(this.maxAzimuthAngle,this.spherical.theta)),this.spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this.spherical.phi)),this.spherical.makeSafe(),this.spherical.radius*=this.scale,this.spherical.radius=Math.max(this.minDistance,Math.min(this.maxDistance,this.spherical.radius)),this.offset.setFromSpherical(this.spherical),this.offset.applyQuaternion(this.quatInverse);return!0===this.enableDamping?this.target.addScaledVector(this.panOffset,this.dampingFactor):this.target.add(this.panOffset),e.copy(this.target).add(this.offset),!1===this.trackball&&this.object.lookAt(this.target),!0===this.enableDamping?(this.sphericalDelta.theta*=1-this.dampingFactor,this.sphericalDelta.phi*=1-this.dampingFactor,this.panOffset.multiplyScalar(1-this.dampingFactor)):(this.sphericalDelta.set(0,0,0),this.panOffset.set(0,0,0)),this.scale=1,!!(this.zoomChanged||this.lastPosition.distanceToSquared(this.object.position)>this.EPS||8*(1-this.lastQuaternion.dot(this.object.quaternion))>this.EPS)&&(this.dispatchEvent(this.changeEvent),this.lastPosition.copy(this.object.position),this.lastQuaternion.copy(this.object.quaternion),this.zoomChanged=!1,!0)})),i(this,"getAutoRotationAngle",(()=>2*Math.PI/60/60*this.autoRotateSpeed)),i(this,"getZoomScale",(()=>Math.pow(.95,this.zoomSpeed))),i(this,"rotateLeft",(e=>{this.sphericalDelta.theta-=e})),i(this,"rotateUp",(e=>{this.sphericalDelta.phi-=e})),i(this,"panLeft",((e,t)=>{this.v.setFromMatrixColumn(t,0),this.v.multiplyScalar(-e),this.panOffset.add(this.v)})),i(this,"panUp",((e,t)=>{!0===this.screenSpacePanning?this.v.setFromMatrixColumn(t,1):(this.v.setFromMatrixColumn(t,0),this.v.crossVectors(this.object.up,this.v)),this.v.multiplyScalar(e),this.panOffset.add(this.v)})),i(this,"pan",((e,t)=>{const n=this.domElement;if(this.object instanceof s.PerspectiveCamera){const r=this.object.position;this.offset.copy(r).sub(this.target);let i=this.offset.length();i*=Math.tan(this.object.fov/2*Math.PI/180),this.panLeft(2*e*i/n.clientHeight,this.object.matrix),this.panUp(2*t*i/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this.panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this.panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: CameraControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)})),i(this,"dollyIn",(e=>{this.object instanceof s.PerspectiveCamera?this.scale/=e:this.object instanceof s.OrthographicCamera?(this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom*e)),this.object.updateProjectionMatrix(),this.zoomChanged=!0):(console.warn("WARNING: CameraControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)})),i(this,"dollyOut",(e=>{this.object instanceof s.PerspectiveCamera?this.scale*=e:this.object instanceof s.OrthographicCamera?(this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/e)),this.object.updateProjectionMatrix(),this.zoomChanged=!0):(console.warn("WARNING: CameraControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)})),i(this,"handleMouseDownRotate",(e=>{this.rotateStart.set(e.clientX,e.clientY)})),i(this,"handleMouseDownDolly",(e=>{this.dollyStart.set(e.clientX,e.clientY)})),i(this,"handleMouseDownPan",(e=>{this.panStart.set(e.clientX,e.clientY)})),i(this,"handleMouseMoveRotate",(e=>{this.rotateEnd.set(e.clientX,e.clientY),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this.rotateLeft(2*Math.PI*this.rotateDelta.x/t.clientHeight),this.rotateUp(2*Math.PI*this.rotateDelta.y/t.clientHeight),this.rotateStart.copy(this.rotateEnd),this.update()})),i(this,"handleMouseMoveDolly",(e=>{this.dollyEnd.set(e.clientX,e.clientY),this.dollyDelta.subVectors(this.dollyEnd,this.dollyStart),this.dollyDelta.y>0?this.dollyIn(this.getZoomScale()):this.dollyDelta.y<0&&this.dollyOut(this.getZoomScale()),this.dollyStart.copy(this.dollyEnd),this.update()})),i(this,"handleMouseMovePan",(e=>{this.panEnd.set(e.clientX,e.clientY),this.panDelta.subVectors(this.panEnd,this.panStart).multiplyScalar(this.panSpeed),this.pan(this.panDelta.x,this.panDelta.y),this.panStart.copy(this.panEnd),this.update()})),i(this,"handleMouseWheel",(e=>{e.deltaY<0?this.dollyOut(this.getZoomScale()):e.deltaY>0&&this.dollyIn(this.getZoomScale()),this.update()})),i(this,"handleKeyDown",(e=>{let t=!1;switch(e.code){case this.keys.UP:this.pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:this.pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:this.pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:this.pan(-this.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),this.update())})),i(this,"handleTouchStartRotate",(e=>{if(1==e.touches.length)this.rotateStart.set(e.touches[0].pageX,e.touches[0].pageY);else{const t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);this.rotateStart.set(t,n)}})),i(this,"handleTouchStartPan",(e=>{if(1==e.touches.length)this.panStart.set(e.touches[0].pageX,e.touches[0].pageY);else{const t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);this.panStart.set(t,n)}})),i(this,"handleTouchStartDolly",(e=>{const t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(t*t+n*n);this.dollyStart.set(0,r)})),i(this,"handleTouchStartDollyPan",(e=>{this.enableZoom&&this.handleTouchStartDolly(e),this.enablePan&&this.handleTouchStartPan(e)})),i(this,"handleTouchStartDollyRotate",(e=>{this.enableZoom&&this.handleTouchStartDolly(e),this.enableRotate&&this.handleTouchStartRotate(e)})),i(this,"handleTouchMoveRotate",(e=>{if(1==e.touches.length)this.rotateEnd.set(e.touches[0].pageX,e.touches[0].pageY);else{const t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);this.rotateEnd.set(t,n)}this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this.rotateLeft(2*Math.PI*this.rotateDelta.x/t.clientHeight),this.rotateUp(2*Math.PI*this.rotateDelta.y/t.clientHeight),this.rotateStart.copy(this.rotateEnd)})),i(this,"handleTouchMovePan",(e=>{if(1==e.touches.length)this.panEnd.set(e.touches[0].pageX,e.touches[0].pageY);else{const t=.5*(e.touches[0].pageX+e.touches[1].pageX),n=.5*(e.touches[0].pageY+e.touches[1].pageY);this.panEnd.set(t,n)}this.panDelta.subVectors(this.panEnd,this.panStart).multiplyScalar(this.panSpeed),this.pan(this.panDelta.x,this.panDelta.y),this.panStart.copy(this.panEnd)})),i(this,"handleTouchMoveDolly",(e=>{const t=e.touches[0].pageX-e.touches[1].pageX,n=e.touches[0].pageY-e.touches[1].pageY,r=Math.sqrt(t*t+n*n);this.dollyEnd.set(0,r),this.dollyDelta.set(0,Math.pow(this.dollyEnd.y/this.dollyStart.y,this.zoomSpeed)),this.dollyIn(this.dollyDelta.y),this.dollyStart.copy(this.dollyEnd)})),i(this,"handleTouchMoveDollyPan",(e=>{this.enableZoom&&this.handleTouchMoveDolly(e),this.enablePan&&this.handleTouchMovePan(e)})),i(this,"handleTouchMoveDollyRotate",(e=>{this.enableZoom&&this.handleTouchMoveDolly(e),this.enableRotate&&this.handleTouchMoveRotate(e)})),i(this,"onMouseDown",(e=>{if(!1===this.enabled)return;let t;switch(e.preventDefault(),this.domElement.focus?this.domElement.focus():window.focus(),e.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case s.MOUSE.DOLLY:if(!1===this.enableZoom)return;this.handleMouseDownDolly(e),this.state=a.DOLLY;break;case s.MOUSE.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===this.enablePan)return;this.handleMouseDownPan(e),this.state=a.PAN}else{if(!1===this.enableRotate)return;this.handleMouseDownRotate(e),this.state=a.ROTATE}break;case s.MOUSE.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===this.enableRotate)return;this.handleMouseDownRotate(e),this.state=a.ROTATE}else{if(!1===this.enablePan)return;this.handleMouseDownPan(e),this.state=a.PAN}break;default:this.state=a.NONE}this.state!==a.NONE&&(document.addEventListener("mousemove",this.onMouseMove,!1),document.addEventListener("mouseup",this.onMouseUp,!1),this.dispatchEvent(this.startEvent))})),i(this,"onMouseMove",(e=>{if(!1!==this.enabled)switch(e.preventDefault(),this.state){case a.ROTATE:if(!1===this.enableRotate)return;this.handleMouseMoveRotate(e);break;case a.DOLLY:if(!1===this.enableZoom)return;this.handleMouseMoveDolly(e);break;case a.PAN:if(!1===this.enablePan)return;this.handleMouseMovePan(e)}})),i(this,"onMouseUp",(()=>{!1!==this.enabled&&(document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),this.dispatchEvent(this.endEvent),this.state=a.NONE)})),i(this,"onMouseWheel",(e=>{!1===this.enabled||!1===this.enableZoom||this.state!==a.NONE&&this.state!==a.ROTATE||(e.preventDefault(),this.dispatchEvent(this.startEvent),this.handleMouseWheel(e),this.dispatchEvent(this.endEvent))})),i(this,"onKeyDown",(e=>{!1!==this.enabled&&!1!==this.enableKeys&&!1!==this.enablePan&&this.handleKeyDown(e)})),i(this,"onTouchStart",(e=>{if(!1!==this.enabled){switch(e.preventDefault(),e.touches.length){case 1:switch(this.touches.ONE){case s.TOUCH.ROTATE:if(!1===this.enableRotate)return;this.handleTouchStartRotate(e),this.state=a.TOUCH_ROTATE;break;case s.TOUCH.PAN:if(!1===this.enablePan)return;this.handleTouchStartPan(e),this.state=a.TOUCH_PAN;break;default:this.state=a.NONE}break;case 2:switch(this.touches.TWO){case s.TOUCH.DOLLY_PAN:if(!1===this.enableZoom&&!1===this.enablePan)return;this.handleTouchStartDollyPan(e),this.state=a.TOUCH_DOLLY_PAN;break;case s.TOUCH.DOLLY_ROTATE:if(!1===this.enableZoom&&!1===this.enableRotate)return;this.handleTouchStartDollyRotate(e),this.state=a.TOUCH_DOLLY_ROTATE;break;default:this.state=a.NONE}break;default:this.state=a.NONE}this.state!==a.NONE&&this.dispatchEvent(this.startEvent)}})),i(this,"onTouchMove",(e=>{if(!1!==this.enabled)switch(e.preventDefault(),this.state){case a.TOUCH_ROTATE:if(!1===this.enableRotate)return;this.handleTouchMoveRotate(e),this.update();break;case a.TOUCH_PAN:if(!1===this.enablePan)return;this.handleTouchMovePan(e),this.update();break;case a.TOUCH_DOLLY_PAN:if(!1===this.enableZoom&&!1===this.enablePan)return;this.handleTouchMoveDollyPan(e),this.update();break;case a.TOUCH_DOLLY_ROTATE:if(!1===this.enableZoom&&!1===this.enableRotate)return;this.handleTouchMoveDollyRotate(e),this.update();break;default:this.state=a.NONE}})),i(this,"onTouchEnd",(()=>{!1!==this.enabled&&(this.dispatchEvent(this.endEvent),this.state=a.NONE)})),i(this,"onContextMenu",(e=>{!1!==this.enabled&&e.preventDefault()})),void 0===t&&console.warn('THREE.CameraControls: The second parameter "domElement" is now mandatory.'),t instanceof Document&&console.error('THREE.CameraControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=e,this.domElement=t,this.mouseButtons={LEFT:s.MOUSE.ROTATE,MIDDLE:s.MOUSE.DOLLY,RIGHT:s.MOUSE.PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.quaternion0=this.object.quaternion.clone(),this.zoom0=this.object.zoom,this.quat=(new s.Quaternion).setFromUnitVectors(this.object.up,new s.Vector3(0,1,0)),this.quatInverse=this.quat.clone().invert(),this.lastPosition=new s.Vector3,this.lastQuaternion=new s.Quaternion,this.domElement.addEventListener("contextmenu",this.onContextMenu,!1),this.domElement.addEventListener("mousedown",this.onMouseDown,!1),this.domElement.addEventListener("wheel",this.onMouseWheel,!1),this.domElement.addEventListener("touchstart",this.onTouchStart,!1),this.domElement.addEventListener("touchend",this.onTouchEnd,!1),this.domElement.addEventListener("touchmove",this.onTouchMove,!1),this.domElement.addEventListener("keydown",this.onKeyDown,!1),-1===this.domElement.tabIndex&&(this.domElement.tabIndex=0),this.object.lookAt(this.target),this.update(),this.saveState()}handleMouseUp(){}handleTouchEnd(){}}t.CameraControls=o,t.MapControlsExp=class extends o{constructor(e,t){super(e,t),i(this,"mouseButtons"),i(this,"touches"),this.mouseButtons={LEFT:s.MOUSE.PAN,RIGHT:s.MOUSE.ROTATE},this.touches={ONE:s.TOUCH.PAN,TWO:s.TOUCH.DOLLY_ROTATE}}},t.OrbitControlsExp=class extends o{constructor(e,t){super(e,t),i(this,"mouseButtons"),i(this,"touches"),this.mouseButtons={LEFT:s.MOUSE.ROTATE,RIGHT:s.MOUSE.PAN},this.touches={ONE:s.TOUCH.ROTATE,TWO:s.TOUCH.DOLLY_PAN}}},t.STATE=a,t.TrackballControlsExp=class extends o{constructor(e,t){super(e,t),i(this,"trackball"),i(this,"screenSpacePanning"),i(this,"autoRotate"),i(this,"mouseButtons"),i(this,"touches"),this.trackball=!0,this.screenSpacePanning=!0,this.autoRotate=!1,this.mouseButtons={LEFT:s.MOUSE.ROTATE,RIGHT:s.MOUSE.PAN},this.touches={ONE:s.TOUCH.ROTATE,TWO:s.TOUCH.DOLLY_PAN}}}},3752:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(91056),s=n(18051),a=new r.Matrix4,o=new i.CSMFrustum,l=new r.Vector3,c=new r.Box3,h=[],u=[];t.CSM=class{constructor(e){e=e||{},this.camera=e.camera,this.parent=e.parent,this.cascades=e.cascades||3,this.maxFar=e.maxFar||1e5,this.mode=e.mode||"practical",this.shadowMapSize=e.shadowMapSize||2048,this.shadowBias=e.shadowBias||1e-6,this.lightDirection=e.lightDirection||new r.Vector3(1,-1,1).normalize(),this.lightIntensity=e.lightIntensity||1,this.lightNear=e.lightNear||1,this.lightFar=e.lightFar||2e3,this.lightMargin=e.lightMargin||200,this.customSplitsCallback=e.customSplitsCallback,this.fade=!1,this.mainFrustum=new i.CSMFrustum,this.frustums=[],this.breaks=[],this.lights=[],this.shaders=new Map,this.createLights(),this.updateFrustums(),this.injectInclude()}createLights(){for(let e=0;es.distanceTo(r[2])?i[2]:r[2];let o=s.distanceTo(a);if(this.fade){const e=this.camera,t=Math.max(e.far,this.maxFar),r=n.vertices.far[0].z/(t-e.near);o+=.25*Math.pow(r,2)*(t-e.near)}e.left=-o/2,e.right=o/2,e.top=o/2,e.bottom=-o/2,e.updateProjectionMatrix()}}getBreaks(){const e=this.camera,t=Math.min(e.far,this.maxFar);switch(this.breaks.length=0,this.mode){case"uniform":n(this.cascades,e.near,t,this.breaks);break;case"logarithmic":i(this.cascades,e.near,t,this.breaks);break;case"practical":!function(e,t,s,a,o){h.length=0,u.length=0,i(e,t,s,u),n(e,t,s,h);for(let n=1;n{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Matrix4;class s{constructor(e){e=e||{},this.vertices={near:[new r.Vector3,new r.Vector3,new r.Vector3,new r.Vector3],far:[new r.Vector3,new r.Vector3,new r.Vector3,new r.Vector3]},void 0!==e.projectionMatrix&&this.setFromProjectionMatrix(e.projectionMatrix,e.maxFar||1e4)}setFromProjectionMatrix(e,t){const n=0===e.elements[11];return i.copy(e).invert(),this.vertices.near[0].set(1,1,-1),this.vertices.near[1].set(1,-1,-1),this.vertices.near[2].set(-1,-1,-1),this.vertices.near[3].set(-1,1,-1),this.vertices.near.forEach((function(e){e.applyMatrix4(i)})),this.vertices.far[0].set(1,1,1),this.vertices.far[1].set(1,-1,1),this.vertices.far[2].set(-1,-1,1),this.vertices.far[3].set(-1,1,1),this.vertices.far.forEach((function(e){e.applyMatrix4(i);const r=Math.abs(e.z);n?e.z*=Math.min(t/r,1):e.multiplyScalar(Math.min(t/r,1))})),this.vertices}split(e,t){for(;e.length>t.length;)t.push(new s);t.length=e.length;for(let n=0;n{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Group{constructor(e){super(),this.csm=e,this.displayFrustum=!0,this.displayPlanes=!0,this.displayShadowBounds=!0;const t=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new Float32Array(24),i=new r.BufferGeometry;i.setIndex(new r.BufferAttribute(t,1)),i.setAttribute("position",new r.BufferAttribute(n,3,!1));const s=new r.LineSegments(i,new r.LineBasicMaterial);this.add(s),this.frustumLines=s,this.cascadeLines=[],this.cascadePlanes=[],this.shadowLines=[]}updateVisibility(){const e=this.displayFrustum,t=this.displayPlanes,n=this.displayShadowBounds,r=this.frustumLines,i=this.cascadeLines,s=this.cascadePlanes,a=this.shadowLines;for(let o=0,l=i.length;on;)this.remove(l.pop()),this.remove(c.pop()),this.remove(h.pop());for(;l.length{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={lights_fragment_begin:"\nGeometricContext geometry;\n\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n\n#ifdef CLEARCOAT\n\n\tgeometry.clearcoatNormal = clearcoatNormal;\n\n#endif\n\nIncidentLight directLight;\n\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\n\t\tpointLight = pointLights[ i ];\n\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\n\t\tspotLight = spotLights[ i ];\n\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_DIR_LIGHTS > 0) && defined( RE_Direct ) && defined( USE_CSM ) && defined( CSM_CASCADES )\n\n\tDirectionalLight directionalLight;\n\tfloat linearDepth = (vViewPosition.z) / (shadowFar - cameraNear);\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\n\t#if defined( USE_SHADOWMAP ) && defined( CSM_FADE )\n\tvec2 cascade;\n\tfloat cascadeCenter;\n\tfloat closestEdge;\n\tfloat margin;\n\tfloat csmx;\n\tfloat csmy;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t \t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\t\t// NOTE: Depth gets larger away from the camera.\n\t\t\t// cascade.x is closer, cascade.y is further\n\t\t\tcascade = CSM_cascades[ i ];\n\t\t\tcascadeCenter = ( cascade.x + cascade.y ) / 2.0;\n\t\t\tclosestEdge = linearDepth < cascadeCenter ? cascade.x : cascade.y;\n\t\t\tmargin = 0.25 * pow( closestEdge, 2.0 );\n\t\t\tcsmx = cascade.x - margin / 2.0;\n\t\t\tcsmy = cascade.y + margin / 2.0;\n\t\t\tif( linearDepth >= csmx && ( linearDepth < csmy || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 ) ) {\n\n\t\t\t\tfloat dist = min( linearDepth - csmx, csmy - linearDepth );\n\t\t\t\tfloat ratio = clamp( dist / margin, 0.0, 1.0 );\n\n\t\t\t\tvec3 prevColor = directLight.color;\n\t\t\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\t\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\n\t\t\t\tbool shouldFadeLastCascade = UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 && linearDepth > cascadeCenter;\n\t\t\t\tdirectLight.color = mix( prevColor, directLight.color, shouldFadeLastCascade ? ratio : 1.0 );\n\n\t\t\t\tReflectedLight prevLight = reflectedLight;\n\t\t\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t\t\t\tbool shouldBlend = UNROLLED_LOOP_INDEX != CSM_CASCADES - 1 || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 && linearDepth < cascadeCenter;\n\t\t\t\tfloat blendRatio = shouldBlend ? ratio : 1.0;\n\n\t\t\t\treflectedLight.directDiffuse = mix( prevLight.directDiffuse, reflectedLight.directDiffuse, blendRatio );\n\t\t\t\treflectedLight.directSpecular = mix( prevLight.directSpecular, reflectedLight.directSpecular, blendRatio );\n\t\t\t\treflectedLight.indirectDiffuse = mix( prevLight.indirectDiffuse, reflectedLight.indirectDiffuse, blendRatio );\n\t\t\t\treflectedLight.indirectSpecular = mix( prevLight.indirectSpecular, reflectedLight.indirectSpecular, blendRatio );\n\n\t\t\t}\n\t \t#endif\n\n\t}\n\t#pragma unroll_loop_end\n\t#else\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\t\tdirectionalLight = directionalLights[ i ];\n\t\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\n\t\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\t\tif(linearDepth >= CSM_cascades[UNROLLED_LOOP_INDEX].x && linearDepth < CSM_cascades[UNROLLED_LOOP_INDEX].y) directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\n\t\t\tif(linearDepth >= CSM_cascades[UNROLLED_LOOP_INDEX].x && (linearDepth < CSM_cascades[UNROLLED_LOOP_INDEX].y || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1)) RE_Direct( directLight, geometry, material, reflectedLight );\n\n\t\t\t#endif\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n\t#if ( NUM_DIR_LIGHTS > NUM_DIR_LIGHT_SHADOWS)\n\t\t// compute the lights not casting shadows (if any)\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = NUM_DIR_LIGHT_SHADOWS; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\t\tdirectionalLight = directionalLights[ i ];\n\n\t\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n#endif\n\n\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) && !defined( USE_CSM ) && !defined( CSM_CASCADES )\n\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tdirectionalLight = directionalLights[ i ];\n\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\n\tRectAreaLight rectAreaLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if defined( RE_IndirectDiffuse )\n\n\tvec3 iblIrradiance = vec3( 0.0 );\n\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n#endif\n\n#if defined( RE_IndirectSpecular )\n\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n\n#endif\n",getlights_pars_begin:()=>`\n\t\t\t#if defined( USE_CSM ) && defined( CSM_CASCADES )\n\t\t\tuniform vec2 CSM_cascades[CSM_CASCADES];\n\t\t\tuniform float cameraNear;\n\t\t\tuniform float shadowFar;\n\t\t\t#endif\n\n\t\t\t${r.ShaderChunk.lights_pars_begin}\n\t\t`};t.CSMShader=i},7076:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Curve{getPoint(e,t=new r.Vector3){const n=t;e=2*Math.PI*e;const i=-.22*Math.cos(e)-1.28*Math.sin(e)-.44*Math.cos(3*e)-.78*Math.sin(3*e),s=-.1*Math.cos(2*e)-.27*Math.sin(2*e)+.38*Math.cos(4*e)+.46*Math.sin(4*e),a=.7*Math.cos(3*e)-.4*Math.sin(3*e);return n.set(i,s,a).multiplyScalar(20)}}class s extends r.Curve{constructor(e=5){super(),this.scale=e}getPoint(e,t=new r.Vector3){const n=t;e*=2*Math.PI;const i=16*Math.pow(Math.sin(e),3),s=13*Math.cos(e)-5*Math.cos(2*e)-2*Math.cos(3*e)-Math.cos(4*e);return n.set(i,s,0).multiplyScalar(this.scale)}}class a extends r.Curve{constructor(e=70){super(),this.scale=e}getPoint(e,t=new r.Vector3){const n=t;e=4*e*Math.PI;const i=this.scale/2,s=i*(1+Math.cos(e)),a=i*Math.sin(e),o=2*i*Math.sin(e/2);return n.set(s,a,o)}}class o extends r.Curve{getPoint(e,t=new r.Vector3){const n=t;e*=2*Math.PI;const i=50*Math.sin(e),s=Math.cos(e)*(10+50*Math.cos(e)),a=Math.sin(e)*(10+50*Math.cos(e));return n.set(i,s,a)}}class l extends r.Curve{getPoint(e,t=new r.Vector3){const n=t,i=2*Math.PI*e*150/30,s=30*Math.cos(i),a=30*Math.sin(i),o=150*e;return n.set(s,a,o)}}class c extends r.Curve{constructor(e=10){super(),this.scale=e}getPoint(e,t=new r.Vector3){const n=t;e*=2*Math.PI;const i=(2+Math.cos(3*e))*Math.cos(2*e),s=(2+Math.cos(3*e))*Math.sin(2*e),a=Math.sin(3*e);return n.set(i,s,a).multiplyScalar(this.scale)}}class h extends r.Curve{constructor(e=10){super(),this.scale=e}getPoint(e,t=new r.Vector3){const n=t;e*=2*Math.PI;const i=(2+Math.cos(4*e))*Math.cos(3*e),s=(2+Math.cos(4*e))*Math.sin(3*e),a=Math.sin(4*e);return n.set(i,s,a).multiplyScalar(this.scale)}}class u extends r.Curve{constructor(e=10){super(),this.scale=e}getPoint(e,t=new r.Vector3){const n=t;e*=2*Math.PI;const i=(2+Math.cos(5*e))*Math.cos(2*e),s=(2+Math.cos(5*e))*Math.sin(2*e),a=Math.sin(5*e);return n.set(i,s,a).multiplyScalar(this.scale)}}class d extends r.Curve{constructor(e=10){super(),this.scale=e}getPoint(e,t=new r.Vector3){const n=t;e=4*e-2;const i=Math.pow(e,3)-3*e,s=Math.pow(e,4)-4*e*e,a=.2*Math.pow(e,5)-2*e;return n.set(i,s,a).multiplyScalar(this.scale)}}class p extends r.Curve{constructor(e=1){super(),this.scale=e}getPoint(e,t=new r.Vector3){const n=t;e=function(e,t,n){return n*(t-e)+e}(-4,4,e);const i=.4*e*(e*e-7)*(e*e-10),s=Math.pow(e,4)-13*e*e,a=.1*e*(e*e-4)*(e*e-9)*(e*e-12);return n.set(i,s,a).multiplyScalar(this.scale)}}class f extends r.Curve{constructor(e=40){super(),this.scale=e}getPoint(e,t=new r.Vector3){const n=t;e*=2*Math.PI;const i=Math.cos(2*e)*(1+.6*(Math.cos(5*e)+.75*Math.cos(10*e))),s=Math.sin(2*e)*(1+.6*(Math.cos(5*e)+.75*Math.cos(10*e))),a=.35*Math.sin(5*e);return n.set(i,s,a).multiplyScalar(this.scale)}}class m extends r.Curve{constructor(e=40){super(),this.scale=e}getPoint(e,t=new r.Vector3){const n=t,i=e*Math.PI*2,s=Math.cos(2*i)*(1+.45*Math.cos(3*i)+.4*Math.cos(9*i)),a=Math.sin(2*i)*(1+.45*Math.cos(3*i)+.4*Math.cos(9*i)),o=.2*Math.sin(9*i);return n.set(s,a,o).multiplyScalar(this.scale)}}class g extends r.Curve{constructor(e=40){super(),this.scale=e}getPoint(e,t=new r.Vector3){const n=t,i=e*Math.PI*2,s=Math.cos(3*i)*(1+.3*Math.cos(5*i)+.5*Math.cos(10*i)),a=Math.sin(3*i)*(1+.3*Math.cos(5*i)+.5*Math.cos(10*i)),o=.2*Math.sin(20*i);return n.set(s,a,o).multiplyScalar(this.scale)}}class A extends r.Curve{constructor(e=40){super(),this.scale=e}getPoint(e,t=new r.Vector3){const n=t,i=e*Math.PI*2,s=Math.cos(4*i)*(1+.5*(Math.cos(5*i)+.4*Math.cos(20*i))),a=Math.sin(4*i)*(1+.5*(Math.cos(5*i)+.4*Math.cos(20*i))),o=.35*Math.sin(15*i);return n.set(s,a,o).multiplyScalar(this.scale)}}t.CinquefoilKnot=u,t.DecoratedTorusKnot4a=f,t.DecoratedTorusKnot4b=m,t.DecoratedTorusKnot5a=g,t.DecoratedTorusKnot5c=A,t.FigureEightPolynomialKnot=p,t.GrannyKnot=i,t.HeartCurve=s,t.HelixCurve=l,t.KnotCurve=o,t.TorusKnot=h,t.TrefoilKnot=c,t.TrefoilPolynomialKnot=d,t.VivianiCurve=a},64624:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(26272);class s extends r.Curve{constructor(e,t,n,i,s){super(),this.degree=e,this.knots=t,this.controlPoints=[],this.startKnot=i||0,this.endKnot=s||this.knots.length-1;for(let a=0;a{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(26272);t.NURBSSurface=class{constructor(e,t,n,i,s){this.degree1=e,this.degree2=t,this.knots1=n,this.knots2=i,this.controlPoints=[];const a=n.length-e-1,o=i.length-t-1;for(let l=0;l{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);function i(e,t,n){const r=n.length-e-1;if(t>=n[r])return r-1;if(t<=n[e])return e;let i=e,s=r,a=Math.floor((i+s)/2);for(;t=n[a+1];)t=s&&(i[t][0]=i[e][0]/o[c+1][l],r=i[t][0]*o[l][c]);const h=u-1<=c?s-1:n-u;for(let n=l>=-1?1:-l;n<=h;++n)i[t][n]=(i[e][n]-i[e][n-1])/o[c+1][l+n],r+=i[t][n]*o[l+n][c];u<=c&&(i[t][s]=-i[e][s-1]/o[c+1][u],r+=i[t][s]*o[u][c]),a[s][u]=r;const d=e;e=t,t=d}}let h=n;for(let u=1;u<=r;++u){for(let e=0;e<=n;++e)a[u][e]*=h;h*=n-u}return a}function o(e,t,n,s,o){const l=o{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Matrix4,s=new r.Object3D,a=new r.Vector3;class o extends r.EventDispatcher{static createBufferGeometryFromObject(e){let t=new r.BufferGeometry;const n=e.geometry;if(e.isPoints||e.isLine){const e=new r.Float32BufferAttribute(3*n.vertices.length,3),i=new r.Float32BufferAttribute(3*n.colors.length,3);if(t.setAttribute("position",e.copyVector3sArray(n.vertices)),t.setAttribute("color",i.copyColorsArray(n.colors)),n.lineDistances&&n.lineDistances.length===n.vertices.length){const e=new r.Float32BufferAttribute(n.lineDistances.length,1);t.setAttribute("lineDistance",e.copyArray(n.lineDistances))}null!==n.boundingSphere&&(t.boundingSphere=n.boundingSphere.clone()),null!==n.boundingBox&&(t.boundingBox=n.boundingBox.clone())}else e.isMesh&&(t=n.toBufferGeometry());return t}constructor(){super(),this.isGeometry=!0,this.uuid=r.MathUtils.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}applyMatrix4(e){const t=(new r.Matrix3).getNormalMatrix(e);for(let n=0,r=this.vertices.length;n0)for(let r=0;r0&&(this.normalsNeedUpdate=!0)}computeFlatVertexNormals(){this.computeFaceNormals();for(let e=0,t=this.faces.length;e0&&(this.normalsNeedUpdate=!0)}computeMorphNormals(){for(let t=0,n=this.faces.length;t=0;o--){const e=s[o];this.faces.splice(e,1);for(let t=0,n=this.faceVertexUvs.length;t0,a=e.vertexNormals.length>0,o=1!==e.color.r||1!==e.color.g||1!==e.color.b,l=e.vertexColors.length>0;let f=0;if(f=c(f,0,0),f=c(f,1,t),f=c(f,2,r),f=c(f,3,i),f=c(f,4,s),f=c(f,5,a),f=c(f,6,o),f=c(f,7,l),n.push(f),n.push(e.a,e.b,e.c),n.push(e.materialIndex),i){const e=this.faceVertexUvs[0][p];n.push(d(e[0]),d(e[1]),d(e[2]))}if(s&&n.push(h(e.normal)),a){const t=e.vertexNormals;n.push(h(t[0]),h(t[1]),h(t[2]))}if(o&&n.push(u(e.color)),l){const t=e.vertexColors;n.push(u(t[0]),u(t[1]),u(t[2]))}}function c(e,t,n){return n?e|1<0&&(e.data.colors=s),o.length>0&&(e.data.uvs=[o]),e.data.faces=n,e}clone(){return(new o).copy(this)}copy(e){this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=e.name;const t=e.vertices;for(let u=0,d=t.length;u0){const n=new Float32Array(3*e.normals.length);t.setAttribute("normal",new r.BufferAttribute(n,3).copyVector3sArray(e.normals))}if(e.colors.length>0){const n=new Float32Array(3*e.colors.length);t.setAttribute("color",new r.BufferAttribute(n,3).copyColorsArray(e.colors))}if(e.uvs.length>0){const n=new Float32Array(2*e.uvs.length);t.setAttribute("uv",new r.BufferAttribute(n,2).copyVector2sArray(e.uvs))}if(e.uvs2.length>0){const n=new Float32Array(2*e.uvs2.length);t.setAttribute("uv2",new r.BufferAttribute(n,2).copyVector2sArray(e.uvs2))}t.groups=e.groups;for(let i in e.morphTargets){const n=[],s=e.morphTargets[i];for(let e=0,t=s.length;e0){const n=new r.Float32BufferAttribute(4*e.skinIndices.length,4);t.setAttribute("skinIndex",n.copyVector4sArray(e.skinIndices))}if(e.skinWeights.length>0){const n=new r.Float32BufferAttribute(4*e.skinWeights.length,4);t.setAttribute("skinWeight",n.copyVector4sArray(e.skinWeights))}return null!==e.boundingSphere&&(t.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(t.boundingBox=e.boundingBox.clone()),t}computeTangents(){console.error("THREE.Geometry: .computeTangents() has been removed.")}computeLineDistances(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}applyMatrix(e){return console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)}dispose(){this.dispatchEvent({type:"dispose"})}}class l{constructor(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}computeGroups(e){const t=[];let n,r,i;const s=e.faces;for(r=0;r0,a=i[1]&&i[1].length>0,o=e.morphTargets,l=o.length;let c;if(l>0){c=[];for(let e=0;e0){d=[];for(let e=0;e0&&0===t.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(let A=0;A{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.AnaglyphEffect=class{constructor(e,t=512,n=512){this.colorMatrixLeft=(new r.Matrix3).fromArray([.4561,-.0400822,-.0152161,.500484,-.0378246,-.0205971,.176381,-.0157589,-.00546856]),this.colorMatrixRight=(new r.Matrix3).fromArray([-.0434706,.378476,-.0721527,-.0879388,.73364,-.112961,-.00155529,-.0184503,1.2264]);const i=new r.OrthographicCamera(-1,1,1,-1,0,1),s=new r.Scene,a=new r.StereoCamera,o={minFilter:r.LinearFilter,magFilter:r.NearestFilter,format:r.RGBAFormat},l=new r.WebGLRenderTarget(t,n,o),c=new r.WebGLRenderTarget(t,n,o),h=new r.ShaderMaterial({uniforms:{mapLeft:{value:l.texture},mapRight:{value:c.texture},colorMatrixLeft:{value:this.colorMatrixLeft},colorMatrixRight:{value:this.colorMatrixRight}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = vec2( uv.x, uv.y );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D mapLeft;","uniform sampler2D mapRight;","varying vec2 vUv;","uniform mat3 colorMatrixLeft;","uniform mat3 colorMatrixRight;","void main() {","\tvec2 uv = vUv;","\tvec4 colorL = texture2D( mapLeft, uv );","\tvec4 colorR = texture2D( mapRight, uv );","\tvec3 color = clamp(","\t\t\tcolorMatrixLeft * colorL.rgb +","\t\t\tcolorMatrixRight * colorR.rgb, 0., 1. );","\tgl_FragColor = vec4(","\t\t\tcolor.r, color.g, color.b,","\t\t\tmax( colorL.a, colorR.a ) );","\t#include ",`\t#include <${parseInt(r.REVISION.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}>`,"}"].join("\n")}),u=new r.Mesh(new r.PlaneGeometry(2,2),h);s.add(u),this.setSize=function(t,n){e.setSize(t,n);const r=e.getPixelRatio();l.setSize(t*r,n*r),c.setSize(t*r,n*r)},this.render=function(t,n){const r=e.getRenderTarget();!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),null===n.parent&&!0===n.matrixWorldAutoUpdate&&n.updateMatrixWorld(),a.update(n),e.setRenderTarget(l),e.clear(),e.render(t,a.cameraL),e.setRenderTarget(c),e.clear(),e.render(t,a.cameraR),e.setRenderTarget(null),e.render(s,i),e.setRenderTarget(r)},this.dispose=function(){l.dispose(),c.dispose(),u.geometry.dispose(),u.material.dispose()}}}},56419:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.AsciiEffect=class{constructor(e,t=" .:-=+*#%@",n={}){const r=n.resolution||.15,i=n.scale||1,s=n.color||!1,a=n.alpha||!1,o=n.block||!1,l=n.invert||!1,c=n.strResolution||"low";let h,u;const d=document.createElement("div");d.style.cursor="default";const p=document.createElement("table");let f,m,g;d.appendChild(p),this.setSize=function(t,n){h=t,u=n,e.setSize(t,n),function(){f=Math.floor(h*r),m=Math.floor(u*r),b.width=f,b.height=m,g=e.domElement,g.style.backgroundColor&&(p.rows[0].cells[0].style.backgroundColor=g.style.backgroundColor,p.rows[0].cells[0].style.color=g.style.color);p.cellSpacing=0,p.cellPadding=0;const t=p.style;t.whiteSpace="pre",t.margin="0px",t.padding="0px",t.letterSpacing=w+"px",t.fontFamily=y,t.fontSize=S+"px",t.lineHeight=M+"px",t.textAlign="left",t.textDecoration="none"}()},this.render=function(t,n){e.render(t,n),function(e){E.clearRect(0,0,f,m),E.drawImage(x,0,0,f,m);const t=E.getImageData(0,0,f,m).data;let n="";for(let r=0;r"+g+"":g}n+="
"}e.innerHTML=`${n}`}(p)},this.domElement=d;const A=" .,:;i1tfLCG08@".split(""),v=" CGO08@".split(""),y="courier new, monospace",x=e.domElement,b=document.createElement("canvas");if(!b.getContext)return;const E=b.getContext("2d");if(!E.getImageData)return;let _=s?v:A;t&&(_=t);const S=2/r*i,M=2/r*i;let w=0;if("low"==c)switch(i){case 1:w=-1;break;case 2:case 3:w=-2.1;break;case 4:w=-3.1;break;case 5:w=-4.15}if("medium"==c)switch(i){case 1:w=0;break;case 2:w=-1;break;case 3:w=-1.04;break;case 4:case 5:w=-2.1}if("high"==c)switch(i){case 1:case 2:w=0;break;case 3:case 4:case 5:w=-1}}}},76060:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.OutlineEffect=class{constructor(e,t={}){this.enabled=!0;const n=void 0!==t.defaultThickness?t.defaultThickness:.003,i=(new r.Color).fromArray(void 0!==t.defaultColor?t.defaultColor:[0,0,0]),s=void 0!==t.defaultAlpha?t.defaultAlpha:1,a=void 0!==t.defaultKeepAlive&&t.defaultKeepAlive,o={},l={},c={},h={outlineThickness:{value:n},outlineColor:{value:i},outlineAlpha:{value:s}},u=["#include ","#include ","#include ","#include ","#include ","#include ","#include ","#include ","uniform float outlineThickness;","vec4 calculateOutline( vec4 pos, vec3 normal, vec4 skinned ) {","\tfloat thickness = outlineThickness;","\tconst float ratio = 1.0;","\tvec4 pos2 = projectionMatrix * modelViewMatrix * vec4( skinned.xyz + normal, 1.0 );","\tvec4 norm = normalize( pos - pos2 );","\treturn pos + norm * thickness * pos.w * ratio;","}","void main() {","\t#include ","\t#include ","\t#include ","\t#include ","\t#include ","\t#include ","\t#include ","\t#include ","\t#include ","\t#include ","\tvec3 outlineNormal = - objectNormal;","\tgl_Position = calculateOutline( gl_Position, outlineNormal, vec4( transformed, 1.0 ) );","\t#include ","\t#include ","\t#include ","}"].join("\n"),d=["#include ","#include ","#include ","#include ","uniform vec3 outlineColor;","uniform float outlineAlpha;","void main() {","\t#include ","\t#include ","\tgl_FragColor = vec4( outlineColor, outlineAlpha );","\t#include ",`\t#include <${parseInt(r.REVISION.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}>`,"\t#include ","\t#include ","}"].join("\n");function p(e){const t=function(e){let t=o[e.uuid];return void 0===t&&(t={material:new r.ShaderMaterial({type:"OutlineEffect",uniforms:r.UniformsUtils.merge([r.UniformsLib.fog,r.UniformsLib.displacementmap,h]),vertexShader:u,fragmentShader:d,side:r.BackSide}),used:!0,keepAlive:a,count:0},o[e.uuid]=t),t.used=!0,t.material}(e);return l[t.uuid]=e,function(e,t){if("invisible"===e.name)return;const n=t.userData.outlineParameters;e.fog=t.fog,e.toneMapped=t.toneMapped,e.premultipliedAlpha=t.premultipliedAlpha,e.displacementMap=t.displacementMap,void 0!==n?(!1===t.visible?e.visible=!1:e.visible=void 0===n.visible||n.visible,e.transparent=void 0!==n.alpha&&n.alpha<1||t.transparent,void 0!==n.keepAlive&&(o[t.uuid].keepAlive=n.keepAlive)):(e.transparent=t.transparent,e.visible=t.visible);!0!==t.wireframe&&!1!==t.depthTest||(e.visible=!1);t.clippingPlanes&&(e.clipping=!0,e.clippingPlanes=t.clippingPlanes,e.clipIntersection=t.clipIntersection,e.clipShadows=t.clipShadows);e.version=t.version}(t,e),t}function f(e){const t=e.geometry,n=void 0!==t&&void 0!==t.attributes.normal;return!0===e.isMesh&&void 0!==e.material&&!0===n}function m(e){if(!1!==f(e)){if(Array.isArray(e.material))for(let t=0,n=e.material.length;t60&&delete o[n]):(o[n].used=!1,o[n].count=0)}}(),t.matrixWorldAutoUpdate=i,t.background=s,e.autoClear=r,e.shadowMap.enabled=a},this.autoClear=e.autoClear,this.domElement=e.domElement,this.shadowMap=e.shadowMap,this.clear=function(t,n,r){e.clear(t,n,r)},this.getPixelRatio=function(){return e.getPixelRatio()},this.setPixelRatio=function(t){e.setPixelRatio(t)},this.getSize=function(t){return e.getSize(t)},this.setSize=function(t,n,r){e.setSize(t,n,r)},this.setViewport=function(t,n,r,i){e.setViewport(t,n,r,i)},this.setScissor=function(t,n,r,i){e.setScissor(t,n,r,i)},this.setScissorTest=function(t){e.setScissorTest(t)},this.setRenderTarget=function(t){e.setRenderTarget(t)}}}},88592:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.ParallaxBarrierEffect=class{constructor(e){const t=new r.OrthographicCamera(-1,1,1,-1,0,1),n=new r.Scene,i=new r.StereoCamera,s={minFilter:r.LinearFilter,magFilter:r.NearestFilter,format:r.RGBAFormat},a=new r.WebGLRenderTarget(512,512,s),o=new r.WebGLRenderTarget(512,512,s),l=new r.ShaderMaterial({uniforms:{mapLeft:{value:a.texture},mapRight:{value:o.texture}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = vec2( uv.x, uv.y );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D mapLeft;","uniform sampler2D mapRight;","varying vec2 vUv;","void main() {","\tvec2 uv = vUv;","\tif ( ( mod( gl_FragCoord.y, 2.0 ) ) > 1.00 ) {","\t\tgl_FragColor = texture2D( mapLeft, uv );","\t} else {","\t\tgl_FragColor = texture2D( mapRight, uv );","\t}","\t#include ",`\t#include <${parseInt(r.REVISION.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}>`,"}"].join("\n")}),c=new r.Mesh(new r.PlaneGeometry(2,2),l);n.add(c),this.setSize=function(t,n){e.setSize(t,n);const r=e.getPixelRatio();a.setSize(t*r,n*r),o.setSize(t*r,n*r)},this.render=function(r,s){!0===r.matrixWorldAutoUpdate&&r.updateMatrixWorld(),null===s.parent&&!0===s.matrixWorldAutoUpdate&&s.updateMatrixWorld(),i.update(s),e.setRenderTarget(a),e.clear(),e.render(r,i.cameraL),e.setRenderTarget(o),e.clear(),e.render(r,i.cameraR),e.setRenderTarget(null),e.render(n,t)}}}},50196:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.PeppersGhostEffect=class{constructor(e){const t=this;let n,i,s;t.cameraDistance=15,t.reflectFromAbove=!1;const a=new r.PerspectiveCamera,o=new r.PerspectiveCamera,l=new r.PerspectiveCamera,c=new r.PerspectiveCamera,h=new r.Vector3,u=new r.Quaternion,d=new r.Vector3;e.autoClear=!1,this.setSize=function(t,r){n=t/2,t{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.StereoEffect=class{constructor(e){const t=new r.StereoCamera;t.aspect=.5;const n=new r.Vector2;this.setEyeSeparation=function(e){t.eyeSep=e},this.setSize=function(t,n){e.setSize(t,n)},this.render=function(r,i){!0===r.matrixWorldAutoUpdate&&r.updateMatrixWorld(),null===i.parent&&!0===i.matrixWorldAutoUpdate&&i.updateMatrixWorld(),t.update(i),e.getSize(n),e.autoClear&&e.clear(),e.setScissorTest(!0),e.setScissor(0,0,n.width/2,n.height),e.setViewport(0,0,n.width/2,n.height),e.render(r,t.cameraL),e.setScissor(n.width/2,0,n.width/2,n.height),e.setViewport(n.width/2,0,n.width/2,n.height),e.render(r,t.cameraR),e.setScissorTest(!1)}}}},96496:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const i=r(n(48480));t.RoomEnvironment=function(){const e=new i.Scene,t=new i.BoxGeometry;t.deleteAttribute("uv");const n=new i.MeshStandardMaterial({side:i.BackSide}),r=new i.MeshStandardMaterial,s=new i.PointLight(16777215,5,28,2);s.position.set(.418,16.199,.3),e.add(s);const a=new i.Mesh(t,n);a.position.set(-.757,13.219,.717),a.scale.set(31.713,28.305,28.591),e.add(a);const o=new i.Mesh(t,r);o.position.set(-10.906,2.009,1.846),o.rotation.set(0,-.195,0),o.scale.set(2.328,7.905,4.651),e.add(o);const l=new i.Mesh(t,r);l.position.set(-5.607,-.754,-.758),l.rotation.set(0,.994,0),l.scale.set(1.97,1.534,3.955),e.add(l);const c=new i.Mesh(t,r);c.position.set(6.167,.857,7.803),c.rotation.set(0,.561,0),c.scale.set(3.927,6.285,3.687),e.add(c);const h=new i.Mesh(t,r);h.position.set(-2.017,.018,6.124),h.rotation.set(0,.333,0),h.scale.set(2.002,4.566,2.064),e.add(h);const u=new i.Mesh(t,r);u.position.set(2.291,-.756,-2.621),u.rotation.set(0,-.286,0),u.scale.set(1.546,1.552,1.496),e.add(u);const d=new i.Mesh(t,r);d.position.set(-2.193,-.369,-5.547),d.rotation.set(0,.516,0),d.scale.set(3.875,3.487,2.986),e.add(d);const p=new i.Mesh(t,y(50));p.position.set(-16.116,14.37,8.208),p.scale.set(.1,2.428,2.739),e.add(p);const f=new i.Mesh(t,y(50));f.position.set(-16.109,18.021,-8.207),f.scale.set(.1,2.425,2.751),e.add(f);const m=new i.Mesh(t,y(17));m.position.set(14.904,12.198,-1.832),m.scale.set(.15,4.265,6.331),e.add(m);const g=new i.Mesh(t,y(43));g.position.set(-.462,8.89,14.52),g.scale.set(4.38,5.441,.088),e.add(g);const A=new i.Mesh(t,y(20));A.position.set(3.235,11.486,-12.541),A.scale.set(2.5,2,.1),e.add(A);const v=new i.Mesh(t,y(100));function y(e){const t=new i.MeshBasicMaterial;return t.color.setScalar(e),t}return v.position.set(0,20,0),v.scale.set(1,.1,1),e.add(v),e}},12544:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);t.ColladaExporter=class{constructor(){i(this,"options"),i(this,"geometryInfo"),i(this,"materialMap"),i(this,"imageMap"),i(this,"textures"),i(this,"libraryImages"),i(this,"libraryGeometries"),i(this,"libraryEffects"),i(this,"libraryMaterials"),i(this,"canvas"),i(this,"ctx"),i(this,"transMat"),i(this,"getFuncs",["getX","getY","getZ","getW"]),this.options={version:"1.4.1",author:null,textureDirectory:"",upAxis:"Y_UP",unitName:null,unitMeter:null},this.geometryInfo=new WeakMap,this.materialMap=new WeakMap,this.imageMap=new WeakMap,this.textures=[],this.libraryImages=[],this.libraryGeometries=[],this.libraryEffects=[],this.libraryMaterials=[],this.canvas=null,this.ctx=null,this.transMat=null}parse(e,t,n={}){if(this.options={...this.options,...n},null===this.options.upAxis.match(/^[XYZ]_UP$/))return console.error("ColladaExporter: Invalid upAxis: valid values are X_UP, Y_UP or Z_UP."),null;if(null!==this.options.unitName&&null===this.options.unitMeter)return console.error("ColladaExporter: unitMeter needs to be specified if unitName is specified."),null;if(null!==this.options.unitMeter&&null===this.options.unitName)return console.error("ColladaExporter: unitName needs to be specified if unitMeter is specified."),null;if(""!==this.options.textureDirectory&&(this.options.textureDirectory=`${this.options.textureDirectory}/`.replace(/\\/g,"/").replace(/\/+/g,"/")),"1.4.1"!==this.options.version&&"1.5.0"!==this.options.version)return console.warn(`ColladaExporter : Version ${this.options.version} not supported for export. Only 1.4.1 and 1.5.0.`),null;const r=this.processObject(e);let i=`three.js Collada Exporter${null!==this.options.author?`${this.options.author}`:""}${(new Date).toISOString()}${(new Date).toISOString()}Y_UP`;i+=`${this.libraryImages.join("")}`,i+=`${this.libraryEffects.join("")}`,i+=`${this.libraryMaterials.join("")}`,i+=`${this.libraryGeometries.join("")}`,i+=`${r}`,i+='',i+="";const s={data:this.format(i),textures:this.textures};return"function"==typeof t&&requestAnimationFrame((()=>t(s))),s}format(e){var t,n;const r=/^<\//,i=/(\?>$)|(\/>$)/,s=/<[^>]+>[^<]*<\/[^<]+>/,a=(e,t)=>t>0?e+a(e,t-1):"";let o=0;return null!=(n=null==(t=e.match(/(<[^>]+>[^<]+<\/[^<]+>)|(<[^>]+>)/g))?void 0:t.map((e=>{s.test(e)||i.test(e)||!r.test(e)||o--;const t=`${a(" ",o)}${e}`;return s.test(e)||i.test(e)||r.test(e)||o++,t})).join("\n"))?n:""}base64ToBuffer(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0,i=n.length;r`+i.join(" ")}${n.map((e=>``)).join("")}`:""}getTransform(e){return e.updateMatrix(),this.transMat=this.transMat||new s.Matrix4,this.transMat.copy(e.matrix),this.transMat.transpose(),`${this.transMat.toArray().join(" ")}`}processGeometry(e){let t=this.geometryInfo.get(e);if(!t){const n=e;if(!n.isBufferGeometry)throw new Error("THREE.ColladaExporter: Geometry is not of type THREE.BufferGeometry.");const r=`Mesh${this.libraryGeometries.length+1}`,i=n.index?n.index.count*n.index.itemSize:n.attributes.position.count,s=null!=n.groups&&0!==n.groups.length?n.groups:[{start:0,count:i,materialIndex:0}];let a=``;const o=`${r}-position`,l=`${r}-vertices`;a+=this.getAttribute(n.attributes.position,o,["X","Y","Z"],"float"),a+=``;let c=``;if("normal"in n.attributes){const e=`${r}-normal`;a+=this.getAttribute(n.attributes.normal,e,["X","Y","Z"],"float"),c+=``}if("uv"in n.attributes){const e=`${r}-texcoord`;a+=this.getAttribute(n.attributes.uv,e,["S","T"],"float"),c+=``}if("uv2"in n.attributes){const e=`${r}-texcoord2`;a+=this.getAttribute(n.attributes.uv2,e,["S","T"],"float"),c+=``}if("color"in n.attributes){const e=`${r}-color`;a+=this.getAttribute(n.attributes.color,e,["X","Y","Z"],"uint8"),c+=``}let h=null;if(n.index)h=this.attrBufferToArray(n.index);else{h=new Array(i);for(let e=0,t=h.length;e`,a+=c,a+=`

${n.join(" ")}

`,a+=""}a+="
",this.libraryGeometries.push(a),t={meshid:r,bufferGeometry:n},this.geometryInfo.set(e,t)}return t}processTexture(e){let t=this.imageMap.get(e);if(null==t){t=`image-${this.libraryImages.length+1}`;const n="png",r=e.name||t;let i=``;"1.5.0"===this.options.version?i+=`${this.options.textureDirectory}${r}.${n}`:i+=`${this.options.textureDirectory}${r}.${n}`,i+="",this.libraryImages.push(i),this.imageMap.set(e,t),this.textures.push({directory:this.options.textureDirectory,name:r,ext:n,data:this.imageToData(e.image,n),original:e})}return t}processMaterial(e){let t=this.materialMap.get(e);if(null==t){t=`Mat${this.libraryEffects.length+1}`;let n="phong";if(e instanceof s.MeshLambertMaterial?n="lambert":e instanceof s.MeshBasicMaterial&&(n="constant",null!==e.map&&console.warn("ColladaExporter: Texture maps not supported with MeshBasicMaterial.")),e instanceof s.MeshPhongMaterial){const r=e.emissive?e.emissive:new s.Color(0,0,0),i=e.color?e.color:new s.Color(0,0,0),a=e.specular?e.specular:new s.Color(1,1,1),o=e.shininess||0,l=e.reflectivity||0;let c="";e.transparent&&(c+=`${e.map?'':"1"}`,e.opacity<1&&(c+=`${e.opacity}`));const h=`<${n}>${e.emissiveMap?'':`${r.r} ${r.g} ${r.b} 1`}${"constant"!==n?`${e.map?'':`${i.r} ${i.g} ${i.b} 1`}`:""}${"constant"!==n?`${e.normalMap?'':""}`:""}${"phong"===n?`${a.r} ${a.g} ${a.b} 1${e.specularMap?'':`${o}`}`:""}${i.r} ${i.g} ${i.b} 1${l}${c}`,u=`${e.map?`${this.processTexture(e.map)}diffuse-surface`:""}${e.specularMap?`${this.processTexture(e.specularMap)}specular-surface`:""}${e.emissiveMap?`${this.processTexture(e.emissiveMap)}emissive-surface`:""}${e.normalMap?`${this.processTexture(e.normalMap)}bump-surface`:""}${h}${e.side===s.DoubleSide?'1':""}`,d=``;this.libraryMaterials.push(d),this.libraryEffects.push(u),this.materialMap.set(e,t)}}return t}processObject(e){let t=``;t+=this.getTransform(e);if((new s.Mesh).geometry,e instanceof s.Mesh&&e.isMesh&&null!==e.geometry){const n=this.processGeometry(e.geometry),r=n.meshid,i=n.bufferGeometry;let a,o=null;const l=e.material||new s.MeshBasicMaterial,c=Array.isArray(l)?l:[l];a=i.groups.length>c.length?new Array(i.groups.length):new Array(c.length),o=a.fill(null).map(((e,t)=>this.processMaterial(c[t%c.length]))),t+=``+(null!=o?`${o.map(((e,t)=>``)).join("")}`:"")+""}return e.children.forEach((e=>t+=this.processObject(e))),t+="",t}}},87408:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=class{parse(e,t={decodeSpeed:5,encodeSpeed:5,encoderMethod:a.MESH_EDGEBREAKER_ENCODING,quantization:[16,8,8,8,8],exportUvs:!0,exportNormals:!0,exportColor:!1}){if(e instanceof s.BufferGeometry&&e.isBufferGeometry)throw new Error("DRACOExporter: The first parameter of parse() is now an instance of Mesh or Points.");if(void 0===DracoEncoderModule)throw new Error("THREE.DRACOExporter: required the draco_encoder to work.");const n=e.geometry,r=DracoEncoderModule(),i=new r.Encoder;let o,l;if(!n.isBufferGeometry)throw new Error("THREE.DRACOExporter.parse(geometry, options): geometry is not a THREE.BufferGeometry instance.");if(e instanceof s.Mesh&&e.isMesh){o=new r.MeshBuilder,l=new r.Mesh;const e=n.getAttribute("position");o.AddFloatAttributeToMesh(l,r.POSITION,e.count,e.itemSize,e.array);const i=n.getIndex();if(null!==i)o.AddFacesToMesh(l,i.count/3,i.array);else{const t=new(e.count>65535?Uint32Array:Uint16Array)(e.count);for(let e=0;e{"use strict";var r=Object.defineProperty;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const i=n(48480),s=n(26840);async function a(e){const t=await e.arrayBuffer(),n=btoa(String.fromCharCode(...new Uint8Array(t)));return`data:${e.type||""};base64,${n}`}let o,l,c,h;function u(e,t=1/0,n=null){l||(l=new i.PlaneGeometry(2,2,1,1)),c||(c=new i.ShaderMaterial({uniforms:{blitTexture:new i.Uniform(e)},vertexShader:"\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = vec4(position.xy * 1.0,0.,.999999);\n }\n ",fragmentShader:"\n uniform sampler2D blitTexture; \n varying vec2 vUv;\n\n void main(){ \n gl_FragColor = vec4(vUv.xy, 0, 1);\n \n #ifdef IS_SRGB\n gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) );\n #else\n gl_FragColor = texture2D( blitTexture, vUv);\n #endif\n }\n "})),c.uniforms.blitTexture.value=e,c.defines.IS_SRGB="colorSpace"in e?"srgb"===e.colorSpace:3001===e.encoding,c.needsUpdate=!0,h||(h=new i.Mesh(l,c),h.frustrumCulled=!1);const r=new i.PerspectiveCamera,s=new i.Scene;s.add(h),n||(n=o=new i.WebGLRenderer({antialias:!1})),n.setSize(Math.min(e.image.width,t),Math.min(e.image.height,t)),n.clear(),n.render(s,r);const a=new i.Texture(n.domElement);return a.minFilter=e.minFilter,a.magFilter=e.magFilter,a.wrapS=e.wrapS,a.wrapT=e.wrapT,a.name=e.name,o&&(o.dispose(),o=null),a}const d={POSITION:["byte","byte normalized","unsigned byte","unsigned byte normalized","short","short normalized","unsigned short","unsigned short normalized"],NORMAL:["byte normalized","short normalized"],TANGENT:["byte normalized","short normalized"],TEXCOORD:["byte","byte normalized","unsigned byte","short","short normalized","unsigned short"]};class p{constructor(){this.pluginCallbacks=[],this.register((function(e){return new Y(e)})),this.register((function(e){return new q(e)})),this.register((function(e){return new Z(e)})),this.register((function(e){return new $(e)})),this.register((function(e){return new ee(e)})),this.register((function(e){return new te(e)})),this.register((function(e){return new K(e)})),this.register((function(e){return new J(e)})),this.register((function(e){return new ne(e)})),this.register((function(e){return new re(e)})),this.register((function(e){return new ie(e)}))}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,r){const i=new X,s=[];for(let a=0,o=this.pluginCallbacks.length;a{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(p,"symbol"!=typeof(f="Utils")?f+"":f,{insertKeyframe:function(e,t){const n=.001,r=e.getValueSize(),i=new e.TimeBufferType(e.times.length+1),s=new e.ValueBufferType(e.values.length+r),a=e.createInterpolant(new e.ValueBufferType(r));let o;if(0===e.times.length){i[0]=t;for(let e=0;ee.times[e.times.length-1]){if(Math.abs(e.times[e.times.length-1]-t)t){i.set(e.times.slice(0,l+1),0),i[l+1]=t,i.set(e.times.slice(l+1),l+2),s.set(e.values.slice(0,(l+1)*r),0),s.set(a.evaluate(t),(l+1)*r),s.set(e.values.slice((l+1)*r),(l+2)*r),o=l+1;break}}return e.times=i,e.values=s,o},mergeMorphTargetTracks:function(e,t){const n=[],r={},s=e.tracks;for(let a=0;ae.toBlob(n,t)));let n;return"image/jpeg"===t?n=.92:"image/webp"===t&&(n=.8),e.convertToBlob({type:t,quality:n})}class X{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.extensionsRequired={},this.uids=new Map,this.uid=0,this.json={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(e){this.plugins=e}async write(e,t,n={}){this.options=Object.assign({binary:!1,trs:!1,onlyVisible:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},n),this.options.animations.length>0&&(this.options.trs=!0),this.processInput(e),await Promise.all(this.pending);const r=this,i=r.buffers,s=r.json;n=r.options;const o=r.extensionsUsed,l=r.extensionsRequired,c=new Blob(i,{type:"application/octet-stream"}),h=Object.keys(o),u=Object.keys(l);h.length>0&&(s.extensionsUsed=h),u.length>0&&(s.extensionsRequired=u),s.buffers&&s.buffers.length>0&&(s.buffers[0].byteLength=c.size),!0===n.binary?c.arrayBuffer().then((e=>{const n=H(e),r=new DataView(new ArrayBuffer(8));r.setUint32(0,n.byteLength,!0),r.setUint32(4,5130562,!0);const i=H((a=JSON.stringify(s),(new TextEncoder).encode(a).buffer),32);var a;const o=new DataView(new ArrayBuffer(8));o.setUint32(0,i.byteLength,!0),o.setUint32(4,1313821514,!0);const l=new ArrayBuffer(12),c=new DataView(l);c.setUint32(0,1179937895,!0),c.setUint32(4,2,!0);const h=12+o.byteLength+i.byteLength+r.byteLength+n.byteLength;c.setUint32(8,h,!0);new Blob([l,o,i,r,n],{type:"application/octet-stream"}).arrayBuffer().then(t)})):s.buffers&&s.buffers.length>0?a(c).then((e=>{s.buffers[0].uri=e,t(s)})):t(s)}serializeUserData(e,t){if(0===Object.keys(e.userData).length)return;const n=this.options,r=this.extensionsUsed;try{const i=JSON.parse(JSON.stringify(e.userData));if(n.includeCustomExtensions&&i.gltfExtensions){void 0===t.extensions&&(t.extensions={});for(const e in i.gltfExtensions)t.extensions[e]=i.gltfExtensions[e],r[e]=!0;delete i.gltfExtensions}Object.keys(i).length>0&&(t.extras=i)}catch(i){console.warn("THREE.GLTFExporter: userData of '"+e.name+"' won't be serialized because of JSON.stringify error - "+i.message)}}getUID(e,t=!1){if(!1===this.uids.has(e)){const t=new Map;t.set(!0,this.uid++),t.set(!1,this.uid++),this.uids.set(e,t)}return this.uids.get(e).get(t)}isNormalizedNormalAttribute(e){if(this.cache.attributesNormalized.has(e))return!1;const t=new i.Vector3;for(let n=0,r=e.count;n5e-4)return!1;return!0}createNormalizedNormalAttribute(e){const t=this.cache;if(t.attributesNormalized.has(e))return t.attributesNormalized.get(e);const n=e.clone(),r=new i.Vector3;for(let i=0,s=n.count;i4?r=e.array[d*e.itemSize+n]:(0===n?r=e.getX(d):1===n?r=e.getY(d):2===n?r=e.getZ(d):3===n&&(r=e.getW(d)),!0===e.normalized&&(r=i.MathUtils.normalize(r,e.array))),t===w?c.setFloat32(h,r,!0):t===S?c.setInt32(h,r,!0):t===M?c.setUint32(h,r,!0):t===E?c.setInt16(h,r,!0):t===_?c.setUint16(h,r,!0):t===x?c.setInt8(h,r):t===b&&c.setUint8(h,r),h+=o}const u={buffer:this.processBuffer(c.buffer),byteOffset:this.byteOffset,byteLength:l};void 0!==s&&(u.target=s),s===C&&(u.byteStride=e.itemSize*o),this.byteOffset+=l,a.bufferViews.push(u);return{id:a.bufferViews.length-1,byteLength:0}}processBufferViewImage(e){const t=this,n=t.json;return n.bufferViews||(n.bufferViews=[]),e.arrayBuffer().then((e=>{const r=H(e),i={buffer:t.processBuffer(r),byteOffset:t.byteOffset,byteLength:r.byteLength};return t.byteOffset+=r.byteLength,n.bufferViews.push(i)-1}))}processAccessor(e,t,n,r){const s=this.json;let a;if(e.array.constructor===Float32Array)a=w;else if(e.array.constructor===Int32Array)a=S;else if(e.array.constructor===Uint32Array)a=M;else if(e.array.constructor===Int16Array)a=E;else if(e.array.constructor===Uint16Array)a=_;else if(e.array.constructor===Int8Array)a=x;else{if(e.array.constructor!==Uint8Array)throw new Error("THREE.GLTFExporter: Unsupported bufferAttribute component type: "+e.array.constructor.name);a=b}if(void 0===n&&(n=0),void 0===r&&(r=e.count),0===r)return null;const o=function(e,t,n){const r={min:new Array(e.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(e.itemSize).fill(Number.NEGATIVE_INFINITY)};for(let s=t;s4?n=e.array[s*e.itemSize+t]:(0===t?n=e.getX(s):1===t?n=e.getY(s):2===t?n=e.getZ(s):3===t&&(n=e.getW(s)),!0===e.normalized&&(n=i.MathUtils.normalize(n,e.array))),r.min[t]=Math.min(r.min[t],n),r.max[t]=Math.max(r.max[t],n)}return r}(e,n,r);let l;void 0!==t&&(l=e===t.index?T:C);const c=this.processBufferView(e,a,n,r,l),h={bufferView:c.id,byteOffset:c.byteOffset,componentType:a,count:r,max:o.max,min:o.min,type:{1:"SCALAR",2:"VEC2",3:"VEC3",4:"VEC4",9:"MAT3",16:"MAT4"}[e.itemSize]};return!0===e.normalized&&(h.normalized=!0),s.accessors||(s.accessors=[]),s.accessors.push(h)-1}processImage(e,t,n,r="image/png"){if(null!==e){const s=this,o=s.cache,l=s.json,c=s.options,h=s.pending;o.images.has(e)||o.images.set(e,{});const u=o.images.get(e),d=r+":flipY/"+n.toString();if(void 0!==u[d])return u[d];l.images||(l.images=[]);const p={mimeType:r},f=j();f.width=Math.min(e.width,c.maxTextureSize),f.height=Math.min(e.height,c.maxTextureSize);const m=f.getContext("2d");if(!0===n&&(m.translate(0,f.height),m.scale(1,-1)),void 0!==e.data){t!==i.RGBAFormat&&console.error("GLTFExporter: Only RGBAFormat is supported.",t),(e.width>c.maxTextureSize||e.height>c.maxTextureSize)&&console.warn("GLTFExporter: Image size is bigger than maxTextureSize",e);const n=new Uint8ClampedArray(e.height*e.width*4);for(let t=0;ts.processBufferViewImage(e))).then((e=>{p.bufferView=e}))):void 0!==f.toDataURL?p.uri=f.toDataURL(r):h.push(W(f,r).then(a).then((e=>{p.uri=e})));const g=l.images.push(p)-1;return u[d]=g,g}throw new Error("THREE.GLTFExporter: No valid image data found. Unable to process texture.")}processSampler(e){const t=this.json;t.samplers||(t.samplers=[]);const n={magFilter:k[e.magFilter],minFilter:k[e.minFilter],wrapS:k[e.wrapS],wrapT:k[e.wrapT]};return t.samplers.push(n)-1}processTexture(e){const t=this.options,n=this.cache,r=this.json;if(n.textures.has(e))return n.textures.get(e);r.textures||(r.textures=[]),e instanceof i.CompressedTexture&&(e=u(e,t.maxTextureSize));let s=e.userData.mimeType;"image/webp"===s&&(s="image/png");const a={sampler:this.processSampler(e),source:this.processImage(e.image,e.format,e.flipY,s)};e.name&&(a.name=e.name),this._invokeAll((function(t){t.writeTexture&&t.writeTexture(e,a)}));const o=r.textures.push(a)-1;return n.textures.set(e,o),o}processMaterial(e){const t=this.cache,n=this.json;if(t.materials.has(e))return t.materials.get(e);if(e.isShaderMaterial)return console.warn("GLTFExporter: THREE.ShaderMaterial not supported."),null;n.materials||(n.materials=[]);const r={pbrMetallicRoughness:{}};!0!==e.isMeshStandardMaterial&&!0!==e.isMeshBasicMaterial&&console.warn("GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.");const s=e.color.toArray().concat([e.opacity]);if(Q(s,[1,1,1,1])||(r.pbrMetallicRoughness.baseColorFactor=s),e.isMeshStandardMaterial?(r.pbrMetallicRoughness.metallicFactor=e.metalness,r.pbrMetallicRoughness.roughnessFactor=e.roughness):(r.pbrMetallicRoughness.metallicFactor=.5,r.pbrMetallicRoughness.roughnessFactor=.5),e.metalnessMap||e.roughnessMap){const t=this.buildMetalRoughTexture(e.metalnessMap,e.roughnessMap),n={index:this.processTexture(t),channel:t.channel};this.applyTextureTransform(n,t),r.pbrMetallicRoughness.metallicRoughnessTexture=n}if(e.map){const t={index:this.processTexture(e.map),texCoord:e.map.channel};this.applyTextureTransform(t,e.map),r.pbrMetallicRoughness.baseColorTexture=t}if(e.emissive){const t=e.emissive;if(Math.max(t.r,t.g,t.b)>0&&(r.emissiveFactor=e.emissive.toArray()),e.emissiveMap){const t={index:this.processTexture(e.emissiveMap),texCoord:e.emissiveMap.channel};this.applyTextureTransform(t,e.emissiveMap),r.emissiveTexture=t}}if(e.normalMap){const t={index:this.processTexture(e.normalMap),texCoord:e.normalMap.channel};e.normalScale&&1!==e.normalScale.x&&(t.scale=e.normalScale.x),this.applyTextureTransform(t,e.normalMap),r.normalTexture=t}if(e.aoMap){const t={index:this.processTexture(e.aoMap),texCoord:e.aoMap.channel};1!==e.aoMapIntensity&&(t.strength=e.aoMapIntensity),this.applyTextureTransform(t,e.aoMap),r.occlusionTexture=t}e.transparent?r.alphaMode="BLEND":e.alphaTest>0&&(r.alphaMode="MASK",r.alphaCutoff=e.alphaTest),e.side===i.DoubleSide&&(r.doubleSided=!0),""!==e.name&&(r.name=e.name),this.serializeUserData(e,r),this._invokeAll((function(t){t.writeMaterial&&t.writeMaterial(e,r)}));const a=n.materials.push(r)-1;return t.materials.set(e,a),a}processMesh(e){const t=this.cache,n=this.json,r=[e.geometry.uuid];if(Array.isArray(e.material))for(let i=0,s=e.material.length;i=152?{uv:"TEXCOORD_0",uv1:"TEXCOORD_1",uv2:"TEXCOORD_2",uv3:"TEXCOORD_3"}:{uv:"TEXCOORD_0",uv2:"TEXCOORD_1"},color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},f=o.getAttribute("normal");void 0===f||this.isNormalizedNormalAttribute(f)||(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),o.setAttribute("normal",this.createNormalizedNormalAttribute(f)));let x=null;for(let s in o.attributes){if("morph"===s.slice(0,5))continue;const e=o.attributes[s];s=p[s]||s.toUpperCase();if(/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(s)||(s="_"+s),t.attributes.has(this.getUID(e))){h[s]=t.attributes.get(this.getUID(e));continue}x=null;const n=e.array;"JOINTS_0"!==s||n instanceof Uint16Array||n instanceof Uint8Array||(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),x=new i.BufferAttribute(new Uint16Array(n),e.itemSize,e.normalized));const r=this.processAccessor(x||e,o);null!==r&&(s.startsWith("_")||this.detectMeshQuantization(s,e),h[s]=r,t.attributes.set(this.getUID(e),r))}if(void 0!==f&&o.setAttribute("normal",f),0===Object.keys(h).length)return null;if(void 0!==e.morphTargetInfluences&&e.morphTargetInfluences.length>0){const n=[],r=[],i={};if(void 0!==e.morphTargetDictionary)for(const t in e.morphTargetDictionary)i[e.morphTargetDictionary[t]]=t;for(let s=0;s0&&(c.extras={},c.extras.targetNames=r)}const b=Array.isArray(e.material);if(b&&0===o.groups.length)return null;const E=b?e.material:[e.material],_=b?o.groups:[{materialIndex:0,start:void 0,count:void 0}];for(let i=0,s=_.length;i0&&(e.targets=d),null!==o.index){let n=this.getUID(o.index);void 0===_[i].start&&void 0===_[i].count||(n+=":"+_[i].start+":"+_[i].count),t.attributes.has(n)?e.indices=t.attributes.get(n):(e.indices=this.processAccessor(o.index,o,_[i].start,_[i].count),t.attributes.set(n,e.indices)),null===e.indices&&delete e.indices}const n=this.processMaterial(E[_[i].materialIndex]);null!==n&&(e.material=n),u.push(e)}c.primitives=u,n.meshes||(n.meshes=[]),this._invokeAll((function(t){t.writeMesh&&t.writeMesh(e,c)}));const S=n.meshes.push(c)-1;return t.meshes.set(a,S),S}detectMeshQuantization(e,t){if(this.extensionsUsed[N])return;let n;switch(t.array.constructor){case Int8Array:n="byte";break;case Uint8Array:n="unsigned byte";break;case Int16Array:n="short";break;case Uint16Array:n="unsigned short";break;default:return}t.normalized&&(n+=" normalized");const r=e.split("_",1)[0];d[r]&&d[r].includes(n)&&(this.extensionsUsed[N]=!0,this.extensionsRequired[N]=!0)}processCamera(e){const t=this.json;t.cameras||(t.cameras=[]);const n=e.isOrthographicCamera,r={type:n?"orthographic":"perspective"};return n?r.orthographic={xmag:2*e.right,ymag:2*e.top,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:r.perspective={aspectRatio:e.aspect,yfov:i.MathUtils.degToRad(e.fov),zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},""!==e.name&&(r.name=e.type),t.cameras.push(r)-1}processAnimation(e,t){const n=this.json,r=this.nodeMap;n.animations||(n.animations=[]);const s=(e=p.Utils.mergeMorphTargetTracks(e.clone(),t)).tracks,a=[],o=[];for(let l=0;l0){const t=[];for(let r=0,i=e.children.length;r0&&(i.children=t)}this._invokeAll((function(t){t.writeNode&&t.writeNode(e,i)}));const s=t.nodes.push(i)-1;return r.set(e,s),s}processScene(e){const t=this.json,n=this.options;t.scenes||(t.scenes=[],t.scene=0);const r={};""!==e.name&&(r.name=e.name),t.scenes.push(r);const i=[];for(let s=0,a=e.children.length;s0&&(r.nodes=i),this.serializeUserData(e,r)}processObjects(e){const t=new i.Scene;t.name="AuxScene";for(let n=0;n0&&this.processObjects(n);for(let r=0;r0&&(s.range=e.distance)):e.isSpotLight&&(s.type="spot",e.distance>0&&(s.range=e.distance),s.spot={},s.spot.innerConeAngle=(e.penumbra-1)*e.angle*-1,s.spot.outerConeAngle=e.angle),void 0!==e.decay&&2!==e.decay&&console.warn("THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."),!e.target||e.target.parent===e&&0===e.target.position.x&&0===e.target.position.y&&-1===e.target.position.z||console.warn("THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."),i[this.name]||(r.extensions=r.extensions||{},r.extensions[this.name]={lights:[]},i[this.name]=!0);const a=r.extensions[this.name].lights;a.push(s),t.extensions=t.extensions||{},t.extensions[this.name]={light:a.length-1}}}class q{constructor(e){this.writer=e,this.name="KHR_materials_unlit"}writeMaterial(e,t){if(!e.isMeshBasicMaterial)return;const n=this.writer.extensionsUsed;t.extensions=t.extensions||{},t.extensions[this.name]={},n[this.name]=!0,t.pbrMetallicRoughness.metallicFactor=0,t.pbrMetallicRoughness.roughnessFactor=.9}}class K{constructor(e){this.writer=e,this.name="KHR_materials_clearcoat"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.clearcoat)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.clearcoatFactor=e.clearcoat,e.clearcoatMap){const t={index:n.processTexture(e.clearcoatMap),texCoord:e.clearcoatMap.channel};n.applyTextureTransform(t,e.clearcoatMap),i.clearcoatTexture=t}if(i.clearcoatRoughnessFactor=e.clearcoatRoughness,e.clearcoatRoughnessMap){const t={index:n.processTexture(e.clearcoatRoughnessMap),texCoord:e.clearcoatRoughnessMap.channel};n.applyTextureTransform(t,e.clearcoatRoughnessMap),i.clearcoatRoughnessTexture=t}if(e.clearcoatNormalMap){const t={index:n.processTexture(e.clearcoatNormalMap),texCoord:e.clearcoatNormalMap.channel};n.applyTextureTransform(t,e.clearcoatNormalMap),i.clearcoatNormalTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}}class J{constructor(e){this.writer=e,this.name="KHR_materials_iridescence"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.iridescence)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.iridescenceFactor=e.iridescence,e.iridescenceMap){const t={index:n.processTexture(e.iridescenceMap),texCoord:e.iridescenceMap.channel};n.applyTextureTransform(t,e.iridescenceMap),i.iridescenceTexture=t}if(i.iridescenceIor=e.iridescenceIOR,i.iridescenceThicknessMinimum=e.iridescenceThicknessRange[0],i.iridescenceThicknessMaximum=e.iridescenceThicknessRange[1],e.iridescenceThicknessMap){const t={index:n.processTexture(e.iridescenceThicknessMap),texCoord:e.iridescenceThicknessMap.channel};n.applyTextureTransform(t,e.iridescenceThicknessMap),i.iridescenceThicknessTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}}class Z{constructor(e){this.writer=e,this.name="KHR_materials_transmission"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.transmissionFactor=e.transmission,e.transmissionMap){const t={index:n.processTexture(e.transmissionMap),texCoord:e.transmissionMap.channel};n.applyTextureTransform(t,e.transmissionMap),i.transmissionTexture=t}t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}}class ${constructor(e){this.writer=e,this.name="KHR_materials_volume"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0===e.transmission)return;const n=this.writer,r=n.extensionsUsed,i={};if(i.thicknessFactor=e.thickness,e.thicknessMap){const t={index:n.processTexture(e.thicknessMap),texCoord:e.thicknessMap.channel};n.applyTextureTransform(t,e.thicknessMap),i.thicknessTexture=t}i.attenuationDistance=e.attenuationDistance,i.attenuationColor=e.attenuationColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}}class ee{constructor(e){this.writer=e,this.name="KHR_materials_ior"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||1.5===e.ior)return;const n=this.writer.extensionsUsed,r={};r.ior=e.ior,t.extensions=t.extensions||{},t.extensions[this.name]=r,n[this.name]=!0}}class te{constructor(e){this.writer=e,this.name="KHR_materials_specular"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||1===e.specularIntensity&&e.specularColor.equals(z)&&!e.specularIntensityMap&&!e.specularColorTexture)return;const n=this.writer,r=n.extensionsUsed,i={};if(e.specularIntensityMap){const t={index:n.processTexture(e.specularIntensityMap),texCoord:e.specularIntensityMap.channel};n.applyTextureTransform(t,e.specularIntensityMap),i.specularTexture=t}if(e.specularColorMap){const t={index:n.processTexture(e.specularColorMap),texCoord:e.specularColorMap.channel};n.applyTextureTransform(t,e.specularColorMap),i.specularColorTexture=t}i.specularFactor=e.specularIntensity,i.specularColorFactor=e.specularColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}}class ne{constructor(e){this.writer=e,this.name="KHR_materials_sheen"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0==e.sheen)return;const n=this.writer,r=n.extensionsUsed,i={};if(e.sheenRoughnessMap){const t={index:n.processTexture(e.sheenRoughnessMap),texCoord:e.sheenRoughnessMap.channel};n.applyTextureTransform(t,e.sheenRoughnessMap),i.sheenRoughnessTexture=t}if(e.sheenColorMap){const t={index:n.processTexture(e.sheenColorMap),texCoord:e.sheenColorMap.channel};n.applyTextureTransform(t,e.sheenColorMap),i.sheenColorTexture=t}i.sheenRoughnessFactor=e.sheenRoughness,i.sheenColorFactor=e.sheenColor.toArray(),t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}}class re{constructor(e){this.writer=e,this.name="KHR_materials_anisotropy"}writeMaterial(e,t){if(!e.isMeshPhysicalMaterial||0==e.anisotropy)return;const n=this.writer,r=n.extensionsUsed,i={};if(e.anisotropyMap){const t={index:n.processTexture(e.anisotropyMap)};n.applyTextureTransform(t,e.anisotropyMap),i.anisotropyTexture=t}i.anisotropyStrength=e.anisotropy,i.anisotropyRotation=e.anisotropyRotation,t.extensions=t.extensions||{},t.extensions[this.name]=i,r[this.name]=!0}}class ie{constructor(e){this.writer=e,this.name="KHR_materials_emissive_strength"}writeMaterial(e,t){if(!e.isMeshStandardMaterial||1===e.emissiveIntensity)return;const n=this.writer.extensionsUsed,r={};r.emissiveStrength=e.emissiveIntensity,t.extensions=t.extensions||{},t.extensions[this.name]=r,n[this.name]=!0}}t.GLTFExporter=p},12392:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(79100);t.MMDExporter=class{constructor(){i(this,"u2sTable")}parseVpd(e,t,n){if(!0!==e.isSkinnedMesh)return console.warn("THREE.MMDExporter: parseVpd() requires SkinnedMesh instance."),null;function r(e){Math.abs(e)<1e-6&&(e=0);let t=e.toString();-1===t.indexOf(".")&&(t+="."),t+="000000";const n=t.indexOf(".");return t.slice(0,n)+"."+t.slice(n+1,n+7)}function i(e){const t=[];for(let n=0,i=e.length;n255?(t.push(i>>8&255),t.push(255&i)):t.push(255&i)}return new Uint8Array(t)}getBindBones(e){const t=e.clone();return t.pose(),t.skeleton.bones}}},58936:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);t.OBJExporter=class{constructor(){i(this,"output"),i(this,"indexVertex"),i(this,"indexVertexUvs"),i(this,"indexNormals"),i(this,"vertex"),i(this,"color"),i(this,"normal"),i(this,"uv"),i(this,"face"),this.output="",this.indexVertex=0,this.indexVertexUvs=0,this.indexNormals=0,this.vertex=new s.Vector3,this.color=new s.Color,this.normal=new s.Vector3,this.uv=new s.Vector2,this.face=[]}parse(e){return e.traverse((e=>{e instanceof s.Mesh&&e.isMesh&&this.parseMesh(e),e instanceof s.Line&&e.isLine&&this.parseLine(e),e instanceof s.Points&&e.isPoints&&this.parsePoints(e)})),this.output}parseMesh(e){let t=0,n=0,r=0;const i=e.geometry,a=new s.Matrix3;if(!i.isBufferGeometry)throw new Error("THREE.OBJExporter: Geometry is not of type THREE.BufferGeometry.");const o=i.getAttribute("position"),l=i.getAttribute("normal"),c=i.getAttribute("uv"),h=i.getIndex();if(this.output+=`o ${e.name}\n`,e.material&&!Array.isArray(e.material)&&e.material.name&&(this.output+=`usemtl ${e.material.name}\n`),void 0!==o)for(let s=0,u=o.count;s{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.PLYExporter=class{parse(e,t,n){t&&"object"==typeof t&&(console.warn('THREE.PLYExporter: The options parameter is now the third argument to the "parse" function. See the documentation for the new API.'),n=t,t=void 0);const i=(n=Object.assign({binary:!1,excludeAttributes:[],littleEndian:!1},n)).excludeAttributes;let s=!1,a=!1,o=!1,l=0,c=0;e.traverse((function(e){if(e instanceof r.Mesh&&e.isMesh){const t=e.geometry;if(!t.isBufferGeometry)throw new Error("THREE.PLYExporter: Geometry is not of type THREE.BufferGeometry.");const n=t.getAttribute("position"),r=t.getAttribute("normal"),i=t.getAttribute("uv"),h=t.getAttribute("color"),u=t.getIndex();if(void 0===n)return;l+=n.count,c+=u?u.count/3:n.count/3,void 0!==r&&(s=!0),void 0!==i&&(o=!0),void 0!==h&&(a=!0)}}));const h=-1===(null==i?void 0:i.indexOf("index"));if(s=s&&-1===(null==i?void 0:i.indexOf("normal")),a=a&&-1===(null==i?void 0:i.indexOf("color")),o=o&&-1===(null==i?void 0:i.indexOf("uv")),h&&c!==Math.floor(c))return console.error("PLYExporter: Failed to generate a valid PLY file with triangle indices because the number of indices is not divisible by 3."),null;let u=`ply\nformat ${n.binary?n.littleEndian?"binary_little_endian":"binary_big_endian":"ascii"} 1.0\nelement vertex ${l}\nproperty float x\nproperty float y\nproperty float z\n`;s&&(u+="property float nx\nproperty float ny\nproperty float nz\n"),o&&(u+="property float s\nproperty float t\n"),a&&(u+="property uchar red\nproperty uchar green\nproperty uchar blue\n"),h&&(u+=`element face ${c}\nproperty list uchar int vertex_index\n`),u+="end_header\n";const d=new r.Vector3,p=new r.Matrix3;let f=null;if(n.binary){const t=(new TextEncoder).encode(u),r=l*(12+(s?12:0)+(a?3:0)+(o?8:0)),i=h?13*c:0,m=new DataView(new ArrayBuffer(t.length+r+i));new Uint8Array(m.buffer).set(t,0);let g=t.length,A=t.length+r,v=0;this.traverseMeshes(e,(function(e,t){const r=t.getAttribute("position"),i=t.getAttribute("normal"),l=t.getAttribute("uv"),c=t.getAttribute("color"),u=t.getIndex();p.getNormalMatrix(e.matrixWorld);for(let h=0,f=r.count;ht&&t("string"==typeof f?f:""))),f}traverseMeshes(e,t){e.traverse((function(e){if(e instanceof r.Mesh&&e.isMesh){const n=e,r=n.geometry;if(!r.isBufferGeometry)throw new Error("THREE.PLYExporter: Geometry is not of type THREE.BufferGeometry.");r.hasAttribute("position")&&t(n,r)}}))}}},40404:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);t.STLExporter=class{constructor(){i(this,"binary",!1),i(this,"output",""),i(this,"offset",80),i(this,"objects",[]),i(this,"triangles",0),i(this,"vA",new s.Vector3),i(this,"vB",new s.Vector3),i(this,"vC",new s.Vector3),i(this,"cb",new s.Vector3),i(this,"ab",new s.Vector3),i(this,"normal",new s.Vector3)}parse(e,t){if(this.binary=void 0!==(null==t?void 0:t.binary)&&(null==t?void 0:t.binary),e.traverse((e=>{if((e=>e.isMesh)(e)){const t=e.geometry;if(!t.isBufferGeometry)throw new Error("THREE.STLExporter: Geometry is not of type THREE.BufferGeometry.");const n=t.index,r=t.getAttribute("position")||null;if(!r)return;this.triangles+=null!==n?n.count/3:r.count/3,this.objects.push({object3d:e,geometry:t})}})),this.binary){const e=2*this.triangles+3*this.triangles*4*4+80+4,t=new ArrayBuffer(e);this.output=new DataView(t),this.output.setUint32(this.offset,this.triangles,!0),this.offset+=4}else this.output="",this.output+="solid exported\n";for(let n=0,r=this.objects.length;n{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(91952),a=n(48480);t.USDZExporter=class{constructor(){i(this,"PRECISION",7),i(this,"materials"),i(this,"textures"),i(this,"files"),this.materials={},this.textures={},this.files={}}async parse(e){const t="model.usda";this.files[t]=null;let n=this.buildHeader();e.traverseVisible((e=>{if(e instanceof a.Mesh&&e.isMesh&&e.material.isMeshStandardMaterial){const t=e.geometry,r=e.material,i="geometries/Geometry_"+t.id+".usd";if(!(i in this.files)){const e=this.buildMeshObject(t);this.files[i]=this.buildUSDFileAsString(e)}r.uuid in this.materials||(this.materials[r.uuid]=r),n+=this.buildXform(e,t,r)}})),n+=this.buildMaterials(this.materials),this.files[t]=s.strToU8(n),n=null;for(const i in this.textures){const e=this.textures[i],t=i.split("_")[1],n=1023===e.format,r=this.imageToCanvas(e.image,t),s=await new Promise((e=>null==r?void 0:r.toBlob(e,n?"image/png":"image/jpeg",1)));s&&(this.files[`textures/Texture_${i}.${n?"png":"jpg"}`]=new Uint8Array(await s.arrayBuffer()))}let r=0;for(const i in this.files){const e=this.files[i];r+=34+i.length;const t=63&r;if(4!==t&&null!==e&&e instanceof Uint8Array){const n=new Uint8Array(64-t);this.files[i]=[e,{extra:{12345:n}}]}e&&"number"==typeof e.length&&(r=e.length)}return s.zipSync(this.files,{level:0})}imageToCanvas(e,t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const n=1024/Math.max(e.width,e.height),r=document.createElement("canvas");r.width=e.width*Math.min(1,n),r.height=e.height*Math.min(1,n);const i=r.getContext("2d");if(null==i||i.drawImage(e,0,0,r.width,r.height),void 0!==t){const e=parseInt(t,16),n=(e>>16&255)/255,s=(e>>8&255)/255,a=(255&e)/255,o=null==i?void 0:i.getImageData(0,0,r.width,r.height);if(o){const e=null==o?void 0:o.data;for(let t=0;t\n)\n{\n matrix4d xformOp:transform = ${i}\n uniform token[] xformOpOrder = ["xformOp:transform"]\n rel material:binding = \n}\n`}buildMatrix(e){const t=e.elements;return`( ${this.buildMatrixRow(t,0)}, ${this.buildMatrixRow(t,4)}, ${this.buildMatrixRow(t,8)}, ${this.buildMatrixRow(t,12)} )`}buildMatrixRow(e,t){return`(${e[t+0]}, ${e[t+1]}, ${e[t+2]}, ${e[t+3]})`}buildMeshObject(e){return`\ndef "Geometry"\n{\n ${this.buildMesh(e)}\n}\n`}buildMesh(e){const t=e.attributes,n=t.position.count;return`\n def Mesh "Geometry"\n {\n int[] faceVertexCounts = [${this.buildMeshVertexCount(e)}]\n int[] faceVertexIndices = [${this.buildMeshVertexIndices(e)}]\n normal3f[] normals = [${this.buildVector3Array(t.normal,n)}] (\n interpolation = "vertex"\n )\n point3f[] points = [${this.buildVector3Array(t.position,n)}]\n float2[] primvars:st = [${this.buildVector2Array(t.uv,n)}] (\n interpolation = "vertex"\n )\n uniform token subdivisionScheme = "none"\n }\n`}buildMeshVertexCount(e){const t=null!==e.index?e.index.array.length:e.attributes.position.count;return Array(t/3).fill(3).join(", ")}buildMeshVertexIndices(e){if(null!==e.index)return e.index.array.join(", ");const t=[],n=e.attributes.position.count;for(let r=0;r`),r.push(this.buildTexture(e,e.map,"diffuse",e.color))):n.push(`${t}color3f inputs:diffuseColor = ${this.buildColor(e.color)}`),null!==e.emissiveMap?(n.push(`${t}color3f inputs:emissiveColor.connect = `),r.push(this.buildTexture(e,e.emissiveMap,"emissive"))):e.emissive.getHex()>0&&n.push(`${t}color3f inputs:emissiveColor = ${this.buildColor(e.emissive)}`),null!==e.normalMap&&(n.push(`${t}normal3f inputs:normal.connect = `),r.push(this.buildTexture(e,e.normalMap,"normal"))),null!==e.aoMap&&(n.push(`${t}float inputs:occlusion.connect = `),r.push(this.buildTexture(e,e.aoMap,"occlusion"))),null!==e.roughnessMap&&1===e.roughness?(n.push(`${t}float inputs:roughness.connect = `),r.push(this.buildTexture(e,e.roughnessMap,"roughness"))):n.push(`${t}float inputs:roughness = ${e.roughness}`),null!==e.metalnessMap&&1===e.metalness?(n.push(`${t}float inputs:metallic.connect = `),r.push(this.buildTexture(e,e.metalnessMap,"metallic"))):n.push(`${t}float inputs:metallic = ${e.metalness}`),n.push(`${t}float inputs:opacity = ${e.opacity}`),e instanceof a.MeshPhysicalMaterial&&(n.push(`${t}float inputs:clearcoat = ${e.clearcoat}`),n.push(`${t}float inputs:clearcoatRoughness = ${e.clearcoatRoughness}`),n.push(`${t}float inputs:ior = ${e.ior}`)),`\n def Material "Material_${e.id}"\n {\n def Shader "PreviewSurface"\n {\n uniform token info:id = "UsdPreviewSurface"\n${n.join("\n")}\n int inputs:useSpecularWorkflow = 0\n token outputs:surface\n }\n token outputs:surface.connect = \n token inputs:frame:stPrimvarName = "st"\n def Shader "uvReader_st"\n {\n uniform token info:id = "UsdPrimvarReader_float2"\n token inputs:varname.connect = \n float2 inputs:fallback = (0.0, 0.0)\n float2 outputs:result\n }\n${r.join("\n")}\n }\n`}buildTexture(e,t,n,r){const i=t.id+(r?"_"+r.getHexString():""),s=1023===t.format;return this.textures[i]=t,`\n def Shader "Transform2d_${n}" (\n sdrMetadata = {\n string role = "math"\n }\n )\n {\n uniform token info:id = "UsdTransform2d"\n float2 inputs:in.connect = \n float2 inputs:scale = ${this.buildVector2(t.repeat)}\n float2 inputs:translation = ${this.buildVector2(t.offset)}\n float2 outputs:result\n }\n def Shader "Texture_${t.id}_${n}"\n {\n uniform token info:id = "UsdUVTexture"\n asset inputs:file = @textures/Texture_${i}.${s?"png":"jpg"}@\n float2 inputs:st.connect = \n token inputs:wrapS = "repeat"\n token inputs:wrapT = "repeat"\n float outputs:r\n float outputs:g\n float outputs:b\n float3 outputs:rgb\n }`}buildColor(e){return`(${e.r}, ${e.g}, ${e.b})`}buildVector2(e){return`(${e.x}, ${e.y})`}}},896:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.BufferGeometry{constructor(e,t,n,i,s,a){super();const o=(e=e||1)/2,l=(t=t||1)/2,c=(n=n||1)/2,h=e/(i=Math.floor(i)||1),u=t/(s=Math.floor(s)||1),d=n/(a=Math.floor(a)||1),p=[];let f=-o,m=-l,g=-c;for(let r=0;r<=i;r++)p.push(f,-l,-c,f,l,-c),p.push(f,l,-c,f,l,c),p.push(f,l,c,f,-l,c),p.push(f,-l,c,f,-l,-c),f+=h;for(let r=0;r<=s;r++)p.push(-o,m,-c,o,m,-c),p.push(o,m,-c,o,m,c),p.push(o,m,c,-o,m,c),p.push(-o,m,c,-o,m,-c),m+=u;for(let r=0;r<=a;r++)p.push(-o,-l,g,-o,l,g),p.push(-o,l,g,o,l,g),p.push(o,l,g,o,-l,g),p.push(o,-l,g,-o,-l,g),g+=d;this.setAttribute("position",new r.Float32BufferAttribute(p,3))}}t.BoxLineGeometry=i},67824:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(41028);class s extends r.BufferGeometry{constructor(e=[]){super();const t=[],n=[],s=(new i.ConvexHull).setFromPoints(e).faces;for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.BufferGeometry{constructor(e,t,n,i){super();const a=[],o=[],l=[],c=new r.Vector3,h=new r.Matrix4;h.makeRotationFromEuler(n),h.setPosition(t);const u=new r.Matrix4;function d(t,n,r){n.applyMatrix4(e.matrixWorld),n.applyMatrix4(u),r.transformDirection(e.matrixWorld),t.push(new s(n.clone(),r.clone()))}function p(e,t){const n=[],r=.5*Math.abs(i.dot(t));for(let i=0;i0,a=e[i+1].position.dot(t)-r>0,o=e[i+2].position.dot(t)-r>0,d=(s?1:0)+(a?1:0)+(o?1:0),d){case 0:n.push(e[i]),n.push(e[i+1]),n.push(e[i+2]);break;case 1:if(s&&(l=e[i+1],c=e[i+2],h=f(e[i],l,t,r),u=f(e[i],c,t,r)),a){l=e[i],c=e[i+2],h=f(e[i+1],l,t,r),u=f(e[i+1],c,t,r),n.push(h),n.push(c.clone()),n.push(l.clone()),n.push(c.clone()),n.push(h.clone()),n.push(u);break}o&&(l=e[i],c=e[i+1],h=f(e[i+2],l,t,r),u=f(e[i+2],c,t,r)),n.push(l.clone()),n.push(c.clone()),n.push(h),n.push(u),n.push(h.clone()),n.push(c.clone());break;case 2:s||(l=e[i].clone(),c=f(l,e[i+1],t,r),h=f(l,e[i+2],t,r),n.push(l),n.push(c),n.push(h)),a||(l=e[i+1].clone(),c=f(l,e[i+2],t,r),h=f(l,e[i],t,r),n.push(l),n.push(c),n.push(h)),o||(l=e[i+2].clone(),c=f(l,e[i],t,r),h=f(l,e[i+1],t,r),n.push(l),n.push(c),n.push(h))}}return n}function f(e,t,n,i){const a=e.position.dot(n)-i,o=a/(a-(t.position.dot(n)-i));return new s(new r.Vector3(e.position.x+o*(t.position.x-e.position.x),e.position.y+o*(t.position.y-e.position.y),e.position.z+o*(t.position.z-e.position.z)),new r.Vector3(e.normal.x+o*(t.normal.x-e.normal.x),e.normal.y+o*(t.normal.y-e.normal.y),e.normal.z+o*(t.normal.z-e.normal.z)))}u.copy(h).invert(),function(){let t,n=[];const s=new r.Vector3,u=new r.Vector3;if(!0===e.geometry.isGeometry)return void console.error("THREE.DecalGeometry no longer supports THREE.Geometry. Use BufferGeometry instead.");const f=e.geometry,m=f.attributes.position,g=f.attributes.normal;if(null!==f.index){const e=f.index;for(t=0;t{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(59304),o=class extends s.BufferGeometry{constructor(e={}){super(),this.isLightningStrike=!0,this.type="LightningStrike",this.init(o.copyParameters(e,e)),this.createMesh()}static createRandomGenerator(){const e=2053,t=[];for(let r=0;rthis.subrays[0].beginVanishingTime?this.state=o.RAY_VANISHING:this.state=o.RAY_STEADY,this.visible=!0):(this.visible=!1,e=n.fraction0*r.propagationTimeFactor&&(t.createPrism(n),t.onDecideSubrayCreation(n,t)):e=this.currentSubray.maxIterations)return void this.currentSegmentCallback(e);this.forwards.subVectors(e.pos1,e.pos0);let t=this.forwards.length();t<1e-6&&(this.forwards.set(0,0,.01),t=this.forwards.length());const n=.5*(e.radius0+e.radius1),r=.5*(e.fraction0+e.fraction1),i=this.time*this.currentSubray.timeScale*Math.pow(2,e.iteration);this.middlePos.lerpVectors(e.pos0,e.pos1,.5),this.middleLinPos.lerpVectors(e.linPos0,e.linPos1,.5);const s=this.middleLinPos;this.newPos.set(this.simplexX.noise4d(s.x,s.y,s.z,i),this.simplexY.noise4d(s.x,s.y,s.z,i),this.simplexZ.noise4d(s.x,s.y,s.z,i)),this.newPos.multiplyScalar(e.positionVariationFactor*t),this.newPos.add(this.middlePos);const a=this.getNewSegment();a.pos0.copy(e.pos0),a.pos1.copy(this.newPos),a.linPos0.copy(e.linPos0),a.linPos1.copy(this.middleLinPos),a.up0.copy(e.up0),a.up1.copy(e.up1),a.radius0=e.radius0,a.radius1=n,a.fraction0=e.fraction0,a.fraction1=r,a.positionVariationFactor=e.positionVariationFactor*this.currentSubray.roughness,a.iteration=e.iteration+1;const o=this.getNewSegment();o.pos0.copy(this.newPos),o.pos1.copy(e.pos1),o.linPos0.copy(this.middleLinPos),o.linPos1.copy(e.linPos1),this.cross1.crossVectors(e.up0,this.forwards.normalize()),o.up0.crossVectors(this.forwards,this.cross1).normalize(),o.up1.copy(e.up1),o.radius0=n,o.radius1=e.radius1,o.fraction0=r,o.fraction1=e.fraction1,o.positionVariationFactor=e.positionVariationFactor*this.currentSubray.roughness,o.iteration=e.iteration+1,this.fractalRayRecursive(a),this.fractalRayRecursive(o)}createPrism(e){this.forwardsFill.subVectors(e.pos1,e.pos0).normalize(),this.isInitialSegment&&(this.currentCreateTriangleVertices(e.pos0,e.up0,this.forwardsFill,e.radius0,0),this.isInitialSegment=!1),this.currentCreateTriangleVertices(e.pos1,e.up0,this.forwardsFill,e.radius1,e.fraction1),this.createPrismFaces()}createTriangleVerticesWithoutUVs(e,t,n,r){this.side.crossVectors(t,n).multiplyScalar(r*o.COS30DEG),this.down.copy(t).multiplyScalar(-r*o.SIN30DEG);const i=this.vPos,s=this.vertices;i.copy(e).sub(this.side).add(this.down),s[this.currentCoordinate++]=i.x,s[this.currentCoordinate++]=i.y,s[this.currentCoordinate++]=i.z,i.copy(e).add(this.side).add(this.down),s[this.currentCoordinate++]=i.x,s[this.currentCoordinate++]=i.y,s[this.currentCoordinate++]=i.z,i.copy(t).multiplyScalar(r).add(e),s[this.currentCoordinate++]=i.x,s[this.currentCoordinate++]=i.y,s[this.currentCoordinate++]=i.z,this.currentVertex+=3}createTriangleVerticesWithUVs(e,t,n,r,i){this.side.crossVectors(t,n).multiplyScalar(r*o.COS30DEG),this.down.copy(t).multiplyScalar(-r*o.SIN30DEG);const s=this.vPos,a=this.vertices,l=this.uvs;s.copy(e).sub(this.side).add(this.down),a[this.currentCoordinate++]=s.x,a[this.currentCoordinate++]=s.y,a[this.currentCoordinate++]=s.z,l[this.currentUVCoordinate++]=i,l[this.currentUVCoordinate++]=0,s.copy(e).add(this.side).add(this.down),a[this.currentCoordinate++]=s.x,a[this.currentCoordinate++]=s.y,a[this.currentCoordinate++]=s.z,l[this.currentUVCoordinate++]=i,l[this.currentUVCoordinate++]=.5,s.copy(t).multiplyScalar(r).add(e),a[this.currentCoordinate++]=s.x,a[this.currentCoordinate++]=s.y,a[this.currentCoordinate++]=s.z,l[this.currentUVCoordinate++]=i,l[this.currentUVCoordinate++]=1,this.currentVertex+=3}createPrismFaces(e){const t=this.indices;e=this.currentVertex-6,t[this.currentIndex++]=e+1,t[this.currentIndex++]=e+2,t[this.currentIndex++]=e+5,t[this.currentIndex++]=e+1,t[this.currentIndex++]=e+5,t[this.currentIndex++]=e+4,t[this.currentIndex++]=e+0,t[this.currentIndex++]=e+1,t[this.currentIndex++]=e+4,t[this.currentIndex++]=e+0,t[this.currentIndex++]=e+4,t[this.currentIndex++]=e+3,t[this.currentIndex++]=e+2,t[this.currentIndex++]=e+0,t[this.currentIndex++]=e+3,t[this.currentIndex++]=e+2,t[this.currentIndex++]=e+3,t[this.currentIndex++]=e+5}createDefaultSubrayCreationCallbacks(){const e=this.randomGenerator.random;this.onDecideSubrayCreation=function(t,n){const r=n.currentSubray,i=n.rayParameters.subrayPeriod,a=n.rayParameters.subrayDutyCycle,o=n.rayParameters.isEternal&&0==r.recursion?-e()*i:s.MathUtils.lerp(r.birthTime,r.endPropagationTime,t.fraction0)-e()*i,l=n.time-o,c=Math.floor(l/i),h=e()*(c+1);let u=0;if(l%i<=a*i&&(u=n.subrayProbability),r.recursion{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(14476);class s extends i.ParametricGeometry{constructor(e,t=64,n=1,i=8,s=!1){const a=t+1,o=e.computeFrenetFrames(t,s),l=o.tangents,c=o.normals,h=o.binormals,u=new r.Vector3;super((function(t,r,i){r*=2*Math.PI;const s=Math.floor(t*(a-1));e.getPointAt(t,u);const o=c[s],l=h[s],d=-n*Math.cos(r),p=n*Math.sin(r);u.x+=d*o.x+p*l.x,u.y+=d*o.y+p*l.y,u.z+=d*o.z+p*l.z,i.copy(u)}),t,i),this.tangents=l,this.normals=c,this.binormals=h,this.path=e,this.segments=t,this.radius=n,this.segmentsRadius=i,this.closed=s}}const a={klein:function(e,t,n){let r,i;t*=Math.PI,e*=2*Math.PI,(t*=2){"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.BufferGeometry{constructor(e=((e,t,n)=>n.set(e,t,Math.cos(e)*Math.sin(t))),t=8,n=8){super(),this.type="ParametricGeometry",this.parameters={func:e,slices:t,stacks:n};const i=[],s=[],a=[],o=[],l=1e-5,c=new r.Vector3,h=new r.Vector3,u=new r.Vector3,d=new r.Vector3,p=new r.Vector3,f=t+1;for(let r=0;r<=n;r++){const i=r/n;for(let n=0;n<=t;n++){const r=n/t;e(r,i,h),s.push(h.x,h.y,h.z),r-l>=0?(e(r-l,i,u),d.subVectors(h,u)):(e(r+l,i,u),d.subVectors(u,h)),i-l>=0?(e(r,i-l,u),p.subVectors(h,u)):(e(r,i+l,u),p.subVectors(u,h)),c.crossVectors(d,p).normalize(),a.push(c.x,c.y,c.z),o.push(r,i)}}for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Vector3;function s(e,t,n,r,s,a){const o=2*Math.PI*s/4,l=Math.max(a-2*s,0),c=Math.PI/4;i.copy(t),i[r]=0,i.normalize();const h=.5*o/(o+l),u=1-i.angleTo(e)/c;if(1===Math.sign(i[n]))return u*h;return l/(o+l)+h+h*(1-u)}class a extends r.BoxGeometry{constructor(e=1,t=1,n=1,i=2,a=.1){if(i=2*i+1,a=Math.min(e/2,t/2,n/2,a),super(1,1,1,i,i,i),1===i)return;const o=this.toNonIndexed();this.index=null,this.attributes.position=o.attributes.position,this.attributes.normal=o.attributes.normal,this.attributes.uv=o.attributes.uv;const l=new r.Vector3,c=new r.Vector3,h=new r.Vector3(e,t,n).divideScalar(2).subScalar(a),u=this.attributes.position.array,d=this.attributes.normal.array,p=this.attributes.uv.array,f=u.length/6,m=new r.Vector3,g=.5/i;for(let r=0,A=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.BufferGeometry{constructor(e,t,n,i,s,a,o){const l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,3,16,17,18,7,19,20,21,11,22,23,24,15,25,26,27,18,28,29,30,21,31,32,33,24,34,35,36,27,37,38,39,30,40,41,0,33,42,43,4,36,44,45,8,39,46,47,12,12,13,14,15,48,49,50,51,52,53,54,55,56,57,58,59,15,25,26,27,51,60,61,62,55,63,64,65,59,66,67,68,27,37,38,39,62,69,70,71,65,72,73,74,68,75,76,77,39,46,47,12,71,78,79,48,74,80,81,52,77,82,83,56,56,57,58,59,84,85,86,87,88,89,90,91,92,93,94,95,59,66,67,68,87,96,97,98,91,99,100,101,95,102,103,104,68,75,76,77,98,105,106,107,101,108,109,110,104,111,112,113,77,82,83,56,107,114,115,84,110,116,117,88,113,118,119,92,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,123,136,137,120,127,138,139,124,131,140,141,128,135,142,143,132,132,133,134,135,144,145,146,147,148,149,150,151,68,152,153,154,135,142,143,132,147,155,156,144,151,157,158,148,154,159,160,68,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,164,177,178,161,168,179,180,165,172,181,182,169,176,183,184,173,173,174,175,176,185,186,187,188,189,190,191,192,193,194,195,196,176,183,184,173,188,197,198,185,192,199,200,189,196,201,202,193,203,203,203,203,204,205,206,207,208,208,208,208,209,210,211,212,203,203,203,203,207,213,214,215,208,208,208,208,212,216,217,218,203,203,203,203,215,219,220,221,208,208,208,208,218,222,223,224,203,203,203,203,221,225,226,204,208,208,208,208,224,227,228,209,209,210,211,212,229,230,231,232,233,234,235,236,237,238,239,240,212,216,217,218,232,241,242,243,236,244,245,246,240,247,248,249,218,222,223,224,243,250,251,252,246,253,254,255,249,256,257,258,224,227,228,209,252,259,260,229,255,261,262,233,258,263,264,237,265,265,265,265,266,267,268,269,270,271,272,273,92,119,118,113,265,265,265,265,269,274,275,276,273,277,278,279,113,112,111,104,265,265,265,265,276,280,281,282,279,283,284,285,104,103,102,95,265,265,265,265,282,286,287,266,285,288,289,270,95,94,93,92],c=[1.4,0,2.4,1.4,-.784,2.4,.784,-1.4,2.4,0,-1.4,2.4,1.3375,0,2.53125,1.3375,-.749,2.53125,.749,-1.3375,2.53125,0,-1.3375,2.53125,1.4375,0,2.53125,1.4375,-.805,2.53125,.805,-1.4375,2.53125,0,-1.4375,2.53125,1.5,0,2.4,1.5,-.84,2.4,.84,-1.5,2.4,0,-1.5,2.4,-.784,-1.4,2.4,-1.4,-.784,2.4,-1.4,0,2.4,-.749,-1.3375,2.53125,-1.3375,-.749,2.53125,-1.3375,0,2.53125,-.805,-1.4375,2.53125,-1.4375,-.805,2.53125,-1.4375,0,2.53125,-.84,-1.5,2.4,-1.5,-.84,2.4,-1.5,0,2.4,-1.4,.784,2.4,-.784,1.4,2.4,0,1.4,2.4,-1.3375,.749,2.53125,-.749,1.3375,2.53125,0,1.3375,2.53125,-1.4375,.805,2.53125,-.805,1.4375,2.53125,0,1.4375,2.53125,-1.5,.84,2.4,-.84,1.5,2.4,0,1.5,2.4,.784,1.4,2.4,1.4,.784,2.4,.749,1.3375,2.53125,1.3375,.749,2.53125,.805,1.4375,2.53125,1.4375,.805,2.53125,.84,1.5,2.4,1.5,.84,2.4,1.75,0,1.875,1.75,-.98,1.875,.98,-1.75,1.875,0,-1.75,1.875,2,0,1.35,2,-1.12,1.35,1.12,-2,1.35,0,-2,1.35,2,0,.9,2,-1.12,.9,1.12,-2,.9,0,-2,.9,-.98,-1.75,1.875,-1.75,-.98,1.875,-1.75,0,1.875,-1.12,-2,1.35,-2,-1.12,1.35,-2,0,1.35,-1.12,-2,.9,-2,-1.12,.9,-2,0,.9,-1.75,.98,1.875,-.98,1.75,1.875,0,1.75,1.875,-2,1.12,1.35,-1.12,2,1.35,0,2,1.35,-2,1.12,.9,-1.12,2,.9,0,2,.9,.98,1.75,1.875,1.75,.98,1.875,1.12,2,1.35,2,1.12,1.35,1.12,2,.9,2,1.12,.9,2,0,.45,2,-1.12,.45,1.12,-2,.45,0,-2,.45,1.5,0,.225,1.5,-.84,.225,.84,-1.5,.225,0,-1.5,.225,1.5,0,.15,1.5,-.84,.15,.84,-1.5,.15,0,-1.5,.15,-1.12,-2,.45,-2,-1.12,.45,-2,0,.45,-.84,-1.5,.225,-1.5,-.84,.225,-1.5,0,.225,-.84,-1.5,.15,-1.5,-.84,.15,-1.5,0,.15,-2,1.12,.45,-1.12,2,.45,0,2,.45,-1.5,.84,.225,-.84,1.5,.225,0,1.5,.225,-1.5,.84,.15,-.84,1.5,.15,0,1.5,.15,1.12,2,.45,2,1.12,.45,.84,1.5,.225,1.5,.84,.225,.84,1.5,.15,1.5,.84,.15,-1.6,0,2.025,-1.6,-.3,2.025,-1.5,-.3,2.25,-1.5,0,2.25,-2.3,0,2.025,-2.3,-.3,2.025,-2.5,-.3,2.25,-2.5,0,2.25,-2.7,0,2.025,-2.7,-.3,2.025,-3,-.3,2.25,-3,0,2.25,-2.7,0,1.8,-2.7,-.3,1.8,-3,-.3,1.8,-3,0,1.8,-1.5,.3,2.25,-1.6,.3,2.025,-2.5,.3,2.25,-2.3,.3,2.025,-3,.3,2.25,-2.7,.3,2.025,-3,.3,1.8,-2.7,.3,1.8,-2.7,0,1.575,-2.7,-.3,1.575,-3,-.3,1.35,-3,0,1.35,-2.5,0,1.125,-2.5,-.3,1.125,-2.65,-.3,.9375,-2.65,0,.9375,-2,-.3,.9,-1.9,-.3,.6,-1.9,0,.6,-3,.3,1.35,-2.7,.3,1.575,-2.65,.3,.9375,-2.5,.3,1.125,-1.9,.3,.6,-2,.3,.9,1.7,0,1.425,1.7,-.66,1.425,1.7,-.66,.6,1.7,0,.6,2.6,0,1.425,2.6,-.66,1.425,3.1,-.66,.825,3.1,0,.825,2.3,0,2.1,2.3,-.25,2.1,2.4,-.25,2.025,2.4,0,2.025,2.7,0,2.4,2.7,-.25,2.4,3.3,-.25,2.4,3.3,0,2.4,1.7,.66,.6,1.7,.66,1.425,3.1,.66,.825,2.6,.66,1.425,2.4,.25,2.025,2.3,.25,2.1,3.3,.25,2.4,2.7,.25,2.4,2.8,0,2.475,2.8,-.25,2.475,3.525,-.25,2.49375,3.525,0,2.49375,2.9,0,2.475,2.9,-.15,2.475,3.45,-.15,2.5125,3.45,0,2.5125,2.8,0,2.4,2.8,-.15,2.4,3.2,-.15,2.4,3.2,0,2.4,3.525,.25,2.49375,2.8,.25,2.475,3.45,.15,2.5125,2.9,.15,2.475,3.2,.15,2.4,2.8,.15,2.4,0,0,3.15,.8,0,3.15,.8,-.45,3.15,.45,-.8,3.15,0,-.8,3.15,0,0,2.85,.2,0,2.7,.2,-.112,2.7,.112,-.2,2.7,0,-.2,2.7,-.45,-.8,3.15,-.8,-.45,3.15,-.8,0,3.15,-.112,-.2,2.7,-.2,-.112,2.7,-.2,0,2.7,-.8,.45,3.15,-.45,.8,3.15,0,.8,3.15,-.2,.112,2.7,-.112,.2,2.7,0,.2,2.7,.45,.8,3.15,.8,.45,3.15,.112,.2,2.7,.2,.112,2.7,.4,0,2.55,.4,-.224,2.55,.224,-.4,2.55,0,-.4,2.55,1.3,0,2.55,1.3,-.728,2.55,.728,-1.3,2.55,0,-1.3,2.55,1.3,0,2.4,1.3,-.728,2.4,.728,-1.3,2.4,0,-1.3,2.4,-.224,-.4,2.55,-.4,-.224,2.55,-.4,0,2.55,-.728,-1.3,2.55,-1.3,-.728,2.55,-1.3,0,2.55,-.728,-1.3,2.4,-1.3,-.728,2.4,-1.3,0,2.4,-.4,.224,2.55,-.224,.4,2.55,0,.4,2.55,-1.3,.728,2.55,-.728,1.3,2.55,0,1.3,2.55,-1.3,.728,2.4,-.728,1.3,2.4,0,1.3,2.4,.224,.4,2.55,.4,.224,2.55,.728,1.3,2.55,1.3,.728,2.55,.728,1.3,2.4,1.3,.728,2.4,0,0,0,1.425,0,0,1.425,.798,0,.798,1.425,0,0,1.425,0,1.5,0,.075,1.5,.84,.075,.84,1.5,.075,0,1.5,.075,-.798,1.425,0,-1.425,.798,0,-1.425,0,0,-.84,1.5,.075,-1.5,.84,.075,-1.5,0,.075,-1.425,-.798,0,-.798,-1.425,0,0,-1.425,0,-1.5,-.84,.075,-.84,-1.5,.075,0,-1.5,.075,.798,-1.425,0,1.425,-.798,0,.84,-1.5,.075,1.5,-.84,.075];super(),e=e||50,t=void 0!==t?Math.max(2,Math.floor(t)||10):10,a=void 0===a||a;const h=3.15*((o=void 0===o||o)?1:1.3)/2,u=e/h;let d=(n=void 0===n||n)?(8*t-4)*t:0;d+=(i=void 0===i||i)?(16*t-4)*t:0,d+=(s=void 0===s||s)?40*t*t:0;const p=new Uint32Array(3*d);let f=n?4:0;f+=i?8:0,f+=s?20:0,f*=(t+1)*(t+1);const m=new Float32Array(3*f),g=new Float32Array(3*f),A=new Float32Array(2*f),v=new r.Matrix4;v.set(-1,3,-3,1,3,-6,3,0,-3,3,0,0,1,0,0,0);const y=[];let x,b,E;const _=[],S=[],M=[],w=[],C=[],T=[],I=[],B=[],R=new r.Vector3;let P,D,L,F,U,O,N,k,G,z=0,Q=0;const V=new r.Vector3;let H,j,W,X;const Y=new r.Matrix4,q=new r.Matrix4,K=new r.Vector4,J=new r.Vector4,Z=new r.Vector4,$=new r.Vector4,ee=new r.Vector3,te=new r.Vector3,ne=v.clone();ne.transpose();const re=(e,t,n)=>!(m[3*e]===m[3*t]&&m[3*e+1]===m[3*t+1]&&m[3*e+2]===m[3*t+2]||m[3*e]===m[3*n]&&m[3*e+1]===m[3*n+1]&&m[3*e+2]===m[3*n+2]||m[3*t]===m[3*n]&&m[3*t+1]===m[3*n+1]&&m[3*t+2]===m[3*n+2]);for(x=0;x<3;x++)C[x]=new r.Matrix4;const ie=n?32:28;F=t+1;let se=0,ae=0,oe=0,le=0,ce=0;for(let r=s?0:20;r=28){for(x=0;x<3;x++){for(b=0;b<4;b++)for(E=0;E<4;E++)y[4*E+b]=c[3*l[16*r+4*b+E]+x],a&&r>=20&&r<28&&2!==x&&(y[4*E+b]*=1.077),o||2!==x||(y[4*E+b]*=1.3);Y.set(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),q.multiplyMatrices(Y,v),C[x].multiplyMatrices(ne,q)}for(D=0;D<=t;D++)for(U=D/t,L=0;L<=t;L++){for(O=L/t,G=4,N=k=1;G--;)_[G]=N,S[G]=k,N*=U,k*=O,3===G?(M[G]=w[G]=0,z=Q=1):(M[G]=z*(3-G),w[G]=Q*(3-G),z*=U,Q*=O);for(K.fromArray(_),J.fromArray(S),Z.fromArray(M),$.fromArray(w),x=0;x<3;x++)P=K.clone(),P.applyMatrix4(C[x]),T[x]=P.dot(J),P=Z.clone(),P.applyMatrix4(C[x]),I[x]=P.dot(J),P=K.clone(),P.applyMatrix4(C[x]),B[x]=P.dot($);ee.fromArray(I),te.fromArray(B),R.crossVectors(te,ee),R.normalize(),0===T[0]&&0===T[1]?V.set(0,T[2]>h?1:-1,0):V.set(R.x,R.z,-R.y),m[ae++]=u*T[0],m[ae++]=u*(T[2]-h),m[ae++]=-u*T[1],g[oe++]=V.x,g[oe++]=V.y,g[oe++]=V.z,A[le++]=1-O,A[le++]=1-U}for(D=0;D{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.ExtrudeGeometry{constructor(e,t={}){const{bevelEnabled:n=!1,bevelSize:r=8,bevelThickness:i=10,font:s,height:a=50,size:o=100,lineHeight:l=1,letterSpacing:c=0,...h}=t;if(void 0===s)super();else{super(s.generateShapes(e,o,{lineHeight:l,letterSpacing:c}),{...h,bevelEnabled:n,bevelSize:r,bevelThickness:i,depth:a})}this.type="TextGeometry"}}t.TextBufferGeometry=i,t.TextGeometry=i},29812:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Mesh{constructor(e,t){const n=new r.ShaderMaterial({type:"LightProbeHelperMaterial",uniforms:{sh:{value:e.sh.coefficients},intensity:{value:e.intensity}},vertexShader:["varying vec3 vNormal;","void main() {","\tvNormal = normalize( normalMatrix * normal );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#define RECIPROCAL_PI 0.318309886","vec3 inverseTransformDirection( in vec3 normal, in mat4 matrix ) {","\t// matrix is assumed to be orthogonal","\treturn normalize( ( vec4( normal, 0.0 ) * matrix ).xyz );","}","// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf","vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {","\t// normal is assumed to have unit length","\tfloat x = normal.x, y = normal.y, z = normal.z;","\t// band 0","\tvec3 result = shCoefficients[ 0 ] * 0.886227;","\t// band 1","\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;","\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;","\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;","\t// band 2","\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;","\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;","\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );","\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;","\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );","\treturn result;","}","uniform vec3 sh[ 9 ]; // sh coefficients","uniform float intensity; // light probe intensity","varying vec3 vNormal;","void main() {","\tvec3 normal = normalize( vNormal );","\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );","\tvec3 irradiance = shGetIrradianceAt( worldNormal, sh );","\tvec3 outgoingLight = RECIPROCAL_PI * irradiance * intensity;","\tgl_FragColor = linearToOutputTexel( vec4( outgoingLight, 1.0 ) );","}"].join("\n")});super(new r.SphereGeometry(1,32,16),n),this.lightProbe=e,this.size=t,this.type="LightProbeHelper",this.onBeforeRender()}dispose(){this.geometry.dispose(),this.material.dispose()}onBeforeRender(){this.position.copy(this.lightProbe.position),this.scale.set(1,1,1).multiplyScalar(this.size),this.material.uniforms.intensity.value=this.lightProbe.intensity}}t.LightProbeHelper=i},89576:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Line{constructor(e,t=1,n=16,i=2){const s=new r.BufferGeometry,a=new Float32Array(3*(3*(n+2*i)+3));s.setAttribute("position",new r.BufferAttribute(a,3));const o=new r.LineBasicMaterial({color:65280});super(s,[new r.LineBasicMaterial({color:16776960}),o]),this.type="PositionalAudioHelper",this.audio=e,this.range=t,this.divisionsInnerAngle=n,this.divisionsOuterAngle=i,this.update()}update(){const e=this.audio,t=this.range,n=this.divisionsInnerAngle,i=this.divisionsOuterAngle,s=r.MathUtils.degToRad(e.panner.coneInnerAngle),a=r.MathUtils.degToRad(e.panner.coneOuterAngle),o=s/2,l=a/2;let c,h,u=0,d=0;const p=this.geometry,f=p.attributes.position;function m(e,n,r,i){const s=(n-e)/r;for(f.setXYZ(u,0,0,0),d++,c=e;c{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Line{constructor(e,t){const n=new r.BufferGeometry;n.setAttribute("position",new r.Float32BufferAttribute([1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),n.computeBoundingSphere();super(n,new r.LineBasicMaterial({fog:!1})),this.light=e,this.color=t,this.type="RectAreaLightHelper";const i=new r.BufferGeometry;i.setAttribute("position",new r.Float32BufferAttribute([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),i.computeBoundingSphere(),this.add(new r.Mesh(i,new r.MeshBasicMaterial({side:r.BackSide,fog:!1})))}updateMatrixWorld(){if(this.scale.set(.5*this.light.width,.5*this.light.height,1),void 0!==this.color)this.material.color.set(this.color),this.children[0].material.color.set(this.color);else{this.material.color.copy(this.light.color).multiplyScalar(this.light.intensity);const e=this.material.color,t=Math.max(e.r,e.g,e.b);t>1&&e.multiplyScalar(1/t),this.children[0].material.color.copy(this.material.color)}this.matrixWorld.extractRotation(this.light.matrixWorld).scale(this.scale).copyPosition(this.light.matrixWorld),this.children[0].matrixWorld.copy(this.matrixWorld)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}t.RectAreaLightHelper=i},77404:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Vector3,s=new r.Vector3,a=new r.Matrix3;class o extends r.LineSegments{constructor(e,t=1,n=16711680){const i=new r.BufferGeometry,s=e.geometry.attributes.normal.count,a=new r.Float32BufferAttribute(2*s*3,3);i.setAttribute("position",a),super(i,new r.LineBasicMaterial({color:n,toneMapped:!1})),this.object=e,this.size=t,this.type="VertexNormalsHelper",this.matrixAutoUpdate=!1,this.update()}update(){this.object.updateMatrixWorld(!0),a.getNormalMatrix(this.object.matrixWorld);const e=this.object.matrixWorld,t=this.geometry.attributes.position,n=this.object.geometry;if(n){const r=n.attributes.position,o=n.attributes.normal;let l=0;for(let n=0,c=r.count;n{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Vector3,s=new r.Vector3;class a extends r.LineSegments{constructor(e,t=1,n=65535){const i=new r.BufferGeometry,s=e.geometry.attributes.tangent.count,a=new r.Float32BufferAttribute(2*s*3,3);i.setAttribute("position",a),super(i,new r.LineBasicMaterial({color:n,toneMapped:!1})),this.object=e,this.size=t,this.type="VertexTangentsHelper",this.matrixAutoUpdate=!1,this.update()}update(){this.object.updateMatrixWorld(!0);const e=this.object.matrixWorld,t=this.geometry.attributes.position,n=this.object.geometry,r=n.attributes.position,a=n.attributes.tangent;let o=0;for(let l=0,c=r.count;l{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(26920),i=n(46484),s=n(95108),a=n(42256),o=n(47544),l=n(81596),c=n(3096),h=n(53760),u=n(10980),d=n(86780),p=n(40016),f=n(25740),m=n(69792),g=n(95544),A=n(18688),v=n(27640),y=n(57964),x=n(75656),b=n(76144),E=n(26684),_=n(96528),S=n(96800),M=n(64845),w=n(87552),C=n(96844),T=n(41252),I=n(87408),B=n(12544),R=n(12392),P=n(40404),D=n(58936),L=n(96496),F=n(97940),U=n(36180),O=n(45584),N=n(18464),k=n(83180),G=n(7608),z=n(25048),Q=n(40480),V=n(5107),H=n(31916),j=n(93340),W=n(30328),X=n(57675),Y=n(48619),q=n(5848),K=n(92440),J=n(67128),Z=n(21372),$=n(82548),ee=n(99752),te=n(90800),ne=n(57008),re=n(74344),ie=n(8636),se=n(38288),ae=n(11936),oe=n(41028),le=n(49264),ce=n(59304),he=n(59672),ue=n(36108),de=n(89480),pe=n(7404),fe=n(24376),me=n(91016),ge=n(3596),Ae=n(55047),ve=n(84339),ye=n(76548),xe=n(40400),be=n(78888),Ee=n(63603),_e=n(53072),Se=n(69152),Me=n(9236),we=n(47004),Ce=n(60072),Te=n(9156),Ie=n(56156),Be=n(61100),Re=n(74772),Pe=n(23264),De=n(4200),Le=n(32472),Fe=n(47216),Ue=n(51892),Oe=n(9272),Ne=n(37608),ke=n(69469),Ge=n(22456),ze=n(75760),Qe=n(80472),Ve=n(82344),He=n(75756),je=n(41092),We=n(73472),Xe=n(29624),Ye=n(72412),qe=n(83752),Ke=n(41172),Je=n(10728),Ze=n(26236),$e=n(51680),et=n(53197),tt=n(96136),nt=n(57873),rt=n(22404),it=n(61976),st=n(65028),at=n(66540),ot=n(49392),lt=n(30384),ct=n(81528),ht=n(55124),ut=n(14476),dt=n(67824),pt=n(44920),ft=n(80240),mt=n(896),gt=n(52968),At=n(79780),vt=n(25568),yt=n(3752),xt=n(91056),bt=n(5495),Et=n(18051),_t=n(18451),St=n(58240),Mt=n(12520),wt=n(19872),Ct=n(4056),Tt=n(77356),It=n(45075),Bt=n(89216),Rt=n(75316),Pt=n(90964),Dt=n(75040),Lt=n(49284),Ft=n(10708),Ut=n(85616),Ot=n(10304),Nt=n(12400),kt=n(73668),Gt=n(3600),zt=n(57500),Qt=n(38808),Vt=n(96096),Ht=n(5676),jt=n(46016),Wt=n(9603),Xt=n(97712),Yt=n(47992),qt=n(42640),Kt=n(46152),Jt=n(86716),Zt=n(45264),$t=n(78312),en=n(35568),tn=n(80777),nn=n(5948),rn=n(31136),sn=n(7412),an=n(99440),on=n(92504),ln=n(98589),cn=n(11928),hn=n(96704),un=n(35424),dn=n(50020),pn=n(64552),fn=n(33352),mn=n(15392),gn=n(18384),An=n(86472),vn=n(47228),yn=n(63288),xn=n(26960),bn=n(22120),En=n(6240),_n=n(24124),Sn=n(71420),Mn=n(29752),wn=n(22432),Cn=n(88592),Tn=n(50196),In=n(76060),Bn=n(80565),Rn=n(56419),Pn=n(78484),Dn=n(2020),Ln=n(74604),Fn=n(37960),Un=n(56168),On=n(34896),Nn=n(62764),kn=n(42248),Gn=n(12788),zn=n(58360),Qn=n(50896),Vn=n(74416),Hn=n(71856),jn=n(68613),Wn=n(95973),Xn=n(71892),Yn=n(56517),qn=n(99018),Kn=n(69612),Jn=n(32288),Zn=n(17408),$n=n(48908),er=n(1508),tr=n(66448),nr=n(75960),rr=n(83456),ir=n(724),sr=n(36323),ar=n(44964),or=n(8616),lr=n(99548),cr=n(61272),hr=n(86822),ur=n(51028),dr=n(56748),pr=n(77248),fr=n(83992),mr=n(40280),gr=n(12728),Ar=n(28557),vr=n(8972),yr=n(91632),xr=n(48584),br=n(52420),Er=n(42308),_r=n(14528),Sr=n(2744),Mr=n(34425),wr=n(51936),Cr=n(74184),Tr=n(87736),Ir=n(23340),Br=n(1412),Rr=n(52080),Pr=n(46664),Dr=n(1688),Lr=n(29812),Fr=n(22533),Ur=n(89576),Or=n(77404),Nr=n(66872),kr=n(13360),Gr=n(4208),zr=n(26272),Qr=n(64624),Vr=n(12560),Hr=n(7076),jr=n(85936),Wr=n(64784),Xr=n(9704);t.MD2CharacterComplex=r.MD2CharacterComplex,t.ConvexObjectBreaker=i.ConvexObjectBreaker,t.MorphBlendMesh=s.MorphBlendMesh,t.GPUComputationRenderer=a.GPUComputationRenderer,t.Gyroscope=o.Gyroscope,t.MorphAnimMesh=l.MorphAnimMesh,t.RollerCoasterGeometry=c.RollerCoasterGeometry,t.RollerCoasterLiftersGeometry=c.RollerCoasterLiftersGeometry,t.RollerCoasterShadowGeometry=c.RollerCoasterShadowGeometry,t.SkyGeometry=c.SkyGeometry,t.TreesGeometry=c.TreesGeometry,t.Timer=h.Timer,t.getErrorMessage=u.getErrorMessage,t.getWebGL2ErrorMessage=u.getWebGL2ErrorMessage,t.getWebGLErrorMessage=u.getWebGLErrorMessage,t.isWebGL2Available=u.isWebGL2Available,t.isWebGLAvailable=u.isWebGLAvailable,t.MD2Character=d.MD2Character,t.VolumeSlice=p.VolumeSlice,t.TubePainter=f.TubePainter,t.Volume=m.Volume,t.ProgressiveLightMap=g.ProgressiveLightMap,t.CSS2DObject=A.CSS2DObject,t.CSS2DRenderer=A.CSS2DRenderer,t.CSS3DObject=v.CSS3DObject,t.CSS3DRenderer=v.CSS3DRenderer,t.CSS3DSprite=v.CSS3DSprite,t.Projector=y.Projector,t.RenderableFace=y.RenderableFace,t.RenderableLine=y.RenderableLine,t.RenderableObject=y.RenderableObject,t.RenderableSprite=y.RenderableSprite,t.RenderableVertex=y.RenderableVertex,t.SVGObject=x.SVGObject,t.SVGRenderer=x.SVGRenderer,t.FlakesTexture=b.FlakesTexture,t.Flow=E.Flow,t.InstancedFlow=E.InstancedFlow,t.getUniforms=E.getUniforms,t.initSplineTexture=E.initSplineTexture,t.modifyShader=E.modifyShader,t.updateSplineTexture=E.updateSplineTexture,t.SimplifyModifier=_.SimplifyModifier,t.EdgeSplitModifier=S.EdgeSplitModifier,t.TessellateModifier=M.TessellateModifier,t.GLTFExporter=w.GLTFExporter,t.USDZExporter=C.USDZExporter,t.PLYExporter=T.PLYExporter,t.DRACOExporter=I.DRACOExporter,t.ColladaExporter=B.ColladaExporter,t.MMDExporter=R.MMDExporter,t.STLExporter=P.STLExporter,t.OBJExporter=D.OBJExporter,t.RoomEnvironment=L.RoomEnvironment,t.AnimationClipCreator=F.AnimationClipCreator,t.CCDIKHelper=U.CCDIKHelper,t.CCDIKSolver=U.CCDIKSolver,t.MMDPhysics=O.MMDPhysics,t.MMDAnimationHelper=N.MMDAnimationHelper,t.BatchedMesh=k.BatchedMesh,t.Reflector=G.Reflector,t.Refractor=z.Refractor,t.ShadowMesh=Q.ShadowMesh,t.Lensflare=V.Lensflare,t.LensflareElement=V.LensflareElement,t.Water=H.Water,t.MarchingCubes=j.MarchingCubes,t.edgeTable=j.edgeTable,t.triTable=j.triTable,t.LightningStorm=W.LightningStorm,t.ReflectorRTT=X.ReflectorRTT,t.ReflectorForSSRPass=Y.ReflectorForSSRPass,t.Sky=q.Sky,t.Water2=K.Water2,t.GroundProjectedEnv=J.GroundProjectedEnv,t.SceneUtils=Z.SceneUtils,t.UVsDebug=$.UVsDebug,t.GeometryUtils=ee.GeometryUtils,t.RoughnessMipmapper=te.RoughnessMipmapper,t.SkeletonUtils=ne.SkeletonUtils,t.ShadowMapViewer=re.ShadowMapViewer,t.computeMorphedAttributes=ie.computeMorphedAttributes,t.estimateBytesUsed=ie.estimateBytesUsed,t.interleaveAttributes=ie.interleaveAttributes,t.mergeBufferAttributes=ie.mergeBufferAttributes,t.mergeBufferGeometries=ie.mergeBufferGeometries,t.mergeVertices=ie.mergeVertices,t.toCreasedNormals=ie.toCreasedNormals,t.toTrianglesDrawMode=ie.toTrianglesDrawMode,t.GeometryCompressionUtils=se.GeometryCompressionUtils,t.PackedPhongMaterial=se.PackedPhongMaterial,t.CinematicCamera=ae.CinematicCamera,t.ConvexHull=oe.ConvexHull,t.Face=oe.Face,t.HalfEdge=oe.HalfEdge,t.VertexList=oe.VertexList,t.VertexNode=oe.VertexNode,t.MeshSurfaceSampler=le.MeshSurfaceSampler,t.SimplexNoise=ce.SimplexNoise,t.OBB=he.OBB,t.Capsule=ue.Capsule,t.ColorConverter=de.ColorConverter,t.ImprovedNoise=pe.ImprovedNoise,t.Octree=fe.Octree,t.ColorMapKeywords=me.ColorMapKeywords,t.Lut=me.Lut,t.CameraControls=ge.CameraControls,t.MapControlsExp=ge.MapControlsExp,t.OrbitControlsExp=ge.OrbitControlsExp,t.STATE=ge.STATE,t.TrackballControlsExp=ge.TrackballControlsExp,t.FirstPersonControls=Ae.FirstPersonControls,t.TransformControls=ve.TransformControls,t.TransformControlsGizmo=ve.TransformControlsGizmo,t.TransformControlsPlane=ve.TransformControlsPlane,t.DragControls=ye.DragControls,t.PointerLockControls=xe.PointerLockControls,t.DeviceOrientationControls=be.DeviceOrientationControls,t.TrackballControls=Ee.TrackballControls,t.MapControls=_e.MapControls,t.OrbitControls=_e.OrbitControls,t.ArcballControls=Se.ArcballControls,t.FlyControls=Me.FlyControls,t.LUTPass=we.LUTPass,t.ClearPass=Ce.ClearPass,t.GlitchPass=Te.GlitchPass,t.HalftonePass=Ie.HalftonePass,t.SMAAPass=Be.SMAAPass,t.FilmPass=Re.FilmPass,t.OutlinePass=Pe.OutlinePass,t.SSAOPass=De.SSAOPass,t.SavePass=Le.SavePass,t.BokehPass=Fe.BokehPass,t.FullScreenQuad=Ue.FullScreenQuad,t.Pass=Ue.Pass,t.TexturePass=Oe.TexturePass,t.AdaptiveToneMappingPass=Ne.AdaptiveToneMappingPass,t.UnrealBloomPass=ke.UnrealBloomPass,t.CubeTexturePass=Ge.CubeTexturePass,t.SAOPass=ze.SAOPass,t.AfterimagePass=Qe.AfterimagePass,t.ClearMaskPass=Ve.ClearMaskPass,t.MaskPass=Ve.MaskPass,t.EffectComposer=He.EffectComposer,t.DotScreenPass=je.DotScreenPass,t.SSRPass=We.SSRPass,t.TAARenderPass=Xe.TAARenderPass,t.ShaderPass=Ye.ShaderPass,t.SSAARenderPass=qe.SSAARenderPass,t.RenderPass=Ke.RenderPass,t.RenderPixelatedPass=Je.RenderPixelatedPass,t.BloomPass=Ze.BloomPass,t.WaterPass=$e.WaterPass,t.ARButton=et.ARButton,t.OculusHandModel=tt.OculusHandModel,t.OculusHandPointerModel=nt.OculusHandPointerModel,t.createText=rt.createText,t.VRButton=it.VRButton,t.XRControllerModelFactory=st.XRControllerModelFactory,t.XREstimatedLight=at.XREstimatedLight,t.XRHandMeshModel=ot.XRHandMeshModel,t.XRHandModelFactory=lt.XRHandModelFactory,t.XRHandPrimitiveModel=ct.XRHandPrimitiveModel,t.ParametricGeometries=ht.ParametricGeometries,t.ParametricGeometry=ut.ParametricGeometry,t.ConvexGeometry=dt.ConvexGeometry,t.LightningStrike=pt.LightningStrike,t.RoundedBoxGeometry=ft.RoundedBoxGeometry,t.BoxLineGeometry=mt.BoxLineGeometry,t.DecalGeometry=gt.DecalGeometry,t.DecalVertex=gt.DecalVertex,t.TeapotGeometry=At.TeapotGeometry,t.TextBufferGeometry=vt.TextGeometry,t.TextGeometry=vt.TextGeometry,t.CSM=yt.CSM,t.CSMFrustum=xt.CSMFrustum,t.CSMHelper=bt.CSMHelper,t.CSMShader=Et.CSMShader,t.ACESFilmicToneMappingShader=_t.ACESFilmicToneMappingShader,t.AfterimageShader=St.AfterimageShader,t.BasicShader=Mt.BasicShader,t.BleachBypassShader=wt.BleachBypassShader,t.BlendShader=Ct.BlendShader,t.BokehShader=Tt.BokehShader,t.BokehDepthShader=It.BokehDepthShader,t.BokehShader2=It.BokehShader2,t.BrightnessContrastShader=Bt.BrightnessContrastShader,t.ColorCorrectionShader=Rt.ColorCorrectionShader,t.ColorifyShader=Pt.ColorifyShader,t.ConvolutionShader=Dt.ConvolutionShader,t.CopyShader=Lt.CopyShader,t.DOFMipMapShader=Ft.DOFMipMapShader,t.BlurShaderUtils=Ut.BlurShaderUtils,t.DepthLimitedBlurShader=Ut.DepthLimitedBlurShader,t.DigitalGlitch=Ot.DigitalGlitch,t.DotScreenShader=Nt.DotScreenShader,t.FXAAShader=kt.FXAAShader,t.FilmShader=Gt.FilmShader,t.FocusShader=zt.FocusShader,t.FreiChenShader=Qt.FreiChenShader,t.FresnelShader=Vt.FresnelShader,t.GammaCorrectionShader=Ht.GammaCorrectionShader,t.GodRaysCombineShader=jt.GodRaysCombineShader,t.GodRaysDepthMaskShader=jt.GodRaysDepthMaskShader,t.GodRaysFakeSunShader=jt.GodRaysFakeSunShader,t.GodRaysGenerateShader=jt.GodRaysGenerateShader,t.HalftoneShader=Wt.HalftoneShader,t.HorizontalBlurShader=Xt.HorizontalBlurShader,t.HorizontalTiltShiftShader=Yt.HorizontalTiltShiftShader,t.HueSaturationShader=qt.HueSaturationShader,t.KaleidoShader=Kt.KaleidoShader,t.LuminosityHighPassShader=Jt.LuminosityHighPassShader,t.LuminosityShader=Zt.LuminosityShader,t.MirrorShader=$t.MirrorShader,t.NormalMapShader=en.NormalMapShader,t.ParallaxShader=tn.ParallaxShader,t.PixelShader=nn.PixelShader,t.RGBShiftShader=rn.RGBShiftShader,t.SAOShader=sn.SAOShader,t.SMAABlendShader=an.SMAABlendShader,t.SMAAEdgesShader=an.SMAAEdgesShader,t.SMAAWeightsShader=an.SMAAWeightsShader,t.SSAOBlurShader=on.SSAOBlurShader,t.SSAODepthShader=on.SSAODepthShader,t.SSAOShader=on.SSAOShader,t.SSRBlurShader=ln.SSRBlurShader,t.SSRDepthShader=ln.SSRDepthShader,t.SSRShader=ln.SSRShader,t.SepiaShader=cn.SepiaShader,t.SobelOperatorShader=hn.SobelOperatorShader,t.SubsurfaceScatteringShader=un.SubsurfaceScatteringShader,t.TechnicolorShader=dn.TechnicolorShader,t.ToneMapShader=pn.ToneMapShader,t.ToonShader1=fn.ToonShader1,t.ToonShader2=fn.ToonShader2,t.ToonShaderDotted=fn.ToonShaderDotted,t.ToonShaderHatching=fn.ToonShaderHatching,t.TriangleBlurShader=mn.TriangleBlurShader,t.UnpackDepthRGBAShader=gn.UnpackDepthRGBAShader,t.VerticalBlurShader=An.VerticalBlurShader,t.VerticalTiltShiftShader=vn.VerticalTiltShiftShader,t.VignetteShader=yn.VignetteShader,t.VolumeRenderShader1=xn.VolumeRenderShader1,t.WaterRefractionShader=bn.WaterRefractionShader,t.HTMLMesh=En.HTMLMesh,t.InteractiveGroup=_n.InteractiveGroup,t.SelectionHelper=Sn.SelectionHelper,t.SelectionBox=Mn.SelectionBox,t.AmmoPhysics=wn.AmmoPhysics,t.ParallaxBarrierEffect=Cn.ParallaxBarrierEffect,t.PeppersGhostEffect=Tn.PeppersGhostEffect,t.OutlineEffect=In.OutlineEffect,t.AnaglyphEffect=Bn.AnaglyphEffect,t.AsciiEffect=Rn.AsciiEffect,t.StereoEffect=Pn.StereoEffect,t.FBXLoader=Dn.FBXLoader,t.Font=Ln.Font,t.FontLoader=Ln.FontLoader,t.TGALoader=Fn.TGALoader,t.LUTCubeLoader=Un.LUTCubeLoader,t.NRRDLoader=On.NRRDLoader,t.STLLoader=Nn.STLLoader,t.MTLLoader=kn.MTLLoader,t.XLoader=Gn.XLoader,t.BVHLoader=zn.BVHLoader,t.KMZLoader=Qn.KMZLoader,t.VRMLoader=Vn.VRMLoader,t.VRMLLoader=Hn.VRMLLoader,t.KTX2Loader=jn.KTX2Loader,t.LottieLoader=Wn.LottieLoader,t.TTFLoader=Xn.TTFLoader,t.RGBELoader=Yn.RGBELoader,t.AssimpLoader=qn.AssimpLoader,t.ColladaLoader=Kn.ColladaLoader,t.MDDLoader=Jn.MDDLoader,t.EXRLoader=Zn.EXRLoader,t.ThreeMFLoader=$n.ThreeMFLoader,t.XYZLoader=er.XYZLoader,t.VTKLoader=tr.VTKLoader,t.LUT3dlLoader=nr.LUT3dlLoader,t.DDSLoader=rr.DDSLoader,t.PVRLoader=ir.PVRLoader,t.GCodeLoader=sr.GCodeLoader,t.BasisTextureLoader=ar.BasisTextureLoader,t.TDSLoader=or.TDSLoader,t.LDrawLoader=lr.LDrawLoader,t.GLTFLoader=cr.GLTFLoader,t.SVGLoader=hr.SVGLoader,t.Rhino3dmLoader=ur.Rhino3dmLoader,t.OBJLoader=dr.OBJLoader,t.AMFLoader=pr.AMFLoader,t.MMDLoader=fr.MMDLoader,t.MD2Loader=mr.MD2Loader,t.KTXLoader=gr.KTXLoader,t.TiltLoader=Ar.TiltLoader,t.DRACOLoader=vr.DRACOLoader,t.HDRCubeTextureLoader=yr.HDRCubeTextureLoader,t.PDBLoader=xr.PDBLoader,t.PRWMLoader=br.PRWMLoader,t.RGBMLoader=Er.RGBMLoader,t.VOXData3DTexture=_r.VOXData3DTexture,t.VOXLoader=_r.VOXLoader,t.VOXMesh=_r.VOXMesh,t.PCDLoader=Sr.PCDLoader,t.LWOLoader=Mr.LWOLoader,t.PLYLoader=wr.PLYLoader,t.LineSegmentsGeometry=Cr.LineSegmentsGeometry,t.LineGeometry=Tr.LineGeometry,t.Wireframe=Ir.Wireframe,t.WireframeGeometry2=Br.WireframeGeometry2,t.Line2=Rr.Line2,t.LineMaterial=Pr.LineMaterial,t.LineSegments2=Dr.LineSegments2,t.LightProbeHelper=Lr.LightProbeHelper,t.VertexTangentsHelper=Fr.VertexTangentsHelper,t.PositionalAudioHelper=Ur.PositionalAudioHelper,t.VertexNormalsHelper=Or.VertexNormalsHelper,t.RectAreaLightHelper=Nr.RectAreaLightHelper,t.RectAreaLightUniformsLib=kr.RectAreaLightUniformsLib,t.LightProbeGenerator=Gr.LightProbeGenerator,t.calcBSplineDerivatives=zr.calcBSplineDerivatives,t.calcBSplinePoint=zr.calcBSplinePoint,t.calcBasisFunctionDerivatives=zr.calcBasisFunctionDerivatives,t.calcBasisFunctions=zr.calcBasisFunctions,t.calcKoverI=zr.calcKoverI,t.calcNURBSDerivatives=zr.calcNURBSDerivatives,t.calcRationalCurveDerivatives=zr.calcRationalCurveDerivatives,t.calcSurfacePoint=zr.calcSurfacePoint,t.findSpan=zr.findSpan,t.NURBSCurve=Qr.NURBSCurve,t.NURBSSurface=Vr.NURBSSurface,t.CinquefoilKnot=Hr.CinquefoilKnot,t.DecoratedTorusKnot4a=Hr.DecoratedTorusKnot4a,t.DecoratedTorusKnot4b=Hr.DecoratedTorusKnot4b,t.DecoratedTorusKnot5a=Hr.DecoratedTorusKnot5a,t.DecoratedTorusKnot5c=Hr.DecoratedTorusKnot5c,t.FigureEightPolynomialKnot=Hr.FigureEightPolynomialKnot,t.GrannyKnot=Hr.GrannyKnot,t.HeartCurve=Hr.HeartCurve,t.HelixCurve=Hr.HelixCurve,t.KnotCurve=Hr.KnotCurve,t.TorusKnot=Hr.TorusKnot,t.TrefoilKnot=Hr.TrefoilKnot,t.TrefoilPolynomialKnot=Hr.TrefoilPolynomialKnot,t.VivianiCurve=Hr.VivianiCurve,t.Face3=jr.Face3,t.Geometry=jr.Geometry,t.MeshoptDecoder=Wr.MeshoptDecoder,t.MotionController=Xr.MotionController,t.MotionControllerConstants=Xr.MotionControllerConstants,t.fetchProfile=Xr.fetchProfile,t.fetchProfilesList=Xr.fetchProfilesList},6240:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Mesh{constructor(e){const t=new s(e),n=new r.PlaneGeometry(.001*t.image.width,.001*t.image.height),i=new r.MeshBasicMaterial({map:t,toneMapped:!1,transparent:!0});function o(e){i.map.dispatchDOMEvent(e)}super(n,i),this.addEventListener("mousedown",o),this.addEventListener("mousemove",o),this.addEventListener("mouseup",o),this.addEventListener("click",o),this.dispose=function(){n.dispose(),i.dispose(),i.map.dispose(),a.delete(e),this.removeEventListener("mousedown",o),this.removeEventListener("mousemove",o),this.removeEventListener("mouseup",o),this.removeEventListener("click",o)}}}class s extends r.CanvasTexture{constructor(e){super(o(e)),this.dom=e,this.anisotropy=16,"colorSpace"in this?this.colorSpace="srgb":this.encoding=3001,this.minFilter=r.LinearFilter,this.magFilter=r.LinearFilter;const t=new MutationObserver((()=>{this.scheduleUpdate||(this.scheduleUpdate=setTimeout((()=>this.update()),16))}));t.observe(e,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),this.observer=t}dispatchDOMEvent(e){e.data&&function(e,t,n,r){const i={clientX:n*e.offsetWidth+e.offsetLeft,clientY:r*e.offsetHeight+e.offsetTop,view:e.ownerDocument.defaultView};window.dispatchEvent(new MouseEvent(t,i));const s=e.getBoundingClientRect();function a(e){if(e.nodeType!==Node.TEXT_NODE&&e.nodeType!==Node.COMMENT_NODE){const s=e.getBoundingClientRect();if(n>s.left&&ns.top&&rparseFloat(e[t]))),i=s.width,a=(n-s.x)/i;e.value=t+(r-t)*a,e.dispatchEvent(new InputEvent("input",{bubbles:!0}))}for(let t=0;tparseFloat(r[e]))),o=(a-n)/(i-n)*(p-f);s(c,d+f/4,p,f/2,f/4),h.fillStyle=t,h.strokeStyle=e,h.lineWidth=1,h.fill(),h.stroke(),s(c,d+f/4,o+f/2,f/2,f/4),h.fillStyle=e,h.fill(),s(c+o,d,f,f,f/2),h.fillStyle=e,h.fill()}"color"!==r.type&&"text"!==r.type&&"number"!==r.type||(u.add({x:c,y:d,width:p,height:f}),i(a,c+parseInt(a.paddingLeft),d+parseInt(a.paddingTop),r.value),u.remove())}}}const m="auto"===a.overflow||"hidden"===a.overflow;m&&u.add({x:c,y:d,width:p,height:f});for(let t=0;t{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Vector2,s={type:"",data:i};class a extends r.Group{constructor(e,t){super();const n=this,a=new r.Raycaster,o=new r.Matrix4,l=e.domElement;function c(e){e.stopPropagation(),i.x=e.clientX/l.clientWidth*2-1,i.y=-e.clientY/l.clientHeight*2+1,a.setFromCamera(i,t);const r=a.intersectObjects(n.children,!1);if(r.length>0){const t=r[0],n=t.object,i=t.uv;s.type=e.type,s.data.set(i.x,1-i.y),n.dispatchEvent(s)}}l.addEventListener("pointerdown",c),l.addEventListener("pointerup",c),l.addEventListener("pointermove",c),l.addEventListener("mousedown",c),l.addEventListener("mouseup",c),l.addEventListener("mousemove",c),l.addEventListener("click",c);const h={move:"mousemove",select:"click",selectstart:"mousedown",selectend:"mouseup"};function u(e){const t=e.target;o.identity().extractRotation(t.matrixWorld),a.ray.origin.setFromMatrixPosition(t.matrixWorld),a.ray.direction.set(0,0,-1).applyMatrix4(o);const r=a.intersectObjects(n.children,!1);if(r.length>0){const t=r[0],n=t.object,i=t.uv;s.type=h[e.type],s.data.set(i.x,1-i.y),n.dispatchEvent(s)}}const d=e.xr.getController(0);d.addEventListener("move",u),d.addEventListener("select",u),d.addEventListener("selectstart",u),d.addEventListener("selectend",u);const p=e.xr.getController(1);p.addEventListener("move",u),p.addEventListener("select",u),p.addEventListener("selectstart",u),p.addEventListener("selectend",u)}}t.InteractiveGroup=a},29752:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Frustum,s=new r.Vector3,a=new r.Vector3,o=new r.Vector3,l=new r.Vector3,c=new r.Vector3,h=new r.Vector3,u=new r.Vector3,d=new r.Vector3,p=new r.Vector3,f=new r.Vector3,m=new r.Vector3,g=new r.Vector3,A=new r.Vector3,v=new r.Vector3;t.SelectionBox=class{constructor(e,t,n){this.camera=e,this.scene=t,this.startPoint=new r.Vector3,this.endPoint=new r.Vector3,this.collection=[],this.deep=n||Number.MAX_VALUE}select(e,t){return this.startPoint=e||this.startPoint,this.endPoint=t||this.endPoint,this.collection=[],this.updateFrustum(this.startPoint,this.endPoint),this.searchChildInFrustum(i,this.scene),this.collection}updateFrustum(e,t){if(e=e||this.startPoint,t=t||this.endPoint,e.x===t.x&&(t.x+=Number.EPSILON),e.y===t.y&&(t.y+=Number.EPSILON),this.camera.updateProjectionMatrix(),this.camera.updateMatrixWorld(),this.camera.isPerspectiveCamera)a.copy(e),a.x=Math.min(e.x,t.x),a.y=Math.max(e.y,t.y),t.x=Math.max(e.x,t.x),t.y=Math.min(e.y,t.y),o.setFromMatrixPosition(this.camera.matrixWorld),l.copy(a),c.set(t.x,a.y,0),h.copy(t),u.set(a.x,t.y,0),l.unproject(this.camera),c.unproject(this.camera),h.unproject(this.camera),u.unproject(this.camera),g.copy(l).sub(o),A.copy(c).sub(o),v.copy(h).sub(o),g.normalize(),A.normalize(),v.normalize(),g.multiplyScalar(this.deep),A.multiplyScalar(this.deep),v.multiplyScalar(this.deep),g.add(o),A.add(o),v.add(o),(n=i.planes)[0].setFromCoplanarPoints(o,l,c),n[1].setFromCoplanarPoints(o,c,h),n[2].setFromCoplanarPoints(h,u,o),n[3].setFromCoplanarPoints(u,l,o),n[4].setFromCoplanarPoints(c,h,u),n[5].setFromCoplanarPoints(v,A,g),n[5].normal.multiplyScalar(-1);else if(this.camera.isOrthographicCamera){const r=Math.min(e.x,t.x),s=Math.max(e.y,t.y),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y);var n;l.set(r,s,-1),c.set(a,s,-1),h.set(a,o,-1),u.set(r,o,-1),d.set(r,s,1),p.set(a,s,1),f.set(a,o,1),m.set(r,o,1),l.unproject(this.camera),c.unproject(this.camera),h.unproject(this.camera),u.unproject(this.camera),d.unproject(this.camera),p.unproject(this.camera),f.unproject(this.camera),m.unproject(this.camera),(n=i.planes)[0].setFromCoplanarPoints(l,d,p),n[1].setFromCoplanarPoints(c,p,f),n[2].setFromCoplanarPoints(f,m,u),n[3].setFromCoplanarPoints(m,d,l),n[4].setFromCoplanarPoints(c,h,u),n[5].setFromCoplanarPoints(f,p,d),n[5].normal.multiplyScalar(-1)}else console.error("THREE.SelectionBox: Unsupported camera type.")}searchChildInFrustum(e,t){if((t.isMesh||t.isLine||t.isPoints)&&void 0!==t.material&&(null===t.geometry.boundingSphere&&t.geometry.computeBoundingSphere(),s.copy(t.geometry.boundingSphere.center),s.applyMatrix4(t.matrixWorld),e.containsPoint(s)&&this.collection.push(t)),t.children.length>0)for(let n=0;n{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.SelectionHelper=class{constructor(e,t,n){this.element=document.createElement("div"),this.element.classList.add(n),this.element.style.pointerEvents="none",this.renderer=t,this.startPoint=new r.Vector2,this.pointTopLeft=new r.Vector2,this.pointBottomRight=new r.Vector2,this.isDown=!1,this.renderer.domElement.addEventListener("pointerdown",(e=>{this.isDown=!0,this.onSelectStart(e)})),this.renderer.domElement.addEventListener("pointermove",(e=>{this.isDown&&this.onSelectMove(e)})),this.renderer.domElement.addEventListener("pointerup",(e=>{this.isDown=!1,this.onSelectOver(e)}))}onSelectStart(e){this.renderer.domElement.parentElement.appendChild(this.element),this.element.style.left=`${e.clientX}px`,this.element.style.top=`${e.clientY}px`,this.element.style.width="0px",this.element.style.height="0px",this.startPoint.x=e.clientX,this.startPoint.y=e.clientY}onSelectMove(e){this.pointBottomRight.x=Math.max(this.startPoint.x,e.clientX),this.pointBottomRight.y=Math.max(this.startPoint.y,e.clientY),this.pointTopLeft.x=Math.min(this.startPoint.x,e.clientX),this.pointTopLeft.y=Math.min(this.startPoint.y,e.clientY),this.element.style.left=`${this.pointTopLeft.x}px`,this.element.style.top=`${this.pointTopLeft.y}px`,this.element.style.width=this.pointBottomRight.x-this.pointTopLeft.x+"px",this.element.style.height=this.pointBottomRight.y-this.pointTopLeft.y+"px"}onSelectOver(){this.element.parentElement.removeChild(this.element)}}},64784:(e,t)=>{"use strict";let n;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.MeshoptDecoder=()=>{if(n)return n;const e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if("object"!=typeof WebAssembly)return{supported:!1};let r,i="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB";WebAssembly.validate(e)&&(i="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");const s=WebAssembly.instantiate(function(e){const n=new Uint8Array(e.length);for(let t=0;t96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let r=0;for(let i=0;i{r=e.instance,r.exports.__wasm_call_ctors()}));function a(e,t,n,i,s,a){const o=r.exports.sbrk,l=n+3&-4,c=o(l*i),h=o(s.length),u=new Uint8Array(r.exports.memory.buffer);u.set(s,h);const d=e(c,n,i,h,s.length);if(0===d&&a&&a(c,l,i),t.set(u.subarray(c,c+n*i)),o(c-o(0)),0!==d)throw new Error(`Malformed buffer data: ${d}`)}const o={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},l={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return n={ready:s,supported:!0,decodeVertexBuffer(e,t,n,i,s){a(r.exports.meshopt_decodeVertexBuffer,e,t,n,i,r.exports[o[s]])},decodeIndexBuffer(e,t,n,i){a(r.exports.meshopt_decodeIndexBuffer,e,t,n,i)},decodeIndexSequence(e,t,n,i){a(r.exports.meshopt_decodeIndexSequence,e,t,n,i)},decodeGltfBuffer(e,t,n,i,s,c){a(r.exports[l[s]],e,t,n,i,r.exports[o[c]])}},n}},9704:(e,t)=>{"use strict";var n=Object.defineProperty,r=(e,t,r)=>(((e,t,r)=>{t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const i={Handedness:{NONE:"none",LEFT:"left",RIGHT:"right"},ComponentState:{DEFAULT:"default",TOUCHED:"touched",PRESSED:"pressed"},ComponentProperty:{BUTTON:"button",X_AXIS:"xAxis",Y_AXIS:"yAxis",STATE:"state"},ComponentType:{TRIGGER:"trigger",SQUEEZE:"squeeze",TOUCHPAD:"touchpad",THUMBSTICK:"thumbstick",BUTTON:"button"},ButtonTouchThreshold:.05,AxisTouchThreshold:.1,VisualResponseProperty:{TRANSFORM:"transform",VISIBILITY:"visibility"}};async function s(e){const t=await fetch(e);if(t.ok)return t.json();throw new Error(t.statusText)}async function a(e){if(!e)throw new Error("No basePath supplied");return await s(`${e}/profilesList.json`)}const o={xAxis:0,yAxis:0,button:0,state:i.ComponentState.DEFAULT};class l{constructor(e){r(this,"value"),r(this,"componentProperty"),r(this,"states"),r(this,"valueNodeName"),r(this,"valueNodeProperty"),r(this,"minNodeName"),r(this,"maxNodeName"),r(this,"valueNode"),r(this,"minNode"),r(this,"maxNode"),this.componentProperty=e.componentProperty,this.states=e.states,this.valueNodeName=e.valueNodeName,this.valueNodeProperty=e.valueNodeProperty,this.valueNodeProperty===i.VisualResponseProperty.TRANSFORM&&(this.minNodeName=e.minNodeName,this.maxNodeName=e.maxNodeName),this.value=0,this.updateFromComponent(o)}updateFromComponent({xAxis:e,yAxis:t,button:n,state:r}){const{normalizedXAxis:s,normalizedYAxis:a}=function(e=0,t=0){let n=e,r=t;if(Math.sqrt(e*e+t*t)>1){const i=Math.atan2(t,e);n=Math.cos(i),r=Math.sin(i)}return{normalizedXAxis:.5*n+.5,normalizedYAxis:.5*r+.5}}(e,t);switch(this.componentProperty){case i.ComponentProperty.X_AXIS:this.value=this.states.includes(r)?s:.5;break;case i.ComponentProperty.Y_AXIS:this.value=this.states.includes(r)?a:.5;break;case i.ComponentProperty.BUTTON:this.value=this.states.includes(r)&&n?n:0;break;case i.ComponentProperty.STATE:this.valueNodeProperty===i.VisualResponseProperty.VISIBILITY?this.value=this.states.includes(r):this.value=this.states.includes(r)?1:0;break;default:throw new Error(`Unexpected visualResponse componentProperty ${this.componentProperty}`)}}}class c{constructor(e,t){if(r(this,"id"),r(this,"values"),r(this,"type"),r(this,"gamepadIndices"),r(this,"rootNodeName"),r(this,"visualResponses"),r(this,"touchPointNodeName"),r(this,"touchPointNode"),!(e&&t&&t.visualResponses&&t.gamepadIndices&&0!==Object.keys(t.gamepadIndices).length))throw new Error("Invalid arguments supplied");this.id=e,this.type=t.type,this.rootNodeName=t.rootNodeName,this.touchPointNodeName=t.touchPointNodeName,this.visualResponses={},Object.keys(t.visualResponses).forEach((e=>{const n=new l(t.visualResponses[e]);this.visualResponses[e]=n})),this.gamepadIndices=Object.assign({},t.gamepadIndices),this.values={state:i.ComponentState.DEFAULT,button:void 0!==this.gamepadIndices.button?0:void 0,xAxis:void 0!==this.gamepadIndices.xAxis?0:void 0,yAxis:void 0!==this.gamepadIndices.yAxis?0:void 0}}get data(){return{id:this.id,...this.values}}updateFromGamepad(e){if(this.values.state=i.ComponentState.DEFAULT,void 0!==this.gamepadIndices.button&&e.buttons.length>this.gamepadIndices.button){const t=e.buttons[this.gamepadIndices.button];this.values.button=t.value,this.values.button=this.values.button<0?0:this.values.button,this.values.button=this.values.button>1?1:this.values.button,t.pressed||1===this.values.button?this.values.state=i.ComponentState.PRESSED:(t.touched||this.values.button>i.ButtonTouchThreshold)&&(this.values.state=i.ComponentState.TOUCHED)}void 0!==this.gamepadIndices.xAxis&&e.axes.length>this.gamepadIndices.xAxis&&(this.values.xAxis=e.axes[this.gamepadIndices.xAxis],this.values.xAxis=this.values.xAxis<-1?-1:this.values.xAxis,this.values.xAxis=this.values.xAxis>1?1:this.values.xAxis,this.values.state===i.ComponentState.DEFAULT&&Math.abs(this.values.xAxis)>i.AxisTouchThreshold&&(this.values.state=i.ComponentState.TOUCHED)),void 0!==this.gamepadIndices.yAxis&&e.axes.length>this.gamepadIndices.yAxis&&(this.values.yAxis=e.axes[this.gamepadIndices.yAxis],this.values.yAxis=this.values.yAxis<-1?-1:this.values.yAxis,this.values.yAxis=this.values.yAxis>1?1:this.values.yAxis,this.values.state===i.ComponentState.DEFAULT&&Math.abs(this.values.yAxis)>i.AxisTouchThreshold&&(this.values.state=i.ComponentState.TOUCHED)),Object.values(this.visualResponses).forEach((e=>{e.updateFromComponent(this.values)}))}}t.MotionController=class{constructor(e,t,n){if(r(this,"xrInputSource"),r(this,"assetUrl"),r(this,"layoutDescription"),r(this,"id"),r(this,"components"),!e)throw new Error("No xrInputSource supplied");if(!t)throw new Error("No profile supplied");if(!t.layouts[e.handedness])throw new Error("No layout for "+e.handedness+" handedness");this.xrInputSource=e,this.assetUrl=n,this.id=t.profileId,this.layoutDescription=t.layouts[e.handedness],this.components={},Object.keys(this.layoutDescription.components).forEach((e=>{const t=this.layoutDescription.components[e];this.components[e]=new c(e,t)})),this.updateFromGamepad()}get gripSpace(){return this.xrInputSource.gripSpace}get targetRaySpace(){return this.xrInputSource.targetRaySpace}get data(){const e=[];return Object.values(this.components).forEach((t=>{e.push(t.data)})),e}updateFromGamepad(){Object.values(this.components).forEach((e=>{e.updateFromGamepad(this.xrInputSource.gamepad)}))}},t.MotionControllerConstants=i,t.fetchProfile=async function(e,t,n=null,r=!0){if(!e)throw new Error("No xrInputSource supplied");if(!t)throw new Error("No basePath supplied");const i=await a(t);let o;if(e.profiles.some((e=>{const n=i[e];return n&&(o={profileId:e,profilePath:`${t}/${n.path}`,deprecated:!!n.deprecated}),!!o})),!o){if(!n)throw new Error("No matching profile name found");const e=i[n];if(!e)throw new Error(`No matching profile name found and default profile "${n}" missing.`);o={profileId:n,profilePath:`${t}/${e.path}`,deprecated:!!e.deprecated}}const l=await s(o.profilePath);let c;if(r){let t;if(t="any"===e.handedness?l.layouts[Object.keys(l.layouts)[0]]:l.layouts[e.handedness],!t)throw new Error(`No matching handedness, ${e.handedness}, in profile ${o.profileId}`);t.assetPath&&(c=o.profilePath.replace("profile.json",t.assetPath))}return{profile:l,assetPath:c}},t.fetchProfilesList=a},99444:(e,t,n)=>{"use strict";e=n.nmd(e),Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const{CstParser:r,Lexer:i,createToken:s}=(()=>{const r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var i="object"==typeof self&&self&&self.Object===Object&&self;const s=r||i||Function("return this")();const a=s.Symbol;var o=Object.prototype,l=o.hasOwnProperty,c=o.toString,h=a?a.toStringTag:void 0;var u=Object.prototype.toString;var d="[object Null]",p="[object Undefined]",f=a?a.toStringTag:void 0;function m(e){return null==e?void 0===e?p:d:f&&f in Object(e)?function(e){var t=l.call(e,h),n=e[h];try{e[h]=void 0;var r=!0}catch(s){}var i=c.call(e);return r&&(t?e[h]=n:delete e[h]),i}(e):function(e){return u.call(e)}(e)}function g(e){return null!=e&&"object"==typeof e}var A="[object Symbol]";function v(e){return"symbol"==typeof e||g(e)&&m(e)==A}function y(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n0){if(++de>=800)return arguments[0]}else de=0;return ue.apply(void 0,arguments)});function me(e,t){for(var n=-1,r=null==e?0:e.length;++n-1}var xe=9007199254740991,be=/^(?:0|[1-9]\d*)$/;function Ee(e,t){var n=typeof e;return!!(t=null==t?xe:t)&&("number"==n||"symbol"!=n&&be.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Be}function Pe(e){return null!=e&&Re(e.length)&&!V(e)}function De(e,t,n){if(!T(n))return!1;var r=typeof t;return!!("number"==r?Pe(n)&&Ee(t,n.length):"string"==r&&t in n)&&Se(n[t],e)}var Le=Object.prototype;function Fe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Le)}function Ue(e){return g(e)&&"[object Arguments]"==m(e)}var Oe=Object.prototype,Ne=Oe.hasOwnProperty,ke=Oe.propertyIsEnumerable;const Ge=Ue(function(){return arguments}())?Ue:function(e){return g(e)&&Ne.call(e,"callee")&&!ke.call(e,"callee")};var ze=t&&!t.nodeType&&t,Qe=ze&&e&&!e.nodeType&&e,Ve=Qe&&Qe.exports===ze?s.Buffer:void 0;const He=(Ve?Ve.isBuffer:void 0)||function(){return!1};var je={};function We(e){return function(t){return e(t)}}je["[object Float32Array]"]=je["[object Float64Array]"]=je["[object Int8Array]"]=je["[object Int16Array]"]=je["[object Int32Array]"]=je["[object Uint8Array]"]=je["[object Uint8ClampedArray]"]=je["[object Uint16Array]"]=je["[object Uint32Array]"]=!0,je["[object Arguments]"]=je["[object Array]"]=je["[object ArrayBuffer]"]=je["[object Boolean]"]=je["[object DataView]"]=je["[object Date]"]=je["[object Error]"]=je["[object Function]"]=je["[object Map]"]=je["[object Number]"]=je["[object Object]"]=je["[object RegExp]"]=je["[object Set]"]=je["[object String]"]=je["[object WeakMap]"]=!1;var Xe=t&&!t.nodeType&&t,Ye=Xe&&e&&!e.nodeType&&e,qe=Ye&&Ye.exports===Xe&&r.process;const Ke=function(){try{var e=Ye&&Ye.require&&Ye.require("util").types;return e||qe&&qe.binding&&qe.binding("util")}catch(t){}}();var Je=Ke&&Ke.isTypedArray;const Ze=Je?We(Je):function(e){return g(e)&&Re(e.length)&&!!je[m(e)]};var $e=Object.prototype.hasOwnProperty;function et(e,t){var n=x(e),r=!n&&Ge(e),i=!n&&!r&&He(e),s=!n&&!r&&!i&&Ze(e),a=n||r||i||s,o=a?function(e,t){for(var n=-1,r=Array(e);++n1?t[r-1]:void 0,s=r>2?t[2]:void 0;for(i=at.length>3&&"function"==typeof i?(r--,i):void 0,s&&De(t[0],t[1],s)&&(i=r<3?void 0:i,r=1),e=Object(e);++n-1},bt.prototype.set=function(e,t){var n=this.__data__,r=yt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const Et=ne(s,"Map");function _t(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function St(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t0&&n(o)?t>1?Nt(o,t-1,n,r,i):Ft(i,o):r||(i[i.length]=o)}return i}function kt(e){return(null==e?0:e.length)?Nt(e,1):[]}const Gt=tt(Object.getPrototypeOf,Object);function zt(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++ro))return!1;var c=s.get(e),h=s.get(t);if(c&&h)return c==t&&h==e;var u=-1,d=!0,p=n&ur?new or:void 0;for(s.set(e,t),s.set(t,e);++u2?t[2]:void 0;for(i&&De(t[0],t[1],i)&&(r=1);++n=200&&(s=cr,a=!1,t=new or(t));e:for(;++i-1?r[i?e[s]:s]:void 0});function bi(e){return e&&e.length?e[0]:void 0}function Ei(e,t){var n=-1,r=Pe(e)?Array(e.length):[];return ti(e,(function(e,i,s){r[++n]=t(e,i,s)})),r}function _i(e,t){return(x(e)?y:Ei)(e,Jr(t))}function Si(e,t){return Nt(_i(e,t),1)}var Mi,wi,Ci=Object.prototype.hasOwnProperty,Ti=(Mi=function(e,t,n){Ci.call(e,n)?e[n].push(t):_e(e,n,[t])},function(e,t){var n=x(e)?Zr:ni,r=wi?wi():{};return n(e,Mi,Jr(t),r)});const Ii=Ti;var Bi=Object.prototype.hasOwnProperty;function Ri(e,t){return null!=e&&Bi.call(e,t)}function Pi(e,t){return null!=e&&jr(e,t,Ri)}var Di="[object String]";function Li(e){return"string"==typeof e||!x(e)&&g(e)&&m(e)==Di}function Fi(e){return null==e?[]:function(e,t){return y(t,(function(t){return e[t]}))}(e,st(e))}var Ui=Math.max;function Oi(e,t,n,r){e=Pe(e)?e:Fi(e),n=n&&!r?O(n):0;var i=e.length;return n<0&&(n=Ui(i+n,0)),Li(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&ve(e,t,n)>-1}var Ni=Math.max;function ki(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:O(n);return i<0&&(i=Ni(r+i,0)),ve(e,t,i)}var Gi="[object Map]",zi="[object Set]",Qi=Object.prototype.hasOwnProperty;function Vi(e){if(null==e)return!0;if(Pe(e)&&(x(e)||"string"==typeof e||"function"==typeof e.splice||He(e)||Ze(e)||Ge(e)))return!e.length;var t=vn(e);if(t==Gi||t==zi)return!e.size;if(Fe(e))return!it(e).length;for(var n in e)if(Qi.call(e,n))return!1;return!0}var Hi=Ke&&Ke.isRegExp;const ji=Hi?We(Hi):function(e){return g(e)&&"[object RegExp]"==m(e)};function Wi(e){return void 0===e}var Xi="Expected a function";function Yi(e,t,n,r){if(!T(e))return e;for(var i=-1,s=(t=Rt(t,e)).length,a=s-1,o=e;null!=o&&++i=ns){var c=t?null:ts(e);if(c)return fr(c);a=!1,i=cr,l=new or}else l=t?[]:o;e:for(;++r{t.accept(e)}))}}class hs extends cs{constructor(e){super([]),this.idx=1,lt(this,qi(e,(e=>void 0!==e)))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class us extends cs{constructor(e){super(e.definition),this.orgText="",lt(this,qi(e,(e=>void 0!==e)))}}class ds extends cs{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,lt(this,qi(e,(e=>void 0!==e)))}}class ps extends cs{constructor(e){super(e.definition),this.idx=1,lt(this,qi(e,(e=>void 0!==e)))}}class fs extends cs{constructor(e){super(e.definition),this.idx=1,lt(this,qi(e,(e=>void 0!==e)))}}class ms extends cs{constructor(e){super(e.definition),this.idx=1,lt(this,qi(e,(e=>void 0!==e)))}}class gs extends cs{constructor(e){super(e.definition),this.idx=1,lt(this,qi(e,(e=>void 0!==e)))}}class As extends cs{constructor(e){super(e.definition),this.idx=1,lt(this,qi(e,(e=>void 0!==e)))}}class vs extends cs{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,lt(this,qi(e,(e=>void 0!==e)))}}class ys{constructor(e){this.idx=1,lt(this,qi(e,(e=>void 0!==e)))}accept(e){e.visit(this)}}function xs(e){function t(e){return _i(e,xs)}if(e instanceof hs){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return Li(e.label)&&(t.label=e.label),t}if(e instanceof ds)return{type:"Alternative",definition:t(e.definition)};if(e instanceof ps)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof fs)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof ms)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:xs(new ys({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof As)return{type:"RepetitionWithSeparator",idx:e.idx,separator:xs(new ys({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof gs)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof vs)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof ys){const t={type:"Terminal",name:e.terminalType.name,label:ls(e.terminalType),idx:e.idx};Li(e.label)&&(t.terminalLabel=e.label);const n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=ji(n)?n.source:n),t}if(e instanceof us)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}class bs{visit(e){const t=e;switch(t.constructor){case hs:return this.visitNonTerminal(t);case ds:return this.visitAlternative(t);case ps:return this.visitOption(t);case fs:return this.visitRepetitionMandatory(t);case ms:return this.visitRepetitionMandatoryWithSeparator(t);case As:return this.visitRepetitionWithSeparator(t);case gs:return this.visitRepetition(t);case vs:return this.visitAlternation(t);case ys:return this.visitTerminal(t);case us:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Es(e,t=[]){return!!(e instanceof ps||e instanceof gs||e instanceof As)||(e instanceof vs?es(e.definition,(e=>Es(e,t))):!(e instanceof hs&&Oi(t,e))&&(e instanceof cs&&(e instanceof hs&&t.push(e),mi(e.definition,(e=>Es(e,t))))))}function _s(e){if(e instanceof hs)return"SUBRULE";if(e instanceof ps)return"OPTION";if(e instanceof vs)return"OR";if(e instanceof fs)return"AT_LEAST_ONE";if(e instanceof ms)return"AT_LEAST_ONE_SEP";if(e instanceof As)return"MANY_SEP";if(e instanceof gs)return"MANY";if(e instanceof ys)return"CONSUME";throw Error("non exhaustive match")}class Ss{walk(e,t=[]){di(e.definition,((n,r)=>{const i=hi(e.definition,r+1);if(n instanceof hs)this.walkProdRef(n,i,t);else if(n instanceof ys)this.walkTerminal(n,i,t);else if(n instanceof ds)this.walkFlat(n,i,t);else if(n instanceof ps)this.walkOption(n,i,t);else if(n instanceof fs)this.walkAtLeastOne(n,i,t);else if(n instanceof ms)this.walkAtLeastOneSep(n,i,t);else if(n instanceof As)this.walkManySep(n,i,t);else if(n instanceof gs)this.walkMany(n,i,t);else{if(!(n instanceof vs))throw Error("non exhaustive match");this.walkOr(n,i,t)}}))}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new ps({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=Ms(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new ps({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=Ms(e,t,n);this.walk(e,r)}walkOr(e,t,n){const r=t.concat(n);di(e.definition,(e=>{const t=new ds({definition:[e]});this.walk(t,r)}))}}function Ms(e,t,n){return[new ps({definition:[new ys({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function ws(e){if(e instanceof hs)return ws(e.referencedRule);if(e instanceof ys)return[e.terminalType];if(function(e){return e instanceof ds||e instanceof ps||e instanceof gs||e instanceof fs||e instanceof ms||e instanceof As||e instanceof ys||e instanceof us}(e))return function(e){let t=[];const n=e.definition;let r,i=0,s=n.length>i,a=!0;for(;s&&a;)r=n[i],a=Es(r),t=t.concat(ws(r)),i+=1,s=n.length>i;return rs(t)}(e);if(function(e){return e instanceof vs}(e))return function(e){const t=_i(e.definition,(e=>ws(e)));return rs(kt(t))}(e);throw Error("non exhaustive match")}const Cs="_~IN~_";class Ts extends Ss{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=(i=e.referencedRule,s=e.idx,i.name+s+Cs+this.topProd.name);var i,s;const a=t.concat(n),o=ws(new ds({definition:a}));this.follows[r]=o}}function Is(e){return e.charCodeAt(0)}function Bs(e,t){Array.isArray(e)?e.forEach((function(e){t.push(e)})):t.push(e)}function Rs(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t],e[t]=!0}function Ps(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function Ds(e){return"Character"===e.type}const Ls=[];for(let e=Is("0");e<=Is("9");e++)Ls.push(e);const Fs=[Is("_")].concat(Ls);for(let e=Is("a");e<=Is("z");e++)Fs.push(e);for(let e=Is("A");e<=Is("Z");e++)Fs.push(e);const Us=[Is(" "),Is("\f"),Is("\n"),Is("\r"),Is("\t"),Is("\v"),Is("\t"),Is("\xa0"),Is("\u1680"),Is("\u2000"),Is("\u2001"),Is("\u2002"),Is("\u2003"),Is("\u2004"),Is("\u2005"),Is("\u2006"),Is("\u2007"),Is("\u2008"),Is("\u2009"),Is("\u200a"),Is("\u2028"),Is("\u2029"),Is("\u202f"),Is("\u205f"),Is("\u3000"),Is("\ufeff")],Os=/[0-9a-fA-F]/,Ns=/[0-9]/,ks=/[1-9]/;class Gs{visitChildren(e){for(const t in e){const n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((e=>{this.visit(e)}),this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}let zs={};const Qs=new class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":Rs(n,"global");break;case"i":Rs(n,"ignoreCase");break;case"m":Rs(n,"multiLine");break;case"u":Rs(n,"unicode");break;case"y":Rs(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":let t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}Ps(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return function(){throw Error("Internal Error - Should never get here!")}()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;Ps(t)}if(!0!==e||void 0!==t)return Ps(t)?("?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t):void 0}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}if(void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),Ps(e))return e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[Is("\n"),Is("\r"),Is("\u2028"),Is("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=Ls;break;case"D":e=Ls,t=!0;break;case"s":e=Us;break;case"S":e=Us,t=!0;break;case"w":e=Fs;break;case"W":e=Fs,t=!0}if(Ps(e))return{type:"Set",value:e,complement:t}}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=Is("\f");break;case"n":e=Is("\n");break;case"r":e=Is("\r");break;case"t":e=Is("\t");break;case"v":e=Is("\v")}if(Ps(e))return{type:"Character",value:e}}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:Is("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:Is(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:Is(this.popChar())}}}characterClass(){const e=[];let t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){const t=this.classAtom();if(t.type,Ds(t)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();if(n.type,Ds(n)){if(n.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}};function Vs(e){const t=e.toString();if(zs.hasOwnProperty(t))return zs[t];{const e=Qs.pattern(t);return zs[t]=e,e}}const Hs="Complement Sets are not supported for first char optimization",js='Unable to use "first char" lexer optimizations:\n';function Ws(e,t=!1){try{const t=Vs(e);return Xs(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===Hs)t&&ss(`${js}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),is(`${js}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Xs(e,t,n){switch(e.type){case"Disjunction":for(let i=0;i{if("number"==typeof e)Ys(e,t,n);else{const r=e;if(!0===n)for(let e=r.from;e<=r.to;e++)Ys(e,t,n);else{for(let e=r.from;e<=r.to&&e=ga){const e=r.from>=ga?r.from:ga,n=r.to,i=va(e),s=va(n);for(let r=i;r<=s;r++)t[r]=r}}}}));break;case"Group":Xs(s.value,t,n);break;default:throw Error("Non Exhaustive Match")}const a=void 0!==s.quantifier&&0===s.quantifier.atLeast;if("Group"===s.type&&!1===Ks(s)||"Group"!==s.type&&!1===a)break}break;default:throw Error("non exhaustive match!")}return Fi(t)}function Ys(e,t,n){const r=va(e);t[r]=r,!0===n&&function(e,t){const n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){const e=va(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=va(e.charCodeAt(0));t[n]=n}}}(e,t)}function qs(e,t){return xi(e.value,(e=>{if("number"==typeof e)return Oi(t,e);{const n=e;return void 0!==xi(t,(e=>n.from<=e&&e<=n.to))}}))}function Ks(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(x(e.value)?mi(e.value,Ks):Ks(e.value))}class Js extends Gs{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}super.visitChildren(e)}}visitCharacter(e){Oi(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===qs(e,this.targetCharCodes)&&(this.found=!0):void 0!==qs(e,this.targetCharCodes)&&(this.found=!0)}}function Zs(e,t){if(t instanceof RegExp){const n=Vs(t),r=new Js(e);return r.visit(n),r.found}return void 0!==xi(t,(t=>Oi(e,t.charCodeAt(0))))}const $s="PATTERN",ea="defaultMode",ta="modes";let na="boolean"==typeof new RegExp("(?:)").sticky;function ra(e,t){const n=(t=si(t,{useSticky:na,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()})).tracer;let r;n("initCharCodeToOptimizedIndexMap",(()=>{!function(){if(Vi(Aa)){Aa=new Array(65536);for(let e=0;e<65536;e++)Aa[e]=e>255?255+~~(e/255):e}}()})),n("Reject Lexer.NA",(()=>{r=Zi(e,(e=>e[$s]===Pa.NA))}));let i,s,a,o,l,c,h,u,d,p,f,m=!1;n("Transform Patterns",(()=>{m=!1,i=_i(r,(e=>{const n=e[$s];if(ji(n)){const e=n.source;return 1!==e.length||"^"===e||"$"===e||"."===e||n.ignoreCase?2!==e.length||"\\"!==e[0]||Oi(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?t.useSticky?la(n):oa(n):e[1]:e}if(V(n))return m=!0,{exec:n};if("object"==typeof n)return m=!0,n;if("string"==typeof n){if(1===n.length)return n;{const e=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),r=new RegExp(e);return t.useSticky?la(r):oa(r)}}throw Error("non exhaustive match")}))})),n("misc mapping",(()=>{s=_i(r,(e=>e.tokenTypeIdx)),a=_i(r,(e=>{const t=e.GROUP;if(t!==Pa.SKIPPED){if(Li(t))return t;if(Wi(t))return!1;throw Error("non exhaustive match")}})),o=_i(r,(e=>{const t=e.LONGER_ALT;if(t){return x(t)?_i(t,(e=>ki(r,e))):[ki(r,t)]}})),l=_i(r,(e=>e.PUSH_MODE)),c=_i(r,(e=>Pi(e,"POP_MODE")))})),n("Line Terminator Handling",(()=>{const e=fa(t.lineTerminatorCharacters);h=_i(r,(e=>!1)),"onlyOffset"!==t.positionTracking&&(h=_i(r,(t=>Pi(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===pa(t,e)&&Zs(e,t.PATTERN))))})),n("Misc Mapping #2",(()=>{u=_i(r,ha),d=_i(i,ua),p=Ji(r,((e,t)=>{const n=t.GROUP;return Li(n)&&n!==Pa.SKIPPED&&(e[n]=[]),e}),{}),f=_i(i,((e,t)=>({pattern:i[t],longerAlt:o[t],canLineTerminator:h[t],isCustom:u[t],short:d[t],group:a[t],push:l[t],pop:c[t],tokenTypeIdx:s[t],tokenType:r[t]})))}));let g=!0,A=[];return t.safeMode||n("First Char Optimization",(()=>{A=Ji(r,((e,n,r)=>{if("string"==typeof n.PATTERN){const t=va(n.PATTERN.charCodeAt(0));ma(e,t,f[r])}else if(x(n.START_CHARS_HINT)){let t;di(n.START_CHARS_HINT,(n=>{const i=va("string"==typeof n?n.charCodeAt(0):n);t!==i&&(t=i,ma(e,i,f[r]))}))}else if(ji(n.PATTERN))if(n.PATTERN.unicode)g=!1,t.ensureOptimizations&&is(`${js}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const i=Ws(n.PATTERN,t.ensureOptimizations);Vi(i)&&(g=!1),di(i,(t=>{ma(e,t,f[r])}))}else t.ensureOptimizations&&is(`${js}\tTokenType: <${n.name}> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),g=!1;return e}),[])})),{emptyGroups:p,patternIdxToConfig:f,charCodeToPatternIdxToConfig:A,hasCustom:m,canBeOptimized:g}}function ia(e,t){let n=[];const r=function(e){const t=Ai(e,(e=>!Pi(e,$s))),n=_i(t,(e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:Ia.MISSING_PATTERN,tokenTypes:[e]}))),r=li(e,t);return{errors:n,valid:r}}(e);n=n.concat(r.errors);const i=function(e){const t=Ai(e,(e=>{const t=e[$s];return!(ji(t)||V(t)||Pi(t,"exec")||Li(t))})),n=_i(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Ia.INVALID_PATTERN,tokenTypes:[e]}))),r=li(e,t);return{errors:n,valid:r}}(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(function(e){let t=[];const n=Ai(e,(e=>ji(e[$s])));return t=t.concat(function(e){class t extends Gs{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}const n=Ai(e,(e=>{const n=e.PATTERN;try{const e=Vs(n),r=new t;return r.visit(e),r.found}catch(r){return sa.test(n.source)}})),r=_i(n,(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Ia.EOI_ANCHOR_FOUND,tokenTypes:[e]})));return r}(n)),t=t.concat(function(e){class t extends Gs{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}const n=Ai(e,(e=>{const n=e.PATTERN;try{const e=Vs(n),r=new t;return r.visit(e),r.found}catch(r){return aa.test(n.source)}})),r=_i(n,(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Ia.SOI_ANCHOR_FOUND,tokenTypes:[e]})));return r}(n)),t=t.concat(function(e){const t=Ai(e,(e=>{const t=e[$s];return t instanceof RegExp&&(t.multiline||t.global)})),n=_i(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Ia.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]})));return n}(n)),t=t.concat(function(e){const t=[];let n=_i(e,(n=>Ji(e,((e,r)=>(n.PATTERN.source!==r.PATTERN.source||Oi(t,r)||r.PATTERN===Pa.NA||(t.push(r),e.push(r)),e)),[])));n=ar(n);const r=_i(Ai(n,(e=>e.length>1)),(e=>{const t=_i(e,(e=>e.name));return{message:`The same RegExp pattern ->${bi(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:Ia.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}));return r}(n)),t=t.concat(function(e){const t=Ai(e,(e=>e.PATTERN.test(""))),n=_i(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:Ia.EMPTY_MATCH_PATTERN,tokenTypes:[e]})));return n}(n)),t}(s)),n=n.concat(function(e){const t=Ai(e,(e=>{if(!Pi(e,"GROUP"))return!1;const t=e.GROUP;return t!==Pa.SKIPPED&&t!==Pa.NA&&!Li(t)})),n=_i(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Ia.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]})));return n}(s)),n=n.concat(function(e,t){const n=Ai(e,(e=>void 0!==e.PUSH_MODE&&!Oi(t,e.PUSH_MODE))),r=_i(n,(e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:Ia.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]})));return r}(s,t)),n=n.concat(function(e){const t=[],n=Ji(e,((e,t,n)=>{const r=t.PATTERN;return r===Pa.NA||(Li(r)?e.push({str:r,idx:n,tokenType:t}):ji(r)&&(i=r,void 0===xi([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(e=>-1!==i.source.indexOf(e))))&&e.push({str:r.source,idx:n,tokenType:t})),e;var i}),[]);return di(e,((e,r)=>{di(n,(({str:n,idx:i,tokenType:s})=>{if(r${s.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:Ia.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}}))})),t}(s)),n}const sa=/[^\\][$]/;const aa=/[^\\[][\^]|^\^/;function oa(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function la(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function ca(e,t,n){const r=[];let i=!1;const s=Zi(ar(kt(Fi(e.modes))),(e=>e[$s]===Pa.NA)),a=fa(n);return t&&di(s,(e=>{const t=pa(e,a);if(!1!==t){const n=function(e,t){if(t.issue===Ia.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Ia.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(e,t),i={message:n,type:t.issue,tokenType:e};r.push(i)}else Pi(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):Zs(a,e.PATTERN)&&(i=!0)})),t&&!i&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:Ia.NO_LINE_BREAKS_FLAGS}),r}function ha(e){const t=e.PATTERN;if(ji(t))return!1;if(V(t))return!0;if(Pi(t,"exec"))return!0;if(Li(t))return!1;throw Error("non exhaustive match")}function ua(e){return!(!Li(e)||1!==e.length)&&e.charCodeAt(0)}const da={test:function(e){const t=e.length;for(let n=this.lastIndex;nLi(e)?e.charCodeAt(0):e))}function ma(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}const ga=256;let Aa=[];function va(e){return ee.CATEGORIES))));const e=li(n,t);t=t.concat(e),Vi(e)?r=!1:n=e}return t}(e);!function(e){di(e,(e=>{Ma(e)||(Ea[ba]=e,e.tokenTypeIdx=ba++),wa(e)&&!x(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),wa(e)||(e.CATEGORIES=[]),Pi(e,"categoryMatches")||(e.categoryMatches=[]),function(e){return Pi(e,"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})}))}(t),function(e){di(e,(e=>{Sa([],e)}))}(t),function(e){di(e,(e=>{e.categoryMatches=[],di(e.categoryMatchesMap,((t,n)=>{e.categoryMatches.push(Ea[n].tokenTypeIdx)}))}))}(t),di(t,(e=>{e.isParent=e.categoryMatches.length>0}))}function Sa(e,t){di(e,(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0})),di(t.CATEGORIES,(n=>{const r=e.concat(t);Oi(r,n)||Sa(r,n)}))}function Ma(e){return Pi(e,"tokenTypeIdx")}function wa(e){return Pi(e,"CATEGORIES")}function Ca(e){return Pi(e,"tokenTypeIdx")}const Ta={buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,n,r,i)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`};var Ia,Ba;(Ba=Ia||(Ia={}))[Ba.MISSING_PATTERN=0]="MISSING_PATTERN",Ba[Ba.INVALID_PATTERN=1]="INVALID_PATTERN",Ba[Ba.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",Ba[Ba.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",Ba[Ba.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",Ba[Ba.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",Ba[Ba.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",Ba[Ba.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",Ba[Ba.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",Ba[Ba.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",Ba[Ba.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",Ba[Ba.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",Ba[Ba.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",Ba[Ba.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",Ba[Ba.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",Ba[Ba.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",Ba[Ba.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",Ba[Ba.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";const Ra={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Ta,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Ra);class Pa{constructor(e,t=Ra){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=as(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=lt({},Ra,t);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(()=>{let n,r=!0;this.TRACE_INIT("Lexer Config handling",(()=>{if(this.config.lineTerminatorsPattern===Ra.lineTerminatorsPattern)this.config.lineTerminatorsPattern=da;else if(this.config.lineTerminatorCharacters===Ra.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),x(e)?n={modes:{defaultMode:sr(e)},defaultMode:ea}:(r=!1,n=sr(e))})),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e,t,n){const r=[];return Pi(e,ea)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+ea+"> property in its definition\n",type:Ia.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Pi(e,ta)||r.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:Ia.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Pi(e,ta)&&Pi(e,ea)&&!Pi(e.modes,e.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${ea}: <${e.defaultMode}>which does not exist\n`,type:Ia.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Pi(e,ta)&&di(e.modes,((e,t)=>{di(e,((n,i)=>{Wi(n)?r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${i}>\n`,type:Ia.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):Pi(n,"LONGER_ALT")&&di(x(n.LONGER_ALT)?n.LONGER_ALT:[n.LONGER_ALT],(i=>{Wi(i)||Oi(e,i)||r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${n.name}> outside of mode <${t}>\n`,type:Ia.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))}))})),r}(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),this.TRACE_INIT("performWarningRuntimeChecks",(()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(ca(n,this.trackStartLines,this.config.lineTerminatorCharacters))}))),n.modes=n.modes?n.modes:{},di(n.modes,((e,t)=>{n.modes[t]=Zi(e,(e=>Wi(e)))}));const i=st(n.modes);if(di(n.modes,((e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,(()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ia(e,i))})),Vi(this.lexerDefinitionErrors)){let r;_a(e),this.TRACE_INIT("analyzeTokenTypes",(()=>{r=ra(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})})),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=lt({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}}))})),this.defaultMode=n.defaultMode,!Vi(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=_i(this.lexerDefinitionErrors,(e=>e.message)).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}di(this.lexerDefinitionWarning,(e=>{ss(e.message)})),this.TRACE_INIT("Choosing sub-methods implementations",(()=>{if(na?(this.chopInput=N,this.match=this.matchWithTest):(this.updateLastIndex=ae,this.match=this.matchWithExec),r&&(this.handleModes=ae),!1===this.trackStartLines&&(this.computeNewColumn=N),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=ae),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)})),this.TRACE_INIT("Failed Optimization Warnings",(()=>{const e=Ji(this.canModeBeOptimized,((e,t,n)=>(!1===t&&e.push(n),e)),[]);if(t.ensureOptimizations&&!Vi(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)})),this.TRACE_INIT("clearRegExpParserCache",(()=>{zs={}})),this.TRACE_INIT("toFastProperties",(()=>{os(this)}))}))}tokenize(e,t=this.defaultMode){if(!Vi(this.lexerDefinitionErrors)){const e=_i(this.lexerDefinitionErrors,(e=>e.message)).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,s,a,o,l,c,h,u,d,p,f,m,g;const A=e,v=A.length;let y=0,b=0;const E=this.hasCustom?0:Math.floor(e.length/10),_=new Array(E),S=[];let M=this.trackStartLines?1:void 0,w=this.trackStartLines?1:void 0;const C=function(e){const t={};return di(st(e),(n=>{const r=e[n];if(!x(r))throw Error("non exhaustive match");t[n]=[]})),t}(this.emptyGroups),T=this.trackStartLines,I=this.config.lineTerminatorsPattern;let B=0,R=[],P=[];const D=[],L=[];let F;function U(){return R}function O(e){const t=va(e),n=P[t];return void 0===n?L:n}Object.freeze(L);const N=e=>{if(1===D.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);S.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{D.pop();const e=ci(D);R=this.patternIdxToConfig[e],P=this.charCodeToPatternIdxToConfig[e],B=R.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;F=P&&t?O:U}};function k(e){D.push(e),P=this.charCodeToPatternIdxToConfig[e],R=this.patternIdxToConfig[e],B=R.length,B=R.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;F=P&&t?O:U}let G;k.call(this,t);const z=this.config.recoveryEnabled;for(;yo.length){o=s,l=c,G=t;break}}}break}}if(null!==o){if(h=o.length,u=G.group,void 0!==u&&(d=G.tokenTypeIdx,p=this.createTokenInstance(o,y,d,G.tokenType,M,w,h),this.handlePayload(p,l),!1===u?b=this.addToken(_,b,p):C[u].push(p)),e=this.chopInput(e,h),y+=h,w=this.computeNewColumn(w,h),!0===T&&!0===G.canLineTerminator){let e,t,n=0;I.lastIndex=0;do{e=I.test(o),!0===e&&(t=I.lastIndex-1,n++)}while(!0===e);0!==n&&(M+=n,w=h-t,this.updateTokenEndLineColumnLocation(p,u,t,n,M,w,h))}this.handleModes(G,N,k,p)}else{const t=y,n=M,i=w;let s=!1===z;for(;!1===s&&y`Expecting ${La(e)?`--\x3e ${Da(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ",a="\nbut found: '"+bi(t).image+"'";if(r)return s+r+a;{const t=_i(Ji(e,((e,t)=>e.concat(t)),[]),(e=>`[${_i(e,(e=>Da(e))).join(", ")}]`));return s+`one of these possible Token sequences:\n${_i(t,((e,t)=>` ${t+1}. ${e}`)).join("\n")}`+a}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){const i="Expecting: ",s="\nbut found: '"+bi(t).image+"'";if(n)return i+n+s;return i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${_i(e,(e=>`[${_i(e,(e=>Da(e))).join(",")}]`)).join(" ,")}>`+s}};Object.freeze(Xa);const Ya={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},qa={buildDuplicateFoundError(e,t){const n=e.name,r=bi(t),i=r.idx,s=_s(r),a=(o=r)instanceof ys?o.terminalType.name:o instanceof hs?o.nonTerminalName:"";var o;let l=`->${s}${i>0?i:""}<- ${a?`with argument: ->${a}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return l=l.replace(/[ \t]+/g," "),l=l.replace(/\s\s+/g,"\n"),l},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=_i(e.prefixPath,(e=>Da(e))).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=_i(e.prefixPath,(e=>Da(e))).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError(e){let t=_s(e.repetition);0!==e.repetition.idx&&(t+=e.repetition.idx);return`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${t} --\x3e ${_i(e.leftRecursionPath,(e=>e.name)).concat([t]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;t=e.topLevelRule instanceof us?e.topLevelRule.name:e.topLevelRule;return`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};class Ka extends bs{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){di(Fi(this.nameToTopRule),(e=>{this.currTopLevel=e,e.accept(this)}))}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:xl.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class Ja extends Ss{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=sr(this.path.ruleStack).reverse(),this.occurrenceStack=sr(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){Vi(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class Za extends Ja{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const e=t.concat(n),r=new ds({definition:e});this.possibleTokTypes=ws(r),this.found=!0}}}class $a extends Ss{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class eo extends $a{walkMany(e,t,n){if(e.idx===this.occurrence){const e=bi(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof ys&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}}class to extends $a{walkManySep(e,t,n){if(e.idx===this.occurrence){const e=bi(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof ys&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}}class no extends $a{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){const e=bi(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof ys&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}}class ro extends $a{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){const e=bi(t.concat(n));this.result.isEndOfRule=void 0===e,e instanceof ys&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}}function io(e,t,n=[]){n=sr(n);let r=[],i=0;function s(s){const a=io(s.concat(hi(e,i+1)),t,n);return r.concat(a)}for(;n.length{!1===Vi(e.definition)&&(r=s(e.definition))})),r;if(!(t instanceof ys))throw Error("non exhaustive match");n.push(t.terminalType)}}i++}return r.push({partialPath:n,suffixDef:hi(e,i)}),r}function so(e,t,n,r){const i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE";let o=!1;const l=t.length,c=l-r-1,h=[],u=[];for(u.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!Vi(u);){const e=u.pop();if(e===a){o&&ci(u).idx<=c&&u.pop();continue}const r=e.def,d=e.idx,p=e.ruleStack,f=e.occurrenceStack;if(Vi(r))continue;const m=r[0];if(m===i){const e={idx:d,def:hi(r),ruleStack:ui(p),occurrenceStack:ui(f)};u.push(e)}else if(m instanceof ys)if(d=0;t--){const e={idx:d,def:m.definition[t].definition.concat(hi(r)),ruleStack:p,occurrenceStack:f};u.push(e),u.push(a)}else if(m instanceof ds)u.push({idx:d,def:m.definition.concat(hi(r)),ruleStack:p,occurrenceStack:f});else{if(!(m instanceof us))throw Error("non exhaustive match");u.push(ao(m,d,p,f))}}return h}function ao(e,t,n,r){const i=sr(n);i.push(e.name);const s=sr(r);return s.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var oo,lo;function co(e){if(e instanceof ps||"Option"===e)return oo.OPTION;if(e instanceof gs||"Repetition"===e)return oo.REPETITION;if(e instanceof fs||"RepetitionMandatory"===e)return oo.REPETITION_MANDATORY;if(e instanceof ms||"RepetitionMandatoryWithSeparator"===e)return oo.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof As||"RepetitionWithSeparator"===e)return oo.REPETITION_WITH_SEPARATOR;if(e instanceof vs||"Alternation"===e)return oo.ALTERNATION;throw Error("non exhaustive match")}function ho(e,t,n,r){const i=e.length,s=mi(e,(e=>mi(e,(e=>1===e.length))));if(t)return function(t){const r=_i(t,(e=>e.GATE));for(let s=0;skt(e))),((e,t,n)=>(di(t,(t=>{Pi(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),di(t.categoryMatches,(t=>{Pi(e,t)||(e[t]=n)}))})),e)),{});return function(){const e=this.LA(1);return t[e.tokenTypeIdx]}}return function(){for(let t=0;t1===e.length)),i=e.length;if(r&&!n){const t=kt(e);if(1===t.length&&Vi(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=Ji(t,((e,t,n)=>(e[t.tokenTypeIdx]=!0,di(t.categoryMatches,(t=>{e[t]=!0})),e)),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let n=0;nio([e],1))),r=mo(n.length),i=_i(n,(e=>{const t={};return di(e,(e=>{di(go(e.partialPath),(e=>{t[e]=!0}))})),t}));let s=n;for(let a=1;a<=t;a++){const e=s;s=mo(e.length);for(let n=0;n{di(go(e.partialPath),(e=>{i[n][e]=!0}))}))}}}}return r}function yo(e,t,n,r){const i=new fo(e,oo.ALTERNATION,r);return t.accept(i),vo(i.result,n)}function xo(e,t,n,r){const i=new fo(e,n);t.accept(i);const s=i.result,a=new po(t,e,n).startWalking();return vo([new ds({definition:s}),new ds({definition:a})],r)}function bo(e,t){e:for(let n=0;nmi(e,(e=>mi(e,(e=>Vi(e.categoryMatches)))))))}function _o(e,t,n,r){const i=Si(e,(e=>function(e,t){const n=new wo;e.accept(n);const r=n.allProductions,i=Ii(r,So),s=_i(Fi(qi(i,(e=>e.length>1))),(n=>{const r=bi(n),i=t.buildDuplicateFoundError(e,n),s=_s(r),a={message:i,type:xl.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:s,occurrence:r.idx},o=Mo(r);return o&&(a.parameter=o),a}));return s}(e,n))),s=function(e,t,n){const r=[],i=_i(t,(e=>e.name));return di(e,(e=>{const t=e.name;if(Oi(i,t)){const i=n.buildNamespaceConflictError(e);r.push({message:i,type:xl.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),r}(e,t,n),a=Si(e,(e=>function(e,t){const n=new Io;e.accept(n);const r=Si(n.alternations,(n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:xl.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[]));return r}(e,n))),o=Si(e,(t=>function(e,t,n,r){const i=[],s=Ji(t,((t,n)=>n.name===e.name?t+1:t),0);if(s>1){const t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:xl.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}(t,e,r,n)));return i.concat(s,a,o)}function So(e){return`${_s(e)}_#_${e.idx}_#_${Mo(e)}`}function Mo(e){return e instanceof ys?e.terminalType.name:e instanceof hs?e.nonTerminalName:""}class wo extends bs{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function Co(e,t,n,r=[]){const i=[],s=To(t.definition);if(Vi(s))return[];{const t=e.name;Oi(s,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:xl.LEFT_RECURSION,ruleName:t});const a=Si(li(s,r.concat([e])),(t=>{const i=sr(r);return i.push(t),Co(e,t,n,i)}));return i.concat(a)}}function To(e){let t=[];if(Vi(e))return t;const n=bi(e);if(n instanceof hs)t.push(n.referencedRule);else if(n instanceof ds||n instanceof ps||n instanceof fs||n instanceof ms||n instanceof As||n instanceof gs)t=t.concat(To(n.definition));else if(n instanceof vs)t=kt(_i(n.definition,(e=>To(e.definition))));else if(!(n instanceof ys))throw Error("non exhaustive match");const r=Es(n),i=e.length>1;if(r&&i){const n=hi(e);return t.concat(To(n))}return t}class Io extends bs{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function Bo(e,t,n){const r=new Io;e.accept(r);let i=r.alternations;i=Zi(i,(e=>!0===e.ignoreAmbiguities));const s=Si(i,(r=>{const i=r.idx,s=r.maxLookahead||t,a=yo(i,e,s,r),o=function(e,t,n,r){const i=[],s=Ji(e,((n,r,s)=>(!0===t.definition[s].ignoreAmbiguities||di(r,(r=>{const a=[s];di(e,((e,n)=>{s!==n&&bo(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&a.push(n)})),a.length>1&&!bo(i,r)&&(i.push(r),n.push({alts:a,path:r}))})),n)),[]),a=_i(s,(e=>{const i=_i(e.alts,(e=>e+1));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:xl.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}}));return a}(a,r,e,n),l=function(e,t,n,r){const i=Ji(e,((e,t,n)=>{const r=_i(t,(e=>({idx:n,path:e})));return e.concat(r)}),[]),s=ar(Si(i,(e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const s=e.idx,a=e.path;return _i(Ai(i,(e=>{return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx{const n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]})));var n,r})),(e=>{const i=[e.idx+1,s+1],a=0===t.idx?"":t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:xl.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:a,alternatives:i}}))})));return s}(a,r,e,n);return o.concat(l)}));return s}class Ro extends bs{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function Po(e){const t=si(e,{errMsgProvider:Ya}),n={};return di(e.rules,(e=>{n[e.name]=e})),function(e,t){const n=new Ka(e,t);return n.resolveRefs(),n.errors}(n,t.errMsgProvider)}const Do="MismatchedTokenException",Lo="NoViableAltException",Fo="EarlyExitException",Uo="NotAllInputParsedException",Oo=[Do,Lo,Fo,Uo];function No(e){return Oi(Oo,e.name)}Object.freeze(Oo);class ko extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class Go extends ko{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Do}}class zo extends ko{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Lo}}class Qo extends ko{constructor(e,t){super(e,t),this.name=Uo}}class Vo extends ko{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Fo}}const Ho={},jo="InRuleRecoveryException";class Wo extends Error{constructor(e){super(e),this.name=jo}}function Xo(e,t,n,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let l=this.firstAfterRepMap[o];if(void 0===l){const e=this.getCurrRuleFullName();l=new s(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[o]=l}let c=l.token,h=l.occurrence;const u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=ja,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,a)&&this.tryInRepetitionRecovery(e,t,n,c)}const Yo=1024,qo=1280,Ko=1536;function Jo(e,t,n){return n|t|e}class Zo{constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:vl.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if(Vi(t)){const n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return Si(e,(e=>Co(e,e,qa)))}validateEmptyOrAlternatives(e){return Si(e,(e=>function(e,t){const n=new Io;return e.accept(n),Si(n.alternations,(n=>Si(ui(n.definition),((r,i)=>Vi(so([r],[],ya,1))?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:xl.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]))))}(e,qa)))}validateAmbiguousAlternationAlternatives(e,t){return Si(e,(e=>Bo(e,t,qa)))}validateSomeNonEmptyLookaheadPath(e,t){return function(e,t,n){const r=[];return di(e,(e=>{const i=new Ro;e.accept(i),di(i.allProductions,(i=>{const s=co(i),a=i.maxLookahead||t;if(Vi(kt(xo(i.idx,e,s,a)[0]))){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:xl.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),r}(e,t,qa)}buildLookaheadForAlternation(e){return function(e,t,n,r,i,s){const a=yo(e,t,n);return s(a,r,Eo(a)?xa:ya,i)}(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,ho)}buildLookaheadForOptional(e){return function(e,t,n,r,i,s){const a=xo(e,t,i,n),o=Eo(a)?xa:ya;return s(a[0],o,r)}(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,co(e.prodType),uo)}}const $o=new class extends bs{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function el(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset!1===V(e[t]))),r=_i(n,(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:al.MISSING_METHOD,methodName:t})));return ar(r)}(e,t);return n}(this,t);if(!Vi(e)){const t=_i(e,(e=>e.msg));throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(n.prototype=r).constructor=n,n._RULE_NAMES=t,n}var al,ol;(ol=al||(al={}))[ol.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",ol[ol.MISSING_METHOD=1]="MISSING_METHOD";const ll={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(ll);const cl=Math.pow(2,8)-1,hl=Ha({name:"RECORDING_PHASE_TOKEN",pattern:Pa.NA});_a([hl]);const ul=Wa(hl,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(ul);const dl={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};function pl(e,t,n,r=!1){gl(n);const i=ci(this.recordingProdStack),s=V(t)?t:t.DEF,a=new e({definition:[],idx:n});return r&&(a.separator=t.SEP),Pi(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),i.definition.push(a),this.recordingProdStack.pop(),ll}function fl(e,t){gl(t);const n=ci(this.recordingProdStack),r=!1===x(e),i=!1===r?e:e.DEF,s=new vs({definition:[],idx:t,ignoreAmbiguities:r&&!0===e.IGNORE_AMBIGUITIES});Pi(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD);const a=es(i,(e=>V(e.GATE)));return s.hasPredicates=a,n.definition.push(s),di(i,(e=>{const t=new ds({definition:[]});s.definition.push(t),Pi(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Pi(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()})),ll}function ml(e){return 0===e?"":`${e}`}function gl(e){if(e<0||e>cl){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${cl+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}const Al=Wa(ja,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Al);const vl=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Xa,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),yl=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var xl,bl,El;(bl=xl||(xl={}))[bl.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",bl[bl.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",bl[bl.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",bl[bl.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",bl[bl.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",bl[bl.LEFT_RECURSION=5]="LEFT_RECURSION",bl[bl.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",bl[bl.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",bl[bl.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",bl[bl.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",bl[bl.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",bl[bl.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",bl[bl.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",bl[bl.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION";class _l{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",(()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",(()=>{os(this)})),this.TRACE_INIT("Grammar Recording",(()=>{try{this.enableRecording(),di(this.definedRulesNames,(e=>{const t=this[e].originalGrammarAction;let n;this.TRACE_INIT(`${e} Rule`,(()=>{n=this.topLevelRuleRecord(e,t)})),this.gastProductionsCache[e]=n}))}finally{this.disableRecording()}}));let n=[];if(this.TRACE_INIT("Grammar Resolving",(()=>{n=Po({rules:Fi(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)})),this.TRACE_INIT("Grammar Validations",(()=>{if(Vi(n)&&!1===this.skipValidations){const n=(e={rules:Fi(this.gastProductionsCache),tokenTypes:Fi(this.tokensMap),errMsgProvider:qa,grammarName:t},_o((e=si(e,{errMsgProvider:qa})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)),r=function(e){return _i(e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),(e=>Object.assign({type:xl.CUSTOM_LOOKAHEAD_VALIDATION},e)))}({lookaheadStrategy:this.lookaheadStrategy,rules:Fi(this.gastProductionsCache),tokenTypes:Fi(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(n,r)}var e})),Vi(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",(()=>{const e=function(e){const t={};return di(e,(e=>{const n=new Ts(e).startWalking();lt(t,n)})),t}(Fi(this.gastProductionsCache));this.resyncFollows=e})),this.TRACE_INIT("ComputeLookaheadFunctions",(()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:Fi(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Fi(this.gastProductionsCache))}))),!_l.DEFER_DEFINITION_ERRORS_HANDLING&&!Vi(this.definitionErrors))throw e=_i(this.definitionErrors,(e=>e.message)),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)}))}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),Pi(t,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=Pi(t,"skipValidations")?t.skipValidations:vl.skipValidations}}_l.DEFER_DEFINITION_ERRORS_HANDLING=!1,El=_l,[class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Pi(e,"recoveryEnabled")?e.recoveryEnabled:vl.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Xo)}getTokenToInsert(e){const t=Wa(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){const i=this.findReSyncTokenType(),s=this.exportLexerState(),a=[];let o=!1;const l=this.LA(1);let c=this.LA(1);const h=()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),n=new Go(t,l,this.LA(0));n.resyncedTokens=ui(a),this.SAVE_ERROR(n)};for(;!o;){if(this.tokenMatcher(c,r))return void h();if(n.call(this))return h(),void e.apply(this,t);this.tokenMatcher(c,i)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,a))}this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,n){return!1!==n&&!this.tokenMatcher(this.LA(1),e)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new Wo("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(Vi(t))return!1;const n=this.LA(1);return void 0!==xi(t,(e=>this.tokenMatcher(n,e)))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey();return Oi(this.getFollowSetFromFollowKey(t),e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),n=2;for(;;){const r=xi(e,(e=>ya(t,e)));if(void 0!==r)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return Ho;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return _i(e,((n,r)=>0===r?Ho:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])}))}flattenFollowSet(){return kt(_i(this.buildFullFollowKeyStack(),(e=>this.getFollowSetFromFollowKey(e))))}getFollowSetFromFollowKey(e){if(e===Ho)return[ja];const t=e.ruleName+e.idxInCallingRule+Cs+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,ja)||t.push(e),t}reSyncTo(e){const t=[];let n=this.LA(1);for(;!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return ui(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,a){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:sr(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return _i(this.RULE_STACK,(e=>this.shortRuleNameToFullName(e)))}},class{initLooksAhead(e){this.dynamicTokensEnabled=Pi(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:vl.dynamicTokensEnabled,this.maxLookahead=Pi(e,"maxLookahead")?e.maxLookahead:vl.maxLookahead,this.lookaheadStrategy=Pi(e,"lookaheadStrategy")?e.lookaheadStrategy:new Zo({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){di(e,(e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,(()=>{const{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:a}=function(e){$o.reset(),e.accept($o);const t=$o.dslMethods;return $o.reset(),t}(e);di(t,(t=>{const n=0===t.idx?"":t.idx;this.TRACE_INIT(`${_s(t)}${n}`,(()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=Jo(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)}))})),di(n,(t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,_s(t))})),di(r,(t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,_s(t))})),di(i,(t=>{this.computeLookaheadFunc(e,t.idx,Yo,"RepetitionMandatory",t.maxLookahead,_s(t))})),di(s,(t=>{this.computeLookaheadFunc(e,t.idx,Ko,"RepetitionMandatoryWithSeparator",t.maxLookahead,_s(t))})),di(a,(t=>{this.computeLookaheadFunc(e,t.idx,qo,"RepetitionWithSeparator",t.maxLookahead,_s(t))}))}))}))}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${0===t?"":t}`,(()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),a=Jo(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(a,s)}))}getKeyForAutomaticLookahead(e,t){return Jo(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Pi(e,"nodeLocationTracking")?e.nodeLocationTracking:vl.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=tl,this.setNodeLocationFromNode=tl,this.cstPostRule=ae,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ae,this.setNodeLocationFromNode=ae,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=el,this.setNodeLocationFromNode=el,this.cstPostRule=ae,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ae,this.setNodeLocationFromNode=ae,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=ae,this.setNodeLocationFromNode=ae,this.cstPostRule=ae,this.setInitialNodeLocation=ae}else this.cstInvocationStateUpdate=ae,this.cstFinallyStateUpdate=ae,this.cstPostTerminal=ae,this.cstPostNonTerminal=ae,this.cstPostRule=ae}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];var r,i,s;i=t,s=e,void 0===(r=n).children[s]?r.children[s]=[i]:r.children[s].push(i),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];!function(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(Wi(this.baseCstVisitorConstructor)){const e=sl(this.className,st(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Wi(this.baseCstVisitorWithDefaultsConstructor)){const e=function(e,t,n){const r=function(){};rl(r,e+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return di(t,(e=>{i[e]=il})),(r.prototype=i).constructor=r,r}(this.className,st(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Al}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Al:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=xa,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Pi(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(x(e)){if(Vi(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(x(e))this.tokensMap=Ji(e,((e,t)=>(e[t.name]=t,e)),{});else if(Pi(e,"modes")&&mi(kt(Fi(e.modes)),Ca)){const t=rs(kt(Fi(e.modes)));this.tokensMap=Ji(t,((e,t)=>(e[t.name]=t,e)),{})}else{if(!T(e))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=sr(e)}this.tokensMap.EOF=ja;const n=mi(Pi(e,"modes")?kt(Fi(e.modes)):Fi(e),(e=>Vi(e.categoryMatches)));this.tokenMatcher=n?xa:ya,_a(Fi(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const r=Pi(n,"resyncEnabled")?n.resyncEnabled:yl.resyncEnabled,i=Pi(n,"recoveryValueFunc")?n.recoveryValueFunc:yl.recoveryValueFunc,s=this.ruleShortNameIdx<<12;let a;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,a=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n);const r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(a){return this.invokeRuleCatch(a,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n)}catch(a){return this.invokeRuleCatch(a,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(a,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){const r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(No(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return n(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(r)return this.moveToTerminatedState(),n(e);throw t}throw e}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead(Yo,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,oo.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,Yo,e,no)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(Ko,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(e,oo.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,ro],t,Ko,e,ro)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;let s=!0;for(;!0===i.call(this)&&!0===s;)s=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,eo,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(qo,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,to],t,qo,e,to)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Ko,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(256,t),r=x(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Qo(t,e))}}subruleInternal(e,t,n){let r;try{const i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,t,n){throw No(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(i){r=this.consumeInternalRecovery(e,t,i)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r;const i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Go(r,t,i))}consumeInternalRecovery(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(r){throw r.name===jo?n:r}}}saveRecogState(){const e=this.errors,t=sr(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),ja)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=yl){if(Oi(this.definedRulesNames,e)){const t={message:qa.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:xl.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=yl){const r=function(e,t,n){const r=[];let i;return Oi(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:xl.INVALID_RULE_OVERRIDE,ruleName:e})),r}(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,t),!0}catch(r){if(No(r))return!1;throw r}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return _i(Fi(this.gastProductionsCache),xs)}},class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Pi(e,"errorMessageProvider")?e.errorMessageProvider:vl.errorMessageProvider}SAVE_ERROR(e){if(No(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:sr(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return sr(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName(),i=xo(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],s=[];for(let o=1;o<=this.maxLookahead;o++)s.push(this.LA(o));const a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:s,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new Vo(a,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName(),r=yo(e,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));const s=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new zo(a,this.LA(1),s))}},class{initContentAssist(){}computeContentAssist(e,t){const n=this.gastProductionsCache[e];if(Wi(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return so([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=bi(e.ruleStack),n=this.getGAstProductions()[t];return new Za(n,e).startWalking()}},class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD}))}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(()=>{const e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA}))}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Al}topLevelRuleRecord(e,t){try{const n=new us({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(n){if(!0!==n.KNOWN_RECORDER_ERROR)try{n.message=n.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(r){throw n}throw n}}optionInternalRecord(e,t){return pl.call(this,ps,e,t)}atLeastOneInternalRecord(e,t){pl.call(this,fs,t,e)}atLeastOneSepFirstInternalRecord(e,t){pl.call(this,ms,t,e,!0)}manyInternalRecord(e,t){pl.call(this,gs,t,e)}manySepFirstInternalRecord(e,t){pl.call(this,As,t,e,!0)}orInternalRecord(e,t){return fl.call(this,e,t)}subruleInternalRecord(e,t,n){if(gl(t),!e||!1===Pi(e,"ruleName")){const n=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=ci(this.recordingProdStack),i=e.ruleName,s=new hs({idx:t,nonTerminalName:i,label:null==n?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(s),this.outputCst?dl:ll}consumeInternalRecord(e,t,n){if(gl(t),!Ma(e)){const n=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=ci(this.recordingProdStack),i=new ys({idx:t,terminalType:e,label:null==n?void 0:n.LABEL});return r.definition.push(i),ul}},class{initPerformanceTracer(e){if(Pi(e,"traceInitPerf")){const t=e.traceInitPerf,n="number"==typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=vl.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=as(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()}}].forEach((e=>{const t=e.prototype;Object.getOwnPropertyNames(t).forEach((n=>{if("constructor"===n)return;const r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty(El.prototype,n,r):El.prototype[n]=e.prototype[n]}))}));return{CstParser:class extends _l{constructor(e,t=vl){const n=sr(t);n.outputCst=!0,super(e,n)}},Lexer:Pa,createToken:Ha}})();t.CstParser=r,t.Lexer=i,t.createToken=s},82360:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});class n{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class r{constructor(e,t,n,r){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(e.buffer,e.byteOffset+t,n),this._littleEndian=r,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_nextInt32(){const e=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint8Array(e){const t=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,e);return this._offset+=e,t}_skip(e){return this._offset+=e,this}_scan(e,t){void 0===t&&(t=0);const n=this._offset;let r=0;for(;this._dataView.getUint8(this._offset)!==t&&r{"use strict";const lottie=(()=>{if("undefined"==typeof navigator||"undefined"==typeof document)return{};const svgNS="http://www.w3.org/2000/svg";let locationHref="",_useWebWorker=!1;const initialDefaultFrame=-999999,setWebWorker=e=>{_useWebWorker=!!e},getWebWorker=()=>_useWebWorker,setLocationHref=e=>{locationHref=e},getLocationHref=()=>locationHref;function createTag(e){return document.createElement(e)}function extendPrototype(e,t){var n,r,i=e.length;for(n=0;n1?n[1]=1:n[1]<=0&&(n[1]=0),HSVtoRGB(n[0],n[1],n[2])}function addBrightnessToRGB(e,t){var n=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return n[2]+=t,n[2]>1?n[2]=1:n[2]<0&&(n[2]=0),HSVtoRGB(n[0],n[1],n[2])}function addHueToRGB(e,t){var n=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return n[0]+=t/360,n[0]>1?n[0]-=1:n[0]<0&&(n[0]+=1),HSVtoRGB(n[0],n[1],n[2])}!function(){var e,t,n=[];for(e=0;e<256;e+=1)t=e.toString(16),n[e]=1===t.length?"0"+t:t}();const setSubframeEnabled=e=>{subframeEnabled=!!e},getSubframeEnabled=()=>subframeEnabled,setExpressionsPlugin=e=>{expressionsPlugin=e},getExpressionsPlugin=()=>expressionsPlugin,setDefaultCurveSegments=e=>{defaultCurveSegments=e},getDefaultCurveSegments=()=>defaultCurveSegments,setIdPrefix=e=>{idPrefix$1=e};function createNS(e){return document.createElementNS(svgNS,e)}const dataManager=function(){var e,t,n=1,r=[],i={onmessage:function(){},postMessage:function(t){e({data:t})}},s={postMessage:function(e){i.onmessage({data:e})}};function a(){t||((t=function(t){if(window.Worker&&window.Blob&&getWebWorker()){var n=new Blob(["var _workerSelf = self; self.onmessage = ",t.toString()],{type:"text/javascript"}),r=URL.createObjectURL(n);return new Worker(r)}return e=t,i}((function(e){if(s.dataManager||(s.dataManager=function(){function e(i,s){var a,o,l,c,h,d,p=i.length;for(o=0;o=0;t-=1)if("sh"===e[t].ty)if(e[t].ks.k.i)r(e[t].ks.k);else for(s=e[t].ks.k.length,i=0;in[0]||!(n[0]>e[0])&&(e[1]>n[1]||!(n[1]>e[1])&&(e[2]>n[2]||!(n[2]>e[2])&&null))}var s,a=function(){var e=[4,4,14];function t(e){var t,n,r,i=e.length;for(t=0;t=0;n-=1)if("sh"===e[n].ty)if(e[n].ks.k.i)e[n].ks.k.c=e[n].closed;else for(i=e[n].ks.k.length,r=0;r500)&&(this._imageLoaded(),clearInterval(n)),t+=1}.bind(this),50)}function s(e){var t={assetData:e},n=r(e,this.assetsPath,this.path);return dataManager.loadData(n,function(e){t.img=e,this._footageLoaded()}.bind(this),function(){t.img={},this._footageLoaded()}.bind(this)),t}function a(){this._imageLoaded=t.bind(this),this._footageLoaded=n.bind(this),this.testImageLoaded=i.bind(this),this.createFootageData=s.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return a.prototype={loadAssets:function(e,t){var n;this.imagesLoadedCb=t;var r=e.length;for(n=0;n{renderers[e]=t};function getRenderer(e){return renderers[e]}const AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0)};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t="svg";e.animType?t=e.animType:e.renderer&&(t=e.renderer);const n=getRenderer(t);this.renderer=new n(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,""===e.loop||null===e.loop||void 0===e.loop||!0===e.loop?this.loop=!0:!1===e.loop?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=!("autoplay"in e)||e.autoplay,this.name=e.name?e.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(e,"autoloadSegments")||e.autoloadSegments,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(-1!==e.path.lastIndexOf("\\")?this.path=e.path.substr(0,e.path.lastIndexOf("\\")+1):this.path=e.path.substr(0,e.path.lastIndexOf("/")+1),this.fileName=e.path.substr(e.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(e.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(e){dataManager.completeAnimation(e,this.configAnimation)},AnimationItem.prototype.setData=function(e,t){t&&"object"!=typeof t&&(t=JSON.parse(t));var n={wrapper:e,animationData:t},r=e.attributes;n.path=r.getNamedItem("data-animation-path")?r.getNamedItem("data-animation-path").value:r.getNamedItem("data-bm-path")?r.getNamedItem("data-bm-path").value:r.getNamedItem("bm-path")?r.getNamedItem("bm-path").value:"",n.animType=r.getNamedItem("data-anim-type")?r.getNamedItem("data-anim-type").value:r.getNamedItem("data-bm-type")?r.getNamedItem("data-bm-type").value:r.getNamedItem("bm-type")?r.getNamedItem("bm-type").value:r.getNamedItem("data-bm-renderer")?r.getNamedItem("data-bm-renderer").value:r.getNamedItem("bm-renderer")?r.getNamedItem("bm-renderer").value:"canvas";var i=r.getNamedItem("data-anim-loop")?r.getNamedItem("data-anim-loop").value:r.getNamedItem("data-bm-loop")?r.getNamedItem("data-bm-loop").value:r.getNamedItem("bm-loop")?r.getNamedItem("bm-loop").value:"";"false"===i?n.loop=!1:"true"===i?n.loop=!0:""!==i&&(n.loop=parseInt(i,10));var s=r.getNamedItem("data-anim-autoplay")?r.getNamedItem("data-anim-autoplay").value:r.getNamedItem("data-bm-autoplay")?r.getNamedItem("data-bm-autoplay").value:!r.getNamedItem("bm-autoplay")||r.getNamedItem("bm-autoplay").value;n.autoplay="false"!==s,n.name=r.getNamedItem("data-name")?r.getNamedItem("data-name").value:r.getNamedItem("data-bm-name")?r.getNamedItem("data-bm-name").value:r.getNamedItem("bm-name")?r.getNamedItem("bm-name").value:"","false"===(r.getNamedItem("data-anim-prerender")?r.getNamedItem("data-anim-prerender").value:r.getNamedItem("data-bm-prerender")?r.getNamedItem("data-bm-prerender").value:r.getNamedItem("bm-prerender")?r.getNamedItem("bm-prerender").value:"")&&(n.prerender=!1),this.setParams(n)},AnimationItem.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t,n,r=this.animationData.layers,i=r.length,s=e.layers,a=s.length;for(n=0;nthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},AnimationItem.prototype.play=function(e){e&&this.name!==e||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_pause"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(e){e&&this.name!==e||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_play"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(e){e&&this.name!==e||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(e){for(var t,n=0;n=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(t):this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(n=!0,t=this.totalFrames-1):t<0?this.checkSegments(t%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(n=!0,t=0):(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(t),n&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(e,t){var n=-1;this.isPaused&&(this.currentRawFrame+this.firstFramet&&(n=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,-1!==n&&this.goToAndStop(n,!0)},AnimationItem.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),"object"==typeof e[0]){var n,r=e.length;for(n=0;n=0;n-=1)t[n].animation.destroy(e)},e.freeze=function(){a=!0},e.unfreeze=function(){a=!1,f()},e.setVolume=function(e,n){var i;for(i=0;i=.001?function(e,t,n,r){for(var i=0;i<4;++i){var s=c(t,n,r);if(0===s)return t;t-=(l(t,n,r)-e)/s}return t}(e,u,t,i):0===d?u:function(e,t,n,r,i){var s,a,o=0;do{(s=l(a=t+(n-t)/2,r,i)-e)>0?n=a:t=a}while(Math.abs(s)>1e-7&&++o<10);return a}(e,a,a+r,t,i)}},e}(),pooling={double:function(e){return e.concat(createSizedArray(e.length))}},poolFactory=function(e,t,n){var r=0,i=e,s=createSizedArray(i);return{newElement:function(){return r?s[r-=1]:t()},release:function(e){r===i&&(s=pooling.double(s),i*=2),n&&n(e),s[r]=e,r+=1}}},bezierLengthPool=poolFactory(8,(function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})),segmentsLengthPool=poolFactory(8,(function(){return{lengths:[],totalLength:0}}),(function(e){var t,n=e.lengths.length;for(t=0;t-.001&&a<.001}var n=function(e,t,n,r){var i,s,a,o,l,c,h=getDefaultCurveSegments(),u=0,d=[],p=[],f=bezierLengthPool.newElement();for(a=n.length,i=0;ia?-1:1,c=!0;c;)if(r[s]<=a&&r[s+1]>a?(o=(a-r[s])/(r[s+1]-r[s]),c=!1):s+=l,s<0||s>=i-1){if(s===i-1)return n[s];c=!1}return n[s]+(n[s+1]-n[s])*o}var l=createTypedArray("float32",8);return{getSegmentsLength:function(e){var t,r=segmentsLengthPool.newElement(),i=e.c,s=e.v,a=e.o,o=e.i,l=e._length,c=r.lengths,h=0;for(t=0;t1&&(s=1);var h,u=o(s,c),d=o(a=a>1?1:a,c),p=t.length,f=1-u,m=1-d,g=f*f*f,A=u*f*f*3,v=u*u*f*3,y=u*u*u,x=f*f*m,b=u*f*m+f*u*m+f*f*d,E=u*u*m+f*u*d+u*f*d,_=u*u*d,S=f*m*m,M=u*m*m+f*d*m+f*m*d,w=u*d*m+f*d*d+u*m*d,C=u*d*d,T=m*m*m,I=d*m*m+m*d*m+m*m*d,B=d*d*m+m*d*d+d*m*d,R=d*d*d;for(h=0;hp?d>f?d-p-f:f-p-d:f>p?f-p-d:p-d-f)>-1e-4&&u<1e-4}}}const bez=bezFunction(),PropertyFactory=function(){var e=initialDefaultFrame,t=Math.abs;function n(e,t){var n,i=this.offsetTime;"multidimensional"===this.propType&&(n=createTypedArray("float32",this.pv.length));for(var s,a,o,l,c,h,u,d,p,f=t.lastIndex,m=f,g=this.keyframes.length-1,A=!0;A;){if(s=this.keyframes[m],a=this.keyframes[m+1],m===g-1&&e>=a.t-i){s.h&&(s=a),f=0;break}if(a.t-i>e){f=m;break}m=T||e=T?B.points.length-1:0;for(c=B.points[R].point.length,l=0;l=L&&D=T)n[0]=v[0],n[1]=v[1],n[2]=v[2];else if(e<=I)n[0]=s.s[0],n[1]=s.s[1],n[2]=s.s[2];else{var G=r(s.s),z=r(v);y=n,x=function(e,t,n){var r,i,s,a,o,l=[],c=e[0],h=e[1],u=e[2],d=e[3],p=t[0],f=t[1],m=t[2],g=t[3];return(i=c*p+h*f+u*m+d*g)<0&&(i=-i,p=-p,f=-f,m=-m,g=-g),1-i>1e-6?(r=Math.acos(i),s=Math.sin(r),a=Math.sin((1-n)*r)/s,o=Math.sin(n*r)/s):(a=1-n,o=n),l[0]=a*c+o*p,l[1]=a*h+o*f,l[2]=a*u+o*m,l[3]=a*d+o*g,l}(G,z,(e-I)/(T-I)),b=x[0],E=x[1],_=x[2],S=x[3],M=Math.atan2(2*E*S-2*b*_,1-2*E*E-2*_*_),w=Math.asin(2*b*E+2*_*S),C=Math.atan2(2*b*S-2*E*_,1-2*b*b-2*_*_),y[0]=M/degToRads,y[1]=w/degToRads,y[2]=C/degToRads}else for(m=0;m=T?h=1:e=r&&t>=r||this._caching.lastFrame=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function s(e){var n;if("unidimensional"===this.propType)n=e*this.mult,t(this.v-n)>1e-5&&(this.v=n,this._mdf=!0);else for(var r=0,i=this.v.length;r1e-5&&(this.v[r]=n,this._mdf=!0),r+=1}function a(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var e;this.lock=!0,this._mdf=this._isFirstFrame;var t=this.effectsSequence.length,n=this.kf?this.pv:this.data.k;for(e=0;e=this._maxLength&&this.doubleArrayLength(),n){case"v":s=this.v;break;case"i":s=this.i;break;case"o":s=this.o;break;default:s=[]}(!s[r]||s[r]&&!i)&&(s[r]=pointPool.newElement()),s[r][0]=e,s[r][1]=t},ShapePath.prototype.setTripleAt=function(e,t,n,r,i,s,a,o){this.setXYAt(e,t,"v",a,o),this.setXYAt(n,r,"o",a,o),this.setXYAt(i,s,"i",a,o)},ShapePath.prototype.reverse=function(){var e=new ShapePath;e.setPathData(this.c,this._length);var t=this.v,n=this.o,r=this.i,i=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],r[0][0],r[0][1],n[0][0],n[0][1],0,!1),i=1);var s,a=this._length-1,o=this._length;for(s=i;s=p[p.length-1].t-this.offsetTime)r=p[p.length-1].s?p[p.length-1].s[0]:p[p.length-2].e[0],s=!0;else{for(var f,m,g,A=d,v=p.length-1,y=!0;y&&(f=p[A],!((m=p[A+1]).t-this.offsetTime>e));)A=m.t-this.offsetTime)h=1;else if(er&&t>r)||(this._caching.lastIndex=i0||e>-1e-6&&e<0?r(1e4*e)/1e4:e}function P(){var e=this.props;return"matrix("+R(e[0])+","+R(e[1])+","+R(e[4])+","+R(e[5])+","+R(e[12])+","+R(e[13])+")"}return function(){this.reset=i,this.rotate=s,this.rotateX=a,this.rotateY=o,this.rotateZ=l,this.skew=h,this.skewFromAxis=u,this.shear=c,this.scale=d,this.setTransform=p,this.translate=f,this.transform=m,this.applyToPoint=x,this.applyToX=b,this.applyToY=E,this.applyToZ=_,this.applyToPointArray=T,this.applyToTriplePoints=C,this.applyToPointStringified=I,this.toCSS=B,this.to2dCSS=P,this.clone=v,this.cloneFromProps=y,this.equals=A,this.inversePoints=w,this.inversePoint=M,this.getInverseMatrix=S,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}(),lottie={};function setLocation(e){setLocationHref(e)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(e){setSubframeEnabled(e)}function setPrefix(e){setIdPrefix(e)}function loadAnimation(e){return animationManager.loadAnimation(e)}function setQuality(e){if("string"==typeof e)switch(e){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(e)&&e>1&&setDefaultCurveSegments(e)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(e,t){"expressions"===e&&setExpressionsPlugin(t)}function getFactory(e){switch(e){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(e){for(var t=queryString.split("&"),n=0;n=1?s.push({s:e-1,e:t-1}):(s.push({s:e,e:1}),s.push({s:0,e:t-1}));var a,o,l=[],c=s.length;for(a=0;ar+n))h=o.s*i<=r?0:(o.s*i-r)/n,u=o.e*i>=r+n?1:(o.e*i-r)/n,l.push([h,u])}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(e){var t,n=e.length;for(t=0;t1?1+s:this.s.v<0?0+s:this.s.v+s)>(n=this.e.v>1?1+s:this.e.v<0?0+s:this.e.v+s)){var a=t;t=n,n=a}t=1e-4*Math.round(1e4*t),n=1e-4*Math.round(1e4*n),this.sValue=t,this.eValue=n}else t=this.sValue,n=this.eValue;var o,l,c,h,u,d=this.shapes.length,p=0;if(n===t)for(i=0;i=0;i-=1)if((f=this.shapes[i]).shape._mdf){for((m=f.localShapeCollection).releaseShapes(),2===this.m&&d>1?(A=this.calculateShapeEdges(t,n,f.totalShapeLength,x,p),x+=f.totalShapeLength):A=[[v,y]],l=A.length,o=0;o=1?g.push({s:f.totalShapeLength*(v-1),e:f.totalShapeLength*(y-1)}):(g.push({s:f.totalShapeLength*v,e:f.totalShapeLength}),g.push({s:0,e:f.totalShapeLength*(y-1)}));var b=this.addShapes(f,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(f.shape.paths.shapes[f.shape.paths._length-1].c){var E=b.pop();this.addPaths(b,m),b=this.addShapes(f,g[1],E)}else this.addPaths(b,m),b=this.addShapes(f,g[1]);this.addPaths(b,m)}}f.shape.paths=m}}},TrimModifier.prototype.addPaths=function(e,t){var n,r=e.length;for(n=0;nt.e){n.c=!1;break}t.s<=f&&t.e>=f+a.addedLength?(this.addSegment(d[r].v[i-1],d[r].o[i-1],d[r].i[i],d[r].v[i],n,o,g),g=!1):(c=bez.getNewSegment(d[r].v[i-1],d[r].v[i],d[r].o[i-1],d[r].i[i],(t.s-f)/a.addedLength,(t.e-f)/a.addedLength,l[i-1]),this.addSegmentFromArray(c,n,o,g),g=!1,n.c=!1),f+=a.addedLength,o+=1}if(d[r].c&&l.length){if(a=l[i-1],f<=t.e){var A=l[i-1].addedLength;t.s<=f&&t.e>=f+A?(this.addSegment(d[r].v[i-1],d[r].o[i-1],d[r].i[0],d[r].v[0],n,o,g),g=!1):(c=bez.getNewSegment(d[r].v[i-1],d[r].v[0],d[r].o[i-1],d[r].i[0],(t.s-f)/A,(t.e-f)/A,l[i-1]),this.addSegmentFromArray(c,n,o,g),g=!1,n.c=!1)}else n.c=!1;f+=a.addedLength,o+=1}if(n._length&&(n.setXYAt(n.v[h][0],n.v[h][1],"i",h),n.setXYAt(n.v[n._length-1][0],n.v[n._length-1][1],"o",n._length-1)),f>t.e)break;r=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/n,0),i=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/n,0)):(r=this.p.pv,i=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/n,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(r[0]=s.getValueAtTime((s.keyframes[0].t+.01)/n,0),r[1]=a.getValueAtTime((a.keyframes[0].t+.01)/n,0),i[0]=s.getValueAtTime(s.keyframes[0].t/n,0),i[1]=a.getValueAtTime(a.keyframes[0].t/n,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(r[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/n,0),r[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/n,0),i[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/n,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/n,0)):(r=[s.pv,a.pv],i[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/n,s.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/n,a.offsetTime))}else r=i=e;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],t),t.prototype.addDynamicProperty=function(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0},t.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(e,n,r){return new t(e,n,r)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],n="normal",r="normal",i=t.length,s=0;s0;)n-=1,this._elements.unshift(t[n]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,n=e.length;for(t=0;t0?Math.floor(d):Math.ceil(d),m=this.pMatrix.props,g=this.rMatrix.props,A=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,y,x=0;if(d>0){for(;xf;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),x-=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),x-=p)}for(r=1===this.data.m?0:this._currentCopies-1,i=1===this.data.m?1:-1,s=this._currentCopies;s;){if(y=(n=(t=this.elemsData[r].it)[t.length-1].transform.mProps.v.props).length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(r/(this._currentCopies-1)),0!==x){for((0!==r&&1===i||r!==this._currentCopies-1&&-1===i)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(A[0],A[1],A[2],A[3],A[4],A[5],A[6],A[7],A[8],A[9],A[10],A[11],A[12],A[13],A[14],A[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),v=0;v{e.helper=s(e),e.cache={}})),void(this.fonts=e.list);var n,r=e.list,a=r.length,o=a;for(n=0;n0&&(h=!1),h){var u=createTag("style");u.setAttribute("f-forigin",r[n].fOrigin),u.setAttribute("f-origin",r[n].origin),u.setAttribute("f-family",r[n].fFamily),u.type="text/css",u.innerText="@font-face {font-family: "+r[n].fFamily+"; font-style: normal; src: url('"+r[n].fPath+"');}",t.appendChild(u)}}else if("g"===r[n].fOrigin||1===r[n].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),c=0;ce?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e0&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+g+")"),s.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var n=this._volume*this._volumeMultiplier;this._previousVolume!==n&&(this._previousVolume=n,this.audio.volume(n))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(e){var t,n,r=this.layers.length;for(this.completeLayers=!0,t=r-1;t>=0;t-=1)this.elements[t]||(n=this.layers[t]).ip-n.st<=e-this.layers[t].st&&n.op-n.st>e-this.layers[t].st&&this.buildItem(t),this.completeLayers=!!this.elements[t]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:default:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e1&&(s+=" C"+t.o[r-1][0]+","+t.o[r-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),n.lastPath!==s){var a="";n.elem&&(t.c&&(a=e.inv?this.solidPath+s:s),n.elem.setAttribute("d",a)),n.lastPath=s}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};const filtersFactory=function(){var e={};return e.createFilter=function(e,t){var n=createNS("filter");n.setAttribute("id",e),!0!==t&&(n.setAttribute("filterUnits","objectBoundingBox"),n.setAttribute("x","0%"),n.setAttribute("y","0%"),n.setAttribute("width","100%"),n.setAttribute("height","100%"));return n},e.createAlphaToLuminanceFilter=function(){var e=createNS("feColorMatrix");return e.setAttribute("type","matrix"),e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),e},e}(),featureSupport=function(){var e={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),e}();var registeredEffects={},idPrefix="filter_result_";function SVGEffects(e){var t,n,r="SourceGraphic",i=e.data.ef?e.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),o=0;for(this.filters=[],t=0;t=0&&!this.shapeModifiers[e].processShapes(this._isFirstFrame);e-=1);}},searchProcessedElement:function(e){for(var t=this.processedElements,n=0,r=t.length;n.01)return!1;n+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e0;)l=r.transformers[m].mProps._mdf||l,f-=1,m-=1;if(l)for(f=A-r.styles[h].lvl,m=r.transformers.length-1;f>0;)p=r.transformers[m].mProps.v.props,d.transform(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15]),f-=1,m-=1}else d=e;if(a=(u=r.sh.paths)._length,l){for(o="",s=0;s=1?v=.99:v<=-1&&(v=-.99);var y=o*v,x=Math.cos(A+t.a.v)*y+h[0],b=Math.sin(A+t.a.v)*y+h[1];l.setAttribute("fx",x),l.setAttribute("fy",b),c&&!t.g._collapsable&&(t.of.setAttribute("fx",x),t.of.setAttribute("fy",b))}}function l(e,t,n){var r=t.style,i=t.d;i&&(i._mdf||n)&&i.dashStr&&(r.pElem.setAttribute("stroke-dasharray",i.dashStr),r.pElem.setAttribute("stroke-dashoffset",i.dashoffset[0])),t.c&&(t.c._mdf||n)&&r.pElem.setAttribute("stroke","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||n)&&r.pElem.setAttribute("stroke-opacity",t.o.v),(t.w._mdf||n)&&(r.pElem.setAttribute("stroke-width",t.w.v),r.msElem&&r.msElem.setAttribute("stroke-width",t.w.v))}return{createRenderFunction:function(e){switch(e.ty){case"fl":return s;case"gf":return o;case"gs":return a;case"st":return l;case"sh":case"el":case"rc":case"sr":return i;case"tr":return n;case"no":return r;default:return null}}}}();function SVGShapeElement(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,n),this.prevViewData=[]}function LetterProps(e,t,n,r,i,s){this.o=e,this.sw=t,this.sc=n,this.fc=r,this.m=i,this.p=s,this._mdf={o:!0,sw:!!t,sc:!!n,fc:!!r,m:!0,p:!0}}function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t,n,r,i=this.shapes.length,s=this.stylesList.length,a=[],o=!1;for(n=0;n1&&o&&this.setShapesAsAnimated(a)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,n=e.length;for(t=0;t=0;o-=1){if((d=this.searchProcessedElement(e[o]))?t[o]=n[d-1]:e[o]._render=a,"fl"===e[o].ty||"st"===e[o].ty||"gf"===e[o].ty||"gs"===e[o].ty||"no"===e[o].ty)d?t[o].style.closed=!1:t[o]=this.createStyleElement(e[o],i),e[o]._render&&t[o].style.pElem.parentNode!==r&&r.appendChild(t[o].style.pElem),m.push(t[o].style);else if("gr"===e[o].ty){if(d)for(c=t[o].it.length,l=0;l1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,n=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var r;this.lock=!0,this._mdf=!1;var i=this.effectsSequence.length,s=e||this.data.d.k[this.keysIndex].s;for(r=0;rt);)n+=1;return this.keysIndex!==n&&(this.keysIndex=n),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t,n,r=[],i=0,s=e.length,a=!1;i=55296&&t<=56319?(n=e.charCodeAt(i+1))>=56320&&n<=57343?(a||FontManager.isModifier(t,n)?(r[r.length-1]+=e.substr(i,2),a=!1):r.push(e.substr(i,2)),i+=1):r.push(e.charAt(i)):t>56319?(n=e.charCodeAt(i+1),FontManager.isZeroWidthJoiner(t,n)?(a=!0,r[r.length-1]+=e.substr(i,2),i+=1):r.push(e.charAt(i))):FontManager.isZeroWidthJoiner(t)?(r[r.length-1]+=e.charAt(i),a=!0):r.push(e.charAt(i)),i+=1;return r},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t,n,r,i,s,a,o,l=this.elem.globalData.fontManager,c=this.data,h=[],u=0,d=c.m.g,p=0,f=0,m=0,g=[],A=0,v=0,y=l.getFontByName(e.f),x=0,b=getFontProperties(y);e.fWeight=b.weight,e.fStyle=b.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),n=e.finalText.length,e.finalLineHeight=e.lh;var E,_=e.tr/1e3*e.finalSize;if(e.sz)for(var S,M,w=!0,C=e.sz[0],T=e.sz[1];w;){S=0,A=0,n=(M=this.buildFinalText(e.t)).length,_=e.tr/1e3*e.finalSize;var I=-1;for(t=0;tC&&" "!==M[t]?(-1===I?n+=1:t=I,S+=e.finalLineHeight||1.2*e.finalSize,M.splice(t,I===t?1:0,"\r"),I=-1,A=0):(A+=x,A+=_);S+=y.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&Tv?A:v,A=-2*_,i="",r=!0,m+=1):i=B,l.chars?(o=l.getCharData(B,y.fStyle,l.getFontByName(e.f).fFamily),x=r?0:o.w*e.finalSize/100):x=l.measureText(i,e.f,e.finalSize)," "===B?R+=x+_:(A+=x+_+R,R=0),h.push({l:x,an:x,add:p,n:r,anIndexes:[],val:i,line:m,animatorJustifyOffset:0}),2==d){if(p+=x,""===i||" "===i||t===n-1){for(""!==i&&" "!==i||(p-=x);f<=t;)h[f].an=p,h[f].ind=u,h[f].extra=x,f+=1;u+=1,p=0}}else if(3==d){if(p+=x,""===i||t===n-1){for(""===i&&(p-=x);f<=t;)h[f].an=p,h[f].ind=u,h[f].extra=x,f+=1;p=0,u+=1}}else h[u].ind=u,h[u].extra=0,u+=1;if(e.l=h,v=A>v?A:v,g.push(A),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=v,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=g;var P,D,L,F,U=c.a;a=U.length;var O=[];for(s=0;s0?i=this.ne.v/100:s=-this.ne.v/100,this.xe.v>0?a=1-this.xe.v/100:o=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(i,s,a,o).get,c=0,h=this.finalS,u=this.finalE,d=this.data.sh;if(2===d)c=l(c=u===h?r>=u?1:0:e(0,t(.5/(u-h)+(r-h)/(u-h),1)));else if(3===d)c=l(c=u===h?r>=u?0:1:1-e(0,t(.5/(u-h)+(r-h)/(u-h),1)));else if(4===d)u===h?c=0:(c=e(0,t(.5/(u-h)+(r-h)/(u-h),1)))<.5?c*=2:c=1-2*(c-.5),c=l(c);else if(5===d){if(u===h)c=0;else{var p=u-h,f=-p/2+(r=t(e(0,r+.5-h),u-h)),m=p/2;c=Math.sqrt(1-f*f/(m*m))}c=l(c)}else 6===d?(u===h?c=0:(r=t(e(0,r+.5-h),u-h),c=(1+Math.cos(Math.PI+2*Math.PI*r/(u-h)))/2),c=l(c)):(r>=n(h)&&(c=e(0,t(r-h<0?t(u,1)-(h-r):u-r,1))),c=l(c));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var A=.5-.5*g;c1&&(c=1)}return c*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&2===this.data.r&&(this.e.v=this._currentTextLength);var t=2===this.data.r?1:100/this.data.totalChars,n=this.o.v/t,r=this.s.v/t+n,i=this.e.v/t+n;if(r>i){var s=r;r=i,i=s}this.finalS=r,this.finalE=i}},extendPrototype([DynamicPropertyContainer],r),{getTextSelectorProp:function(e,t,n){return new r(e,t)}}}();function TextAnimatorDataProperty(e,t,n){var r={propType:!1},i=PropertyFactory.getProp,s=t.a;this.a={r:s.r?i(e,s.r,0,degToRads,n):r,rx:s.rx?i(e,s.rx,0,degToRads,n):r,ry:s.ry?i(e,s.ry,0,degToRads,n):r,sk:s.sk?i(e,s.sk,0,degToRads,n):r,sa:s.sa?i(e,s.sa,0,degToRads,n):r,s:s.s?i(e,s.s,1,.01,n):r,a:s.a?i(e,s.a,1,0,n):r,o:s.o?i(e,s.o,0,.01,n):r,p:s.p?i(e,s.p,1,0,n):r,sw:s.sw?i(e,s.sw,0,0,n):r,sc:s.sc?i(e,s.sc,1,0,n):r,fc:s.fc?i(e,s.fc,1,0,n):r,fh:s.fh?i(e,s.fh,0,0,n):r,fs:s.fs?i(e,s.fs,0,.01,n):r,fb:s.fb?i(e,s.fb,0,.01,n):r,t:s.t?i(e,s.t,0,0,n):r},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,n),this.s.t=t.s.t}function TextAnimatorProperty(e,t,n){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=n,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(n)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var e,t,n=this._textData.a.length,r=PropertyFactory.getProp;for(e=0;e=o+oe||!f?(v=(o+oe-c)/l.partialLength,N=p.point[0]+(l.point[0]-p.point[0])*v,k=p.point[1]+(l.point[1]-p.point[1])*v,S.translate(-b[0]*C[i].an*.005,-b[1]*F*.01),h=!1):f&&(c+=l.partialLength,(u+=1)>=f.length&&(u=0,m[d+=1]?f=m[d].points:x.v.c?(u=0,f=m[d=0].points):(c-=l.partialLength,f=null)),f&&(p=l,g=(l=f[u]).partialLength));O=C[i].an/2-C[i].add,S.translate(-O,0,0)}else O=C[i].an/2-C[i].add,S.translate(-O,0,0),S.translate(-b[0]*C[i].an*.005,-b[1]*F*.01,0);for(R=0;Re?this.textSpans[e].span:createNS(l?"g":"text"),g<=e){if(a.setAttribute("stroke-linecap","butt"),a.setAttribute("stroke-linejoin","round"),a.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=a,l){var A=createNS("g");a.appendChild(A),this.textSpans[e].childSpan=A}this.textSpans[e].span=a,this.layerElement.appendChild(a)}a.style.display="inherit"}if(c.reset(),h&&(o[e].n&&(u=-f,d+=n.yOffset,d+=p?1:0,p=!1),this.applyTextPropertiesToMatrix(n,c,o[e].line,u,d),u+=o[e].l||0,u+=f),l){var v;if(1===(m=this.globalData.fontManager.getCharData(n.finalText[e],r.fStyle,this.globalData.fontManager.getFontByName(n.f).fFamily)).t)v=new SVGCompElement(m.data,this.globalData,this);else{var y=emptyShapeData;m.data&&m.data.shapes&&(y=this.buildShapeData(m.data,n.finalSize)),v=new SVGShapeElement(y,this.globalData,this)}if(this.textSpans[e].glyph){var x=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(x.layerElement),x.destroy()}this.textSpans[e].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[e].childSpan.appendChild(v.layerElement),1===m.t&&this.textSpans[e].childSpan.setAttribute("transform","scale("+n.finalSize/100+","+n.finalSize/100+")")}else h&&a.setAttribute("transform","translate("+c.props[12]+","+c.props[13]+")"),a.textContent=o[e].val,a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}h&&a&&a.setAttribute("d","")}else{var b=this.textContainer,E="start";switch(n.j){case 1:E="end";break;case 2:E="middle";break;default:E="start"}b.setAttribute("text-anchor",E),b.setAttribute("letter-spacing",f);var _=this.buildTextContents(n.finalText);for(t=_.length,d=n.ps?n.ps[1]+n.ascent:0,e=0;e=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t=0;n-=1)(this.completeLayers||this.elements[n])&&(this.elements[n].prepareFrame(this.renderedFrame-this.layers[n].st),this.elements[n]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e=0;r-=1)n=e.transforms[r].transform.mProps.v.props,e.finalTransform.transform(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]);e._mdf=s},processSequences:function(e){var t,n=this.sequenceList.length;for(t=0;t=0;s-=1){if((l=this.searchProcessedElement(e[s]))?t[s]=n[l-1]:e[s]._shouldRender=r,"fl"===e[s].ty||"st"===e[s].ty||"gf"===e[s].ty||"gs"===e[s].ty)l?t[s].style.closed=!1:t[s]=this.createStyleElement(e[s],f),d.push(t[s].style);else if("gr"===e[s].ty){if(l)for(o=t[s].it.length,a=0;a=0;i-=1)"tr"===t[i].ty?(s=n[i].transform,this.renderShapeTransform(e,s)):"sh"===t[i].ty||"el"===t[i].ty||"rc"===t[i].ty||"sr"===t[i].ty?this.renderPath(t[i],n[i]):"fl"===t[i].ty?this.renderFill(t[i],n[i],s):"st"===t[i].ty?this.renderStroke(t[i],n[i],s):"gf"===t[i].ty||"gs"===t[i].ty?this.renderGradientFill(t[i],n[i],s):"gr"===t[i].ty?this.renderShape(s,t[i].it,n[i].it):t[i].ty;r&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var n,r,i,s=e.trNodes,a=t.paths,o=a._length;s.length=0;var l=e.transforms.finalTransform;for(i=0;i=1?u=.99:u<=-1&&(u=-.99);var d=c*u,p=Math.cos(h+t.a.v)*d+o[0],f=Math.sin(h+t.a.v)*d+o[1];r=a.createRadialGradient(p,f,0,o[0],o[1],c)}var m=e.g.p,g=t.g.c,A=1;for(s=0;so&&"xMidYMid slice"===l||an&&"meet"===s||rn&&"slice"===s)?(e-this.transformCanvas.w*(t/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===o&&(rn&&"slice"===s)?(e-this.transformCanvas.w*(t/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===l&&(r>n&&"meet"===s||rn&&"meet"===s||r=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if((this.renderedFrame!==e||!0!==this.renderConfig.clearCanvas||t)&&!this.destroyed&&-1!==e){var n;this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var r=this.layers.length;for(this.completeLayers||this.checkLayers(e),n=0;n=0;n-=1)(this.completeLayers||this.elements[n])&&this.elements[n].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){var n=this.createItem(this.layers[e],this,this.globalData);t[e]=n,n.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var e,t=this.canvasContext;for(t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip(),e=this.layers.length-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},registerRenderer("canvas",CanvasRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier);const Expressions=function(){var e={};return e.initExpressions=function(e){var t=0,n=[];e.renderer.compInterface=CompExpressionInterface(e.renderer),e.renderer.globalData.projectInterface.registerComposition(e.renderer),e.renderer.globalData.pushExpression=function(){t+=1},e.renderer.globalData.popExpression=function(){0==(t-=1)&&function(){var e,t=n.length;for(e=0;e=o;)e/=2,t/=2,n>>>=1;return(e+n)/t};return y.int32=function(){return 0|v.g(4)},y.quick=function(){return v.g(4)/4294967296},y.double=y,d(p(v.S),e),(f.pass||m||function(e,n,r,s){return s&&(s.S&&h(s,v),e.state=function(){return h(v,{})}),r?(t[i]=e,n):e})(y,A,"global"in f?f.global:this==t,f.state)},d(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};const ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null;function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return"number"===e||"boolean"===e||"string"===e||t instanceof Number}function $bm_neg(e){var t=typeof e;if("number"===t||"boolean"===t||e instanceof Number)return-e;if($bm_isInstanceOfArray(e)){var n,r=e.length,i=[];for(n=0;nn){var r=n;n=t,t=r}return Math.min(Math.max(e,t),n)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if("number"==typeof e||e instanceof Number)return t=t||0,Math.abs(e-t);var n;t||(t=helperLengthArray);var r=Math.min(e.length,t.length),i=0;for(n=0;n.5?c/(2-a-o):c/(a+o),a){case r:t=(i-s)/c+(i1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e){var t,n,r,i=e[0],s=e[1],a=e[2];if(0===s)t=a,r=a,n=a;else{var o=a<.5?a*(1+s):a+s-a*s,l=2*a-o;t=hue2rgb(l,o,i+1/3),n=hue2rgb(l,o,i),r=hue2rgb(l,o,i-1/3)}return[t,n,r,e[3]]}function linear(e,t,n,r,i){if(void 0!==r&&void 0!==i||(r=t,i=n,t=0,n=1),n=n)return i;var a,o=n===t?0:(e-t)/(n-t);if(!r.length)return r+(i-r)*o;var l=r.length,c=createTypedArray("float32",l);for(a=0;a1){for(r=0;r1?t=1:t<0&&(t=0);var a=e(t);if($bm_isInstanceOfArray(i)){var o,l=i.length,c=createTypedArray("float32",l);for(o=0;odata.k[t].t&&edata.k[t+1].t-e?(n=t+2,r=data.k[t+1].t):(n=t+1,r=data.k[t].t);break}}-1===n&&(n=t+1,r=data.k[t].t)}else n=0,r=0;var s={};return s.index=n,s.time=r/elem.comp.globalData.frameRate,s}function key(e){var t,n,r;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var i=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(r=i.length,n=0;nc.length-1)&&(t=c.length-1),r=h-(i=c[c.length-1-t].t)),"pingpong"===e){if(Math.floor((l-i)/r)%2!=0)return this.getValueAtTime((r-(l-i)%r+i)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var u=this.getValueAtTime(i/this.comp.globalData.frameRate,0),d=this.getValueAtTime(h/this.comp.globalData.frameRate,0),p=this.getValueAtTime(((l-i)%r+i)/this.comp.globalData.frameRate,0),f=Math.floor((l-i)/r);if(this.pv.length){for(a=(o=new Array(u.length)).length,s=0;s=h)return this.pv;if(n?i=h+(r=t?Math.abs(this.elem.comp.globalData.frameRate*t):Math.max(0,this.elem.data.op-h)):((!t||t>c.length-1)&&(t=c.length-1),r=(i=c[t].t)-h),"pingpong"===e){if(Math.floor((h-l)/r)%2==0)return this.getValueAtTime(((h-l)%r+h)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var u=this.getValueAtTime(h/this.comp.globalData.frameRate,0),d=this.getValueAtTime(i/this.comp.globalData.frameRate,0),p=this.getValueAtTime((r-(h-l)%r+h)/this.comp.globalData.frameRate,0),f=Math.floor((h-l)/r)+1;if(this.pv.length){for(a=(o=new Array(u.length)).length,s=0;s1?(i+e-s)/(t-1):1,o=0,l=0;for(n=this.pv.length?createTypedArray("float32",this.pv.length):0;oa){var h=o,u=n.c&&o===l-1?0:o+1,d=(a-c)/s[o].addedLength;r=bez.getPointInSegment(n.v[h],n.v[u],n.o[h],n.i[u],d,s[o]);break}c+=s[o].addedLength,o+=1}return r||(r=n.c?[n.v[0][0],n.v[0][1]]:[n.v[n._length-1][0],n.v[n._length-1][1]]),r},vectorOnPath:function(e,t,n){1==e?e=this.v.c:0==e&&(e=.999);var r=this.pointOnPath(e,t),i=this.pointOnPath(e+.001,t),s=i[0]-r[0],a=i[1]-r[1],o=Math.sqrt(Math.pow(s,2)+Math.pow(a,2));return 0===o?[0,0]:"tangent"===n?[s/o,a/o]:[-a/o,s/o]},tangentOnPath:function(e,t){return this.vectorOnPath(e,t,"tangent")},normalOnPath:function(e,t){return this.vectorOnPath(e,t,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([c],o),extendPrototype([c],l),l.prototype.getValueAtTime=function(e){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});class n{constructor(){this.s2uTable={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:92,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:126,161:65377,162:65378,163:65379,164:65380,165:65381,166:65382,167:65383,168:65384,169:65385,170:65386,171:65387,172:65388,173:65389,174:65390,175:65391,176:65392,177:65393,178:65394,179:65395,180:65396,181:65397,182:65398,183:65399,184:65400,185:65401,186:65402,187:65403,188:65404,189:65405,190:65406,191:65407,192:65408,193:65409,194:65410,195:65411,196:65412,197:65413,198:65414,199:65415,200:65416,201:65417,202:65418,203:65419,204:65420,205:65421,206:65422,207:65423,208:65424,209:65425,210:65426,211:65427,212:65428,213:65429,214:65430,215:65431,216:65432,217:65433,218:65434,219:65435,220:65436,221:65437,222:65438,223:65439,33088:12288,33089:12289,33090:12290,33091:65292,33092:65294,33093:12539,33094:65306,33095:65307,33096:65311,33097:65281,33098:12443,33099:12444,33100:180,33101:65344,33102:168,33103:65342,33104:65507,33105:65343,33106:12541,33107:12542,33108:12445,33109:12446,33110:12291,33111:20189,33112:12293,33113:12294,33114:12295,33115:12540,33116:8213,33117:8208,33118:65295,33119:65340,33120:65374,33121:8741,33122:65372,33123:8230,33124:8229,33125:8216,33126:8217,33127:8220,33128:8221,33129:65288,33130:65289,33131:12308,33132:12309,33133:65339,33134:65341,33135:65371,33136:65373,33137:12296,33138:12297,33139:12298,33140:12299,33141:12300,33142:12301,33143:12302,33144:12303,33145:12304,33146:12305,33147:65291,33148:65293,33149:177,33150:215,33152:247,33153:65309,33154:8800,33155:65308,33156:65310,33157:8806,33158:8807,33159:8734,33160:8756,33161:9794,33162:9792,33163:176,33164:8242,33165:8243,33166:8451,33167:65509,33168:65284,33169:65504,33170:65505,33171:65285,33172:65283,33173:65286,33174:65290,33175:65312,33176:167,33177:9734,33178:9733,33179:9675,33180:9679,33181:9678,33182:9671,33183:9670,33184:9633,33185:9632,33186:9651,33187:9650,33188:9661,33189:9660,33190:8251,33191:12306,33192:8594,33193:8592,33194:8593,33195:8595,33196:12307,33208:8712,33209:8715,33210:8838,33211:8839,33212:8834,33213:8835,33214:8746,33215:8745,33224:8743,33225:8744,33226:65506,33227:8658,33228:8660,33229:8704,33230:8707,33242:8736,33243:8869,33244:8978,33245:8706,33246:8711,33247:8801,33248:8786,33249:8810,33250:8811,33251:8730,33252:8765,33253:8733,33254:8757,33255:8747,33256:8748,33264:8491,33265:8240,33266:9839,33267:9837,33268:9834,33269:8224,33270:8225,33271:182,33276:9711,33359:65296,33360:65297,33361:65298,33362:65299,33363:65300,33364:65301,33365:65302,33366:65303,33367:65304,33368:65305,33376:65313,33377:65314,33378:65315,33379:65316,33380:65317,33381:65318,33382:65319,33383:65320,33384:65321,33385:65322,33386:65323,33387:65324,33388:65325,33389:65326,33390:65327,33391:65328,33392:65329,33393:65330,33394:65331,33395:65332,33396:65333,33397:65334,33398:65335,33399:65336,33400:65337,33401:65338,33409:65345,33410:65346,33411:65347,33412:65348,33413:65349,33414:65350,33415:65351,33416:65352,33417:65353,33418:65354,33419:65355,33420:65356,33421:65357,33422:65358,33423:65359,33424:65360,33425:65361,33426:65362,33427:65363,33428:65364,33429:65365,33430:65366,33431:65367,33432:65368,33433:65369,33434:65370,33439:12353,33440:12354,33441:12355,33442:12356,33443:12357,33444:12358,33445:12359,33446:12360,33447:12361,33448:12362,33449:12363,33450:12364,33451:12365,33452:12366,33453:12367,33454:12368,33455:12369,33456:12370,33457:12371,33458:12372,33459:12373,33460:12374,33461:12375,33462:12376,33463:12377,33464:12378,33465:12379,33466:12380,33467:12381,33468:12382,33469:12383,33470:12384,33471:12385,33472:12386,33473:12387,33474:12388,33475:12389,33476:12390,33477:12391,33478:12392,33479:12393,33480:12394,33481:12395,33482:12396,33483:12397,33484:12398,33485:12399,33486:12400,33487:12401,33488:12402,33489:12403,33490:12404,33491:12405,33492:12406,33493:12407,33494:12408,33495:12409,33496:12410,33497:12411,33498:12412,33499:12413,33500:12414,33501:12415,33502:12416,33503:12417,33504:12418,33505:12419,33506:12420,33507:12421,33508:12422,33509:12423,33510:12424,33511:12425,33512:12426,33513:12427,33514:12428,33515:12429,33516:12430,33517:12431,33518:12432,33519:12433,33520:12434,33521:12435,33600:12449,33601:12450,33602:12451,33603:12452,33604:12453,33605:12454,33606:12455,33607:12456,33608:12457,33609:12458,33610:12459,33611:12460,33612:12461,33613:12462,33614:12463,33615:12464,33616:12465,33617:12466,33618:12467,33619:12468,33620:12469,33621:12470,33622:12471,33623:12472,33624:12473,33625:12474,33626:12475,33627:12476,33628:12477,33629:12478,33630:12479,33631:12480,33632:12481,33633:12482,33634:12483,33635:12484,33636:12485,33637:12486,33638:12487,33639:12488,33640:12489,33641:12490,33642:12491,33643:12492,33644:12493,33645:12494,33646:12495,33647:12496,33648:12497,33649:12498,33650:12499,33651:12500,33652:12501,33653:12502,33654:12503,33655:12504,33656:12505,33657:12506,33658:12507,33659:12508,33660:12509,33661:12510,33662:12511,33664:12512,33665:12513,33666:12514,33667:12515,33668:12516,33669:12517,33670:12518,33671:12519,33672:12520,33673:12521,33674:12522,33675:12523,33676:12524,33677:12525,33678:12526,33679:12527,33680:12528,33681:12529,33682:12530,33683:12531,33684:12532,33685:12533,33686:12534,33695:913,33696:914,33697:915,33698:916,33699:917,33700:918,33701:919,33702:920,33703:921,33704:922,33705:923,33706:924,33707:925,33708:926,33709:927,33710:928,33711:929,33712:931,33713:932,33714:933,33715:934,33716:935,33717:936,33718:937,33727:945,33728:946,33729:947,33730:948,33731:949,33732:950,33733:951,33734:952,33735:953,33736:954,33737:955,33738:956,33739:957,33740:958,33741:959,33742:960,33743:961,33744:963,33745:964,33746:965,33747:966,33748:967,33749:968,33750:969,33856:1040,33857:1041,33858:1042,33859:1043,33860:1044,33861:1045,33862:1025,33863:1046,33864:1047,33865:1048,33866:1049,33867:1050,33868:1051,33869:1052,33870:1053,33871:1054,33872:1055,33873:1056,33874:1057,33875:1058,33876:1059,33877:1060,33878:1061,33879:1062,33880:1063,33881:1064,33882:1065,33883:1066,33884:1067,33885:1068,33886:1069,33887:1070,33888:1071,33904:1072,33905:1073,33906:1074,33907:1075,33908:1076,33909:1077,33910:1105,33911:1078,33912:1079,33913:1080,33914:1081,33915:1082,33916:1083,33917:1084,33918:1085,33920:1086,33921:1087,33922:1088,33923:1089,33924:1090,33925:1091,33926:1092,33927:1093,33928:1094,33929:1095,33930:1096,33931:1097,33932:1098,33933:1099,33934:1100,33935:1101,33936:1102,33937:1103,33951:9472,33952:9474,33953:9484,33954:9488,33955:9496,33956:9492,33957:9500,33958:9516,33959:9508,33960:9524,33961:9532,33962:9473,33963:9475,33964:9487,33965:9491,33966:9499,33967:9495,33968:9507,33969:9523,33970:9515,33971:9531,33972:9547,33973:9504,33974:9519,33975:9512,33976:9527,33977:9535,33978:9501,33979:9520,33980:9509,33981:9528,33982:9538,34624:9312,34625:9313,34626:9314,34627:9315,34628:9316,34629:9317,34630:9318,34631:9319,34632:9320,34633:9321,34634:9322,34635:9323,34636:9324,34637:9325,34638:9326,34639:9327,34640:9328,34641:9329,34642:9330,34643:9331,34644:8544,34645:8545,34646:8546,34647:8547,34648:8548,34649:8549,34650:8550,34651:8551,34652:8552,34653:8553,34655:13129,34656:13076,34657:13090,34658:13133,34659:13080,34660:13095,34661:13059,34662:13110,34663:13137,34664:13143,34665:13069,34666:13094,34667:13091,34668:13099,34669:13130,34670:13115,34671:13212,34672:13213,34673:13214,34674:13198,34675:13199,34676:13252,34677:13217,34686:13179,34688:12317,34689:12319,34690:8470,34691:13261,34692:8481,34693:12964,34694:12965,34695:12966,34696:12967,34697:12968,34698:12849,34699:12850,34700:12857,34701:13182,34702:13181,34703:13180,34704:8786,34705:8801,34706:8747,34707:8750,34708:8721,34709:8730,34710:8869,34711:8736,34712:8735,34713:8895,34714:8757,34715:8745,34716:8746,34975:20124,34976:21782,34977:23043,34978:38463,34979:21696,34980:24859,34981:25384,34982:23030,34983:36898,34984:33909,34985:33564,34986:31312,34987:24746,34988:25569,34989:28197,34990:26093,34991:33894,34992:33446,34993:39925,34994:26771,34995:22311,34996:26017,34997:25201,34998:23451,34999:22992,35e3:34427,35001:39156,35002:32098,35003:32190,35004:39822,35005:25110,35006:31903,35007:34999,35008:23433,35009:24245,35010:25353,35011:26263,35012:26696,35013:38343,35014:38797,35015:26447,35016:20197,35017:20234,35018:20301,35019:20381,35020:20553,35021:22258,35022:22839,35023:22996,35024:23041,35025:23561,35026:24799,35027:24847,35028:24944,35029:26131,35030:26885,35031:28858,35032:30031,35033:30064,35034:31227,35035:32173,35036:32239,35037:32963,35038:33806,35039:34915,35040:35586,35041:36949,35042:36986,35043:21307,35044:20117,35045:20133,35046:22495,35047:32946,35048:37057,35049:30959,35050:19968,35051:22769,35052:28322,35053:36920,35054:31282,35055:33576,35056:33419,35057:39983,35058:20801,35059:21360,35060:21693,35061:21729,35062:22240,35063:23035,35064:24341,35065:39154,35066:28139,35067:32996,35068:34093,35136:38498,35137:38512,35138:38560,35139:38907,35140:21515,35141:21491,35142:23431,35143:28879,35144:32701,35145:36802,35146:38632,35147:21359,35148:40284,35149:31418,35150:19985,35151:30867,35152:33276,35153:28198,35154:22040,35155:21764,35156:27421,35157:34074,35158:39995,35159:23013,35160:21417,35161:28006,35162:29916,35163:38287,35164:22082,35165:20113,35166:36939,35167:38642,35168:33615,35169:39180,35170:21473,35171:21942,35172:23344,35173:24433,35174:26144,35175:26355,35176:26628,35177:27704,35178:27891,35179:27945,35180:29787,35181:30408,35182:31310,35183:38964,35184:33521,35185:34907,35186:35424,35187:37613,35188:28082,35189:30123,35190:30410,35191:39365,35192:24742,35193:35585,35194:36234,35195:38322,35196:27022,35197:21421,35198:20870,35200:22290,35201:22576,35202:22852,35203:23476,35204:24310,35205:24616,35206:25513,35207:25588,35208:27839,35209:28436,35210:28814,35211:28948,35212:29017,35213:29141,35214:29503,35215:32257,35216:33398,35217:33489,35218:34199,35219:36960,35220:37467,35221:40219,35222:22633,35223:26044,35224:27738,35225:29989,35226:20985,35227:22830,35228:22885,35229:24448,35230:24540,35231:25276,35232:26106,35233:27178,35234:27431,35235:27572,35236:29579,35237:32705,35238:35158,35239:40236,35240:40206,35241:40644,35242:23713,35243:27798,35244:33659,35245:20740,35246:23627,35247:25014,35248:33222,35249:26742,35250:29281,35251:20057,35252:20474,35253:21368,35254:24681,35255:28201,35256:31311,35257:38899,35258:19979,35259:21270,35260:20206,35261:20309,35262:20285,35263:20385,35264:20339,35265:21152,35266:21487,35267:22025,35268:22799,35269:23233,35270:23478,35271:23521,35272:31185,35273:26247,35274:26524,35275:26550,35276:27468,35277:27827,35278:28779,35279:29634,35280:31117,35281:31166,35282:31292,35283:31623,35284:33457,35285:33499,35286:33540,35287:33655,35288:33775,35289:33747,35290:34662,35291:35506,35292:22057,35293:36008,35294:36838,35295:36942,35296:38686,35297:34442,35298:20420,35299:23784,35300:25105,35301:29273,35302:30011,35303:33253,35304:33469,35305:34558,35306:36032,35307:38597,35308:39187,35309:39381,35310:20171,35311:20250,35312:35299,35313:22238,35314:22602,35315:22730,35316:24315,35317:24555,35318:24618,35319:24724,35320:24674,35321:25040,35322:25106,35323:25296,35324:25913,35392:39745,35393:26214,35394:26800,35395:28023,35396:28784,35397:30028,35398:30342,35399:32117,35400:33445,35401:34809,35402:38283,35403:38542,35404:35997,35405:20977,35406:21182,35407:22806,35408:21683,35409:23475,35410:23830,35411:24936,35412:27010,35413:28079,35414:30861,35415:33995,35416:34903,35417:35442,35418:37799,35419:39608,35420:28012,35421:39336,35422:34521,35423:22435,35424:26623,35425:34510,35426:37390,35427:21123,35428:22151,35429:21508,35430:24275,35431:25313,35432:25785,35433:26684,35434:26680,35435:27579,35436:29554,35437:30906,35438:31339,35439:35226,35440:35282,35441:36203,35442:36611,35443:37101,35444:38307,35445:38548,35446:38761,35447:23398,35448:23731,35449:27005,35450:38989,35451:38990,35452:25499,35453:31520,35454:27179,35456:27263,35457:26806,35458:39949,35459:28511,35460:21106,35461:21917,35462:24688,35463:25324,35464:27963,35465:28167,35466:28369,35467:33883,35468:35088,35469:36676,35470:19988,35471:39993,35472:21494,35473:26907,35474:27194,35475:38788,35476:26666,35477:20828,35478:31427,35479:33970,35480:37340,35481:37772,35482:22107,35483:40232,35484:26658,35485:33541,35486:33841,35487:31909,35488:21e3,35489:33477,35490:29926,35491:20094,35492:20355,35493:20896,35494:23506,35495:21002,35496:21208,35497:21223,35498:24059,35499:21914,35500:22570,35501:23014,35502:23436,35503:23448,35504:23515,35505:24178,35506:24185,35507:24739,35508:24863,35509:24931,35510:25022,35511:25563,35512:25954,35513:26577,35514:26707,35515:26874,35516:27454,35517:27475,35518:27735,35519:28450,35520:28567,35521:28485,35522:29872,35523:29976,35524:30435,35525:30475,35526:31487,35527:31649,35528:31777,35529:32233,35530:32566,35531:32752,35532:32925,35533:33382,35534:33694,35535:35251,35536:35532,35537:36011,35538:36996,35539:37969,35540:38291,35541:38289,35542:38306,35543:38501,35544:38867,35545:39208,35546:33304,35547:20024,35548:21547,35549:23736,35550:24012,35551:29609,35552:30284,35553:30524,35554:23721,35555:32747,35556:36107,35557:38593,35558:38929,35559:38996,35560:39e3,35561:20225,35562:20238,35563:21361,35564:21916,35565:22120,35566:22522,35567:22855,35568:23305,35569:23492,35570:23696,35571:24076,35572:24190,35573:24524,35574:25582,35575:26426,35576:26071,35577:26082,35578:26399,35579:26827,35580:26820,35648:27231,35649:24112,35650:27589,35651:27671,35652:27773,35653:30079,35654:31048,35655:23395,35656:31232,35657:32e3,35658:24509,35659:35215,35660:35352,35661:36020,35662:36215,35663:36556,35664:36637,35665:39138,35666:39438,35667:39740,35668:20096,35669:20605,35670:20736,35671:22931,35672:23452,35673:25135,35674:25216,35675:25836,35676:27450,35677:29344,35678:30097,35679:31047,35680:32681,35681:34811,35682:35516,35683:35696,35684:25516,35685:33738,35686:38816,35687:21513,35688:21507,35689:21931,35690:26708,35691:27224,35692:35440,35693:30759,35694:26485,35695:40653,35696:21364,35697:23458,35698:33050,35699:34384,35700:36870,35701:19992,35702:20037,35703:20167,35704:20241,35705:21450,35706:21560,35707:23470,35708:24339,35709:24613,35710:25937,35712:26429,35713:27714,35714:27762,35715:27875,35716:28792,35717:29699,35718:31350,35719:31406,35720:31496,35721:32026,35722:31998,35723:32102,35724:26087,35725:29275,35726:21435,35727:23621,35728:24040,35729:25298,35730:25312,35731:25369,35732:28192,35733:34394,35734:35377,35735:36317,35736:37624,35737:28417,35738:31142,35739:39770,35740:20136,35741:20139,35742:20140,35743:20379,35744:20384,35745:20689,35746:20807,35747:31478,35748:20849,35749:20982,35750:21332,35751:21281,35752:21375,35753:21483,35754:21932,35755:22659,35756:23777,35757:24375,35758:24394,35759:24623,35760:24656,35761:24685,35762:25375,35763:25945,35764:27211,35765:27841,35766:29378,35767:29421,35768:30703,35769:33016,35770:33029,35771:33288,35772:34126,35773:37111,35774:37857,35775:38911,35776:39255,35777:39514,35778:20208,35779:20957,35780:23597,35781:26241,35782:26989,35783:23616,35784:26354,35785:26997,35786:29577,35787:26704,35788:31873,35789:20677,35790:21220,35791:22343,35792:24062,35793:37670,35794:26020,35795:27427,35796:27453,35797:29748,35798:31105,35799:31165,35800:31563,35801:32202,35802:33465,35803:33740,35804:34943,35805:35167,35806:35641,35807:36817,35808:37329,35809:21535,35810:37504,35811:20061,35812:20534,35813:21477,35814:21306,35815:29399,35816:29590,35817:30697,35818:33510,35819:36527,35820:39366,35821:39368,35822:39378,35823:20855,35824:24858,35825:34398,35826:21936,35827:31354,35828:20598,35829:23507,35830:36935,35831:38533,35832:20018,35833:27355,35834:37351,35835:23633,35836:23624,35904:25496,35905:31391,35906:27795,35907:38772,35908:36705,35909:31402,35910:29066,35911:38536,35912:31874,35913:26647,35914:32368,35915:26705,35916:37740,35917:21234,35918:21531,35919:34219,35920:35347,35921:32676,35922:36557,35923:37089,35924:21350,35925:34952,35926:31041,35927:20418,35928:20670,35929:21009,35930:20804,35931:21843,35932:22317,35933:29674,35934:22411,35935:22865,35936:24418,35937:24452,35938:24693,35939:24950,35940:24935,35941:25001,35942:25522,35943:25658,35944:25964,35945:26223,35946:26690,35947:28179,35948:30054,35949:31293,35950:31995,35951:32076,35952:32153,35953:32331,35954:32619,35955:33550,35956:33610,35957:34509,35958:35336,35959:35427,35960:35686,35961:36605,35962:38938,35963:40335,35964:33464,35965:36814,35966:39912,35968:21127,35969:25119,35970:25731,35971:28608,35972:38553,35973:26689,35974:20625,35975:27424,35976:27770,35977:28500,35978:31348,35979:32080,35980:34880,35981:35363,35982:26376,35983:20214,35984:20537,35985:20518,35986:20581,35987:20860,35988:21048,35989:21091,35990:21927,35991:22287,35992:22533,35993:23244,35994:24314,35995:25010,35996:25080,35997:25331,35998:25458,35999:26908,36e3:27177,36001:29309,36002:29356,36003:29486,36004:30740,36005:30831,36006:32121,36007:30476,36008:32937,36009:35211,36010:35609,36011:36066,36012:36562,36013:36963,36014:37749,36015:38522,36016:38997,36017:39443,36018:40568,36019:20803,36020:21407,36021:21427,36022:24187,36023:24358,36024:28187,36025:28304,36026:29572,36027:29694,36028:32067,36029:33335,36030:35328,36031:35578,36032:38480,36033:20046,36034:20491,36035:21476,36036:21628,36037:22266,36038:22993,36039:23396,36040:24049,36041:24235,36042:24359,36043:25144,36044:25925,36045:26543,36046:28246,36047:29392,36048:31946,36049:34996,36050:32929,36051:32993,36052:33776,36053:34382,36054:35463,36055:36328,36056:37431,36057:38599,36058:39015,36059:40723,36060:20116,36061:20114,36062:20237,36063:21320,36064:21577,36065:21566,36066:23087,36067:24460,36068:24481,36069:24735,36070:26791,36071:27278,36072:29786,36073:30849,36074:35486,36075:35492,36076:35703,36077:37264,36078:20062,36079:39881,36080:20132,36081:20348,36082:20399,36083:20505,36084:20502,36085:20809,36086:20844,36087:21151,36088:21177,36089:21246,36090:21402,36091:21475,36092:21521,36160:21518,36161:21897,36162:22353,36163:22434,36164:22909,36165:23380,36166:23389,36167:23439,36168:24037,36169:24039,36170:24055,36171:24184,36172:24195,36173:24218,36174:24247,36175:24344,36176:24658,36177:24908,36178:25239,36179:25304,36180:25511,36181:25915,36182:26114,36183:26179,36184:26356,36185:26477,36186:26657,36187:26775,36188:27083,36189:27743,36190:27946,36191:28009,36192:28207,36193:28317,36194:30002,36195:30343,36196:30828,36197:31295,36198:31968,36199:32005,36200:32024,36201:32094,36202:32177,36203:32789,36204:32771,36205:32943,36206:32945,36207:33108,36208:33167,36209:33322,36210:33618,36211:34892,36212:34913,36213:35611,36214:36002,36215:36092,36216:37066,36217:37237,36218:37489,36219:30783,36220:37628,36221:38308,36222:38477,36224:38917,36225:39321,36226:39640,36227:40251,36228:21083,36229:21163,36230:21495,36231:21512,36232:22741,36233:25335,36234:28640,36235:35946,36236:36703,36237:40633,36238:20811,36239:21051,36240:21578,36241:22269,36242:31296,36243:37239,36244:40288,36245:40658,36246:29508,36247:28425,36248:33136,36249:29969,36250:24573,36251:24794,36252:39592,36253:29403,36254:36796,36255:27492,36256:38915,36257:20170,36258:22256,36259:22372,36260:22718,36261:23130,36262:24680,36263:25031,36264:26127,36265:26118,36266:26681,36267:26801,36268:28151,36269:30165,36270:32058,36271:33390,36272:39746,36273:20123,36274:20304,36275:21449,36276:21766,36277:23919,36278:24038,36279:24046,36280:26619,36281:27801,36282:29811,36283:30722,36284:35408,36285:37782,36286:35039,36287:22352,36288:24231,36289:25387,36290:20661,36291:20652,36292:20877,36293:26368,36294:21705,36295:22622,36296:22971,36297:23472,36298:24425,36299:25165,36300:25505,36301:26685,36302:27507,36303:28168,36304:28797,36305:37319,36306:29312,36307:30741,36308:30758,36309:31085,36310:25998,36311:32048,36312:33756,36313:35009,36314:36617,36315:38555,36316:21092,36317:22312,36318:26448,36319:32618,36320:36001,36321:20916,36322:22338,36323:38442,36324:22586,36325:27018,36326:32948,36327:21682,36328:23822,36329:22524,36330:30869,36331:40442,36332:20316,36333:21066,36334:21643,36335:25662,36336:26152,36337:26388,36338:26613,36339:31364,36340:31574,36341:32034,36342:37679,36343:26716,36344:39853,36345:31545,36346:21273,36347:20874,36348:21047,36416:23519,36417:25334,36418:25774,36419:25830,36420:26413,36421:27578,36422:34217,36423:38609,36424:30352,36425:39894,36426:25420,36427:37638,36428:39851,36429:30399,36430:26194,36431:19977,36432:20632,36433:21442,36434:23665,36435:24808,36436:25746,36437:25955,36438:26719,36439:29158,36440:29642,36441:29987,36442:31639,36443:32386,36444:34453,36445:35715,36446:36059,36447:37240,36448:39184,36449:26028,36450:26283,36451:27531,36452:20181,36453:20180,36454:20282,36455:20351,36456:21050,36457:21496,36458:21490,36459:21987,36460:22235,36461:22763,36462:22987,36463:22985,36464:23039,36465:23376,36466:23629,36467:24066,36468:24107,36469:24535,36470:24605,36471:25351,36472:25903,36473:23388,36474:26031,36475:26045,36476:26088,36477:26525,36478:27490,36480:27515,36481:27663,36482:29509,36483:31049,36484:31169,36485:31992,36486:32025,36487:32043,36488:32930,36489:33026,36490:33267,36491:35222,36492:35422,36493:35433,36494:35430,36495:35468,36496:35566,36497:36039,36498:36060,36499:38604,36500:39164,36501:27503,36502:20107,36503:20284,36504:20365,36505:20816,36506:23383,36507:23546,36508:24904,36509:25345,36510:26178,36511:27425,36512:28363,36513:27835,36514:29246,36515:29885,36516:30164,36517:30913,36518:31034,36519:32780,36520:32819,36521:33258,36522:33940,36523:36766,36524:27728,36525:40575,36526:24335,36527:35672,36528:40235,36529:31482,36530:36600,36531:23437,36532:38635,36533:19971,36534:21489,36535:22519,36536:22833,36537:23241,36538:23460,36539:24713,36540:28287,36541:28422,36542:30142,36543:36074,36544:23455,36545:34048,36546:31712,36547:20594,36548:26612,36549:33437,36550:23649,36551:34122,36552:32286,36553:33294,36554:20889,36555:23556,36556:25448,36557:36198,36558:26012,36559:29038,36560:31038,36561:32023,36562:32773,36563:35613,36564:36554,36565:36974,36566:34503,36567:37034,36568:20511,36569:21242,36570:23610,36571:26451,36572:28796,36573:29237,36574:37196,36575:37320,36576:37675,36577:33509,36578:23490,36579:24369,36580:24825,36581:20027,36582:21462,36583:23432,36584:25163,36585:26417,36586:27530,36587:29417,36588:29664,36589:31278,36590:33131,36591:36259,36592:37202,36593:39318,36594:20754,36595:21463,36596:21610,36597:23551,36598:25480,36599:27193,36600:32172,36601:38656,36602:22234,36603:21454,36604:21608,36672:23447,36673:23601,36674:24030,36675:20462,36676:24833,36677:25342,36678:27954,36679:31168,36680:31179,36681:32066,36682:32333,36683:32722,36684:33261,36685:33311,36686:33936,36687:34886,36688:35186,36689:35728,36690:36468,36691:36655,36692:36913,36693:37195,36694:37228,36695:38598,36696:37276,36697:20160,36698:20303,36699:20805,36700:21313,36701:24467,36702:25102,36703:26580,36704:27713,36705:28171,36706:29539,36707:32294,36708:37325,36709:37507,36710:21460,36711:22809,36712:23487,36713:28113,36714:31069,36715:32302,36716:31899,36717:22654,36718:29087,36719:20986,36720:34899,36721:36848,36722:20426,36723:23803,36724:26149,36725:30636,36726:31459,36727:33308,36728:39423,36729:20934,36730:24490,36731:26092,36732:26991,36733:27529,36734:28147,36736:28310,36737:28516,36738:30462,36739:32020,36740:24033,36741:36981,36742:37255,36743:38918,36744:20966,36745:21021,36746:25152,36747:26257,36748:26329,36749:28186,36750:24246,36751:32210,36752:32626,36753:26360,36754:34223,36755:34295,36756:35576,36757:21161,36758:21465,36759:22899,36760:24207,36761:24464,36762:24661,36763:37604,36764:38500,36765:20663,36766:20767,36767:21213,36768:21280,36769:21319,36770:21484,36771:21736,36772:21830,36773:21809,36774:22039,36775:22888,36776:22974,36777:23100,36778:23477,36779:23558,36780:23567,36781:23569,36782:23578,36783:24196,36784:24202,36785:24288,36786:24432,36787:25215,36788:25220,36789:25307,36790:25484,36791:25463,36792:26119,36793:26124,36794:26157,36795:26230,36796:26494,36797:26786,36798:27167,36799:27189,36800:27836,36801:28040,36802:28169,36803:28248,36804:28988,36805:28966,36806:29031,36807:30151,36808:30465,36809:30813,36810:30977,36811:31077,36812:31216,36813:31456,36814:31505,36815:31911,36816:32057,36817:32918,36818:33750,36819:33931,36820:34121,36821:34909,36822:35059,36823:35359,36824:35388,36825:35412,36826:35443,36827:35937,36828:36062,36829:37284,36830:37478,36831:37758,36832:37912,36833:38556,36834:38808,36835:19978,36836:19976,36837:19998,36838:20055,36839:20887,36840:21104,36841:22478,36842:22580,36843:22732,36844:23330,36845:24120,36846:24773,36847:25854,36848:26465,36849:26454,36850:27972,36851:29366,36852:30067,36853:31331,36854:33976,36855:35698,36856:37304,36857:37664,36858:22065,36859:22516,36860:39166,36928:25325,36929:26893,36930:27542,36931:29165,36932:32340,36933:32887,36934:33394,36935:35302,36936:39135,36937:34645,36938:36785,36939:23611,36940:20280,36941:20449,36942:20405,36943:21767,36944:23072,36945:23517,36946:23529,36947:24515,36948:24910,36949:25391,36950:26032,36951:26187,36952:26862,36953:27035,36954:28024,36955:28145,36956:30003,36957:30137,36958:30495,36959:31070,36960:31206,36961:32051,36962:33251,36963:33455,36964:34218,36965:35242,36966:35386,36967:36523,36968:36763,36969:36914,36970:37341,36971:38663,36972:20154,36973:20161,36974:20995,36975:22645,36976:22764,36977:23563,36978:29978,36979:23613,36980:33102,36981:35338,36982:36805,36983:38499,36984:38765,36985:31525,36986:35535,36987:38920,36988:37218,36989:22259,36990:21416,36992:36887,36993:21561,36994:22402,36995:24101,36996:25512,36997:27700,36998:28810,36999:30561,37e3:31883,37001:32736,37002:34928,37003:36930,37004:37204,37005:37648,37006:37656,37007:38543,37008:29790,37009:39620,37010:23815,37011:23913,37012:25968,37013:26530,37014:36264,37015:38619,37016:25454,37017:26441,37018:26905,37019:33733,37020:38935,37021:38592,37022:35070,37023:28548,37024:25722,37025:23544,37026:19990,37027:28716,37028:30045,37029:26159,37030:20932,37031:21046,37032:21218,37033:22995,37034:24449,37035:24615,37036:25104,37037:25919,37038:25972,37039:26143,37040:26228,37041:26866,37042:26646,37043:27491,37044:28165,37045:29298,37046:29983,37047:30427,37048:31934,37049:32854,37050:22768,37051:35069,37052:35199,37053:35488,37054:35475,37055:35531,37056:36893,37057:37266,37058:38738,37059:38745,37060:25993,37061:31246,37062:33030,37063:38587,37064:24109,37065:24796,37066:25114,37067:26021,37068:26132,37069:26512,37070:30707,37071:31309,37072:31821,37073:32318,37074:33034,37075:36012,37076:36196,37077:36321,37078:36447,37079:30889,37080:20999,37081:25305,37082:25509,37083:25666,37084:25240,37085:35373,37086:31363,37087:31680,37088:35500,37089:38634,37090:32118,37091:33292,37092:34633,37093:20185,37094:20808,37095:21315,37096:21344,37097:23459,37098:23554,37099:23574,37100:24029,37101:25126,37102:25159,37103:25776,37104:26643,37105:26676,37106:27849,37107:27973,37108:27927,37109:26579,37110:28508,37111:29006,37112:29053,37113:26059,37114:31359,37115:31661,37116:32218,37184:32330,37185:32680,37186:33146,37187:33307,37188:33337,37189:34214,37190:35438,37191:36046,37192:36341,37193:36984,37194:36983,37195:37549,37196:37521,37197:38275,37198:39854,37199:21069,37200:21892,37201:28472,37202:28982,37203:20840,37204:31109,37205:32341,37206:33203,37207:31950,37208:22092,37209:22609,37210:23720,37211:25514,37212:26366,37213:26365,37214:26970,37215:29401,37216:30095,37217:30094,37218:30990,37219:31062,37220:31199,37221:31895,37222:32032,37223:32068,37224:34311,37225:35380,37226:38459,37227:36961,37228:40736,37229:20711,37230:21109,37231:21452,37232:21474,37233:20489,37234:21930,37235:22766,37236:22863,37237:29245,37238:23435,37239:23652,37240:21277,37241:24803,37242:24819,37243:25436,37244:25475,37245:25407,37246:25531,37248:25805,37249:26089,37250:26361,37251:24035,37252:27085,37253:27133,37254:28437,37255:29157,37256:20105,37257:30185,37258:30456,37259:31379,37260:31967,37261:32207,37262:32156,37263:32865,37264:33609,37265:33624,37266:33900,37267:33980,37268:34299,37269:35013,37270:36208,37271:36865,37272:36973,37273:37783,37274:38684,37275:39442,37276:20687,37277:22679,37278:24974,37279:33235,37280:34101,37281:36104,37282:36896,37283:20419,37284:20596,37285:21063,37286:21363,37287:24687,37288:25417,37289:26463,37290:28204,37291:36275,37292:36895,37293:20439,37294:23646,37295:36042,37296:26063,37297:32154,37298:21330,37299:34966,37300:20854,37301:25539,37302:23384,37303:23403,37304:23562,37305:25613,37306:26449,37307:36956,37308:20182,37309:22810,37310:22826,37311:27760,37312:35409,37313:21822,37314:22549,37315:22949,37316:24816,37317:25171,37318:26561,37319:33333,37320:26965,37321:38464,37322:39364,37323:39464,37324:20307,37325:22534,37326:23550,37327:32784,37328:23729,37329:24111,37330:24453,37331:24608,37332:24907,37333:25140,37334:26367,37335:27888,37336:28382,37337:32974,37338:33151,37339:33492,37340:34955,37341:36024,37342:36864,37343:36910,37344:38538,37345:40667,37346:39899,37347:20195,37348:21488,37349:22823,37350:31532,37351:37261,37352:38988,37353:40441,37354:28381,37355:28711,37356:21331,37357:21828,37358:23429,37359:25176,37360:25246,37361:25299,37362:27810,37363:28655,37364:29730,37365:35351,37366:37944,37367:28609,37368:35582,37369:33592,37370:20967,37371:34552,37372:21482,37440:21481,37441:20294,37442:36948,37443:36784,37444:22890,37445:33073,37446:24061,37447:31466,37448:36799,37449:26842,37450:35895,37451:29432,37452:40008,37453:27197,37454:35504,37455:20025,37456:21336,37457:22022,37458:22374,37459:25285,37460:25506,37461:26086,37462:27470,37463:28129,37464:28251,37465:28845,37466:30701,37467:31471,37468:31658,37469:32187,37470:32829,37471:32966,37472:34507,37473:35477,37474:37723,37475:22243,37476:22727,37477:24382,37478:26029,37479:26262,37480:27264,37481:27573,37482:30007,37483:35527,37484:20516,37485:30693,37486:22320,37487:24347,37488:24677,37489:26234,37490:27744,37491:30196,37492:31258,37493:32622,37494:33268,37495:34584,37496:36933,37497:39347,37498:31689,37499:30044,37500:31481,37501:31569,37502:33988,37504:36880,37505:31209,37506:31378,37507:33590,37508:23265,37509:30528,37510:20013,37511:20210,37512:23449,37513:24544,37514:25277,37515:26172,37516:26609,37517:27880,37518:34411,37519:34935,37520:35387,37521:37198,37522:37619,37523:39376,37524:27159,37525:28710,37526:29482,37527:33511,37528:33879,37529:36015,37530:19969,37531:20806,37532:20939,37533:21899,37534:23541,37535:24086,37536:24115,37537:24193,37538:24340,37539:24373,37540:24427,37541:24500,37542:25074,37543:25361,37544:26274,37545:26397,37546:28526,37547:29266,37548:30010,37549:30522,37550:32884,37551:33081,37552:33144,37553:34678,37554:35519,37555:35548,37556:36229,37557:36339,37558:37530,37559:38263,37560:38914,37561:40165,37562:21189,37563:25431,37564:30452,37565:26389,37566:27784,37567:29645,37568:36035,37569:37806,37570:38515,37571:27941,37572:22684,37573:26894,37574:27084,37575:36861,37576:37786,37577:30171,37578:36890,37579:22618,37580:26626,37581:25524,37582:27131,37583:20291,37584:28460,37585:26584,37586:36795,37587:34086,37588:32180,37589:37716,37590:26943,37591:28528,37592:22378,37593:22775,37594:23340,37595:32044,37596:29226,37597:21514,37598:37347,37599:40372,37600:20141,37601:20302,37602:20572,37603:20597,37604:21059,37605:35998,37606:21576,37607:22564,37608:23450,37609:24093,37610:24213,37611:24237,37612:24311,37613:24351,37614:24716,37615:25269,37616:25402,37617:25552,37618:26799,37619:27712,37620:30855,37621:31118,37622:31243,37623:32224,37624:33351,37625:35330,37626:35558,37627:36420,37628:36883,37696:37048,37697:37165,37698:37336,37699:40718,37700:27877,37701:25688,37702:25826,37703:25973,37704:28404,37705:30340,37706:31515,37707:36969,37708:37841,37709:28346,37710:21746,37711:24505,37712:25764,37713:36685,37714:36845,37715:37444,37716:20856,37717:22635,37718:22825,37719:23637,37720:24215,37721:28155,37722:32399,37723:29980,37724:36028,37725:36578,37726:39003,37727:28857,37728:20253,37729:27583,37730:28593,37731:3e4,37732:38651,37733:20814,37734:21520,37735:22581,37736:22615,37737:22956,37738:23648,37739:24466,37740:26007,37741:26460,37742:28193,37743:30331,37744:33759,37745:36077,37746:36884,37747:37117,37748:37709,37749:30757,37750:30778,37751:21162,37752:24230,37753:22303,37754:22900,37755:24594,37756:20498,37757:20826,37758:20908,37760:20941,37761:20992,37762:21776,37763:22612,37764:22616,37765:22871,37766:23445,37767:23798,37768:23947,37769:24764,37770:25237,37771:25645,37772:26481,37773:26691,37774:26812,37775:26847,37776:30423,37777:28120,37778:28271,37779:28059,37780:28783,37781:29128,37782:24403,37783:30168,37784:31095,37785:31561,37786:31572,37787:31570,37788:31958,37789:32113,37790:21040,37791:33891,37792:34153,37793:34276,37794:35342,37795:35588,37796:35910,37797:36367,37798:36867,37799:36879,37800:37913,37801:38518,37802:38957,37803:39472,37804:38360,37805:20685,37806:21205,37807:21516,37808:22530,37809:23566,37810:24999,37811:25758,37812:27934,37813:30643,37814:31461,37815:33012,37816:33796,37817:36947,37818:37509,37819:23776,37820:40199,37821:21311,37822:24471,37823:24499,37824:28060,37825:29305,37826:30563,37827:31167,37828:31716,37829:27602,37830:29420,37831:35501,37832:26627,37833:27233,37834:20984,37835:31361,37836:26932,37837:23626,37838:40182,37839:33515,37840:23493,37841:37193,37842:28702,37843:22136,37844:23663,37845:24775,37846:25958,37847:27788,37848:35930,37849:36929,37850:38931,37851:21585,37852:26311,37853:37389,37854:22856,37855:37027,37856:20869,37857:20045,37858:20970,37859:34201,37860:35598,37861:28760,37862:25466,37863:37707,37864:26978,37865:39348,37866:32260,37867:30071,37868:21335,37869:26976,37870:36575,37871:38627,37872:27741,37873:20108,37874:23612,37875:24336,37876:36841,37877:21250,37878:36049,37879:32905,37880:34425,37881:24319,37882:26085,37883:20083,37884:20837,37952:22914,37953:23615,37954:38894,37955:20219,37956:22922,37957:24525,37958:35469,37959:28641,37960:31152,37961:31074,37962:23527,37963:33905,37964:29483,37965:29105,37966:24180,37967:24565,37968:25467,37969:25754,37970:29123,37971:31896,37972:20035,37973:24316,37974:20043,37975:22492,37976:22178,37977:24745,37978:28611,37979:32013,37980:33021,37981:33075,37982:33215,37983:36786,37984:35223,37985:34468,37986:24052,37987:25226,37988:25773,37989:35207,37990:26487,37991:27874,37992:27966,37993:29750,37994:30772,37995:23110,37996:32629,37997:33453,37998:39340,37999:20467,38e3:24259,38001:25309,38002:25490,38003:25943,38004:26479,38005:30403,38006:29260,38007:32972,38008:32954,38009:36649,38010:37197,38011:20493,38012:22521,38013:23186,38014:26757,38016:26995,38017:29028,38018:29437,38019:36023,38020:22770,38021:36064,38022:38506,38023:36889,38024:34687,38025:31204,38026:30695,38027:33833,38028:20271,38029:21093,38030:21338,38031:25293,38032:26575,38033:27850,38034:30333,38035:31636,38036:31893,38037:33334,38038:34180,38039:36843,38040:26333,38041:28448,38042:29190,38043:32283,38044:33707,38045:39361,38046:40614,38047:20989,38048:31665,38049:30834,38050:31672,38051:32903,38052:31560,38053:27368,38054:24161,38055:32908,38056:30033,38057:30048,38058:20843,38059:37474,38060:28300,38061:30330,38062:37271,38063:39658,38064:20240,38065:32624,38066:25244,38067:31567,38068:38309,38069:40169,38070:22138,38071:22617,38072:34532,38073:38588,38074:20276,38075:21028,38076:21322,38077:21453,38078:21467,38079:24070,38080:25644,38081:26001,38082:26495,38083:27710,38084:27726,38085:29256,38086:29359,38087:29677,38088:30036,38089:32321,38090:33324,38091:34281,38092:36009,38093:31684,38094:37318,38095:29033,38096:38930,38097:39151,38098:25405,38099:26217,38100:30058,38101:30436,38102:30928,38103:34115,38104:34542,38105:21290,38106:21329,38107:21542,38108:22915,38109:24199,38110:24444,38111:24754,38112:25161,38113:25209,38114:25259,38115:26e3,38116:27604,38117:27852,38118:30130,38119:30382,38120:30865,38121:31192,38122:32203,38123:32631,38124:32933,38125:34987,38126:35513,38127:36027,38128:36991,38129:38750,38130:39131,38131:27147,38132:31800,38133:20633,38134:23614,38135:24494,38136:26503,38137:27608,38138:29749,38139:30473,38140:32654,38208:40763,38209:26570,38210:31255,38211:21305,38212:30091,38213:39661,38214:24422,38215:33181,38216:33777,38217:32920,38218:24380,38219:24517,38220:30050,38221:31558,38222:36924,38223:26727,38224:23019,38225:23195,38226:32016,38227:30334,38228:35628,38229:20469,38230:24426,38231:27161,38232:27703,38233:28418,38234:29922,38235:31080,38236:34920,38237:35413,38238:35961,38239:24287,38240:25551,38241:30149,38242:31186,38243:33495,38244:37672,38245:37618,38246:33948,38247:34541,38248:39981,38249:21697,38250:24428,38251:25996,38252:27996,38253:28693,38254:36007,38255:36051,38256:38971,38257:25935,38258:29942,38259:19981,38260:20184,38261:22496,38262:22827,38263:23142,38264:23500,38265:20904,38266:24067,38267:24220,38268:24598,38269:25206,38270:25975,38272:26023,38273:26222,38274:28014,38275:29238,38276:31526,38277:33104,38278:33178,38279:33433,38280:35676,38281:36e3,38282:36070,38283:36212,38284:38428,38285:38468,38286:20398,38287:25771,38288:27494,38289:33310,38290:33889,38291:34154,38292:37096,38293:23553,38294:26963,38295:39080,38296:33914,38297:34135,38298:20239,38299:21103,38300:24489,38301:24133,38302:26381,38303:31119,38304:33145,38305:35079,38306:35206,38307:28149,38308:24343,38309:25173,38310:27832,38311:20175,38312:29289,38313:39826,38314:20998,38315:21563,38316:22132,38317:22707,38318:24996,38319:25198,38320:28954,38321:22894,38322:31881,38323:31966,38324:32027,38325:38640,38326:25991,38327:32862,38328:19993,38329:20341,38330:20853,38331:22592,38332:24163,38333:24179,38334:24330,38335:26564,38336:20006,38337:34109,38338:38281,38339:38491,38340:31859,38341:38913,38342:20731,38343:22721,38344:30294,38345:30887,38346:21029,38347:30629,38348:34065,38349:31622,38350:20559,38351:22793,38352:29255,38353:31687,38354:32232,38355:36794,38356:36820,38357:36941,38358:20415,38359:21193,38360:23081,38361:24321,38362:38829,38363:20445,38364:33303,38365:37610,38366:22275,38367:25429,38368:27497,38369:29995,38370:35036,38371:36628,38372:31298,38373:21215,38374:22675,38375:24917,38376:25098,38377:26286,38378:27597,38379:31807,38380:33769,38381:20515,38382:20472,38383:21253,38384:21574,38385:22577,38386:22857,38387:23453,38388:23792,38389:23791,38390:23849,38391:24214,38392:25265,38393:25447,38394:25918,38395:26041,38396:26379,38464:27861,38465:27873,38466:28921,38467:30770,38468:32299,38469:32990,38470:33459,38471:33804,38472:34028,38473:34562,38474:35090,38475:35370,38476:35914,38477:37030,38478:37586,38479:39165,38480:40179,38481:40300,38482:20047,38483:20129,38484:20621,38485:21078,38486:22346,38487:22952,38488:24125,38489:24536,38490:24537,38491:25151,38492:26292,38493:26395,38494:26576,38495:26834,38496:20882,38497:32033,38498:32938,38499:33192,38500:35584,38501:35980,38502:36031,38503:37502,38504:38450,38505:21536,38506:38956,38507:21271,38508:20693,38509:21340,38510:22696,38511:25778,38512:26420,38513:29287,38514:30566,38515:31302,38516:37350,38517:21187,38518:27809,38519:27526,38520:22528,38521:24140,38522:22868,38523:26412,38524:32763,38525:20961,38526:30406,38528:25705,38529:30952,38530:39764,38531:40635,38532:22475,38533:22969,38534:26151,38535:26522,38536:27598,38537:21737,38538:27097,38539:24149,38540:33180,38541:26517,38542:39850,38543:26622,38544:40018,38545:26717,38546:20134,38547:20451,38548:21448,38549:25273,38550:26411,38551:27819,38552:36804,38553:20397,38554:32365,38555:40639,38556:19975,38557:24930,38558:28288,38559:28459,38560:34067,38561:21619,38562:26410,38563:39749,38564:24051,38565:31637,38566:23724,38567:23494,38568:34588,38569:28234,38570:34001,38571:31252,38572:33032,38573:22937,38574:31885,38575:27665,38576:30496,38577:21209,38578:22818,38579:28961,38580:29279,38581:30683,38582:38695,38583:40289,38584:26891,38585:23167,38586:23064,38587:20901,38588:21517,38589:21629,38590:26126,38591:30431,38592:36855,38593:37528,38594:40180,38595:23018,38596:29277,38597:28357,38598:20813,38599:26825,38600:32191,38601:32236,38602:38754,38603:40634,38604:25720,38605:27169,38606:33538,38607:22916,38608:23391,38609:27611,38610:29467,38611:30450,38612:32178,38613:32791,38614:33945,38615:20786,38616:26408,38617:40665,38618:30446,38619:26466,38620:21247,38621:39173,38622:23588,38623:25147,38624:31870,38625:36016,38626:21839,38627:24758,38628:32011,38629:38272,38630:21249,38631:20063,38632:20918,38633:22812,38634:29242,38635:32822,38636:37326,38637:24357,38638:30690,38639:21380,38640:24441,38641:32004,38642:34220,38643:35379,38644:36493,38645:38742,38646:26611,38647:34222,38648:37971,38649:24841,38650:24840,38651:27833,38652:30290,38720:35565,38721:36664,38722:21807,38723:20305,38724:20778,38725:21191,38726:21451,38727:23461,38728:24189,38729:24736,38730:24962,38731:25558,38732:26377,38733:26586,38734:28263,38735:28044,38736:29494,38737:29495,38738:30001,38739:31056,38740:35029,38741:35480,38742:36938,38743:37009,38744:37109,38745:38596,38746:34701,38747:22805,38748:20104,38749:20313,38750:19982,38751:35465,38752:36671,38753:38928,38754:20653,38755:24188,38756:22934,38757:23481,38758:24248,38759:25562,38760:25594,38761:25793,38762:26332,38763:26954,38764:27096,38765:27915,38766:28342,38767:29076,38768:29992,38769:31407,38770:32650,38771:32768,38772:33865,38773:33993,38774:35201,38775:35617,38776:36362,38777:36965,38778:38525,38779:39178,38780:24958,38781:25233,38782:27442,38784:27779,38785:28020,38786:32716,38787:32764,38788:28096,38789:32645,38790:34746,38791:35064,38792:26469,38793:33713,38794:38972,38795:38647,38796:27931,38797:32097,38798:33853,38799:37226,38800:20081,38801:21365,38802:23888,38803:27396,38804:28651,38805:34253,38806:34349,38807:35239,38808:21033,38809:21519,38810:23653,38811:26446,38812:26792,38813:29702,38814:29827,38815:30178,38816:35023,38817:35041,38818:37324,38819:38626,38820:38520,38821:24459,38822:29575,38823:31435,38824:33870,38825:25504,38826:30053,38827:21129,38828:27969,38829:28316,38830:29705,38831:30041,38832:30827,38833:31890,38834:38534,38835:31452,38836:40845,38837:20406,38838:24942,38839:26053,38840:34396,38841:20102,38842:20142,38843:20698,38844:20001,38845:20940,38846:23534,38847:26009,38848:26753,38849:28092,38850:29471,38851:30274,38852:30637,38853:31260,38854:31975,38855:33391,38856:35538,38857:36988,38858:37327,38859:38517,38860:38936,38861:21147,38862:32209,38863:20523,38864:21400,38865:26519,38866:28107,38867:29136,38868:29747,38869:33256,38870:36650,38871:38563,38872:40023,38873:40607,38874:29792,38875:22593,38876:28057,38877:32047,38878:39006,38879:20196,38880:20278,38881:20363,38882:20919,38883:21169,38884:23994,38885:24604,38886:29618,38887:31036,38888:33491,38889:37428,38890:38583,38891:38646,38892:38666,38893:40599,38894:40802,38895:26278,38896:27508,38897:21015,38898:21155,38899:28872,38900:35010,38901:24265,38902:24651,38903:24976,38904:28451,38905:29001,38906:31806,38907:32244,38908:32879,38976:34030,38977:36899,38978:37676,38979:21570,38980:39791,38981:27347,38982:28809,38983:36034,38984:36335,38985:38706,38986:21172,38987:23105,38988:24266,38989:24324,38990:26391,38991:27004,38992:27028,38993:28010,38994:28431,38995:29282,38996:29436,38997:31725,38998:32769,38999:32894,39e3:34635,39001:37070,39002:20845,39003:40595,39004:31108,39005:32907,39006:37682,39007:35542,39008:20525,39009:21644,39010:35441,39011:27498,39012:36036,39013:33031,39014:24785,39015:26528,39016:40434,39017:20121,39018:20120,39019:39952,39020:35435,39021:34241,39022:34152,39023:26880,39024:28286,39025:30871,39026:33109,39071:24332,39072:19984,39073:19989,39074:20010,39075:20017,39076:20022,39077:20028,39078:20031,39079:20034,39080:20054,39081:20056,39082:20098,39083:20101,39084:35947,39085:20106,39086:33298,39087:24333,39088:20110,39089:20126,39090:20127,39091:20128,39092:20130,39093:20144,39094:20147,39095:20150,39096:20174,39097:20173,39098:20164,39099:20166,39100:20162,39101:20183,39102:20190,39103:20205,39104:20191,39105:20215,39106:20233,39107:20314,39108:20272,39109:20315,39110:20317,39111:20311,39112:20295,39113:20342,39114:20360,39115:20367,39116:20376,39117:20347,39118:20329,39119:20336,39120:20369,39121:20335,39122:20358,39123:20374,39124:20760,39125:20436,39126:20447,39127:20430,39128:20440,39129:20443,39130:20433,39131:20442,39132:20432,39133:20452,39134:20453,39135:20506,39136:20520,39137:20500,39138:20522,39139:20517,39140:20485,39141:20252,39142:20470,39143:20513,39144:20521,39145:20524,39146:20478,39147:20463,39148:20497,39149:20486,39150:20547,39151:20551,39152:26371,39153:20565,39154:20560,39155:20552,39156:20570,39157:20566,39158:20588,39159:20600,39160:20608,39161:20634,39162:20613,39163:20660,39164:20658,39232:20681,39233:20682,39234:20659,39235:20674,39236:20694,39237:20702,39238:20709,39239:20717,39240:20707,39241:20718,39242:20729,39243:20725,39244:20745,39245:20737,39246:20738,39247:20758,39248:20757,39249:20756,39250:20762,39251:20769,39252:20794,39253:20791,39254:20796,39255:20795,39256:20799,39257:20800,39258:20818,39259:20812,39260:20820,39261:20834,39262:31480,39263:20841,39264:20842,39265:20846,39266:20864,39267:20866,39268:22232,39269:20876,39270:20873,39271:20879,39272:20881,39273:20883,39274:20885,39275:20886,39276:20900,39277:20902,39278:20898,39279:20905,39280:20906,39281:20907,39282:20915,39283:20913,39284:20914,39285:20912,39286:20917,39287:20925,39288:20933,39289:20937,39290:20955,39291:20960,39292:34389,39293:20969,39294:20973,39296:20976,39297:20981,39298:20990,39299:20996,39300:21003,39301:21012,39302:21006,39303:21031,39304:21034,39305:21038,39306:21043,39307:21049,39308:21071,39309:21060,39310:21067,39311:21068,39312:21086,39313:21076,39314:21098,39315:21108,39316:21097,39317:21107,39318:21119,39319:21117,39320:21133,39321:21140,39322:21138,39323:21105,39324:21128,39325:21137,39326:36776,39327:36775,39328:21164,39329:21165,39330:21180,39331:21173,39332:21185,39333:21197,39334:21207,39335:21214,39336:21219,39337:21222,39338:39149,39339:21216,39340:21235,39341:21237,39342:21240,39343:21241,39344:21254,39345:21256,39346:30008,39347:21261,39348:21264,39349:21263,39350:21269,39351:21274,39352:21283,39353:21295,39354:21297,39355:21299,39356:21304,39357:21312,39358:21318,39359:21317,39360:19991,39361:21321,39362:21325,39363:20950,39364:21342,39365:21353,39366:21358,39367:22808,39368:21371,39369:21367,39370:21378,39371:21398,39372:21408,39373:21414,39374:21413,39375:21422,39376:21424,39377:21430,39378:21443,39379:31762,39380:38617,39381:21471,39382:26364,39383:29166,39384:21486,39385:21480,39386:21485,39387:21498,39388:21505,39389:21565,39390:21568,39391:21548,39392:21549,39393:21564,39394:21550,39395:21558,39396:21545,39397:21533,39398:21582,39399:21647,39400:21621,39401:21646,39402:21599,39403:21617,39404:21623,39405:21616,39406:21650,39407:21627,39408:21632,39409:21622,39410:21636,39411:21648,39412:21638,39413:21703,39414:21666,39415:21688,39416:21669,39417:21676,39418:21700,39419:21704,39420:21672,39488:21675,39489:21698,39490:21668,39491:21694,39492:21692,39493:21720,39494:21733,39495:21734,39496:21775,39497:21780,39498:21757,39499:21742,39500:21741,39501:21754,39502:21730,39503:21817,39504:21824,39505:21859,39506:21836,39507:21806,39508:21852,39509:21829,39510:21846,39511:21847,39512:21816,39513:21811,39514:21853,39515:21913,39516:21888,39517:21679,39518:21898,39519:21919,39520:21883,39521:21886,39522:21912,39523:21918,39524:21934,39525:21884,39526:21891,39527:21929,39528:21895,39529:21928,39530:21978,39531:21957,39532:21983,39533:21956,39534:21980,39535:21988,39536:21972,39537:22036,39538:22007,39539:22038,39540:22014,39541:22013,39542:22043,39543:22009,39544:22094,39545:22096,39546:29151,39547:22068,39548:22070,39549:22066,39550:22072,39552:22123,39553:22116,39554:22063,39555:22124,39556:22122,39557:22150,39558:22144,39559:22154,39560:22176,39561:22164,39562:22159,39563:22181,39564:22190,39565:22198,39566:22196,39567:22210,39568:22204,39569:22209,39570:22211,39571:22208,39572:22216,39573:22222,39574:22225,39575:22227,39576:22231,39577:22254,39578:22265,39579:22272,39580:22271,39581:22276,39582:22281,39583:22280,39584:22283,39585:22285,39586:22291,39587:22296,39588:22294,39589:21959,39590:22300,39591:22310,39592:22327,39593:22328,39594:22350,39595:22331,39596:22336,39597:22351,39598:22377,39599:22464,39600:22408,39601:22369,39602:22399,39603:22409,39604:22419,39605:22432,39606:22451,39607:22436,39608:22442,39609:22448,39610:22467,39611:22470,39612:22484,39613:22482,39614:22483,39615:22538,39616:22486,39617:22499,39618:22539,39619:22553,39620:22557,39621:22642,39622:22561,39623:22626,39624:22603,39625:22640,39626:27584,39627:22610,39628:22589,39629:22649,39630:22661,39631:22713,39632:22687,39633:22699,39634:22714,39635:22750,39636:22715,39637:22712,39638:22702,39639:22725,39640:22739,39641:22737,39642:22743,39643:22745,39644:22744,39645:22757,39646:22748,39647:22756,39648:22751,39649:22767,39650:22778,39651:22777,39652:22779,39653:22780,39654:22781,39655:22786,39656:22794,39657:22800,39658:22811,39659:26790,39660:22821,39661:22828,39662:22829,39663:22834,39664:22840,39665:22846,39666:31442,39667:22869,39668:22864,39669:22862,39670:22874,39671:22872,39672:22882,39673:22880,39674:22887,39675:22892,39676:22889,39744:22904,39745:22913,39746:22941,39747:20318,39748:20395,39749:22947,39750:22962,39751:22982,39752:23016,39753:23004,39754:22925,39755:23001,39756:23002,39757:23077,39758:23071,39759:23057,39760:23068,39761:23049,39762:23066,39763:23104,39764:23148,39765:23113,39766:23093,39767:23094,39768:23138,39769:23146,39770:23194,39771:23228,39772:23230,39773:23243,39774:23234,39775:23229,39776:23267,39777:23255,39778:23270,39779:23273,39780:23254,39781:23290,39782:23291,39783:23308,39784:23307,39785:23318,39786:23346,39787:23248,39788:23338,39789:23350,39790:23358,39791:23363,39792:23365,39793:23360,39794:23377,39795:23381,39796:23386,39797:23387,39798:23397,39799:23401,39800:23408,39801:23411,39802:23413,39803:23416,39804:25992,39805:23418,39806:23424,39808:23427,39809:23462,39810:23480,39811:23491,39812:23495,39813:23497,39814:23508,39815:23504,39816:23524,39817:23526,39818:23522,39819:23518,39820:23525,39821:23531,39822:23536,39823:23542,39824:23539,39825:23557,39826:23559,39827:23560,39828:23565,39829:23571,39830:23584,39831:23586,39832:23592,39833:23608,39834:23609,39835:23617,39836:23622,39837:23630,39838:23635,39839:23632,39840:23631,39841:23409,39842:23660,39843:23662,39844:20066,39845:23670,39846:23673,39847:23692,39848:23697,39849:23700,39850:22939,39851:23723,39852:23739,39853:23734,39854:23740,39855:23735,39856:23749,39857:23742,39858:23751,39859:23769,39860:23785,39861:23805,39862:23802,39863:23789,39864:23948,39865:23786,39866:23819,39867:23829,39868:23831,39869:23900,39870:23839,39871:23835,39872:23825,39873:23828,39874:23842,39875:23834,39876:23833,39877:23832,39878:23884,39879:23890,39880:23886,39881:23883,39882:23916,39883:23923,39884:23926,39885:23943,39886:23940,39887:23938,39888:23970,39889:23965,39890:23980,39891:23982,39892:23997,39893:23952,39894:23991,39895:23996,39896:24009,39897:24013,39898:24019,39899:24018,39900:24022,39901:24027,39902:24043,39903:24050,39904:24053,39905:24075,39906:24090,39907:24089,39908:24081,39909:24091,39910:24118,39911:24119,39912:24132,39913:24131,39914:24128,39915:24142,39916:24151,39917:24148,39918:24159,39919:24162,39920:24164,39921:24135,39922:24181,39923:24182,39924:24186,39925:40636,39926:24191,39927:24224,39928:24257,39929:24258,39930:24264,39931:24272,39932:24271,4e4:24278,40001:24291,40002:24285,40003:24282,40004:24283,40005:24290,40006:24289,40007:24296,40008:24297,40009:24300,40010:24305,40011:24307,40012:24304,40013:24308,40014:24312,40015:24318,40016:24323,40017:24329,40018:24413,40019:24412,40020:24331,40021:24337,40022:24342,40023:24361,40024:24365,40025:24376,40026:24385,40027:24392,40028:24396,40029:24398,40030:24367,40031:24401,40032:24406,40033:24407,40034:24409,40035:24417,40036:24429,40037:24435,40038:24439,40039:24451,40040:24450,40041:24447,40042:24458,40043:24456,40044:24465,40045:24455,40046:24478,40047:24473,40048:24472,40049:24480,40050:24488,40051:24493,40052:24508,40053:24534,40054:24571,40055:24548,40056:24568,40057:24561,40058:24541,40059:24755,40060:24575,40061:24609,40062:24672,40064:24601,40065:24592,40066:24617,40067:24590,40068:24625,40069:24603,40070:24597,40071:24619,40072:24614,40073:24591,40074:24634,40075:24666,40076:24641,40077:24682,40078:24695,40079:24671,40080:24650,40081:24646,40082:24653,40083:24675,40084:24643,40085:24676,40086:24642,40087:24684,40088:24683,40089:24665,40090:24705,40091:24717,40092:24807,40093:24707,40094:24730,40095:24708,40096:24731,40097:24726,40098:24727,40099:24722,40100:24743,40101:24715,40102:24801,40103:24760,40104:24800,40105:24787,40106:24756,40107:24560,40108:24765,40109:24774,40110:24757,40111:24792,40112:24909,40113:24853,40114:24838,40115:24822,40116:24823,40117:24832,40118:24820,40119:24826,40120:24835,40121:24865,40122:24827,40123:24817,40124:24845,40125:24846,40126:24903,40127:24894,40128:24872,40129:24871,40130:24906,40131:24895,40132:24892,40133:24876,40134:24884,40135:24893,40136:24898,40137:24900,40138:24947,40139:24951,40140:24920,40141:24921,40142:24922,40143:24939,40144:24948,40145:24943,40146:24933,40147:24945,40148:24927,40149:24925,40150:24915,40151:24949,40152:24985,40153:24982,40154:24967,40155:25004,40156:24980,40157:24986,40158:24970,40159:24977,40160:25003,40161:25006,40162:25036,40163:25034,40164:25033,40165:25079,40166:25032,40167:25027,40168:25030,40169:25018,40170:25035,40171:32633,40172:25037,40173:25062,40174:25059,40175:25078,40176:25082,40177:25076,40178:25087,40179:25085,40180:25084,40181:25086,40182:25088,40183:25096,40184:25097,40185:25101,40186:25100,40187:25108,40188:25115,40256:25118,40257:25121,40258:25130,40259:25134,40260:25136,40261:25138,40262:25139,40263:25153,40264:25166,40265:25182,40266:25187,40267:25179,40268:25184,40269:25192,40270:25212,40271:25218,40272:25225,40273:25214,40274:25234,40275:25235,40276:25238,40277:25300,40278:25219,40279:25236,40280:25303,40281:25297,40282:25275,40283:25295,40284:25343,40285:25286,40286:25812,40287:25288,40288:25308,40289:25292,40290:25290,40291:25282,40292:25287,40293:25243,40294:25289,40295:25356,40296:25326,40297:25329,40298:25383,40299:25346,40300:25352,40301:25327,40302:25333,40303:25424,40304:25406,40305:25421,40306:25628,40307:25423,40308:25494,40309:25486,40310:25472,40311:25515,40312:25462,40313:25507,40314:25487,40315:25481,40316:25503,40317:25525,40318:25451,40320:25449,40321:25534,40322:25577,40323:25536,40324:25542,40325:25571,40326:25545,40327:25554,40328:25590,40329:25540,40330:25622,40331:25652,40332:25606,40333:25619,40334:25638,40335:25654,40336:25885,40337:25623,40338:25640,40339:25615,40340:25703,40341:25711,40342:25718,40343:25678,40344:25898,40345:25749,40346:25747,40347:25765,40348:25769,40349:25736,40350:25788,40351:25818,40352:25810,40353:25797,40354:25799,40355:25787,40356:25816,40357:25794,40358:25841,40359:25831,40360:33289,40361:25824,40362:25825,40363:25260,40364:25827,40365:25839,40366:25900,40367:25846,40368:25844,40369:25842,40370:25850,40371:25856,40372:25853,40373:25880,40374:25884,40375:25861,40376:25892,40377:25891,40378:25899,40379:25908,40380:25909,40381:25911,40382:25910,40383:25912,40384:30027,40385:25928,40386:25942,40387:25941,40388:25933,40389:25944,40390:25950,40391:25949,40392:25970,40393:25976,40394:25986,40395:25987,40396:35722,40397:26011,40398:26015,40399:26027,40400:26039,40401:26051,40402:26054,40403:26049,40404:26052,40405:26060,40406:26066,40407:26075,40408:26073,40409:26080,40410:26081,40411:26097,40412:26482,40413:26122,40414:26115,40415:26107,40416:26483,40417:26165,40418:26166,40419:26164,40420:26140,40421:26191,40422:26180,40423:26185,40424:26177,40425:26206,40426:26205,40427:26212,40428:26215,40429:26216,40430:26207,40431:26210,40432:26224,40433:26243,40434:26248,40435:26254,40436:26249,40437:26244,40438:26264,40439:26269,40440:26305,40441:26297,40442:26313,40443:26302,40444:26300,40512:26308,40513:26296,40514:26326,40515:26330,40516:26336,40517:26175,40518:26342,40519:26345,40520:26352,40521:26357,40522:26359,40523:26383,40524:26390,40525:26398,40526:26406,40527:26407,40528:38712,40529:26414,40530:26431,40531:26422,40532:26433,40533:26424,40534:26423,40535:26438,40536:26462,40537:26464,40538:26457,40539:26467,40540:26468,40541:26505,40542:26480,40543:26537,40544:26492,40545:26474,40546:26508,40547:26507,40548:26534,40549:26529,40550:26501,40551:26551,40552:26607,40553:26548,40554:26604,40555:26547,40556:26601,40557:26552,40558:26596,40559:26590,40560:26589,40561:26594,40562:26606,40563:26553,40564:26574,40565:26566,40566:26599,40567:27292,40568:26654,40569:26694,40570:26665,40571:26688,40572:26701,40573:26674,40574:26702,40576:26803,40577:26667,40578:26713,40579:26723,40580:26743,40581:26751,40582:26783,40583:26767,40584:26797,40585:26772,40586:26781,40587:26779,40588:26755,40589:27310,40590:26809,40591:26740,40592:26805,40593:26784,40594:26810,40595:26895,40596:26765,40597:26750,40598:26881,40599:26826,40600:26888,40601:26840,40602:26914,40603:26918,40604:26849,40605:26892,40606:26829,40607:26836,40608:26855,40609:26837,40610:26934,40611:26898,40612:26884,40613:26839,40614:26851,40615:26917,40616:26873,40617:26848,40618:26863,40619:26920,40620:26922,40621:26906,40622:26915,40623:26913,40624:26822,40625:27001,40626:26999,40627:26972,40628:27e3,40629:26987,40630:26964,40631:27006,40632:26990,40633:26937,40634:26996,40635:26941,40636:26969,40637:26928,40638:26977,40639:26974,40640:26973,40641:27009,40642:26986,40643:27058,40644:27054,40645:27088,40646:27071,40647:27073,40648:27091,40649:27070,40650:27086,40651:23528,40652:27082,40653:27101,40654:27067,40655:27075,40656:27047,40657:27182,40658:27025,40659:27040,40660:27036,40661:27029,40662:27060,40663:27102,40664:27112,40665:27138,40666:27163,40667:27135,40668:27402,40669:27129,40670:27122,40671:27111,40672:27141,40673:27057,40674:27166,40675:27117,40676:27156,40677:27115,40678:27146,40679:27154,40680:27329,40681:27171,40682:27155,40683:27204,40684:27148,40685:27250,40686:27190,40687:27256,40688:27207,40689:27234,40690:27225,40691:27238,40692:27208,40693:27192,40694:27170,40695:27280,40696:27277,40697:27296,40698:27268,40699:27298,40700:27299,40768:27287,40769:34327,40770:27323,40771:27331,40772:27330,40773:27320,40774:27315,40775:27308,40776:27358,40777:27345,40778:27359,40779:27306,40780:27354,40781:27370,40782:27387,40783:27397,40784:34326,40785:27386,40786:27410,40787:27414,40788:39729,40789:27423,40790:27448,40791:27447,40792:30428,40793:27449,40794:39150,40795:27463,40796:27459,40797:27465,40798:27472,40799:27481,40800:27476,40801:27483,40802:27487,40803:27489,40804:27512,40805:27513,40806:27519,40807:27520,40808:27524,40809:27523,40810:27533,40811:27544,40812:27541,40813:27550,40814:27556,40815:27562,40816:27563,40817:27567,40818:27570,40819:27569,40820:27571,40821:27575,40822:27580,40823:27590,40824:27595,40825:27603,40826:27615,40827:27628,40828:27627,40829:27635,40830:27631,40832:40638,40833:27656,40834:27667,40835:27668,40836:27675,40837:27684,40838:27683,40839:27742,40840:27733,40841:27746,40842:27754,40843:27778,40844:27789,40845:27802,40846:27777,40847:27803,40848:27774,40849:27752,40850:27763,40851:27794,40852:27792,40853:27844,40854:27889,40855:27859,40856:27837,40857:27863,40858:27845,40859:27869,40860:27822,40861:27825,40862:27838,40863:27834,40864:27867,40865:27887,40866:27865,40867:27882,40868:27935,40869:34893,40870:27958,40871:27947,40872:27965,40873:27960,40874:27929,40875:27957,40876:27955,40877:27922,40878:27916,40879:28003,40880:28051,40881:28004,40882:27994,40883:28025,40884:27993,40885:28046,40886:28053,40887:28644,40888:28037,40889:28153,40890:28181,40891:28170,40892:28085,40893:28103,40894:28134,40895:28088,40896:28102,40897:28140,40898:28126,40899:28108,40900:28136,40901:28114,40902:28101,40903:28154,40904:28121,40905:28132,40906:28117,40907:28138,40908:28142,40909:28205,40910:28270,40911:28206,40912:28185,40913:28274,40914:28255,40915:28222,40916:28195,40917:28267,40918:28203,40919:28278,40920:28237,40921:28191,40922:28227,40923:28218,40924:28238,40925:28196,40926:28415,40927:28189,40928:28216,40929:28290,40930:28330,40931:28312,40932:28361,40933:28343,40934:28371,40935:28349,40936:28335,40937:28356,40938:28338,40939:28372,40940:28373,40941:28303,40942:28325,40943:28354,40944:28319,40945:28481,40946:28433,40947:28748,40948:28396,40949:28408,40950:28414,40951:28479,40952:28402,40953:28465,40954:28399,40955:28466,40956:28364,57408:28478,57409:28435,57410:28407,57411:28550,57412:28538,57413:28536,57414:28545,57415:28544,57416:28527,57417:28507,57418:28659,57419:28525,57420:28546,57421:28540,57422:28504,57423:28558,57424:28561,57425:28610,57426:28518,57427:28595,57428:28579,57429:28577,57430:28580,57431:28601,57432:28614,57433:28586,57434:28639,57435:28629,57436:28652,57437:28628,57438:28632,57439:28657,57440:28654,57441:28635,57442:28681,57443:28683,57444:28666,57445:28689,57446:28673,57447:28687,57448:28670,57449:28699,57450:28698,57451:28532,57452:28701,57453:28696,57454:28703,57455:28720,57456:28734,57457:28722,57458:28753,57459:28771,57460:28825,57461:28818,57462:28847,57463:28913,57464:28844,57465:28856,57466:28851,57467:28846,57468:28895,57469:28875,57470:28893,57472:28889,57473:28937,57474:28925,57475:28956,57476:28953,57477:29029,57478:29013,57479:29064,57480:29030,57481:29026,57482:29004,57483:29014,57484:29036,57485:29071,57486:29179,57487:29060,57488:29077,57489:29096,57490:29100,57491:29143,57492:29113,57493:29118,57494:29138,57495:29129,57496:29140,57497:29134,57498:29152,57499:29164,57500:29159,57501:29173,57502:29180,57503:29177,57504:29183,57505:29197,57506:29200,57507:29211,57508:29224,57509:29229,57510:29228,57511:29232,57512:29234,57513:29243,57514:29244,57515:29247,57516:29248,57517:29254,57518:29259,57519:29272,57520:29300,57521:29310,57522:29314,57523:29313,57524:29319,57525:29330,57526:29334,57527:29346,57528:29351,57529:29369,57530:29362,57531:29379,57532:29382,57533:29380,57534:29390,57535:29394,57536:29410,57537:29408,57538:29409,57539:29433,57540:29431,57541:20495,57542:29463,57543:29450,57544:29468,57545:29462,57546:29469,57547:29492,57548:29487,57549:29481,57550:29477,57551:29502,57552:29518,57553:29519,57554:40664,57555:29527,57556:29546,57557:29544,57558:29552,57559:29560,57560:29557,57561:29563,57562:29562,57563:29640,57564:29619,57565:29646,57566:29627,57567:29632,57568:29669,57569:29678,57570:29662,57571:29858,57572:29701,57573:29807,57574:29733,57575:29688,57576:29746,57577:29754,57578:29781,57579:29759,57580:29791,57581:29785,57582:29761,57583:29788,57584:29801,57585:29808,57586:29795,57587:29802,57588:29814,57589:29822,57590:29835,57591:29854,57592:29863,57593:29898,57594:29903,57595:29908,57596:29681,57664:29920,57665:29923,57666:29927,57667:29929,57668:29934,57669:29938,57670:29936,57671:29937,57672:29944,57673:29943,57674:29956,57675:29955,57676:29957,57677:29964,57678:29966,57679:29965,57680:29973,57681:29971,57682:29982,57683:29990,57684:29996,57685:30012,57686:30020,57687:30029,57688:30026,57689:30025,57690:30043,57691:30022,57692:30042,57693:30057,57694:30052,57695:30055,57696:30059,57697:30061,57698:30072,57699:30070,57700:30086,57701:30087,57702:30068,57703:30090,57704:30089,57705:30082,57706:30100,57707:30106,57708:30109,57709:30117,57710:30115,57711:30146,57712:30131,57713:30147,57714:30133,57715:30141,57716:30136,57717:30140,57718:30129,57719:30157,57720:30154,57721:30162,57722:30169,57723:30179,57724:30174,57725:30206,57726:30207,57728:30204,57729:30209,57730:30192,57731:30202,57732:30194,57733:30195,57734:30219,57735:30221,57736:30217,57737:30239,57738:30247,57739:30240,57740:30241,57741:30242,57742:30244,57743:30260,57744:30256,57745:30267,57746:30279,57747:30280,57748:30278,57749:30300,57750:30296,57751:30305,57752:30306,57753:30312,57754:30313,57755:30314,57756:30311,57757:30316,57758:30320,57759:30322,57760:30326,57761:30328,57762:30332,57763:30336,57764:30339,57765:30344,57766:30347,57767:30350,57768:30358,57769:30355,57770:30361,57771:30362,57772:30384,57773:30388,57774:30392,57775:30393,57776:30394,57777:30402,57778:30413,57779:30422,57780:30418,57781:30430,57782:30433,57783:30437,57784:30439,57785:30442,57786:34351,57787:30459,57788:30472,57789:30471,57790:30468,57791:30505,57792:30500,57793:30494,57794:30501,57795:30502,57796:30491,57797:30519,57798:30520,57799:30535,57800:30554,57801:30568,57802:30571,57803:30555,57804:30565,57805:30591,57806:30590,57807:30585,57808:30606,57809:30603,57810:30609,57811:30624,57812:30622,57813:30640,57814:30646,57815:30649,57816:30655,57817:30652,57818:30653,57819:30651,57820:30663,57821:30669,57822:30679,57823:30682,57824:30684,57825:30691,57826:30702,57827:30716,57828:30732,57829:30738,57830:31014,57831:30752,57832:31018,57833:30789,57834:30862,57835:30836,57836:30854,57837:30844,57838:30874,57839:30860,57840:30883,57841:30901,57842:30890,57843:30895,57844:30929,57845:30918,57846:30923,57847:30932,57848:30910,57849:30908,57850:30917,57851:30922,57852:30956,57920:30951,57921:30938,57922:30973,57923:30964,57924:30983,57925:30994,57926:30993,57927:31001,57928:31020,57929:31019,57930:31040,57931:31072,57932:31063,57933:31071,57934:31066,57935:31061,57936:31059,57937:31098,57938:31103,57939:31114,57940:31133,57941:31143,57942:40779,57943:31146,57944:31150,57945:31155,57946:31161,57947:31162,57948:31177,57949:31189,57950:31207,57951:31212,57952:31201,57953:31203,57954:31240,57955:31245,57956:31256,57957:31257,57958:31264,57959:31263,57960:31104,57961:31281,57962:31291,57963:31294,57964:31287,57965:31299,57966:31319,57967:31305,57968:31329,57969:31330,57970:31337,57971:40861,57972:31344,57973:31353,57974:31357,57975:31368,57976:31383,57977:31381,57978:31384,57979:31382,57980:31401,57981:31432,57982:31408,57984:31414,57985:31429,57986:31428,57987:31423,57988:36995,57989:31431,57990:31434,57991:31437,57992:31439,57993:31445,57994:31443,57995:31449,57996:31450,57997:31453,57998:31457,57999:31458,58e3:31462,58001:31469,58002:31472,58003:31490,58004:31503,58005:31498,58006:31494,58007:31539,58008:31512,58009:31513,58010:31518,58011:31541,58012:31528,58013:31542,58014:31568,58015:31610,58016:31492,58017:31565,58018:31499,58019:31564,58020:31557,58021:31605,58022:31589,58023:31604,58024:31591,58025:31600,58026:31601,58027:31596,58028:31598,58029:31645,58030:31640,58031:31647,58032:31629,58033:31644,58034:31642,58035:31627,58036:31634,58037:31631,58038:31581,58039:31641,58040:31691,58041:31681,58042:31692,58043:31695,58044:31668,58045:31686,58046:31709,58047:31721,58048:31761,58049:31764,58050:31718,58051:31717,58052:31840,58053:31744,58054:31751,58055:31763,58056:31731,58057:31735,58058:31767,58059:31757,58060:31734,58061:31779,58062:31783,58063:31786,58064:31775,58065:31799,58066:31787,58067:31805,58068:31820,58069:31811,58070:31828,58071:31823,58072:31808,58073:31824,58074:31832,58075:31839,58076:31844,58077:31830,58078:31845,58079:31852,58080:31861,58081:31875,58082:31888,58083:31908,58084:31917,58085:31906,58086:31915,58087:31905,58088:31912,58089:31923,58090:31922,58091:31921,58092:31918,58093:31929,58094:31933,58095:31936,58096:31941,58097:31938,58098:31960,58099:31954,58100:31964,58101:31970,58102:39739,58103:31983,58104:31986,58105:31988,58106:31990,58107:31994,58108:32006,58176:32002,58177:32028,58178:32021,58179:32010,58180:32069,58181:32075,58182:32046,58183:32050,58184:32063,58185:32053,58186:32070,58187:32115,58188:32086,58189:32078,58190:32114,58191:32104,58192:32110,58193:32079,58194:32099,58195:32147,58196:32137,58197:32091,58198:32143,58199:32125,58200:32155,58201:32186,58202:32174,58203:32163,58204:32181,58205:32199,58206:32189,58207:32171,58208:32317,58209:32162,58210:32175,58211:32220,58212:32184,58213:32159,58214:32176,58215:32216,58216:32221,58217:32228,58218:32222,58219:32251,58220:32242,58221:32225,58222:32261,58223:32266,58224:32291,58225:32289,58226:32274,58227:32305,58228:32287,58229:32265,58230:32267,58231:32290,58232:32326,58233:32358,58234:32315,58235:32309,58236:32313,58237:32323,58238:32311,58240:32306,58241:32314,58242:32359,58243:32349,58244:32342,58245:32350,58246:32345,58247:32346,58248:32377,58249:32362,58250:32361,58251:32380,58252:32379,58253:32387,58254:32213,58255:32381,58256:36782,58257:32383,58258:32392,58259:32393,58260:32396,58261:32402,58262:32400,58263:32403,58264:32404,58265:32406,58266:32398,58267:32411,58268:32412,58269:32568,58270:32570,58271:32581,58272:32588,58273:32589,58274:32590,58275:32592,58276:32593,58277:32597,58278:32596,58279:32600,58280:32607,58281:32608,58282:32616,58283:32617,58284:32615,58285:32632,58286:32642,58287:32646,58288:32643,58289:32648,58290:32647,58291:32652,58292:32660,58293:32670,58294:32669,58295:32666,58296:32675,58297:32687,58298:32690,58299:32697,58300:32686,58301:32694,58302:32696,58303:35697,58304:32709,58305:32710,58306:32714,58307:32725,58308:32724,58309:32737,58310:32742,58311:32745,58312:32755,58313:32761,58314:39132,58315:32774,58316:32772,58317:32779,58318:32786,58319:32792,58320:32793,58321:32796,58322:32801,58323:32808,58324:32831,58325:32827,58326:32842,58327:32838,58328:32850,58329:32856,58330:32858,58331:32863,58332:32866,58333:32872,58334:32883,58335:32882,58336:32880,58337:32886,58338:32889,58339:32893,58340:32895,58341:32900,58342:32902,58343:32901,58344:32923,58345:32915,58346:32922,58347:32941,58348:20880,58349:32940,58350:32987,58351:32997,58352:32985,58353:32989,58354:32964,58355:32986,58356:32982,58357:33033,58358:33007,58359:33009,58360:33051,58361:33065,58362:33059,58363:33071,58364:33099,58432:38539,58433:33094,58434:33086,58435:33107,58436:33105,58437:33020,58438:33137,58439:33134,58440:33125,58441:33126,58442:33140,58443:33155,58444:33160,58445:33162,58446:33152,58447:33154,58448:33184,58449:33173,58450:33188,58451:33187,58452:33119,58453:33171,58454:33193,58455:33200,58456:33205,58457:33214,58458:33208,58459:33213,58460:33216,58461:33218,58462:33210,58463:33225,58464:33229,58465:33233,58466:33241,58467:33240,58468:33224,58469:33242,58470:33247,58471:33248,58472:33255,58473:33274,58474:33275,58475:33278,58476:33281,58477:33282,58478:33285,58479:33287,58480:33290,58481:33293,58482:33296,58483:33302,58484:33321,58485:33323,58486:33336,58487:33331,58488:33344,58489:33369,58490:33368,58491:33373,58492:33370,58493:33375,58494:33380,58496:33378,58497:33384,58498:33386,58499:33387,58500:33326,58501:33393,58502:33399,58503:33400,58504:33406,58505:33421,58506:33426,58507:33451,58508:33439,58509:33467,58510:33452,58511:33505,58512:33507,58513:33503,58514:33490,58515:33524,58516:33523,58517:33530,58518:33683,58519:33539,58520:33531,58521:33529,58522:33502,58523:33542,58524:33500,58525:33545,58526:33497,58527:33589,58528:33588,58529:33558,58530:33586,58531:33585,58532:33600,58533:33593,58534:33616,58535:33605,58536:33583,58537:33579,58538:33559,58539:33560,58540:33669,58541:33690,58542:33706,58543:33695,58544:33698,58545:33686,58546:33571,58547:33678,58548:33671,58549:33674,58550:33660,58551:33717,58552:33651,58553:33653,58554:33696,58555:33673,58556:33704,58557:33780,58558:33811,58559:33771,58560:33742,58561:33789,58562:33795,58563:33752,58564:33803,58565:33729,58566:33783,58567:33799,58568:33760,58569:33778,58570:33805,58571:33826,58572:33824,58573:33725,58574:33848,58575:34054,58576:33787,58577:33901,58578:33834,58579:33852,58580:34138,58581:33924,58582:33911,58583:33899,58584:33965,58585:33902,58586:33922,58587:33897,58588:33862,58589:33836,58590:33903,58591:33913,58592:33845,58593:33994,58594:33890,58595:33977,58596:33983,58597:33951,58598:34009,58599:33997,58600:33979,58601:34010,58602:34e3,58603:33985,58604:33990,58605:34006,58606:33953,58607:34081,58608:34047,58609:34036,58610:34071,58611:34072,58612:34092,58613:34079,58614:34069,58615:34068,58616:34044,58617:34112,58618:34147,58619:34136,58620:34120,58688:34113,58689:34306,58690:34123,58691:34133,58692:34176,58693:34212,58694:34184,58695:34193,58696:34186,58697:34216,58698:34157,58699:34196,58700:34203,58701:34282,58702:34183,58703:34204,58704:34167,58705:34174,58706:34192,58707:34249,58708:34234,58709:34255,58710:34233,58711:34256,58712:34261,58713:34269,58714:34277,58715:34268,58716:34297,58717:34314,58718:34323,58719:34315,58720:34302,58721:34298,58722:34310,58723:34338,58724:34330,58725:34352,58726:34367,58727:34381,58728:20053,58729:34388,58730:34399,58731:34407,58732:34417,58733:34451,58734:34467,58735:34473,58736:34474,58737:34443,58738:34444,58739:34486,58740:34479,58741:34500,58742:34502,58743:34480,58744:34505,58745:34851,58746:34475,58747:34516,58748:34526,58749:34537,58750:34540,58752:34527,58753:34523,58754:34543,58755:34578,58756:34566,58757:34568,58758:34560,58759:34563,58760:34555,58761:34577,58762:34569,58763:34573,58764:34553,58765:34570,58766:34612,58767:34623,58768:34615,58769:34619,58770:34597,58771:34601,58772:34586,58773:34656,58774:34655,58775:34680,58776:34636,58777:34638,58778:34676,58779:34647,58780:34664,58781:34670,58782:34649,58783:34643,58784:34659,58785:34666,58786:34821,58787:34722,58788:34719,58789:34690,58790:34735,58791:34763,58792:34749,58793:34752,58794:34768,58795:38614,58796:34731,58797:34756,58798:34739,58799:34759,58800:34758,58801:34747,58802:34799,58803:34802,58804:34784,58805:34831,58806:34829,58807:34814,58808:34806,58809:34807,58810:34830,58811:34770,58812:34833,58813:34838,58814:34837,58815:34850,58816:34849,58817:34865,58818:34870,58819:34873,58820:34855,58821:34875,58822:34884,58823:34882,58824:34898,58825:34905,58826:34910,58827:34914,58828:34923,58829:34945,58830:34942,58831:34974,58832:34933,58833:34941,58834:34997,58835:34930,58836:34946,58837:34967,58838:34962,58839:34990,58840:34969,58841:34978,58842:34957,58843:34980,58844:34992,58845:35007,58846:34993,58847:35011,58848:35012,58849:35028,58850:35032,58851:35033,58852:35037,58853:35065,58854:35074,58855:35068,58856:35060,58857:35048,58858:35058,58859:35076,58860:35084,58861:35082,58862:35091,58863:35139,58864:35102,58865:35109,58866:35114,58867:35115,58868:35137,58869:35140,58870:35131,58871:35126,58872:35128,58873:35148,58874:35101,58875:35168,58876:35166,58944:35174,58945:35172,58946:35181,58947:35178,58948:35183,58949:35188,58950:35191,58951:35198,58952:35203,58953:35208,58954:35210,58955:35219,58956:35224,58957:35233,58958:35241,58959:35238,58960:35244,58961:35247,58962:35250,58963:35258,58964:35261,58965:35263,58966:35264,58967:35290,58968:35292,58969:35293,58970:35303,58971:35316,58972:35320,58973:35331,58974:35350,58975:35344,58976:35340,58977:35355,58978:35357,58979:35365,58980:35382,58981:35393,58982:35419,58983:35410,58984:35398,58985:35400,58986:35452,58987:35437,58988:35436,58989:35426,58990:35461,58991:35458,58992:35460,58993:35496,58994:35489,58995:35473,58996:35493,58997:35494,58998:35482,58999:35491,59e3:35524,59001:35533,59002:35522,59003:35546,59004:35563,59005:35571,59006:35559,59008:35556,59009:35569,59010:35604,59011:35552,59012:35554,59013:35575,59014:35550,59015:35547,59016:35596,59017:35591,59018:35610,59019:35553,59020:35606,59021:35600,59022:35607,59023:35616,59024:35635,59025:38827,59026:35622,59027:35627,59028:35646,59029:35624,59030:35649,59031:35660,59032:35663,59033:35662,59034:35657,59035:35670,59036:35675,59037:35674,59038:35691,59039:35679,59040:35692,59041:35695,59042:35700,59043:35709,59044:35712,59045:35724,59046:35726,59047:35730,59048:35731,59049:35734,59050:35737,59051:35738,59052:35898,59053:35905,59054:35903,59055:35912,59056:35916,59057:35918,59058:35920,59059:35925,59060:35938,59061:35948,59062:35960,59063:35962,59064:35970,59065:35977,59066:35973,59067:35978,59068:35981,59069:35982,59070:35988,59071:35964,59072:35992,59073:25117,59074:36013,59075:36010,59076:36029,59077:36018,59078:36019,59079:36014,59080:36022,59081:36040,59082:36033,59083:36068,59084:36067,59085:36058,59086:36093,59087:36090,59088:36091,59089:36100,59090:36101,59091:36106,59092:36103,59093:36111,59094:36109,59095:36112,59096:40782,59097:36115,59098:36045,59099:36116,59100:36118,59101:36199,59102:36205,59103:36209,59104:36211,59105:36225,59106:36249,59107:36290,59108:36286,59109:36282,59110:36303,59111:36314,59112:36310,59113:36300,59114:36315,59115:36299,59116:36330,59117:36331,59118:36319,59119:36323,59120:36348,59121:36360,59122:36361,59123:36351,59124:36381,59125:36382,59126:36368,59127:36383,59128:36418,59129:36405,59130:36400,59131:36404,59132:36426,59200:36423,59201:36425,59202:36428,59203:36432,59204:36424,59205:36441,59206:36452,59207:36448,59208:36394,59209:36451,59210:36437,59211:36470,59212:36466,59213:36476,59214:36481,59215:36487,59216:36485,59217:36484,59218:36491,59219:36490,59220:36499,59221:36497,59222:36500,59223:36505,59224:36522,59225:36513,59226:36524,59227:36528,59228:36550,59229:36529,59230:36542,59231:36549,59232:36552,59233:36555,59234:36571,59235:36579,59236:36604,59237:36603,59238:36587,59239:36606,59240:36618,59241:36613,59242:36629,59243:36626,59244:36633,59245:36627,59246:36636,59247:36639,59248:36635,59249:36620,59250:36646,59251:36659,59252:36667,59253:36665,59254:36677,59255:36674,59256:36670,59257:36684,59258:36681,59259:36678,59260:36686,59261:36695,59262:36700,59264:36706,59265:36707,59266:36708,59267:36764,59268:36767,59269:36771,59270:36781,59271:36783,59272:36791,59273:36826,59274:36837,59275:36834,59276:36842,59277:36847,59278:36999,59279:36852,59280:36869,59281:36857,59282:36858,59283:36881,59284:36885,59285:36897,59286:36877,59287:36894,59288:36886,59289:36875,59290:36903,59291:36918,59292:36917,59293:36921,59294:36856,59295:36943,59296:36944,59297:36945,59298:36946,59299:36878,59300:36937,59301:36926,59302:36950,59303:36952,59304:36958,59305:36968,59306:36975,59307:36982,59308:38568,59309:36978,59310:36994,59311:36989,59312:36993,59313:36992,59314:37002,59315:37001,59316:37007,59317:37032,59318:37039,59319:37041,59320:37045,59321:37090,59322:37092,59323:25160,59324:37083,59325:37122,59326:37138,59327:37145,59328:37170,59329:37168,59330:37194,59331:37206,59332:37208,59333:37219,59334:37221,59335:37225,59336:37235,59337:37234,59338:37259,59339:37257,59340:37250,59341:37282,59342:37291,59343:37295,59344:37290,59345:37301,59346:37300,59347:37306,59348:37312,59349:37313,59350:37321,59351:37323,59352:37328,59353:37334,59354:37343,59355:37345,59356:37339,59357:37372,59358:37365,59359:37366,59360:37406,59361:37375,59362:37396,59363:37420,59364:37397,59365:37393,59366:37470,59367:37463,59368:37445,59369:37449,59370:37476,59371:37448,59372:37525,59373:37439,59374:37451,59375:37456,59376:37532,59377:37526,59378:37523,59379:37531,59380:37466,59381:37583,59382:37561,59383:37559,59384:37609,59385:37647,59386:37626,59387:37700,59388:37678,59456:37657,59457:37666,59458:37658,59459:37667,59460:37690,59461:37685,59462:37691,59463:37724,59464:37728,59465:37756,59466:37742,59467:37718,59468:37808,59469:37804,59470:37805,59471:37780,59472:37817,59473:37846,59474:37847,59475:37864,59476:37861,59477:37848,59478:37827,59479:37853,59480:37840,59481:37832,59482:37860,59483:37914,59484:37908,59485:37907,59486:37891,59487:37895,59488:37904,59489:37942,59490:37931,59491:37941,59492:37921,59493:37946,59494:37953,59495:37970,59496:37956,59497:37979,59498:37984,59499:37986,59500:37982,59501:37994,59502:37417,59503:38e3,59504:38005,59505:38007,59506:38013,59507:37978,59508:38012,59509:38014,59510:38017,59511:38015,59512:38274,59513:38279,59514:38282,59515:38292,59516:38294,59517:38296,59518:38297,59520:38304,59521:38312,59522:38311,59523:38317,59524:38332,59525:38331,59526:38329,59527:38334,59528:38346,59529:28662,59530:38339,59531:38349,59532:38348,59533:38357,59534:38356,59535:38358,59536:38364,59537:38369,59538:38373,59539:38370,59540:38433,59541:38440,59542:38446,59543:38447,59544:38466,59545:38476,59546:38479,59547:38475,59548:38519,59549:38492,59550:38494,59551:38493,59552:38495,59553:38502,59554:38514,59555:38508,59556:38541,59557:38552,59558:38549,59559:38551,59560:38570,59561:38567,59562:38577,59563:38578,59564:38576,59565:38580,59566:38582,59567:38584,59568:38585,59569:38606,59570:38603,59571:38601,59572:38605,59573:35149,59574:38620,59575:38669,59576:38613,59577:38649,59578:38660,59579:38662,59580:38664,59581:38675,59582:38670,59583:38673,59584:38671,59585:38678,59586:38681,59587:38692,59588:38698,59589:38704,59590:38713,59591:38717,59592:38718,59593:38724,59594:38726,59595:38728,59596:38722,59597:38729,59598:38748,59599:38752,59600:38756,59601:38758,59602:38760,59603:21202,59604:38763,59605:38769,59606:38777,59607:38789,59608:38780,59609:38785,59610:38778,59611:38790,59612:38795,59613:38799,59614:38800,59615:38812,59616:38824,59617:38822,59618:38819,59619:38835,59620:38836,59621:38851,59622:38854,59623:38856,59624:38859,59625:38876,59626:38893,59627:40783,59628:38898,59629:31455,59630:38902,59631:38901,59632:38927,59633:38924,59634:38968,59635:38948,59636:38945,59637:38967,59638:38973,59639:38982,59640:38991,59641:38987,59642:39019,59643:39023,59644:39024,59712:39025,59713:39028,59714:39027,59715:39082,59716:39087,59717:39089,59718:39094,59719:39108,59720:39107,59721:39110,59722:39145,59723:39147,59724:39171,59725:39177,59726:39186,59727:39188,59728:39192,59729:39201,59730:39197,59731:39198,59732:39204,59733:39200,59734:39212,59735:39214,59736:39229,59737:39230,59738:39234,59739:39241,59740:39237,59741:39248,59742:39243,59743:39249,59744:39250,59745:39244,59746:39253,59747:39319,59748:39320,59749:39333,59750:39341,59751:39342,59752:39356,59753:39391,59754:39387,59755:39389,59756:39384,59757:39377,59758:39405,59759:39406,59760:39409,59761:39410,59762:39419,59763:39416,59764:39425,59765:39439,59766:39429,59767:39394,59768:39449,59769:39467,59770:39479,59771:39493,59772:39490,59773:39488,59774:39491,59776:39486,59777:39509,59778:39501,59779:39515,59780:39511,59781:39519,59782:39522,59783:39525,59784:39524,59785:39529,59786:39531,59787:39530,59788:39597,59789:39600,59790:39612,59791:39616,59792:39631,59793:39633,59794:39635,59795:39636,59796:39646,59797:39647,59798:39650,59799:39651,59800:39654,59801:39663,59802:39659,59803:39662,59804:39668,59805:39665,59806:39671,59807:39675,59808:39686,59809:39704,59810:39706,59811:39711,59812:39714,59813:39715,59814:39717,59815:39719,59816:39720,59817:39721,59818:39722,59819:39726,59820:39727,59821:39730,59822:39748,59823:39747,59824:39759,59825:39757,59826:39758,59827:39761,59828:39768,59829:39796,59830:39827,59831:39811,59832:39825,59833:39830,59834:39831,59835:39839,59836:39840,59837:39848,59838:39860,59839:39872,59840:39882,59841:39865,59842:39878,59843:39887,59844:39889,59845:39890,59846:39907,59847:39906,59848:39908,59849:39892,59850:39905,59851:39994,59852:39922,59853:39921,59854:39920,59855:39957,59856:39956,59857:39945,59858:39955,59859:39948,59860:39942,59861:39944,59862:39954,59863:39946,59864:39940,59865:39982,59866:39963,59867:39973,59868:39972,59869:39969,59870:39984,59871:40007,59872:39986,59873:40006,59874:39998,59875:40026,59876:40032,59877:40039,59878:40054,59879:40056,59880:40167,59881:40172,59882:40176,59883:40201,59884:40200,59885:40171,59886:40195,59887:40198,59888:40234,59889:40230,59890:40367,59891:40227,59892:40223,59893:40260,59894:40213,59895:40210,59896:40257,59897:40255,59898:40254,59899:40262,59900:40264,59968:40285,59969:40286,59970:40292,59971:40273,59972:40272,59973:40281,59974:40306,59975:40329,59976:40327,59977:40363,59978:40303,59979:40314,59980:40346,59981:40356,59982:40361,59983:40370,59984:40388,59985:40385,59986:40379,59987:40376,59988:40378,59989:40390,59990:40399,59991:40386,59992:40409,59993:40403,59994:40440,59995:40422,59996:40429,59997:40431,59998:40445,59999:40474,6e4:40475,60001:40478,60002:40565,60003:40569,60004:40573,60005:40577,60006:40584,60007:40587,60008:40588,60009:40594,60010:40597,60011:40593,60012:40605,60013:40613,60014:40617,60015:40632,60016:40618,60017:40621,60018:38753,60019:40652,60020:40654,60021:40655,60022:40656,60023:40660,60024:40668,60025:40670,60026:40669,60027:40672,60028:40677,60029:40680,60030:40687,60032:40692,60033:40694,60034:40695,60035:40697,60036:40699,60037:40700,60038:40701,60039:40711,60040:40712,60041:30391,60042:40725,60043:40737,60044:40748,60045:40766,60046:40778,60047:40786,60048:40788,60049:40803,60050:40799,60051:40800,60052:40801,60053:40806,60054:40807,60055:40812,60056:40810,60057:40823,60058:40818,60059:40822,60060:40853,60061:40860,60062:40864,60063:22575,60064:27079,60065:36953,60066:29796,60067:20956,60068:29081,60736:32394,60737:35100,60738:37704,60739:37512,60740:34012,60741:20425,60742:28859,60743:26161,60744:26824,60745:37625,60746:26363,60747:24389,60748:20008,60749:20193,60750:20220,60751:20224,60752:20227,60753:20281,60754:20310,60755:20370,60756:20362,60757:20378,60758:20372,60759:20429,60760:20544,60761:20514,60762:20479,60763:20510,60764:20550,60765:20592,60766:20546,60767:20628,60768:20724,60769:20696,60770:20810,60771:20836,60772:20893,60773:20926,60774:20972,60775:21013,60776:21148,60777:21158,60778:21184,60779:21211,60780:21248,60781:21255,60782:21284,60783:21362,60784:21395,60785:21426,60786:21469,60787:64014,60788:21660,60789:21642,60790:21673,60791:21759,60792:21894,60793:22361,60794:22373,60795:22444,60796:22472,60797:22471,60798:64015,60800:64016,60801:22686,60802:22706,60803:22795,60804:22867,60805:22875,60806:22877,60807:22883,60808:22948,60809:22970,60810:23382,60811:23488,60812:29999,60813:23512,60814:23532,60815:23582,60816:23718,60817:23738,60818:23797,60819:23847,60820:23891,60821:64017,60822:23874,60823:23917,60824:23992,60825:23993,60826:24016,60827:24353,60828:24372,60829:24423,60830:24503,60831:24542,60832:24669,60833:24709,60834:24714,60835:24798,60836:24789,60837:24864,60838:24818,60839:24849,60840:24887,60841:24880,60842:24984,60843:25107,60844:25254,60845:25589,60846:25696,60847:25757,60848:25806,60849:25934,60850:26112,60851:26133,60852:26171,60853:26121,60854:26158,60855:26142,60856:26148,60857:26213,60858:26199,60859:26201,60860:64018,60861:26227,60862:26265,60863:26272,60864:26290,60865:26303,60866:26362,60867:26382,60868:63785,60869:26470,60870:26555,60871:26706,60872:26560,60873:26625,60874:26692,60875:26831,60876:64019,60877:26984,60878:64020,60879:27032,60880:27106,60881:27184,60882:27243,60883:27206,60884:27251,60885:27262,60886:27362,60887:27364,60888:27606,60889:27711,60890:27740,60891:27782,60892:27759,60893:27866,60894:27908,60895:28039,60896:28015,60897:28054,60898:28076,60899:28111,60900:28152,60901:28146,60902:28156,60903:28217,60904:28252,60905:28199,60906:28220,60907:28351,60908:28552,60909:28597,60910:28661,60911:28677,60912:28679,60913:28712,60914:28805,60915:28843,60916:28943,60917:28932,60918:29020,60919:28998,60920:28999,60921:64021,60922:29121,60923:29182,60924:29361,60992:29374,60993:29476,60994:64022,60995:29559,60996:29629,60997:29641,60998:29654,60999:29667,61e3:29650,61001:29703,61002:29685,61003:29734,61004:29738,61005:29737,61006:29742,61007:29794,61008:29833,61009:29855,61010:29953,61011:30063,61012:30338,61013:30364,61014:30366,61015:30363,61016:30374,61017:64023,61018:30534,61019:21167,61020:30753,61021:30798,61022:30820,61023:30842,61024:31024,61025:64024,61026:64025,61027:64026,61028:31124,61029:64027,61030:31131,61031:31441,61032:31463,61033:64028,61034:31467,61035:31646,61036:64029,61037:32072,61038:32092,61039:32183,61040:32160,61041:32214,61042:32338,61043:32583,61044:32673,61045:64030,61046:33537,61047:33634,61048:33663,61049:33735,61050:33782,61051:33864,61052:33972,61053:34131,61054:34137,61056:34155,61057:64031,61058:34224,61059:64032,61060:64033,61061:34823,61062:35061,61063:35346,61064:35383,61065:35449,61066:35495,61067:35518,61068:35551,61069:64034,61070:35574,61071:35667,61072:35711,61073:36080,61074:36084,61075:36114,61076:36214,61077:64035,61078:36559,61079:64036,61080:64037,61081:36967,61082:37086,61083:64038,61084:37141,61085:37159,61086:37338,61087:37335,61088:37342,61089:37357,61090:37358,61091:37348,61092:37349,61093:37382,61094:37392,61095:37386,61096:37434,61097:37440,61098:37436,61099:37454,61100:37465,61101:37457,61102:37433,61103:37479,61104:37543,61105:37495,61106:37496,61107:37607,61108:37591,61109:37593,61110:37584,61111:64039,61112:37589,61113:37600,61114:37587,61115:37669,61116:37665,61117:37627,61118:64040,61119:37662,61120:37631,61121:37661,61122:37634,61123:37744,61124:37719,61125:37796,61126:37830,61127:37854,61128:37880,61129:37937,61130:37957,61131:37960,61132:38290,61133:63964,61134:64041,61135:38557,61136:38575,61137:38707,61138:38715,61139:38723,61140:38733,61141:38735,61142:38737,61143:38741,61144:38999,61145:39013,61146:64042,61147:64043,61148:39207,61149:64044,61150:39326,61151:39502,61152:39641,61153:39644,61154:39797,61155:39794,61156:39823,61157:39857,61158:39867,61159:39936,61160:40304,61161:40299,61162:64045,61163:40473,61164:40657,61167:8560,61168:8561,61169:8562,61170:8563,61171:8564,61172:8565,61173:8566,61174:8567,61175:8568,61176:8569,61177:65506,61178:65508,61179:65287,61180:65282,61504:57344,61505:57345,61506:57346,61507:57347,61508:57348,61509:57349,61510:57350,61511:57351,61512:57352,61513:57353,61514:57354,61515:57355,61516:57356,61517:57357,61518:57358,61519:57359,61520:57360,61521:57361,61522:57362,61523:57363,61524:57364,61525:57365,61526:57366,61527:57367,61528:57368,61529:57369,61530:57370,61531:57371,61532:57372,61533:57373,61534:57374,61535:57375,61536:57376,61537:57377,61538:57378,61539:57379,61540:57380,61541:57381,61542:57382,61543:57383,61544:57384,61545:57385,61546:57386,61547:57387,61548:57388,61549:57389,61550:57390,61551:57391,61552:57392,61553:57393,61554:57394,61555:57395,61556:57396,61557:57397,61558:57398,61559:57399,61560:57400,61561:57401,61562:57402,61563:57403,61564:57404,61565:57405,61566:57406,61568:57407,61569:57408,61570:57409,61571:57410,61572:57411,61573:57412,61574:57413,61575:57414,61576:57415,61577:57416,61578:57417,61579:57418,61580:57419,61581:57420,61582:57421,61583:57422,61584:57423,61585:57424,61586:57425,61587:57426,61588:57427,61589:57428,61590:57429,61591:57430,61592:57431,61593:57432,61594:57433,61595:57434,61596:57435,61597:57436,61598:57437,61599:57438,61600:57439,61601:57440,61602:57441,61603:57442,61604:57443,61605:57444,61606:57445,61607:57446,61608:57447,61609:57448,61610:57449,61611:57450,61612:57451,61613:57452,61614:57453,61615:57454,61616:57455,61617:57456,61618:57457,61619:57458,61620:57459,61621:57460,61622:57461,61623:57462,61624:57463,61625:57464,61626:57465,61627:57466,61628:57467,61629:57468,61630:57469,61631:57470,61632:57471,61633:57472,61634:57473,61635:57474,61636:57475,61637:57476,61638:57477,61639:57478,61640:57479,61641:57480,61642:57481,61643:57482,61644:57483,61645:57484,61646:57485,61647:57486,61648:57487,61649:57488,61650:57489,61651:57490,61652:57491,61653:57492,61654:57493,61655:57494,61656:57495,61657:57496,61658:57497,61659:57498,61660:57499,61661:57500,61662:57501,61663:57502,61664:57503,61665:57504,61666:57505,61667:57506,61668:57507,61669:57508,61670:57509,61671:57510,61672:57511,61673:57512,61674:57513,61675:57514,61676:57515,61677:57516,61678:57517,61679:57518,61680:57519,61681:57520,61682:57521,61683:57522,61684:57523,61685:57524,61686:57525,61687:57526,61688:57527,61689:57528,61690:57529,61691:57530,61692:57531,61760:57532,61761:57533,61762:57534,61763:57535,61764:57536,61765:57537,61766:57538,61767:57539,61768:57540,61769:57541,61770:57542,61771:57543,61772:57544,61773:57545,61774:57546,61775:57547,61776:57548,61777:57549,61778:57550,61779:57551,61780:57552,61781:57553,61782:57554,61783:57555,61784:57556,61785:57557,61786:57558,61787:57559,61788:57560,61789:57561,61790:57562,61791:57563,61792:57564,61793:57565,61794:57566,61795:57567,61796:57568,61797:57569,61798:57570,61799:57571,61800:57572,61801:57573,61802:57574,61803:57575,61804:57576,61805:57577,61806:57578,61807:57579,61808:57580,61809:57581,61810:57582,61811:57583,61812:57584,61813:57585,61814:57586,61815:57587,61816:57588,61817:57589,61818:57590,61819:57591,61820:57592,61821:57593,61822:57594,61824:57595,61825:57596,61826:57597,61827:57598,61828:57599,61829:57600,61830:57601,61831:57602,61832:57603,61833:57604,61834:57605,61835:57606,61836:57607,61837:57608,61838:57609,61839:57610,61840:57611,61841:57612,61842:57613,61843:57614,61844:57615,61845:57616,61846:57617,61847:57618,61848:57619,61849:57620,61850:57621,61851:57622,61852:57623,61853:57624,61854:57625,61855:57626,61856:57627,61857:57628,61858:57629,61859:57630,61860:57631,61861:57632,61862:57633,61863:57634,61864:57635,61865:57636,61866:57637,61867:57638,61868:57639,61869:57640,61870:57641,61871:57642,61872:57643,61873:57644,61874:57645,61875:57646,61876:57647,61877:57648,61878:57649,61879:57650,61880:57651,61881:57652,61882:57653,61883:57654,61884:57655,61885:57656,61886:57657,61887:57658,61888:57659,61889:57660,61890:57661,61891:57662,61892:57663,61893:57664,61894:57665,61895:57666,61896:57667,61897:57668,61898:57669,61899:57670,61900:57671,61901:57672,61902:57673,61903:57674,61904:57675,61905:57676,61906:57677,61907:57678,61908:57679,61909:57680,61910:57681,61911:57682,61912:57683,61913:57684,61914:57685,61915:57686,61916:57687,61917:57688,61918:57689,61919:57690,61920:57691,61921:57692,61922:57693,61923:57694,61924:57695,61925:57696,61926:57697,61927:57698,61928:57699,61929:57700,61930:57701,61931:57702,61932:57703,61933:57704,61934:57705,61935:57706,61936:57707,61937:57708,61938:57709,61939:57710,61940:57711,61941:57712,61942:57713,61943:57714,61944:57715,61945:57716,61946:57717,61947:57718,61948:57719,62016:57720,62017:57721,62018:57722,62019:57723,62020:57724,62021:57725,62022:57726,62023:57727,62024:57728,62025:57729,62026:57730,62027:57731,62028:57732,62029:57733,62030:57734,62031:57735,62032:57736,62033:57737,62034:57738,62035:57739,62036:57740,62037:57741,62038:57742,62039:57743,62040:57744,62041:57745,62042:57746,62043:57747,62044:57748,62045:57749,62046:57750,62047:57751,62048:57752,62049:57753,62050:57754,62051:57755,62052:57756,62053:57757,62054:57758,62055:57759,62056:57760,62057:57761,62058:57762,62059:57763,62060:57764,62061:57765,62062:57766,62063:57767,62064:57768,62065:57769,62066:57770,62067:57771,62068:57772,62069:57773,62070:57774,62071:57775,62072:57776,62073:57777,62074:57778,62075:57779,62076:57780,62077:57781,62078:57782,62080:57783,62081:57784,62082:57785,62083:57786,62084:57787,62085:57788,62086:57789,62087:57790,62088:57791,62089:57792,62090:57793,62091:57794,62092:57795,62093:57796,62094:57797,62095:57798,62096:57799,62097:57800,62098:57801,62099:57802,62100:57803,62101:57804,62102:57805,62103:57806,62104:57807,62105:57808,62106:57809,62107:57810,62108:57811,62109:57812,62110:57813,62111:57814,62112:57815,62113:57816,62114:57817,62115:57818,62116:57819,62117:57820,62118:57821,62119:57822,62120:57823,62121:57824,62122:57825,62123:57826,62124:57827,62125:57828,62126:57829,62127:57830,62128:57831,62129:57832,62130:57833,62131:57834,62132:57835,62133:57836,62134:57837,62135:57838,62136:57839,62137:57840,62138:57841,62139:57842,62140:57843,62141:57844,62142:57845,62143:57846,62144:57847,62145:57848,62146:57849,62147:57850,62148:57851,62149:57852,62150:57853,62151:57854,62152:57855,62153:57856,62154:57857,62155:57858,62156:57859,62157:57860,62158:57861,62159:57862,62160:57863,62161:57864,62162:57865,62163:57866,62164:57867,62165:57868,62166:57869,62167:57870,62168:57871,62169:57872,62170:57873,62171:57874,62172:57875,62173:57876,62174:57877,62175:57878,62176:57879,62177:57880,62178:57881,62179:57882,62180:57883,62181:57884,62182:57885,62183:57886,62184:57887,62185:57888,62186:57889,62187:57890,62188:57891,62189:57892,62190:57893,62191:57894,62192:57895,62193:57896,62194:57897,62195:57898,62196:57899,62197:57900,62198:57901,62199:57902,62200:57903,62201:57904,62202:57905,62203:57906,62204:57907,62272:57908,62273:57909,62274:57910,62275:57911,62276:57912,62277:57913,62278:57914,62279:57915,62280:57916,62281:57917,62282:57918,62283:57919,62284:57920,62285:57921,62286:57922,62287:57923,62288:57924,62289:57925,62290:57926,62291:57927,62292:57928,62293:57929,62294:57930,62295:57931,62296:57932,62297:57933,62298:57934,62299:57935,62300:57936,62301:57937,62302:57938,62303:57939,62304:57940,62305:57941,62306:57942,62307:57943,62308:57944,62309:57945,62310:57946,62311:57947,62312:57948,62313:57949,62314:57950,62315:57951,62316:57952,62317:57953,62318:57954,62319:57955,62320:57956,62321:57957,62322:57958,62323:57959,62324:57960,62325:57961,62326:57962,62327:57963,62328:57964,62329:57965,62330:57966,62331:57967,62332:57968,62333:57969,62334:57970,62336:57971,62337:57972,62338:57973,62339:57974,62340:57975,62341:57976,62342:57977,62343:57978,62344:57979,62345:57980,62346:57981,62347:57982,62348:57983,62349:57984,62350:57985,62351:57986,62352:57987,62353:57988,62354:57989,62355:57990,62356:57991,62357:57992,62358:57993,62359:57994,62360:57995,62361:57996,62362:57997,62363:57998,62364:57999,62365:58e3,62366:58001,62367:58002,62368:58003,62369:58004,62370:58005,62371:58006,62372:58007,62373:58008,62374:58009,62375:58010,62376:58011,62377:58012,62378:58013,62379:58014,62380:58015,62381:58016,62382:58017,62383:58018,62384:58019,62385:58020,62386:58021,62387:58022,62388:58023,62389:58024,62390:58025,62391:58026,62392:58027,62393:58028,62394:58029,62395:58030,62396:58031,62397:58032,62398:58033,62399:58034,62400:58035,62401:58036,62402:58037,62403:58038,62404:58039,62405:58040,62406:58041,62407:58042,62408:58043,62409:58044,62410:58045,62411:58046,62412:58047,62413:58048,62414:58049,62415:58050,62416:58051,62417:58052,62418:58053,62419:58054,62420:58055,62421:58056,62422:58057,62423:58058,62424:58059,62425:58060,62426:58061,62427:58062,62428:58063,62429:58064,62430:58065,62431:58066,62432:58067,62433:58068,62434:58069,62435:58070,62436:58071,62437:58072,62438:58073,62439:58074,62440:58075,62441:58076,62442:58077,62443:58078,62444:58079,62445:58080,62446:58081,62447:58082,62448:58083,62449:58084,62450:58085,62451:58086,62452:58087,62453:58088,62454:58089,62455:58090,62456:58091,62457:58092,62458:58093,62459:58094,62460:58095,62528:58096,62529:58097,62530:58098,62531:58099,62532:58100,62533:58101,62534:58102,62535:58103,62536:58104,62537:58105,62538:58106,62539:58107,62540:58108,62541:58109,62542:58110,62543:58111,62544:58112,62545:58113,62546:58114,62547:58115,62548:58116,62549:58117,62550:58118,62551:58119,62552:58120,62553:58121,62554:58122,62555:58123,62556:58124,62557:58125,62558:58126,62559:58127,62560:58128,62561:58129,62562:58130,62563:58131,62564:58132,62565:58133,62566:58134,62567:58135,62568:58136,62569:58137,62570:58138,62571:58139,62572:58140,62573:58141,62574:58142,62575:58143,62576:58144,62577:58145,62578:58146,62579:58147,62580:58148,62581:58149,62582:58150,62583:58151,62584:58152,62585:58153,62586:58154,62587:58155,62588:58156,62589:58157,62590:58158,62592:58159,62593:58160,62594:58161,62595:58162,62596:58163,62597:58164,62598:58165,62599:58166,62600:58167,62601:58168,62602:58169,62603:58170,62604:58171,62605:58172,62606:58173,62607:58174,62608:58175,62609:58176,62610:58177,62611:58178,62612:58179,62613:58180,62614:58181,62615:58182,62616:58183,62617:58184,62618:58185,62619:58186,62620:58187,62621:58188,62622:58189,62623:58190,62624:58191,62625:58192,62626:58193,62627:58194,62628:58195,62629:58196,62630:58197,62631:58198,62632:58199,62633:58200,62634:58201,62635:58202,62636:58203,62637:58204,62638:58205,62639:58206,62640:58207,62641:58208,62642:58209,62643:58210,62644:58211,62645:58212,62646:58213,62647:58214,62648:58215,62649:58216,62650:58217,62651:58218,62652:58219,62653:58220,62654:58221,62655:58222,62656:58223,62657:58224,62658:58225,62659:58226,62660:58227,62661:58228,62662:58229,62663:58230,62664:58231,62665:58232,62666:58233,62667:58234,62668:58235,62669:58236,62670:58237,62671:58238,62672:58239,62673:58240,62674:58241,62675:58242,62676:58243,62677:58244,62678:58245,62679:58246,62680:58247,62681:58248,62682:58249,62683:58250,62684:58251,62685:58252,62686:58253,62687:58254,62688:58255,62689:58256,62690:58257,62691:58258,62692:58259,62693:58260,62694:58261,62695:58262,62696:58263,62697:58264,62698:58265,62699:58266,62700:58267,62701:58268,62702:58269,62703:58270,62704:58271,62705:58272,62706:58273,62707:58274,62708:58275,62709:58276,62710:58277,62711:58278,62712:58279,62713:58280,62714:58281,62715:58282,62716:58283,62784:58284,62785:58285,62786:58286,62787:58287,62788:58288,62789:58289,62790:58290,62791:58291,62792:58292,62793:58293,62794:58294,62795:58295,62796:58296,62797:58297,62798:58298,62799:58299,62800:58300,62801:58301,62802:58302,62803:58303,62804:58304,62805:58305,62806:58306,62807:58307,62808:58308,62809:58309,62810:58310,62811:58311,62812:58312,62813:58313,62814:58314,62815:58315,62816:58316,62817:58317,62818:58318,62819:58319,62820:58320,62821:58321,62822:58322,62823:58323,62824:58324,62825:58325,62826:58326,62827:58327,62828:58328,62829:58329,62830:58330,62831:58331,62832:58332,62833:58333,62834:58334,62835:58335,62836:58336,62837:58337,62838:58338,62839:58339,62840:58340,62841:58341,62842:58342,62843:58343,62844:58344,62845:58345,62846:58346,62848:58347,62849:58348,62850:58349,62851:58350,62852:58351,62853:58352,62854:58353,62855:58354,62856:58355,62857:58356,62858:58357,62859:58358,62860:58359,62861:58360,62862:58361,62863:58362,62864:58363,62865:58364,62866:58365,62867:58366,62868:58367,62869:58368,62870:58369,62871:58370,62872:58371,62873:58372,62874:58373,62875:58374,62876:58375,62877:58376,62878:58377,62879:58378,62880:58379,62881:58380,62882:58381,62883:58382,62884:58383,62885:58384,62886:58385,62887:58386,62888:58387,62889:58388,62890:58389,62891:58390,62892:58391,62893:58392,62894:58393,62895:58394,62896:58395,62897:58396,62898:58397,62899:58398,62900:58399,62901:58400,62902:58401,62903:58402,62904:58403,62905:58404,62906:58405,62907:58406,62908:58407,62909:58408,62910:58409,62911:58410,62912:58411,62913:58412,62914:58413,62915:58414,62916:58415,62917:58416,62918:58417,62919:58418,62920:58419,62921:58420,62922:58421,62923:58422,62924:58423,62925:58424,62926:58425,62927:58426,62928:58427,62929:58428,62930:58429,62931:58430,62932:58431,62933:58432,62934:58433,62935:58434,62936:58435,62937:58436,62938:58437,62939:58438,62940:58439,62941:58440,62942:58441,62943:58442,62944:58443,62945:58444,62946:58445,62947:58446,62948:58447,62949:58448,62950:58449,62951:58450,62952:58451,62953:58452,62954:58453,62955:58454,62956:58455,62957:58456,62958:58457,62959:58458,62960:58459,62961:58460,62962:58461,62963:58462,62964:58463,62965:58464,62966:58465,62967:58466,62968:58467,62969:58468,62970:58469,62971:58470,62972:58471,63040:58472,63041:58473,63042:58474,63043:58475,63044:58476,63045:58477,63046:58478,63047:58479,63048:58480,63049:58481,63050:58482,63051:58483,63052:58484,63053:58485,63054:58486,63055:58487,63056:58488,63057:58489,63058:58490,63059:58491,63060:58492,63061:58493,63062:58494,63063:58495,63064:58496,63065:58497,63066:58498,63067:58499,63068:58500,63069:58501,63070:58502,63071:58503,63072:58504,63073:58505,63074:58506,63075:58507,63076:58508,63077:58509,63078:58510,63079:58511,63080:58512,63081:58513,63082:58514,63083:58515,63084:58516,63085:58517,63086:58518,63087:58519,63088:58520,63089:58521,63090:58522,63091:58523,63092:58524,63093:58525,63094:58526,63095:58527,63096:58528,63097:58529,63098:58530,63099:58531,63100:58532,63101:58533,63102:58534,63104:58535,63105:58536,63106:58537,63107:58538,63108:58539,63109:58540,63110:58541,63111:58542,63112:58543,63113:58544,63114:58545,63115:58546,63116:58547,63117:58548,63118:58549,63119:58550,63120:58551,63121:58552,63122:58553,63123:58554,63124:58555,63125:58556,63126:58557,63127:58558,63128:58559,63129:58560,63130:58561,63131:58562,63132:58563,63133:58564,63134:58565,63135:58566,63136:58567,63137:58568,63138:58569,63139:58570,63140:58571,63141:58572,63142:58573,63143:58574,63144:58575,63145:58576,63146:58577,63147:58578,63148:58579,63149:58580,63150:58581,63151:58582,63152:58583,63153:58584,63154:58585,63155:58586,63156:58587,63157:58588,63158:58589,63159:58590,63160:58591,63161:58592,63162:58593,63163:58594,63164:58595,63165:58596,63166:58597,63167:58598,63168:58599,63169:58600,63170:58601,63171:58602,63172:58603,63173:58604,63174:58605,63175:58606,63176:58607,63177:58608,63178:58609,63179:58610,63180:58611,63181:58612,63182:58613,63183:58614,63184:58615,63185:58616,63186:58617,63187:58618,63188:58619,63189:58620,63190:58621,63191:58622,63192:58623,63193:58624,63194:58625,63195:58626,63196:58627,63197:58628,63198:58629,63199:58630,63200:58631,63201:58632,63202:58633,63203:58634,63204:58635,63205:58636,63206:58637,63207:58638,63208:58639,63209:58640,63210:58641,63211:58642,63212:58643,63213:58644,63214:58645,63215:58646,63216:58647,63217:58648,63218:58649,63219:58650,63220:58651,63221:58652,63222:58653,63223:58654,63224:58655,63225:58656,63226:58657,63227:58658,63228:58659,63296:58660,63297:58661,63298:58662,63299:58663,63300:58664,63301:58665,63302:58666,63303:58667,63304:58668,63305:58669,63306:58670,63307:58671,63308:58672,63309:58673,63310:58674,63311:58675,63312:58676,63313:58677,63314:58678,63315:58679,63316:58680,63317:58681,63318:58682,63319:58683,63320:58684,63321:58685,63322:58686,63323:58687,63324:58688,63325:58689,63326:58690,63327:58691,63328:58692,63329:58693,63330:58694,63331:58695,63332:58696,63333:58697,63334:58698,63335:58699,63336:58700,63337:58701,63338:58702,63339:58703,63340:58704,63341:58705,63342:58706,63343:58707,63344:58708,63345:58709,63346:58710,63347:58711,63348:58712,63349:58713,63350:58714,63351:58715,63352:58716,63353:58717,63354:58718,63355:58719,63356:58720,63357:58721,63358:58722,63360:58723,63361:58724,63362:58725,63363:58726,63364:58727,63365:58728,63366:58729,63367:58730,63368:58731,63369:58732,63370:58733,63371:58734,63372:58735,63373:58736,63374:58737,63375:58738,63376:58739,63377:58740,63378:58741,63379:58742,63380:58743,63381:58744,63382:58745,63383:58746,63384:58747,63385:58748,63386:58749,63387:58750,63388:58751,63389:58752,63390:58753,63391:58754,63392:58755,63393:58756,63394:58757,63395:58758,63396:58759,63397:58760,63398:58761,63399:58762,63400:58763,63401:58764,63402:58765,63403:58766,63404:58767,63405:58768,63406:58769,63407:58770,63408:58771,63409:58772,63410:58773,63411:58774,63412:58775,63413:58776,63414:58777,63415:58778,63416:58779,63417:58780,63418:58781,63419:58782,63420:58783,63421:58784,63422:58785,63423:58786,63424:58787,63425:58788,63426:58789,63427:58790,63428:58791,63429:58792,63430:58793,63431:58794,63432:58795,63433:58796,63434:58797,63435:58798,63436:58799,63437:58800,63438:58801,63439:58802,63440:58803,63441:58804,63442:58805,63443:58806,63444:58807,63445:58808,63446:58809,63447:58810,63448:58811,63449:58812,63450:58813,63451:58814,63452:58815,63453:58816,63454:58817,63455:58818,63456:58819,63457:58820,63458:58821,63459:58822,63460:58823,63461:58824,63462:58825,63463:58826,63464:58827,63465:58828,63466:58829,63467:58830,63468:58831,63469:58832,63470:58833,63471:58834,63472:58835,63473:58836,63474:58837,63475:58838,63476:58839,63477:58840,63478:58841,63479:58842,63480:58843,63481:58844,63482:58845,63483:58846,63484:58847,63552:58848,63553:58849,63554:58850,63555:58851,63556:58852,63557:58853,63558:58854,63559:58855,63560:58856,63561:58857,63562:58858,63563:58859,63564:58860,63565:58861,63566:58862,63567:58863,63568:58864,63569:58865,63570:58866,63571:58867,63572:58868,63573:58869,63574:58870,63575:58871,63576:58872,63577:58873,63578:58874,63579:58875,63580:58876,63581:58877,63582:58878,63583:58879,63584:58880,63585:58881,63586:58882,63587:58883,63588:58884,63589:58885,63590:58886,63591:58887,63592:58888,63593:58889,63594:58890,63595:58891,63596:58892,63597:58893,63598:58894,63599:58895,63600:58896,63601:58897,63602:58898,63603:58899,63604:58900,63605:58901,63606:58902,63607:58903,63608:58904,63609:58905,63610:58906,63611:58907,63612:58908,63613:58909,63614:58910,63616:58911,63617:58912,63618:58913,63619:58914,63620:58915,63621:58916,63622:58917,63623:58918,63624:58919,63625:58920,63626:58921,63627:58922,63628:58923,63629:58924,63630:58925,63631:58926,63632:58927,63633:58928,63634:58929,63635:58930,63636:58931,63637:58932,63638:58933,63639:58934,63640:58935,63641:58936,63642:58937,63643:58938,63644:58939,63645:58940,63646:58941,63647:58942,63648:58943,63649:58944,63650:58945,63651:58946,63652:58947,63653:58948,63654:58949,63655:58950,63656:58951,63657:58952,63658:58953,63659:58954,63660:58955,63661:58956,63662:58957,63663:58958,63664:58959,63665:58960,63666:58961,63667:58962,63668:58963,63669:58964,63670:58965,63671:58966,63672:58967,63673:58968,63674:58969,63675:58970,63676:58971,63677:58972,63678:58973,63679:58974,63680:58975,63681:58976,63682:58977,63683:58978,63684:58979,63685:58980,63686:58981,63687:58982,63688:58983,63689:58984,63690:58985,63691:58986,63692:58987,63693:58988,63694:58989,63695:58990,63696:58991,63697:58992,63698:58993,63699:58994,63700:58995,63701:58996,63702:58997,63703:58998,63704:58999,63705:59e3,63706:59001,63707:59002,63708:59003,63709:59004,63710:59005,63711:59006,63712:59007,63713:59008,63714:59009,63715:59010,63716:59011,63717:59012,63718:59013,63719:59014,63720:59015,63721:59016,63722:59017,63723:59018,63724:59019,63725:59020,63726:59021,63727:59022,63728:59023,63729:59024,63730:59025,63731:59026,63732:59027,63733:59028,63734:59029,63735:59030,63736:59031,63737:59032,63738:59033,63739:59034,63740:59035,64064:8560,64065:8561,64066:8562,64067:8563,64068:8564,64069:8565,64070:8566,64071:8567,64072:8568,64073:8569,64074:8544,64075:8545,64076:8546,64077:8547,64078:8548,64079:8549,64080:8550,64081:8551,64082:8552,64083:8553,64084:65506,64085:65508,64086:65287,64087:65282,64088:12849,64089:8470,64090:8481,64091:8757,64092:32394,64093:35100,64094:37704,64095:37512,64096:34012,64097:20425,64098:28859,64099:26161,64100:26824,64101:37625,64102:26363,64103:24389,64104:20008,64105:20193,64106:20220,64107:20224,64108:20227,64109:20281,64110:20310,64111:20370,64112:20362,64113:20378,64114:20372,64115:20429,64116:20544,64117:20514,64118:20479,64119:20510,64120:20550,64121:20592,64122:20546,64123:20628,64124:20724,64125:20696,64126:20810,64128:20836,64129:20893,64130:20926,64131:20972,64132:21013,64133:21148,64134:21158,64135:21184,64136:21211,64137:21248,64138:21255,64139:21284,64140:21362,64141:21395,64142:21426,64143:21469,64144:64014,64145:21660,64146:21642,64147:21673,64148:21759,64149:21894,64150:22361,64151:22373,64152:22444,64153:22472,64154:22471,64155:64015,64156:64016,64157:22686,64158:22706,64159:22795,64160:22867,64161:22875,64162:22877,64163:22883,64164:22948,64165:22970,64166:23382,64167:23488,64168:29999,64169:23512,64170:23532,64171:23582,64172:23718,64173:23738,64174:23797,64175:23847,64176:23891,64177:64017,64178:23874,64179:23917,64180:23992,64181:23993,64182:24016,64183:24353,64184:24372,64185:24423,64186:24503,64187:24542,64188:24669,64189:24709,64190:24714,64191:24798,64192:24789,64193:24864,64194:24818,64195:24849,64196:24887,64197:24880,64198:24984,64199:25107,64200:25254,64201:25589,64202:25696,64203:25757,64204:25806,64205:25934,64206:26112,64207:26133,64208:26171,64209:26121,64210:26158,64211:26142,64212:26148,64213:26213,64214:26199,64215:26201,64216:64018,64217:26227,64218:26265,64219:26272,64220:26290,64221:26303,64222:26362,64223:26382,64224:63785,64225:26470,64226:26555,64227:26706,64228:26560,64229:26625,64230:26692,64231:26831,64232:64019,64233:26984,64234:64020,64235:27032,64236:27106,64237:27184,64238:27243,64239:27206,64240:27251,64241:27262,64242:27362,64243:27364,64244:27606,64245:27711,64246:27740,64247:27782,64248:27759,64249:27866,64250:27908,64251:28039,64252:28015,64320:28054,64321:28076,64322:28111,64323:28152,64324:28146,64325:28156,64326:28217,64327:28252,64328:28199,64329:28220,64330:28351,64331:28552,64332:28597,64333:28661,64334:28677,64335:28679,64336:28712,64337:28805,64338:28843,64339:28943,64340:28932,64341:29020,64342:28998,64343:28999,64344:64021,64345:29121,64346:29182,64347:29361,64348:29374,64349:29476,64350:64022,64351:29559,64352:29629,64353:29641,64354:29654,64355:29667,64356:29650,64357:29703,64358:29685,64359:29734,64360:29738,64361:29737,64362:29742,64363:29794,64364:29833,64365:29855,64366:29953,64367:30063,64368:30338,64369:30364,64370:30366,64371:30363,64372:30374,64373:64023,64374:30534,64375:21167,64376:30753,64377:30798,64378:30820,64379:30842,64380:31024,64381:64024,64382:64025,64384:64026,64385:31124,64386:64027,64387:31131,64388:31441,64389:31463,64390:64028,64391:31467,64392:31646,64393:64029,64394:32072,64395:32092,64396:32183,64397:32160,64398:32214,64399:32338,64400:32583,64401:32673,64402:64030,64403:33537,64404:33634,64405:33663,64406:33735,64407:33782,64408:33864,64409:33972,64410:34131,64411:34137,64412:34155,64413:64031,64414:34224,64415:64032,64416:64033,64417:34823,64418:35061,64419:35346,64420:35383,64421:35449,64422:35495,64423:35518,64424:35551,64425:64034,64426:35574,64427:35667,64428:35711,64429:36080,64430:36084,64431:36114,64432:36214,64433:64035,64434:36559,64435:64036,64436:64037,64437:36967,64438:37086,64439:64038,64440:37141,64441:37159,64442:37338,64443:37335,64444:37342,64445:37357,64446:37358,64447:37348,64448:37349,64449:37382,64450:37392,64451:37386,64452:37434,64453:37440,64454:37436,64455:37454,64456:37465,64457:37457,64458:37433,64459:37479,64460:37543,64461:37495,64462:37496,64463:37607,64464:37591,64465:37593,64466:37584,64467:64039,64468:37589,64469:37600,64470:37587,64471:37669,64472:37665,64473:37627,64474:64040,64475:37662,64476:37631,64477:37661,64478:37634,64479:37744,64480:37719,64481:37796,64482:37830,64483:37854,64484:37880,64485:37937,64486:37957,64487:37960,64488:38290,64489:63964,64490:64041,64491:38557,64492:38575,64493:38707,64494:38715,64495:38723,64496:38733,64497:38735,64498:38737,64499:38741,64500:38999,64501:39013,64502:64042,64503:64043,64504:39207,64505:64044,64506:39326,64507:39502,64508:39641,64576:39644,64577:39797,64578:39794,64579:39823,64580:39857,64581:39867,64582:39936,64583:40304,64584:40299,64585:64045,64586:40473,64587:40657}}s2u(e){for(var t=this.s2uTable,n="",r=0;r=0&&i<=126||i>=161&&i<=223)&&r0;){var n=this.getUint8();if(e--,0===n)break;t+=String.fromCharCode(n)}for(;e>0;)this.getUint8(),e--;return t}getSjisStringsAsUnicode(e){for(var t=[];e>0;){var n=this.getUint8();if(e--,0===n)break;t.push(n)}for(;e>0;)this.getUint8(),e--;return this.encoder.s2u(new Uint8Array(t))}getUnicodeStrings(e){for(var t="";e>0;){var n=this.getUint16();if(e-=2,0===n)break;t+=String.fromCharCode(n)}for(;e>0;)this.getUint8(),e--;return t}getTextBuffer(){var e=this.getUint32();return this.getUnicodeStrings(e)}}class i{leftToRightVector3(e){e[2]=-e[2]}leftToRightQuaternion(e){e[0]=-e[0],e[1]=-e[1]}leftToRightEuler(e){e[0]=-e[0],e[1]=-e[1]}leftToRightIndexOrder(e){var t=e[2];e[2]=e[0],e[0]=t}leftToRightVector3Range(e,t){var n=-t[2];t[2]=-e[2],e[2]=n}leftToRightEulerRange(e,t){var n=-t[0],r=-t[1];t[0]=-e[0],t[1]=-e[1],e[0]=n,e[1]=r}}t.CharsetEncoder=n,t.Parser=class{constructor(){}parsePmd(e,t){var n={},i=new r(e);n.metadata={},n.metadata.format="pmd",n.metadata.coordinateSystem="left";var s;return function(){var e=n.metadata;if(e.magic=i.getChars(3),"Pmd"!==e.magic)throw"PMD file magic is not Pmd, but "+e.magic;e.version=i.getFloat32(),e.modelName=i.getSjisStringsAsUnicode(20),e.comment=i.getSjisStringsAsUnicode(256)}(),function(){var e,t=n.metadata;t.vertexCount=i.getUint32(),n.vertices=[];for(var r=0;r0&&(s.englishModelName=i.getSjisStringsAsUnicode(20),s.englishComment=i.getSjisStringsAsUnicode(256)),function(){var e=n.metadata;if(0!==e.englishCompatibility){n.englishBoneNames=[];for(var t=0;t{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const{parseBuffer:n}=(()=>{var e=0,n=-3;function r(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function i(e,t){this.source=e,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=t,this.destLen=0,this.ltree=new r,this.dtree=new r}var s=new r,a=new r,o=new Uint8Array(30),l=new Uint16Array(30),c=new Uint8Array(30),h=new Uint16Array(30),u=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new r,p=new Uint8Array(320);function f(e,t,n,r){var i,s;for(i=0;i>>=1,t}function v(e,t,n){if(!t)return n;for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<>>16-t;return e.tag>>>=t,e.bitcount-=t,r+n}function y(e,t){for(;e.bitcount<24;)e.tag|=e.source[e.sourceIndex++]<>>=1,++i,n+=t.table[i],r-=t.table[i]}while(r>=0);return e.tag=s,e.bitcount-=i,t.trans[n+r]}function x(e,t,n){var r,i,s,a,o,l;for(r=v(e,5,257),i=v(e,5,1),s=v(e,4,4),a=0;a<19;++a)p[a]=0;for(a=0;a8;)t.sourceIndex--,t.bitcount-=8;if((r=256*(r=t.source[t.sourceIndex+1])+t.source[t.sourceIndex])!==(65535&~(256*t.source[t.sourceIndex+3]+t.source[t.sourceIndex+2])))return n;for(t.sourceIndex+=4,i=r;i;--i)t.dest[t.destLen++]=t.source[t.sourceIndex++];return t.bitcount=0,e}!function(e,t){var n;for(n=0;n<7;++n)e.table[n]=0;for(e.table[7]=24,e.table[8]=152,e.table[9]=112,n=0;n<24;++n)e.trans[n]=256+n;for(n=0;n<144;++n)e.trans[24+n]=n;for(n=0;n<8;++n)e.trans[168+n]=280+n;for(n=0;n<112;++n)e.trans[176+n]=144+n;for(n=0;n<5;++n)t.table[n]=0;for(t.table[5]=32,n=0;n<32;++n)t.trans[n]=n}(s,a),f(o,l,4,3),f(c,h,2,1),o[28]=0,l[28]=258;var _=function(t,r){var o,l,c=new i(t,r);do{switch(o=A(c),v(c,2,0)){case 0:l=E(c);break;case 1:l=b(c,s,a);break;case 2:x(c,c.ltree,c.dtree),l=b(c,c.ltree,c.dtree);break;default:l=n}if(l!==e)throw new Error("Data error")}while(!o);return c.destLenthis.x2&&(this.x2=e)),"number"==typeof t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),tthis.y2&&(this.y2=t))},M.prototype.addX=function(e){this.addPoint(e,null)},M.prototype.addY=function(e){this.addPoint(null,e)},M.prototype.addBezier=function(e,t,n,r,i,s,a,o){var l=[e,t],c=[n,r],h=[i,s],u=[a,o];this.addPoint(e,t),this.addPoint(a,o);for(var d=0;d<=1;d++){var p=6*l[d]-12*c[d]+6*h[d],f=-3*l[d]+9*c[d]-9*h[d]+3*u[d],m=3*c[d]-3*l[d];if(0!==f){var g=Math.pow(p,2)-4*m*f;if(!(g<0)){var A=(-p+Math.sqrt(g))/(2*f);0=0&&r>0&&(n+=" "),n+=t(i)}return n}e=void 0!==e?e:2;for(var r="",i=0;i=0&&e<=255,"Byte value should be between 0 and 255."),[e]},D.BYTE=L(1),P.CHAR=function(e){return[e.charCodeAt(0)]},D.CHAR=L(1),P.CHARARRAY=function(e){void 0===e&&(e="",console.warn("Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name."));for(var t=[],n=0;n>8&255,255&e]},D.USHORT=L(2),P.SHORT=function(e){return e>=32768&&(e=-(65536-e)),[e>>8&255,255&e]},D.SHORT=L(2),P.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},D.UINT24=L(3),P.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},D.ULONG=L(4),P.LONG=function(e){return e>=B&&(e=-(2*B-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},D.LONG=L(4),P.FIXED=P.ULONG,D.FIXED=D.ULONG,P.FWORD=P.SHORT,D.FWORD=D.SHORT,P.UFWORD=P.USHORT,D.UFWORD=D.USHORT,P.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},D.LONGDATETIME=L(8),P.TAG=function(e){return I.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},D.TAG=L(4),P.Card8=P.BYTE,D.Card8=D.BYTE,P.Card16=P.USHORT,D.Card16=D.USHORT,P.OffSize=P.BYTE,D.OffSize=D.BYTE,P.SID=P.USHORT,D.SID=D.USHORT,P.NUMBER=function(e){return e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?P.NUMBER16(e):P.NUMBER32(e)},D.NUMBER=function(e){return P.NUMBER(e).length},P.NUMBER16=function(e){return[28,e>>8&255,255&e]},D.NUMBER16=L(3),P.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},D.NUMBER32=L(5),P.REAL=function(e){var t=e.toString(),n=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);if(n){var r=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));t=(Math.round(e*r)/r).toString()}for(var i="",s=0,a=t.length;s>8&255,t[t.length]=255&r}return t},D.UTF16=function(e){return 2*e.length};var F={"x-mac-croatian":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017d\xd8\u221e\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220f\u0161\u222b\xaa\xba\u03a9\u017e\xf8\xbf\xa1\xac\u221a\u0192\u2248\u0106\xab\u010c\u2026 \xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\uf8ff\xa9\u2044\u20ac\u2039\u203a\xc6\xbb\u2013\xb7\u201a\u201e\u2030\xc2\u0107\xc1\u010d\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u03c0\xcb\u02da\xb8\xca\xe6\u02c7","x-mac-cyrillic":"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\xb0\u0490\xa3\xa7\u2022\xb6\u0406\xae\xa9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\xb1\u2264\u2265\u0456\xb5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e","x-mac-gaelic":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u1e02\xb1\u2264\u2265\u1e03\u010a\u010b\u1e0a\u1e0b\u1e1e\u1e1f\u0120\u0121\u1e40\xe6\xf8\u1e41\u1e56\u1e57\u027c\u0192\u017f\u1e60\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\u1e61\u1e9b\xff\u0178\u1e6a\u20ac\u2039\u203a\u0176\u0177\u1e6b\xb7\u1ef2\u1ef3\u204a\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\u2663\xd2\xda\xdb\xd9\u0131\xdd\xfd\u0174\u0175\u1e84\u1e85\u1e80\u1e81\u1e82\u1e83","x-mac-greek":"\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\u20ac\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039b\u039e\u03a0\xdf\xae\xa9\u03a3\u03aa\xa7\u2260\xb0\xb7\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039a\u039c\u03a6\u03ab\u03a8\u03a9\u03ac\u039d\xac\u039f\u03a1\u2248\u03a4\xab\xbb\u2026 \u03a5\u03a7\u0386\u0388\u0153\u2013\u2015\u201c\u201d\u2018\u2019\xf7\u0389\u038a\u038c\u038e\u03ad\u03ae\u03af\u03cc\u038f\u03cd\u03b1\u03b2\u03c8\u03b4\u03b5\u03c6\u03b3\u03b7\u03b9\u03be\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03ce\u03c1\u03c3\u03c4\u03b8\u03c9\u03c2\u03c7\u03c5\u03b6\u03ca\u03cb\u0390\u03b0\xad","x-mac-icelandic":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\xd0\xf0\xde\xfe\xfd\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7","x-mac-inuit":"\u1403\u1404\u1405\u1406\u140a\u140b\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144e\u144f\u1450\u1451\u1455\u1456\u1466\u146d\u146e\u146f\u1470\u1472\u1473\u1483\u148b\u148c\u148d\u148e\u1490\u1491\xb0\u14a1\u14a5\u14a6\u2022\xb6\u14a7\xae\xa9\u2122\u14a8\u14aa\u14ab\u14bb\u14c2\u14c3\u14c4\u14c5\u14c7\u14c8\u14d0\u14ef\u14f0\u14f1\u14f2\u14f4\u14f5\u1505\u14d5\u14d6\u14d7\u14d8\u14da\u14db\u14ea\u1528\u1529\u152a\u152b\u152d\u2026 \u152e\u153e\u1555\u1556\u1557\u2013\u2014\u201c\u201d\u2018\u2019\u1558\u1559\u155a\u155d\u1546\u1547\u1548\u1549\u154b\u154c\u1550\u157f\u1580\u1581\u1582\u1583\u1584\u1585\u158f\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15a0\u15a1\u15a2\u15a3\u15a4\u15a5\u15a6\u157c\u0141\u0142","x-mac-ce":"\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010c\xe4\u010d\u0106\u0107\xe9\u0179\u017a\u010e\xed\u010f\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011a\u011b\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012e\u012f\u012a\u2264\u2265\u012b\u0136\u2202\u2211\u0142\u013b\u013c\u013d\u013e\u0139\u013a\u0145\u0146\u0143\xac\u221a\u0144\u0147\u2206\xab\xbb\u2026 \u0148\u0150\xd5\u0151\u014c\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\u014d\u0154\u0155\u0158\u2039\u203a\u0159\u0156\u0157\u0160\u201a\u201e\u0161\u015a\u015b\xc1\u0164\u0165\xcd\u017d\u017e\u016a\xd3\xd4\u016b\u016e\xda\u016f\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017b\u0141\u017c\u0122\u02c7",macintosh:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\u2039\u203a\ufb01\ufb02\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7","x-mac-romanian":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u0218\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\u0103\u0219\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\u2039\u203a\u021a\u021b\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7","x-mac-turkish":"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u011e\u011f\u0130\u0131\u015e\u015f\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\uf8a0\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"};R.MACSTRING=function(e,t,n,r){var i=F[r];if(void 0!==i){for(var s="",a=0;a=-128&&e<=127}function k(e,t,n){for(var r=0,i=e.length;t>8&255,l+256&255)}return s}P.MACSTRING=function(e,t){var n=function(e){if(!U)for(var t in U={},F)U[t]=new String(t);var n=U[e];if(void 0!==n){if(O){var r=O.get(n);if(void 0!==r)return r}var i=F[e];if(void 0!==i){for(var s={},a=0;a=128&&void 0===(s=n[s]))return;r[i]=s}return r}},D.MACSTRING=function(e,t){var n=P.MACSTRING(e,t);return void 0!==n?n.length:0},P.VARDELTAS=function(e){for(var t=0,n=[];t=-128&&r<=127?G(e,t,n):z(e,t,n)}return n},P.INDEX=function(e){for(var t=1,n=[t],r=[],i=0;i>8,t[u+1]=255&d,t=t.concat(r[h])}return t},D.TABLE=function(e){for(var t=0,n=e.fields.length,r=0;r0)return new re(this.data,this.offset+t).parseStruct(e)},re.prototype.parsePointer32=function(e){var t=this.parseOffset32();if(t>0)return new re(this.data,this.offset+t).parseStruct(e)},re.prototype.parseListOfLists=function(e){for(var t=this.parseOffset16List(),n=t.length,r=this.relativeOffset,i=new Array(n),s=0;s=0;i-=1){var s=se.getUShort(e,t+4+8*i),a=se.getUShort(e,t+4+8*i+2);if(3===s&&(0===a||1===a||10===a)||0===s&&(0===a||1===a||2===a||3===a||4===a)){r=se.getULong(e,t+4+8*i+4);break}}if(-1===r)throw new Error("No valid cmap sub-tables found.");var o=new se.Parser(e,t+r);if(n.format=o.parseUShort(),12===n.format)!function(e,t){var n;t.parseUShort(),e.length=t.parseULong(),e.language=t.parseULong(),e.groupCount=n=t.parseULong(),e.glyphIndexMap={};for(var r=0;r>1,t.skip("uShort",3),e.glyphIndexMap={};for(var a=new se.Parser(n,r+i+14),o=new se.Parser(n,r+i+16+2*s),l=new se.Parser(n,r+i+16+4*s),c=new se.Parser(n,r+i+16+6*s),h=r+i+16+8*s,u=0;u0;t-=1){if(e.get(t).unicode>65535){console.log("Adding CMAP format 12 (needed!)"),n=!1;break}}var r=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:n?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:n?12:20}];n||(r=r.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),r=r.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var i=new J.Table("cmap",r);for(i.segments=[],t=0;t>4,s=15&r;if(15===i)break;if(t+=n[i],15===s)break;t+=n[s]}return parseFloat(t)}(e);if(t>=32&&t<=246)return t-139;if(t>=247&&t<=250)return 256*(t-247)+e.parseByte()+108;if(t>=251&&t<=254)return 256*-(t-251)-e.parseByte()-108;throw new Error("Invalid b0 "+t)}function we(e,t,n){t=void 0!==t?t:0;var r=new se.Parser(e,t),i=[],s=[];for(n=void 0!==n?n:e.length;r.relativeOffset>1,d.length=0,f=!0}return function n(c){for(var v,y,_,S,M,w,C,T,I,B,R,P,D=0;D1&&!f&&(x=d.shift()+h,f=!0),A+=d.pop(),b(g,A);break;case 5:for(;d.length>0;)g+=d.shift(),A+=d.shift(),u.lineTo(g,A);break;case 6:for(;d.length>0&&(g+=d.shift(),u.lineTo(g,A),0!==d.length);)A+=d.shift(),u.lineTo(g,A);break;case 7:for(;d.length>0&&(A+=d.shift(),u.lineTo(g,A),0!==d.length);)g+=d.shift(),u.lineTo(g,A);break;case 8:for(;d.length>0;)r=g+d.shift(),i=A+d.shift(),s=r+d.shift(),a=i+d.shift(),g=s+d.shift(),A=a+d.shift(),u.curveTo(r,i,s,a,g,A);break;case 10:M=d.pop()+l,(w=o[M])&&n(w);break;case 11:return;case 12:switch(L=c[D],D+=1,L){case 35:r=g+d.shift(),i=A+d.shift(),s=r+d.shift(),a=i+d.shift(),C=s+d.shift(),T=a+d.shift(),I=C+d.shift(),B=T+d.shift(),R=I+d.shift(),P=B+d.shift(),g=R+d.shift(),A=P+d.shift(),d.shift(),u.curveTo(r,i,s,a,C,T),u.curveTo(I,B,R,P,g,A);break;case 34:r=g+d.shift(),i=A,s=r+d.shift(),a=i+d.shift(),C=s+d.shift(),T=a,I=C+d.shift(),B=a,R=I+d.shift(),P=A,g=R+d.shift(),u.curveTo(r,i,s,a,C,T),u.curveTo(I,B,R,P,g,A);break;case 36:r=g+d.shift(),i=A+d.shift(),s=r+d.shift(),a=i+d.shift(),C=s+d.shift(),T=a,I=C+d.shift(),B=a,R=I+d.shift(),P=B+d.shift(),g=R+d.shift(),u.curveTo(r,i,s,a,C,T),u.curveTo(I,B,R,P,g,A);break;case 37:r=g+d.shift(),i=A+d.shift(),s=r+d.shift(),a=i+d.shift(),C=s+d.shift(),T=a+d.shift(),I=C+d.shift(),B=T+d.shift(),R=I+d.shift(),P=B+d.shift(),Math.abs(R-g)>Math.abs(P-A)?g=R+d.shift():A=P+d.shift(),u.curveTo(r,i,s,a,C,T),u.curveTo(I,B,R,P,g,A);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+L),d.length=0}break;case 14:d.length>0&&!f&&(x=d.shift()+h,f=!0),m&&(u.closePath(),m=!1);break;case 19:case 20:E(),D+=p+7>>3;break;case 21:d.length>2&&!f&&(x=d.shift()+h,f=!0),A+=d.pop(),b(g+=d.pop(),A);break;case 22:d.length>1&&!f&&(x=d.shift()+h,f=!0),b(g+=d.pop(),A);break;case 24:for(;d.length>2;)r=g+d.shift(),i=A+d.shift(),s=r+d.shift(),a=i+d.shift(),g=s+d.shift(),A=a+d.shift(),u.curveTo(r,i,s,a,g,A);g+=d.shift(),A+=d.shift(),u.lineTo(g,A);break;case 25:for(;d.length>6;)g+=d.shift(),A+=d.shift(),u.lineTo(g,A);r=g+d.shift(),i=A+d.shift(),s=r+d.shift(),a=i+d.shift(),g=s+d.shift(),A=a+d.shift(),u.curveTo(r,i,s,a,g,A);break;case 26:for(d.length%2&&(g+=d.shift());d.length>0;)r=g,i=A+d.shift(),s=r+d.shift(),a=i+d.shift(),g=s,A=a+d.shift(),u.curveTo(r,i,s,a,g,A);break;case 27:for(d.length%2&&(A+=d.shift());d.length>0;)r=g+d.shift(),i=A,s=r+d.shift(),a=i+d.shift(),g=s+d.shift(),A=a,u.curveTo(r,i,s,a,g,A);break;case 28:v=c[D],y=c[D+1],d.push((v<<24|y<<16)>>16),D+=2;break;case 29:M=d.pop()+e.gsubrsBias,(w=e.gsubrs[M])&&n(w);break;case 30:for(;d.length>0&&(r=g,i=A+d.shift(),s=r+d.shift(),a=i+d.shift(),g=s+d.shift(),A=a+(1===d.length?d.shift():0),u.curveTo(r,i,s,a,g,A),0!==d.length);)r=g+d.shift(),i=A,s=r+d.shift(),a=i+d.shift(),A=a+d.shift(),g=s+(1===d.length?d.shift():0),u.curveTo(r,i,s,a,g,A);break;case 31:for(;d.length>0&&(r=g+d.shift(),i=A,s=r+d.shift(),a=i+d.shift(),A=a+d.shift(),g=s+(1===d.length?d.shift():0),u.curveTo(r,i,s,a,g,A),0!==d.length);)r=g,i=A+d.shift(),s=r+d.shift(),a=i+d.shift(),g=s+d.shift(),A=a+(1===d.length?d.shift():0),u.curveTo(r,i,s,a,g,A);break;default:L<32?console.log("Glyph "+t.index+": unknown operator "+L):L<247?d.push(L-139):L<251?(v=c[D],D+=1,d.push(256*(L-247)+v+108)):L<255?(v=c[D],D+=1,d.push(256*-(L-251)-v-108)):(v=c[D],y=c[D+1],_=c[D+2],S=c[D+3],D+=4,d.push((v<<24|y<<16|_<<8|S)/65536))}}}(n),t.advanceWidth=x,u}function Fe(e,t){var n,r=le.indexOf(e);return r>=0&&(n=r),(r=t.indexOf(e))>=0?n=r+le.length:(n=le.length+t.length,t.push(e)),n}function Ue(e,t,n){for(var r={},i=0;i=r)throw new Error("CFF table CID Font FDSelect has bad FD index value "+i+" (FD count "+r+")");s.push(i)}else{if(3!==o)throw new Error("CFF Table CID Font FDSelect table has unsupported format "+o);var c,h=a.parseCard16(),u=a.parseCard16();if(0!==u)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+u);for(var d=0;d=r)throw new Error("CFF table CID Font FDSelect has bad FD index value "+i+" (FD count "+r+")");if(c>n)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+c);for(;u=1&&(n.ulCodePageRange1=r.parseULong(),n.ulCodePageRange2=r.parseULong()),n.version>=2&&(n.sxHeight=r.parseShort(),n.sCapHeight=r.parseShort(),n.usDefaultChar=r.parseUShort(),n.usBreakChar=r.parseUShort(),n.usMaxContent=r.parseUShort()),n},make:function(e){return new J.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],e)},unicodeRanges:st,getUnicodeRange:function(e){for(var t=0;t=n.begin&&e=ue.length){var a=r.parseChar();n.names.push(r.parseString(a))}break;case 2.5:n.numberOfGlyphs=r.parseUShort(),n.offset=new Array(n.numberOfGlyphs);for(var o=0;ot.value.tag?1:-1})),t.fields=t.fields.concat(r),t.fields=t.fields.concat(i),t}function At(e,t,n){for(var r=0;r0)return e.glyphs.get(i).getMetrics()}return n}function vt(e){for(var t=0,n=0;ng||void 0===t)&&g>0&&(t=g),c 123 are reserved for internal usage");p|=1<0?He.make(P):void 0,F=ot.make(),U=Ge.make(e.glyphs,{version:e.getEnglishName("version"),fullName:T,familyName:w,weightName:C,postScriptName:I,unitsPerEm:e.unitsPerEm,fontBBox:[0,y.yMin,y.ascender,y.advanceWidthMax]}),O=e.metas&&Object.keys(e.metas).length>0?dt.make(e.metas):void 0,N=[x,b,E,_,D,M,F,U,S];L&&N.push(L),e.tables.gsub&&N.push(ut.make(e.tables.gsub)),O&&N.push(O);for(var k=gt(N),G=ft(k.encode()),z=k.fields,Q=!1,V=0;V>>1,s=e[i].tag;if(s===t)return i;s>>1,s=e[i];if(s===t)return i;s>>1,a=(n=e[s]).start;if(a===t)return n;a0)return t>(n=e[r-1]).end?0:n}function _t(e,t){this.font=e,this.tableName=t}function St(e){_t.call(this,e,"gpos")}function Mt(e){_t.call(this,e,"gsub")}function wt(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r0?(s=e.parseByte(),0==(t&i)&&(s=-s),s=n+s):s=(t&i)>0?n:n+e.parseShort(),s}function Bt(e,t,n){var r,i,s=new se.Parser(t,n);if(e.numberOfContours=s.parseShort(),e._xMin=s.parseShort(),e._yMin=s.parseShort(),e._xMax=s.parseShort(),e._yMax=s.parseShort(),e.numberOfContours>0){for(var a=e.endPointIndices=[],o=0;o0)for(var u=s.parseByte(),d=0;d0){var p,f=[];if(c>0){for(var m=0;m=0,f.push(p);for(var g=0,A=0;A0?(2&r)>0?(b.dx=s.parseShort(),b.dy=s.parseShort()):b.matchedPoints=[s.parseUShort(),s.parseUShort()]:(2&r)>0?(b.dx=s.parseChar(),b.dy=s.parseChar()):b.matchedPoints=[s.parseByte(),s.parseByte()],(8&r)>0?b.xScale=b.yScale=s.parseF2Dot14():(64&r)>0?(b.xScale=s.parseF2Dot14(),b.yScale=s.parseF2Dot14()):(128&r)>0&&(b.xScale=s.parseF2Dot14(),b.scale01=s.parseF2Dot14(),b.scale10=s.parseF2Dot14(),b.yScale=s.parseF2Dot14()),e.components.push(b),x=!!(32&r)}if(256&r){e.instructionLength=s.parseUShort(),e.instructions=[];for(var E=0;Et.points.length-1||r.matchedPoints[1]>i.points.length-1)throw Error("Matched points out of range in "+t.name);var a=t.points[r.matchedPoints[0]],o=i.points[r.matchedPoints[1]],l={xScale:r.xScale,scale01:r.scale01,scale10:r.scale10,yScale:r.yScale,dx:0,dy:0};o=Rt([o],l)[0],l.dx=a.x-o.x,l.dy=a.y-o.y,s=Rt(i.points,l)}t.points=t.points.concat(s)}}return Pt(t.points)}_t.prototype={searchTag:xt,binSearch:bt,getTable:function(e){var t=this.font.tables[this.tableName];return!t&&e&&(t=this.font.tables[this.tableName]=this.createDefaultTable()),t},getScriptNames:function(){var e=this.getTable();return e?e.scripts.map((function(e){return e.tag})):[]},getDefaultScriptName:function(){var e=this.getTable();if(e){for(var t=!1,n=0;n=0)return r[i].script;if(t){var s={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return r.splice(-1-i,0,s),s.script}}},getLangSysTable:function(e,t,n){var r=this.getScriptTable(e,n);if(r){if(!t||"dflt"===t||"DFLT"===t)return r.defaultLangSys;var i=xt(r.langSysRecords,t);if(i>=0)return r.langSysRecords[i].langSys;if(n){var s={tag:t,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return r.langSysRecords.splice(-1-i,0,s),s.langSys}}},getFeatureTable:function(e,t,n,r){var i=this.getLangSysTable(e,t,r);if(i){for(var s,a=i.featureIndexes,o=this.font.tables[this.tableName].features,l=0;l=o[c-1].tag,"Features must be added in alphabetical order."),s={tag:n,feature:{params:0,lookupListIndexes:[]}},o.push(s),a.push(c),s.feature}}},getLookupTables:function(e,t,n,r,i){var s=this.getFeatureTable(e,t,n,i),a=[];if(s){for(var o,l=s.lookupListIndexes,c=this.font.tables[this.tableName].lookups,h=0;h=0?n:-1;case 2:var r=Et(e.ranges,t);return r?r.index+t-r.start:-1}},expandCoverage:function(e){if(1===e.format)return e.glyphs;for(var t=[],n=e.ranges,r=0;r1,'Multiple: "by" must be an array of two or more ids');var i=Ct(this.getLookupTables(n,r,e,2,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});I.assert(1===i.coverage.format,"Multiple: unable to modify coverage table format "+i.coverage.format);var s=t.sub,a=this.binSearch(i.coverage.glyphs,s);a<0&&(a=-1-a,i.coverage.glyphs.splice(a,0,s),i.sequences.splice(a,0,0)),i.sequences[a]=t.by},Mt.prototype.addAlternate=function(e,t,n,r){var i=Ct(this.getLookupTables(n,r,e,3,!0)[0],1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});I.assert(1===i.coverage.format,"Alternate: unable to modify coverage table format "+i.coverage.format);var s=t.sub,a=this.binSearch(i.coverage.glyphs,s);a<0&&(a=-1-a,i.coverage.glyphs.splice(a,0,s),i.alternateSets.splice(a,0,0)),i.alternateSets[a]=t.by},Mt.prototype.addLigature=function(e,t,n,r){var i=this.getLookupTables(n,r,e,4,!0)[0],s=i.subtables[0];s||(s={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},i.subtables[0]=s),I.assert(1===s.coverage.format,"Ligature: unable to modify coverage table format "+s.coverage.format);var a=t.sub[0],o=t.sub.slice(1),l={ligGlyph:t.by,components:o},c=this.binSearch(s.coverage.glyphs,a);if(c>=0){for(var h=s.ligatureSets[c],u=0;u=176&&n<=183)i+=n-176+1;else if(n>=184&&n<=191)i+=2*(n-184+1);else if(t&&1===s&&27===n)break}while(s>0);e.ip=i}function rn(e,n){t.DEBUG&&console.log(n.step,"SVTCA["+e.axis+"]"),n.fv=n.pv=n.dpv=e}function sn(e,n){t.DEBUG&&console.log(n.step,"SPVTCA["+e.axis+"]"),n.pv=n.dpv=e}function an(e,n){t.DEBUG&&console.log(n.step,"SFVTCA["+e.axis+"]"),n.fv=e}function on(e,n){var r,i,s=n.stack,a=s.pop(),o=s.pop(),l=n.z2[a],c=n.z1[o];t.DEBUG&&console.log("SPVTL["+e+"]",a,o),e?(r=l.y-c.y,i=c.x-l.x):(r=c.x-l.x,i=c.y-l.y),n.pv=n.dpv=Kt(r,i)}function ln(e,n){var r,i,s=n.stack,a=s.pop(),o=s.pop(),l=n.z2[a],c=n.z1[o];t.DEBUG&&console.log("SFVTL["+e+"]",a,o),e?(r=l.y-c.y,i=c.x-l.x):(r=c.x-l.x,i=c.y-l.y),n.fv=Kt(r,i)}function cn(e){t.DEBUG&&console.log(e.step,"POP[]"),e.stack.pop()}function hn(e,n){var r=n.stack.pop(),i=n.z0[r],s=n.fv,a=n.pv;t.DEBUG&&console.log(n.step,"MDAP["+e+"]",r);var o=a.distance(i,Zt);e&&(o=n.round(o)),s.setRelative(i,Zt,o,a),s.touch(i),n.rp0=n.rp1=r}function un(e,n){var r,i,s,a=n.z2,o=a.length-2;t.DEBUG&&console.log(n.step,"IUP["+e.axis+"]");for(var l=0;l1?"loop "+(n.loop-l)+": ":"")+"SHP["+(e?"rp1":"rp2")+"]",h)}n.loop=1}function pn(e,n){var r=n.stack,i=e?n.rp1:n.rp2,s=(e?n.z0:n.z1)[i],a=n.fv,o=n.pv,l=r.pop(),c=n.z2[n.contours[l]],h=c;t.DEBUG&&console.log(n.step,"SHC["+e+"]",l);var u=o.distance(s,s,!1,!0);do{h!==s&&a.setRelative(h,h,u,o),h=h.nextPointOnContour}while(h!==c)}function fn(e,n){var r,i,s=n.stack,a=e?n.rp1:n.rp2,o=(e?n.z0:n.z1)[a],l=n.fv,c=n.pv,h=s.pop();switch(t.DEBUG&&console.log(n.step,"SHZ["+e+"]",h),h){case 0:r=n.tZone;break;case 1:r=n.gZone;break;default:throw new Error("Invalid zone")}for(var u=c.distance(o,o,!1,!0),d=r.length-2,p=0;p",l),n.stack.push(Math.round(64*l))}function yn(e,n){var r=n.stack,i=r.pop(),s=n.fv,a=n.pv,o=n.ppem,l=n.deltaBase+16*(e-1),c=n.deltaShift,h=n.z0;t.DEBUG&&console.log(n.step,"DELTAP["+e+"]",i,r);for(var u=0;u>4)===o){var f=(15&p)-8;f>=0&&f++,t.DEBUG&&console.log(n.step,"DELTAPFIX",d,"by",f*c);var m=h[d];s.setRelative(m,m,f*c,a)}}}function xn(e,n){var r=n.stack,i=r.pop();t.DEBUG&&console.log(n.step,"ROUND[]"),r.push(64*n.round(i/64))}function bn(e,n){var r=n.stack,i=r.pop(),s=n.ppem,a=n.deltaBase+16*(e-1),o=n.deltaShift;t.DEBUG&&console.log(n.step,"DELTAC["+e+"]",i,r);for(var l=0;l>4)===s){var u=(15&h)-8;u>=0&&u++;var d=u*o;t.DEBUG&&console.log(n.step,"DELTACFIX",c,"by",d),n.cvt[c]+=d}}}function En(e,n){var r,i,s=n.stack,a=s.pop(),o=s.pop(),l=n.z2[a],c=n.z1[o];t.DEBUG&&console.log(n.step,"SDPVTL["+e+"]",a,o),e?(r=l.y-c.y,i=c.x-l.x):(r=c.x-l.x,i=c.y-l.y),n.dpv=Kt(r,i)}function _n(e,n){var r=n.stack,i=n.prog,s=n.ip;t.DEBUG&&console.log(n.step,"PUSHB["+e+"]");for(var a=0;a=0?1:-1,l=Math.abs(l),e&&(h=a.cvt[d],i&&Math.abs(l-h)":"_")+(i?"R":"_")+(0===s?"Gr":1===s?"Bl":2===s?"Wh":"")+"]",e?d+"("+a.cvt[d]+","+h+")":"",p,"(d =",o,"->",c*l,")"),a.rp1=a.rp0,a.rp2=p,n&&(a.rp0=p)}function wn(e){this.char=e,this.state={},this.activeState=null}function Cn(e,t,n){this.contextName=n,this.startIndex=e,this.endOffset=t}function Tn(e,t,n){this.contextName=e,this.openRange=null,this.ranges=[],this.checkStart=t,this.checkEnd=n}function In(e,t){this.context=e,this.index=t,this.length=e.length,this.current=e[t],this.backtrack=e.slice(0,t),this.lookahead=e.slice(t+1)}function Bn(e){this.eventId=e,this.subscribers=[]}function Rn(e){var t=this,n=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];n.forEach((function(e){Object.defineProperty(t.events,e,{value:new Bn(e)})})),e&&n.forEach((function(n){var r=e[n];"function"==typeof r&&t.events[n].subscribe(r)}));["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"].forEach((function(e){t.events[e].subscribe(t.updateContextsRanges)}))}function Pn(e){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],Rn.call(this,e)}function Dn(e){return/[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e)}function Ln(e){return/[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(e)}function Fn(e){return/[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(e)}function Un(e){return/[A-z]/.test(e)}function On(e){this.font=e,this.features={}}function Nn(e){this.id=e.id,this.tag=e.tag,this.substitution=e.substitution}function kn(e,t){if(!e)return-1;switch(t.format){case 1:return t.glyphs.indexOf(e);case 2:for(var n=t.ranges,r=0;r=i.start&&e<=i.end){var s=e-i.start;return i.index+s}}break;default:return-1}return-1}function Gn(e,t){return-1===kn(e,t.coverage)?null:e+t.deltaGlyphId}function zn(e,t){var n=kn(e,t.coverage);return-1===n?null:t.substitute[n]}function Qn(e,t){for(var n=[],r=0;r2)){var r=this.font,i=this._prepState;if(!i||i.ppem!==n){var s=this._fpgmState;if(!s){en.prototype=$t,(s=this._fpgmState=new en("fpgm",r.tables.fpgm)).funcs=[],s.font=r,t.DEBUG&&(console.log("---EXEC FPGM---"),s.step=-1);try{Ft(s)}catch(h){return console.log("Hinting error in FPGM:"+h),void(this._errorState=3)}}en.prototype=s,(i=this._prepState=new en("prep",r.tables.prep)).ppem=n;var a=r.tables.cvt;if(a)for(var o=i.cvt=new Array(a.length),l=n/r.unitsPerEm,c=0;c1))try{return Ut(e,i)}catch(h){return this._errorState<1&&(console.log("Hinting error:"+h),console.log("Note: further hinting errors are silenced")),void(this._errorState=1)}}},Ut=function(e,n){var r,i,s,a=n.ppem/n.font.unitsPerEm,o=a,l=e.components;if(en.prototype=n,l){var c=n.font;i=[],r=[];for(var h=0;h1?"loop "+(e.loop-r)+": ":"")+"SHPIX[]",o,s),i.setRelative(l,l,s),i.touch(l)}e.loop=1},function(e){for(var n=e.stack,r=e.rp1,i=e.rp2,s=e.loop,a=e.z0[r],o=e.z1[i],l=e.fv,c=e.dpv,h=e.z2;s--;){var u=n.pop(),d=h[u];t.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-s)+": ":"")+"IP[]",u,r,"<->",i),l.interpolate(d,a,o,c),l.touch(d)}e.loop=1},mn.bind(void 0,0),mn.bind(void 0,1),function(e){for(var n=e.stack,r=e.rp0,i=e.z0[r],s=e.loop,a=e.fv,o=e.pv,l=e.z1;s--;){var c=n.pop(),h=l[c];t.DEBUG&&console.log(e.step,(e.loop>1?"loop "+(e.loop-s)+": ":"")+"ALIGNRP[]",c),a.setRelative(h,i,0,o),a.touch(h)}e.loop=1},function(e){t.DEBUG&&console.log(e.step,"RTDG[]"),e.round=Qt},gn.bind(void 0,0),gn.bind(void 0,1),function(e){var n=e.prog,r=e.ip,i=e.stack,s=n[++r];t.DEBUG&&console.log(e.step,"NPUSHB[]",s);for(var a=0;ar?1:0)},function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"GTEQ[]",r,i),n.push(i>=r?1:0)},function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"EQ[]",r,i),n.push(r===i?1:0)},function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"NEQ[]",r,i),n.push(r!==i?1:0)},function(e){var n=e.stack,r=n.pop();t.DEBUG&&console.log(e.step,"ODD[]",r),n.push(Math.trunc(r)%2?1:0)},function(e){var n=e.stack,r=n.pop();t.DEBUG&&console.log(e.step,"EVEN[]",r),n.push(Math.trunc(r)%2?0:1)},function(e){var n=e.stack.pop();t.DEBUG&&console.log(e.step,"IF[]",n),n||(nn(e,!0),t.DEBUG&&console.log(e.step,"EIF[]"))},function(e){t.DEBUG&&console.log(e.step,"EIF[]")},function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"AND[]",r,i),n.push(r&&i?1:0)},function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"OR[]",r,i),n.push(r||i?1:0)},function(e){var n=e.stack,r=n.pop();t.DEBUG&&console.log(e.step,"NOT[]",r),n.push(r?0:1)},yn.bind(void 0,1),function(e){var n=e.stack.pop();t.DEBUG&&console.log(e.step,"SDB[]",n),e.deltaBase=n},function(e){var n=e.stack.pop();t.DEBUG&&console.log(e.step,"SDS[]",n),e.deltaShift=Math.pow(.5,n)},function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"ADD[]",r,i),n.push(i+r)},function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"SUB[]",r,i),n.push(i-r)},function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"DIV[]",r,i),n.push(64*i/r)},function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"MUL[]",r,i),n.push(i*r/64)},function(e){var n=e.stack,r=n.pop();t.DEBUG&&console.log(e.step,"ABS[]",r),n.push(Math.abs(r))},function(e){var n=e.stack,r=n.pop();t.DEBUG&&console.log(e.step,"NEG[]",r),n.push(-r)},function(e){var n=e.stack,r=n.pop();t.DEBUG&&console.log(e.step,"FLOOR[]",r),n.push(64*Math.floor(r/64))},function(e){var n=e.stack,r=n.pop();t.DEBUG&&console.log(e.step,"CEILING[]",r),n.push(64*Math.ceil(r/64))},xn.bind(void 0,0),xn.bind(void 0,1),xn.bind(void 0,2),xn.bind(void 0,3),void 0,void 0,void 0,void 0,function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"WCVTF[]",r,i),e.cvt[i]=r*e.ppem/e.font.unitsPerEm},yn.bind(void 0,2),yn.bind(void 0,3),bn.bind(void 0,1),bn.bind(void 0,2),bn.bind(void 0,3),function(e){var n,r=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"SROUND[]",r),e.round=Wt,192&r){case 0:n=.5;break;case 64:n=1;break;case 128:n=2;break;default:throw new Error("invalid SROUND value")}switch(e.srPeriod=n,48&r){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*n;break;case 32:e.srPhase=.5*n;break;case 48:e.srPhase=.75*n;break;default:throw new Error("invalid SROUND value")}r&=15,e.srThreshold=0===r?0:(r/8-.5)*n},function(e){var n,r=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"S45ROUND[]",r),e.round=Wt,192&r){case 0:n=Math.sqrt(2)/2;break;case 64:n=Math.sqrt(2);break;case 128:n=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(e.srPeriod=n,48&r){case 0:e.srPhase=0;break;case 16:e.srPhase=.25*n;break;case 32:e.srPhase=.5*n;break;case 48:e.srPhase=.75*n;break;default:throw new Error("invalid S45ROUND value")}r&=15,e.srThreshold=0===r?0:(r/8-.5)*n},void 0,void 0,function(e){t.DEBUG&&console.log(e.step,"ROFF[]"),e.round=Gt},void 0,function(e){t.DEBUG&&console.log(e.step,"RUTG[]"),e.round=Ht},function(e){t.DEBUG&&console.log(e.step,"RDTG[]"),e.round=jt},cn,cn,void 0,void 0,void 0,void 0,void 0,function(e){var n=e.stack.pop();t.DEBUG&&console.log(e.step,"SCANCTRL[]",n)},En.bind(void 0,0),En.bind(void 0,1),function(e){var n=e.stack,r=n.pop(),i=0;t.DEBUG&&console.log(e.step,"GETINFO[]",r),1&r&&(i=35),32&r&&(i|=4096),n.push(i)},void 0,function(e){var n=e.stack,r=n.pop(),i=n.pop(),s=n.pop();t.DEBUG&&console.log(e.step,"ROLL[]"),n.push(i),n.push(r),n.push(s)},function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"MAX[]",r,i),n.push(Math.max(i,r))},function(e){var n=e.stack,r=n.pop(),i=n.pop();t.DEBUG&&console.log(e.step,"MIN[]",r,i),n.push(Math.min(i,r))},function(e){var n=e.stack.pop();t.DEBUG&&console.log(e.step,"SCANTYPE[]",n)},function(e){var n=e.stack.pop(),r=e.stack.pop();switch(t.DEBUG&&console.log(e.step,"INSTCTRL[]",n,r),n){case 1:return void(e.inhibitGridFit=!!r);case 2:return void(e.ignoreCvt=!!r);default:throw new Error("invalid INSTCTRL[] selector")}},void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,_n.bind(void 0,1),_n.bind(void 0,2),_n.bind(void 0,3),_n.bind(void 0,4),_n.bind(void 0,5),_n.bind(void 0,6),_n.bind(void 0,7),_n.bind(void 0,8),Sn.bind(void 0,1),Sn.bind(void 0,2),Sn.bind(void 0,3),Sn.bind(void 0,4),Sn.bind(void 0,5),Sn.bind(void 0,6),Sn.bind(void 0,7),Sn.bind(void 0,8),Mn.bind(void 0,0,0,0,0,0),Mn.bind(void 0,0,0,0,0,1),Mn.bind(void 0,0,0,0,0,2),Mn.bind(void 0,0,0,0,0,3),Mn.bind(void 0,0,0,0,1,0),Mn.bind(void 0,0,0,0,1,1),Mn.bind(void 0,0,0,0,1,2),Mn.bind(void 0,0,0,0,1,3),Mn.bind(void 0,0,0,1,0,0),Mn.bind(void 0,0,0,1,0,1),Mn.bind(void 0,0,0,1,0,2),Mn.bind(void 0,0,0,1,0,3),Mn.bind(void 0,0,0,1,1,0),Mn.bind(void 0,0,0,1,1,1),Mn.bind(void 0,0,0,1,1,2),Mn.bind(void 0,0,0,1,1,3),Mn.bind(void 0,0,1,0,0,0),Mn.bind(void 0,0,1,0,0,1),Mn.bind(void 0,0,1,0,0,2),Mn.bind(void 0,0,1,0,0,3),Mn.bind(void 0,0,1,0,1,0),Mn.bind(void 0,0,1,0,1,1),Mn.bind(void 0,0,1,0,1,2),Mn.bind(void 0,0,1,0,1,3),Mn.bind(void 0,0,1,1,0,0),Mn.bind(void 0,0,1,1,0,1),Mn.bind(void 0,0,1,1,0,2),Mn.bind(void 0,0,1,1,0,3),Mn.bind(void 0,0,1,1,1,0),Mn.bind(void 0,0,1,1,1,1),Mn.bind(void 0,0,1,1,1,2),Mn.bind(void 0,0,1,1,1,3),Mn.bind(void 0,1,0,0,0,0),Mn.bind(void 0,1,0,0,0,1),Mn.bind(void 0,1,0,0,0,2),Mn.bind(void 0,1,0,0,0,3),Mn.bind(void 0,1,0,0,1,0),Mn.bind(void 0,1,0,0,1,1),Mn.bind(void 0,1,0,0,1,2),Mn.bind(void 0,1,0,0,1,3),Mn.bind(void 0,1,0,1,0,0),Mn.bind(void 0,1,0,1,0,1),Mn.bind(void 0,1,0,1,0,2),Mn.bind(void 0,1,0,1,0,3),Mn.bind(void 0,1,0,1,1,0),Mn.bind(void 0,1,0,1,1,1),Mn.bind(void 0,1,0,1,1,2),Mn.bind(void 0,1,0,1,1,3),Mn.bind(void 0,1,1,0,0,0),Mn.bind(void 0,1,1,0,0,1),Mn.bind(void 0,1,1,0,0,2),Mn.bind(void 0,1,1,0,0,3),Mn.bind(void 0,1,1,0,1,0),Mn.bind(void 0,1,1,0,1,1),Mn.bind(void 0,1,1,0,1,2),Mn.bind(void 0,1,1,0,1,3),Mn.bind(void 0,1,1,1,0,0),Mn.bind(void 0,1,1,1,0,1),Mn.bind(void 0,1,1,1,0,2),Mn.bind(void 0,1,1,1,0,3),Mn.bind(void 0,1,1,1,1,0),Mn.bind(void 0,1,1,1,1,1),Mn.bind(void 0,1,1,1,1,2),Mn.bind(void 0,1,1,1,1,3)],wn.prototype.setState=function(e,t){return this.state[e]=t,this.activeState={key:e,value:this.state[e]},this.activeState},wn.prototype.getState=function(e){return this.state[e]||null},Pn.prototype.inboundIndex=function(e){return e>=0&&e0&&e<=this.lookahead.length:return this.lookahead[e-1];default:return null}},Pn.prototype.rangeToText=function(e){if(e instanceof Cn)return this.getRangeTokens(e).map((function(e){return e.char})).join("")},Pn.prototype.getText=function(){return this.tokens.map((function(e){return e.char})).join("")},Pn.prototype.getContext=function(e){var t=this.registeredContexts[e];return t||null},Pn.prototype.on=function(e,t){var n=this.events[e];return n?n.subscribe(t):null},Pn.prototype.dispatch=function(e,t){var n=this,r=this.events[e];r instanceof Bn&&r.subscribers.forEach((function(e){e.apply(n,t||[])}))},Pn.prototype.registerContextChecker=function(e,t,n){if(this.getContext(e))return{FAIL:"context name '"+e+"' is already registered."};if("function"!=typeof t)return{FAIL:"missing context start check."};if("function"!=typeof n)return{FAIL:"missing context end check."};var r=new Tn(e,t,n);return this.registeredContexts[e]=r,this.contextCheckers.push(r),r},Pn.prototype.getRangeTokens=function(e){var t=e.startIndex+e.endOffset;return[].concat(this.tokens.slice(e.startIndex,t))},Pn.prototype.getContextRanges=function(e){var t=this.getContext(e);return t?t.ranges:{FAIL:"context checker '"+e+"' is not registered."}},Pn.prototype.resetContextsRanges=function(){var e=this.registeredContexts;for(var t in e){if(e.hasOwnProperty(t))e[t].ranges=[]}},Pn.prototype.updateContextsRanges=function(){this.resetContextsRanges();for(var e=this.tokens.map((function(e){return e.char})),t=0;t=0;n--){var r=t[n],i=Ln(r),s=Fn(r);if(!i&&!s)return!0;if(i)return!1}return!1}(a)&&(c|=1),function(e){if(Ln(e.current))return!1;for(var t=0;t=1.2&&(i.markGlyphSets=n.parsePointer(br)),i}},_r=new Array(10);_r[1]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();return 1===t?{posFormat:1,coverage:this.parsePointer(re.coverage),value:this.parseValueRecord()}:2===t?{posFormat:2,coverage:this.parsePointer(re.coverage),values:this.parseValueRecordList()}:void I.assert(!1,"0x"+e.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")},_r[2]=function(){var e=this.offset+this.relativeOffset,t=this.parseUShort();I.assert(1===t||2===t,"0x"+e.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var n=this.parsePointer(re.coverage),r=this.parseUShort(),i=this.parseUShort();if(1===t)return{posFormat:t,coverage:n,valueFormat1:r,valueFormat2:i,pairSets:this.parseList(re.pointer(re.list((function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(r),value2:this.parseValueRecord(i)}}))))};if(2===t){var s=this.parsePointer(re.classDef),a=this.parsePointer(re.classDef),o=this.parseUShort(),l=this.parseUShort();return{posFormat:t,coverage:n,valueFormat1:r,valueFormat2:i,classDef1:s,classDef2:a,class1Count:o,class2Count:l,classRecords:this.parseList(o,re.list(l,(function(){return{value1:this.parseValueRecord(r),value2:this.parseValueRecord(i)}})))}}},_r[3]=function(){return{error:"GPOS Lookup 3 not supported"}},_r[4]=function(){return{error:"GPOS Lookup 4 not supported"}},_r[5]=function(){return{error:"GPOS Lookup 5 not supported"}},_r[6]=function(){return{error:"GPOS Lookup 6 not supported"}},_r[7]=function(){return{error:"GPOS Lookup 7 not supported"}},_r[8]=function(){return{error:"GPOS Lookup 8 not supported"}},_r[9]=function(){return{error:"GPOS Lookup 9 not supported"}};var Sr=new Array(10);var Mr={parse:function(e,t){var n=new re(e,t=t||0),r=n.parseVersion(1);return I.argument(1===r||1.1===r,"Unsupported GPOS table version "+r),1===r?{version:r,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(_r)}:{version:r,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(_r),variations:n.parseFeatureVariationsList()}},make:function(e){return new J.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new J.ScriptList(e.scripts)},{name:"features",type:"TABLE",value:new J.FeatureList(e.features)},{name:"lookups",type:"TABLE",value:new J.LookupList(e.lookups,Sr)}])}};var wr={parse:function(e,t){var n=new se.Parser(e,t),r=n.parseUShort();if(0===r)return function(e){var t={};e.skip("uShort");var n=e.parseUShort();I.argument(0===n,"Unsupported kern sub-table version."),e.skip("uShort",2);var r=e.parseUShort();e.skip("uShort",3);for(var i=0;i1&&console.warn("Only the first kern subtable is supported."),e.skip("uLong");var n=255&e.parseUShort();if(e.skip("uShort"),0===n){var r=e.parseUShort();e.skip("uShort",3);for(var i=0;i{"use strict";let n,r,i;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s={env:{emscripten_notify_memory_growth:function(e){i=new Uint8Array(r.exports.memory.buffer)}}};const a="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ";t.ZSTDDecoder=class{init(){return n||(n="undefined"!=typeof fetch?fetch("data:application/wasm;base64,"+a).then((e=>e.arrayBuffer())).then((e=>WebAssembly.instantiate(e,s))).then(this._init):WebAssembly.instantiate(Buffer.from(a,"base64"),s).then(this._init),n)}_init(e){r=e.instance,s.env.emscripten_notify_memory_growth(0)}decode(e,t=0){if(!r)throw new Error("ZSTDDecoder: Await .init() before decoding.");const n=e.byteLength,s=r.exports.malloc(n);i.set(e,s),t=t||Number(r.exports.ZSTD_findDecompressedSize(s,n));const a=r.exports.malloc(t),o=r.exports.ZSTD_decompress(a,t,s,n),l=i.slice(a,a+o);return r.exports.free(s),r.exports.free(a),l}}},4208:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.LightProbeGenerator=class{static fromCubeTexture(e){let t=0;const n=new r.Vector3,i=new r.Vector3,s=new r.Color,a=[0,0,0,0,0,0,0,0,0],o=new r.SphericalHarmonics3,l=o.coefficients;for(let h=0;h<6;h++){const o=e.image[h],c=o.width,u=o.height,d=document.createElement("canvas");d.width=c,d.height=u;const p=d.getContext("2d");p.drawImage(o,0,0,c,u);const f=p.getImageData(0,0,c,u),m=f.data,g=f.width,A=2/g;for(let v=0,y=m.length;v{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.RectAreaLightUniformsLib=class{static init(){const e=[1,0,0,2e-5,1,0,0,503905e-9,1,0,0,.00201562,1,0,0,.00453516,1,0,0,.00806253,1,0,0,.0125978,1,0,0,.018141,1,0,0,.0246924,1,0,0,.0322525,1,0,0,.0408213,1,0,0,.0503999,1,0,0,.0609894,1,0,0,.0725906,1,0,0,.0852058,1,0,0,.0988363,1,0,0,.113484,1,0,0,.129153,1,0,0,.145839,1,0,0,.163548,1,0,0,.182266,1,0,0,.201942,1,0,0,.222314,1,0,0,.241906,1,0,0,.262314,1,0,0,.285754,1,0,0,.310159,1,0,0,.335426,1,0,0,.361341,1,0,0,.387445,1,0,0,.412784,1,0,0,.438197,1,0,0,.466966,1,0,0,.49559,1,0,0,.523448,1,0,0,.549938,1,0,0,.57979,1,0,0,.608746,1,0,0,.636185,1,0,0,.664748,1,0,0,.69313,1,0,0,.71966,1,0,0,.747662,1,0,0,.774023,1,0,0,.799775,1,0,0,.825274,1,0,0,.849156,1,0,0,.873248,1,0,0,.89532,1,0,0,.917565,1,0,0,.937863,1,0,0,.958139,1,0,0,.976563,1,0,0,.994658,1,0,0,1.0112,1,0,0,1.02712,1,0,0,1.04189,1,0,0,1.05568,1,0,0,1.06877,1,0,0,1.08058,1,0,0,1.09194,1,0,0,1.10191,1,0,0,1.11161,1,0,0,1.1199,1,0,0,1.12813,.999547,-4.48815e-7,.0224417,199902e-10,.999495,-113079e-10,.0224406,503651e-9,.999496,-452317e-10,.0224406,.00201461,.999496,-101772e-9,.0224406,.00453287,.999495,-180928e-9,.0224406,.00805845,.999497,-282702e-9,.0224406,.0125914,.999496,-407096e-9,.0224406,.0181319,.999498,-554114e-9,.0224406,.02468,.999499,-723768e-9,.0224406,.0322363,.999495,-916058e-9,.0224405,.0408009,.999499,-.00113101,.0224408,.050375,.999494,-.00136863,.0224405,.0609586,.999489,-.00162896,.0224401,.0725537,.999489,-.00191201,.0224414,.0851619,.999498,-.00221787,.0224413,.0987867,.999492,-.00254642,.0224409,.113426,.999507,-.00289779,.0224417,.129088,.999494,-.0032716,.0224386,.145767,.999546,-.0036673,.0224424,.163472,.999543,-.00408166,.0224387,.182182,.999499,-.00450056,.0224338,.201843,.999503,-.00483661,.0224203,.222198,.999546,-.00452928,.022315,.241714,.999508,-.00587403,.0224329,.262184,.999509,-.00638806,.0224271,.285609,.999501,-.00691028,.0224166,.309998,.999539,-.00741979,.0223989,.335262,.999454,-.00786282,.0223675,.361154,.999529,-.00811928,.0222828,.387224,.999503,-.00799941,.0221063,.41252,.999561,-.00952753,.0223057,.438006,.999557,-.0099134,.0222065,.466735,.999541,-.0100935,.0220402,.495332,.999562,-.00996821,.0218067,.523197,.999556,-.0105031,.0217096,.550223,.999561,-.0114191,.0217215,.579498,.999588,-.0111818,.0213357,.608416,.999633,-.0107725,.0208689,.635965,.999527,-.0121671,.0210149,.664476,.999508,-.0116005,.020431,.692786,.999568,-.0115604,.0199791,.719709,.999671,-.0121117,.0197415,.74737,.999688,-.0110769,.0188846,.773692,.99962,-.0122368,.0188452,.799534,.999823,-.0110325,.0178001,.825046,.999599,-.0114923,.0174221,.849075,.999619,-.0105923,.0164345,.872999,.999613,-.0105988,.0158227,.895371,.99964,-.00979861,.0148131,.917364,.99977,-.00967238,.0140721,.938002,.999726,-.00869175,.0129543,.957917,.99973,-.00866872,.0122329,.976557,.999773,-.00731956,.0108958,.994459,.999811,-.00756027,.0102715,1.01118,.999862,-.00583732,.00878781,1.02701,.999835,-.00631438,.00827529,1.04186,.999871,-.00450785,.00674583,1.05569,.999867,-.00486079,.00621041,1.06861,.999939,-.00322072,.00478301,1.08064,.999918,-.00318199,.00406395,1.09181,1.00003,-.00193348,.00280682,1.10207,.999928,-.00153729,.00198741,1.11152,.999933,-623666e-9,917714e-9,1.12009,1,-102387e-11,9.07581e-7,1.12813,.997866,-8.96716e-7,.0448334,199584e-10,.997987,-225945e-10,.0448389,502891e-9,.997987,-903781e-10,.0448388,.00201156,.997985,-203351e-9,.0448388,.00452602,.997986,-361514e-9,.0448388,.00804629,.997987,-56487e-8,.0448389,.0125724,.997988,-813423e-9,.0448389,.0181045,.997984,-.00110718,.0448387,.0246427,.997985,-.00144616,.0448388,.0321875,.997987,-.00183038,.044839,.0407392,.997983,-.00225987,.0448387,.0502986,.997991,-.00273467,.0448389,.0608667,.997984,-.00325481,.0448384,.0724444,.998002,-.00382043,.044839,.0850348,.997997,-.00443145,.0448396,.0986372,.998007,-.00508796,.0448397,.113255,.998008,-.00578985,.04484,.128891,.998003,-.00653683,.0448384,.145548,.997983,-.00732713,.0448358,.163221,.997985,-.00815454,.0448358,.181899,.998005,-.00898985,.0448286,.201533,.998026,-.00964404,.0447934,.221821,.998055,-.00922677,.044611,.241282,.99804,-.0117361,.0448245,.261791,.998048,-.0127628,.0448159,.285181,.998088,-.0138055,.0447996,.30954,.998058,-.0148206,.0447669,.334751,.998099,-.0156998,.044697,.36061,.998116,-.0161976,.0445122,.386603,.998195,-.015945,.0441711,.411844,.998168,-.0183947,.0444255,.43773,.998184,-.0197913,.0443809,.466009,.998251,-.0201426,.0440689,.494574,.998305,-.0198847,.0435632,.522405,.998273,-.0210577,.043414,.549967,.998254,-.0227901,.0433943,.578655,.998349,-.0223108,.0426529,.60758,.99843,-.0223088,.042,.635524,.998373,-.0241141,.0418987,.663621,.998425,-.0231446,.0408118,.691906,.998504,-.0233684,.0400565,.719339,.998443,-.0241652,.0394634,.74643,.99848,-.0228715,.0380002,.773086,.998569,-.023519,.0372322,.798988,.998619,-.0223108,.0356468,.824249,.998594,-.0223105,.034523,.848808,.998622,-.0213426,.0328887,.87227,.998669,-.0207912,.0314374,.895157,.998705,-.0198416,.0296925,.916769,.998786,-.0189168,.0279634,.937773,.998888,-.0178811,.0261597,.957431,.99906,-.0166845,.0242159,.976495,.999038,-.0155464,.0222638,.994169,.999237,-.0141349,.0201967,1.01112,.999378,-.0129324,.0181744,1.02692,.999433,-.0113192,.0159898,1.04174,.999439,-.0101244,.0140385,1.05559,.999614,-.00837456,.0117826,1.06852,.999722,-.00721769,.00983745,1.08069,.999817,-.00554067,.00769002,1.09176,.99983,-.00426961,.005782,1.10211,.999964,-.00273904,.00374503,1.11152,1.00001,-.00136739,.00187176,1.12031,.999946,393227e-10,-28919e-9,1.12804,.995847,-13435e-10,.0671785,19916e-9,.995464,-338387e-10,.0671527,501622e-9,.99547,-135355e-9,.0671531,.00200649,.995471,-30455e-8,.0671532,.00451461,.99547,-541423e-9,.0671531,.008026,.995471,-84598e-8,.0671531,.0125407,.99547,-.00121823,.0671531,.0180589,.99547,-.00165817,.0671531,.0245806,.995463,-.00216583,.0671526,.0321062,.995468,-.00274127,.0671527,.0406366,.995474,-.00338447,.0671534,.0501717,.995473,-.00409554,.0671533,.0607131,.995478,-.00487451,.0671531,.0722618,.995476,-.00572148,.0671532,.0848191,.995477,-.00663658,.0671539,.0983882,.995498,-.00761986,.0671541,.112972,.995509,-.00867094,.0671542,.128568,.995509,-.00978951,.0671531,.145183,.995503,-.0109725,.0671491,.162808,.995501,-.012211,.0671465,.181441,.99553,-.0134565,.0671371,.201015,.99555,-.014391,.0670831,.221206,.99558,-.014351,.0668883,.240813,.995577,-.0173997,.0671055,.261257,.995602,-.0191111,.0671178,.284467,.995623,-.0206705,.0670946,.308765,.995658,-.022184,.0670472,.333905,.995705,-.0234832,.0669417,.359677,.995719,-.0241933,.0666714,.385554,.995786,-.0243539,.066266,.410951,.995887,-.0271866,.0664367,.437163,.995944,-.0296012,.0664931,.464842,.996004,-.0301045,.0660105,.49332,.996128,-.0298311,.0652694,.521131,.996253,-.0316426,.0650739,.549167,.996244,-.0339043,.0649433,.57737,.996309,-.033329,.0638926,.606073,.996417,-.0338935,.0630849,.634527,.996372,-.0353104,.0625083,.66256,.996542,-.0348942,.0611986,.690516,.996568,-.0351614,.060069,.718317,.996711,-.0354317,.0588522,.74528,.996671,-.0349513,.0571902,.772061,.996865,-.0345622,.0555321,.798089,.996802,-.0342566,.0537816,.823178,.996992,-.0330862,.0516095,.847949,.996944,-.0324666,.0495537,.871431,.997146,-.0309544,.0470302,.894357,.997189,-.0299372,.0446043,.916142,.997471,-.0281389,.0418812,.937193,.997515,-.0268702,.0391823,.957,.997812,-.0247166,.0361338,.975936,.998027,-.0233525,.0333945,.99391,.998233,-.0209839,.0301917,1.01075,.998481,-.0194309,.027271,1.02669,.998859,-.0169728,.0240162,1.04173,.99894,-.0152322,.0210517,1.05551,.999132,-.0127497,.0178632,1.06856,.999369,-.0108282,.014787,1.08054,.999549,-.00845886,.0116185,1.09185,.999805,-.0063937,.00867209,1.10207,.99985,-.00414582,.00566823,1.1117,.999912,-.00207443,.00277562,1.12022,1.00001,870226e-10,-53766e-9,1.12832,.991943,-178672e-11,.0893382,198384e-10,.991952,-450183e-10,.089339,499849e-9,.991956,-180074e-9,.0893394,.0019994,.991955,-405167e-9,.0893393,.00449867,.991953,-720298e-9,.0893391,.00799764,.991955,-.00112548,.0893393,.0124964,.991957,-.0016207,.0893395,.0179951,.991958,-.00220601,.0893396,.0244939,.991947,-.00288137,.0893385,.0319929,.991962,-.00364693,.0893399,.0404933,.991965,-.00450264,.0893399,.049995,.99198,-.00544862,.0893411,.0604995,.99197,-.00648491,.0893397,.0720074,.991976,-.00761164,.089341,.0845207,.99198,-.00882891,.0893405,.0980413,.991982,-.0101367,.0893396,.112571,.992008,-.011535,.0893415,.128115,.992026,-.0130228,.0893414,.144672,.992064,-.0145966,.0893418,.162241,.992041,-.0162421,.0893359,.180801,.992086,-.0178888,.0893214,.200302,.992157,-.0190368,.0892401,.220332,.992181,-.0195584,.0890525,.240144,.992175,-.0227257,.0892153,.260728,.99221,-.0254195,.089304,.283473,.99222,-.0274883,.0892703,.307673,.992317,-.0294905,.0892027,.332729,.992374,-.0311861,.0890577,.358387,.992505,-.0320656,.0886994,.384102,.992568,-.0329715,.0883198,.409767,.992675,-.036006,.0883602,.436145,.992746,-.0392897,.0884591,.463217,.992873,-.0399337,.0878287,.491557,.992934,-.040231,.0870108,.519516,.993091,-.0422013,.0865857,.547741,.993259,-.0443503,.0861937,.575792,.993455,-.0446368,.0851187,.604233,.993497,-.0454299,.0840576,.632925,.993694,-.0463296,.0829671,.660985,.993718,-.0470619,.0817185,.688714,.993973,-.0468838,.0800294,.716743,.994207,-.046705,.0781286,.74377,.994168,-.0469698,.0763337,.77042,.9945,-.0456816,.0738184,.796659,.994356,-.0455518,.0715545,.821868,.994747,-.0439488,.0686085,.846572,.994937,-.0430056,.065869,.870435,.995142,-.0413414,.0626446,.893272,.995451,-.0396521,.05929,.915376,.995445,-.0378453,.0558503,.936196,.995967,-.0355219,.0520949,.956376,.996094,-.0335146,.048377,.975327,.996622,-.030682,.0442575,.993471,.996938,-.0285504,.0404693,1.01052,.997383,-.0253399,.0360903,1.02637,.997714,-.0231651,.0322176,1.04139,.998249,-.0198138,.0278433,1.05542,.998596,-.0174337,.0238759,1.06846,.998946,-.0141349,.0195944,1.08056,.99928,-.0115603,.0156279,1.09181,.999507,-.00839065,.0114607,1.10213,.999697,-.005666,.00763325,1.11169,.999869,-.00269902,.00364946,1.12042,1.00001,623836e-10,-319288e-10,1.12832,.987221,-222675e-11,.111332,197456e-10,.98739,-561116e-10,.111351,497563e-9,.987448,-224453e-9,.111357,.00199031,.987441,-505019e-9,.111357,.0044782,.987442,-897816e-9,.111357,.00796129,.987442,-.00140284,.111357,.0124396,.987444,-.00202012,.111357,.0179132,.987442,-.00274964,.111357,.0243824,.987446,-.00359147,.111357,.0318474,.987435,-.00454562,.111356,.0403086,.987461,-.00561225,.111358,.0497678,.987458,-.00679125,.111358,.0602239,.987443,-.0080828,.111356,.0716792,.987476,-.0094872,.111358,.0841364,.98749,-.0110044,.111361,.097597,.987508,-.0126344,.111362,.112062,.987494,-.0143767,.111357,.127533,.987526,-.0162307,.111359,.144015,.987558,-.0181912,.111361,.161502,.987602,-.0202393,.111355,.179979,.987692,-.022273,.111346,.199386,.987702,-.0235306,.111215,.219183,.987789,-.0247628,.111061,.239202,.987776,-.0280668,.111171,.259957,.987856,-.0316751,.111327,.282198,.987912,-.0342468,.111282,.306294,.988,-.0367205,.111198,.331219,.988055,-.0387766,.110994,.356708,.988241,-.0397722,.110547,.382234,.988399,-.0416076,.110198,.408227,.988539,-.0448192,.110137,.434662,.988661,-.0483793,.110143,.461442,.988967,-.0495895,.109453,.489318,.989073,-.0506797,.108628,.517516,.989274,-.0526953,.108003,.545844,.989528,-.054578,.107255,.573823,.989709,-.0561503,.106294,.601944,.989991,-.056866,.104896,.630855,.990392,-.0572914,.103336,.658925,.990374,-.0586224,.10189,.686661,.990747,-.0584764,.099783,.714548,.991041,-.0582662,.0974309,.74186,.991236,-.0584118,.0951678,.768422,.991585,-.0573055,.0921581,.794817,.991984,-.0564241,.0891167,.820336,.9921,-.0553608,.085805,.84493,.992749,-.0533816,.0820354,.868961,.99288,-.0518661,.0782181,.891931,.993511,-.0492492,.0738935,.914186,.993617,-.0471956,.0696402,.93532,.99411,-.044216,.0649659,.95543,.994595,-.0416654,.0603177,.974685,.994976,-.0384314,.0553493,.992807,.995579,-.0353491,.0503942,1.00996,.996069,-.0319787,.0452123,1.02606,.996718,-.028472,.0400112,1.04114,.997173,-.0250789,.0349456,1.05517,.997818,-.0213326,.029653,1.0683,.998318,-.0178509,.024549,1.0805,.998853,-.0141118,.0194197,1.09177,.999218,-.0105914,.0143869,1.1022,.999594,-.00693474,.00943517,1.11175,.99975,-.00340478,.00464051,1.12056,1.00001,109172e-9,-112821e-9,1.12853,.983383,-266524e-11,.133358,196534e-10,.981942,-671009e-10,.133162,494804e-9,.981946,-268405e-9,.133163,.00197923,.981944,-603912e-9,.133163,.00445326,.981941,-.00107362,.133162,.00791693,.981946,-.00167755,.133163,.0123703,.981944,-.00241569,.133162,.0178135,.981945,-.00328807,.133163,.0242466,.981945,-.00429472,.133162,.03167,.981955,-.00543573,.133164,.0400846,.981951,-.00671105,.133163,.0494901,.981968,-.00812092,.133165,.0598886,.981979,-.00966541,.133166,.0712811,.981996,-.0113446,.133168,.083669,.982014,-.0131585,.133169,.0970533,.982011,-.0151073,.133167,.111438,.982062,-.0171906,.133172,.126826,.9821,-.0194067,.133175,.143215,.982149,-.0217502,.133176,.160609,.982163,-.0241945,.133173,.178981,.982247,-.0265907,.133148,.198249,.982291,-.027916,.132974,.217795,.982396,-.0299663,.132868,.238042,.982456,-.0334544,.132934,.258901,.982499,-.0378636,.133137,.280639,.982617,-.0409274,.133085,.304604,.98274,-.0438523,.132985,.329376,.982944,-.0462288,.132728,.354697,.98308,-.0475995,.132228,.380102,.983391,-.0501901,.131924,.406256,.983514,-.0535899,.131737,.432735,.98373,-.0571858,.131567,.459359,.984056,-.0592353,.130932,.486637,.984234,-.0610488,.130092,.51509,.984748,-.0630758,.12923,.543461,.985073,-.0647398,.128174,.571376,.985195,-.0671941,.127133,.599414,.985734,-.0681345,.125576,.628134,.986241,-.0686089,.123639,.656399,.986356,-.0698511,.121834,.684258,.986894,-.0700931,.119454,.711818,.987382,-.0698321,.116718,.739511,.988109,-.0693975,.113699,.766267,.988363,-.0689584,.110454,.792456,.989112,-.0672353,.106602,.81813,.989241,-.0662034,.10267,.842889,.990333,-.0638938,.0981381,.867204,.990591,-.0618534,.0935388,.89038,.991106,-.0593117,.088553,.912576,.991919,-.0562676,.0832187,.934118,.992111,-.0534085,.0778302,.954254,.992997,-.0495459,.0720453,.973722,.993317,-.0463707,.0663458,.991949,.994133,-.0421245,.0601883,1.00936,.994705,-.0384977,.0542501,1.02559,.995495,-.0340956,.0479862,1.04083,.996206,-.030105,.041887,1.05497,.996971,-.0256095,.0355355,1.06824,.997796,-.0213932,.0293655,1.08056,.998272,-.0169612,.0232926,1.09182,.998857,-.0126756,.0172786,1.10219,.99939,-.00832486,.0113156,1.11192,.999752,-.00410826,.00557892,1.12075,1,150957e-9,-119101e-9,1.12885,.975169,-309397e-11,.154669,195073e-10,.975439,-779608e-10,.154712,491534e-9,.975464,-311847e-9,.154716,.00196617,.975464,-701656e-9,.154716,.00442387,.975462,-.0012474,.154715,.0078647,.975461,-.00194906,.154715,.0122886,.975464,-.00280667,.154715,.0176959,.975468,-.00382025,.154716,.0240867,.975471,-.00498985,.154716,.0314612,.975472,-.00631541,.154717,.0398199,.975486,-.00779719,.154718,.0491639,.975489,-.00943505,.154718,.0594932,.975509,-.0112295,.154721,.0708113,.97554,-.0131802,.154724,.0831176,.975557,-.0152876,.154726,.096415,.975585,-.0175512,.154728,.110705,.975605,-.0199713,.154729,.125992,.975645,-.0225447,.154729,.142272,.975711,-.0252649,.154735,.159549,.975788,-.0280986,.154736,.177805,.975872,-.0308232,.154704,.196911,.975968,-.0324841,.154525,.216324,.976063,-.0351281,.154432,.236628,.976157,-.0388618,.15446,.257539,.976204,-.0437704,.154665,.278975,.976358,-.047514,.154652,.302606,.976571,-.0508638,.154535,.327204,.976725,-.0534995,.154221,.352276,.977013,-.0555547,.153737,.377696,.977294,-.0586728,.153403,.403855,.977602,-.0622715,.15312,.430333,.977932,-.0658166,.152755,.456855,.978241,-.0689877,.152233,.483668,.978602,-.0712805,.15132,.512097,.979234,-.0732775,.150235,.540455,.97977,-.075163,.148978,.568486,.979995,-.0778026,.147755,.596524,.98078,-.0791854,.146019,.624825,.981628,-.0799666,.143906,.653403,.982067,-.0808532,.141561,.681445,.98271,-.0816024,.139025,.708918,.983734,-.0812511,.135764,.736594,.98431,-.0806201,.132152,.763576,.985071,-.0801605,.12846,.789797,.98618,-.0784208,.124084,.815804,.986886,-.0766643,.1193,.840869,.987485,-.0747744,.114236,.864952,.988431,-.0716701,.108654,.888431,.988886,-.0691609,.102994,.910963,.990024,-.0654048,.0967278,.932629,.990401,-.0619765,.090384,.95313,.991093,-.0579296,.0837885,.972587,.992018,-.0536576,.0770171,.991184,.992536,-.0493719,.0701486,1.00863,.993421,-.0444813,.062953,1.02494,.993928,-.040008,.0560455,1.04017,.994994,-.0347982,.04856,1.05463,.995866,-.0301017,.0416152,1.06807,.996916,-.0248225,.0342597,1.08039,.997766,-.0199229,.0271668,1.09177,.998479,-.0147422,.0201387,1.10235,.99921,-.00980173,.0131944,1.11206,.999652,-.0047426,.00640712,1.12104,.999998,891673e-10,-10379e-8,1.12906,.967868,-351885e-11,.175947,193569e-10,.968001,-886733e-10,.175972,487782e-9,.96801,-354697e-9,.175973,.00195115,.968012,-798063e-9,.175974,.00439006,.968011,-.00141879,.175973,.00780461,.968011,-.00221686,.175973,.0121948,.968016,-.00319231,.175974,.0175607,.968019,-.00434515,.175974,.0239027,.968018,-.00567538,.175974,.0312208,.968033,-.00718308,.175977,.0395158,.968049,-.00886836,.175979,.0487885,.968047,-.0107312,.175978,.0590394,.968072,-.0127719,.175981,.0702705,.968108,-.0149905,.175986,.0824836,.968112,-.0173866,.175985,.0956783,.968173,-.0199611,.175993,.109862,.96827,-.0227128,.176008,.125033,.968292,-.025639,.17601,.141193,.968339,-.0287299,.176007,.158336,.968389,-.0319399,.176001,.176441,.968501,-.034941,.175962,.195359,.968646,-.0370812,.175793,.214686,.968789,-.0402329,.175708,.234973,.96886,-.0442601,.1757,.255871,.969013,-.049398,.175876,.277238,.969242,-.0539932,.17594,.300326,.969419,-.0577299,.175781,.324702,.969763,-.0605643,.175432,.349527,.970093,-.0634488,.174992,.374976,.970361,-.0670589,.174611,.401097,.970825,-.0708246,.174226,.427496,.971214,-.0742871,.173684,.453858,.971622,-.0782608,.173186,.480637,.972175,-.0813151,.172288,.508655,.972944,-.0832678,.170979,.536973,.973595,-.0855964,.169573,.565138,.974345,-.0882163,.168152,.593222,.975233,-.0901671,.166314,.621201,.976239,-.0912111,.163931,.649919,.977289,-.0916959,.161106,.678011,.978076,-.0927061,.158272,.705717,.979533,-.0925562,.15475,.733228,.980335,-.0918159,.150638,.760454,.981808,-.0908508,.146201,.786918,.983061,-.0896172,.141386,.812953,.984148,-.0871588,.135837,.838281,.985047,-.0850624,.130135,.862594,.986219,-.0818541,.123882,.88633,.987043,-.0784523,.117126,.908952,.988107,-.0749601,.110341,.930744,.988955,-.0703548,.102885,.951728,.989426,-.0662798,.0954167,.971166,.990421,-.0610834,.0876331,.989984,.991032,-.0562936,.0797785,1.00765,.992041,-.0508154,.0718166,1.02434,.992794,-.0454045,.0637125,1.03976,.993691,-.0398194,.0555338,1.05418,.994778,-.0341482,.0473388,1.06772,.995915,-.028428,.0391016,1.08028,.997109,-.022642,.0309953,1.09185,.998095,-.0168738,.0230288,1.10247,.998985,-.0111274,.0150722,1.11229,.999581,-.00543881,.00740605,1.12131,1.00003,162239e-9,-105549e-9,1.12946,.959505,-393734e-11,.196876,191893e-10,.959599,-992157e-10,.196895,483544e-9,.959641,-396868e-9,.196903,.0019342,.959599,-892948e-9,.196895,.00435193,.959603,-.00158747,.196896,.0077368,.959604,-.00248042,.196896,.0120888,.959605,-.00357184,.196896,.0174082,.959605,-.00486169,.196896,.0236949,.959613,-.00635008,.196897,.0309497,.959619,-.00803696,.196898,.0391725,.959636,-.00992255,.196901,.0483649,.959634,-.0120067,.1969,.0585266,.959675,-.0142898,.196906,.0696609,.959712,-.0167717,.196911,.0817678,.959752,-.0194524,.196918,.0948494,.959807,-.0223321,.196925,.10891,.959828,-.0254091,.196924,.123947,.959906,-.0286815,.196934,.139968,.960005,-.0321371,.196944,.156968,.960071,-.0357114,.196936,.17491,.960237,-.0389064,.196882,.193597,.960367,-.041623,.196731,.21285,.960562,-.0452655,.196654,.233075,.960735,-.0496207,.196643,.253941,.960913,-.0549379,.196774,.275278,.961121,-.0603414,.196893,.297733,.96139,-.0644244,.196717,.321877,.961818,-.067556,.196314,.346476,.962175,-.0712709,.195917,.371907,.96255,-.0752848,.1955,.397916,.963164,-.0792073,.195026,.424229,.963782,-.0828225,.194424,.450637,.964306,-.0873119,.193831,.477288,.964923,-.0911051,.192973,.504716,.966048,-.093251,.19151,.533053,.967024,-.0958983,.190013,.561366,.968038,-.09835,.188253,.589464,.969152,-.100754,.186257,.617433,.970557,-.102239,.183775,.645801,.972104,-.102767,.180645,.674278,.973203,-.103492,.177242,.702004,.975123,-.103793,.17345,.729529,.97641,-.102839,.168886,.756712,.978313,-.101687,.163892,.783801,.980036,-.100314,.158439,.809671,.981339,-.097836,.152211,.835402,.982794,-.0950006,.145679,.860081,.984123,-.0920994,.138949,.883757,.984918,-.0878641,.131283,.90685,.985999,-.083939,.123464,.928786,.987151,-.0791234,.115324,.94983,.987827,-.0739332,.106854,.96962,.988806,-.0688088,.0982691,.98861,.989588,-.0628962,.0893456,1.00667,.990438,-.0573146,.0805392,1.02344,.991506,-.0509433,.0713725,1.03933,.992492,-.0448724,.0623732,1.05378,.993663,-.0383497,.0530838,1.06747,.994956,-.0319593,.0439512,1.08007,.99634,-.025401,.0347803,1.09182,.99761,-.0189687,.0257954,1.1025,.99863,-.0124441,.0169893,1.11247,.99947,-.00614003,.00829498,1.12151,1.00008,216624e-9,-146107e-9,1.12993,.950129,-434955e-11,.217413,190081e-10,.950264,-10957e-8,.217444,47884e-8,.9503,-438299e-9,.217451,.00191543,.950246,-986124e-9,.21744,.00430951,.950246,-.00175311,.21744,.00766137,.950245,-.00273923,.21744,.011971,.950253,-.00394453,.217441,.0172385,.950258,-.00536897,.217442,.0234641,.950267,-.00701262,.217444,.030648,.950277,-.00887551,.217446,.038791,.950284,-.0109576,.217446,.0478931,.950312,-.0132591,.217451,.0579568,.950334,-.01578,.217454,.0689821,.950378,-.0185204,.217462,.0809714,.950417,-.0214803,.217467,.0939265,.950488,-.0246594,.217479,.10785,.950534,-.0280565,.217483,.122743,.950633,-.0316685,.217498,.138611,.950698,-.0354787,.217499,.155442,.950844,-.0394003,.217507,.173208,.950999,-.0426812,.217419,.191605,.951221,-.0461302,.217317,.21084,.951412,-.0502131,.217238,.230945,.951623,-.0549183,.21722,.251745,.951867,-.0604493,.217306,.273001,.952069,-.0665189,.217466,.294874,.952459,-.0709179,.217266,.318732,.952996,-.0746112,.216891,.34318,.953425,-.0789252,.216503,.36849,.953885,-.0833293,.216042,.394373,.954617,-.087371,.215469,.420505,.955429,-.0914054,.214802,.446907,.956068,-.0961671,.214146,.473522,.957094,-.10048,.213286,.50052,.958372,-.103248,.211796,.528715,.959654,-.106033,.21016,.557065,.961305,-.108384,.208149,.585286,.962785,-.111122,.206024,.613334,.964848,-.112981,.203442,.641334,.966498,-.113717,.19996,.669955,.968678,-.114121,.196105,.698094,.970489,-.114524,.191906,.725643,.972903,-.113792,.186963,.752856,.974701,-.112406,.181343,.780013,.976718,-.110685,.175185,.806268,.978905,-.108468,.168535,.832073,.980267,-.105061,.161106,.857149,.981967,-.101675,.153387,.881145,.983063,-.0974492,.145199,.904255,.984432,-.0925815,.136527,.926686,.985734,-.0877983,.127584,.947901,.986228,-.081884,.118125,.968111,.98719,-.0761208,.108594,.98719,.988228,-.0698196,.0989996,1.00559,.989046,-.0632739,.0890074,1.02246,.990242,-.056522,.0790832,1.03841,.991252,-.0495272,.0689182,1.05347,.992542,-.0425373,.0588592,1.06724,.994096,-.0353198,.0486833,1.08009,.995593,-.028235,.0385977,1.09177,.99711,-.0209511,.0286457,1.10274,.998263,-.0139289,.0188497,1.11262,.999254,-.0067359,.009208,1.12191,.999967,141846e-9,-657764e-10,1.13024,.935608,-474692e-11,.236466,187817e-10,.93996,-11971e-8,.237568,473646e-9,.939959,-478845e-9,.237567,.0018946,.939954,-.0010774,.237566,.00426284,.939956,-.00191538,.237566,.00757842,.939954,-.00299277,.237566,.0118413,.93996,-.00430961,.237567,.0170518,.939969,-.00586589,.237569,.02321,.939982,-.00766166,.237572,.0303164,.939987,-.00969686,.237572,.0383711,.939997,-.0119715,.237574,.0473751,.940031,-.0144858,.237581,.0573298,.940073,-.0172399,.237589,.0682366,.94012,-.0202335,.237598,.080097,.940162,-.0234663,.237604,.0929116,.940237,-.0269387,.237615,.106686,.940328,-.0306489,.237632,.121421,.940419,-.0345917,.237645,.137115,.940522,-.0387481,.237654,.153766,.940702,-.0429906,.237661,.17133,.940871,-.0465089,.237561,.189502,.941103,-.050531,.23748,.208616,.941369,-.0550657,.237423,.228595,.941641,-.0601337,.237399,.249287,.941903,-.0658804,.237443,.270467,.942224,-.0722674,.237597,.292024,.942633,-.0771788,.237419,.315272,.943172,-.0815623,.237068,.339579,.943691,-.0863973,.236682,.364717,.944382,-.0911536,.236213,.390435,.945392,-.0952967,.235562,.416425,.946185,-.0998948,.234832,.442772,.947212,-.104796,.234114,.469347,.948778,-.10928,.233222,.496162,.950149,-.113081,.231845,.523978,.951989,-.115893,.230005,.552295,.953921,-.11846,.227862,.580569,.955624,-.12115,.225439,.608698,.958234,-.123373,.222635,.636696,.960593,-.124519,.219093,.665208,.963201,-.124736,.214749,.693557,.965642,-.125012,.210059,.721334,.968765,-.124661,.204935,.748613,.971753,-.122996,.198661,.776224,.973751,-.120998,.191823,.802461,.976709,-.118583,.184359,.828399,.977956,-.115102,.176437,.853693,.979672,-.111077,.167681,.877962,.981816,-.10688,.158872,.901564,.98238,-.101469,.149398,.924057,.983964,-.0960013,.139436,.945751,.984933,-.0899626,.12943,.966272,.985694,-.0832973,.11894,.985741,.986822,-.0767082,.108349,1.00407,.987725,-.0693614,.0976026,1.02154,.98877,-.06211,.086652,1.03757,.990129,-.0544143,.0756182,1.05296,.991337,-.046744,.0645753,1.06683,.992978,-.0387931,.0534683,1.0798,.994676,-.030973,.0424137,1.09181,.99645,-.0230311,.0314035,1.10286,.997967,-.0152065,.0206869,1.11291,.99922,-.00744837,.010155,1.12237,1.00002,240209e-9,-752767e-10,1.13089,.922948,-515351e-11,.255626,186069e-10,.928785,-129623e-9,.257244,468009e-9,.928761,-51849e-8,.257237,.00187202,.928751,-.0011666,.257235,.00421204,.928751,-.00207395,.257234,.0074881,.928754,-.00324055,.257235,.0117002,.92876,-.00466639,.257236,.0168486,.928763,-.00635149,.257237,.0229334,.928774,-.00829584,.257239,.029955,.928791,-.0104995,.257243,.0379139,.928804,-.0129623,.257245,.0468108,.928847,-.0156846,.257255,.0566473,.92889,-.0186661,.257263,.0674246,.928924,-.0219067,.257268,.0791433,.928989,-.0254066,.257282,.0918076,.92909,-.0291651,.257301,.105419,.92918,-.0331801,.257316,.119978,.92929,-.0374469,.257332,.135491,.929453,-.041939,.257357,.151948,.929586,-.0464612,.257347,.169275,.929858,-.0503426,.257269,.187257,.930125,-.0548409,.257199,.206204,.930403,-.0598063,.257149,.22601,.930726,-.0652437,.257122,.246561,.931098,-.0712376,.257153,.267618,.931396,-.0777506,.257237,.288993,.931947,-.0832374,.257124,.311527,.932579,-.0883955,.25683,.335697,.933194,-.0937037,.256444,.360634,.934013,-.0987292,.255939,.386126,.935307,-.103215,.255282,.412018,.936374,-.108234,.254538,.438292,.93776,-.113234,.253728,.464805,.939599,-.118013,.25275,.491464,.941036,-.122661,.251404,.518751,.94337,-.125477,.249435,.547133,.945318,-.128374,.247113,.575456,.947995,-.130996,.244441,.60372,.950818,-.133438,.241352,.63174,.954378,-.135004,.237849,.659971,.957151,-.135313,.233188,.688478,.960743,-.13521,.228001,.716767,.964352,-.135007,.222249,.744349,.967273,-.133523,.21542,.771786,.969767,-.131155,.208039,.798639,.973195,-.128492,.200076,.824774,.975557,-.125094,.191451,.850222,.977692,-.120578,.18184,.874761,.98026,-.115882,.172102,.898497,.981394,-.110372,.161859,.921636,.982386,-.10415,.15108,.943467,.983783,-.0978128,.140407,.964045,.98422,-.0906171,.129058,.98398,.985447,-.0832921,.117614,1.00276,.986682,-.0754412,.10585,1.02047,.987326,-.0673885,.0940943,1.03678,.988707,-.0592565,.0822093,1.05218,.990185,-.050717,.070192,1.06652,.991866,-.0423486,.0582081,1.07965,.993897,-.0336118,.0460985,1.09188,.995841,-.0252178,.0342737,1.10307,.997605,-.0164893,.0224829,1.11324,.999037,-.00817112,.0110647,1.12262,1.00003,291686e-9,-168673e-9,1.13139,.915304,-552675e-11,.275999,183285e-10,.91668,-139285e-9,.276414,461914e-9,.916664,-55713e-8,.276409,.00184763,.916653,-.00125354,.276406,.00415715,.916651,-.00222851,.276405,.00739053,.916655,-.00348205,.276406,.0115478,.916653,-.00501414,.276405,.0166291,.916667,-.00682478,.276409,.0226346,.91668,-.00891398,.276412,.0295648,.91669,-.0112817,.276413,.0374199,.916727,-.013928,.276422,.0462016,.916759,-.0168528,.276429,.0559101,.916793,-.0200558,.276436,.0665466,.916849,-.0235373,.276448,.0781139,.916964,-.0272973,.276474,.0906156,.917047,-.0313344,.276491,.104051,.917152,-.0356465,.276511,.118424,.917286,-.0402271,.276533,.133736,.917469,-.0450408,.276564,.149978,.917686,-.0497872,.276563,.167057,.917953,-.0540937,.276493,.184846,.918228,-.0590709,.276437,.203614,.918572,-.0644277,.276398,.223212,.918918,-.0702326,.276362,.243584,.919356,-.076484,.276383,.264465,.919842,-.0830808,.276434,.285701,.920451,-.0892972,.276407,.307559,.921113,-.095016,.276128,.331501,.921881,-.100771,.275754,.356207,.923027,-.106029,.275254,.381477,.924364,-.111029,.274595,.40722,.925818,-.116345,.273841,.433385,.92746,-.121424,.272913,.459848,.929167,-.12657,.271837,.486493,.931426,-.131581,.270575,.513432,.934001,-.135038,.268512,.541502,.936296,-.138039,.266135,.569658,.939985,-.140687,.263271,.598375,.943516,-.143247,.260058,.626563,.94782,-.145135,.256138,.654711,.951023,-.145733,.251154,.683285,.955338,-.145554,.245562,.711831,.959629,-.145008,.239265,.739573,.963123,-.144003,.232064,.767027,.966742,-.141289,.224036,.794359,.969991,-.138247,.215305,.820361,.973403,-.134786,.206051,.846548,.975317,-.129966,.195914,.871541,.977647,-.12471,.185184,.895313,.980137,-.119086,.174161,.918398,.981031,-.112297,.162792,.940679,.982037,-.105372,.150952,.961991,.983164,-.097821,.138921,.981913,.983757,-.0897245,.126611,1.00109,.985036,-.0815974,.114228,1.01902,.986289,-.0727725,.101389,1.03604,.987329,-.0639323,.0886476,1.05149,.989193,-.0548109,.0756837,1.06619,.990716,-.045687,.0627581,1.07948,.992769,-.0364315,.0498337,1.09172,.99524,-.0271761,.0370305,1.1033,.997154,-.0179609,.0243959,1.11353,.998845,-.00878063,.0119567,1.12319,1.00002,259038e-9,-108146e-9,1.13177,.903945,-591681e-11,.295126,181226e-10,.903668,-148672e-9,.295037,455367e-9,.903677,-594683e-9,.29504,.00182145,.903673,-.00133805,.295039,.00409831,.903666,-.00237872,.295036,.00728584,.903668,-.00371676,.295037,.0113842,.903679,-.00535212,.29504,.0163936,.903684,-.00728479,.295041,.0223141,.903698,-.00951473,.295044,.0291462,.903718,-.0120419,.295049,.0368904,.903754,-.0148664,.295058,.0455477,.903801,-.017988,.29507,.0551194,.903851,-.0214064,.295082,.0656058,.903921,-.0251219,.295097,.0770109,.904002,-.0291337,.295116,.0893354,.904111,-.033441,.29514,.102583,.904246,-.0380415,.295169,.116755,.904408,-.0429258,.295202,.131853,.904637,-.0480468,.295245,.147869,.904821,-.0529208,.295214,.164658,.905163,-.0577748,.295185,.182274,.905469,-.0631763,.295143,.200828,.905851,-.068917,.295112,.2202,.906322,-.0750861,.295104,.240372,.906761,-.0815855,.295086,.261082,.90735,-.0882138,.295095,.282123,.908087,-.095082,.295139,.303563,.908826,-.101488,.29492,.327028,.909832,-.107577,.294577,.351464,.911393,-.113033,.294115,.376497,.912804,-.118629,.293446,.402115,.914081,-.124232,.292581,.428111,.91637,-.129399,.29166,.454442,.91814,-.134892,.290422,.481024,.921179,-.140069,.289194,.507924,.924544,-.144431,.287421,.535557,.927995,-.147498,.284867,.563984,.931556,-.150197,.281722,.5923,.935777,-.152711,.278207,.620832,.940869,-.154836,.274148,.649069,.945994,-.155912,.269057,.677746,.949634,-.155641,.262799,.706293,.955032,-.154809,.256097,.734278,.95917,-.153678,.248618,.761751,.962931,-.151253,.239794,.789032,.966045,-.147625,.230281,.815422,.96971,-.143964,.220382,.841787,.972747,-.139464,.209846,.867446,.975545,-.133459,.198189,.892004,.978381,-.127424,.186362,.915458,.979935,-.120506,.173964,.937948,.980948,-.11282,.161429,.959732,.982234,-.104941,.148557,.980118,.982767,-.0962905,.135508,.999463,.983544,-.0873625,.122338,1.01756,.984965,-.0783447,.108669,1.03492,.986233,-.0684798,.0949911,1.05087,.987796,-.0590867,.0811386,1.0656,.989885,-.0489145,.0673099,1.0794,.991821,-.0391,.0535665,1.09174,.99448,-.029087,.0397529,1.10341,.996769,-.019114,.0261463,1.11383,.998641,-.00947007,.0128731,1.1237,.999978,446316e-9,-169093e-9,1.13253,.888362,-627064e-11,.312578,178215e-10,.889988,-157791e-9,.313148,448451e-9,.889825,-631076e-9,.313092,.00179356,.88984,-.00141994,.313097,.00403554,.889828,-.0025243,.313092,.00717429,.889831,-.00394421,.313093,.0112099,.889831,-.00567962,.313093,.0161425,.889844,-.00773051,.313096,.0219724,.889858,-.0100968,.3131,.0286999,.889882,-.0127786,.313106,.0363256,.889918,-.0157757,.313116,.0448509,.889967,-.0190878,.313129,.0542758,.89003,-.022715,.313145,.0646032,.890108,-.0266566,.313165,.0758339,.890218,-.0309131,.313193,.0879729,.890351,-.0354819,.313226,.101019,.89051,-.0403613,.313263,.114979,.890672,-.0455385,.313294,.129848,.890882,-.0509444,.313333,.145616,.891189,-.0559657,.313324,.162122,.891457,-.0613123,.313281,.179524,.891856,-.0671488,.313281,.197855,.892312,-.0732732,.313268,.216991,.892819,-.0797865,.313263,.236924,.893369,-.0865269,.313247,.257433,.894045,-.0931592,.313205,.278215,.894884,-.100532,.313276,.299467,.895832,-.107716,.313205,.322276,.897043,-.114099,.312873,.34642,.898515,-.119941,.312331,.371187,.900191,-.126044,.311731,.396656,.90188,-.131808,.310859,.422488,.904359,-.137289,.309857,.448744,.906923,-.142991,.308714,.475239,.910634,-.148253,.307465,.501983,.914502,-.153332,.305774,.529254,.919046,-.156646,.303156,.557709,.923194,-.159612,.299928,.586267,.928858,-.162027,.296245,.614925,.934464,-.164203,.291832,.643187,.939824,-.165602,.286565,.671601,.944582,-.165383,.280073,.700213,.949257,-.164439,.272891,.728432,.954389,-.162953,.264771,.756082,.958595,-.161007,.255927,.78369,.962138,-.157243,.245769,.810769,.966979,-.152872,.235127,.836999,.969566,-.148209,.22347,.862684,.972372,-.142211,.211147,.887847,.975916,-.135458,.198606,.911843,.978026,-.128398,.185498,.934795,.979686,-.120313,.17171,.956787,.980748,-.11166,.158159,.978046,.981622,-.103035,.144399,.997693,.982356,-.0930328,.13001,1.01642,.983308,-.0834627,.115778,1.03366,.985037,-.0732249,.101327,1.05014,.986493,-.0628145,.086554,1.06507,.988484,-.0526556,.0720413,1.07907,.991051,-.0415744,.0571151,1.09189,.993523,-.0314275,.0426643,1.10369,.99628,-.0203603,.0279325,1.11423,.998344,-.0102446,.0138182,1.12421,.999997,42612e-8,-193628e-9,1.1333,.871555,-660007e-11,.329176,174749e-10,.875255,-166579e-9,.330571,441051e-9,.875644,-666394e-9,.330718,.00176441,.875159,-.00149903,.330536,.00396899,.87516,-.00266493,.330536,.007056,.875158,-.00416393,.330535,.0110251,.87516,-.00599598,.330535,.0158764,.875163,-.00816108,.330536,.0216101,.875174,-.0106591,.330538,.0282266,.875199,-.0134899,.330545,.0357266,.875257,-.0166538,.330563,.0441117,.875304,-.0201501,.330575,.0533821,.875373,-.0239785,.330595,.0635395,.875464,-.0281389,.330619,.0745872,.875565,-.0326301,.330645,.0865255,.875691,-.0374516,.330676,.0993599,.875897,-.0425993,.330733,.113093,.876091,-.0480576,.330776,.127722,.876353,-.0537216,.330826,.143227,.876649,-.0589807,.330809,.159462,.877034,-.0647865,.330819,.176642,.877443,-.0709789,.330817,.194702,.877956,-.0774782,.330832,.213577,.878499,-.0843175,.330822,.233246,.879144,-.0912714,.330804,.253512,.879982,-.0980824,.330766,.274137,.88097,-.105823,.330864,.295209,.882051,-.113671,.330896,.317226,.883397,-.120303,.330545,.341068,.884987,-.12667,.330068,.365613,.886789,-.133118,.329418,.390807,.889311,-.139024,.328683,.416494,.891995,-.144971,.327729,.442618,.895106,-.150747,.326521,.469131,.899527,-.156283,.325229,.495921,.90504,-.161707,.32378,.523162,.909875,-.165661,.32122,.55092,.91561,-.168755,.317942,.579928,.921225,-.171193,.313983,.608539,.927308,-.17319,.309636,.636854,.933077,-.174819,.304262,.66523,.938766,-.175002,.297563,.693609,.943667,-.173946,.289613,.722157,.949033,-.172221,.281227,.750021,.953765,-.169869,.271545,.777466,.95804,-.166578,.261034,.804853,.962302,-.161761,.249434,.831569,.966544,-.156636,.237484,.857779,.969372,-.150784,.224395,.883051,.972486,-.143672,.210786,.907864,.975853,-.135772,.196556,.931223,.977975,-.127942,.182307,.954061,.979122,-.118347,.167607,.97531,.980719,-.109112,.152739,.995666,.981223,-.0991789,.137932,1.01475,.98216,-.0883553,.122692,1.03253,.983379,-.0780825,.107493,1.04917,.985434,-.0665646,.0917791,1.06464,.987332,-.0557714,.0764949,1.07896,.990004,-.0442805,.060721,1.09199,.992975,-.0331676,.0452284,1.10393,.995811,-.0219547,.0297934,1.11476,.9982,-.0107613,.0146415,1.12484,1.00002,248678e-9,-14555e-8,1.13413,.859519,-693595e-11,.347264,171673e-10,.859843,-17503e-8,.347394,433219e-9,.859656,-700076e-9,.347319,.00173277,.859671,-.00157517,.347325,.00389875,.859669,-.00280028,.347324,.00693112,.85967,-.0043754,.347324,.01083,.859665,-.00630049,.347321,.0155954,.859685,-.0085755,.347328,.0212278,.859694,-.0112003,.347329,.0277273,.859718,-.0141747,.347336,.0350946,.85976,-.0174988,.347348,.0433314,.85982,-.0211722,.347366,.0524384,.859892,-.0251941,.347387,.0624168,.860006,-.0295649,.347422,.0732708,.860122,-.0342825,.347453,.0849999,.860282,-.0393462,.347499,.0976102,.860482,-.0447513,.347554,.111104,.860719,-.0504775,.347614,.125479,.860998,-.0563577,.347666,.140703,.861322,-.0619473,.347662,.156681,.861724,-.0681277,.347684,.173597,.862198,-.0746567,.347709,.191371,.862733,-.0815234,.347727,.209976,.863371,-.0886643,.347744,.229351,.86414,-.0957908,.347734,.24934,.865138,-.102912,.34772,.269797,.866182,-.110924,.3478,.290654,.867436,-.119223,.347911,.312074,.869087,-.126197,.347649,.335438,.870859,-.133145,.347222,.359732,.872997,-.139869,.346645,.38467,.875939,-.146089,.345935,.41019,.879012,-.152334,.345012,.436218,.883353,-.15821,.343924,.462641,.888362,-.164097,.342636,.489449,.895026,-.169528,.341351,.516629,.900753,-.174408,.339115,.544109,.906814,-.17751,.335809,.572857,.912855,-.180101,.331597,.601554,.919438,-.182116,.32698,.630198,.925962,-.183494,.321449,.658404,.931734,-.184159,.314595,.686625,.93762,-.18304,.306462,.71531,.943858,-.181323,.297514,.744272,.948662,-.178683,.287447,.771462,.953299,-.175379,.276166,.798593,.957346,-.170395,.263758,.8256,.962565,-.165042,.251019,.852575,.966075,-.158655,.237011,.878316,.969048,-.151707,.222518,.90329,.972423,-.143271,.207848,.927745,.975833,-.134824,.192463,.950859,.977629,-.125444,.1768,.972947,.978995,-.114949,.161033,.993263,.980533,-.104936,.145523,1.01337,.980745,-.0935577,.129799,1.03128,.981814,-.0822956,.113486,1.04825,.983943,-.0710082,.0972925,1.06405,.986141,-.0587931,.0808138,1.0785,.988878,-.0472755,.0644915,1.09204,.992132,-.0349128,.0478128,1.10413,.9953,-.0232407,.031621,1.11527,.998117,-.0112713,.0154935,1.12551,1.00003,339743e-9,-195763e-9,1.13504,.845441,-729126e-11,.364305,169208e-10,.843588,-183164e-9,.363506,425067e-9,.843412,-73253e-8,.36343,.00169999,.843401,-.00164818,.363426,.00382495,.843399,-.00293008,.363425,.00679993,.843401,-.00457822,.363425,.010625,.843394,-.00659249,.363421,.0153002,.843398,-.00897282,.363421,.0208258,.843415,-.0117191,.363426,.0272024,.843438,-.0148312,.363432,.0344305,.843483,-.018309,.363447,.0425116,.84356,-.0221521,.363472,.0514471,.843646,-.0263597,.363499,.061238,.843743,-.0309315,.363527,.0718873,.84388,-.0358658,.363569,.0833969,.844079,-.0411624,.363631,.0957742,.844279,-.0468128,.363688,.109015,.844549,-.0527923,.363761,.123124,.844858,-.0588204,.363817,.138044,.84522,-.0647573,.36383,.153755,.845669,-.0713181,.363879,.170394,.846155,-.0781697,.363908,.187861,.846789,-.0853913,.363969,.206176,.847502,-.0928086,.363999,.225244,.8484,-.10005,.363997,.244926,.849461,-.107615,.364008,.265188,.850562,-.115814,.364055,.28587,.851962,-.124334,.364179,.306926,.854326,-.131995,.364233,.329605,.856295,-.139338,.363856,.35359,.858857,-.146346,.363347,.37831,.862428,-.152994,.362807,.403722,.866203,-.159463,.361963,.429537,.871629,-.165623,.36112,.456,.877365,-.171649,.359917,.482773,.883744,-.177151,.35848,.509705,.890693,-.182381,.356523,.537215,.897278,-.186076,.3533,.565493,.903958,-.188602,.349095,.594293,.910908,-.190755,.344215,.623165,.918117,-.192063,.338606,.651573,.924644,-.192758,.331544,.679869,.931054,-.192238,.323163,.708668,.937303,-.190035,.313529,.737201,.943387,-.187162,.303152,.764977,.948494,-.183876,.29146,.792683,.952546,-.178901,.277917,.819228,.958077,-.173173,.264753,.846559,.962462,-.16645,.25002,.872962,.966569,-.159452,.234873,.898729,.969108,-.15074,.218752,.923126,.973072,-.141523,.202673,.947278,.975452,-.132075,.186326,.969938,.977784,-.121257,.169396,.991325,.97899,-.110182,.153044,1.01123,.979777,-.0989634,.136485,1.0299,.980865,-.0865894,.119343,1.04727,.982432,-.0746115,.102452,1.06341,.984935,-.0621822,.0852423,1.07834,.987776,-.0495694,.0678546,1.092,.99103,-.0372386,.0506917,1.1043,.99474,-.0244353,.0333316,1.11576,.997768,-.0121448,.0164348,1.12617,1.00003,31774e-8,-169504e-9,1.13598,.825551,-756799e-11,.378425,165099e-10,.82664,-190922e-9,.378923,416504e-9,.826323,-763495e-9,.378779,.0016656,.826359,-.00171789,.378795,.00374768,.82636,-.00305402,.378795,.00666259,.826368,-.00477185,.378798,.0104104,.826364,-.00687131,.378795,.0149912,.826368,-.00935232,.378795,.0204054,.826376,-.0122146,.378797,.0266532,.826399,-.0154581,.378803,.0337355,.82646,-.0190825,.378824,.0416537,.826525,-.0230873,.378846,.0504091,.826614,-.0274719,.378876,.0600032,.82674,-.0322355,.378917,.0704393,.826888,-.0373766,.378964,.0817195,.827078,-.0428936,.379024,.0938492,.827318,-.0487778,.379099,.106828,.82764,-.0549935,.379199,.120659,.827926,-.0611058,.379227,.13526,.828325,-.0675054,.379275,.150713,.828801,-.0743455,.379332,.167034,.8294,-.0815523,.379415,.184209,.830094,-.0890779,.379495,.202203,.8309,-.096736,.379555,.220945,.831943,-.104135,.379577,.240306,.833037,-.112106,.379604,.260317,.834278,-.120554,.379668,.2808,.836192,-.129128,.3799,.301654,.838671,-.137541,.380109,.323502,.840939,-.14523,.379809,.347176,.844575,-.15248,.379593,.371706,.848379,-.159607,.37909,.39688,.853616,-.166267,.378617,.422702,.858921,-.172698,.377746,.448919,.865324,-.178823,.376749,.475661,.872207,-.184542,.375363,.502599,.880018,-.189836,.373657,.529914,.88694,-.194294,.370673,.557683,.894779,-.197022,.36662,.586848,.902242,-.199108,.36138,.615831,.909914,-.200398,.355434,.644478,.917088,-.20094,.348173,.672905,.923888,-.200671,.339482,.701327,.930495,-.198773,.32956,.730101,.937247,-.195394,.318363,.758383,.943108,-.191956,.306323,.786539,.948296,-.187227,.292576,.813637,.953472,-.181165,.278234,.840793,.958485,-.174119,.263054,.867712,.962714,-.166564,.246756,.893635,.966185,-.158181,.229945,.919028,.970146,-.148275,.212633,.943413,.973491,-.138157,.195229,.966627,.975741,-.127574,.178048,.988817,.977238,-.11554,.160312,1.00924,.978411,-.10364,.142857,1.02845,.979811,-.0913122,.125317,1.04648,.98116,-.0782558,.107627,1.06284,.983543,-.0655957,.0895862,1.07798,.986789,-.0520411,.0713756,1.092,.990292,-.0389727,.053228,1.10484,.994187,-.025808,.0351945,1.11642,.997499,-.0126071,.0173198,1.12703,.999999,275604e-9,-148602e-9,1.13674,.81075,-78735e-10,.394456,161829e-10,.808692,-198293e-9,.393453,407564e-9,.80846,-792877e-9,.39334,.00162965,.808595,-.00178416,.393407,.00366711,.808597,-.00317182,.393408,.00651934,.808598,-.00495589,.393408,.0101866,.808591,-.00713627,.393403,.0146689,.808592,-.00971285,.393402,.0199667,.80861,-.0126855,.393407,.0260803,.808633,-.0160538,.393413,.0330107,.80868,-.0198175,.393429,.0407589,.808748,-.0239758,.393453,.0493264,.808854,-.0285286,.39349,.0587161,.808992,-.0334748,.39354,.0689304,.809141,-.0388116,.393588,.0799707,.809352,-.0445375,.39366,.0918432,.809608,-.0506427,.393742,.104549,.809915,-.0570708,.393834,.118085,.810253,-.0633526,.393885,.132377,.810687,-.0700966,.393953,.147537,.811233,-.0772274,.394047,.163543,.811865,-.0847629,.394148,.180394,.812648,-.0925663,.394265,.198051,.813583,-.100416,.394363,.216443,.814683,-.108119,.394402,.235502,.815948,-.11644,.394489,.255242,.817278,-.125036,.394542,.275441,.819605,-.133655,.39486,.296094,.822256,-.142682,.395248,.317309,.825349,-.150756,.395241,.340516,.829605,-.158392,.395285,.364819,.83391,-.165801,.394922,.389736,.839808,-.172677,.394691,.415409,.845708,-.179448,.394006,.441546,.853025,-.185746,.393279,.46832,.859666,-.191684,.391655,.495302,.86789,-.197146,.390068,.52262,.875845,-.201904,.38727,.550336,.882634,-.205023,.382688,.578825,.891076,-.207098,.377543,.608103,.900589,-.208474,.371752,.63723,.90791,-.209068,.364016,.665769,.915971,-.208655,.355593,.694428,.923455,-.20729,.345439,.723224,.931514,-.203821,.334099,.751925,.937885,-.19986,.321069,.780249,.943136,-.194993,.306571,.8077,.948818,-.189132,.291556,.83497,.954433,-.181617,.275745,.86188,.959078,-.173595,.258695,.888562,.962705,-.164855,.240825,.914008,.966753,-.155129,.22268,.939145,.970704,-.144241,.204542,.963393,.973367,-.133188,.185927,.985983,.975984,-.121146,.167743,1.00704,.976994,-.108366,.149218,1.02715,.978485,-.0956746,.13131,1.0455,.980074,-.0820733,.112513,1.06221,.98225,-.0684061,.0938323,1.07782,.98553,-.0549503,.0749508,1.09199,.989529,-.0407857,.055848,1.10508,.993536,-.0271978,.0368581,1.11684,.997247,-.0132716,.0181845,1.12789,1,431817e-9,-198809e-9,1.13792,.785886,-812608e-11,.405036,157669e-10,.790388,-205278e-9,.407355,398297e-9,.790145,-820824e-9,.407231,.00159263,.790135,-.00184681,.407226,.00358336,.790119,-.00328316,.407218,.00637039,.790126,-.00512988,.40722,.0099539,.79013,-.00738684,.407221,.0143339,.790135,-.0100538,.407221,.0195107,.790134,-.0131306,.407217,.0254848,.79016,-.0166169,.407224,.0322572,.790197,-.020512,.407236,.0398284,.790273,-.0248157,.407263,.0482014,.790381,-.029527,.407304,.0573777,.790521,-.0346446,.407355,.0673602,.790704,-.0401665,.40742,.0781522,.790925,-.0460896,.407499,.0897582,.791195,-.0524017,.407589,.10218,.791522,-.0590121,.407691,.11541,.791878,-.0654876,.407748,.12939,.792361,-.0725207,.407849,.144237,.792942,-.0799844,.407963,.159924,.79362,-.0877896,.408087,.176425,.794529,-.0958451,.408259,.193733,.795521,-.103827,.408362,.211756,.796778,-.111937,.408482,.230524,.798027,-.120521,.408547,.249967,.799813,-.129242,.408721,.269926,.802387,-.138048,.409148,.290338,.805279,-.147301,.409641,.311193,.809251,-.155895,.410154,.333611,.813733,-.163942,.410297,.357615,.819081,-.171666,.410373,.382339,.825427,-.178905,.410348,.407828,.83172,-.185812,.409486,.434034,.83877,-.192318,.408776,.460493,.845817,-.198249,.407176,.487346,.854664,-.204034,.405719,.514832,.863495,-.208908,.403282,.542401,.871883,-.212765,.399293,.570683,.88065,-.214911,.393803,.599947,.89004,-.216214,.387536,.62932,.898476,-.216745,.379846,.658319,.906738,-.216387,.370625,.687138,.914844,-.215053,.360139,.71601,.923877,-.212007,.348849,.745124,.931925,-.207481,.335639,.773366,.938054,-.202418,.320798,.801636,.943895,-.196507,.304772,.829055,.949468,-.189009,.288033,.856097,.955152,-.180539,.270532,.88301,.959403,-.171437,.251639,.909296,.963309,-.161661,.232563,.934868,.967399,-.150425,.213231,.959662,.972009,-.138659,.194247,.98302,.97433,-.126595,.174718,1.00517,.975823,-.113205,.155518,1.02566,.976371,-.0996096,.136709,1.04418,.978705,-.0860754,.117571,1.06146,.981477,-.0714438,.0980046,1.07777,.984263,-.0572304,.0782181,1.09214,.988423,-.0428875,.0584052,1.10553,.993,-.0282442,.038522,1.11758,.99704,-.0140183,.0190148,1.12864,.999913,369494e-9,-145203e-9,1.13901,.777662,-84153e-10,.423844,154403e-10,.770458,-211714e-9,.419915,38845e-8,.770716,-846888e-9,.420055,.00155386,.770982,-.00190567,.420202,.00349653,.770981,-.00338782,.420201,.00621606,.77098,-.00529338,.4202,.00971274,.770983,-.00762223,.4202,.0139867,.770985,-.0103741,.420198,.0190381,.770996,-.0135489,.4202,.0248677,.771029,-.0171461,.420212,.0314764,.771052,-.0211647,.420215,.0388648,.771131,-.0256048,.420245,.047036,.771235,-.0304647,.420284,.0559911,.771383,-.0357436,.420341,.0657346,.771591,-.0414392,.420423,.0762694,.771819,-.0475462,.420506,.0875984,.772123,-.0540506,.420617,.099727,.772464,-.060797,.42072,.112637,.772855,-.0675393,.420799,.126313,.773317,-.0748323,.420893,.140824,.773981,-.0825681,.421058,.15617,.774746,-.0906307,.421226,.172322,.77566,-.0988982,.421397,.189253,.776837,-.106994,.421569,.206912,.778097,-.115528,.421704,.225359,.779588,-.124317,.421849,.24447,.781574,-.133139,.422097,.264156,.784451,-.142179,.422615,.284318,.787682,-.15165,.423269,.304902,.792433,-.160771,.424396,.3265,.797359,-.169166,.424772,.35014,.803986,-.177149,.425475,.374768,.809504,-.184745,.424996,.399928,.815885,-.19173,.424247,.425796,.823513,-.198525,.423515,.452287,.832549,-.204709,.422787,.479321,.841653,-.210447,.421187,.506718,.850401,-.215501,.418519,.53432,.859854,-.219752,.414715,.56242,.869364,-.222305,.409462,.591558,.878837,-.223744,.402926,.621074,.888636,-.224065,.395043,.650538,.898132,-.223742,.38564,.679538,.907181,-.222308,.375378,.708674,.915621,-.219837,.363212,.737714,.9239,-.215233,.349313,.767014,.931644,-.209592,.334162,.795133,.938887,-.203644,.317943,.823228,.945282,-.196349,.300581,.850822,.950758,-.18742,.282195,.877594,.956146,-.177879,.262481,.904564,.960355,-.167643,.242487,.930741,.965256,-.156671,.222668,.955868,.968029,-.144123,.201907,.979869,.97251,-.131305,.18202,1.00291,.974925,-.118335,.161909,1.02392,.975402,-.103714,.142129,1.0433,.976987,-.089415,.122447,1.06089,.979677,-.0748858,.102248,1.07713,.983184,-.0596086,.0814851,1.09218,.987466,-.0447671,.0609484,1.10585,.992348,-.0295217,.0401835,1.11829,.996674,-.0143917,.0198163,1.12966,1.00003,321364e-9,-149983e-9,1.1402,.757901,-869074e-11,.436176,151011e-10,.751195,-217848e-9,.432317,378533e-9,.751178,-871373e-9,.432307,.0015141,.751195,-.00196061,.432317,.0034068,.751198,-.00348552,.432318,.00605659,.751195,-.00544599,.432315,.00946353,.751207,-.00784203,.43232,.013628,.751213,-.0106732,.43232,.0185499,.751221,-.0139393,.432319,.0242302,.751244,-.0176398,.432325,.0306694,.7513,-.0217743,.432348,.0378698,.751358,-.0263412,.432367,.0458321,.751458,-.0313396,.432404,.0545587,.751608,-.0367682,.432464,.0640543,.7518,-.0426246,.43254,.0743222,.752065,-.0489031,.432645,.0853668,.752376,-.0555828,.432762,.0971911,.752715,-.0623861,.432859,.109768,.753137,-.069415,.432958,.123126,.753676,-.0770039,.433099,.137308,.754345,-.084971,.433272,.15229,.755235,-.0932681,.433504,.168075,.756186,-.10171,.433693,.184625,.757363,-.110019,.433857,.201897,.75884,-.11887,.434102,.220014,.760467,-.127881,.434306,.238778,.762969,-.136766,.434751,.258172,.765823,-.14612,.43529,.278062,.769676,-.15566,.436236,.298437,.774909,-.165177,.437754,.319532,.77994,-.17402,.438343,.342505,.785757,-.182201,.438609,.366693,.792487,-.190104,.438762,.391668,.80038,-.197438,.438795,.417494,.808494,-.204365,.438226,.443933,.817695,-.210714,.437283,.470929,.828111,-.216651,.436087,.498569,.837901,-.221804,.433717,.526165,.847813,-.226318,.430133,.554155,.858314,-.229297,.425213,.582822,.868891,-.230999,.418576,.612847,.878941,-.231155,.410405,.642445,.888809,-.230935,.400544,.672024,.898089,-.229343,.389613,.701366,.908081,-.226886,.377197,.730763,.916819,-.222676,.363397,.759642,.924968,-.216835,.347437,.788775,.932906,-.210245,.32995,.817135,.940025,-.202992,.312262,.844912,.946101,-.19436,.293313,.872164,.952835,-.184125,.273638,.899443,.957347,-.173657,.252385,.926389,.961434,-.162204,.231038,.951947,.965522,-.14979,.209834,.976751,.969412,-.136307,.188821,1.00022,.973902,-.122527,.168013,1.02229,.974045,-.108213,.147634,1.04199,.975775,-.0927397,.12705,1.06019,.978383,-.0778212,.106309,1.07711,.98211,-.0621216,.0849279,1.09245,.986517,-.0463847,.0633519,1.10651,.991696,-.0309353,.0419698,1.11903,.996349,-.0150914,.0206272,1.13073,1.00003,442449e-9,-231396e-9,1.14146,.727498,-885074e-11,.441528,145832e-10,.730897,-223525e-9,.443589,368298e-9,.730796,-893996e-9,.443528,.00147303,.730805,-.00201149,.443533,.00331433,.730814,-.00357596,.443538,.00589222,.730815,-.00558734,.443538,.00920678,.730822,-.00804544,.44354,.0132582,.730836,-.0109501,.443545,.0180468,.730848,-.0143008,.443546,.0235732,.730871,-.0180969,.443552,.0298382,.730915,-.022338,.443567,.0368438,.730982,-.0270225,.443591,.044591,.731076,-.0321491,.443627,.0530831,.731245,-.0377166,.443699,.0623243,.73144,-.0437216,.443777,.0723181,.7317,-.0501576,.443881,.0830691,.732034,-.0569942,.444014,.0945809,.732388,-.0638756,.444113,.106825,.732853,-.071203,.444247,.119859,.733473,-.0790076,.444442,.13369,.734195,-.0871937,.444645,.148304,.735069,-.095696,.444877,.163702,.736169,-.10426,.445133,.179861,.73747,-.112853,.44537,.196778,.738991,-.12199,.445651,.214496,.740865,-.131153,.445958,.232913,.743637,-.140245,.446548,.251977,.746797,-.149722,.447246,.271551,.751517,-.159341,.448656,.291774,.756156,-.169106,.449866,.312455,.761519,-.178436,.450919,.334552,.768295,-.186904,.451776,.358491,.776613,-.195117,.452832,.383446,.783966,-.202695,.45249,.408945,.793542,-.20985,.452587,.435364,.803192,-.216403,.451852,.462336,.813892,-.22251,.450708,.48987,.824968,-.227676,.4486,.517697,.835859,-.232443,.445156,.545975,.846825,-.235775,.440351,.574483,.858085,-.237897,.433641,.604246,.868825,-.238074,.425354,.634101,.879638,-.237661,.415383,.664201,.889966,-.236186,.404136,.693918,.899479,-.233599,.390917,.723481,.908769,-.229737,.376352,.75258,.917966,-.223836,.360372,.781764,.926304,-.217067,.342551,.811139,.934626,-.209309,.324238,.839585,.941841,-.20071,.304484,.867044,.94789,-.190602,.283607,.894579,.954196,-.179253,.262205,.921743,.958383,-.167646,.239847,.948026,.963119,-.155073,.218078,.973296,.966941,-.141426,.195899,.998135,.970836,-.126849,.174121,1.02021,.973301,-.112296,.153052,1.04085,.97448,-.0964965,.131733,1.05946,.977045,-.080489,.10997,1.07693,.980751,-.064844,.0881657,1.09254,.985475,-.0481938,.0657987,1.10697,.991089,-.0319185,.0435215,1.12004,.996122,-.0158088,.0214779,1.13173,1.00001,372455e-9,-200295e-9,1.14291,.708622,-907597e-11,.45304,141962e-10,.711162,-228911e-9,.454662,358052e-9,.709812,-914446e-9,.453797,.00143034,.709865,-.00205819,.453834,.00321935,.709864,-.00365894,.453833,.00572331,.709855,-.00571692,.453826,.00894278,.709862,-.00823201,.453828,.012878,.709875,-.011204,.453832,.0175295,.709896,-.0146323,.453839,.0228978,.709925,-.0185163,.453847,.0289839,.709974,-.0228551,.453866,.0357894,.710045,-.0276473,.453892,.0433161,.710133,-.032891,.453924,.0515665,.710292,-.0385851,.453992,.0605458,.710485,-.0447254,.45407,.0702574,.710769,-.0513051,.454192,.0807077,.711106,-.0582733,.454329,.091896,.711516,-.0652866,.45446,.103814,.712071,-.0728426,.454653,.116508,.712676,-.0808307,.45484,.129968,.713476,-.0892216,.455096,.144206,.714377,-.0979047,.455346,.159212,.715579,-.106531,.455647,.174973,.716977,-.115492,.455961,.191504,.71862,-.124821,.456315,.208835,.72084,-.134079,.4568,.226869,.723786,-.143427,.457521,.245582,.727464,-.153061,.458475,.264957,.732771,-.162768,.460239,.284948,.736515,-.172627,.460899,.30522,.743519,-.182487,.463225,.326717,.750041,-.191295,.464027,.350113,.758589,-.199746,.465227,.374782,.767703,-.207584,.465877,.400226,.777484,-.214973,.465996,.426442,.788792,-.221796,.466019,.453688,.800194,-.228038,.465083,.481246,.811234,-.233346,.462506,.509086,.822859,-.238073,.459257,.537338,.835082,-.241764,.454863,.566108,.846332,-.244241,.448163,.595126,.858355,-.244736,.439709,.625574,.87034,-.244278,.429837,.65617,.881027,-.24255,.418002,.686029,.891007,-.239912,.404325,.716039,.900874,-.236133,.389222,.745518,.911072,-.230672,.373269,.775026,.920359,-.22356,.355083,.804521,.928604,-.215591,.335533,.834045,.937175,-.206503,.315278,.861612,.942825,-.196684,.293653,.889131,.949805,-.185116,.271503,.916853,.955535,-.172703,.248821,.943541,.959843,-.159978,.225591,.970132,.964393,-.146375,.202719,.994709,.968008,-.131269,.179928,1.0186,.971013,-.11569,.158007,1.03928,.973334,-.1003,.13624,1.05887,.975775,-.0833352,.1138,1.07652,.979579,-.0668981,.0913141,1.09297,.984323,-.0500902,.0683051,1.10734,.990351,-.0332377,.0451771,1.12084,.995823,-.0161491,.0221705,1.13296,1.0001,234083e-9,-108712e-9,1.14441,.683895,-924677e-11,.46015,137429e-10,.68833,-233383e-9,.463134,346865e-9,.688368,-933547e-9,.463159,.00138748,.688367,-.00210049,.463159,.00312187,.688369,-.00373415,.463159,.00555004,.688377,-.00583449,.463163,.00867216,.688386,-.00840128,.463166,.0124884,.688398,-.0114343,.463169,.0169993,.688418,-.0149329,.463175,.0222054,.688453,-.0188964,.463188,.028108,.688515,-.0233239,.463214,.0347085,.68857,-.0282136,.463231,.0420091,.688679,-.033564,.463276,.0500132,.688854,-.0393733,.463356,.0587255,.689038,-.0456354,.46343,.0681476,.689321,-.0523433,.463553,.0782897,.689662,-.059412,.463693,.0891501,.690188,-.0665736,.4639,.100735,.690755,-.0743106,.464107,.113074,.691405,-.0824722,.464329,.126161,.692198,-.0910484,.464585,.140007,.693196,-.0998778,.464893,.154612,.69454,-.108651,.465285,.169984,.695921,-.117855,.465596,.186106,.697749,-.12734,.466056,.203034,.700375,-.136714,.466771,.220703,.703395,-.146386,.467579,.239062,.707904,-.156096,.469067,.258188,.711673,-.165904,.469851,.277759,.717489,-.175812,.471815,.297935,.724051,-.185931,.47389,.318916,.731965,-.195238,.47587,.341591,.741151,-.204021,.477523,.366062,.751416,-.212113,.478881,.391396,.761848,-.21979,.479226,.417599,.771886,-.2267,.478495,.444401,.783998,-.232991,.477622,.472084,.796523,-.238645,.475833,.500193,.808851,-.243396,.472568,.52865,.821191,-.247226,.467857,.557362,.834261,-.250102,.461871,.586768,.846762,-.251056,.453543,.617085,.859867,-.250604,.443494,.647659,.871948,-.248783,.431711,.678119,.882967,-.245855,.417911,.708399,.892826,-.242168,.401993,.738256,.90332,-.237062,.385371,.767999,.913633,-.22997,.366837,.798191,.922774,-.221687,.346372,.827756,.931371,-.212345,.325682,.856425,.938929,-.20206,.303665,.884299,.944821,-.190981,.280786,.912023,.951792,-.178065,.2573,.939669,.957712,-.164634,.233448,.96655,.961912,-.150863,.209504,.992366,.966382,-.13577,.18597,1.01633,.969588,-.119593,.162905,1.03843,.971777,-.103203,.14053,1.05841,.97433,-.0865888,.117909,1.07632,.978686,-.0690829,.0944101,1.09326,.983281,-.0516568,.0705671,1.10796,.989562,-.034558,.0468592,1.12182,.995465,-.0167808,.0229846,1.1342,.999991,373016e-9,-235606e-9,1.1459,.662251,-939016e-11,.468575,132714e-10,.666634,-237624e-9,.471675,335842e-9,.666411,-950385e-9,.471516,.00134321,.666399,-.00213833,.471509,.00302221,.666386,-.0038014,.471499,.00537283,.666405,-.00593958,.471511,.00839533,.666406,-.00855253,.471508,.0120898,.666428,-.0116401,.471519,.0164569,.666444,-.0152015,.471522,.0214971,.66649,-.0192362,.471543,.027212,.666537,-.0237428,.471558,.033603,.666617,-.0287198,.471591,.0406728,.666718,-.0341647,.471631,.0484238,.666889,-.0400759,.47171,.0568621,.667104,-.0464479,.471805,.0659915,.667374,-.0532677,.471923,.0758178,.667772,-.0603805,.472098,.0863425,.668371,-.0677392,.472363,.0975917,.668971,-.0756028,.472596,.109567,.669696,-.0839293,.472869,.122272,.670481,-.0926683,.473126,.135718,.6715,-.1016,.473442,.149914,.672911,-.110566,.47389,.164882,.674512,-.119984,.474354,.180602,.67651,-.129574,.474922,.19711,.679292,-.139106,.475764,.214371,.682798,-.148993,.476886,.232405,.686955,-.158737,.478179,.251153,.691406,-.168754,.479432,.270436,.697438,-.178703,.481481,.290374,.704761,-.188955,.484143,.311044,.713599,-.198814,.487007,.333003,.723194,-.207869,.488962,.357144,.732601,-.216189,.489815,.382169,.744193,-.22398,.490888,.408227,.754907,-.231156,.490355,.434928,.767403,-.23747,.489548,.462599,.78107,-.243503,.488274,.490908,.793893,-.248114,.484843,.519421,.807296,-.25222,.4803,.548561,.820529,-.255265,.474097,.577772,.833716,-.256741,.466041,.607782,.848403,-.25637,.456547,.638807,.860755,-.254804,.443946,.670058,.874012,-.251834,.430852,.700749,.885619,-.247867,.414903,.731446,.896069,-.242634,.397276,.761191,.906266,-.236093,.378535,.791053,.916759,-.227543,.358038,.821298,.92523,-.21783,.335705,.850747,.93436,-.207534,.313797,.879258,.941631,-.195983,.289671,.907734,.947564,-.183567,.265319,.935206,.953681,-.169345,.240815,.962739,.960008,-.154909,.216119,.989227,.964145,-.140161,.192096,1.01465,.968171,-.123411,.167855,1.03737,.969859,-.106525,.144817,1.05767,.972666,-.0891023,.12149,1.0761,.977055,-.0718094,.0975306,1.09336,.982527,-.0534213,.0730217,1.10878,.989001,-.0355579,.0483366,1.12285,.99512,-.0176383,.023938,1.13548,1.00007,368831e-9,-211581e-9,1.14744,.651047,-960845e-11,.484101,12922e-9,.644145,-241347e-9,.478968,324578e-9,.64396,-965142e-9,.478831,.00129798,.64396,-.00217154,.47883,.00292046,.643968,-.00386049,.478835,.00519202,.643974,-.00603186,.478838,.0081128,.643977,-.0086854,.478836,.011683,.643982,-.0118207,.478834,.0159031,.644024,-.0154374,.478856,.0207743,.644059,-.0195343,.478868,.0262975,.644122,-.0241103,.478896,.0324747,.644207,-.0291638,.478933,.039309,.64432,-.0346919,.478981,.0468029,.644481,-.0406919,.479053,.0549614,.644722,-.047159,.479169,.0637909,.645013,-.0540748,.479302,.0732974,.645503,-.0612001,.479541,.0834898,.646117,-.0687303,.479829,.0943873,.646707,-.0767846,.480061,.105991,.647431,-.0852465,.480343,.11831,.64831,-.0940719,.48066,.131348,.649486,-.103056,.481083,.14514,.650864,-.112261,.481528,.159676,.652604,-.121852,.482102,.174979,.654825,-.131505,.482813,.191079,.657876,-.141189,.483876,.207927,.661339,-.151239,.48499,.225586,.665463,-.161091,.486279,.243947,.670542,-.171235,.487968,.262957,.677361,-.181347,.49053,.282781,.685672,-.191679,.493862,.303311,.694551,-.201781,.49699,.324607,.703753,-.211164,.498884,.347916,.713703,-.219675,.500086,.372628,.725911,-.227836,.501554,.398694,.73862,-.23533,.502193,.425529,.752118,-.241786,.501811,.453209,.76579,-.247865,.500185,.481381,.779568,-.252696,.497159,.51011,.793991,-.256802,.492765,.539322,.808182,-.259942,.486827,.569078,.821698,-.261703,.478386,.598818,.836009,-.262006,.468772,.629762,.849824,-.260333,.456352,.661366,.863888,-.257398,.442533,.69295,.876585,-.253264,.426573,.723608,.888665,-.248026,.408964,.754378,.899537,-.241487,.389677,.784761,.9094,-.233463,.368516,.814688,.920166,-.223397,.346624,.845009,.928899,-.21255,.322717,.874431,.937156,-.200869,.298698,.902922,.943861,-.188387,.273491,.931356,.949557,-.174341,.247866,.958854,.955862,-.158994,.222496,.986098,.961721,-.143664,.197522,1.01229,.965976,-.127412,.17302,1.03571,.968652,-.109798,.148954,1.05699,.971084,-.0916787,.125044,1.07587,.975584,-.0739634,.100577,1.09372,.98122,-.055322,.0753666,1.10948,.988253,-.0366825,.0498899,1.12394,.99482,-.0180389,.024611,1.13694,1.00001,229839e-9,-188283e-9,1.14919,.613867,-964198e-11,.479449,123452e-10,.621485,-244534e-9,.485399,313091e-9,.621429,-978202e-9,.485353,.00125245,.62112,-.00220004,.485114,.00281687,.621119,-.0039111,.485112,.00500783,.621122,-.00611091,.485112,.00782498,.621133,-.00879922,.485117,.0112687,.621152,-.0119756,.485125,.0153394,.621183,-.0156396,.485139,.0200382,.621227,-.0197898,.485158,.0253663,.621298,-.0244253,.485192,.0313261,.621388,-.0295441,.485233,.0379204,.621507,-.0351432,.485286,.0451523,.621693,-.0412198,.485378,.0530277,.621933,-.0477673,.485495,.0615522,.622232,-.0547574,.485635,.0707316,.622809,-.0619417,.485943,.0805883,.623407,-.069625,.486232,.0911267,.62406,-.077796,.486516,.102354,.624835,-.0863731,.486838,.114279,.625758,-.095251,.487188,.126902,.627043,-.104299,.487695,.140285,.628438,-.113724,.488163,.154397,.630325,-.123417,.488858,.169267,.632801,-.133137,.489754,.184941,.635784,-.143052,.490815,.20136,.639406,-.153132,.492048,.218643,.643872,-.163143,.49363,.236615,.6499,-.17333,.496009,.255449,.657201,-.183622,.498994,.275006,.666221,-.194019,.502888,.295354,.674419,-.204192,.505459,.316244,.683729,-.21406,.507771,.33849,.695584,-.222854,.510245,.363166,.708583,-.231315,.512293,.389071,.721233,-.238911,.512747,.415737,.735134,-.245657,.512482,.443331,.750179,-.251879,.511526,.471891,.765073,-.256911,.508935,.500892,.779794,-.261144,.504341,.530294,.794801,-.264316,.498515,.560144,.810339,-.266276,.491015,.590213,.824818,-.266981,.481126,.620865,.839375,-.265778,.468685,.652687,.853043,-.262748,.453925,.684759,.867335,-.258474,.437912,.716209,.88037,-.253187,.419648,.747508,.891711,-.246476,.39982,.77797,.902896,-.238735,.37879,.808586,.913601,-.22885,.355891,.838843,.923019,-.217656,.331773,.869014,.933432,-.205539,.307356,.898512,.939691,-.192595,.281321,.9269,.946938,-.178945,.255441,.955297,.952372,-.163587,.229013,.983231,.95909,-.147214,.203179,1.00971,.963675,-.13064,.17792,1.03438,.968247,-.113121,.152898,1.05625,.97001,-.0945824,.128712,1.07598,.974458,-.0755648,.103349,1.094,.980168,-.0571998,.0776731,1.1104,.987295,-.0377994,.0514445,1.12491,.994432,-.0186417,.025429,1.13851,.999975,542714e-9,-282356e-9,1.15108,.592656,-980249e-11,.486018,119532e-10,.598467,-247275e-9,.490781,301531e-9,.597934,-988317e-9,.490343,.00120517,.597903,-.00222366,.490319,.0027116,.597913,-.00395315,.490327,.00482077,.597919,-.00617653,.490329,.00753264,.597936,-.00889375,.490339,.0108478,.597956,-.0121043,.490347,.0147668,.597992,-.0158073,.490365,.0192905,.598032,-.0200017,.490382,.0244204,.598109,-.0246865,.49042,.0301593,.598215,-.0298594,.490474,.03651,.59833,-.0355167,.490524,.0434757,.598525,-.0416559,.490624,.0510629,.598778,-.0482692,.490753,.0592781,.599135,-.0553114,.49094,.0681304,.599802,-.062542,.491328,.0776467,.600361,-.0703638,.491598,.0878184,.60101,-.0786256,.491882,.0986573,.601811,-.0872962,.492232,.11018,.602861,-.0962284,.492684,.1224,.604167,-.10538,.493213,.135354,.605693,-.114896,.493799,.149034,.607682,-.124654,.494576,.163469,.610672,-.13456,.4959,.178747,.613313,-.144581,.496713,.194723,.617603,-.154703,.498499,.211617,.622174,-.16489,.500188,.229183,.628855,-.175164,.503072,.247786,.636963,-.185565,.506798,.267116,.644866,-.195911,.509719,.28702,.653741,-.206104,.512776,.307763,.664942,-.216447,.516812,.329631,.67633,-.22552,.519181,.353515,.690012,-.234316,.521681,.379226,.704243,-.242032,.523129,.405901,.719396,-.249172,.523768,.433585,.734471,-.255543,.522541,.462085,.750539,-.260697,.520217,.491233,.766365,-.26501,.516293,.521094,.781677,-.268409,.509708,.551014,.797132,-.270399,.501944,.581463,.812655,-.271247,.492025,.612402,.828592,-.270708,.480424,.643798,.844044,-.268085,.465955,.67682,.857305,-.263459,.448425,.708496,.87114,-.258151,.430243,.74046,.884936,-.251171,.410578,.771583,.895772,-.243305,.38862,.802234,.906961,-.234037,.365214,.833179,.917775,-.222714,.34116,.86353,.927883,-.210175,.31572,.893557,.936617,-.196925,.289159,.922976,.943384,-.182788,.261996,.951606,.949713,-.167965,.235324,.979958,.955818,-.151109,.208408,1.00765,.961344,-.133834,.182591,1.03329,.965469,-.115987,.156958,1.0557,.968693,-.09746,.132239,1.07583,.973165,-.0778514,.106195,1.09451,.979387,-.0585067,.0797669,1.11137,.98671,-.0390409,.0530263,1.12643,.994093,-.019408,.0263163,1.14016,1.00002,540029e-9,-194487e-9,1.15299,.574483,-989066e-11,.494533,114896e-10,.574478,-249127e-9,.494528,289403e-9,.574607,-996811e-9,.494637,.00115797,.574396,-.00224241,.494458,.00260498,.574377,-.00398632,.49444,.00463102,.574386,-.00622836,.494445,.00723623,.574401,-.0089683,.494453,.010421,.574419,-.0122056,.49446,.0141859,.574459,-.0159396,.494481,.0185322,.574525,-.0201692,.49452,.0234617,.574587,-.0248924,.494547,.0289762,.574697,-.0301074,.494604,.0350797,.574853,-.0358114,.494688,.0417767,.575027,-.041999,.494772,.0490718,.575294,-.0486618,.494915,.0569728,.575733,-.0557148,.495173,.0654955,.576356,-.0630489,.495537,.0746612,.576944,-.0709285,.495836,.0844615,.57765,-.0792723,.496177,.0949142,.578491,-.0880167,.496563,.10603,.579639,-.0969462,.497096,.117841,.580989,-.10622,.497684,.130367,.582587,-.115861,.498337,.143609,.584951,-.125605,.499414,.157625,.587602,-.135608,.500518,.172413,.59076,-.145742,.501767,.187999,.594992,-.155934,.503542,.20445,.600656,-.166303,.506135,.221764,.607816,-.176681,.509542,.24002,.61522,-.187071,.51263,.258992,.623702,-.197465,.516021,.278773,.634192,-.207816,.520422,.299377,.644936,-.218183,.524073,.320802,.657888,-.2278,.528049,.34384,.670666,-.236747,.52986,.36916,.685626,-.24484,.531892,.395867,.701304,-.252071,.532727,.423488,.717727,-.258714,.532146,.452201,.733914,-.264211,.529883,.481579,.750529,-.26859,.5259,.511558,.76747,-.272046,.51999,.542042,.785189,-.274225,.513083,.572799,.800954,-.275189,.502936,.603816,.816962,-.274946,.490921,.635461,.83336,-.272695,.47684,.6676,.848143,-.268223,.459405,.70051,.861818,-.262768,.440319,.732902,.876828,-.255872,.420123,.765084,.889312,-.247703,.398379,.796391,.900412,-.238381,.374496,.827333,.912251,-.227783,.349874,.858385,.921792,-.214832,.323181,.888652,.931273,-.200949,.296624,.917763,.940295,-.186537,.269211,.947878,.946812,-.171538,.241447,.977016,.953588,-.155254,.213829,1.00501,.958841,-.137156,.186807,1.03179,.963746,-.118699,.160706,1.05502,.966468,-.0998358,.135504,1.07568,.971178,-.0805186,.109131,1.09479,.97831,-.0599348,.0818293,1.1123,.985886,-.0399661,.0545872,1.12771,.994021,-.0198682,.0269405,1.14186,1.00009,271022e-9,-12989e-8,1.15514,.538716,-990918e-11,.486732,109675e-10,.550656,-250642e-9,.497518,277412e-9,.55057,-.00100265,.497441,.00110974,.550903,-.00225672,.497733,.00249779,.550568,-.00401046,.497438,.00443906,.550574,-.00626613,.49744,.00693637,.550591,-.0090226,.497449,.00998921,.550623,-.0122795,.497469,.0135984,.550667,-.0160361,.497495,.0177654,.550724,-.0202908,.497526,.0224915,.550792,-.0250421,.497557,.0277795,.550918,-.0302878,.49763,.0336334,.551058,-.0360241,.497701,.0400573,.551276,-.0422473,.497824,.0470585,.551551,-.0489441,.497977,.0546433,.552074,-.0559596,.498312,.0628367,.552681,-.0633978,.498679,.071646,.553324,-.0713176,.499031,.0810746,.554011,-.0797268,.499365,.091129,.55488,-.0885238,.499779,.101837,.556171,-.0974417,.500444,.113239,.557498,-.106841,.501025,.125316,.559299,-.116533,.501864,.138128,.561647,-.126298,.502967,.151695,.564347,-.136388,.504129,.16604,.567863,-.146576,.505713,.181207,.572569,-.156832,.507953,.197259,.578919,-.167323,.511186,.214258,.585387,-.177712,.514042,.232038,.593134,-.188184,.517484,.250733,.603295,-.198717,.522345,.270454,.613854,-.209177,.526751,.290807,.626092,-.219644,.531595,.312202,.637868,-.229494,.534721,.334435,.652458,-.238718,.538304,.359184,.666985,-.247061,.539875,.385637,.683301,-.254652,.541042,.41328,.69998,-.261376,.540735,.441903,.717824,-.267085,.539139,.471609,.734617,-.271465,.534958,.501446,.753663,-.27528,.53032,.532571,.770512,-.277617,.522134,.563641,.787356,-.278525,.51206,.595067,.806252,-.278512,.50119,.627226,.822061,-.277023,.486791,.659402,.838959,-.273175,.470467,.692874,.85379,-.267238,.450688,.725702,.868268,-.260327,.429741,.75832,.881994,-.251946,.407223,.790189,.893885,-.242432,.383214,.821625,.905118,-.231904,.357297,.853011,.916045,-.219545,.330733,.883773,.927614,-.205378,.303916,.914435,.936005,-.190388,.275941,.944502,.944533,-.1749,.247493,.974439,.950758,-.158588,.218996,1.00286,.957078,-.141027,.191559,1.0304,.962448,-.121507,.164457,1.05466,.964993,-.102068,.138636,1.0761,.970017,-.0822598,.111861,1.09541,.97661,-.062033,.0843438,1.11317,.985073,-.0409832,.0558496,1.12911,.993515,-.020146,.0275331,1.1438,1.00006,27329e-8,-107883e-9,1.15736,.525324,-999341e-11,.498153,105385e-10,.526513,-251605e-9,.499277,265329e-9,.526517,-.00100641,.499282,.0010613,.526588,-.00226466,.499337,.00238823,.526539,-.0040255,.499302,.00424535,.526547,-.00628954,.499306,.00663364,.526561,-.00905628,.499313,.00955337,.526593,-.0123253,.499334,.0130054,.526642,-.0160957,.499365,.0169911,.5267,-.0203661,.499396,.0215122,.526792,-.0251347,.499451,.0265718,.526904,-.0303985,.499511,.0321732,.527079,-.0361554,.499617,.0383231,.527285,-.0423982,.499731,.045026,.527602,-.0491121,.499924,.0522936,.528166,-.0561127,.500306,.0601528,.52879,-.0635988,.5007,.0686059,.529421,-.071581,.501048,.0776518,.530144,-.0799854,.501421,.0873148,.531062,-.0888032,.501884,.0976084,.532374,-.0977643,.50259,.108588,.533828,-.107197,.50329,.120234,.53581,-.116887,.504312,.132602,.538063,-.126755,.505365,.145721,.5409,-.136819,.506668,.159617,.544882,-.147117,.508731,.174369,.550238,-.157446,.511601,.190028,.556038,-.167988,.514431,.206587,.563031,-.178364,.517808,.224046,.571543,-.189007,.521937,.242503,.582255,-.199546,.527415,.261977,.59272,-.210084,.531682,.282162,.605648,-.220448,.537123,.303426,.61785,-.230593,.540664,.325323,.632223,-.240238,.544467,.348993,.648819,-.24887,.547594,.375462,.665825,-.256657,.54912,.403024,.683389,-.263711,.549294,.431773,.701495,-.269666,.547649,.461494,.719197,-.274169,.543786,.491623,.737906,-.278124,.538644,.522994,.756652,-.280632,.531057,.554775,.775279,-.281741,.521972,.586441,.792688,-.281652,.509613,.618596,.811894,-.280345,.496497,.651462,.827938,-.277128,.47968,.684023,.844837,-.271646,.460688,.718024,.859239,-.264397,.438872,.751207,.874088,-.256144,.41577,.784232,.887693,-.246311,.391369,.816191,.899402,-.235497,.365872,.847828,.910973,-.223631,.338618,.87934,.92204,-.209874,.310803,.910325,.930987,-.194265,.281802,.940695,.94,-.178125,.252836,.970958,.948018,-.161479,.224239,1.00078,.955141,-.144038,.195857,1.0288,.960513,-.124915,.168487,1.05371,.963964,-.104284,.141495,1.07596,.968713,-.0838732,.114437,1.09628,.975524,-.0635579,.0863105,1.11448,.98431,-.042291,.0574774,1.13069,.992916,-.0209131,.0284343,1.14568,.999926,743097e-9,-379265e-9,1.15955,.501042,-998428e-11,.498726,100306e-10,.502992,-252112e-9,.500665,253283e-9,.502417,-.00100791,.500092,.00101259,.502965,-.00226919,.500621,.00227978,.502318,-.00403109,.499994,.00405011,.502333,-.00629832,.500005,.00632868,.502362,-.00906907,.500027,.00911446,.502369,-.0123423,.500023,.0124078,.50243,-.0161178,.500066,.016211,.502493,-.0203937,.500103,.0205256,.502592,-.0251684,.500166,.0253548,.502707,-.0304389,.50023,.0307029,.502881,-.0362015,.500335,.0365753,.503124,-.0424507,.500488,.0429798,.503443,-.0491582,.500686,.0499268,.504083,-.0561476,.501155,.0574541,.504668,-.0636846,.501524,.0655408,.505319,-.0716834,.501904,.0742072,.50609,-.0800925,.502321,.0834699,.507122,-.0888425,.502896,.0933603,.508414,-.097855,.503603,.10391,.509955,-.107304,.504416,.115113,.512061,-.116921,.505565,.127054,.514419,-.12689,.506732,.139709,.517529,-.136934,.508338,.153173,.522085,-.147327,.510987,.167528,.526986,-.157612,.513527,.182708,.533122,-.168213,.516717,.198881,.540807,-.178688,.520832,.215986,.550687,-.189511,.52632,.234335,.560567,-.199998,.531009,.253375,.571698,-.210652,.535839,.273499,.584364,-.220917,.541091,.294355,.599066,-.23137,.546875,.316525,.614148,-.241206,.551306,.339671,.631157,-.250379,.555187,.36531,.647919,-.258397,.556595,.392767,.666112,-.265528,.556949,.421397,.686158,-.271827,.556617,.451433,.704838,-.27674,.552975,.482131,.723957,-.280733,.547814,.513458,.74262,-.283359,.53997,.545446,.762009,-.284541,.530422,.57775,.781314,-.284507,.518546,.610434,.799116,-.283309,.504178,.643178,.817604,-.280378,.48843,.676248,.83459,-.275619,.469457,.709698,.850974,-.26856,.447698,.744245,.866747,-.260094,.424791,.777695,.881412,-.249929,.399913,.810392,.8936,-.239137,.37308,.842872,.905943,-.226818,.345705,.874677,.916408,-.213699,.31706,.906257,.927215,-.198428,.288444,.936881,.935625,-.181643,.258329,.96795,.944076,-.164386,.228488,.998216,.951229,-.146339,.199763,1.02689,.958793,-.127709,.172153,1.0535,.963219,-.107244,.144989,1.07646,.967562,-.0857764,.11685,1.09675,.974866,-.0645377,.0880571,1.11576,.983353,-.0431732,.0587352,1.13227,.992503,-.0218356,.0294181,1.1478,1.00003,605203e-9,-231013e-9,1.16207,.482935,-101177e-10,.504695,968142e-11,.477554,-251521e-9,.499071,240676e-9,.477904,-.00100683,.499436,96342e-8,.478368,-.00226636,.499899,.0021687,.477977,-.00402719,.499513,.00385384,.477993,-.00629226,.499525,.0060221,.478011,-.00906011,.499536,.00867289,.478051,-.0123305,.499566,.0118074,.478089,-.016102,.499587,.0154269,.478171,-.0203736,.499645,.0195341,.478254,-.025143,.499692,.0241318,.47839,-.0304071,.499779,.0292247,.478588,-.0361631,.499911,.0348196,.478812,-.0424023,.500046,.0409231,.479208,-.0490724,.500326,.047552,.479841,-.0560722,.500805,.0547377,.480392,-.0636125,.501152,.0624607,.481068,-.0716134,.501561,.0707473,.481898,-.0800062,.502054,.0796118,.483022,-.0886568,.502728,.0890974,.484332,-.0977553,.503479,.0992099,.486126,-.107173,.504546,.10999,.488066,-.11677,.50557,.121476,.490521,-.126725,.506849,.133672,.494232,-.136793,.50911,.146731,.498302,-.147116,.511345,.160577,.503565,-.157446,.514344,.175335,.510902,-.168121,.518824,.191207,.519263,-.178799,.523666,.208058,.528204,-.189407,.528296,.225875,.538854,-.200145,.533724,.244782,.551278,-.210701,.539833,.264753,.565222,-.221303,.546131,.285745,.579403,-.231688,.551496,.307592,.595469,-.241718,.556809,.330582,.610929,-.250992,.559641,.354995,.629433,-.259602,.562379,.382471,.648504,-.267038,.563676,.411126,.66756,-.273388,.562092,.440924,.689143,-.278788,.560807,.472118,.709056,-.282783,.555701,.503774,.729855,-.285836,.548698,.536364,.748954,-.287078,.538544,.56895,.768373,-.287133,.526711,.601991,.78827,-.285839,.512511,.635403,.807465,-.283238,.496323,.668797,.825194,-.27906,.477638,.702584,.842203,-.272286,.456253,.736393,.857749,-.263854,.432412,.77096,.874799,-.253943,.407806,.80489,.887497,-.24237,.38033,.83771,.89966,-.230278,.352446,.870376,.911753,-.21646,.323268,.902256,.923011,-.202071,.294314,.933306,.932375,-.185519,.264104,.965177,.940537,-.167604,.234035,.996303,.948904,-.149068,.20412,1.0261,.955263,-.129539,.175431,1.05304,.960303,-.109932,.148116,1.07617,.965512,-.0880572,.119693,1.09742,.973466,-.0660548,.0901619,1.11721,.98284,-.0439228,.0599875,1.13436,.992216,-.0219588,.0298975,1.15006,.999946,119402e-9,-208547e-10,1.16471,.447827,-100414e-10,.491543,914833e-11,.454778,-251257e-9,.499172,22891e-8,.453519,-.00100342,.497787,914184e-9,.45357,-.00225776,.497847,.00205701,.453578,-.00401371,.497855,.00365705,.45357,-.00627107,.497841,.00571453,.453598,-.00902968,.497864,.00823019,.453627,-.0122888,.497882,.0112049,.453684,-.0160475,.497923,.0146405,.453764,-.0203044,.49798,.0185394,.453866,-.0250576,.498049,.0229054,.453996,-.0303028,.49813,.0277424,.454196,-.0360379,.498267,.0330587,.454457,-.0422521,.498445,.0388613,.454926,-.0488393,.498812,.0451767,.455525,-.0558653,.499272,.0520153,.456074,-.0633772,.499625,.0593754,.456752,-.0713606,.500049,.0672751,.457648,-.07971,.500615,.0757447,.458849,-.0883032,.501399,.0848231,.46029,-.0974095,.502293,.0945135,.462,-.106729,.503301,.104848,.464121,-.116354,.504533,.115884,.466889,-.126214,.506172,.127652,.470744,-.136324,.508667,.14024,.47488,-.146595,.510995,.153673,.480845,-.157027,.514832,.168053,.488262,-.167658,.519506,.183508,.496547,-.178343,.524347,.199948,.506254,-.188916,.52983,.217503,.517961,-.199975,.536357,.236272,.531484,-.210624,.543641,.256096,.545496,-.221227,.550048,.277085,.559497,-.231568,.555076,.298615,.575752,-.241698,.560541,.321547,.591999,-.251172,.564156,.345602,.610654,-.260178,.567607,.371851,.630484,-.268094,.56923,.40076,.651807,-.274661,.569779,.430801,.67239,-.280331,.566791,.461939,.693024,-.284501,.562007,.493854,.715473,-.287852,.555791,.526992,.736323,-.28929,.546345,.560102,.755771,-.289405,.534,.593543,.775424,-.2881,.519114,.627256,.795447,-.285562,.502543,.661464,.815319,-.281416,.484773,.695206,.831769,-.275523,.463445,.729044,.849464,-.267516,.440269,.764069,.866775,-.257584,.415049,.799089,.881252,-.245817,.388049,.831948,.894209,-.233127,.35889,.865526,.906922,-.219579,.329915,.89818,.919686,-.204491,.300441,.930013,.929044,-.188962,.269445,.962061,.938393,-.171079,.238402,.994214,.94661,-.15199,.208204,1.02533,.953095,-.131953,.178653,1.0529,.958644,-.111233,.150684,1.0771,.963925,-.0903098,.122359,1.09855,.971995,-.0680505,.0923342,1.11874,.981658,-.0448512,.0614195,1.13635,.991649,-.0221931,.0303582,1.15238,.999985,393403e-9,-111086e-9,1.16772,.396806,-971563e-11,.457671,842355e-11,.429186,-249421e-9,.495017,21625e-8,.429324,-998052e-9,.495173,865322e-9,.429175,-.00224487,.494999,.00194637,.429129,-.00399041,.494952,.00346004,.429153,-.00623476,.494974,.00540684,.429168,-.0089773,.494983,.00778714,.429207,-.0122175,.495012,.0106022,.429257,-.0159542,.495047,.0138535,.429338,-.0201864,.495106,.0175443,.429431,-.0249104,.495165,.0216774,.429587,-.0301252,.495279,.0262594,.429796,-.0358249,.495432,.0312968,.430065,-.0419972,.495621,.0367985,.430588,-.0485144,.496061,.042798,.43113,-.0555028,.496472,.0492914,.431743,-.0629852,.496904,.0562907,.432448,-.0709256,.497369,.0638056,.433414,-.0791942,.498032,.071885,.434638,-.0877346,.498854,.0805517,.43611,-.0968056,.499812,.0898047,.437859,-.106002,.500891,.0997142,.440017,-.115648,.502198,.110289,.443236,-.125427,.504389,.121644,.44697,-.135492,.506809,.133769,.451689,-.145746,.509858,.146787,.45811,-.156219,.514247,.160793,.465305,-.166834,.518816,.175791,.474085,-.177546,.524331,.191906,.484808,-.188262,.53104,.209199,.49732,-.199346,.538511,.227825,.509693,-.209951,.544554,.247269,.524367,-.220533,.551616,.267978,.539228,-.231082,.557368,.289672,.55644,-.241342,.563782,.31268,.574204,-.250964,.568851,.33651,.593388,-.260306,.57312,.362219,.613358,-.268667,.574916,.390322,.634512,-.275591,.575053,.420478,.65563,-.281328,.572404,.451614,.678265,-.285948,.568893,.484112,.70011,-.289408,.561878,.517348,.723005,-.291328,.55359,.551355,.743744,-.291418,.541099,.585109,.763949,-.290252,.526489,.619487,.784186,-.287648,.509496,.65404,.804304,-.283782,.491484,.688649,.823629,-.278067,.470517,.723133,.84094,-.270588,.44705,.757163,.857852,-.261188,.421252,.792816,.874934,-.249313,.394191,.827248,.888709,-.236492,.365359,.861074,.902589,-.222185,.336016,.894417,.914201,-.207314,.30527,.926825,.925978,-.191146,.274532,.9595,.93512,-.174135,.243393,.991583,.943656,-.155231,.212414,1.02356,.951719,-.134403,.182005,1.05239,.957164,-.113023,.153043,1.07754,.962656,-.0914493,.124186,1.09984,.970695,-.0694179,.0941654,1.12,.980749,-.0466199,.0629671,1.13849,.991205,-.0227032,.0311146,1.15494,.999884,632388e-9,-254483e-9,1.1706,.379821,-957289e-11,.460637,789337e-11,.405188,-247483e-9,.491396,204064e-9,.404796,-989434e-9,.490914,815853e-9,.40483,-.00222607,.490949,.00183559,.40473,-.00395723,.49084,.00326332,.404731,-.00618287,.490836,.00509945,.404768,-.00890258,.490871,.00734463,.404791,-.0121156,.490883,.00999992,.404857,-.0158214,.490938,.0130676,.404943,-.0200178,.491004,.0165503,.405059,-.0247027,.491093,.0204521,.405213,-.0298729,.491205,.0247788,.405399,-.0355226,.491333,.0295373,.405731,-.0416352,.491604,.034741,.406303,-.0480807,.492116,.0404255,.406814,-.0550458,.492506,.0465732,.407404,-.0624652,.492926,.0532058,.408149,-.0702958,.493442,.0603442,.409128,-.0784623,.494136,.0680297,.410408,-.087007,.495054,.0762786,.411813,-.0959639,.495962,.0851046,.413735,-.105075,.497257,.0945878,.416137,-.114646,.498882,.104725,.41934,-.124394,.501132,.11563,.423326,-.134328,.503883,.127325,.428419,-.14458,.50747,.139911,.43484,-.154979,.511964,.153481,.442641,-.165628,.517328,.168114,.452511,-.176365,.524258,.183995,.463473,-.187298,.531248,.200953,.475564,-.198244,.538367,.219176,.488664,-.208938,.545175,.238514,.504073,-.219599,.553227,.259129,.520832,-.230378,.560653,.280997,.538455,-.240703,.567523,.303821,.55709,-.250548,.573287,.327948,.576646,-.259964,.577795,.353362,.596705,-.268721,.580077,.380336,.618053,-.276054,.58018,.4101,.640303,-.282176,.578747,.44161,.662365,-.286931,.574294,.474106,.684542,-.290521,.567035,.507549,.707984,-.292672,.558687,.541853,.730913,-.293189,.547606,.576581,.752948,-.292199,.533471,.61172,.773452,-.289508,.516395,.646339,.794715,-.285716,.497873,.682131,.814251,-.280051,.476845,.716396,.833057,-.272873,.453449,.751503,.84959,-.263982,.427857,.786085,.867022,-.252745,.400335,.821355,.882277,-.239655,.371304,.85646,.895375,-.225386,.340397,.890828,.909347,-.209587,.310005,.923532,.921885,-.193433,.2796,.956419,.932127,-.176135,.247276,.989445,.941869,-.157872,.216186,1.02221,.949735,-.137577,.185602,1.05195,.956617,-.115285,.155767,1.07822,.961974,-.0928418,.126103,1.10149,.96972,-.0700592,.0956758,1.12207,.98012,-.0474671,.0643269,1.1408,.990825,-.0238113,.0320863,1.1577,.999876,381574e-9,-812203e-10,1.17403,.367636,-961342e-11,.469176,753287e-11,.380377,-244772e-9,.485434,191797e-9,.380416,-978857e-9,.485475,767015e-9,.380376,-.00220165,.485435,.00172522,.380419,-.00391408,.485487,.00306734,.380438,-.00611549,.485505,.00479332,.380462,-.00880558,.485525,.00690391,.380496,-.0119837,.485551,.00940039,.38056,-.0156487,.485605,.0122848,.38064,-.0197988,.485666,.0155601,.380767,-.0244324,.48577,.0192313,.380909,-.0295444,.485871,.0233032,.381142,-.0351321,.48606,.0277861,.381472,-.0411535,.486336,.0326939,.382015,-.0475408,.486833,.0380565,.382523,-.0544395,.487231,.0438615,.383129,-.061784,.487683,.0501332,.383952,-.0695085,.488313,.0568996,.38498,-.0775819,.489077,.0641952,.386331,-.0860443,.490113,.0720324,.387788,-.0948406,.491099,.0804379,.389808,-.103899,.492566,.0894899,.39252,-.113313,.494601,.0992098,.395493,-.123007,.496619,.109641,.399826,-.132859,.499912,.120919,.405341,-.143077,.504061,.133107,.411932,-.153465,.508905,.146263,.420591,-.164108,.515482,.160544,.43101,-.174893,.523191,.176123,.441881,-.185839,.53026,.192757,.453919,-.196633,.537295,.210535,.468715,-.207611,.546156,.229886,.485182,-.218517,.555173,.250543,.501926,-.229249,.562728,.27221,.51785,-.239481,.567494,.294892,.536947,-.249395,.573889,.318987,.557115,-.259,.578831,.344348,.577966,-.268075,.582055,.371223,.599489,-.276115,.583307,.399834,.62479,-.282523,.583902,.431415,.647504,-.287663,.57953,.464301,.670601,-.291538,.573103,.498123,.693539,-.293842,.563731,.532662,.717385,-.294681,.553169,.567925,.741533,-.293717,.539908,.603502,.762142,-.291156,.521902,.639074,.783014,-.28719,.502815,.674439,.805158,-.281773,.482598,.710497,.823646,-.274682,.458949,.7456,.841879,-.266184,.433129,.781085,.859515,-.255682,.406064,.816,.875335,-.242849,.376509,.851074,.890147,-.228329,.345502,.886473,.903144,-.212491,.31428,.920751,.916618,-.195695,.282994,.954606,.927953,-.178267,.251091,.988402,.937414,-.159549,.219107,1.02141,.946823,-.140022,.18896,1.05167,.954651,-.118154,.158667,1.07819,.959955,-.0946636,.128808,1.1025,.96858,-.0711792,.0973787,1.12391,.97938,-.0475046,.0650965,1.14322,.990498,-.024059,.0326267,1.16077,.999844,-512408e-10,112444e-9,1.17727,.316912,-934977e-11,.425996,695559e-11,.356423,-241372e-9,.479108,179562e-9,.356272,-965292e-9,.478897,71811e-8,.356262,-.00217182,.478894,.00161574,.356265,-.00386092,.478895,.00287261,.356278,-.0060324,.478905,.00448907,.356293,-.00868565,.478914,.00646572,.356346,-.0118207,.478965,.00880438,.356395,-.0154355,.479001,.0115066,.356484,-.019529,.479075,.0145762,.356609,-.0240991,.47918,.018018,.356766,-.0291413,.479305,.0218379,.357009,-.0346498,.479512,.0260454,.357424,-.0405462,.479909,.0306657,.357899,-.0468825,.480337,.0357054,.358424,-.0536887,.480771,.0411728,.359041,-.0609416,.481242,.0470841,.359903,-.0685239,.481943,.0534831,.360932,-.0764883,.482741,.0603795,.362196,-.0848364,.483688,.0678028,.363847,-.0935002,.484947,.0758086,.365972,-.102471,.486588,.0844173,.368741,-.111751,.488787,.0937199,.372146,-.121334,.491405,.103732,.377114,-.131147,.495604,.114608,.38226,-.141213,.499436,.126345,.389609,-.151632,.505334,.139116,.397925,-.162073,.51168,.152995,.407824,-.172819,.518876,.168071,.420014,-.183929,.527639,.184495,.434266,-.195032,.537588,.20232,.447352,-.205792,.544379,.221189,.463726,-.216704,.553422,.241616,.481406,-.227531,.562074,.263298,.498707,-.238017,.568227,.286116,.518039,-.247936,.574473,.3101,.538277,-.257437,.579191,.335401,.561166,-.266829,.584807,.362246,.583189,-.275329,.586476,.390609,.606024,-.28234,.585578,.420998,.632419,-.287924,.584496,.454357,.656128,-.291972,.577766,.488233,.679953,-.29456,.56875,.523248,.704654,-.295816,.558388,.559168,.729016,-.295157,.544826,.595326,.752062,-.292779,.528273,.631864,.773138,-.288681,.508482,.667793,.794869,-.283358,.487341,.704035,.815101,-.27608,.46354,.739925,.834212,-.26767,.438672,.775539,.852368,-.257397,.411239,.810895,.870207,-.245689,.3829,.846472,.884063,-.231452,.351496,.881788,.898284,-.215561,.31895,.917438,.912964,-.198208,.287367,.952422,.924666,-.180426,.254487,.987551,.934429,-.161525,.222226,1.02142,.943485,-.141197,.191143,1.05218,.9521,-.120085,.161112,1.07937,.957876,-.0975881,.130982,1.10403,.966943,-.0726842,.0990553,1.12616,.978313,-.0483705,.0662818,1.14619,.990048,-.0239072,.0329243,1.16413,.999984,461885e-9,-772859e-10,1.18099,.321287,-935049e-11,.455413,659662e-11,.332595,-237513e-9,.471437,167562e-9,.332729,-949964e-9,.471618,670192e-9,.332305,-.00213618,.471028,.00150712,.332326,-.00379765,.471055,.00267959,.332344,-.00593353,.471072,.00418751,.332356,-.00854349,.471077,.00603172,.332403,-.0116268,.471121,.00821362,.332461,-.0151824,.47117,.0107357,.332552,-.0192088,.471251,.0136014,.332657,-.0237024,.47133,.0168152,.332835,-.0286615,.471487,.0203853,.333083,-.0340765,.471708,.0243212,.333547,-.0398563,.47219,.0286518,.333989,-.0460916,.472587,.0333763,.334532,-.0527897,.473054,.0385084,.335167,-.0599284,.473568,.0440638,.33608,-.0673514,.474362,.0500962,.337146,-.0752237,.475231,.0566022,.338462,-.083418,.476282,.0636272,.34014,-.0919382,.477615,.0712153,.342341,-.100741,.479404,.079417,.345088,-.109905,.481618,.0882631,.349049,-.119369,.485081,.0978851,.353939,-.129033,.489317,.108336,.359893,-.139038,.494309,.119698,.366945,-.149411,.499983,.132024,.375814,-.159843,.507185,.145558,.387112,-.170664,.516392,.160433,.40023,-.181897,.526519,.176648,.412555,-.192785,.53423,.193922,.427023,-.203663,.542741,.212662,.443685,-.214695,.552066,.232944,.461499,-.225561,.560762,.254495,.480975,-.236257,.569421,.277531,.501,-.24639,.576101,.301724,.521691,-.256101,.581493,.327112,.543478,-.265289,.585221,.353917,.566094,-.273938,.587614,.381941,.589578,-.281679,.587991,.41172,.614583,-.287655,.585928,.444148,.641813,-.292228,.582092,.478617,.666189,-.295172,.57398,.51397,.690475,-.29648,.561676,.550118,.715543,-.296203,.548758,.586933,.740405,-.293999,.532792,.62384,.762183,-.28998,.512735,.660723,.786069,-.28478,.492402,.69807,.806812,-.277568,.469058,.734422,.826987,-.268951,.443017,.770946,.844588,-.259049,.415501,.80699,.863725,-.2471,.387328,.842107,.879137,-.234157,.356108,.878078,.894634,-.218719,.324315,.914058,.909162,-.201293,.291813,.949922,.92072,-.18267,.258474,.985337,.93158,-.163212,.225593,1.0205,.941238,-.142771,.193986,1.05273,.949293,-.120956,.163392,1.08075,.956226,-.0985743,.132934,1.10559,.96546,-.075118,.101255,1.12823,.977403,-.0497921,.0675441,1.149,.989648,-.0241574,.0334681,1.16765,1.00001,5762e-7,-184807e-9,1.18519,.303474,-916603e-11,.4542,61243e-10,.308894,-232869e-9,.462306,155592e-9,.309426,-931661e-9,.463093,622499e-9,.308643,-.0020949,.461933,.00139979,.308651,-.0037242,.461941,.00248874,.308662,-.00581873,.46195,.00388933,.308687,-.00837818,.461974,.00560247,.308728,-.0114016,.462011,.00762948,.308789,-.0148884,.462067,.00997326,.308882,-.0188369,.462151,.0126375,.309007,-.0232436,.462263,.0156271,.30918,-.0281054,.462417,.0189498,.309442,-.0334065,.462667,.0226167,.309901,-.0390589,.463162,.0266614,.310331,-.0452042,.463555,.0310715,.310858,-.0517735,.464019,.0358698,.311576,-.0587359,.464669,.0410848,.312436,-.0660383,.465406,.0467453,.313526,-.0737266,.466339,.0528718,.314903,-.0817574,.467504,.0595039,.316814,-.090167,.469226,.0666888,.318965,-.0987555,.470981,.0744658,.322077,-.107792,.473814,.082912,.325947,-.117098,.477241,.0920846,.331008,-.126602,.48184,.102137,.337893,-.136619,.488334,.113135,.345106,-.146838,.494415,.12511,.355111,-.157357,.503275,.138356,.365095,-.167955,.510966,.152686,.378344,-.179157,.521508,.16856,.391599,-.190143,.530455,.18561,.407786,-.20123,.541275,.204308,.425294,-.212456,.551784,.224623,.444021,-.223568,.561493,.246172,.463418,-.234154,.569886,.268979,.484077,-.244546,.577116,.293411,.505513,-.254301,.582914,.318936,.527672,-.263564,.587208,.345856,.550565,-.272332,.589277,.374054,.573656,-.280011,.588426,.403276,.59827,-.286924,.587504,.43474,.624731,-.291994,.583401,.468767,.652396,-.295159,.576997,.504411,.67732,-.296954,.565863,.54114,.703147,-.296877,.552316,.57816,.728715,-.295147,.536773,.616124,.752448,-.291275,.51771,.653885,.775169,-.285905,.496087,.691537,.799307,-.279064,.474232,.729251,.819482,-.270294,.447676,.766267,.837659,-.260032,.419656,.802616,.856903,-.248497,.391328,.838583,.873325,-.235252,.360285,.874711,.889788,-.221126,.329215,.91077,.904486,-.204304,.296392,.94653,.917711,-.185562,.262159,.983828,.928969,-.165635,.229142,1.01955,.939707,-.14442,.19673,1.05317,.948167,-.122147,.165095,1.0823,.955222,-.099098,.13451,1.10791,.964401,-.0755332,.102476,1.1312,.976605,-.0513817,.0689667,1.15218,.989085,-.0258499,.034506,1.17129,.999908,617773e-9,-271268e-9,1.18961,.285803,-905752e-11,.452348,572272e-11,.284689,-22732e-8,.450581,143626e-9,.285263,-910214e-9,.451482,575099e-9,.285302,-.00204784,.451553,.00129395,.285318,-.00364057,.451574,.0023006,.28533,-.00568813,.451585,.00359547,.285361,-.00819001,.451618,.00517934,.285397,-.0111458,.45165,.007054,.285447,-.0145536,.451688,.00922167,.285527,-.0184127,.451758,.0116869,.285688,-.0227207,.451929,.0144555,.28584,-.0274712,.452055,.0175341,.286136,-.0326278,.452369,.0209406,.286574,-.0381792,.452853,.0246965,.287012,-.0441879,.453272,.0287996,.287542,-.0506096,.453752,.033268,.288299,-.0573634,.454488,.0381504,.289186,-.0645458,.455294,.0434447,.290302,-.0720405,.456301,.0491973,.291776,-.0799046,.457648,.0554453,.29372,-.088117,.459483,.0622311,.296052,-.0965328,.461571,.0695992,.299563,-.105409,.465085,.077658,.30335,-.114553,.468506,.0864176,.309167,-.123917,.474423,.0961078,.31529,-.13381,.47995,.106643,.324163,-.144021,.488592,.118322,.333272,-.154382,.496461,.131133,.344224,-.165015,.50562,.145208,.357733,-.176168,.516719,.16073,.373046,-.187468,.528513,.177807,.38788,-.198488,.537713,.196072,.405133,-.209545,.547999,.21605,.423845,-.220724,.55759,.237484,.443777,-.231518,.566246,.26039,.464824,-.242035,.574326,.284835,.486635,-.251898,.58037,.310518,.51012,-.261304,.58568,.337678,.535301,-.270384,.590197,.366242,.559193,-.27841,.590569,.395873,.583544,-.285325,.588161,.426857,.608834,-.291113,.584249,.459477,.635753,-.294882,.57763,.494734,.664367,-.297088,.569479,.532023,.689688,-.297364,.555064,.569629,.715732,-.295949,.539522,.608124,.741307,-.292259,.521613,.646231,.764949,-.287063,.49969,.684938,.788599,-.28012,.476747,.723548,.81048,-.27153,.45116,.761135,.831372,-.261289,.424101,.798916,.850092,-.249559,.39443,.835952,.867777,-.236348,.363849,.871606,.884632,-.221569,.332477,.907843,.90047,-.20618,.300667,.944187,.914524,-.188771,.266552,.981371,.926892,-.168362,.232349,1.01841,.937951,-.146761,.199359,1.05308,.947236,-.123813,.1675,1.0839,.954367,-.099984,.136166,1.11047,.963907,-.0759278,.103808,1.13414,.976218,-.0511367,.0697061,1.15575,.988772,-.0267415,.0352529,1.17531,.999888,-520778e-9,289926e-9,1.19389,.263546,-883274e-11,.441896,526783e-11,.262352,-221849e-9,.439889,132311e-9,.262325,-886683e-9,.439848,528824e-9,.26228,-.00199476,.439765,.00118975,.262372,-.00354671,.439922,.00211568,.26239,-.00554141,.439941,.00330652,.262412,-.00797888,.439961,.00476346,.262453,-.0108584,.440002,.00648818,.262528,-.0141788,.440085,.0084835,.262615,-.017938,.440166,.0107533,.262744,-.0221346,.440291,.0133044,.262939,-.026762,.440493,.0161445,.263277,-.0317573,.440889,.0192974,.26368,-.0371832,.441338,.0227699,.264106,-.0430371,.441753,.0265698,.264624,-.0493035,.442227,.0307178,.265378,-.0558669,.442985,.0352616,.266253,-.0628718,.443795,.0401968,.267478,-.0701569,.445008,.04559,.269062,-.077845,.446599,.0514539,.270926,-.0857941,.448349,.0578382,.273693,-.0940773,.451221,.0648363,.276746,-.102704,.454097,.0724389,.281693,-.111735,.459517,.0808744,.287335,-.121004,.46531,.0901551,.29448,-.130734,.472605,.100371,.30257,-.140777,.480251,.111644,.312465,-.15111,.489444,.124111,.324856,-.16189,.500919,.137979,.33774,-.172946,.511317,.153163,.35255,-.184152,.522684,.169817,.367786,-.19522,.53248,.187886,.385474,-.20632,.543326,.207634,.404976,-.217744,.554109,.229165,.425203,-.228691,.563395,.252068,.446704,-.239299,.571565,.276471,.468951,-.249348,.577935,.302323,.493487,-.258933,.584309,.329882,.517861,-.268009,.58773,.358525,.543309,-.276238,.589612,.388585,.569704,-.28356,.589294,.419787,.594871,-.289497,.585137,.452114,.622555,-.294452,.580356,.486466,.651167,-.296918,.57185,.523079,.677332,-.297647,.558428,.5611,.703718,-.296321,.542232,.599592,.730262,-.293339,.524541,.639138,.754304,-.288036,.502691,.677978,.778051,-.281018,.479212,.716537,.801557,-.272414,.454071,.75586,.822559,-.262419,.425952,.794477,.843051,-.250702,.397313,.832664,.86232,-.237264,.366534,.869876,.879044,-.222716,.334816,.906973,.896362,-.206827,.303143,.943558,.910342,-.189659,.269699,.979759,.924119,-.171108,.236411,1.01718,.935374,-.149579,.202224,1.05289,.944295,-.126295,.16989,1.08496,.952227,-.101511,.138089,1.11256,.962041,-.0766392,.105053,1.1375,.97528,-.0511967,.070329,1.15983,.988476,-.025463,.0351268,1.17987,.999962,286808e-10,145564e-10,1.19901,.227089,-841413e-11,.404216,472707e-11,.239725,-215083e-9,.426708,120833e-9,.239904,-860718e-9,.427028,483555e-9,.239911,-.00193661,.427039,.00108806,.239914,-.00344276,.42704,.00193457,.239933,-.00537907,.427064,.00302363,.239944,-.00774482,.427065,.00435604,.239993,-.01054,.427122,.00593398,.240052,-.0137626,.427179,.00775987,.240148,-.0174115,.427279,.00983854,.240278,-.021484,.42741,.0121763,.240472,-.0259729,.427618,.0147827,.240839,-.0308131,.428086,.0176837,.241201,-.0360893,.428482,.0208775,.241626,-.0417723,.428907,.0243821,.242207,-.0478337,.42952,.0282228,.24298,-.0542199,.430332,.0324333,.243881,-.0610015,.431222,.0370252,.245123,-.0680874,.432512,.0420535,.24667,-.0755482,.434088,.0475414,.248779,-.0832873,.436323,.0535542,.251665,-.0913546,.439509,.0601716,.255305,-.0998489,.443478,.0674282,.260049,-.108576,.448713,.0754673,.266192,-.117754,.455524,.084339,.273158,-.127294,.4627,.0941683,.282131,-.137311,.472068,.10515,.293332,-.147736,.483565,.117402,.304667,-.158357,.493702,.130824,.317785,-.169274,.504708,.145724,.333245,-.180595,.517107,.16215,.349843,-.191892,.528849,.180149,.367944,-.203168,.540301,.199746,.387579,-.214443,.551514,.221047,.408247,-.225624,.560906,.243981,.43014,-.236422,.56959,.268513,.452669,-.24654,.576098,.294409,.476196,-.256157,.580925,.322002,.501157,-.265289,.584839,.351052,.527632,-.273671,.587614,.3812,.555754,-.281254,.589119,.412994,.581682,-.287448,.585204,.445498,.608196,-.292614,.579006,.479505,.635661,-.296068,.571297,.514643,.664999,-.297395,.560855,.552213,.691039,-.296645,.544525,.591365,.7179,-.293785,.526535,.630883,.744059,-.289089,.50545,.670932,.76863,-.282239,.482514,.710904,.793273,-.273688,.457246,.750259,.814731,-.26328,.428872,.78948,.835603,-.251526,.399384,.828597,.85489,-.238339,.368811,.866892,.872828,-.223607,.336617,.90563,.889462,-.207538,.303997,.943538,.904929,-.190297,.270812,.980591,.919101,-.172034,.237453,1.01935,.930536,-.152058,.204431,1.05498,.941223,-.129515,.172495,1.08717,.94982,-.104263,.140175,1.11551,.960592,-.0781944,.106465,1.14098,.974629,-.051688,.0711592,1.16418,.98811,-.0253929,.0354432,1.18465,1.00004,804378e-9,-330876e-9,1.20462,.214668,-821282e-11,.406619,433582e-11,.218053,-208144e-9,.413025,109887e-9,.217987,-832212e-9,.412901,439362e-9,.217971,-.00187246,.412876,988623e-9,.217968,-.00332855,.41286,.00175772,.217985,-.00520055,.412882,.00274729,.218014,-.00748814,.412916,.00395842,.218054,-.0101901,.412957,.00539274,.218106,-.0133057,.413005,.00705348,.218217,-.0168342,.413139,.00894581,.218338,-.0207707,.413258,.0110754,.21855,-.0251001,.413509,.0134551,.218913,-.0297861,.413992,.0161081,.219265,-.0348956,.414383,.0190307,.219696,-.0403909,.414839,.0222458,.220329,-.0462003,.415567,.025792,.220989,-.0524208,.41621,.0296637,.222027,-.058948,.417385,.0339323,.223301,-.0658208,.418779,.0386055,.224988,-.0730347,.420665,.0437355,.227211,-.0805274,.423198,.0493844,.230131,-.088395,.426566,.0556135,.233908,-.0966208,.43091,.0624829,.239092,-.105223,.437148,.0701636,.245315,-.11424,.444302,.0786949,.253166,-.12368,.453262,.0882382,.262374,-.133569,.463211,.0988682,.273145,-.143836,.474271,.110727,.285512,-.154577,.4863,.123945,.299512,-.165501,.498817,.138581,.314287,-.176698,.510341,.154676,.331083,-.188066,.522583,.172459,.349615,-.199597,.534879,.191979,.369318,-.210843,.546083,.21309,.390377,-.222068,.5562,.235998,.412411,-.233059,.564704,.260518,.435715,-.24357,.572314,.286795,.461196,-.253356,.579395,.314559,.485587,-.262362,.581985,.343581,.511908,-.270895,.584347,.374367,.539798,-.278452,.58505,.406015,.567974,-.284877,.583344,.439168,.594303,-.290124,.577348,.473005,.622951,-.294183,.570751,.508534,.652404,-.296389,.561541,.544764,.679291,-.296605,.546426,.582927,.706437,-.294095,.528599,.622681,.734485,-.28978,.508676,.663567,.758841,-.283363,.484768,.704092,.78537,-.275015,.460434,.745101,.807315,-.264689,.432166,.784712,.8271,-.252597,.401807,.824241,.849191,-.239154,.371458,.863803,.867046,-.224451,.338873,.903063,.8852,-.208342,.306175,.942763,.901771,-.190684,.272759,.981559,.915958,-.172105,.239306,1.02048,.928046,-.152214,.206071,1.05765,.939961,-.130247,.17367,1.08999,.948711,-.10672,.142201,1.11829,.959305,-.0808688,.108454,1.14467,.973009,-.0539145,.0728109,1.16839,.987631,-.0262947,.0360625,1.19004,.999978,.00132758,-559424e-9,1.21058,.193925,-793421e-11,.391974,392537e-11,.196746,-200315e-9,.397675,991033e-10,.19667,-801099e-9,.397521,396342e-9,.196633,-.00180246,.397445,891829e-9,.196654,-.00320443,.397482,.00158582,.196659,-.00500647,.39748,.00247867,.196683,-.0072086,.397506,.00357167,.196728,-.00981001,.397562,.00486675,.196792,-.0128096,.397633,.00636707,.19689,-.0162055,.397746,.00807752,.197017,-.0199943,.397884,.0100052,.19729,-.024139,.39827,.0121691,.197583,-.0286671,.398639,.0145755,.197927,-.0335858,.399034,.0172355,.198383,-.0388806,.399554,.0201718,.199002,-.0444736,.400289,.0234194,.199739,-.0504583,.401111,.026984,.200784,-.056729,.402349,.0309217,.202075,-.0633643,.403841,.0352496,.203898,-.0703247,.406076,.0400313,.206199,-.0775565,.408841,.0453282,.209252,-.085184,.41259,.0511794,.213638,-.0931994,.418288,.0577459,.21881,-.101617,.424681,.0650508,.225642,-.11052,.433429,.0732759,.233717,-.119772,.442897,.0824683,.242823,-.129505,.452888,.0927484,.254772,-.139906,.466407,.104417,.266603,-.150402,.477413,.117211,.28073,-.161395,.490519,.131598,.295399,-.172465,.50201,.147407,.312705,-.183982,.515311,.165031,.331335,-.195532,.52786,.184336,.351037,-.206971,.5392,.205361,.372175,-.218117,.54941,.228043,.394548,-.229327,.558642,.25267,.419598,-.240052,.567861,.279071,.443922,-.249937,.573332,.306882,.471495,-.259407,.58013,.33661,.496769,-.267749,.580564,.367328,.524951,-.275524,.581696,.399753,.55318,-.282148,.579885,.433134,.581577,-.287533,.575471,.467534,.609231,-.291612,.567445,.502943,.637478,-.293911,.557657,.53871,.667795,-.295096,.546535,.576568,.694272,-.294073,.529561,.614929,.722937,-.290386,.510561,.655909,.749682,-.284481,.487846,.697663,.774754,-.276188,.462487,.738515,.799301,-.266215,.43481,.779802,.820762,-.254116,.404879,.820045,.843231,-.240393,.374559,.860294,.861857,-.225503,.341582,.900965,.880815,-.209382,.308778,.941727,.89766,-.19155,.275232,.980916,.912926,-.172346,.240938,1.02162,.926391,-.151799,.207223,1.0597,.938429,-.129968,.17484,1.09291,.947834,-.10651,.142984,1.12248,.958432,-.0824098,.109902,1.149,.972402,-.0565242,.0744454,1.1733,.987191,-.028427,.0373794,1.19538,.999975,385685e-10,-4203e-8,1.21676,.178114,-766075e-11,.385418,354027e-11,.176074,-191966e-9,.381002,887135e-10,.17601,-767549e-9,.380861,354715e-9,.17598,-.00172696,.380798,798168e-9,.175994,-.00307012,.380824,.00141928,.176017,-.00479684,.380858,.00221859,.176019,-.00690648,.380839,.00319714,.176072,-.00939888,.380913,.0043572,.176131,-.0122726,.380979,.005702,.176239,-.0155264,.38112,.00723689,.176371,-.0191551,.381272,.00896907,.176638,-.023117,.381669,.0109194,.176912,-.0274633,.382015,.0130903,.177279,-.032173,.382476,.0154949,.17774,-.0372219,.383041,.0181669,.178344,-.0426132,.38378,.0211209,.179153,-.0483309,.384773,.0243899,.180197,-.0543447,.386076,.0280062,.181581,-.0607122,.387809,.032004,.18344,-.0673855,.390205,.036453,.186139,-.0743989,.393944,.0414162,.189432,-.0817731,.39832,.0469394,.193795,-.0895464,.404188,.0531442,.199641,-.0978264,.4121,.0601374,.206679,-.106499,.421425,.0680078,.214865,-.115654,.431504,.076919,.224406,-.125268,.442526,.0868835,.235876,-.135475,.455465,.0981875,.248335,-.146023,.4681,.110759,.262868,-.157016,.482069,.124885,.278962,-.168245,.496182,.140645,.295082,-.17958,.507401,.157838,.313738,-.191227,.520252,.17695,.333573,-.202718,.531708,.197817,.356433,-.214424,.544509,.220785,.378853,-.225492,.55373,.245306,.402717,-.236236,.561348,.271593,.428375,-.246568,.568538,.299776,.454724,-.255941,.573462,.329433,.482291,-.264511,.576356,.360598,.509706,-.272129,.576446,.393204,.538805,-.278979,.575298,.427227,.568919,-.284528,.572154,.462157,.596804,-.288801,.564691,.497997,.625987,-.291334,.555134,.534467,.656414,-.292722,.545051,.571736,.683916,-.292185,.528813,.610158,.711809,-.290043,.51106,.649061,.739547,-.285246,.490103,.690081,.766914,-.277647,.465523,.732554,.791375,-.267603,.437718,.773982,.814772,-.256109,.40882,.81609,.836691,-.242281,.377823,.856849,.856984,-.227155,.34496,.898363,.876332,-.210395,.311335,.939471,.894988,-.192612,.277703,.980799,.911113,-.173236,.243019,1.02215,.924092,-.152258,.209037,1.06139,.936828,-.129575,.175909,1.09635,.946869,-.10594,.143852,1.12707,.958284,-.081318,.110289,1.15419,.972325,-.0556133,.0747232,1.17909,.986878,-.0297899,.0383149,1.20163,.999936,-.00197169,912402e-9,1.22338,.151174,-720365e-11,.351531,309789e-11,.155594,-18279e-8,.361806,78608e-9,.156099,-731569e-9,.362982,314615e-9,.156053,-.00164578,.362869,707845e-9,.156093,-.0029261,.362961,.00125884,.156099,-.00457155,.362959,.00196783,.15612,-.00658224,.362982,.00283622,.156168,-.00895774,.363048,.00386625,.156221,-.0116962,.363101,.00506109,.156324,-.0147973,.363241,.00642675,.156476,-.0182503,.363448,.00797175,.156731,-.0220266,.36384,.00971484,.156994,-.026176,.364179,.0116575,.157341,-.0306701,.36462,.0138207,.157867,-.0354591,.365364,.0162356,.15846,-.0406141,.366111,.0189092,.159308,-.0460519,.367248,.021885,.160426,-.0518096,.368767,.0252004,.161877,-.0578906,.370745,.0288825,.163995,-.0642812,.373831,.0330139,.16655,-.0710067,.377366,.0376283,.170237,-.0781522,.382799,.0428493,.175096,-.0857172,.389915,.0487324,.181069,-.0938025,.398487,.0554214,.188487,-.102363,.408799,.0630189,.197029,-.111343,.419991,.071634,.206684,-.120812,.431455,.0812797,.218698,-.131033,.445746,.0923651,.230726,-.141373,.457471,.104545,.245516,-.152387,.472388,.118449,.261551,-.163628,.486671,.133923,.277437,-.174814,.49762,.150849,.296662,-.186713,.51162,.169924,.31795,-.198513,.525435,.190848,.339422,-.210119,.536267,.213504,.362143,-.221354,.545982,.237947,.387198,-.23224,.555364,.264427,.412349,-.24257,.561489,.292519,.439274,-.252284,.566903,.322561,.466779,-.261023,.569614,.353952,.496011,-.26899,.571589,.387278,.524964,-.275498,.570325,.421356,.556518,-.281449,.568792,.457314,.584363,-.285526,.560268,.493199,.614214,-.28844,.55205,.530276,.645684,-.289777,.541906,.56855,.673446,-.289722,.526464,.606927,.701924,-.287792,.509872,.645945,.73037,-.284315,.490649,.685564,.757405,-.278804,.467964,.726511,.784025,-.269543,.441468,.768601,.808255,-.258117,.41216,.811321,.830739,-.244728,.380606,.853496,.851914,-.229428,.348111,.895374,.872586,-.212508,.314732,.937674,.891581,-.194025,.280338,.979869,.907641,-.174711,.245203,1.02253,.922233,-.153509,.21077,1.06371,.935878,-.130418,.177399,1.09972,.946338,-.105558,.144507,1.13124,.957265,-.080059,.110508,1.15973,.971668,-.0539766,.0742311,1.18515,.9866,-.0277101,.0375224,1.20858,1.00021,-515531e-9,135226e-9,1.23135,.137468,-686011e-11,.345041,273315e-11,.13703,-173378e-9,.343936,690761e-10,.136986,-693048e-9,.34383,276126e-9,.136964,-.00155931,.343761,621337e-9,.137003,-.00277211,.343863,.00110494,.137012,-.00433103,.343868,.00172744,.137043,-.00623606,.343916,.00249022,.13709,-.0084868,.343986,.00339559,.137145,-.0110814,.344045,.00444687,.137242,-.0140187,.344177,.00565007,.137431,-.0172713,.344491,.00701868,.137644,-.0208605,.344805,.00856042,.13791,-.024792,.345172,.0102863,.138295,-.0290461,.345734,.0122185,.138764,-.0335957,.346371,.0143771,.139415,-.038467,.347298,.0167894,.140272,-.0436176,.348527,.0194895,.141457,-.0491016,.350276,.0225043,.14303,-.0548764,.352646,.0258962,.145289,-.0610096,.356206,.0297168,.148502,-.0674777,.361488,.0340562,.152188,-.074345,.367103,.0389534,.157359,-.0817442,.375247,.0445541,.16379,-.0896334,.385064,.0509535,.171376,-.098005,.396082,.0582611,.179901,-.106817,.407418,.06654,.189892,-.116239,.420031,.075994,.201838,-.12627,.434321,.0867239,.214311,-.136701,.447631,.0987517,.228902,-.147616,.462046,.112353,.245107,-.158871,.476942,.127605,.262292,-.170261,.490285,.144469,.281215,-.182017,.503783,.163282,.301058,-.193729,.515505,.183873,.322752,-.205512,.52682,.206466,.347547,-.217214,.539473,.231194,.370969,-.227966,.546625,.257288,.397533,-.238555,.55472,.285789,.42398,-.248278,.559468,.315746,.452928,-.257422,.564095,.347724,.482121,-.265306,.565426,.380922,.510438,-.272043,.563205,.415639,.541188,-.277614,.561087,.451702,.571667,-.281927,.554922,.48845,.602432,-.285015,.546838,.526442,.634126,-.286512,.537415,.564896,.662816,-.286388,.522906,.604037,.692411,-.284734,.507003,.643795,.720946,-.281297,.488398,.68298,.748293,-.276262,.466353,.723466,.776931,-.269978,.443573,.764565,.801065,-.260305,.415279,.805838,.825843,-.247426,.384773,.849985,.84807,-.232437,.352555,.893174,.869122,-.215806,.318642,.936564,.888963,-.197307,.28381,.980253,.905547,-.177203,.247888,1.02463,.918554,-.155542,.212904,1.06714,.931395,-.131948,.1787,1.10451,.941749,-.106723,.145902,1.13694,.954551,-.0804939,.111193,1.1666,.970279,-.0534239,.0744697,1.19249,.986117,-.0257452,.0368788,1.21665,.999938,.00190634,-.0010291,1.23981,.118493,-647439e-11,.32272,23772e-10,.118765,-163023e-9,.323456,598573e-10,.118772,-65212e-8,.323477,239447e-9,.118843,-.00146741,.323657,538881e-9,.118804,-.00260846,.323553,95826e-8,.118826,-.00407576,.323595,.00149845,.118846,-.00586826,.323617,.00216047,.118886,-.00798578,.32367,.00294679,.118947,-.0104273,.323753,.00386124,.119055,-.0131909,.323922,.00490999,.119241,-.0162444,.324251,.00610804,.11944,-.0196339,.324544,.00745805,.119739,-.0233378,.325026,.00897805,.12011,-.0273179,.325586,.0106895,.120571,-.0316143,.326231,.0126073,.12124,-.0361939,.327264,.0147654,.122162,-.0410511,.328733,.0172001,.123378,-.0462233,.330659,.0199375,.125183,-.0517109,.333754,.0230498,.127832,-.0575652,.338507,.026597,.130909,-.0637441,.343666,.0306345,.135221,-.0704302,.351063,.035273,.14082,-.0776364,.360604,.0406137,.146781,-.0852293,.369638,.0466788,.155121,-.0935351,.3827,.0537628,.16398,-.102234,.39522,.0617985,.173926,-.111465,.40793,.07097,.185137,-.121296,.42105,.0813426,.19826,-.13169,.435735,.0931596,.212938,-.142614,.450932,.106547,.229046,-.153884,.465726,.121575,.246246,-.165382,.479461,.138286,.264637,-.176806,.492106,.15666,.284959,-.188793,.504774,.17728,.308157,-.200763,.518805,.19988,.330951,-.21239,.528231,.224293,.3549,-.223521,.536376,.250541,.381502,-.234169,.544846,.278902,.409529,-.244077,.551717,.309227,.437523,-.253363,.55517,.341426,.467624,-.261659,.557772,.37518,.497268,-.268498,.556442,.41007,.528294,-.274018,.553915,.446445,.559053,-.278169,.549153,.483779,.589329,-.281229,.539878,.522249,.622503,-.282902,.53162,.561754,.652382,-.282815,.518119,.601544,.681847,-.281247,.502187,.641574,.712285,-.277986,.484824,.682633,.740094,-.273017,.463483,.723426,.768478,-.266692,.441299,.763747,.794556,-.258358,.415238,.805565,.819408,-.248807,.386912,.847254,.843411,-.236214,.356165,.891091,.862397,-.219794,.320562,.936174,.883113,-.201768,.285322,.982562,.90023,-.181672,.249713,1.02862,.915192,-.159279,.214546,1.07163,.928458,-.134725,.180285,1.10995,.94069,-.10913,.147119,1.14354,.953409,-.0821315,.112492,1.17372,.969537,-.0542677,.0752014,1.20043,.985612,-.0259096,.0370361,1.22528,.999835,.00298198,-.00151801,1.24959,.10097,-602574e-11,.300277,202619e-11,.101577,-152164e-9,.302077,511662e-10,.101572,-608889e-9,.302066,204751e-9,.101566,-.00136997,.302047,460753e-9,.101592,-.00243557,.302114,819497e-9,.101608,-.0038053,.30214,.00128154,.101627,-.00547906,.30216,.0018483,.101669,-.00745647,.302224,.00252223,.101732,-.00973615,.302318,.00330716,.101844,-.0123097,.302513,.00421061,.102025,-.0151681,.30285,.00524481,.102224,-.0183334,.303166,.0064154,.102515,-.0217819,.303654,.00774063,.102886,-.0255067,.304243,.0092398,.103395,-.029514,.305089,.0109339,.104109,-.0337912,.306301,.0128561,.105074,-.0383565,.30798,.0150338,.10654,-.0432132,.310726,.0175228,.108478,-.0484244,.314351,.0203648,.111015,-.0539339,.319032,.0236325,.114682,-.0598885,.32605,.0274188,.11911,-.0663375,.334109,.0317905,.124736,-.0733011,.344013,.0368502,.131479,-.0807744,.355358,.0427104,.139283,-.0888204,.367614,.0494788,.148054,-.0973394,.380072,.0572367,.159037,-.10665,.395678,.0662704,.169794,-.116221,.40795,.0763192,.18314,-.126632,.423546,.087956,.197515,-.137383,.438213,.101042,.213514,-.148641,.453248,.115827,.23065,-.160117,.46688,.132283,.249148,-.171807,.479962,.150644,.270219,-.183695,.494618,.171073,.292338,-.195574,.506937,.193378,.314999,-.207205,.516463,.217585,.340991,-.218955,.528123,.24428,.367982,-.229917,.537025,.272784,.39432,-.239737,.541627,.302742,.423364,-.249048,.546466,.335112,.453751,-.257329,.549466,.369032,.48416,-.264623,.549503,.404577,.515262,-.270411,.547008,.441337,.547036,-.274581,.542249,.479162,.576614,-.277266,.533015,.517904,.611143,-.279144,.525512,.558508,.640989,-.279001,.51154,.598995,.671182,-.277324,.495641,.639935,.700848,-.273908,.477526,.681017,.729862,-.269063,.457955,.722764,.758273,-.262282,.434846,.764349,.784121,-.254281,.409203,.806206,.809798,-.24505,.382694,.848617,.834953,-.233861,.354034,.892445,.856817,-.221308,.321764,.936263,.877609,-.205996,.288118,.982401,.897489,-.186702,.253277,1.02975,.913792,-.164618,.217963,1.07488,.92785,-.140023,.183221,1.11487,.940378,-.11328,.149385,1.14947,.95273,-.0853958,.114152,1.1807,.969059,-.0568698,.0769845,1.20912,.985574,-.0276502,.0381186,1.23498,.999943,.00239052,-.00126861,1.25987,.0852715,-560067e-11,.279021,171162e-11,.0854143,-140871e-9,.279483,430516e-10,.0854191,-563385e-9,.2795,172184e-9,.0854188,-.00126753,.279493,387464e-9,.0854229,-.00225337,.279501,68918e-8,.0854443,-.00352086,.279549,.00107803,.0854697,-.00506962,.279591,.00155536,.0855093,-.00689873,.279652,.00212354,.0855724,-.00900821,.279752,.00278703,.0856991,-.0113799,.280011,.0035551,.085855,-.0140314,.280297,.00443449,.0860682,-.016963,.280682,.00543636,.086344,-.0201438,.281159,.0065788,.0867426,-.0235999,.281886,.00787977,.087239,-.0273069,.282745,.0093606,.0879815,-.031269,.284139,.011056,.0891258,-.035531,.28647,.0130065,.0906909,-.0400947,.289708,.0152495,.0927624,-.0449638,.293904,.0178454,.0958376,-.0502427,.300471,.0208915,.0995827,-.0559514,.30806,.0244247,.104526,-.0622152,.317874,.0285721,.110532,-.0690046,.329332,.0334227,.117385,-.0763068,.341217,.0390466,.12522,-.084184,.353968,.0455786,.134037,-.0925248,.366797,.0530773,.144014,-.101487,.380209,.0617424,.156013,-.111273,.395956,.071777,.168872,-.121431,.41053,.0830905,.183089,-.132105,.425073,.0959341,.198763,-.143286,.439833,.110448,.216159,-.154841,.454507,.126769,.234859,-.166588,.468368,.14495,.255879,-.178626,.482846,.165233,.27677,-.190218,.493489,.187217,.301184,-.202227,.506549,.211659,.325852,-.213764,.5158,.237922,.352824,-.22487,.525442,.26632,.380882,-.235246,.532487,.296691,.410137,-.244847,.537703,.329179,.439787,-.253122,.540361,.363135,.472291,-.260517,.542734,.399222,.501856,-.266519,.538826,.436352,.534816,-.270905,.535152,.474505,.565069,-.273826,.525979,.513988,.597154,-.275333,.516394,.554852,.630473,-.275314,.506206,.596592,.660574,-.273323,.489769,.638117,.692015,-.270008,.472578,.680457,.720647,-.265001,.452134,.723008,.750528,-.258311,.430344,.765954,.777568,-.250046,.405624,.809012,.80387,-.240114,.378339,.852425,.828439,-.228737,.349877,.895346,.851472,-.216632,.318968,.940695,.873906,-.202782,.287489,.987235,.89467,-.187059,.254394,1.03348,.912281,-.168818,.221294,1.07812,.927358,-.146494,.18675,1.11928,.940385,-.120009,.152322,1.15609,.952672,-.0917183,.117514,1.18875,.968496,-.0620321,.0797405,1.21821,.985236,-.0314945,.0402383,1.24523,.99998,-575153e-9,110644e-9,1.27133,.0702429,-512222e-11,.255273,140947e-11,.0702981,-128826e-9,.255469,354488e-10,.0703691,-515562e-9,.255727,141874e-9,.0703805,-.00116,.255754,31929e-8,.0703961,-.00206224,.255813,567999e-9,.0704102,-.00322223,.255839,88871e-8,.0704298,-.00463928,.255863,.00128272,.0704759,-.00631375,.255953,.00175283,.0705434,-.00824317,.256079,.00230342,.0706693,-.010412,.25636,.0029443,.0708189,-.0128439,.256647,.00368031,.0710364,-.0155177,.257084,.00452614,.0713223,-.0184374,.257637,.00549706,.0717182,-.0216002,.258416,.00661246,.072321,-.0249966,.259699,.00790147,.0731446,-.0286566,.261475,.0093884,.0743352,-.0325888,.264132,.0111186,.0760676,-.036843,.26815,.013145,.078454,-.0414292,.273636,.0155251,.0818618,-.0464634,.281653,.0183525,.0857382,-.0519478,.289992,.0216642,.0908131,-.0579836,.30066,.0255956,.0967512,-.0645124,.312204,.0301954,.103717,-.0716505,.325001,.0356017,.111596,-.0793232,.338129,.041896,.120933,-.087645,.352853,.0492447,.130787,-.096492,.366192,.0576749,.142311,-.105973,.380864,.0673969,.155344,-.116182,.396575,.0785899,.169535,-.126815,.411443,.0912377,.185173,-.138015,.426256,.105607,.201755,-.149325,.439607,.121551,.221334,-.161207,.455467,.139608,.241461,-.173162,.469096,.159591,.26294,-.18504,.481014,.18156,.286776,-.196881,.493291,.205781,.311596,-.208311,.503556,.231819,.338667,-.219671,.513268,.260274,.366021,-.230451,.519414,.290862,.395875,-.240131,.526766,.323196,.425564,-.248566,.52905,.357071,.457094,-.256195,.530796,.393262,.488286,-.262331,.528703,.430797,.522291,-.267141,.52727,.470231,.554172,-.270411,.519848,.510477,.586427,-.271986,.510307,.551594,.619638,-.27192,.499158,.593849,.650656,-.269817,.483852,.636314,.68284,-.266267,.467515,.679679,.714356,-.26113,.44931,.723884,.742717,-.254067,.425789,.767245,.770894,-.245652,.401144,.811819,.797358,-.235554,.374224,.856315,.823377,-.223896,.346167,.901077,.847456,-.210865,.316056,.946502,.870697,-.196574,.284503,.993711,.891068,-.180814,.251628,1.04134,.909267,-.163314,.219065,1.08609,.925653,-.143304,.186446,1.12702,.940017,-.121322,.153416,1.16371,.952398,-.0973872,.120334,1.19712,.967568,-.0698785,.08352,1.22791,.984772,-.0390031,.0439209,1.25672,1.00026,-.0070087,.00315668,1.28428,.0556653,-459654e-11,.227325,112556e-11,.0565238,-116382e-9,.230826,284985e-10,.0565717,-465666e-9,.231026,114036e-9,.0565859,-.00104773,.231079,256656e-9,.0565761,-.00186255,.231025,45663e-8,.0565913,-.00291002,.231058,714664e-9,.0566108,-.00418998,.231085,.00103224,.0566532,-.00570206,.231169,.00141202,.0567473,-.00743666,.231417,.00186018,.0568567,-.00940298,.231661,.00238264,.0569859,-.0115991,.231895,.00298699,.0572221,-.0140096,.232456,.00368957,.057519,-.0166508,.233096,.00450303,.0579534,-.01951,.234094,.00544945,.0585922,-.0225991,.235629,.00655564,.0595647,-.0259416,.238106,.00785724,.0609109,-.0295661,.241557,.00939127,.0628751,-.0335126,.246652,.0112198,.0656908,-.0378604,.254091,.0134168,.0691347,-.0426543,.262666,.0160374,.0732165,-.0478967,.272029,.0191514,.0782863,-.0536716,.283007,.0228597,.0843973,-.0600683,.295732,.0272829,.0913598,-.0670095,.308779,.032484,.0994407,-.0745516,.322886,.0385886,.108189,-.082712,.336408,.0457133,.118574,-.0914927,.351692,.0539832,.129989,-.100854,.366502,.0635162,.142722,-.110837,.381675,.0744386,.156654,-.121353,.3963,.0868483,.172151,-.132414,.411477,.100963,.188712,-.143809,.42508,.116795,.208093,-.155765,.441328,.134715,.227936,-.167608,.454328,.154396,.249495,-.179579,.467235,.176179,.27362,-.191488,.480248,.200193,.296371,-.202618,.487886,.225775,.324234,-.214133,.499632,.25441,.353049,-.225212,.509532,.285077,.381785,-.234875,.514265,.317047,.414038,-.244205,.521282,.351874,.445251,-.252145,.522931,.388279,.476819,-.258433,.520947,.425825,.509209,-.263411,.517669,.465104,.542759,-.266732,.512841,.505741,.574822,-.268263,.503317,.547611,.609324,-.268489,.493035,.590953,.641772,-.266941,.478816,.63488,.674049,-.263297,.462863,.679072,.705071,-.257618,.442931,.723487,.734709,-.250625,.421299,.768708,.763704,-.24179,.397085,.814375,.791818,-.231115,.370577,.859907,.817439,-.21922,.34232,.906715,.843202,-.205658,.312627,.953943,.866639,-.190563,.280933,1.00185,.888129,-.173978,.248393,1.05105,.907239,-.155485,.216007,1.09704,.923893,-.134782,.183233,1.13857,.938882,-.11249,.150376,1.17539,.952464,-.0890706,.117177,1.20924,.968529,-.0646523,.0813095,1.24055,.984763,-.038606,.0439378,1.27018,1.00053,-.01238,.00598668,1.29873,.0437928,-409594e-11,.204012,8.79224e-7,.0440166,-103395e-9,.205049,221946e-10,.0440529,-413633e-9,.205225,887981e-10,.0440493,-930594e-9,.2052,199858e-9,.0439884,-.00165352,.204901,355495e-9,.0440716,-.0025849,.205255,556983e-9,.0440968,-.00372222,.205311,805326e-9,.0441359,-.00506478,.205391,.00110333,.0442231,-.00660384,.205638,.00145768,.0443254,-.00835246,.205877,.00187275,.0444832,-.0102992,.20627,.00235938,.0447001,-.0124449,.206796,.0029299,.0450168,-.0147935,.207593,.0036005,.0454816,-.017336,.208819,.00439246,.0462446,-.0201156,.211036,.00533864,.0473694,-.0231568,.214388,.00646984,.0490191,-.0264941,.219357,.00783856,.0512776,-.030184,.226061,.00950182,.0541279,-.0342661,.234094,.0115156,.0578989,-.0388539,.244297,.0139687,.0620835,-.0438735,.254457,.0169015,.0673497,-.04951,.266706,.0204554,.0731759,-.0556263,.278753,.0246606,.0803937,-.0624585,.29309,.0297126,.0879287,-.0697556,.305856,.0355868,.0970669,-.0778795,.321059,.0425768,.106508,-.0863541,.333873,.05056,.11776,-.0955935,.349008,.0598972,.130081,-.105438,.363776,.0706314,.144454,-.115899,.380112,.0828822,.1596,-.126827,.394843,.0967611,.176097,-.138161,.409033,.112381,.194726,-.149904,.424257,.129952,.213944,-.161675,.436945,.149333,.235516,-.173659,.450176,.170892,.260564,-.185963,.466305,.194984,.285183,-.197582,.477328,.220805,.311095,-.208697,.486566,.248694,.338924,-.219519,.494811,.279015,.369757,-.229766,.504065,.311725,.3996,-.238879,.507909,.345844,.430484,-.246802,.509805,.381749,.46413,-.253924,.511436,.420251,.497077,-.259319,.508787,.459957,.530434,-.263297,.50394,.501356,.565725,-.265619,.49804,.544252,.599254,-.265842,.487346,.587856,.631251,-.263978,.472975,.631969,.663972,-.26043,.457135,.677471,.697724,-.255358,.439844,.723744,.727725,-.248308,.417872,.770653,.756417,-.239181,.39273,.817357,.785419,-.22814,.367839,.864221,.81266,-.215681,.339449,.912701,.839391,-.201623,.309279,.962419,.86366,-.185624,.278029,1.0122,.885028,-.16797,.245294,1.06186,.904639,-.148336,.212689,1.10934,.922048,-.12637,.179616,1.15063,.936952,-.102928,.146749,1.18885,.951895,-.0785268,.112733,1.22352,.967198,-.0530153,.0760056,1.25681,.984405,-.02649,.0383183,1.28762,1.00021,70019e-8,-20039e-8,1.31656,.0325964,-355447e-11,.176706,6.55682e-7,.0329333,-899174e-10,.178527,165869e-10,.0329181,-359637e-9,.178453,663498e-10,.0329085,-808991e-9,.178383,149332e-9,.0329181,-.00143826,.178394,265873e-9,.0329425,-.00224678,.178517,416597e-9,.0329511,-.00323575,.17849,603299e-9,.033011,-.00439875,.178695,829422e-9,.0330733,-.00574059,.178843,.00109908,.0331857,-.00725896,.179176,.00141933,.0333445,-.00895289,.179618,.0017999,.0335674,-.0108219,.180238,.00225316,.033939,-.0128687,.181417,.00279765,.0345239,-.015114,.183395,.0034564,.0354458,-.017596,.186616,.00425864,.0368313,-.0203524,.191547,.00524936,.0386115,-.0234105,.197508,.00647033,.0410303,-.0268509,.205395,.00798121,.0442245,-.0307481,.215365,.0098557,.0478659,-.0350863,.225595,.0121417,.0522416,-.0399506,.236946,.0149385,.0574513,-.045357,.249442,.0183189,.0631208,-.0512863,.261222,.0223644,.0701124,-.0579273,.275418,.0272418,.0777331,-.0650652,.288989,.0329458,.0862709,-.0728813,.302546,.0396819,.096103,-.081363,.317164,.04757,.106976,-.0904463,.331733,.0567012,.119175,-.100105,.34661,.067202,.132919,-.110375,.362249,.0792588,.147727,-.121115,.376978,.0928672,.163618,-.132299,.390681,.108228,.182234,-.143887,.406571,.125502,.201809,-.155827,.42042,.144836,.225041,-.168357,.438411,.166706,.247621,-.18004,.450368,.189909,.27097,-.191536,.460083,.215251,.296658,-.203024,.469765,.243164,.325892,-.214056,.481837,.273388,.35406,-.224104,.487474,.305344,.384372,-.233489,.492773,.339741,.41749,-.241874,.498451,.376287,.45013,-.248834,.499632,.414195,.481285,-.254658,.495233,.454077,.519183,-.259367,.496401,.496352,.551544,-.261818,.487686,.538798,.587349,-.262964,.479453,.583626,.621679,-.262128,.467709,.629451,.654991,-.258998,.452123,.67566,.686873,-.254119,.433495,.723248,.719801,-.246946,.413657,.771156,.750355,-.237709,.390366,.81989,.780033,-.226549,.364947,.868601,.809254,-.214186,.337256,.920034,.836576,-.199639,.307395,.971706,.861774,-.183169,.275431,1.02479,.885707,-.165111,.243431,1.07837,.904742,-.144363,.210921,1.12783,.915604,-.121305,.17647,1.17254,.930959,-.0962119,.143106,1.21012,.948404,-.069969,.108112,1.24474,.967012,-.0427586,.0708478,1.27718,.984183,-.0147043,.032335,1.3083,.999577,.0142165,-.00726867,1.3382,.0229227,-299799e-11,.148623,4.62391e-7,.0232194,-758796e-10,.15054,117033e-10,.0232315,-303636e-9,.15063,468397e-10,.0232354,-683189e-9,.150624,105472e-9,.0232092,-.0012136,.150445,187744e-9,.0232523,-.00189765,.150679,294847e-9,.0232828,-.00273247,.150789,428013e-9,.0233371,-.00371287,.150995,591134e-9,.0234015,-.00484794,.15118,787642e-9,.023514,-.00612877,.151562,.00102547,.023679,-.00756125,.152116,.00131351,.0239559,-.00914651,.153162,.00166594,.0244334,-.010904,.155133,.00210182,.025139,-.0128615,.158035,.00264406,.0262598,-.0150628,.162751,.00332923,.0277875,-.0175532,.168944,.00419773,.0298472,-.0203981,.176835,.00530034,.0325444,-.023655,.186686,.00669777,.0355581,-.0272982,.196248,.00842661,.0392841,-.0314457,.207352,.0105854,.0436815,-.0361157,.219279,.0132458,.0485272,-.0412932,.230728,.0164736,.0541574,-.0470337,.242994,.0203715,.0609479,-.0535002,.257042,.0250953,.0685228,-.0605409,.27102,.0306856,.0768042,-.0680553,.28406,.037193,.0864844,-.0765011,.299186,.0449795,.0969415,-.0852674,.3132,.0538316,.108478,-.0947333,.327138,.0641149,.121705,-.10481,.342345,.0759185,.136743,-.115474,.358472,.0894116,.152986,-.126536,.374067,.104562,.170397,-.138061,.388267,.121632,.191392,-.150203,.406467,.140996,.211566,-.161751,.418641,.161696,.233567,-.173407,.430418,.184557,.257769,-.185397,.44277,.210092,.28531,-.197048,.457191,.237827,.311726,-.20784,.464712,.267253,.340537,-.218345,.472539,.299332,.372921,-.228306,.482331,.333988,.402924,-.236665,.484378,.369722,.434475,-.244097,.484717,.407836,.469736,-.250547,.487093,.448465,.505045,-.25511,.485575,.490263,.540262,-.258444,.481225,.534495,.576347,-.259903,.473481,.579451,.608656,-.259572,.4603,.625604,.646679,-.257908,.450341,.674511,.679902,-.253663,.431561,.723269,.714159,-.247419,.412684,.773263,.745345,-.239122,.389388,.824182,.778248,-.228837,.365361,.876634,.807208,-.216197,.337667,.92945,.835019,-.201772,.307197,.985261,.860261,-.185291,.274205,1.04299,.877601,-.165809,.240178,1.09816,.898211,-.143897,.207571,1.14694,.915789,-.119513,.174904,1.19008,.931831,-.0932919,.141423,1.2297,.949244,-.0656528,.105603,1.26553,.967527,-.0370262,.0679551,1.29986,.984139,-.00730117,.0283133,1.33252,.999713,.0234648,-.0121785,1.36397,.0152135,-245447e-11,.122795,3.04092e-7,.0151652,-615778e-10,.122399,76292e-10,.0151181,-245948e-9,.122023,304802e-10,.0151203,-553394e-9,.12203,686634e-10,.015125,-983841e-9,.122037,122463e-9,.0151427,-.00153774,.12214,192706e-9,.0151708,-.0022103,.122237,281219e-9,.0152115,-.00300741,.12238,390804e-9,.0152877,-.00392494,.1227,526317e-9,.015412,-.00496597,.123244,69443e-8,.0156201,-.00613314,.124228,90547e-8,.0159658,-.00744113,.125945,.0011732,.0165674,-.00892546,.129098,.00151888,.017487,-.010627,.133865,.00197007,.018839,-.0126043,.140682,.0025637,.020554,-.0148814,.148534,.00333637,.0226727,-.0175123,.157381,.00433738,.0251879,-.0205266,.166685,.00561664,.0283635,-.0240319,.177796,.00725563,.0318694,-.0279432,.188251,.00928811,.0361044,-.0324313,.200038,.011835,.0406656,-.0373527,.210685,.0149146,.0463846,-.0430132,.224182,.0187254,.0525696,-.0491013,.23634,.0232283,.0598083,-.0559175,.250013,.0286521,.0679437,-.0633657,.263981,.0350634,.0771181,-.0714602,.278072,.0425882,.0881273,-.0803502,.29511,.0514487,.0996628,-.0896903,.309976,.0615766,.112702,-.099644,.325611,.0732139,.126488,-.109829,.339321,.0862324,.142625,-.120859,.35574,.101275,.15953,-.131956,.369845,.117892,.176991,-.143145,.38146,.136205,.199715,-.155292,.40052,.157252,.220787,-.167066,.412055,.179966,.243697,-.178396,.423133,.204418,.272106,-.190433,.439524,.232141,.297637,-.201265,.447041,.261109,.325273,-.211834,.454488,.292627,.357219,-.221889,.465004,.326669,.387362,-.230729,.468527,.362426,.423131,-.23924,.475836,.401533,.45543,-.246067,.475017,.441902,.493393,-.251557,.478017,.484239,.526253,-.255571,.4709,.528586,.560554,-.257752,.463167,.574346,.599306,-.258076,.456452,.621655,.634541,-.256471,.443725,.670492,.668907,-.253283,.428719,.721943,.705619,-.247562,.411348,.772477,.739034,-.240626,.388939,.8264,.771408,-.231493,.36425,.881702,.803312,-.220125,.337321,.9385,.828457,-.206645,.305364,.997437,.854819,-.190664,.273715,1.05693,.878666,-.171429,.242218,1.11251,.898404,-.149235,.209556,1.16398,.917416,-.12435,.176863,1.21014,.933133,-.0972703,.142775,1.25178,.95066,-.0683607,.106735,1.29028,.968589,-.0378724,.0681609,1.32703,.984776,-.00605712,.0273966,1.36158,.99994,.0263276,-.0138124,1.3943,.00867437,-186005e-11,.0928979,1.73682e-7,.00864003,-466389e-10,.0925237,435505e-11,.00864593,-186594e-9,.0925806,174322e-10,.00864095,-419639e-9,.0924903,392862e-10,.00863851,-746272e-9,.0924589,702598e-10,.00868531,-.00116456,.0929,111188e-9,.00869667,-.00167711,.0928529,163867e-9,.00874332,-.00228051,.0930914,23104e-8,.00882709,-.00297864,.0935679,31741e-8,.00898874,-.00377557,.0946165,430186e-9,.00929346,-.00469247,.0967406,580383e-9,.00978271,-.00575491,.100084,783529e-9,.0105746,-.00701514,.105447,.00106304,.0116949,-.00851797,.112494,.00144685,.0130419,-.0102757,.119876,.00196439,.0148375,-.012381,.129034,.00266433,.0168725,-.01482,.137812,.00358364,.0193689,-.0176563,.147696,.00478132,.0222691,-.0209211,.157795,.00631721,.0256891,-.0246655,.168431,.00826346,.0294686,-.0288597,.178587,.0106714,.0340412,-.0336441,.190251,.0136629,.0393918,-.039033,.202999,.0173272,.0453947,-.0450087,.215655,.0217448,.0521936,-.0515461,.228686,.0269941,.0600279,-.058817,.242838,.033272,.0692398,-.0667228,.258145,.0406457,.0793832,-.0752401,.273565,.0492239,.0902297,-.0841851,.287735,.0590105,.102014,-.0936479,.301161,.0702021,.116054,-.103967,.317438,.0832001,.13191,-.114622,.334166,.0977951,.148239,-.125452,.348192,.113985,.165809,-.136453,.361094,.131928,.184616,-.147648,.373534,.151811,.207491,-.159607,.39101,.174476,.230106,-.171119,.402504,.198798,.257036,-.182906,.418032,.225796,.281172,-.193605,.425468,.254027,.312034,-.204771,.440379,.285713,.340402,-.214988,.445406,.319196,.370231,-.224711,.44968,.35537,.407105,-.233516,.460747,.393838,.439037,-.240801,.460624,.433747,.47781,-.24762,.465957,.477234,.510655,-.251823,.460054,.52044,.550584,-.255552,.459172,.567853,.585872,-.257036,.450311,.615943,.620466,-.257535,.437763,.667693,.660496,-.255248,.426639,.718988,.695578,-.251141,.409185,.772503,.732176,-.244718,.39015,.827023,.760782,-.236782,.362594,.885651,.79422,-.225923,.33711,.943756,.824521,-.213855,.308272,1.00874,.854964,-.197723,.278529,1.06764,.878065,-.179209,.246208,1.12836,.899834,-.157569,.21329,1.18318,.918815,-.133206,.181038,1.23161,.934934,-.106545,.146993,1.27644,.952115,-.0780574,.111175,1.31842,.96906,-.0478279,.0728553,1.35839,.985178,-.0160014,.032579,1.39697,1.00039,.0173126,-.0095256,1.43312,.00384146,-124311e-11,.0613583,7.78271e-8,.00390023,-314043e-10,.0622919,196626e-11,.00389971,-125622e-9,.0622632,787379e-11,.00389491,-282352e-9,.0620659,1778e-8,.00391618,-502512e-9,.0624687,320918e-10,.00392662,-784458e-9,.0625113,515573e-10,.00396053,-.00112907,.0628175,778668e-10,.00401911,-.00153821,.0633286,113811e-9,.00414994,-.0020208,.0646443,16445e-8,.00441223,-.00260007,.0673886,237734e-9,.00484427,-.0033097,.0716528,345929e-9,.00549109,-.00418966,.0774998,505987e-9,.00636293,-.00527331,.0844758,739208e-9,.00746566,-.00660428,.0921325,.00107347,.00876625,-.00818826,.0997067,.00153691,.0103125,-.0100811,.107433,.00217153,.0123309,-.0123643,.117088,.00303427,.0146274,-.0150007,.126438,.00416018,.0172295,-.0180531,.135672,.00561513,.0204248,-.0215962,.146244,.007478,.0241597,-.0256234,.157481,.00981046,.0284693,-.0302209,.169125,.0127148,.033445,-.0353333,.181659,.0162453,.0391251,-.0410845,.1944,.0205417,.0454721,-.0473451,.207082,.0256333,.0530983,-.0542858,.221656,.0317036,.0615356,-.0618384,.236036,.0388319,.0703363,-.0697631,.248398,.046974,.0810391,-.0784757,.263611,.0565246,.0920144,-.0873488,.275857,.0671724,.105584,-.0973652,.292555,.0798105,.119506,-.107271,.306333,.0935945,.134434,-.117608,.318888,.109106,.153399,-.128938,.337552,.127074,.171258,-.139944,.349955,.14643,.191059,-.151288,.361545,.168,.215069,-.163018,.378421,.192082,.237838,-.174226,.38879,.217838,.266965,-.186063,.405857,.246931,.292827,-.196909,.414146,.277505,.324352,-.207473,.426955,.310711,.354427,-.217713,.433429,.346794,.389854,-.227183,.443966,.385237,.420749,-.235131,.44471,.424955,.459597,-.242786,.451729,.468446,.495316,-.248767,.45072,.513422,.534903,-.253351,.450924,.560618,.572369,-.256277,.445266,.609677,.612383,-.2576,.438798,.660995,.644037,-.256931,.421693,.713807,.686749,-.254036,.4109,.767616,.719814,-.249785,.390151,.82533,.754719,-.244283,.367847,.888311,.792022,-.235076,.345013,.948177,.822404,-.225061,.316193,1.01661,.853084,-.211113,.287013,1.08075,.879871,-.19449,.255424,1.14501,.901655,-.174023,.222879,1.20203,.919957,-.1509,.18989,1.25698,.938412,-.124923,.15606,1.30588,.953471,-.0968139,.120512,1.3529,.970451,-.066734,.0828515,1.3986,.985522,-.034734,.0424458,1.44148,1.00099,-.00102222,678929e-9,1.48398,965494e-9,-6.27338e-7,.0306409,1.97672e-8,99168e-8,-158573e-10,.0314638,4.99803e-7,991068e-9,-634012e-10,.031363,200682e-11,974567e-9,-14144e-8,.03036,457312e-11,998079e-9,-252812e-9,.031496,860131e-11,.00102243,-396506e-9,.0319955,148288e-10,.00107877,-577593e-9,.0331376,249141e-10,.00121622,-816816e-9,.0359396,423011e-10,.0014455,-.00113761,.0399652,724613e-10,.00178791,-.00156959,.0450556,123929e-9,.00225668,-.00214064,.0508025,208531e-9,.00285627,-.00287655,.0568443,341969e-9,.0035991,-.00380271,.0630892,544158e-9,.00455524,-.00496264,.0702204,842423e-9,.00569143,-.0063793,.0773426,.00126704,.00716928,-.00813531,.0860839,.00186642,.00885307,-.0101946,.0944079,.00267014,.0109316,-.0126386,.103951,.00374033,.0133704,-.0154876,.113786,.0051304,.0161525,-.0187317,.123477,.00688858,.0194267,-.0224652,.133986,.00910557,.0230967,-.0265976,.143979,.0118074,.0273627,-.0312848,.154645,.0151266,.0323898,-.0365949,.166765,.0191791,.0379225,-.0422914,.177932,.0239236,.0447501,-.0487469,.19167,.0296568,.0519391,-.0556398,.203224,.0362924,.0599464,-.0631646,.215652,.0440585,.0702427,-.0714308,.232089,.0531619,.0806902,-.0800605,.245258,.0634564,.0923194,-.0892815,.258609,.0752481,.106938,-.09931,.276654,.0888914,.121238,-.109575,.289847,.104055,.138817,-.120461,.307566,.121266,.15595,-.131209,.320117,.139944,.178418,-.143049,.339677,.161591,.197875,-.154074,.349886,.184303,.224368,-.166307,.369352,.210669,.252213,-.178051,.386242,.238895,.277321,-.189335,.395294,.269182,.310332,-.200683,.412148,.302508,.338809,-.210856,.418266,.337264,.372678,-.220655,.428723,.374881,.405632,-.230053,.433887,.415656,.442293,-.237993,.439911,.457982,.477256,-.244897,.440175,.502831,.515592,-.250657,.441079,.550277,.550969,-.255459,.435219,.601102,.592883,-.257696,.432882,.651785,.629092,-.259894,.421054,.708961,.672033,-.258592,.41177,.763806,.709147,-.256525,.395267,.824249,.745367,-.254677,.375013,.8951,.784715,-.247892,.353906,.959317,.818107,-.240162,.327801,1.03153,.847895,-.229741,.298821,1.10601,.879603,-.213084,.269115,1.164,.902605,-.195242,.236606,1.22854,.922788,-.174505,.203442,1.29017,.944831,-.150169,.169594,1.34157,.959656,-.124099,.135909,1.3956,.972399,-.0960626,.0990563,1.45128,.986549,-.0657097,.0602348,1.50312,1.00013,-.0333558,.0186694,1.55364,619747e-11,-1e-7,.00778326,796756e-16,2.37499e-8,-9.99999e-8,282592e-10,1.14596e-10,100292e-11,-166369e-11,250354e-9,6.77492e-9,350752e-11,-637769e-11,357289e-9,6.31655e-8,826445e-11,-174689e-10,516179e-9,3.1851e-7,242481e-10,-450868e-10,.0010223,130577e-11,455631e-10,-89044e-9,.00144302,374587e-11,971222e-10,-178311e-9,.00241912,102584e-10,171403e-9,-313976e-9,.00354938,236481e-10,292747e-9,-520026e-9,.00513765,496014e-10,789827e-9,-.00118187,.0238621,139056e-9,.00114093,-.00171827,.0286691,244093e-9,.00176119,-.00249667,.0368565,420623e-9,.0022233,-.00333742,.0400469,65673e-8,.00343382,-.00481976,.0535751,.00109323,.00427602,-.00600755,.057099,.00155268,.00461435,-.00737637,.0551084,.00215031,.00695698,-.00971401,.0715767,.00316529,.00867619,-.0120943,.0793314,.00436995,.0106694,-.0148202,.0869391,.0058959,.0140351,-.0183501,.101572,.00798757,.0168939,-.022006,.11018,.0104233,.020197,-.0261568,.119041,.0134167,.0254702,-.0312778,.135404,.0173009,.0298384,-.0362469,.1437,.0215428,.035159,-.042237,.15512,.0268882,.0427685,-.0488711,.17128,.033235,.0494848,-.0557997,.181813,.0404443,.0592394,-.0635578,.198745,.0490043,.0681463,-.071838,.210497,.0588239,.0804753,-.0809297,.228864,.0702835,.0942205,-.0906488,.247008,.0834012,.106777,-.100216,.258812,.0975952,.124471,-.110827,.278617,.114162,.138389,-.121193,.287049,.131983,.159543,-.13253,.307151,.152541,.176432,-.143611,.31564,.174673,.201723,-.15548,.33538,.199842,.229721,-.167166,.355256,.227097,.250206,-.178238,.360047,.256014,.282118,-.189905,.378761,.28855,.312821,-.201033,.39181,.323348,.341482,-.211584,.397716,.360564,.377368,-.221314,.410141,.400004,.418229,-.230474,.423485,.442371,.444881,-.239443,.418874,.488796,.488899,-.245987,.427545,.535012,.520317,-.253948,.422147,.589678,.568566,-.256616,.42719,.637683,.599607,-.26376,.415114,.703363,.64222,-.268687,.408715,.771363,.685698,-.2694,.399722,.83574,.732327,-.266642,.388651,.897764,.769873,-.267712,.369198,.983312,.806733,-.263479,.346802,1.06222,.843466,-.254575,.321368,1.13477,.873008,-.242749,.29211,1.20712,.908438,-.22725,.262143,1.27465,.936321,-.207621,.228876,1.33203,.950353,-.187932,.19484,1.40439,.96442,-.165154,.163178,1.4732,.979856,-.139302,.127531,1.53574,.982561,-.11134,.0903457,1.59982,.996389,-.0808124,.0489007,1.6577],t=[1,0,0,0,1,791421e-36,0,0,1,104392e-29,0,0,1,349405e-26,0,0,1,109923e-23,0,0,1,947414e-22,0,0,1,359627e-20,0,0,1,772053e-19,0,0,1,108799e-17,0,0,1,110655e-16,0,0,1,865818e-16,0,0,.999998,5.45037e-10,0,0,.999994,2.85095e-9,0,0,.999989,1.26931e-8,0,0,.999973,4.89938e-8,0,0,.999947,1.66347e-7,0,0,.999894,5.02694e-7,0,0,.999798,136532e-11,0,0,.999617,335898e-11,0,0,.999234,752126e-11,0,0,.998258,152586e-10,0,0,.99504,266207e-10,0,0,.980816,236802e-10,0,0,.967553,207684e-11,0,0,.966877,403733e-11,0,0,.965752,741174e-11,0,0,.96382,127746e-10,0,0,.960306,202792e-10,0,0,.953619,280232e-10,0,0,.941103,278816e-10,0,0,.926619,160221e-10,0,0,.920983,235164e-10,0,0,.912293,311924e-10,0,.0158731,.899277,348118e-10,0,.0476191,.880884,26041e-9,0,.0793651,.870399,338726e-10,0,.111111,.856138,392906e-10,0,.142857,.837436,372874e-10,0,.174603,.820973,392558e-10,0,.206349,.803583,434658e-10,0,.238095,.782168,40256e-9,0,.269841,.764107,448159e-10,0,.301587,.743092,457627e-10,0,.333333,.721626,455314e-10,0,.365079,.700375,477335e-10,0,.396825,.677334,461072e-10,0,.428571,.655702,484393e-10,0,.460317,.632059,464583e-10,0,.492064,.610125,483923e-10,0,.52381,.58653,464342e-10,0,.555556,.564508,477033e-10,0,.587302,.541405,459263e-10,0,.619048,.519556,46412e-9,0,.650794,.497292,448913e-10,0,.68254,.475898,445789e-10,0,.714286,.454722,433496e-10,0,.746032,.434042,423054e-10,0,.777778,.414126,413737e-10,0,.809524,.394387,397265e-10,0,.84127,.375841,390709e-10,0,.873016,.357219,369938e-10,0,.904762,.340084,365618e-10,0,.936508,.322714,342533e-10,0,.968254,.306974,339596e-10,0,1,1,101524e-23,0,0,1,10292e-22,0,0,1,130908e-23,0,0,1,473331e-23,0,0,1,625319e-22,0,0,1,107932e-20,0,0,1,163779e-19,0,0,1,203198e-18,0,0,1,204717e-17,0,0,.999999,168995e-16,0,0,.999998,1.15855e-10,0,0,.999996,6.6947e-10,0,0,.999991,3.30863e-9,0,0,.999983,1.41737e-8,0,0,.999968,5.32626e-8,0,0,.99994,1.77431e-7,0,0,.999891,5.28835e-7,0,0,.999797,142169e-11,0,0,.999617,347057e-11,0,0,.999227,77231e-10,0,0,.998239,155753e-10,0,0,.994937,268495e-10,0,0,.980225,213742e-10,0,0,.967549,21631e-10,0,0,.966865,417989e-11,0,0,.965739,763341e-11,0,0,.963794,130892e-10,0,0,.960244,206456e-10,0,0,.953495,282016e-10,0,148105e-9,.940876,271581e-10,0,.002454,.926569,164159e-10,0,.00867491,.920905,239521e-10,0,.01956,.912169,315127e-10,0,.035433,.899095,346626e-10,0,.056294,.882209,290223e-10,0,.0818191,.870272,342992e-10,0,.111259,.855977,394164e-10,0,.142857,.837431,372343e-10,0,.174603,.820826,396691e-10,0,.206349,.803408,435395e-10,0,.238095,.782838,419579e-10,0,.269841,.763941,450953e-10,0,.301587,.742904,455847e-10,0,.333333,.721463,458833e-10,0,.365079,.700197,477159e-10,0,.396825,.677501,470641e-10,0,.428571,.655527,484732e-10,0,.460317,.6324,476834e-10,0,.492064,.609964,484213e-10,0,.52381,.586839,475541e-10,0,.555556,.564353,476951e-10,0,.587302,.541589,467611e-10,0,.619048,.519413,463493e-10,0,.650794,.497337,453994e-10,0,.68254,.475797,445308e-10,0,.714286,.454659,435787e-10,0,.746032,.434065,424839e-10,0,.777778,.414018,41436e-9,0,.809524,.39455,401902e-10,0,.84127,.375742,390813e-10,0,.873016,.357501,377116e-10,0,.904762,.339996,36535e-9,0,.936508,.323069,351265e-10,0,.968254,.306897,339112e-10,0,1,1,10396e-19,0,0,1,104326e-20,0,0,1,110153e-20,0,0,1,144668e-20,0,0,1,34528e-19,0,0,1,175958e-19,0,0,1,12627e-17,0,0,1,936074e-18,0,0,1,645742e-17,0,0,.999998,401228e-16,0,0,.999997,2.22338e-10,0,0,.999995,1.0967e-9,0,0,.999991,4.82132e-9,0,0,.999981,1.89434e-8,0,0,.999967,6.67716e-8,0,0,.999938,2.12066e-7,0,0,.999886,6.0977e-7,0,0,.999792,159504e-11,0,0,.999608,381191e-11,0,0,.999209,833727e-11,0,0,.998179,165288e-10,0,0,.994605,274387e-10,0,0,.979468,167316e-10,0,0,.967529,242877e-11,0,0,.966836,461696e-11,0,0,.96569,830977e-11,0,0,.963706,140427e-10,0,244659e-11,.960063,217353e-10,0,760774e-9,.953113,286606e-10,0,.00367261,.940192,247691e-10,0,.00940263,.927731,195814e-10,0,.018333,.920669,252531e-10,0,.0306825,.911799,324277e-10,0,.0465556,.89857,340982e-10,0,.0659521,.883283,319622e-10,0,.0887677,.86989,35548e-9,0,.114784,.855483,397143e-10,0,.143618,.837987,391665e-10,0,.174606,.820546,411306e-10,0,.206349,.802878,436753e-10,0,.238095,.783402,444e-7,0,.269841,.763439,458726e-10,0,.301587,.742925,467097e-10,0,.333333,.721633,478887e-10,0,.365079,.69985,481251e-10,0,.396825,.67783,491811e-10,0,.428571,.655126,488199e-10,0,.460318,.632697,496025e-10,0,.492064,.609613,48829e-9,0,.52381,.587098,492754e-10,0,.555556,.564119,482625e-10,0,.587302,.541813,482807e-10,0,.619048,.519342,471552e-10,0,.650794,.497514,466765e-10,0,.68254,.475879,455582e-10,0,.714286,.454789,446007e-10,0,.746032,.434217,435382e-10,0,.777778,.414086,421753e-10,0,.809524,.394744,412093e-10,0,.84127,.375782,396634e-10,0,.873016,.357707,386419e-10,0,.904762,.340038,370345e-10,0,.936508,.323284,359725e-10,0,.968254,.306954,3436e-8,0,1,1,599567e-19,0,0,1,600497e-19,0,0,1,614839e-19,0,0,1,686641e-19,0,0,1,972658e-19,0,0,1,221271e-18,0,0,1,833195e-18,0,0,1,403601e-17,0,0,.999999,206001e-16,0,0,.999998,1.01739e-10,0,0,.999997,4.70132e-10,0,0,.999993,2.00436e-9,0,0,.999988,7.83682e-9,0,0,.999979,2.80338e-8,0,0,.999962,9.17033e-8,0,0,.999933,2.74514e-7,0,0,.999881,7.53201e-7,0,0,.999783,189826e-11,0,0,.999594,440279e-11,0,0,.999178,93898e-10,0,0,.998073,181265e-10,0,0,.993993,280487e-10,0,0,.979982,149422e-10,0,0,.968145,378481e-11,0,0,.966786,53771e-10,0,0,.965611,947508e-11,0,388934e-10,.963557,156616e-10,0,9693e-7,.959752,235144e-10,0,.00370329,.952461,291568e-10,0,.00868428,.940193,240102e-10,0,.0161889,.929042,231235e-10,0,.0263948,.920266,273968e-10,0,.0394088,.911178,337915e-10,0,.0552818,.897873,333629e-10,0,.0740138,.884053,351405e-10,0,.0955539,.869455,378034e-10,0,.119795,.854655,399378e-10,0,.14656,.838347,419108e-10,0,.175573,.820693,440831e-10,0,.206388,.802277,445599e-10,0,.238095,.783634,472691e-10,0,.269841,.763159,476984e-10,0,.301587,.742914,491487e-10,0,.333333,.721662,502312e-10,0,.365079,.699668,502817e-10,0,.396825,.677839,51406e-9,0,.428571,.655091,511095e-10,0,.460317,.632665,516067e-10,0,.492064,.609734,512255e-10,0,.52381,.587043,510263e-10,0,.555556,.564298,50565e-9,0,.587302,.541769,497951e-10,0,.619048,.519529,492698e-10,0,.650794,.497574,482066e-10,0,.68254,.476028,473689e-10,0,.714286,.454961,461941e-10,0,.746032,.434341,450618e-10,0,.777778,.414364,438355e-10,0,.809524,.394832,424196e-10,0,.84127,.376109,412563e-10,0,.873016,.35779,396226e-10,0,.904762,.340379,384886e-10,0,.936508,.323385,368214e-10,0,.968254,.307295,356636e-10,0,1,1,106465e-17,0,0,1,106555e-17,0,0,1,107966e-17,0,0,1,114601e-17,0,0,1,137123e-17,0,0,1,21243e-16,0,0,.999999,489653e-17,0,0,.999999,160283e-16,0,0,.999998,62269e-15,0,0,.999997,2.51859e-10,0,0,.999996,9.96192e-10,0,0,.999992,3.74531e-9,0,0,.999986,1.32022e-8,0,0,.999975,4.33315e-8,0,0,.999959,1.31956e-7,0,0,.999927,3.72249e-7,0,0,.999871,9.72461e-7,0,0,.999771,235343e-11,0,0,.999572,52768e-10,0,0,.999133,109237e-10,0,0,.997912,203675e-10,0,0,.993008,279396e-10,0,0,.980645,139604e-10,0,0,.970057,646596e-11,0,0,.966717,65089e-10,0,474145e-10,.965497,111863e-10,0,89544e-8,.96334,179857e-10,0,.0032647,.959294,259045e-10,0,.0075144,.951519,292327e-10,0,.0138734,.940517,249769e-10,0,.0224952,.93014,26803e-9,0,.0334828,.91972,303656e-10,0,.0468973,.910294,353323e-10,0,.0627703,.897701,351002e-10,0,.0811019,.884522,388104e-10,0,.10186,.869489,412932e-10,0,.124985,.853983,415781e-10,0,.150372,.838425,454066e-10,0,.177868,.820656,471624e-10,0,.207245,.801875,475243e-10,0,.238143,.783521,505621e-10,0,.269841,.763131,50721e-9,0,.301587,.74261,523293e-10,0,.333333,.72148,528699e-10,0,.365079,.699696,538677e-10,0,.396825,.677592,539255e-10,0,.428571,.65525,546367e-10,0,.460317,.632452,541348e-10,0,.492064,.609903,544976e-10,0,.52381,.586928,536201e-10,0,.555556,.564464,535185e-10,0,.587302,.541801,524949e-10,0,.619048,.519681,51812e-9,0,.650794,.497685,507687e-10,0,.68254,.47622,496243e-10,0,.714286,.455135,485714e-10,0,.746032,.4346,471847e-10,0,.777778,.414564,459294e-10,0,.809524,.395165,444705e-10,0,.84127,.376333,430772e-10,0,.873016,.358197,416229e-10,0,.904762,.34064,401019e-10,0,.936508,.323816,386623e-10,0,.968254,.307581,370933e-10,0,1,1,991541e-17,0,0,1,992077e-17,0,0,1,100041e-16,0,0,1,10385e-15,0,0,1,115777e-16,0,0,1,150215e-16,0,0,.999999,254738e-16,0,0,.999999,598822e-16,0,0,.999998,1.79597e-10,0,0,.999997,6.02367e-10,0,0,.999994,2.06835e-9,0,0,.99999,6.94952e-9,0,0,.999984,2.23363e-8,0,0,.999972,6.78578e-8,0,0,.999952,1.93571e-7,0,0,.999919,5.16594e-7,0,0,.99986,128739e-11,0,0,.999753,299298e-11,0,0,.999546,648258e-11,0,0,.999074,129985e-10,0,0,.997671,232176e-10,0,0,.991504,256701e-10,0,0,.981148,131141e-10,0,0,.971965,869048e-11,0,280182e-10,.966624,808301e-11,0,695475e-9,.965344,135235e-10,0,.00265522,.963048,210592e-10,0,.00622975,.958673,287473e-10,0,.0116234,.950262,281379e-10,0,.018976,.940836,271089e-10,0,.0283844,.930996,30926e-9,0,.0399151,.919848,348359e-10,0,.0536063,.909136,366092e-10,0,.0694793,.897554,384162e-10,0,.0875342,.884691,430971e-10,0,.107749,.869414,447803e-10,0,.130087,.853462,452858e-10,0,.154481,.838187,495769e-10,0,.180833,.820381,502709e-10,0,.209005,.801844,522713e-10,0,.238791,.783061,541505e-10,0,.269869,.763205,553712e-10,0,.301587,.742362,564909e-10,0,.333333,.721393,572646e-10,0,.365079,.699676,581012e-10,0,.396825,.677395,58096e-9,0,.428571,.655208,585766e-10,0,.460317,.632451,583602e-10,0,.492064,.609839,580234e-10,0,.52381,.587093,577161e-10,0,.555556,.564467,568447e-10,0,.587302,.542043,563166e-10,0,.619048,.519826,55156e-9,0,.650794,.497952,541682e-10,0,.68254,.476477,528971e-10,0,.714286,.455412,514952e-10,0,.746032,.434926,502222e-10,0,.777778,.4149,485779e-10,0,.809524,.395552,472242e-10,0,.84127,.376712,454891e-10,0,.873016,.358622,440924e-10,0,.904762,.341048,422984e-10,0,.936508,.324262,408582e-10,0,.968254,.308013,390839e-10,0,1,1,613913e-16,0,0,1,614145e-16,0,0,1,617708e-16,0,0,1,633717e-16,0,0,1,681648e-16,0,0,1,808291e-16,0,0,1,1.14608e-10,0,0,.999998,2.10507e-10,0,0,.999997,4.99595e-10,0,0,.999995,1.39897e-9,0,0,.999994,4.19818e-9,0,0,.999988,1.27042e-8,0,0,.999979,3.75153e-8,0,0,.999965,1.06206e-7,0,0,.999945,2.85381e-7,0,0,.999908,7.23611e-7,0,0,.999846,17255e-10,0,0,.999733,386104e-11,0,0,.999511,808493e-11,0,0,.998993,156884e-10,0,0,.997326,265538e-10,0,0,.989706,206466e-10,0,0,.981713,130756e-10,0,70005e-10,.973636,106473e-10,0,464797e-9,.966509,10194e-9,0,.00201743,.965149,165881e-10,0,.00497549,.962669,249147e-10,0,.00953262,.95786,317449e-10,0,.0158211,.949334,281045e-10,0,.0239343,.941041,303263e-10,0,.0339372,.931575,356754e-10,0,.0458738,.920102,397075e-10,0,.059772,.908002,384886e-10,0,.075645,.897269,43027e-9,0,.0934929,.884559,479925e-10,0,.113302,.869161,48246e-9,0,.135045,.853342,509505e-10,0,.158678,.837633,542846e-10,0,.184136,.820252,554139e-10,0,.211325,.801872,581412e-10,0,.240113,.782418,585535e-10,0,.270306,.7631,610923e-10,0,.301594,.742183,613678e-10,0,.333333,.721098,627275e-10,0,.365079,.699512,629413e-10,0,.396825,.677372,636351e-10,0,.428571,.655059,633555e-10,0,.460317,.632567,636513e-10,0,.492064,.609784,628965e-10,0,.52381,.587237,625546e-10,0,.555556,.564525,615825e-10,0,.587302,.542181,605048e-10,0,.619048,.520017,596329e-10,0,.650794,.498204,581516e-10,0,.68254,.476742,569186e-10,0,.714286,.455803,553833e-10,0,.746032,.435251,537807e-10,0,.777778,.415374,522025e-10,0,.809524,.395921,503421e-10,0,.84127,.377253,488211e-10,0,.873016,.359021,468234e-10,0,.904762,.341637,453269e-10,0,.936508,.3247,433014e-10,0,.968254,.308625,418007e-10,0,1,1,2.86798e-10,0,0,1,2.86877e-10,0,0,1,2.88094e-10,0,0,1,2.93506e-10,0,0,1,3.09262e-10,0,0,.999999,3.48593e-10,0,0,.999999,4.44582e-10,0,0,.999998,6.88591e-10,0,0,.999996,1.34391e-9,0,0,.999993,3.17438e-9,0,0,.999989,8.35609e-9,0,0,.999983,2.28677e-8,0,0,.999974,6.23361e-8,0,0,.999959,1.65225e-7,0,0,.999936,4.19983e-7,0,0,.999896,101546e-11,0,0,.99983,232376e-11,0,0,.999709,50156e-10,0,0,.999469,10167e-9,0,0,.998886,190775e-10,0,0,.996819,300511e-10,0,0,.988837,185092e-10,0,1.68222e-7,.982178,134622e-10,0,259622e-9,.975017,125961e-10,0,.00142595,.967101,13507e-9,0,.00382273,.964905,205003e-10,0,.00764164,.96218,29546e-9,0,.0130121,.956821,343738e-10,0,.0200253,.948829,305063e-10,0,.0287452,.941092,346487e-10,0,.039218,.931883,412061e-10,0,.0514748,.920211,444651e-10,0,.0655351,.907307,431252e-10,0,.0814082,.89684,490382e-10,0,.0990939,.884119,53334e-9,0,.118583,.869148,54114e-9,0,.139856,.853377,578536e-10,0,.162882,.836753,592285e-10,0,.187615,.820063,622787e-10,0,.213991,.801694,645492e-10,0,.241918,.782116,65353e-9,0,.271267,.762673,674344e-10,0,.301847,.742133,682788e-10,0,.333333,.720779,691959e-10,0,.365079,.699386,696817e-10,0,.396826,.67732,699583e-10,0,.428572,.654888,698447e-10,0,.460318,.632499,694063e-10,0,.492064,.609825,691612e-10,0,.52381,.587287,681576e-10,0,.555556,.564743,674138e-10,0,.587302,.542409,661617e-10,0,.619048,.520282,647785e-10,0,.650794,.498506,633836e-10,0,.68254,.477102,615905e-10,0,.714286,.456167,601013e-10,0,.746032,.435728,581457e-10,0,.777778,.415809,564215e-10,0,.809524,.396517,544997e-10,0,.84127,.377737,525061e-10,0,.873016,.359698,506831e-10,0,.904762,.342164,48568e-9,0,.936508,.325417,467826e-10,0,.968254,.309186,446736e-10,0,1,1,1.09018e-9,0,0,1,1.0904e-9,0,0,1,1.09393e-9,0,0,1,1.1095e-9,0,0,1,1.154e-9,0,0,1,1.26089e-9,0,0,.999999,1.5059e-9,0,0,.999997,2.07899e-9,0,0,.999994,3.48164e-9,0,0,.999993,7.05728e-9,0,0,.999987,1.63692e-8,0,0,.999981,4.06033e-8,0,0,.999969,1.0245e-7,0,0,.999953,2.55023e-7,0,0,.999925,6.1511e-7,0,0,.999881,142218e-11,0,0,.99981,313086e-11,0,0,.99968,653119e-11,0,0,.999418,12832e-9,0,0,.998748,232497e-10,0,0,.996066,329522e-10,0,0,.988379,179613e-10,0,108799e-9,.982567,143715e-10,0,921302e-9,.976097,148096e-10,0,.00280738,.968475,178905e-10,0,.00596622,.964606,253921e-10,0,.0105284,.961564,348623e-10,0,.0165848,.955517,357612e-10,0,.0242,.948381,343493e-10,0,.03342,.941095,405849e-10,0,.0442777,.931923,475394e-10,0,.0567958,.91996,484328e-10,0,.0709879,.907419,502146e-10,0,.086861,.89618,561654e-10,0,.104415,.88337,587612e-10,0,.123643,.869046,618057e-10,0,.144531,.853278,657392e-10,0,.167057,.836091,66303e-9,0,.191188,.819644,704445e-10,0,.216878,.801246,714071e-10,0,.244062,.782031,740093e-10,0,.272649,.762066,74685e-9,0,.302509,.741964,766647e-10,0,.333442,.720554,766328e-10,0,.365079,.699098,777857e-10,0,.396826,.677189,774633e-10,0,.428572,.65484,776235e-10,0,.460318,.632496,770316e-10,0,.492064,.609908,762669e-10,0,.52381,.587312,753972e-10,0,.555556,.564938,739994e-10,0,.587302,.542577,728382e-10,0,.619048,.52062,71112e-9,0,.650794,.498819,694004e-10,0,.68254,.477555,675575e-10,0,.714286,.456568,653449e-10,0,.746032,.436278,636068e-10,0,.777778,.41637,613466e-10,0,.809524,.397144,594177e-10,0,.84127,.378412,570987e-10,0,.873016,.360376,550419e-10,0,.904762,.342906,527422e-10,0,.936508,.326136,506544e-10,0,.968254,.30997,484307e-10,0,1,1,3.54014e-9,0,0,1,3.54073e-9,0,0,1,3.54972e-9,0,0,1,3.58929e-9,0,0,1,3.70093e-9,0,0,.999999,3.96194e-9,0,0,.999998,4.53352e-9,0,0,.999997,5.78828e-9,0,0,.999994,8.63812e-9,0,0,.999991,1.53622e-8,0,0,.999985,3.16356e-8,0,0,.999977,7.12781e-8,0,0,.999964,1.66725e-7,0,0,.999945,3.90501e-7,0,0,.999912,8.95622e-7,0,0,.999866,198428e-11,0,0,.999786,421038e-11,0,0,.999647,850239e-11,0,0,.999356,162059e-10,0,0,.998563,282652e-10,0,0,.994928,336309e-10,0,244244e-10,.987999,178458e-10,0,523891e-9,.982893,159162e-10,0,.00194729,.977044,178056e-10,0,.00451099,.969972,230624e-10,0,.00835132,.964237,313922e-10,0,.013561,.960791,406145e-10,0,.0202056,.954292,372796e-10,0,.0283321,.948052,403199e-10,0,.0379739,.940938,479537e-10,0,.0491551,.931689,545292e-10,0,.0618918,.91987,54038e-9,0,.0761941,.907665,589909e-10,0,.0920672,.895281,642651e-10,0,.109511,.882621,659707e-10,0,.12852,.86873,709973e-10,0,.149085,.853008,742221e-10,0,.171189,.835944,761754e-10,0,.194809,.818949,797052e-10,0,.21991,.800951,812434e-10,0,.246447,.781847,838075e-10,0,.274352,.761649,84501e-9,0,.303535,.74152,860258e-10,0,.333857,.720495,866233e-10,0,.365104,.698742,868326e-10,0,.396826,.677096,87133e-9,0,.428572,.654782,863497e-10,0,.460318,.632335,860206e-10,0,.492064,.610031,849337e-10,0,.52381,.587457,838279e-10,0,.555556,.56513,82309e-9,0,.587302,.542877,803542e-10,0,.619048,.5209,786928e-10,0,.650794,.499291,765171e-10,0,.68254,.477971,744753e-10,0,.714286,.457221,72209e-9,0,.746032,.436803,697448e-10,0,.777778,.417083,675333e-10,0,.809524,.397749,648058e-10,0,.84127,.379177,625759e-10,0,.873016,.361061,598584e-10,0,.904762,.343713,575797e-10,0,.936508,.326894,549999e-10,0,.968254,.310816,527482e-10,0,1,1,1.0153e-8,0,0,1,1.01544e-8,0,0,1,1.01751e-8,0,0,1,1.02662e-8,0,0,1,1.0521e-8,0,0,.999999,1.11049e-8,0,0,.999999,1.23408e-8,0,0,.999996,1.4924e-8,0,0,.999992,2.04471e-8,0,0,.999989,3.26539e-8,0,0,.99998,6.03559e-8,0,0,.999971,1.23936e-7,0,0,.999955,2.69058e-7,0,0,.999933,5.93604e-7,0,0,.999901,129633e-11,0,0,.999847,275621e-11,0,0,.999761,564494e-11,0,0,.999607,110485e-10,0,0,.999282,204388e-10,0,0,.99831,341084e-10,0,2.2038e-7,.993288,294949e-10,0,242388e-9,.987855,192736e-10,0,.0012503,.983167,182383e-10,0,.0032745,.977908,218633e-10,0,.00646321,.971194,290662e-10,0,.0109133,.963867,386401e-10,0,.0166927,.95982,462827e-10,0,.0238494,.953497,420705e-10,0,.0324178,.947621,477743e-10,0,.0424225,.940611,568258e-10,0,.0538808,.931174,618061e-10,0,.0668047,.919919,627098e-10,0,.0812014,.907856,694714e-10,0,.0970745,.894509,735008e-10,0,.114424,.881954,763369e-10,0,.133246,.868309,821896e-10,0,.153534,.852511,83769e-9,0,.175275,.835821,881615e-10,0,.198453,.817981,896368e-10,0,.223042,.800504,930906e-10,0,.249009,.78141,945056e-10,0,.276304,.761427,963605e-10,0,.304862,.74094,968088e-10,0,.334584,.720233,981481e-10,0,.365322,.698592,979122e-10,0,.396826,.676763,981057e-10,0,.428571,.654808,973956e-10,0,.460318,.632326,962619e-10,0,.492064,.610049,952996e-10,0,.52381,.58763,933334e-10,0,.555556,.565261,917573e-10,0,.587302,.543244,896636e-10,0,.619048,.521273,873304e-10,0,.650794,.499818,852648e-10,0,.68254,.478536,823961e-10,0,.714286,.457826,79939e-9,0,.746032,.437549,77126e-9,0,.777778,.41776,743043e-10,0,.809524,.39863,716426e-10,0,.84127,.379954,686456e-10,0,.873016,.362025,660514e-10,0,.904762,.344581,630755e-10,0,.936508,.327909,605439e-10,0,.968254,.311736,576345e-10,0,1,1,2.63344e-8,0,0,1,2.63373e-8,0,0,1,2.63815e-8,0,0,1,2.65753e-8,0,0,1,2.71132e-8,0,0,.999999,2.83279e-8,0,0,.999997,3.0833e-8,0,0,.999995,3.58711e-8,0,0,.999992,4.61266e-8,0,0,.999985,6.7574e-8,0,0,.999977,1.1358e-7,0,0,.999966,2.13657e-7,0,0,.999948,4.31151e-7,0,0,.999923,8.96656e-7,0,0,.999884,186603e-11,0,0,.999826,381115e-11,0,0,.999732,754184e-11,0,0,.999561,143192e-10,0,0,.999191,257061e-10,0,0,.997955,405724e-10,0,744132e-10,.992228,276537e-10,0,716477e-9,.987638,208885e-10,0,.0022524,.983395,215226e-10,0,.00484816,.978614,270795e-10,0,.00860962,.972389,365282e-10,0,.0136083,.964392,474747e-10,0,.0198941,.95861,509141e-10,0,.0275023,.952806,48963e-9,0,.0364584,.94712,571119e-10,0,.04678,.940104,671704e-10,0,.0584799,.930398,687586e-10,0,.0715665,.919866,738161e-10,0,.086045,.907853,813235e-10,0,.101918,.894078,834582e-10,0,.119186,.881177,892093e-10,0,.137845,.867575,944548e-10,0,.157891,.852107,969607e-10,0,.179316,.835502,101456e-9,0,.202106,.81756,103256e-9,0,.226243,.79984,106954e-9,0,.251704,.780998,108066e-9,0,.278451,.761132,110111e-9,0,.306436,.740429,110459e-9,0,.335586,.719836,111219e-9,0,.365796,.698467,11145e-8,0,.3969,.676446,110393e-9,0,.428571,.654635,110035e-9,0,.460318,.632411,108548e-9,0,.492064,.609986,106963e-9,0,.52381,.587872,105238e-9,0,.555556,.565528,102665e-9,0,.587302,.543563,100543e-9,0,.619048,.52176,976182e-10,0,.650794,.500188,947099e-10,0,.68254,.479204,919929e-10,0,.714286,.458413,886139e-10,0,.746032,.438314,857839e-10,0,.777778,.418573,82411e-9,0,.809524,.39947,792211e-10,0,.84127,.380892,759546e-10,0,.873016,.362953,727571e-10,0,.904762,.345601,695738e-10,0,.936508,.328895,664907e-10,0,.968254,.312808,634277e-10,0,1,1,6.28647e-8,0,0,1,6.28705e-8,0,0,1,6.29587e-8,0,0,1,6.33441e-8,0,0,.999999,6.44087e-8,0,0,.999998,6.67856e-8,0,0,.999997,7.15889e-8,0,0,.999995,8.09577e-8,0,0,.999989,9.92764e-8,0,0,.999983,1.35834e-7,0,0,.999974,2.10482e-7,0,0,.999959,3.65215e-7,0,0,.999939,6.86693e-7,0,0,.999911,13472e-10,0,0,.999868,26731e-10,0,0,.999804,524756e-11,0,0,.9997,100403e-10,0,0,.99951,185019e-10,0,0,.999078,322036e-10,0,620676e-11,.997428,470002e-10,0,341552e-9,.99162,287123e-10,0,.00143727,.987479,234706e-10,0,.00349201,.983582,260083e-10,0,.0066242,.979186,337927e-10,0,.0109113,.97325,454689e-10,0,.0164064,.965221,573759e-10,0,.0231463,.957262,544114e-10,0,.0311571,.952211,587006e-10,0,.0404572,.946631,692256e-10,0,.0510592,.939391,787819e-10,0,.0629723,.929795,792368e-10,0,.0762025,.91965,875075e-10,0,.090753,.907737,950903e-10,0,.106626,.893899,972963e-10,0,.123822,.880239,10459e-8,0,.142337,.866562,107689e-9,0,.16217,.85164,113081e-9,0,.183314,.835021,116636e-9,0,.20576,.817311,120074e-9,0,.229496,.798845,121921e-9,0,.254502,.780479,12475e-8,0,.280753,.760694,125255e-9,0,.308212,.740142,126719e-9,0,.336825,.719248,12636e-8,0,.366517,.698209,126712e-9,0,.397167,.676398,125769e-9,0,.428578,.654378,124432e-9,0,.460318,.632484,123272e-9,0,.492064,.610113,12085e-8,0,.52381,.587931,118411e-9,0,.555556,.565872,11569e-8,0,.587302,.543814,112521e-9,0,.619048,.522265,109737e-9,0,.650794,.500835,106228e-9,0,.68254,.479818,102591e-9,0,.714286,.459258,991288e-10,0,.746032,.439061,952325e-10,0,.777778,.419552,91895e-9,0,.809524,.400399,879051e-10,0,.84127,.381976,844775e-10,0,.873016,.364009,806316e-10,0,.904762,.346761,771848e-10,0,.936508,.330049,735429e-10,0,.968254,.314018,702103e-10,0,1,1,1.39968e-7,0,0,1,1.39979e-7,0,0,1,1.40145e-7,0,0,1,1.4087e-7,0,0,.999999,1.42865e-7,0,0,.999998,1.47279e-7,0,0,.999997,1.56057e-7,0,0,.999992,1.7276e-7,0,0,.999989,2.04352e-7,0,0,.99998,2.6494e-7,0,0,.999969,3.83435e-7,0,0,.999953,6.18641e-7,0,0,.999929,108755e-11,0,0,.999898,201497e-11,0,0,.999849,381346e-11,0,0,.999778,719815e-11,0,0,.999661,133215e-10,0,0,.999451,238313e-10,0,0,.998936,401343e-10,0,113724e-9,.99662,517346e-10,0,820171e-9,.991094,304323e-10,0,.00238143,.987487,281757e-10,0,.00493527,.983731,320048e-10,0,.00856859,.979647,423905e-10,0,.0133393,.973837,562935e-10,0,.0192863,.96584,677442e-10,0,.0264369,.956309,623073e-10,0,.03481,.951523,704131e-10,0,.0444184,.946003,836594e-10,0,.0552713,.938454,911736e-10,0,.0673749,.929279,938264e-10,0,.0807329,.919239,103754e-9,0,.0953479,.907293,109928e-9,0,.111221,.893936,115257e-9,0,.128352,.879674,122265e-9,0,.14674,.865668,125733e-9,0,.166382,.850998,132305e-9,0,.187276,.834498,134844e-9,0,.209413,.816903,139276e-9,0,.232786,.798235,140984e-9,0,.257382,.779724,14378e-8,0,.283181,.760251,144623e-9,0,.310156,.739808,145228e-9,0,.338269,.718762,14539e-8,0,.367461,.697815,144432e-9,0,.397646,.67631,143893e-9,0,.428685,.654278,141846e-9,0,.460318,.632347,13935e-8,0,.492064,.610296,137138e-9,0,.52381,.588039,133806e-9,0,.555556,.566218,130755e-9,0,.587302,.544346,127128e-9,0,.619048,.522701,123002e-9,0,.650794,.501542,119443e-9,0,.68254,.480508,115055e-9,0,.714286,.460092,111032e-9,0,.746032,.440021,106635e-9,0,.777778,.420446,102162e-9,0,.809524,.401512,98184e-9,0,.84127,.38299,936497e-10,0,.873016,.365232,89813e-9,0,.904762,.347865,853073e-10,0,.936508,.331342,817068e-10,0,.968254,.315202,773818e-10,0,1,1,2.9368e-7,0,0,1,2.937e-7,0,0,1,2.93998e-7,0,0,1,2.95298e-7,0,0,.999999,2.98865e-7,0,0,.999998,3.067e-7,0,0,.999995,3.22082e-7,0,0,.999992,3.50767e-7,0,0,.999986,4.03538e-7,0,0,.999976,5.01372e-7,0,0,.999964,6.8562e-7,0,0,.999945,10374e-10,0,0,.999919,171269e-11,0,0,.999882,300175e-11,0,0,.999829,542144e-11,0,0,.999749,984182e-11,0,0,.99962,176213e-10,0,0,.999382,305995e-10,0,138418e-10,.998751,496686e-10,0,389844e-9,.995344,510733e-10,0,.00150343,.990768,345829e-10,0,.00352451,.987464,342841e-10,0,.00655379,.983846,399072e-10,0,.0106554,.980007,533219e-10,0,.0158723,.974494,696992e-10,0,.0222333,.96622,776754e-10,0,.029758,.956273,747718e-10,0,.0384596,.950952,864611e-10,0,.0483473,.945215,100464e-9,0,.0594266,.937287,103729e-9,0,.0717019,.928649,111665e-9,0,.0851752,.918791,12353e-8,0,.0998479,.906685,127115e-9,0,.115721,.893706,13628e-8,0,.132794,.879248,142427e-9,0,.151067,.864685,148091e-9,0,.170538,.850032,153517e-9,0,.191204,.833853,157322e-9,0,.213063,.816353,161086e-9,0,.236107,.797834,164111e-9,0,.260329,.778831,165446e-9,0,.285714,.759756,167492e-9,0,.312243,.739419,166928e-9,0,.339887,.718491,167e-6,0,.368604,.697392,165674e-9,0,.398329,.676102,163815e-9,0,.428961,.654243,162003e-9,0,.460331,.632176,158831e-9,0,.492064,.610407,155463e-9,0,.52381,.588394,152062e-9,0,.555556,.56645,147665e-9,0,.587302,.5449,14375e-8,0,.619048,.523276,138905e-9,0,.650794,.502179,134189e-9,0,.68254,.481359,129392e-9,0,.714286,.46092,124556e-9,0,.746032,.441084,11957e-8,0,.777778,.421517,114652e-9,0,.809524,.402721,109688e-9,0,.84127,.384222,104667e-9,0,.873016,.366534,999633e-10,0,.904762,.349205,950177e-10,0,.936508,.332702,907301e-10,0,.968254,.316599,859769e-10,0,1,1,5.85473e-7,0,0,1,5.85507e-7,0,0,1,5.8602e-7,0,0,.999999,5.88259e-7,0,0,.999999,5.94381e-7,0,0,.999998,6.07754e-7,0,0,.999995,6.33729e-7,0,0,.99999,6.8137e-7,0,0,.999984,7.67003e-7,0,0,.999973,9.21212e-7,0,0,.999959,120218e-11,0,0,.999936,172024e-11,0,0,.999907,268088e-11,0,0,.999866,445512e-11,0,0,.999806,768481e-11,0,0,.999716,1342e-8,0,0,.999576,232473e-10,0,0,.9993,391694e-10,0,129917e-9,.998498,608429e-10,0,845035e-9,.994132,489743e-10,0,.00237616,.99031,384644e-10,0,.00484456,.987409,421768e-10,0,.00832472,.983981,504854e-10,0,.0128643,.980268,671028e-10,0,.0184947,.974875,852749e-10,0,.025237,.966063,85531e-9,0,.0331046,.956779,900588e-10,0,.0421067,.950259,10577e-8,0,.0522487,.944239,119458e-9,0,.0635343,.936341,122164e-9,0,.0759654,.928047,134929e-9,0,.0895434,.918065,145544e-9,0,.104269,.906267,150531e-9,0,.120142,.893419,161652e-9,0,.137163,.878758,16593e-8,0,.15533,.863699,174014e-9,0,.174645,.848876,177877e-9,0,.195106,.833032,184049e-9,0,.21671,.815557,186088e-9,0,.239454,.797323,19054e-8,0,.263332,.778124,191765e-9,0,.288336,.758929,192535e-9,0,.314451,.738979,192688e-9,0,.341658,.718213,191522e-9,0,.369924,.696947,190491e-9,0,.399202,.675807,187913e-9,0,.429416,.654147,184451e-9,0,.460447,.63229,181442e-9,0,.492064,.610499,177139e-9,0,.523809,.588747,172596e-9,0,.555555,.566783,167457e-9,0,.587301,.545359,162518e-9,0,.619048,.523984,156818e-9,0,.650794,.502917,151884e-9,0,.68254,.482294,145514e-9,0,.714286,.461945,140199e-9,0,.746032,.442133,134101e-9,0,.777778,.422705,128374e-9,0,.809524,.403916,122996e-9,0,.84127,.38554,116808e-9,0,.873016,.367909,111973e-9,0,.904762,.350651,105938e-9,0,.936508,.334208,101355e-9,0,.968254,.318123,957629e-10,0,1,1,111633e-11,0,0,1,111639e-11,0,0,1,111725e-11,0,0,1,112096e-11,0,0,.999999,11311e-10,0,0,.999997,115315e-11,0,0,.999995,11956e-10,0,0,.999989,127239e-11,0,0,.999981,140772e-11,0,0,.999969,164541e-11,0,0,.999952,206607e-11,0,0,.999928,281783e-11,0,0,.999895,416835e-11,0,0,.999848,658728e-11,0,0,.999781,108648e-10,0,0,.999682,182579e-10,0,0,.999523,306003e-10,0,159122e-10,.999205,499862e-10,0,391184e-9,.998131,73306e-9,0,.00147534,.993334,513229e-10,0,.0034227,.99016,467783e-10,0,.00632232,.987321,523413e-10,0,.0102295,.984099,64267e-9,0,.0151794,.980432,843042e-10,0,.0211947,.974976,102819e-9,0,.0282899,.966429,996234e-10,0,.0364739,.957633,111074e-9,0,.0457522,.949422,128644e-9,0,.0561278,.943045,140076e-9,0,.0676023,.935448,146349e-9,0,.0801762,.927225,161854e-9,0,.0938499,.917033,169135e-9,0,.108623,.905762,179987e-9,0,.124496,.892879,189832e-9,0,.141469,.878435,195881e-9,0,.159541,.863114,20466e-8,0,.178713,.84776,209473e-9,0,.198985,.832084,214861e-9,0,.220355,.814915,217695e-9,0,.242823,.796711,220313e-9,0,.266385,.777603,22313e-8,0,.291036,.757991,222471e-9,0,.316767,.738371,222869e-9,0,.343563,.717872,221243e-9,0,.371402,.696619,218089e-9,0,.400248,.675379,21562e-8,0,.430047,.65411,21169e-8,0,.460709,.63241,206947e-9,0,.492079,.61046,201709e-9,0,.52381,.58903,196753e-9,0,.555556,.567267,189637e-9,0,.587302,.545886,184735e-9,0,.619048,.524714,177257e-9,0,.650794,.503789,171424e-9,0,.68254,.483204,164688e-9,0,.714286,.462976,157172e-9,0,.746032,.443294,151341e-9,0,.777778,.423988,143737e-9,0,.809524,.405325,138098e-9,0,.84127,.386981,130698e-9,0,.873016,.369436,125276e-9,0,.904762,.35219,118349e-9,0,.936508,.335804,11312e-8,0,.968254,.319749,106687e-9,0,1,1,204685e-11,0,0,1,204694e-11,0,0,1,204831e-11,0,0,.999999,205428e-11,0,0,.999999,207056e-11,0,0,.999997,210581e-11,0,0,.999993,21732e-10,0,0,.999987,229365e-11,0,0,.999979,250243e-11,0,0,.999965,286127e-11,0,0,.999947,348028e-11,0,0,.999918,455588e-11,0,0,.999881,643303e-11,0,0,.999828,970064e-11,0,0,.999753,153233e-10,0,0,.999642,24793e-9,0,0,.999464,402032e-10,0,122947e-9,.999089,635852e-10,0,807414e-9,.997567,857026e-10,0,.00227206,.992903,594912e-10,0,.00462812,.990011,578515e-10,0,.00794162,.987192,65399e-9,0,.0122534,.98418,819675e-10,0,.0175888,.980491,105514e-9,0,.0239635,.974779,121532e-9,0,.031387,.96675,119144e-9,0,.0398644,.958248,136125e-9,0,.0493982,.948884,155408e-9,0,.0599896,.941673,162281e-9,0,.0716382,.934521,176754e-9,0,.0843437,.926205,192873e-9,0,.0981056,.916089,200038e-9,0,.112923,.904963,213624e-9,0,.128796,.892089,221834e-9,0,.145725,.878028,232619e-9,0,.163709,.86249,238632e-9,0,.182749,.846587,247002e-9,0,.202847,.830988,250702e-9,0,.224001,.814165,255562e-9,0,.246214,.796135,257505e-9,0,.269482,.777052,258625e-9,0,.293805,.757201,258398e-9,0,.319176,.737655,256714e-9,0,.345587,.717477,255187e-9,0,.373021,.696433,251792e-9,0,.401454,.675084,247223e-9,0,.430844,.653907,242213e-9,0,.461125,.632561,237397e-9,0,.492187,.610658,229313e-9,0,.52381,.589322,224402e-9,0,.555556,.567857,216116e-9,0,.587302,.54652,209124e-9,0,.619048,.525433,201601e-9,0,.650794,.504679,192957e-9,0,.68254,.484203,186052e-9,0,.714286,.464203,177672e-9,0,.746032,.444549,170005e-9,0,.777778,.425346,162401e-9,0,.809524,.406706,1544e-7,0,.84127,.388576,147437e-9,0,.873016,.37094,139493e-9,0,.904762,.353996,133219e-9,0,.936508,.337391,125573e-9,0,.968254,.321648,119867e-9,0,1,1,362511e-11,0,0,1,362525e-11,0,0,1,362739e-11,0,0,.999999,363673e-11,0,0,.999998,366214e-11,0,0,.999996,371698e-11,0,0,.999992,382116e-11,0,0,.999986,400554e-11,0,0,.999976,432058e-11,0,0,.999961,485194e-11,0,0,.999938,574808e-11,0,0,.999908,726643e-11,0,0,.999865,984707e-11,0,0,.999807,142217e-10,0,0,.999723,215581e-10,0,0,.999602,336114e-10,0,119113e-10,.999398,527353e-10,0,355813e-9,.998946,805809e-10,0,.00137768,.996647,942908e-10,0,.00322469,.992298,668733e-10,0,.00597897,.989802,716564e-10,0,.00968903,.987019,821355e-10,0,.0143845,.984219,104555e-9,0,.0200831,.980425,131245e-9,0,.0267948,.974241,139613e-9,0,.034525,.967006,145931e-9,0,.0432757,.95893,167153e-9,0,.0530471,.949157,188146e-9,0,.0638386,.94062,194625e-9,0,.0756487,.933509,213721e-9,0,.0884762,.925088,229616e-9,0,.10232,.915178,239638e-9,0,.117178,.904093,254814e-9,0,.133051,.891337,263685e-9,0,.149939,.877326,274789e-9,0,.167841,.861794,280534e-9,0,.18676,.845758,289534e-9,0,.206696,.829792,294446e-9,0,.22765,.813037,296877e-9,0,.249625,.795285,300217e-9,0,.27262,.776323,299826e-9,0,.296636,.756673,299787e-9,0,.321671,.736856,297867e-9,0,.347718,.716883,294052e-9,0,.374768,.696089,289462e-9,0,.402804,.67505,285212e-9,0,.431796,.653509,27653e-8,0,.461695,.63258,271759e-9,0,.49242,.61104,262811e-9,0,.523822,.589567,255151e-9,0,.555556,.568322,246434e-9,0,.587302,.547235,237061e-9,0,.619048,.52616,228343e-9,0,.650794,.505716,219236e-9,0,.68254,.485274,209595e-9,0,.714286,.465411,201011e-9,0,.746032,.445854,19109e-8,0,.777778,.426911,182897e-9,0,.809524,.408222,173569e-9,0,.84127,.390307,165496e-9,0,.873016,.372624,156799e-9,0,.904762,.355804,14917e-8,0,.936508,.33924,140907e-9,0,.968254,.323534,134062e-9,0,1,1,622487e-11,0,0,1,62251e-10,0,0,1,622837e-11,0,0,.999999,624259e-11,0,0,.999998,628127e-11,0,0,.999996,636451e-11,0,0,.999991,65218e-10,0,0,.999984,679782e-11,0,0,.999973,726361e-11,0,0,.999955,803644e-11,0,0,.999931,931397e-11,0,0,.999896,114299e-10,0,0,.999847,149402e-10,0,0,.999784,207461e-10,0,0,.999692,302493e-10,0,0,.999554,454957e-10,0,997275e-10,.999326,690762e-10,0,724813e-9,.998757,101605e-9,0,.0020972,.995367,958745e-10,0,.00432324,.99209,832808e-10,0,.00746347,.989517,887601e-10,0,.0115534,.987008,10564e-8,0,.0166134,.98421,133179e-9,0,.0226552,.98021,161746e-9,0,.0296838,.973676,161821e-9,0,.0377016,.967052,178635e-9,0,.0467079,.959385,206765e-9,0,.0567013,.949461,22476e-8,0,.0676796,.939578,23574e-8,0,.0796403,.932416,25893e-8,0,.0925812,.923759,271228e-9,0,.106501,.914223,289165e-9,0,.121397,.902942,301156e-9,0,.13727,.890419,313852e-9,0,.15412,.876639,324408e-9,0,.171946,.861316,33249e-8,0,.190751,.84496,338497e-9,0,.210537,.828427,345861e-9,0,.231305,.811871,347863e-9,0,.253057,.794397,350225e-9,0,.275797,.775726,349915e-9,0,.299525,.75617,347297e-9,0,.324242,.736091,344232e-9,0,.349947,.716213,340835e-9,0,.376633,.695736,332369e-9,0,.404289,.674961,327943e-9,0,.432895,.653518,318533e-9,0,.462415,.632574,310391e-9,0,.492788,.61134,300755e-9,0,.523909,.590017,290506e-9,0,.555556,.568752,280446e-9,0,.587302,.548061,269902e-9,0,.619048,.52711,258815e-9,0,.650794,.506682,248481e-9,0,.68254,.486524,237141e-9,0,.714286,.466812,226872e-9,0,.746032,.44732,216037e-9,0,.777778,.428473,205629e-9,0,.809524,.409921,195691e-9,0,.84127,.392028,185457e-9,0,.873016,.374606,176436e-9,0,.904762,.357601,166508e-9,0,.936508,.341348,158385e-9,0,.968254,.32542,149203e-9,0,1,1,103967e-10,0,0,1,10397e-9,0,0,1,104019e-10,0,0,.999999,104231e-10,0,0,.999998,104806e-10,0,0,.999995,106042e-10,0,0,.999991,108366e-10,0,0,.999982,112415e-10,0,0,.999968,119174e-10,0,0,.99995,130227e-10,0,0,.999922,148176e-10,0,0,.999884,177303e-10,0,0,.99983,224564e-10,0,0,.999758,300966e-10,0,0,.999654,423193e-10,0,549083e-11,.999503,614848e-10,0,296087e-9,.999237,903576e-10,0,.00123144,.998491,1271e-7,0,.00295954,.994594,107754e-9,0,.00555829,.99178,103025e-9,0,.00907209,.989265,11154e-8,0,.0135257,.986998,136296e-9,0,.0189327,.984137,169154e-9,0,.0252993,.979798,196671e-9,0,.0326272,.97337,196678e-9,0,.0409157,.967239,223121e-9,0,.0501623,.959543,253809e-9,0,.0603638,.949466,265972e-9,0,.0715171,.939074,288372e-9,0,.0836187,.931118,310983e-9,0,.0966657,.922525,325561e-9,0,.110656,.912983,345725e-9,0,.125588,.901617,3556e-7,0,.141461,.889487,374012e-9,0,.158275,.875787,383445e-9,0,.176031,.860654,393972e-9,0,.19473,.844417,400311e-9,0,.214374,.82741,405004e-9,0,.234967,.810545,407378e-9,0,.256512,.793312,407351e-9,0,.279011,.774847,406563e-9,0,.302468,.755621,404903e-9,0,.326887,.735511,397486e-9,0,.352266,.715435,39357e-8,0,.378605,.695403,384739e-9,0,.405897,.674681,376108e-9,0,.43413,.65359,365997e-9,0,.463277,.632471,354957e-9,0,.493295,.61151,343593e-9,0,.524106,.59064,331841e-9,0,.555561,.569386,318891e-9,0,.587302,.548785,3072e-7,0,.619048,.528146,29361e-8,0,.650794,.507872,281709e-9,0,.68254,.487805,268627e-9,0,.714286,.468196,255887e-9,0,.746032,.448922,243997e-9,0,.777778,.430093,231662e-9,0,.809524,.411845,220339e-9,0,.84127,.393808,208694e-9,0,.873016,.376615,198045e-9,0,.904762,.359655,187375e-9,0,.936508,.343452,177371e-9,0,.968254,.32765,167525e-9,0,1,1,169351e-10,0,0,1,169356e-10,0,0,1,169427e-10,0,0,.999999,169736e-10,0,0,.999998,170575e-10,0,0,.999995,172372e-10,0,0,.99999,175739e-10,0,0,.999979,181568e-10,0,0,.999966,191206e-10,0,0,.999944,20677e-9,0,0,.999912,231644e-10,0,0,.999869,271268e-10,0,0,.999811,334272e-10,0,0,.99973,433979e-10,0,0,.999617,590083e-10,0,680315e-10,.999445,829497e-10,0,612796e-9,.999138,118019e-9,0,.00187408,.998095,156712e-9,0,.00395791,.993919,125054e-9,0,.00692144,.991333,126091e-9,0,.0107962,.989226,144912e-9,0,.0155986,.986954,175737e-9,0,.0213364,.983982,213883e-9,0,.0280114,.979128,234526e-9,0,.0356226,.973327,243725e-9,0,.0441668,.967416,2773e-7,0,.0536399,.959729,308799e-9,0,.0640376,.949758,322447e-9,0,.0753554,.939173,350021e-9,0,.0875893,.9296,370089e-9,0,.100736,.921181,391365e-9,0,.114793,.91164,413636e-9,0,.129759,.900435,427068e-9,0,.145632,.888183,441046e-9,0,.162412,.874772,454968e-9,0,.180101,.859566,461882e-9,0,.1987,.843579,471556e-9,0,.218213,.826453,474335e-9,0,.238641,.809164,477078e-9,0,.259989,.792179,47755e-8,0,.282262,.773866,472573e-9,0,.305464,.754944,469765e-9,0,.329599,.735133,462371e-9,0,.35467,.714858,453674e-9,0,.380678,.694829,443888e-9,0,.407622,.674453,432052e-9,0,.435493,.653685,420315e-9,0,.464275,.632666,406829e-9,0,.493938,.611676,392234e-9,0,.524422,.591193,379208e-9,0,.555624,.570145,36319e-8,0,.587302,.549566,349111e-9,0,.619048,.529278,334166e-9,0,.650794,.509026,318456e-9,0,.68254,.489186,30449e-8,0,.714286,.469662,289051e-9,0,.746032,.450691,275494e-9,0,.777778,.431841,261437e-9,0,.809524,.413752,247846e-9,0,.84127,.395951,235085e-9,0,.873016,.378633,222245e-9,0,.904762,.36194,210533e-9,0,.936508,.345599,198494e-9,0,.968254,.329999,188133e-9,0,1,1,269663e-10,0,0,1,26967e-9,0,0,1,269772e-10,0,0,.999999,270214e-10,0,0,.999998,271415e-10,0,0,.999994,27398e-9,0,0,.999988,278771e-10,0,0,.999977,287019e-10,0,0,.999961,300544e-10,0,0,.999937,322138e-10,0,0,.999904,356163e-10,0,0,.999854,409465e-10,0,0,.99979,492651e-10,0,0,.999699,621722e-10,0,8.8288e-7,.999572,819715e-10,0,223369e-9,.999381,111689e-9,0,.00105414,.999016,153862e-9,0,.0026493,.997437,187667e-9,0,.00508608,.993545,155672e-9,0,.00840554,.991135,161455e-9,0,.012629,.989157,188241e-9,0,.0177661,.986874,226229e-9,0,.0238198,.983714,268668e-9,0,.0307887,.978301,277109e-9,0,.0386688,.973227,303446e-9,0,.0474554,.967317,341851e-9,0,.0571428,.959477,370885e-9,0,.0677256,.950012,392753e-9,0,.0791988,.939484,42781e-8,0,.0915576,.928135,443866e-9,0,.104798,.919819,472959e-9,0,.118918,.910049,491551e-9,0,.133915,.899181,512616e-9,0,.149788,.886881,523563e-9,0,.166537,.87359,540183e-9,0,.184164,.858613,547386e-9,0,.202669,.842809,554809e-9,0,.222056,.825727,558316e-9,0,.242329,.808086,557824e-9,0,.263492,.790728,556346e-9,0,.285551,.772987,552672e-9,0,.30851,.7541,543738e-9,0,.332376,.734669,536107e-9,0,.357153,.714411,523342e-9,0,.382845,.694196,512238e-9,0,.409454,.674252,497465e-9,0,.436977,.65357,481096e-9,0,.465404,.632999,467054e-9,0,.494713,.611994,448771e-9,0,.524864,.591604,431889e-9,0,.555779,.571134,415238e-9,0,.587302,.550528,396369e-9,0,.619048,.530292,379477e-9,0,.650794,.510364,361488e-9,0,.68254,.490749,343787e-9,0,.714286,.471266,327822e-9,0,.746032,.452462,310626e-9,0,.777778,.433907,295352e-9,0,.809524,.415659,279179e-9,0,.84127,.398138,264685e-9,0,.873016,.380833,249905e-9,0,.904762,.364247,236282e-9,0,.936508,.348041,222905e-9,0,.968254,.332389,210522e-9,0,1,1,420604e-10,0,0,1,420614e-10,0,0,1,420757e-10,0,0,.999999,42138e-9,0,0,.999997,423067e-10,0,0,.999993,426668e-10,0,0,.999986,433372e-10,0,0,.999974,444857e-10,0,0,.999956,463554e-10,0,0,.99993,493105e-10,0,0,.999892,539077e-10,0,0,.999838,610005e-10,0,0,.999767,718822e-10,0,0,.999666,884581e-10,0,365471e-10,.999525,113398e-9,0,485623e-9,.999311,150043e-9,0,.00162096,.998865,200063e-9,0,.00355319,.996278,211014e-9,0,.00633818,.992956,189672e-9,0,.0100043,.991017,210262e-9,0,.0145648,.989055,244292e-9,0,.0200237,.986741,290481e-9,0,.0263798,.983288,334303e-9,0,.033629,.977784,340307e-9,0,.0417652,.973037,377864e-9,0,.0507821,.967181,4239e-7,0,.060673,.958971,443854e-9,0,.0714314,.950093,483039e-9,0,.0830518,.939552,517934e-9,0,.0955288,.927678,539449e-9,0,.108859,.918278,568604e-9,0,.123038,.908449,588505e-9,0,.138065,.897713,612473e-9,0,.153938,.885533,625575e-9,0,.170657,.872131,63854e-8,0,.188224,.857517,647034e-9,0,.20664,.841796,65209e-8,0,.225909,.824726,6544e-7,0,.246035,.807297,655744e-9,0,.267022,.789058,646716e-9,0,.288878,.77189,643898e-9,0,.311607,.753082,629973e-9,0,.335216,.7341,621564e-9,0,.359713,.714094,605171e-9,0,.385103,.693839,588752e-9,0,.41139,.673891,573294e-9,0,.438576,.653565,552682e-9,0,.466656,.633326,533446e-9,0,.495617,.612582,514635e-9,0,.525431,.59205,49303e-8,0,.556041,.571918,471842e-9,0,.587338,.551572,451713e-9,0,.619048,.531553,430049e-9,0,.650794,.51175,410445e-9,0,.68254,.49238,390098e-9,0,.714286,.473143,370033e-9,0,.746032,.45423,351205e-9,0,.777778,.435963,332049e-9,0,.809524,.41787,315021e-9,0,.84127,.400387,297315e-9,0,.873016,.383332,281385e-9,0,.904762,.366665,265397e-9,0,.936508,.350633,250601e-9,0,.968254,.334964,23589e-8,0,1,1,643736e-10,0,0,1,64375e-9,0,0,1,643947e-10,0,0,.999999,64481e-9,0,0,.999997,647143e-10,0,0,.999994,652119e-10,0,0,.999985,661359e-10,0,0,.999972,677116e-10,0,0,.999952,702599e-10,0,0,.999922,742517e-10,0,0,.99988,803906e-10,0,0,.99982,897315e-10,0,0,.999741,103838e-9,0,0,.999629,12496e-8,0,149024e-9,.999474,156161e-9,0,861027e-9,.999229,201034e-9,0,.00231198,.998662,259069e-9,0,.00458147,.995299,245439e-9,0,.00770895,.992732,24498e-8,0,.0117126,.990847,273211e-9,0,.0165989,.988911,316492e-9,0,.0223674,.98654,37161e-8,0,.0290135,.982636,410352e-9,0,.0365309,.977346,421756e-9,0,.0449117,.972909,475578e-9,0,.0541481,.966821,522482e-9,0,.0642326,.958686,545008e-9,0,.075158,.949754,589286e-9,0,.0869181,.939184,619995e-9,0,.0995074,.927505,654266e-9,0,.112922,.916606,682362e-9,0,.127157,.906707,704286e-9,0,.142212,.895937,725909e-9,0,.158085,.883913,743939e-9,0,.174776,.870642,755157e-9,0,.192287,.856241,764387e-9,0,.210619,.84069,771032e-9,0,.229775,.823728,765906e-9,0,.249761,.806481,767604e-9,0,.270582,.787924,754385e-9,0,.292243,.770588,749668e-9,0,.314753,.751991,731613e-9,0,.338118,.733407,717655e-9,0,.362347,.713688,700604e-9,0,.387447,.693595,678765e-9,0,.413424,.673426,657042e-9,0,.440284,.65359,635892e-9,0,.468027,.633576,611569e-9,0,.496645,.613144,586011e-9,0,.526122,.592711,563111e-9,0,.556417,.572722,537699e-9,0,.587451,.552762,512556e-9,0,.619048,.532985,489757e-9,0,.650794,.513219,464139e-9,0,.68254,.493992,442193e-9,0,.714286,.47509,418629e-9,0,.746032,.456287,397045e-9,0,.777778,.438152,375504e-9,0,.809524,.420294,35492e-8,0,.84127,.402749,335327e-9,0,.873016,.385879,316422e-9,0,.904762,.369352,298333e-9,0,.936508,.353301,281417e-9,0,.968254,.337781,265203e-9,0,1,1,968267e-10,0,0,1,968284e-10,0,0,1,968556e-10,0,0,.999999,969733e-10,0,0,.999997,972913e-10,0,0,.999993,979688e-10,0,0,.999984,992239e-10,0,0,.999969,101356e-9,0,0,.999946,104784e-9,0,0,.999913,110111e-9,0,0,.999868,118217e-9,0,0,.999801,130396e-9,0,0,.999712,148523e-9,0,124907e-10,.999589,175233e-9,0,355405e-9,.999416,213999e-9,0,.0013528,.999136,268529e-9,0,.00312557,.998367,333088e-9,0,.00573045,.994701,304757e-9,0,.00919397,.992497,318031e-9,0,.0135261,.990608,353863e-9,0,.0187278,.988715,409044e-9,0,.0247947,.986241,472967e-9,0,.0317196,.981696,495104e-9,0,.039494,.977097,532873e-9,0,.0481087,.972583,594447e-9,0,.0575549,.966142,636867e-9,0,.0678242,.95823,669899e-9,0,.0789089,.949677,719499e-9,0,.0908023,.939226,750584e-9,0,.103499,.927501,793183e-9,0,.116993,.915199,81995e-8,0,.131282,.90498,847654e-9,0,.146364,.894243,868929e-9,0,.162237,.882154,884278e-9,0,.178902,.869161,898108e-9,0,.196358,.854751,901254e-9,0,.21461,.839368,90679e-8,0,.23366,.822874,901541e-9,0,.253512,.805514,897297e-9,0,.274174,.78716,881856e-9,0,.29565,.769061,870032e-9,0,.31795,.751,851719e-9,0,.341081,.732614,830671e-9,0,.365053,.713171,806569e-9,0,.389874,.693472,78338e-8,0,.415553,.673528,756404e-9,0,.442098,.653397,726872e-9,0,.469512,.633781,700494e-9,0,.497794,.613877,67105e-8,0,.526935,.593506,640361e-9,0,.556908,.573667,613502e-9,0,.587657,.553932,583177e-9,0,.61906,.534345,554375e-9,0,.650794,.515042,527811e-9,0,.68254,.495674,499367e-9,0,.714286,.477132,47429e-8,0,.746032,.458609,447726e-9,0,.777778,.440354,424205e-9,0,.809524,.422765,399549e-9,0,.84127,.405472,378315e-9,0,.873016,.388482,355327e-9,0,.904762,.372191,336122e-9,0,.936508,.356099,315247e-9,0,.968254,.340737,29794e-8,0,1,1,143327e-9,0,0,1,14333e-8,0,0,1,143366e-9,0,0,.999999,143524e-9,0,0,.999996,143952e-9,0,0,.999991,144862e-9,0,0,.999981,146544e-9,0,0,.999966,149391e-9,0,0,.999941,153946e-9,0,0,.999905,160971e-9,0,0,.999852,171562e-9,0,0,.99978,18729e-8,0,0,.999681,210386e-9,0,826239e-10,.999546,243906e-9,0,664807e-9,.999352,291739e-9,0,.00196192,.999027,357419e-9,0,.00405941,.997886,422349e-9,0,.00699664,.99419,385008e-9,0,.0107896,.99214,409775e-9,0,.0154415,.990274,456418e-9,0,.0209488,.988455,527008e-9,0,.0273037,.985804,597685e-9,0,.0344969,.98103,613124e-9,0,.0425183,.976674,668321e-9,0,.0513575,.972021,736985e-9,0,.0610046,.965274,773789e-9,0,.0714508,.958046,830852e-9,0,.0826877,.949333,875766e-9,0,.0947085,.939135,917088e-9,0,.107507,.927119,952244e-9,0,.121078,.91469,990626e-9,0,.135419,.903006,.00101304,0,.150526,.892368,.00103834,0,.166399,.880231,.00105002,0,.183038,.867432,.00106331,0,.200443,.853208,.00106783,0,.218618,.837956,.00106458,0,.237566,.821772,.00105945,0,.257291,.804328,.00104685,0,.2778,.786465,.00103178,0,.2991,.768004,.00101077,0,.321199,.74972,985504e-9,0,.344106,.731682,962893e-9,0,.36783,.712813,932146e-9,0,.392383,.693139,89871e-8,0,.417774,.673566,869678e-9,0,.444013,.653483,835525e-9,0,.471107,.633891,799853e-9,0,.49906,.614433,766838e-9,0,.527869,.594586,732227e-9,0,.557517,.574769,696442e-9,0,.587966,.555149,663935e-9,0,.61913,.535898,629826e-9,0,.650794,.516753,596486e-9,0,.68254,.497816,567078e-9,0,.714286,.479034,534399e-9,0,.746032,.460975,507013e-9,0,.777778,.442935,477421e-9,0,.809524,.425263,451101e-9,0,.84127,.408248,424964e-9,0,.873016,.391339,39993e-8,0,.904762,.37513,377619e-9,0,.936508,.359172,354418e-9,0,.968254,.343876,334823e-9,0,1,1,209042e-9,0,0,1,209045e-9,0,0,1,209093e-9,0,0,.999999,209304e-9,0,0,.999996,209871e-9,0,0,.999991,211078e-9,0,0,.999979,213304e-9,0,0,.999963,217061e-9,0,0,.999933,223042e-9,0,0,.999894,232206e-9,0,0,.999837,245901e-9,0,0,.999756,266023e-9,0,102927e-11,.999648,295204e-9,0,233468e-9,.999499,336958e-9,0,.00108237,.999283,395563e-9,0,.00268832,.998896,473785e-9,0,.00511138,.997006,520008e-9,0,.00837705,.993819,497261e-9,0,.0124928,.991632,523722e-9,0,.0174561,.989875,587258e-9,0,.0232596,.988109,676329e-9,0,.0298932,.985155,747701e-9,0,.0373453,.980479,768803e-9,0,.0456045,.976271,841054e-9,0,.0546593,.971347,911469e-9,0,.0644994,.964528,953057e-9,0,.0751152,.957632,.00102221,0,.0864981,.948681,.00106122,0,.0986407,.938716,.00111857,0,.111537,.926629,.00114762,0,.125182,.914025,.00118995,0,.139571,.901026,.00121228,0,.154703,.890358,.00123946,0,.170576,.878283,.0012527,0,.18719,.865459,.00125536,0,.204547,.851407,.00126134,0,.222648,.836276,.00124759,0,.241498,.820436,.00124443,0,.261101,.803253,.00122071,0,.281465,.785562,.00120107,0,.302595,.76718,.00117762,0,.324501,.748551,.00114289,0,.347192,.730564,.00110872,0,.370679,.712253,.00107636,0,.394973,.692867,.00103646,0,.420085,.673695,996793e-9,0,.446027,.653912,95675e-8,0,.47281,.634129,916739e-9,0,.500441,.615004,874401e-9,0,.528921,.595587,833411e-9,0,.558244,.575965,794556e-9,0,.588384,.5566,75196e-8,0,.619281,.537428,716381e-9,0,.650795,.518623,676558e-9,0,.68254,.499964,64074e-8,0,.714286,.481356,605984e-9,0,.746032,.463279,570256e-9,0,.777778,.445673,540138e-9,0,.809524,.428032,507299e-9,0,.84127,.411112,479553e-9,0,.873016,.394444,450737e-9,0,.904762,.378247,424269e-9,0,.936508,.362415,399111e-9,0,.968254,.347103,375274e-9,0,1,1,300729e-9,0,0,1,300733e-9,0,0,1,300797e-9,0,0,.999998,301072e-9,0,0,.999996,301817e-9,0,0,.999989,303398e-9,0,0,.999977,306309e-9,0,0,.999958,311209e-9,0,0,.999927,318975e-9,0,0,.999884,330804e-9,0,0,.99982,34834e-8,0,0,.999733,373854e-9,0,326995e-10,.999613,410424e-9,0,477174e-9,.999447,462047e-9,0,.00161099,.999204,533322e-9,0,.00353153,.998725,624964e-9,0,.00627965,.995871,631786e-9,0,.0098693,.993194,632017e-9,0,.0143011,.991541,68923e-8,0,.019568,.989773,766892e-9,0,.0256593,.987647,863668e-9,0,.0325625,.984193,922089e-9,0,.0402647,.980016,970749e-9,0,.0487532,.975859,.00106027,0,.058016,.970514,.00112239,0,.0680419,.963625,.00117212,0,.0788208,.956959,.00125211,0,.0903439,.947956,.00129411,0,.102604,.93809,.00135879,0,.115594,.92659,.00139309,0,.129309,.913829,.00143253,0,.143745,.90005,.00145809,0,.158901,.888129,.0014748,0,.174774,.87607,.00148756,0,.191365,.863461,.00148714,0,.208674,.849594,.00148892,0,.226705,.834531,.00146496,0,.245461,.81903,.0014579,0,.264947,.802122,.00143039,0,.28517,.78445,.00139717,0,.306137,.766434,.00136312,0,.327857,.747816,.00132597,0,.350341,.729519,.00128323,0,.373598,.711454,.00123803,0,.397642,.692699,.00119097,0,.422485,.673723,.00114565,0,.448139,.654386,.00109552,0,.474619,.634673,.00104553,0,.501933,.615554,99985e-8,0,.530089,.596462,948207e-9,0,.559087,.577385,902299e-9,0,.588913,.558257,856448e-9,0,.619525,.5392,810395e-9,0,.650826,.520543,768558e-9,0,.68254,.502206,7239e-7,0,.714286,.48402,685794e-9,0,.746032,.465779,64471e-8,0,.777778,.448455,609583e-9,0,.809524,.431091,57227e-8,0,.84127,.414147,54042e-8,0,.873016,.39765,506545e-9,0,.904762,.381576,477635e-9,0,.936508,.365881,448446e-9,0,.968254,.350582,421424e-9,0,1,1,427144e-9,0,0,1,427151e-9,0,0,1,427232e-9,0,0,.999998,42759e-8,0,0,.999995,428555e-9,0,0,.999988,430603e-9,0,0,.999976,434368e-9,0,0,.999952,440688e-9,0,0,.999919,450667e-9,0,0,.999871,46578e-8,0,0,.999801,488024e-9,0,0,.999704,520092e-9,0,129791e-9,.999572,565553e-9,0,821056e-9,.999389,628906e-9,0,.00225241,.999114,714911e-9,0,.00449109,.998488,819218e-9,0,.00756249,.995234,80415e-8,0,.0114716,.993021,830181e-9,0,.0162131,.991407,902645e-9,0,.021776,.989625,996934e-9,0,.0281471,.987064,.00109707,0,.0353118,.983265,.00114353,0,.0432562,.979535,.0012272,0,.0519665,.975224,.00132642,0,.0614298,.969574,.00138092,0,.0716348,.963021,.00145896,0,.0825709,.956046,.00152834,0,.094229,.947136,.00158217,0,.106602,.937313,.0016347,0,.119682,.926073,.00168383,0,.133465,.913121,.00171627,0,.147947,.899165,.00174229,0,.163125,.885891,.00176137,0,.178998,.873783,.00176406,0,.195566,.861331,.00176156,0,.21283,.847569,.00175346,0,.230793,.832785,.00172753,0,.249459,.817442,.00170204,0,.268832,.800613,.00166576,0,.28892,.783597,.00162909,0,.30973,.76571,.0015826,0,.331271,.747021,.00153106,0,.353554,.728593,.00148036,0,.37659,.710661,.00142808,0,.400391,.692426,.00136906,0,.424973,.673623,.00131066,0,.450347,.65494,.00125569,0,.476531,.635448,.00119517,0,.503535,.616221,.00113828,0,.531372,.597531,.0010816,0,.560047,.578795,.00102673,0,.589554,.559892,970985e-9,0,.619869,.541307,919773e-9,0,.650923,.522608,868479e-9,0,.68254,.504484,82137e-8,0,.714286,.486603,772916e-9,0,.746032,.468802,730353e-9,0,.777778,.451172,684955e-9,0,.809524,.434348,647565e-9,0,.84127,.417445,605863e-9,0,.873016,.401077,571885e-9,0,.904762,.385039,536034e-9,0,.936508,.369483,504227e-9,0,.968254,.354272,473165e-9,0,1,1,599525e-9,0,0,1,599533e-9,0,0,1,599639e-9,0,0,.999998,600097e-9,0,0,.999994,601336e-9,0,0,.999987,603958e-9,0,0,.999972,608775e-9,0,0,.999949,616842e-9,0,0,.999912,629534e-9,0,0,.999857,648658e-9,0,0,.999781,676615e-9,0,538873e-11,.999674,716574e-9,0,308602e-9,.999528,772641e-9,0,.00127003,.999326,849806e-9,0,.00300783,.999009,952682e-9,0,.00556637,.998112,.00106394,0,.00895889,.994496,.00102228,0,.0131827,.992806,.00108586,0,.0182277,.991211,.0011759,0,.0240795,.989415,.00128955,0,.030723,.986499,.00139038,0,.0381418,.982679,.00144539,0,.046321,.978839,.00153954,0,.0552459,.974295,.00164417,0,.0649034,.968784,.00171517,0,.0752814,.962324,.00180282,0,.0863693,.954956,.00186387,0,.0981578,.94624,.00193817,0,.110639,.936517,.00198156,0,.123806,.925186,.00203042,0,.137655,.91252,.0020664,0,.15218,.898441,.00207822,0,.16738,.884394,.0020992,0,.183253,.871273,.00208748,0,.199799,.859057,.00208686,0,.21702,.845243,.00205519,0,.234918,.830723,.00202868,0,.253496,.815801,.00199501,0,.272761,.79914,.00194193,0,.292719,.782372,.00188824,0,.313377,.76482,.00183695,0,.334745,.746586,.00177418,0,.356833,.7281,.00170628,0,.379654,.709842,.00164063,0,.403221,.692019,.00157355,0,.427548,.67364,.00150262,0,.452651,.655277,.00143473,0,.478545,.636438,.00136371,0,.505246,.617364,.00129911,0,.532768,.598603,.00123014,0,.561122,.580195,.00116587,0,.590309,.561786,.00110398,0,.620318,.543377,.00104148,0,.651102,.525093,983984e-9,0,.682545,.506791,92667e-8,0,.714286,.489291,874326e-9,0,.746032,.471811,821734e-9,0,.777778,.454435,774698e-9,0,.809524,.437493,727302e-9,0,.84127,.420977,684039e-9,0,.873016,.404729,64373e-8,0,.904762,.388756,60285e-8,0,.936508,.373344,56765e-8,0,.968254,.358191,531929e-9,0,1,1,832169e-9,0,0,1,832178e-9,0,0,1,83231e-8,0,0,.999998,832893e-9,0,0,.999995,834465e-9,0,0,.999985,837791e-9,0,0,.999969,843893e-9,0,0,.999944,854086e-9,0,0,.999903,870071e-9,0,0,.999843,894042e-9,0,0,.999759,928865e-9,0,531805e-10,.999643,978242e-9,0,579365e-9,.99948,.00104684,0,.00182774,.999255,.00114012,0,.00387804,.998885,.00126188,0,.00675709,.997405,.00135888,0,.010468,.99424,.00133626,0,.0150018,.992458,.00140905,0,.0203443,.990929,.00152305,0,.0264786,.989116,.00165882,0,.0333875,.985624,.00174128,0,.0410536,.982003,.00182108,0,.0494609,.978336,.00194498,0,.0585941,.973184,.00202708,0,.0684396,.9678,.00212166,0,.0789851,.961348,.00221366,0,.0902199,.953841,.00228219,0,.102134,.94534,.00235662,0,.114721,.935552,.00240572,0,.127972,.924064,.00244405,0,.141884,.911827,.00247557,0,.156451,.897731,.00248374,0,.171672,.883409,.00249863,0,.187545,.868625,.00246688,0,.20407,.856529,.00246523,0,.221249,.842999,.00242368,0,.239083,.828505,.00237354,0,.257578,.813825,.00232588,0,.276738,.797813,.00226731,0,.296569,.781097,.00219704,0,.31708,.764038,.00212394,0,.338281,.746067,.00204786,0,.360181,.727687,.00196728,0,.382794,.709571,.00188779,0,.406133,.691503,.00180532,0,.430213,.673673,.00171849,0,.45505,.655732,.00164147,0,.480662,.637399,.00155858,0,.507065,.618616,.00147641,0,.534278,.60005,.00140125,0,.562313,.581713,.00132441,0,.59118,.563546,.00125014,0,.620875,.545605,.00118249,0,.651373,.527559,.0011116,0,.682593,.509764,.00104979,0,.714286,.49193,985977e-9,0,.746032,.475011,928592e-9,0,.777778,.457878,873466e-9,0,.809524,.440979,819585e-9,0,.84127,.424613,772365e-9,0,.873016,.408549,722195e-9,0,.904762,.392771,680014e-9,0,.936508,.377317,636797e-9,0,.968254,.362352,598318e-9,0,1,1,.00114313,0,0,1,.00114314,0,0,.999999,.00114331,0,0,.999998,.00114404,0,0,.999994,.00114601,0,0,.999984,.00115019,0,0,.999967,.00115784,0,0,.999937,.0011706,0,0,.999894,.00119054,0,0,.999828,.00122031,0,0,.999735,.00126331,0,169263e-9,.999606,.00132382,0,949167e-9,.999426,.0014071,0,.00249668,.999173,.00151895,0,.00486392,.99873,.00166102,0,.00806323,.996243,.0017023,0,.0120895,.993779,.00172782,0,.0169288,.9919,.0018108,0,.0225633,.990524,.00196028,0,.028974,.98868,.00212014,0,.036142,.984663,.00217598,0,.044049,.981457,.00230563,0,.0526781,.977608,.00243966,0,.0620137,.972215,.00251336,0,.0720418,.966798,.0026285,0,.0827499,.960241,.00271409,0,.0941271,.952489,.00278381,0,.106164,.944127,.00285399,0,.118852,.934282,.00290994,0,.132185,.923271,.00294558,0,.146157,.910803,.00296269,0,.160766,.896705,.00296803,0,.176007,.88238,.00296637,0,.19188,.867116,.00293163,0,.208385,.853636,.00289418,0,.225523,.840469,.00284663,0,.243296,.82639,.00278594,0,.261709,.811759,.00271618,0,.280767,.796113,.00263187,0,.300476,.779518,.00254589,0,.320845,.763142,.00246003,0,.341883,.745464,.00236529,0,.363601,.727491,.00226536,0,.386011,.709414,.00216375,0,.409128,.691396,.00207127,0,.432967,.67368,.00197106,0,.457545,.656049,.00187022,0,.482881,.638188,.00177605,0,.508992,.620177,.00168482,0,.535899,.601506,.00158909,0,.563619,.58362,.00150583,0,.592165,.565496,.00141791,0,.621544,.54789,.00133693,0,.651743,.530323,.00126038,0,.682709,.512795,.00118556,0,.714286,.495199,.00111527,0,.746032,.478101,.0010489,0,.777778,.461511,984264e-9,0,.809524,.444879,92591e-8,0,.84127,.428424,866582e-9,0,.873016,.412495,814463e-9,0,.904762,.396975,764498e-9,0,.936508,.381614,715967e-9,0,.968254,.366732,672483e-9,0,1,1,.00155501,0,0,1,.00155503,0,0,1,.00155524,0,0,.999998,.00155615,0,0,.999994,.0015586,0,0,.999983,.00156379,0,0,.999963,.0015733,0,0,.999932,.00158911,0,0,.999882,.00161376,0,0,.99981,.00165041,0,100875e-10,.999708,.00170304,0,367658e-9,.999565,.00177658,0,.0014234,.999368,.00187688,0,.00327939,.999081,.00200989,0,.00596629,.99852,.00217177,0,.0094852,.99549,.0021745,0,.013824,.993252,.00222357,0,.0189642,.991727,.00235022,0,.0248856,.989951,.00250561,0,.0315669,.988029,.00268829,0,.0389882,.984029,.0027496,0,.0471302,.980683,.00289793,0,.0559754,.976554,.00303315,0,.0655081,.97139,.00313257,0,.0757138,.965544,.00323656,0,.08658,.95912,.00333432,0,.0980954,.951183,.0034039,0,.110251,.942974,.00347515,0,.123038,.932642,.00350381,0,.13645,.922158,.00354519,0,.150482,.909404,.00353851,0,.165129,.896071,.0035435,0,.18039,.881206,.00349936,0,.196263,.866077,.00347256,0,.212748,.85093,.003415,0,.229847,.837703,.00333367,0,.247561,.823878,.003249,0,.265895,.809449,.00316347,0,.284854,.794379,.00306351,0,.304445,.778138,.0029499,0,.324675,.761997,.00284099,0,.345555,.744938,.00272104,0,.367095,.727212,.00260715,0,.389309,.709549,.00248855,0,.41221,.691704,.00236783,0,.435814,.673689,.00225178,0,.460138,.656453,.00213765,0,.485203,.639128,.00202178,0,.511028,.621512,.00191443,0,.537634,.603598,.00180977,0,.565041,.58559,.00170456,0,.593268,.567852,.00160927,0,.622327,.5503,.00151395,0,.652217,.533033,.00142499,0,.682907,.515942,.00133955,0,.714296,.498814,.0012602,0,.746032,.481595,.00118188,0,.777778,.465117,.00111171,0,.809524,.448865,.00104091,0,.84127,.432711,976618e-9,0,.873016,.416822,91859e-8,0,.904762,.401272,857704e-9,0,.936508,.386226,807172e-9,0,.968254,.371321,75464e-8,0,1,1,.00209596,0,0,1,.00209598,0,0,1,.00209624,0,0,.999997,.00209736,0,0,.999991,.00210039,0,0,.999979,.00210678,0,0,.999959,.00211847,0,0,.999925,.0021379,0,0,.99987,.00216809,0,0,.999791,.00221281,0,681487e-10,.999677,.00227669,0,658161e-9,.999521,.00236533,0,.00200635,.999301,.00248514,0,.0041779,.998977,.00264185,0,.00718648,.998191,.00281695,0,.0110239,.994801,.00278518,0,.015672,.993091,.00288774,0,.0211091,.991571,.00303931,0,.0273123,.9897,.00321643,0,.034259,.987023,.00337332,0,.0419282,.983289,.00346146,0,.0502998,.979892,.00363704,0,.0593562,.975111,.00373601,0,.069081,.970351,.0038842,0,.0794598,.964131,.00397053,0,.0904798,.957747,.00408078,0,.10213,.949536,.00413533,0,.1144,.941372,.00420305,0,.127284,.931049,.00422815,0,.140772,.920647,.00425048,0,.154862,.908033,.0042281,0,.169548,.895028,.00422026,0,.184828,.879968,.00415042,0,.200701,.864875,.00408821,0,.217167,.84918,.00400909,0,.234227,.834934,.00391178,0,.251884,.821397,.00380066,0,.270141,.807135,.00367974,0,.289004,.792363,.00355172,0,.308479,.776661,.003411,0,.328575,.760705,.00328123,0,.349301,.744408,.00314003,0,.370668,.726994,.0029906,0,.392689,.709598,.00285034,0,.415379,.692112,.00271179,0,.438754,.674435,.00257185,0,.46283,.65676,.00243425,0,.48763,.639982,.00230351,0,.513173,.622983,.0021777,0,.539482,.605471,.00204991,0,.566579,.58796,.00193759,0,.594488,.570463,.00181976,0,.623226,.553058,.00171497,0,.6528,.535894,.00161109,0,.683198,.519089,.00151394,0,.714354,.502454,.00142122,0,.746032,.485681,.00133488,0,.777778,.468935,.00124975,0,.809524,.452951,.00117309,0,.84127,.437139,.00110155,0,.873016,.421446,.00103124,0,.904762,.405951,966387e-9,0,.936508,.391003,908119e-9,0,.968254,.376198,848057e-9,0,1,1,.00280076,0,0,1,.00280078,0,0,.999999,.00280109,0,0,.999997,.00280246,0,0,.999992,.00280616,0,0,.999979,.00281396,0,0,.999956,.00282822,0,0,.999916,.00285186,0,0,.999857,.0028885,0,0,.999768,.00294259,0,196026e-9,.999645,.00301946,0,.00104842,.99947,.00312541,0,.00270199,.999229,.00326733,0,.00519449,.998852,.00344992,0,.00852602,.997558,.00361052,0,.0126804,.994417,.0035898,0,.017635,.992824,.00372393,0,.023365,.991344,.00390695,0,.0298456,.989337,.00410392,0,.0370529,.985811,.00420987,0,.0449651,.982772,.00437488,0,.0535615,.979001,.00455069,0,.0628243,.974102,.00464462,0,.0727368,.969197,.00480577,0,.0832844,.962759,.00487818,0,.0944545,.956207,.00498176,0,.106236,.947909,.00503392,0,.118619,.939596,.00507474,0,.131595,.929642,.00509798,0,.145159,.918807,.00508476,0,.159305,.906921,.00505634,0,.174028,.893312,.00498845,0,.189327,.878933,.0049133,0,.2052,.863986,.0048259,0,.221647,.847936,.00470848,0,.23867,.832253,.00456889,0,.25627,.818619,.00442726,0,.274453,.804788,.00427677,0,.293222,.790241,.00411906,0,.312585,.775162,.00394833,0,.33255,.759463,.00377366,0,.353126,.743598,.00361026,0,.374324,.72697,.00343627,0,.396158,.709646,.00326422,0,.418641,.69277,.00309717,0,.44179,.675371,.0029356,0,.465624,.657863,.00277712,0,.490163,.640772,.00261738,0,.515429,.624441,.0024737,0,.541445,.607497,.00233125,0,.568236,.590438,.00218994,0,.595828,.573224,.0020664,0,.624242,.556168,.00193526,0,.653496,.539232,.00182463,0,.683588,.522352,.00170735,0,.714482,.506172,.00160555,0,.746032,.489842,.00150451,0,.777778,.473463,.00140938,0,.809524,.457266,.00132568,0,.84127,.441609,.0012376,0,.873016,.426348,.00116265,0,.904762,.411002,.00108935,0,.936508,.396045,.00101946,0,.968254,.381448,955665e-9,0,1,1,.0037121,0,0,1,.00371213,0,0,1,.00371251,0,0,.999997,.00371417,0,0,.99999,.00371863,0,0,.999977,.00372807,0,0,.99995,.00374529,0,0,.999908,.0037738,0,0,.999843,.00381789,0,123596e-10,.999745,.00388273,0,407442e-9,.999608,.00397443,0,.0015447,.999415,.00409998,0,.00351385,.999143,.00426662,0,.0063316,.9987,.00447625,0,.00998679,.996363,.00455323,0,.0144569,.994021,.00461052,0,.0197151,.992372,.00476359,0,.0257344,.991007,.00499101,0,.0324882,.988767,.0051972,0,.0399517,.984872,.00528407,0,.0481022,.982004,.00548926,0,.0569191,.977714,.00564385,0,.0663839,.973076,.0057693,0,.0764801,.967565,.0058924,0,.0871928,.961384,.00599629,0,.0985095,.954435,.00605998,0,.110419,.946303,.0061133,0,.122912,.937662,.00612028,0,.13598,.927867,.00612209,0,.149617,.916475,.00604813,0,.163817,.90541,.00603088,0,.178577,.891591,.00592218,0,.193894,.877573,.00578854,0,.209767,.862511,.00566648,0,.226196,.846861,.00551481,0,.243182,.83068,.00533754,0,.260728,.815725,.00515487,0,.278837,.802321,.0049655,0,.297515,.787826,.00475421,0,.316768,.773454,.00456002,0,.336605,.758224,.00434727,0,.357034,.74265,.00414444,0,.378067,.726729,.00393738,0,.399717,.710155,.00373575,0,.421998,.693312,.00353736,0,.444928,.67653,.00334368,0,.468523,.659444,.00315981,0,.492806,.642051,.00297809,0,.517798,.625758,.00280592,0,.543525,.609615,.00264254,0,.570012,.592919,.00248459,0,.597288,.576298,.00233327,0,.625379,.559489,.00219519,0,.654307,.542891,.00205441,0,.684084,.526255,.00193385,0,.714693,.509853,.00180745,0,.746044,.494131,.00169817,0,.777778,.478114,.0015913,0,.809524,.462274,.00148981,0,.84127,.446412,.00139537,0,.873016,.431274,.00130984,0,.904762,.41635,.00122403,0,.936508,.401476,.00114809,0,.968254,.386993,.00107563,0,1,1,.00488216,0,0,1,.0048822,0,0,1,.00488265,0,0,.999997,.00488463,0,0,.999988,.00488999,0,0,.999974,.00490129,0,0,.999946,.00492191,0,0,.999897,.00495598,0,0,.999825,.00500855,0,744791e-10,.999718,.00508559,0,712744e-9,.999565,.005194,0,.00215249,.999352,.00534147,0,.00444576,.999046,.00553523,0,.00759218,.998492,.00577016,0,.0115714,.995564,.00578487,0,.0163557,.993339,.00586414,0,.021915,.991834,.00606002,0,.0282201,.990496,.00633312,0,.0352433,.987826,.00651941,0,.042959,.98383,.00660842,0,.0513439,.98109,.00685523,0,.0603772,.976131,.00695778,0,.0700402,.971922,.00714236,0,.0803163,.965901,.00721437,0,.0911908,.959606,.00732017,0,.102651,.952504,.00735788,0,.114686,.944365,.00738493,0,.127286,.935652,.00737969,0,.140443,.925813,.00733612,0,.154151,.914397,.00723094,0,.168405,.903257,.00714002,0,.183201,.890015,.00700149,0,.198536,.876014,.00682813,0,.214409,.861436,.00665567,0,.23082,.845752,.00644526,0,.24777,.829169,.00621635,0,.265263,.813435,.00597789,0,.283301,.799701,.00575694,0,.301889,.785726,.00549866,0,.321035,.77152,.0052503,0,.340746,.75683,.00499619,0,.361032,.741951,.0047543,0,.381904,.726367,.0045084,0,.403374,.710537,.00426784,0,.425457,.693965,.00403487,0,.448169,.677724,.0038075,0,.47153,.66117,.00359431,0,.495561,.644274,.00338354,0,.520284,.627449,.00318163,0,.545725,.611645,.00299672,0,.571911,.595614,.00281016,0,.598873,.579426,.00264252,0,.62664,.563016,.00247509,0,.655239,.546728,.00232647,0,.684692,.530539,.00217803,0,.714999,.514164,.00204216,0,.746106,.498344,.00191403,0,.777778,.482957,.00179203,0,.809524,.467336,.00167695,0,.84127,.451994,.00157567,0,.873016,.436514,.00147113,0,.904762,.42178,.00138034,0,.936508,.407271,.00129219,0,.968254,.392822,.0012098,0,1,1,.00637427,0,0,1,.00637431,0,0,.999999,.00637485,0,0,.999996,.00637721,0,0,.999987,.00638357,0,0,.999971,.006397,0,0,.999939,.00642142,0,0,.999888,.00646177,0,0,.999807,.00652387,0,207916e-9,.999689,.00661454,0,.00112051,.99952,.00674155,0,.00287719,.999283,.00691313,0,.00550145,.998936,.00713598,0,.00897928,.998165,.00738501,0,.0132829,.994847,.00734388,0,.01838,.993182,.00749991,0,.0242381,.991665,.0077246,0,.030826,.989708,.00797579,0,.0381152,.986663,.00813011,0,.0460794,.983288,.00830365,0,.0546951,.980104,.00853496,0,.0639411,.974855,.00861045,0,.0737988,.97045,.00879133,0,.0842516,.964509,.00886377,0,.0952848,.957594,.00890346,0,.106886,.950546,.00893289,0,.119044,.942225,.00890074,0,.131749,.933365,.00886826,0,.144994,.923202,.0087316,0,.158772,.912605,.00863082,0,.173078,.901099,.00847403,0,.187908,.888177,.00825838,0,.203261,.873955,.00801834,0,.219134,.860091,.00779026,0,.235527,.84434,.00752478,0,.252443,.828517,.00724074,0,.269883,.81239,.00693769,0,.287851,.79721,.00664817,0,.306352,.783489,.00634763,0,.325393,.769514,.00604221,0,.344981,.755419,.00573568,0,.365126,.741083,.00544359,0,.385839,.726059,.00515515,0,.407132,.710809,.00487139,0,.42902,.695052,.00459846,0,.45152,.678886,.00433412,0,.474651,.663042,.00407981,0,.498433,.646634,.00384264,0,.52289,.630117,.00360897,0,.548048,.613804,.00338863,0,.573936,.598338,.00318486,0,.600584,.582687,.00298377,0,.628027,.566809,.00280082,0,.656295,.550817,.00262255,0,.685417,.534937,.00245835,0,.715406,.519151,.00230574,0,.74624,.503118,.0021549,0,.777778,.487723,.00202008,0,.809524,.472725,.00189355,0,.84127,.457599,.00177108,0,.873016,.442558,.00165843,0,.904762,.427624,.00155494,0,.936508,.413171,.00145273,0,.968254,.399122,.00136454,0,1,1,.00826496,0,0,1,.00826499,0,0,1,.00826564,0,0,.999996,.00826842,0,0,.999987,.00827589,0,0,.999967,.00829167,0,0,.999933,.00832037,0,0,.999876,.00836768,0,109338e-10,.999786,.00844031,0,427145e-9,.999655,.00854603,0,.0016384,.999468,.00869337,0,.00372392,.999203,.008891,0,.00668513,.998803,.00914387,0,.0104968,.99748,.00935838,0,.015125,.994446,.00933309,0,.0205338,.99292,.00953084,0,.0266884,.991414,.0097893,0,.0335565,.989049,.0100228,0,.0411086,.98582,.0101664,0,.0493181,.982441,.0103582,0,.0581613,.978595,.0105292,0,.0676169,.973495,.0106274,0,.0776661,.968405,.0107261,0,.0882926,.962717,.0108234,0,.0994817,.955478,.0108102,0,.111221,.948275,.0107914,0,.123499,.940006,.0107161,0,.136308,.930831,.0106309,0,.149639,.920648,.0104083,0,.163485,.910205,.0102312,0,.177843,.898445,.0100051,0,.192707,.885986,.00971928,0,.208077,.872204,.00940747,0,.22395,.858436,.0091085,0,.240326,.843454,.00876595,0,.257208,.827437,.00839794,0,.274596,.811488,.00803692,0,.292496,.796039,.00767352,0,.310911,.781083,.0073097,0,.329849,.767642,.00694032,0,.349316,.753901,.00657476,0,.369323,.740131,.00622699,0,.38988,.725845,.0058838,0,.410999,.710991,.00555586,0,.432696,.696002,.00523089,0,.454987,.680461,.00492494,0,.47789,.664875,.00463464,0,.501426,.649273,.00435422,0,.52562,.63302,.0040875,0,.550498,.61705,.00384075,0,.576089,.601154,.00359557,0,.602427,.586008,.00337636,0,.629544,.570699,.00316019,0,.657479,.555166,.00296033,0,.686264,.539645,.00277552,0,.715924,.524159,.00259499,0,.746459,.508682,.00243257,0,.777789,.493163,.00227851,0,.809524,.478004,.00213083,0,.84127,.46347,.00199502,0,.873016,.448778,.00186967,0,.904762,.434105,.00174732,0,.936508,.419576,.00163861,0,.968254,.405541,.00153341,0,1,1,.0106462,0,0,1,.0106462,0,0,.999999,.010647,0,0,.999995,.0106502,0,0,.999985,.0106589,0,0,.999964,.0106773,0,0,.999925,.0107106,0,0,.999861,.0107655,0,712986e-10,.999763,.0108497,0,743959e-9,.999616,.0109716,0,.00227361,.999408,.0111408,0,.0046983,.999112,.0113659,0,.00800158,.998637,.0116475,0,.0121493,.996223,.0117231,0,.0171023,.994006,.0118064,0,.0228218,.992444,.0120254,0,.0292711,.991028,.0123314,0,.036417,.98803,.0124954,0,.0442295,.984816,.0126538,0,.0526815,.981399,.0128537,0,.0617492,.977085,.0129694,0,.0714114,.972154,.013091,0,.0816495,.966617,.0131166,0,.0924472,.960628,.0131583,0,.10379,.953295,.0131094,0,.115665,.94575,.0129966,0,.128062,.937654,.0128796,0,.140972,.927716,.0126477,0,.154387,.917932,.0123889,0,.168301,.907719,.012131,0,.182709,.89584,.0118013,0,.197608,.883526,.0114145,0,.212994,.870301,.0110075,0,.228867,.856272,.0106019,0,.245227,.842251,.0101938,0,.262074,.826466,.00973254,0,.279412,.810859,.0092846,0,.297244,.795051,.00883304,0,.315575,.780053,.00840272,0,.334412,.76575,.00796438,0,.35376,.752298,.00752526,0,.373631,.739153,.00711486,0,.394034,.725514,.00670361,0,.414983,.711473,.00632656,0,.436491,.696936,.00595206,0,.458575,.682126,.00559191,0,.481253,.667027,.00525362,0,.504547,.651875,.00493805,0,.528481,.636463,.00462848,0,.553081,.620641,.00433936,0,.578377,.604931,.00407,0,.604404,.589549,.00380864,0,.631197,.574712,.00357049,0,.658795,.559775,.00334466,0,.687238,.544514,.00312505,0,.716559,.529555,.00293199,0,.746776,.514402,.00274204,0,.777849,.499302,.00256647,0,.809524,.484114,.00239901,0,.84127,.469308,.00225148,0,.873016,.455133,.00210178,0,.904762,.440939,.0019727,0,.936508,.426627,.00184382,0,.968254,.412509,.00172548,0,1,1,.013628,0,0,1,.0136281,0,0,.999999,.0136289,0,0,.999995,.0136327,0,0,.999983,.0136427,0,0,.99996,.0136638,0,0,.999917,.0137022,0,0,.999846,.0137652,0,204597e-9,.999736,.0138615,0,.00116837,.999573,.0140007,0,.00303325,.99934,.0141927,0,.00580613,.999004,.0144457,0,.00945626,.998407,.0147489,0,.0139421,.995464,.014731,0,.0192202,.993328,.0148283,0,.0252495,.991799,.0150797,0,.0319921,.990397,.0154316,0,.0394138,.986835,.0155005,0,.0474843,.983938,.0157308,0,.0561763,.980154,.0158753,0,.0654661,.975659,.0159581,0,.0753326,.970171,.0159832,0,.0857571,.964803,.0160084,0,.0967236,.958366,.0159484,0,.108218,.950613,.0158001,0,.120227,.942874,.0155845,0,.132741,.935005,.0154292,0,.145751,.924991,.0150742,0,.159249,.914814,.0146757,0,.17323,.904743,.0143097,0,.187687,.893216,.0138695,0,.202619,.880769,.0133706,0,.218021,.868136,.0128606,0,.233894,.85469,.0123403,0,.250238,.840593,.0118091,0,.267052,.825808,.011253,0,.284341,.81009,.0107099,0,.302106,.79504,.0101636,0,.320354,.779757,.00964041,0,.33909,.764697,.00911896,0,.358322,.750913,.00859533,0,.378059,.738175,.00811592,0,.398311,.725242,.00764504,0,.41909,.711864,.00718885,0,.440412,.698009,.00675843,0,.462292,.683841,.00634984,0,.484748,.669391,.00595502,0,.507802,.654731,.00558671,0,.531477,.639805,.00523578,0,.555802,.624789,.00490834,0,.580805,.609325,.00459448,0,.606522,.593975,.00430342,0,.63299,.578983,.00403019,0,.66025,.564442,.0037707,0,.688346,.549835,.0035316,0,.717319,.535039,.00330255,0,.7472,.520403,.00308932,0,.777982,.505687,.00289335,0,.809524,.490939,.00270818,0,.84127,.476233,.0025343,0,.873016,.461624,.00237097,0,.904762,.447833,.00222065,0,.936508,.433992,.00207561,0,.968254,.420147,.00194955,0,1,1,.0173415,0,0,1,.0173416,0,0,.999999,.0173426,0,0,.999995,.0173468,0,0,.999983,.0173582,0,0,.999954,.0173822,0,0,.999908,.0174258,0,669501e-11,.999828,.0174973,0,427399e-9,.999705,.0176063,0,.00171019,.999524,.0177631,0,.0039248,.999263,.0179781,0,.00705382,.998878,.018258,0,.0110552,.998012,.0185551,0,.0158812,.994614,.0184264,0,.0214852,.993132,.0186385,0,.0278239,.991563,.0189067,0,.0348585,.989298,.0191577,0,.0425544,.986036,.0192522,0,.050881,.982558,.0194063,0,.059811,.978531,.019486,0,.0693209,.974198,.0195847,0,.0793895,.968148,.0194749,0,.0899984,.962565,.0194277,0,.101132,.956041,.0192991,0,.112775,.947749,.0189893,0,.124917,.94018,.018704,0,.137547,.93165,.0183458,0,.150655,.921798,.0178775,0,.164236,.911573,.0173618,0,.178281,.901569,.0168482,0,.192788,.890341,.016265,0,.207752,.877835,.0156199,0,.223171,.865472,.0149516,0,.239044,.852905,.0143274,0,.255371,.838906,.0136643,0,.272153,.824888,.0129903,0,.289393,.809977,.0123218,0,.307093,.794697,.0116572,0,.325259,.780028,.0110307,0,.343896,.765124,.0104236,0,.363012,.750411,.0098219,0,.382617,.737264,.00924397,0,.402719,.724799,.00868719,0,.423332,.712253,.00816476,0,.444469,.699267,.00767262,0,.466146,.685618,.00719746,0,.488383,.671736,.00673916,0,.511199,.657777,.00631937,0,.534618,.643497,.00592411,0,.558668,.62889,.00553928,0,.58338,.614299,.0051934,0,.608787,.599197,.00485985,0,.634929,.584175,.00454357,0,.661849,.569541,.00425787,0,.689594,.555193,.00397905,0,.718211,.540947,.00372364,0,.747742,.526593,.00348599,0,.778205,.512335,.00326103,0,.80953,.498017,.00305137,0,.84127,.483609,.00285485,0,.873016,.469368,.00267472,0,.904762,.455037,.00249945,0,.936508,.441493,.00234792,0,.968254,.428147,.00219936,0,1,1,.0219422,0,0,1,.0219423,0,0,.999998,.0219434,0,0,.999993,.0219481,0,0,.999981,.021961,0,0,.999949,.0219879,0,0,.999896,.0220367,0,593194e-10,.999808,.0221167,0,75364e-8,.99967,.0222383,0,.00237884,.999466,.0224125,0,.00495612,.999174,.0226495,0,.00844887,.998725,.0229525,0,.0128058,.996979,.0231123,0,.0179742,.994317,.0230742,0,.0239047,.992781,.0232895,0,.0305526,.991191,.0235734,0,.0378786,.987787,.0236152,0,.0458475,.985092,.0237994,0,.0544287,.981121,.0238553,0,.0635952,.976924,.0238706,0,.0733233,.97218,.0238704,0,.0835922,.965956,.0236598,0,.0943839,.959998,.0234735,0,.105682,.953245,.0232277,0,.117474,.944445,.0226973,0,.129747,.937087,.0223527,0,.142491,.928341,.0218144,0,.155697,.9184,.0211516,0,.169358,.907959,.0204553,0,.183469,.89808,.0197673,0,.198024,.887047,.0189915,0,.21302,.875221,.0182082,0,.228455,.86269,.0173584,0,.244329,.850735,.0165718,0,.260639,.837545,.0157524,0,.277389,.823639,.0149482,0,.29458,.809699,.0141431,0,.312216,.794797,.0133527,0,.3303,.780578,.0126193,0,.34884,.766019,.0118914,0,.367842,.751447,.0111839,0,.387315,.737275,.010514,0,.40727,.724545,.00987277,0,.427717,.712644,.00926569,0,.448671,.700432,.00869029,0,.470149,.687664,.00814691,0,.492167,.674288,.00763012,0,.514746,.660966,.00714437,0,.537911,.647264,.00668457,0,.561688,.633431,.00626581,0,.586108,.619133,.00585593,0,.611206,.604935,.00548188,0,.637022,.590236,.00513288,0,.663599,.575473,.0047906,0,.690989,.561228,.00448895,0,.719242,.547054,.00420233,0,.748411,.533175,.00392869,0,.778531,.519163,.00367445,0,.809583,.505328,.00344097,0,.84127,.491446,.00322003,0,.873016,.477356,.00301283,0,.904762,.46356,.00282592,0,.936508,.449623,.00264956,0,.968254,.436068,.00246956,0,1,1,.0276135,0,0,1,.0276136,0,0,.999998,.0276148,0,0,.999993,.0276201,0,0,.999976,.0276342,0,0,.999945,.027664,0,0,.999884,.0277179,0,18679e-8,.999784,.027806,0,.00119607,.99963,.0279394,0,.00318407,.999401,.0281295,0,.00613601,.999066,.0283858,0,.00999963,.998524,.0287027,0,.0147164,.995702,.0286256,0,.0202295,.993593,.0286733,0,.0264876,.992067,.0288989,0,.0334452,.990548,.0292135,0,.0410621,.986775,.0291296,0,.0493032,.984054,.0293099,0,.0581381,.979481,.0291881,0,.0675397,.975297,.0291598,0,.0774848,.96981,.028954,0,.0879528,.963524,.028628,0,.0989258,.957398,.0283135,0,.110388,.950088,.0278469,0,.122327,.941538,.0271798,0,.134729,.933332,.0265388,0,.147587,.924392,.0257776,0,.160889,.914581,.024916,0,.174631,.904347,.0240242,0,.188806,.894324,.0231229,0,.203409,.883724,.022153,0,.218437,.872207,.0211355,0,.233888,.859927,.0201048,0,.249761,.848373,.0191263,0,.266056,.836023,.0181306,0,.282774,.82289,.0171718,0,.299917,.809324,.0162196,0,.317488,.795361,.0152622,0,.335493,.781253,.01439,0,.353936,.767338,.013533,0,.372825,.753156,.0127244,0,.392168,.739122,.0119454,0,.411976,.725358,.0112054,0,.432259,.712949,.010487,0,.453032,.701621,.00984032,0,.47431,.689703,.00921495,0,.496111,.677216,.00862492,0,.518456,.664217,.00806882,0,.541367,.65137,.00755922,0,.564872,.638,.00705705,0,.589001,.62453,.00661266,0,.613789,.610601,.00618432,0,.639277,.59676,.00578033,0,.66551,.582433,.00540927,0,.692539,.568026,.00506104,0,.720422,.55414,.0047353,0,.749216,.540178,.00442889,0,.778974,.526513,.00414363,0,.809711,.512954,.00388237,0,.84127,.499403,.00362875,0,.873016,.486026,.00340827,0,.904762,.472345,.00318598,0,.936508,.458828,.00297635,0,.968254,.445379,.00279447,0,1,1,.0345716,0,0,1,.0345717,0,0,.999999,.034573,0,0,.999991,.0345787,0,0,.999974,.0345941,0,0,.999937,.0346263,0,188589e-11,.999869,.0346847,0,409238e-9,.999757,.0347798,0,.0017674,.999582,.0349233,0,.00413658,.999322,.0351265,0,.00747408,.998939,.0353967,0,.0117157,.998219,.0357018,0,.0167966,.994974,.0354726,0,.0226572,.993201,.0355621,0,.0292445,.991573,.0357641,0,.0365123,.989301,.0359252,0,.0444203,.985712,.0358017,0,.0529334,.982411,.0358353,0,.0620214,.977827,.035617,0,.0716574,.973278,.0354398,0,.0818186,.967397,.0350483,0,.0924846,.960696,.0344795,0,.103638,.954349,.0339861,0,.115263,.946066,.0331323,0,.127348,.938012,.032359,0,.13988,.929413,.0314413,0,.152849,.920355,.0304103,0,.166248,.910586,.0292785,0,.18007,.900609,.0281391,0,.194308,.890093,.0269103,0,.208958,.880013,.0257269,0,.224018,.869001,.0244671,0,.239485,.85751,.0232252,0,.255359,.84582,.0220117,0,.271638,.834383,.0208274,0,.288324,.822158,.0196628,0,.305419,.809056,.0185306,0,.322927,.795832,.0174174,0,.340851,.782547,.0163758,0,.359199,.7689,.015391,0,.377975,.755526,.0144488,0,.397189,.741681,.0135372,0,.416851,.728178,.0126957,0,.436971,.714642,.0118812,0,.457564,.702756,.0111165,0,.478644,.69175,.0104145,0,.500229,.680159,.00974439,0,.522339,.668073,.00911926,0,.544997,.655405,.00851393,0,.56823,.642921,.00797637,0,.592068,.629993,.00745119,0,.616546,.616828,.00696972,0,.641705,.603305,.00652425,0,.66759,.589833,.00610188,0,.694255,.575945,.00570834,0,.72176,.561745,.00533384,0,.750168,.548277,.00500001,0,.779545,.534467,.00467582,0,.809933,.521032,.00438092,0,.841272,.507877,.00410348,0,.873016,.494654,.00383618,0,.904762,.481592,.00358699,0,.936508,.468509,.00337281,0,.968254,.455293,.00316196,0,1,1,.0430698,0,0,1,.0430699,0,0,.999998,.0430713,0,0,.999991,.0430773,0,0,.99997,.0430936,0,0,.999928,.0431277,0,406396e-10,.999852,.0431893,0,744376e-9,.999724,.0432895,0,.0024806,.999527,.0434397,0,.00524779,.99923,.0436507,0,.00898164,.998783,.0439255,0,.0136083,.997507,.0441104,0,.0190582,.994418,.0438225,0,.0252694,.992864,.0439396,0,.0321879,.991127,.0440962,0,.039767,.987331,.0438408,0,.0479667,.984819,.0438991,0,.056752,.980384,.0435906,0,.0660929,.975846,.0432543,0,.075963,.970748,.0428293,0,.0863398,.964303,.042153,0,.0972035,.95772,.0414111,0,.108537,.950747,.0405893,0,.120325,.942533,.0394887,0,.132554,.934045,.0383544,0,.145215,.924942,.037057,0,.158296,.915811,.0356993,0,.17179,.90612,.0342401,0,.185691,.896434,.0328078,0,.199993,.886021,.031288,0,.214691,.876081,.0297776,0,.229782,.865608,.0282334,0,.245265,.854924,.026749,0,.261138,.843607,.02526,0,.277401,.832456,.0238214,0,.294056,.821342,.0224682,0,.311104,.809303,.0211297,0,.328548,.796468,.0198387,0,.346394,.784046,.0186227,0,.364645,.771262,.0174561,0,.38331,.758118,.0163806,0,.402396,.745075,.0153287,0,.421912,.731926,.0143647,0,.44187,.71863,.0134363,0,.462283,.705414,.0125603,0,.483165,.693792,.0117508,0,.504535,.683108,.0110016,0,.52641,.67183,.0102757,0,.548816,.66015,.00962044,0,.571776,.647907,.00898031,0,.595323,.635734,.00840811,0,.619489,.623208,.00786211,0,.644317,.610438,.00734953,0,.669852,.597345,.00687688,0,.696148,.584138,.00643469,0,.723267,.5707,.00602236,0,.75128,.556966,.0056324,0,.780258,.543607,.00528277,0,.810268,.530213,.00493999,0,.841311,.516912,.00462265,0,.873016,.503916,.0043307,0,.904762,.491146,.00406858,0,.936508,.478439,.00381436,0,.968254,.465834,.00358003,0,1,1,.0534039,0,0,1,.053404,0,0,.999998,.0534055,0,0,.999989,.0534116,0,0,.999968,.0534283,0,0,.999918,.0534633,0,155895e-9,.99983,.0535262,0,.00120914,.999685,.0536281,0,.00334944,.999461,.0537799,0,.00653077,.999119,.0539902,0,.0106718,.998582,.0542524,0,.0156907,.995919,.0540318,0,.0215147,.993735,.0538914,0,.0280801,.992126,.0539557,0,.0353323,.990266,.0540401,0,.0432247,.986317,.0536064,0,.0517172,.983213,.0534425,0,.0607754,.978303,.0528622,0,.0703698,.973665,.0523363,0,.0804742,.968091,.0516165,0,.0910667,.961026,.0505434,0,.102128,.954333,.049523,0,.113641,.946372,.0481698,0,.125591,.938254,.0467674,0,.137965,.929516,.0452341,0,.150754,.920106,.0435083,0,.163947,.910899,.0417399,0,.177537,.901532,.0399389,0,.191516,.891919,.0380901,0,.205881,.882006,.0362341,0,.220626,.871965,.0343444,0,.235749,.862145,.0324832,0,.251248,.852058,.0306681,0,.267121,.84161,.0289097,0,.283368,.830806,.0272079,0,.299992,.820476,.0256089,0,.316992,.809514,.0240394,0,.334374,.797865,.0225379,0,.35214,.785621,.0211235,0,.370296,.773765,.0197908,0,.388849,.761629,.0185235,0,.407807,.748891,.0173358,0,.427178,.736437,.0162305,0,.446974,.723707,.0151778,0,.467207,.710606,.0141791,0,.487892,.698019,.0132592,0,.509046,.686203,.0123887,0,.530687,.675692,.0115976,0,.552839,.664826,.0108325,0,.575527,.65349,.0101348,0,.59878,.641774,.00947756,0,.622634,.629794,.00886058,0,.647128,.617647,.00828526,0,.672308,.60534,.00775312,0,.698231,.592718,.00726033,0,.724958,.579746,.00679731,0,.752563,.566763,.00636111,0,.781127,.553515,.00595228,0,.810733,.540118,.00556876,0,.841426,.527325,.00523051,0,.873016,.514265,.00490712,0,.904762,.501406,.00460297,0,.936508,.488922,.00431247,0,.968254,.476541,.0040472,0,1,1,.0659184,0,0,1,.0659185,0,0,.999998,.06592,0,0,.999988,.0659259,0,0,.999963,.0659423,0,0,.999907,.0659764,0,374198e-9,.999806,.0660376,0,.00182071,.999639,.0661361,0,.0043894,.999378,.0662814,0,.00800055,.998985,.0664779,0,.0125594,.998285,.0666914,0,.0179786,.995071,.0661989,0,.0241822,.993172,.0660454,0,.031106,.991438,.0660105,0,.0386952,.988428,.0656875,0,.0469032,.985218,.0652913,0,.0556905,.981128,.0647107,0,.065023,.976015,.0638491,0,.0748717,.97097,.062993,0,.0852112,.964582,.0617927,0,.0960199,.957383,.0603626,0,.107279,.949969,.0588128,0,.118971,.941843,.0570274,0,.131084,.933624,.0551885,0,.143604,.924543,.053122,0,.156521,.914919,.0508897,0,.169825,.905773,.0486418,0,.18351,.896434,.0463364,0,.197569,.887195,.0440623,0,.211997,.877706,.0417799,0,.226789,.867719,.03945,0,.241944,.858587,.037243,0,.257458,.849317,.0350956,0,.273331,.839585,.0329852,0,.289563,.829856,.0310028,0,.306154,.819589,.0290953,0,.323108,.809714,.0272738,0,.340426,.79934,.0255631,0,.358113,.788224,.0239175,0,.376175,.776619,.0223831,0,.394616,.76521,.0209298,0,.413445,.753716,.0195786,0,.432671,.741564,.0183001,0,.452305,.729413,.0171259,0,.472358,.717146,.0159933,0,.492845,.70436,.0149495,0,.513783,.69219,.0139681,0,.535189,.680289,.0130577,0,.557087,.669611,.0122198,0,.5795,.659113,.0114174,0,.602459,.648148,.0106729,0,.625997,.636905,.00998997,0,.650154,.625154,.00934313,0,.674976,.613481,.00874839,0,.700518,.60154,.00818265,0,.726845,.58943,.00766889,0,.754032,.576828,.00717153,0,.782167,.564194,.00672696,0,.811344,.551501,.00630863,0,.841644,.538635,.00592177,0,.873016,.525724,.00554888,0,.904762,.513209,.00520225,0,.936508,.500457,.00488231,0,.968254,.48799,.00457153,0,1,1,.0810131,0,0,1,.0810133,0,0,.999997,.0810145,0,0,.999985,.08102,0,0,.999956,.0810347,0,195026e-10,.999893,.0810656,0,719316e-9,.999777,.0811205,0,.00259774,.999583,.081208,0,.00561807,.999281,.0813343,0,.00967472,.998813,.0814969,0,.0146627,.997597,.0815217,0,.0204902,.994379,.0808502,0,.0270802,.992744,.0806792,0,.0343674,.990745,.0804589,0,.0422974,.986646,.0796107,0,.0508242,.983611,.0790913,0,.0599087,.978869,.0780746,0,.0695175,.973475,.0768218,0,.0796223,.967845,.0754926,0,.0901983,.960778,.0737063,0,.101224,.953333,.0718052,0,.112682,.945274,.0695946,0,.124555,.936955,.0672492,0,.136831,.928319,.0647732,0,.149496,.919075,.0620947,0,.162542,.909114,.0591816,0,.175958,.900137,.0563917,0,.189739,.891069,.0535392,0,.203877,.882262,.0507642,0,.218368,.873232,.0479793,0,.233208,.864042,.045226,0,.248393,.855002,.0425413,0,.263923,.846569,.0400126,0,.279796,.837714,.0375269,0,.296012,.828918,.0352027,0,.312573,.819783,.0330011,0,.329479,.810129,.0308908,0,.346734,.800866,.0289112,0,.364342,.79093,.0270255,0,.382307,.780593,.0252758,0,.400637,.769511,.0236178,0,.419337,.758558,.0220652,0,.438418,.747632,.0206289,0,.457889,.736146,.0192873,0,.477761,.724093,.0180333,0,.49805,.71234,.0168264,0,.51877,.700201,.015746,0,.53994,.687949,.0147027,0,.561581,.676163,.0137512,0,.583718,.665001,.0128655,0,.60638,.65472,.0120366,0,.629599,.644213,.0112604,0,.653415,.633382,.0105413,0,.677874,.62212,.00986498,0,.70303,.610631,.00923308,0,.728948,.599078,.00864206,0,.755706,.587519,.00811784,0,.783396,.575505,.00761237,0,.812121,.563148,.00713949,0,.841989,.550828,.00668379,0,.873035,.538458,.00627715,0,.904762,.525905,.00588336,0,.936508,.513517,.00552687,0,.968254,.501395,.00519681,0,1,1,.0991506,0,0,1,.0991504,0,0,.999996,.0991515,0,0,.999984,.0991558,0,0,.999947,.0991672,0,114389e-9,.999874,.0991912,0,.00121503,.999739,.0992331,0,.00356108,.999514,.0992983,0,.00705578,.999159,.0993877,0,.011574,.998586,.0994837,0,.017003,.995731,.0988425,0,.0232484,.993384,.098276,0,.0302318,.991615,.0979269,0,.0378884,.989029,.0973432,0,.0461641,.985373,.0963539,0,.0550136,.981278,.0952306,0,.0643988,.975777,.0936233,0,.0742868,.970526,.0920219,0,.0846501,.963755,.0898912,0,.0954644,.956676,.0876064,0,.106709,.948099,.0847751,0,.118367,.939718,.0818638,0,.130423,.931305,.078857,0,.142862,.922342,.0756127,0,.155674,.912842,.0721473,0,.168849,.903304,.0686195,0,.182378,.89411,.0650589,0,.196255,.885512,.0616022,0,.210473,.877193,.0582434,0,.225027,.86877,.0548979,0,.239915,.860267,.0516095,0,.255132,.851915,.048468,0,.270678,.843912,.0454447,0,.286551,.83604,.0425612,0,.302751,.828245,.0398752,0,.31928,.820159,.0373198,0,.336138,.81167,.034916,0,.35333,.802659,.0326402,0,.370858,.793921,.0304901,0,.388728,.784713,.0284857,0,.406944,.774946,.0266186,0,.425515,.76448,.0248593,0,.444449,.753793,.0232114,0,.463756,.743506,.0217039,0,.483447,.732555,.0202841,0,.503535,.720965,.0189648,0,.524036,.709422,.0177189,0,.544968,.697756,.0165626,0,.56635,.685565,.015483,0,.588208,.673987,.0144892,0,.610569,.66244,.0135607,0,.633466,.651675,.0126956,0,.656936,.641598,.0118788,0,.681025,.63121,.0111261,0,.705788,.620514,.010437,0,.731289,.609366,.00978747,0,.757606,.598137,.00917257,0,.784834,.586966,.00859778,0,.813085,.575549,.00806803,0,.842485,.563797,.00757294,0,.87313,.551758,.00710592,0,.904762,.539894,.0066841,0,.936508,.527901,.00627901,0,.968254,.515819,.00590506,0,1,1,.120864,0,0,1,.120864,0,0,.999996,.120864,0,0,.99998,.120867,0,0,.99994,.120872,0,323781e-9,.999852,.120884,0,.00188693,.999693,.120903,0,.00473489,.999426,.120929,0,.00872704,.999002,.120955,0,.0137237,.998235,.120918,0,.0196068,.994608,.119764,0,.0262803,.992997,.119265,0,.0336657,.990968,.11863,0,.0416987,.987002,.117261,0,.0503261,.983524,.116009,0,.0595035,.97875,.114252,0,.0691935,.972652,.11193,0,.0793645,.966613,.109555,0,.0899894,.959275,.106612,0,.101045,.951272,.103375,0,.112512,.942323,.0996594,0,.124372,.933679,.0958841,0,.136611,.924822,.0919265,0,.149216,.915742,.0878061,0,.162176,.906348,.0834894,0,.175482,.896883,.079085,0,.189125,.88774,.0746745,0,.203098,.87986,.0705773,0,.217396,.871998,.0665005,0,.232015,.864325,.0625413,0,.24695,.856685,.0586781,0,.2622,.84925,.0550063,0,.277761,.841719,.0514727,0,.293634,.834755,.0481398,0,.309819,.827853,.0450172,0,.326315,.820888,.0420969,0,.343126,.813616,.0393702,0,.360254,.805767,.0367771,0,.377701,.797338,.0343274,0,.395474,.789122,.0320529,0,.413577,.780601,.0299485,0,.432018,.771424,.0279812,0,.450804,.761502,.0261054,0,.469944,.751166,.0243942,0,.489451,.741276,.0228087,0,.509337,.730898,.0213265,0,.529617,.719878,.0199307,0,.550307,.708379,.0186574,0,.571428,.697165,.0174446,0,.593003,.685554,.0163144,0,.615059,.673631,.015276,0,.637628,.662385,.0143003,0,.660746,.651059,.0134112,0,.68446,.640451,.0125794,0,.70882,.630536,.011793,0,.733893,.620316,.0110547,0,.759756,.609722,.0103668,0,.786505,.598804,.00973009,0,.814259,.587871,.00912812,0,.843157,.577121,.00858916,0,.87334,.566019,.00807333,0,.904762,.554664,.00759687,0,.936508,.543101,.00714759,0,.968254,.531558,.00673418,0,1,1,.146767,0,0,1,.146767,0,0,.999997,.146767,0,0,.999977,.146765,0,320658e-11,.999929,.146762,0,682576e-9,.999823,.146753,0,.00276402,.999633,.146735,0,.00614771,.999314,.146699,0,.0106613,.998796,.14662,0,.0161546,.997124,.146107,0,.0225063,.994062,.144857,0,.0296198,.992154,.144011,0,.037417,.989186,.142712,0,.0458348,.985279,.140926,0,.0548211,.980826,.13885,0,.0643326,.975056,.136168,0,.074333,.969005,.133217,0,.0847917,.961554,.12959,0,.0956828,.954206,.125886,0,.106984,.945046,.121335,0,.118675,.935678,.116492,0,.130741,.926748,.111635,0,.143166,.917764,.106625,0,.155939,.908358,.101325,0,.169049,.899219,.0960249,0,.182487,.890089,.0906527,0,.196245,.881488,.0853905,0,.210317,.874031,.0804177,0,.224697,.866932,.0756005,0,.23938,.859976,.0709019,0,.254364,.853375,.0664391,0,.269646,.846971,.0622012,0,.285223,.840483,.058129,0,.301096,.833969,.0542762,0,.317265,.82806,.0507042,0,.333729,.822128,.047368,0,.350491,.815989,.044272,0,.367554,.809336,.0413444,0,.38492,.802177,.038601,0,.402594,.79441,.0360227,0,.420582,.786573,.0336383,0,.438891,.778619,.0314321,0,.457527,.77,.029362,0,.476499,.760698,.0274102,0,.49582,.750932,.0256146,0,.5155,.740993,.023974,0,.535555,.731159,.0224182,0,.556,.720836,.0209889,0,.576855,.709913,.0196411,0,.598143,.698415,.0183824,0,.619888,.68745,.0172222,0,.642123,.676154,.0161509,0,.664883,.664383,.0151397,0,.688211,.6533,.0141873,0,.71216,.642072,.0133105,0,.736792,.631412,.0124932,0,.762186,.621622,.0117408,0,.788439,.611681,.0110358,0,.815672,.60142,.0103775,0,.844034,.59083,.00975623,0,.873699,.580254,.00918084,0,.904765,.569841,.00864721,0,.936508,.559224,.00815731,0,.968254,.548315,.00767924,0,1,1,.177563,0,0,1,.177563,0,0,.999994,.177562,0,0,.999972,.177555,0,664171e-10,.999914,.177536,0,.0012276,.999787,.177496,0,.00388025,.999556,.17742,0,.00783463,.999165,.177285,0,.0128953,.9985,.177037,0,.0189053,.995388,.175634,0,.025742,.993102,.174375,0,.033309,.990992,.173121,0,.0415298,.986932,.170896,0,.0503425,.982786,.16847,0,.0596964,.977592,.165455,0,.0695498,.971075,.161676,0,.0798676,.963967,.157458,0,.0906201,.956397,.152836,0,.101783,.947489,.147467,0,.113333,.937564,.14145,0,.125254,.928182,.135383,0,.137529,.919027,.129212,0,.150144,.909618,.12276,0,.163088,.900492,.116273,0,.176351,.891671,.1098,0,.189924,.883146,.103362,0,.203799,.875151,.0970799,0,.21797,.868338,.0911732,0,.232433,.862033,.0854966,0,.247182,.856107,.0800691,0,.262216,.850644,.0749618,0,.27753,.845261,.070079,0,.293124,.839885,.0654321,0,.308997,.834609,.0610975,0,.325149,.829083,.0569741,0,.341581,.82404,.0531736,0,.358294,.818968,.049665,0,.37529,.813496,.0463856,0,.392573,.807533,.0433217,0,.410148,.80099,.0404402,0,.428019,.793891,.0377578,0,.446192,.786281,.0352616,0,.464676,.778773,.0329577,0,.483478,.770737,.030808,0,.502608,.762094,.0287964,0,.522079,.752898,.0269254,0,.541905,.743306,.0251926,0,.5621,.733416,.023595,0,.582684,.723742,.0221155,0,.603677,.713542,.0207435,0,.625106,.702755,.019434,0,.646998,.691484,.0182046,0,.66939,.680531,.0170771,0,.692324,.66953,.0160339,0,.715849,.658126,.0150677,0,.740028,.646933,.0141551,0,.764937,.636107,.0133179,0,.790673,.625271,.0125284,0,.817358,.615225,.0117937,0,.84515,.605678,.0111181,0,.874244,.59583,.0104759,0,.904828,.585704,.00986672,0,.936508,.575413,.00929712,0,.968254,.565373,.00876713,0,1,1,.214058,0,0,.999999,.214058,0,0,.999994,.214055,0,0,.999966,.214039,0,259642e-9,.999893,.213998,0,.00200075,.999737,.21391,0,.00527775,.999449,.213745,0,.00983959,.99896,.213458,0,.0154755,.9979,.212855,0,.0220249,.994278,.210779,0,.0293654,.992254,.20926,0,.0374021,.98881,.206908,0,.0460604,.984715,.204009,0,.0552802,.979738,.200471,0,.0650127,.972884,.195813,0,.0752175,.965996,.190856,0,.0858612,.957974,.185077,0,.0969155,.949155,.17868,0,.108356,.939288,.171513,0,.120163,.928996,.163838,0,.132319,.919563,.156246,0,.144808,.910004,.148359,0,.157618,.900791,.140417,0,.170737,.892135,.132569,0,.184155,.883803,.124741,0,.197866,.876034,.117091,0,.211861,.869219,.109835,0,.226134,.863062,.102859,0,.240682,.857795,.0962928,0,.255499,.853009,.0900725,0,.270583,.848603,.0842101,0,.285931,.844335,.0786527,0,.301542,.840208,.0734397,0,.317415,.836035,.0685334,0,.33355,.83172,.0639275,0,.349948,.827135,.0595909,0,.36661,.822797,.0556204,0,.383539,.818387,.0519394,0,.400738,.813565,.0485317,0,.41821,.808142,.0453138,0,.435961,.802212,.0423354,0,.453997,.79573,.0395553,0,.472324,.788741,.036988,0,.490951,.781093,.0345688,0,.509887,.773597,.0323297,0,.529144,.765622,.0302719,0,.548735,.757083,.0283477,0,.568674,.747992,.0265562,0,.588979,.738591,.0248844,0,.609671,.728719,.0233342,0,.630773,.719146,.0219081,0,.652314,.709165,.0205711,0,.674328,.69875,.0193248,0,.696854,.687884,.0181582,0,.719942,.676818,.0170746,0,.743651,.666247,.0160718,0,.768057,.655284,.0151262,0,.793253,.64401,.0142561,0,.819363,.633353,.0134327,0,.846547,.622674,.012653,0,.875017,.612265,.0119354,0,.905021,.602455,.0112533,0,.936508,.593147,.0106234,0,.968254,.583592,.0100213,0,1,1,.25717,0,0,1,.25717,0,0,.999992,.257164,0,0,.999958,.257135,0,641715e-9,.999864,.25706,0,.00305314,.999666,.256897,0,.00700975,.999302,.256596,0,.0122194,.998663,.25607,0,.0184622,.995607,.254123,0,.0255773,.993094,.252081,0,.0334439,.9907,.249867,0,.0419696,.98594,.246118,0,.0510823,.981214,.242049,0,.0607242,.974966,.236869,0,.0708486,.967589,.230724,0,.081417,.95915,.223635,0,.0923974,.950257,.21596,0,.103763,.940165,.207296,0,.115491,.929396,.197901,0,.127562,.919288,.188437,0,.13996,.909428,.178762,0,.15267,.900105,.169072,0,.165679,.891418,.159478,0,.178979,.883347,.15002,0,.192558,.875992,.140813,0,.20641,.869466,.13196,0,.220529,.863699,.123501,0,.234907,.858553,.115436,0,.249542,.854379,.107901,0,.264428,.850894,.10088,0,.279564,.847632,.0942296,0,.294947,.844571,.0879861,0,.310575,.84163,.0821534,0,.326448,.838542,.0766409,0,.342566,.835412,.0715322,0,.358929,.831899,.0666883,0,.37554,.828177,.0622175,0,.392399,.82416,.0580452,0,.409511,.820393,.054267,0,.426878,.816068,.0507172,0,.444506,.811201,.0474041,0,.4624,.805785,.0443174,0,.480566,.799878,.0414562,0,.499013,.793469,.0388147,0,.517749,.786473,.0363453,0,.536785,.778874,.0340225,0,.556134,.771277,.0318599,0,.575809,.763426,.0298859,0,.595827,.755044,.0280357,0,.616207,.746161,.0262979,0,.636973,.737124,.0247295,0,.65815,.72761,.0232514,0,.679772,.717822,.0218755,0,.701876,.708279,.0205942,0,.724509,.698333,.0193947,0,.74773,.68802,.0182717,0,.771609,.677321,.0172044,0,.79624,.666504,.0162122,0,.821743,.656184,.0152924,0,.84828,.64556,.0144326,0,.876069,.634636,.0136157,0,.905404,.624124,.0128612,0,.936508,.613914,.0121435,0,.968254,.603589,.0114887,0,1,1,.307946,0,0,.999999,.307945,0,0,.999988,.307934,0,204479e-10,.999944,.307886,0,.00127833,.999824,.307756,0,.00445047,.999565,.30748,0,.00914673,.999085,.306966,0,.0150498,.998103,.306004,0,.0219367,.994249,.303028,0,.0296485,.991807,.300435,0,.038068,.987773,.296554,0,.0471062,.982673,.2916,0,.0566942,.976623,.285641,0,.0667768,.968757,.27815,0,.0773099,.959849,.269529,0,.088257,.950663,.260248,0,.0995879,.940129,.249704,0,.111277,.92895,.238291,0,.123304,.917996,.226501,0,.13565,.907813,.214669,0,.148299,.898305,.202835,0,.161237,.889626,.191158,0,.174455,.88175,.179695,0,.187941,.874715,.168548,0,.201687,.868746,.15792,0,.215687,.863703,.147807,0,.229933,.859315,.138149,0,.24442,.855538,.128993,0,.259145,.852428,.120414,0,.274103,.850168,.112498,0,.289293,.848132,.105054,0,.304711,.846291,.0981087,0,.320357,.844431,.0915942,0,.33623,.842493,.0855056,0,.35233,.840368,.0798204,0,.368658,.83798,.0745097,0,.385214,.83523,.0695424,0,.402002,.832091,.0649092,0,.419023,.828667,.0606291,0,.436282,.824805,.0566523,0,.453782,.820988,.0530229,0,.471529,.816635,.0496364,0,.489528,.811725,.0464658,0,.507788,.806316,.0435082,0,.526317,.800469,.0407873,0,.545124,.794107,.038255,0,.564221,.787218,.0358825,0,.583621,.779872,.0336785,0,.603341,.772097,.0316379,0,.623397,.764484,.0297379,0,.643812,.756428,.0279581,0,.664611,.748022,.0263153,0,.685824,.739268,.0247799,0,.707488,.73024,.0233385,0,.729646,.720893,.0220035,0,.752354,.71119,.0207555,0,.77568,.701791,.0195843,0,.799715,.692184,.0184891,0,.824574,.682258,.0174541,0,.850417,.67206,.0164873,0,.877466,.661717,.0155959,0,.90604,.651462,.0147519,0,.936528,.641467,.0139727,0,.968254,.631229,.0132363,0,1,1,.367573,0,0,.999999,.367571,0,0,.999984,.367553,0,183382e-9,.999925,.367473,0,.00225254,.999759,.367259,0,.00628165,.99941,.366801,0,.0117858,.998739,.365946,0,.0184359,.995529,.363191,0,.0260114,.992875,.360171,0,.0343581,.989135,.355981,0,.0433637,.984166,.350401,0,.0529438,.977871,.343348,0,.0630334,.96951,.334341,0,.0735805,.959964,.323862,0,.0845437,.950162,.312521,0,.095889,.938882,.299577,0,.107588,.926992,.285573,0,.119617,.915589,.271212,0,.131957,.904791,.256611,0,.144591,.895177,.242224,0,.157503,.886403,.227952,0,.170682,.878957,.214192,0,.184117,.872418,.200795,0,.197799,.867029,.188015,0,.21172,.862835,.175975,0,.225873,.859411,.164526,0,.240253,.856655,.153693,0,.254854,.854519,.14352,0,.269673,.852828,.13397,0,.284707,.851412,.124984,0,.299953,.850609,.116748,0,.315408,.849855,.10905,0,.331073,.849017,.101839,0,.346946,.848079,.0951359,0,.363028,.846911,.0888774,0,.379318,.845445,.0830375,0,.395818,.84362,.0775844,0,.41253,.841411,.0725054,0,.429457,.838768,.0677691,0,.446602,.835801,.0634016,0,.463968,.832341,.0593095,0,.481561,.828424,.0555121,0,.499386,.824312,.052024,0,.51745,.819918,.0487865,0,.535761,.815072,.0457801,0,.554328,.809863,.0430184,0,.573162,.804164,.0404245,0,.592275,.798034,.0380146,0,.611681,.791436,.0357436,0,.631398,.784498,.0336475,0,.651445,.777125,.0316666,0,.671845,.769365,.0298122,0,.692628,.761579,.0281001,0,.713827,.753746,.0265049,0,.735484,.745573,.0250067,0,.75765,.737083,.0236026,0,.78039,.728545,.0223302,0,.803789,.719691,.0211243,0,.82796,.710569,.0199983,0,.853056,.701216,.0189569,0,.879298,.692094,.0179702,0,.907014,.682909,.0170418,0,.936691,.673509,.0161732,0,.968254,.663863,.0153406,0,1,1,.437395,0,0,.999998,.437394,0,0,.99998,.437363,0,616704e-9,.999891,.437232,0,.00367925,.999656,.436877,0,.00867446,.999148,.436121,0,.0150679,.997959,.434564,0,.022531,.993464,.430134,0,.0308507,.990606,.426077,0,.0398805,.985027,.419397,0,.0495148,.978491,.41118,0,.0596749,.969643,.40048,0,.0703001,.959189,.38769,0,.0813427,.948223,.373575,0,.0927641,.935955,.357622,0,.104533,.923237,.34043,0,.116624,.911074,.322735,0,.129015,.899724,.30479,0,.141687,.890189,.287392,0,.154626,.881796,.270248,0,.167818,.874781,.253659,0,.181252,.869166,.237786,0,.194918,.864725,.222618,0,.208807,.861565,.208356,0,.222913,.859284,.194867,0,.237229,.857677,.18212,0,.25175,.856714,.17018,0,.266473,.856155,.158969,0,.281392,.8558,.148413,0,.296505,.855672,.138578,0,.311811,.855538,.129345,0,.327306,.855689,.120861,0,.342991,.855767,.112969,0,.358864,.855618,.105593,0,.374925,.85525,.0987451,0,.391176,.854583,.0923727,0,.407616,.853534,.0864143,0,.424249,.852061,.0808338,0,.441076,.850253,.0756771,0,.4581,.848004,.0708612,0,.475324,.845333,.0663784,0,.492754,.842376,.0622631,0,.510394,.838956,.0584112,0,.528251,.835121,.0548328,0,.546331,.830842,.0514838,0,.564644,.826212,.048355,0,.583198,.821522,.0454714,0,.602005,.816551,.0428263,0,.621078,.811211,.0403612,0,.640434,.805479,.038039,0,.660089,.799409,.0358739,0,.680066,.79306,.0338727,0,.70039,.786395,.0319985,0,.721094,.779416,.030241,0,.742215,.77214,.0285951,0,.7638,.764636,.0270747,0,.785912,.756836,.0256354,0,.808628,.749315,.0243027,0,.832055,.741561,.0230497,0,.856338,.733589,.0218801,0,.88169,.725479,.020784,0,.908441,.717255,.0197702,0,.937125,.708829,.0188168,0,.968254,.700191,.0179113,0,1,1,.518937,0,0,.999998,.518933,0,0,.999967,.518883,0,.00147741,.999832,.51866,0,.00573221,.999466,.518057,0,.011826,.998644,.516752,0,.0192116,.994458,.512347,0,.027573,.991223,.507675,0,.0367099,.985515,.500188,0,.046487,.978308,.490408,0,.0568071,.968359,.477357,0,.0675984,.95682,.461752,0,.0788059,.943929,.443796,0,.090386,.930224,.423893,0,.102304,.916514,.402682,0,.114532,.903653,.380914,0,.127047,.892315,.359212,0,.139828,.882942,.338102,0,.152861,.875438,.31773,0,.16613,.869642,.298186,0,.179624,.865304,.279491,0,.193332,.862382,.261804,0,.207247,.860666,.245146,0,.22136,.859788,.229406,0,.235666,.859608,.214605,0,.250158,.859912,.200691,0,.264832,.86053,.187623,0,.279684,.861368,.17539,0,.294711,.862237,.163901,0,.309911,.863127,.153175,0,.32528,.863923,.143147,0,.340819,.864567,.133781,0,.356524,.865013,.125042,0,.372397,.86539,.116952,0,.388438,.865591,.109476,0,.404645,.865517,.102542,0,.421022,.865084,.0960688,0,.437569,.864309,.0900499,0,.454287,.863151,.0844328,0,.471181,.861649,.0792218,0,.488253,.859742,.0743482,0,.505507,.857446,.0697963,0,.522947,.854757,.0655364,0,.54058,.851783,.061608,0,.558412,.848516,.0579701,0,.576449,.844897,.0545742,0,.594701,.840956,.0514167,0,.613178,.836676,.0484598,0,.631892,.832075,.0456934,0,.650856,.827191,.0431178,0,.670088,.822295,.0407718,0,.689606,.817294,.0386032,0,.709434,.812013,.0365675,0,.7296,.806465,.0346547,0,.750138,.800691,.0328717,0,.771093,.794709,.031211,0,.792519,.788493,.0296504,0,.814488,.782049,.0281782,0,.837097,.775403,.0267965,0,.860481,.76857,.0255002,0,.884842,.761536,.0242759,0,.910494,.754303,.0231142,0,.937985,.74692,.0220305,0,.968254,.739745,.0210192,0,1,1,.613914,0,0,.999996,.613907,0,963597e-10,.999942,.613814,0,.00301247,.999704,.613407,0,.00870385,.999046,.612302,0,.0160714,.995516,.608266,0,.0245899,.991726,.602863,0,.0339681,.985157,.593956,0,.0440254,.97642,.581748,0,.0546409,.964404,.565183,0,.0657284,.950601,.545273,0,.0772246,.935158,.522129,0,.0890812,.919364,.496782,0,.10126,.904754,.470571,0,.113731,.89176,.444037,0,.126469,.881492,.418322,0,.139454,.873656,.393522,0,.15267,.868053,.369795,0,.166101,.864336,.347171,0,.179736,.862259,.325737,0,.193565,.861556,.305532,0,.207578,.861776,.286416,0,.221769,.862661,.268355,0,.23613,.864015,.251334,0,.250656,.865711,.235352,0,.265343,.867519,.220302,0,.280187,.869351,.206161,0,.295183,.871144,.192908,0,.31033,.872839,.180505,0,.325624,.874307,.168848,0,.341065,.875667,.158021,0,.35665,.876758,.147877,0,.37238,.87764,.138441,0,.388253,.878237,.129627,0,.404269,.878563,.121415,0,.42043,.878572,.113741,0,.436735,.87842,.106652,0,.453187,.878057,.100097,0,.469786,.877413,.0940128,0,.486536,.87646,.0883462,0,.503439,.875233,.0830924,0,.520498,.8737,.0781975,0,.537717,.871873,.07364,0,.555102,.86978,.0694103,0,.572657,.867405,.0654696,0,.59039,.864751,.0617914,0,.608307,.861818,.0583491,0,.626419,.858645,.0551443,0,.644733,.855307,.0521894,0,.663264,.851736,.0494334,0,.682025,.847927,.0468504,0,.701032,.843888,.0444261,0,.720308,.839629,.0421497,0,.739875,.835158,.0400082,0,.759764,.830509,.0380076,0,.780014,.825714,.0361488,0,.800673,.820729,.0343956,0,.821803,.815751,.0327781,0,.843492,.810752,.031275,0,.86586,.805587,.0298542,0,.889087,.800317,.0285397,0,.913466,.79489,.0272948,0,.93952,.789314,.0261139,0,.96835,.783593,.0249938,0,1,1,.724258,0,0,.999992,.724243,0,726889e-9,.99987,.724044,0,.00569574,.999336,.72317,0,.0131702,.996271,.719432,0,.0220738,.991159,.712576,0,.0319405,.982465,.700927,0,.0425202,.97049,.684297,0,.0536599,.953973,.661244,0,.065258,.935546,.633804,0,.0772427,.916596,.603071,0,.0895616,.899353,.57105,0,.102175,.885216,.539206,0,.11505,.875076,.508714,0,.128164,.868334,.479571,0,.141495,.864414,.451796,0,.155026,.862678,.425328,0,.168745,.862835,.400352,0,.182639,.864067,.376532,0,.196699,.866086,.35391,0,.210915,.868557,.332424,0,.225282,.871271,.312053,0,.239792,.874058,.292764,0,.25444,.8768,.27453,0,.269223,.87939,.257297,0,.284135,.8819,.24114,0,.299174,.884187,.225934,0,.314337,.886262,.211669,0,.329622,.888119,.198311,0,.345026,.889709,.185783,0,.360549,.891054,.174063,0,.376189,.892196,.163143,0,.391946,.893101,.152952,0,.407819,.893803,.143475,0,.423808,.894277,.134647,0,.439914,.894532,.126434,0,.456137,.894576,.1188,0,.472479,.894393,.111694,0,.48894,.893976,.105069,0,.505523,.893346,.0989077,0,.52223,.892502,.0931724,0,.539064,.891441,.0878276,0,.556028,.890276,.082903,0,.573125,.888972,.0783505,0,.590361,.887469,.0741083,0,.607741,.885785,.0701633,0,.62527,.883914,.0664835,0,.642957,.881872,.0630567,0,.660809,.879651,.0598527,0,.678836,.877267,.0568615,0,.69705,.874717,.05406,0,.715465,.872012,.0514378,0,.734098,.869157,.0489805,0,.752968,.866155,.0466727,0,.772101,.863014,.0445056,0,.791529,.859748,.0424733,0,.81129,.856416,.0405957,0,.831438,.852958,.0388273,0,.852044,.849382,.0371619,0,.87321,.845694,.0355959,0,.89509,.841893,.0341155,0,.917932,.837981,.0327141,0,.942204,.833963,.0313856,0,.968981,.829847,.0301275,0,1,1,.85214,0,0,.999969,.852095,0,.00279627,.999483,.851408,0,.0107635,.994545,.84579,0,.0206454,.986188,.835231,0,.0315756,.969847,.814687,0,.0432021,.945951,.783735,0,.0553396,.91917,.746074,0,.0678766,.895488,.706938,0,.0807395,.878232,.669534,0,.0938767,.868252,.635168,0,.10725,.863873,.603069,0,.120832,.863369,.572514,0,.134598,.86545,.543169,0,.148533,.868803,.514578,0,.16262,.872794,.486762,0,.176849,.87702,.459811,0,.19121,.881054,.433654,0,.205694,.884974,.408574,0,.220294,.888587,.384525,0,.235005,.891877,.36156,0,.24982,.894793,.339661,0,.264737,.89743,.318913,0,.279751,.899796,.299302,0,.294859,.901943,.280843,0,.310058,.903858,.263481,0,.325346,.905574,.247197,0,.340721,.907069,.231915,0,.356181,.908379,.217614,0,.371725,.90952,.20425,0,.387353,.910483,.191758,0,.403063,.91128,.180092,0,.418854,.911936,.169222,0,.434727,.912454,.159098,0,.450682,.912835,.149668,0,.466718,.913078,.140884,0,.482837,.913192,.132709,0,.499038,.913175,.125095,0,.515324,.91304,.118012,0,.531695,.912781,.111417,0,.548153,.91241,.105281,0,.5647,.911924,.0995691,0,.581338,.911331,.0942531,0,.59807,.910637,.0893076,0,.6149,.90984,.0846998,0,.63183,.908941,.0804044,0,.648865,.907944,.0763984,0,.666011,.906857,.0726638,0,.683273,.90568,.0691783,0,.700659,.904416,.0659222,0,.718176,.903067,.0628782,0,.735834,.901637,.0600307,0,.753646,.900128,.0573647,0,.771625,.898544,.0548668,0,.78979,.89689,.052527,0,.808162,.895165,.0503306,0,.826771,.893371,.0482668,0,.845654,.891572,.0463605,0,.864863,.889763,.0445998,0,.884472,.887894,.0429451,0,.904592,.885967,.0413884,0,.925407,.883984,.0399225,0,.947271,.881945,.0385405,0,.97105,.879854,.0372362,0,1,.999804,.995833,0,0,.938155,.933611,0,.0158731,.864755,.854311,0,.0317461,.888594,.865264,0,.0476191,.905575,.863922,0,.0634921,.915125,.850558,0,.0793651,.920665,.829254,0,.0952381,.924073,.802578,0,.111111,.926304,.772211,0,.126984,.927829,.739366,0,.142857,.928924,.705033,0,.15873,.92973,.670019,0,.174603,.930339,.634993,0,.190476,.930811,.600485,0,.206349,.931191,.566897,0,.222222,.93149,.534485,0,.238095,.931737,.503429,0,.253968,.931939,.473811,0,.269841,.932108,.445668,0,.285714,.93225,.418993,0,.301587,.932371,.393762,0,.31746,.932474,.369939,0,.333333,.932562,.347479,0,.349206,.932638,.326336,0,.365079,.932703,.306462,0,.380952,.93276,.287805,0,.396825,.932809,.270313,0,.412698,.932851,.253933,0,.428571,.932887,.23861,0,.444444,.932917,.224289,0,.460317,.932943,.210917,0,.47619,.932965,.19844,0,.492063,.932982,.186807,0,.507937,.932995,.175966,0,.52381,.933005,.165869,0,.539683,.933011,.156468,0,.555556,.933013,.147719,0,.571429,.933013,.139579,0,.587302,.93301,.132007,0,.603175,.933004,.124965,0,.619048,.932994,.118416,0,.634921,.932982,.112326,0,.650794,.932968,.106663,0,.666667,.93295,.101397,0,.68254,.932931,.0964993,0,.698413,.932908,.0919438,0,.714286,.932883,.0877057,0,.730159,.932856,.0837623,0,.746032,.932827,.0800921,0,.761905,.932796,.0766754,0,.777778,.932762,.0734936,0,.793651,.932727,.0705296,0,.809524,.932689,.0677676,0,.825397,.93265,.0651929,0,.84127,.932609,.0627917,0,.857143,.932565,.0605515,0,.873016,.932521,.0584606,0,.888889,.932474,.0565082,0,.904762,.932427,.0546841,0,.920635,.932377,.0529793,0,.936508,.932326,.0513851,0,.952381,.932274,.0498936,0,.968254,.93222,.0484975,0,.984127,.932164,.0471899,0,1],n=new Float32Array(e),i=new Float32Array(t);r.UniformsLib.LTC_FLOAT_1=new r.DataTexture(n,64,64,r.RGBAFormat,r.FloatType,r.UVMapping,r.ClampToEdgeWrapping,r.ClampToEdgeWrapping,r.LinearFilter,r.NearestFilter,1),r.UniformsLib.LTC_FLOAT_2=new r.DataTexture(i,64,64,r.RGBAFormat,r.FloatType,r.UVMapping,r.ClampToEdgeWrapping,r.ClampToEdgeWrapping,r.LinearFilter,r.NearestFilter,1),r.UniformsLib.LTC_FLOAT_1.needsUpdate=!0,r.UniformsLib.LTC_FLOAT_2.needsUpdate=!0;const s=new Uint16Array(e.length);e.forEach((function(e,t){s[t]=r.DataUtils.toHalfFloat(e)}));const a=new Uint16Array(t.length);t.forEach((function(e,t){a[t]=r.DataUtils.toHalfFloat(e)})),r.UniformsLib.LTC_HALF_1=new r.DataTexture(s,64,64,r.RGBAFormat,r.HalfFloatType,r.UVMapping,r.ClampToEdgeWrapping,r.ClampToEdgeWrapping,r.LinearFilter,r.NearestFilter,1),r.UniformsLib.LTC_HALF_2=new r.DataTexture(a,64,64,r.RGBAFormat,r.HalfFloatType,r.UVMapping,r.ClampToEdgeWrapping,r.ClampToEdgeWrapping,r.LinearFilter,r.NearestFilter,1),r.UniformsLib.LTC_HALF_1.needsUpdate=!0,r.UniformsLib.LTC_HALF_2.needsUpdate=!0}}},52080:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(1688),i=n(87736),s=n(46664);class a extends r.LineSegments2{constructor(e=new i.LineGeometry,t=new s.LineMaterial({color:16777215*Math.random()})){super(e,t),this.isLine2=!0,this.type="Line2"}}t.Line2=a},87736:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(74184);class i extends r.LineSegmentsGeometry{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const t=e.length-3,n=new Float32Array(2*t);for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.ShaderMaterial{constructor(e){super({type:"LineMaterial",uniforms:r.UniformsUtils.clone(r.UniformsUtils.merge([r.UniformsLib.common,r.UniformsLib.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new r.Vector2(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:"\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\n\t\t\t\tuniform float linewidth;\n\t\t\t\tuniform vec2 resolution;\n\n\t\t\t\tattribute vec3 instanceStart;\n\t\t\t\tattribute vec3 instanceEnd;\n\n\t\t\t\t#ifdef USE_COLOR\n\t\t\t\t\t#ifdef USE_LINE_COLOR_ALPHA\n\t\t\t\t\t\tvarying vec4 vLineColor;\n\t\t\t\t\t\tattribute vec4 instanceColorStart;\n\t\t\t\t\t\tattribute vec4 instanceColorEnd;\n\t\t\t\t\t#else\n\t\t\t\t\t\tvarying vec3 vLineColor;\n\t\t\t\t\t\tattribute vec3 instanceColorStart;\n\t\t\t\t\t\tattribute vec3 instanceColorEnd;\n\t\t\t\t\t#endif\n\t\t\t\t#endif\n\n\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\tvarying vec4 worldPos;\n\t\t\t\t\tvarying vec3 worldStart;\n\t\t\t\t\tvarying vec3 worldEnd;\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t#else\n\n\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t#endif\n\n\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\tuniform float dashScale;\n\t\t\t\t\tattribute float instanceDistanceStart;\n\t\t\t\t\tattribute float instanceDistanceEnd;\n\t\t\t\t\tvarying float vLineDistance;\n\n\t\t\t\t#endif\n\n\t\t\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t\t\t// conservative estimate of the near plane\n\t\t\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#ifdef USE_COLOR\n\n\t\t\t\t\t\tvLineColor = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\t\t\t\t\t\tvUv = uv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\t\t\t// camera space\n\t\t\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\tworldStart = start.xyz;\n\t\t\t\t\t\tworldEnd = end.xyz;\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\tvUv = uv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\t\t\tif ( perspective ) {\n\n\t\t\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// clip space\n\t\t\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t\t\t// ndc space\n\t\t\t\t\tvec3 ndcStart = clipStart.xyz / clipStart.w;\n\t\t\t\t\tvec3 ndcEnd = clipEnd.xyz / clipEnd.w;\n\n\t\t\t\t\t// direction\n\t\t\t\t\tvec2 dir = ndcEnd.xy - ndcStart.xy;\n\n\t\t\t\t\t// account for clip-space aspect ratio\n\t\t\t\t\tdir.x *= aspect;\n\t\t\t\t\tdir = normalize( dir );\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\t// get the offset direction as perpendicular to the view vector\n\t\t\t\t\t\tvec3 worldDir = normalize( end.xyz - start.xyz );\n\t\t\t\t\t\tvec3 offset;\n\t\t\t\t\t\tif ( position.y < 0.5 ) {\n\n\t\t\t\t\t\t\toffset = normalize( cross( start.xyz, worldDir ) );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\toffset = normalize( cross( end.xyz, worldDir ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// sign flip\n\t\t\t\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t\t\t\tfloat forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) );\n\n\t\t\t\t\t\t// don't extend the line if we're rendering dashes because we\n\t\t\t\t\t\t// won't be rendering the endcaps\n\t\t\t\t\t\t#ifndef USE_DASH\n\n\t\t\t\t\t\t\t// extend the line bounds to encompass endcaps\n\t\t\t\t\t\t\tstart.xyz += - worldDir * linewidth * 0.5;\n\t\t\t\t\t\t\tend.xyz += worldDir * linewidth * 0.5;\n\n\t\t\t\t\t\t\t// shift the position of the quad so it hugs the forward edge of the line\n\t\t\t\t\t\t\toffset.xy -= dir * forwardOffset;\n\t\t\t\t\t\t\toffset.z += 0.5;\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t\t// endcaps\n\t\t\t\t\t\tif ( position.y > 1.0 || position.y < 0.0 ) {\n\n\t\t\t\t\t\t\toffset.xy += dir * 2.0 * forwardOffset;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// adjust for linewidth\n\t\t\t\t\t\toffset *= linewidth * 0.5;\n\n\t\t\t\t\t\t// set the world position\n\t\t\t\t\t\tworldPos = ( position.y < 0.5 ) ? start : end;\n\t\t\t\t\t\tworldPos.xyz += offset;\n\n\t\t\t\t\t\t// project the worldpos\n\t\t\t\t\t\tvec4 clip = projectionMatrix * worldPos;\n\n\t\t\t\t\t\t// shift the depth of the projected points so the line\n\t\t\t\t\t\t// segments overlap neatly\n\t\t\t\t\t\tvec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;\n\t\t\t\t\t\tclip.z = clipPose.z * clip.w;\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\t\t\t\t\t\t// undo aspect ratio adjustment\n\t\t\t\t\t\tdir.x /= aspect;\n\t\t\t\t\t\toffset.x /= aspect;\n\n\t\t\t\t\t\t// sign flip\n\t\t\t\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t\t\t\t// endcaps\n\t\t\t\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\t\t\t\toffset += - dir;\n\n\t\t\t\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\t\t\t\toffset += dir;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// adjust for linewidth\n\t\t\t\t\t\toffset *= linewidth;\n\n\t\t\t\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\t\t\t\toffset /= resolution.y;\n\n\t\t\t\t\t\t// select end\n\t\t\t\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t\t\t\t// back to clip space\n\t\t\t\t\t\toffset *= clip.w;\n\n\t\t\t\t\t\tclip.xy += offset;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tgl_Position = clip;\n\n\t\t\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:`\n\t\t\t\tuniform vec3 diffuse;\n\t\t\t\tuniform float opacity;\n\t\t\t\tuniform float linewidth;\n\n\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\tuniform float dashOffset;\n\t\t\t\t\tuniform float dashSize;\n\t\t\t\t\tuniform float gapSize;\n\n\t\t\t\t#endif\n\n\t\t\t\tvarying float vLineDistance;\n\n\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\tvarying vec4 worldPos;\n\t\t\t\t\tvarying vec3 worldStart;\n\t\t\t\t\tvarying vec3 worldEnd;\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t#else\n\n\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t#endif\n\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\n\t\t\t\t#ifdef USE_COLOR\n\t\t\t\t\t#ifdef USE_LINE_COLOR_ALPHA\n\t\t\t\t\t\tvarying vec4 vLineColor;\n\t\t\t\t\t#else\n\t\t\t\t\t\tvarying vec3 vLineColor;\n\t\t\t\t\t#endif\n\t\t\t\t#endif\n\n\t\t\t\tvec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {\n\n\t\t\t\t\tfloat mua;\n\t\t\t\t\tfloat mub;\n\n\t\t\t\t\tvec3 p13 = p1 - p3;\n\t\t\t\t\tvec3 p43 = p4 - p3;\n\n\t\t\t\t\tvec3 p21 = p2 - p1;\n\n\t\t\t\t\tfloat d1343 = dot( p13, p43 );\n\t\t\t\t\tfloat d4321 = dot( p43, p21 );\n\t\t\t\t\tfloat d1321 = dot( p13, p21 );\n\t\t\t\t\tfloat d4343 = dot( p43, p43 );\n\t\t\t\t\tfloat d2121 = dot( p21, p21 );\n\n\t\t\t\t\tfloat denom = d2121 * d4343 - d4321 * d4321;\n\n\t\t\t\t\tfloat numer = d1343 * d4321 - d1321 * d4343;\n\n\t\t\t\t\tmua = numer / denom;\n\t\t\t\t\tmua = clamp( mua, 0.0, 1.0 );\n\t\t\t\t\tmub = ( d1343 + d4321 * ( mua ) ) / d4343;\n\t\t\t\t\tmub = clamp( mub, 0.0, 1.0 );\n\n\t\t\t\t\treturn vec2( mua, mub );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#include \n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\t\t\tif ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tfloat alpha = opacity;\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\t// Find the closest points on the view ray and the line segment\n\t\t\t\t\t\tvec3 rayEnd = normalize( worldPos.xyz ) * 1e5;\n\t\t\t\t\t\tvec3 lineDir = worldEnd - worldStart;\n\t\t\t\t\t\tvec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );\n\n\t\t\t\t\t\tvec3 p1 = worldStart + lineDir * params.x;\n\t\t\t\t\t\tvec3 p2 = rayEnd * params.y;\n\t\t\t\t\t\tvec3 delta = p1 - p2;\n\t\t\t\t\t\tfloat len = length( delta );\n\t\t\t\t\t\tfloat norm = len / linewidth;\n\n\t\t\t\t\t\t#ifndef USE_DASH\n\n\t\t\t\t\t\t\t#ifdef USE_ALPHA_TO_COVERAGE\n\n\t\t\t\t\t\t\t\tfloat dnorm = fwidth( norm );\n\t\t\t\t\t\t\t\talpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );\n\n\t\t\t\t\t\t\t#else\n\n\t\t\t\t\t\t\t\tif ( norm > 0.5 ) {\n\n\t\t\t\t\t\t\t\t\tdiscard;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t#endif\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\t#ifdef USE_ALPHA_TO_COVERAGE\n\n\t\t\t\t\t\t\t// artifacts appear on some hardware if a derivative is taken within a conditional\n\t\t\t\t\t\t\tfloat a = vUv.x;\n\t\t\t\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\t\t\t\tfloat len2 = a * a + b * b;\n\t\t\t\t\t\t\tfloat dlen = fwidth( len2 );\n\n\t\t\t\t\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\t\t\t\t\talpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#else\n\n\t\t\t\t\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\t\t\t\t\tfloat a = vUv.x;\n\t\t\t\t\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\t\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\t\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tvec4 diffuseColor = vec4( diffuse, alpha );\n\t\t\t\t\t#ifdef USE_COLOR\n\t\t\t\t\t\t#ifdef USE_LINE_COLOR_ALPHA\n\t\t\t\t\t\t\tdiffuseColor *= vLineColor;\n\t\t\t\t\t\t#else\n\t\t\t\t\t\t\tdiffuseColor.rgb *= vLineColor;\n\t\t\t\t\t\t#endif\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#include \n\n\t\t\t\t\tgl_FragColor = diffuseColor;\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include <${parseInt(r.REVISION.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}>\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t`,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(e){!0===e?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return Boolean("USE_DASH"in this.defines)},set(e){Boolean(e)!==Boolean("USE_DASH"in this.defines)&&(this.needsUpdate=!0),!0===e?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return Boolean("USE_ALPHA_TO_COVERAGE"in this.defines)},set:function(e){Boolean(e)!==Boolean("USE_ALPHA_TO_COVERAGE"in this.defines)&&(this.needsUpdate=!0),!0===e?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}t.LineMaterial=i},1688:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(74184),s=n(46664),a=new r.Vector3,o=new r.Vector3,l=new r.Vector4,c=new r.Vector4,h=new r.Vector4,u=new r.Vector3,d=new r.Matrix4,p=new r.Line3,f=new r.Vector3,m=new r.Box3,g=new r.Sphere,A=new r.Vector4;let v,y,x,b;function E(e,t,n){return A.set(0,0,-t,1).applyMatrix4(e.projectionMatrix),A.multiplyScalar(1/A.w),A.x=b/n.width,A.y=b/n.height,A.applyMatrix4(e.projectionMatrixInverse),A.multiplyScalar(1/A.w),Math.abs(Math.max(A.x,A.y))}class _ extends r.Mesh{constructor(e=new i.LineSegmentsGeometry,t=new s.LineMaterial({color:16777215*Math.random()})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,i=new Float32Array(2*t.count);for(let r=0,l=0,c=t.count;rA&&c.z>A)continue;if(l.z>A){const e=l.z-c.z,t=(l.z-A)/e;l.lerp(c,t)}else if(c.z>A){const e=c.z-l.z,t=(c.z-A)/e;c.lerp(l,t)}l.applyMatrix4(i),c.applyMatrix4(i),l.multiplyScalar(1/l.w),c.multiplyScalar(1/c.w),l.x*=s.x/2,l.y*=s.y/2,c.x*=s.x/2,c.y*=s.y/2,p.start.copy(l),p.start.z=0,p.end.copy(c),p.end.z=0;const t=p.closestPointToPointParameter(u,!0);p.at(t,f);const o=r.MathUtils.lerp(l.z,c.z,t),y=o>=-1&&o<=1,x=u.distanceTo(f)<.5*b;if(y&&x){p.start.fromBufferAttribute(m,h),p.end.fromBufferAttribute(g,h),p.start.applyMatrix4(a),p.end.applyMatrix4(a);const t=new r.Vector3,i=new r.Vector3;v.distanceSqToSegment(p.start,p.end,i,t),n.push({point:i,pointOnLine:t,distance:v.origin.distanceTo(i),object:e,face:null,faceIndex:h,uv:null,uv2:null})}}}(this,i,t))}}}t.LineSegments2=_},74184:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Box3,s=new r.Vector3;class a extends r.InstancedBufferGeometry{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute("position",new r.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this.setAttribute("uv",new r.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix4(e){const t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return void 0!==t&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new r.InstancedInterleavedBuffer(t,6,1);return this.setAttribute("instanceStart",new r.InterleavedBufferAttribute(n,3,0)),this.setAttribute("instanceEnd",new r.InterleavedBufferAttribute(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let n;e instanceof Float32Array?n=e:Array.isArray(e)&&(n=new Float32Array(e));const i=new r.InstancedInterleavedBuffer(n,2*t,1);return this.setAttribute("instanceColorStart",new r.InterleavedBufferAttribute(i,t,0)),this.setAttribute("instanceColorEnd",new r.InterleavedBufferAttribute(i,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new r.WireframeGeometry(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new r.Box3);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;void 0!==e&&void 0!==t&&(this.boundingBox.setFromBufferAttribute(e),i.setFromBufferAttribute(t),this.boundingBox.union(i))}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new r.Sphere),null===this.boundingBox&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(void 0!==e&&void 0!==t){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let r=0;for(let i=0,a=e.count;i{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(74184),s=n(46664),a=new r.Vector3,o=new r.Vector3;class l extends r.Mesh{constructor(e=new i.LineSegmentsGeometry,t=new s.LineMaterial({color:16777215*Math.random()})){super(e,t),this.isWireframe=!0,this.type="Wireframe"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,i=new Float32Array(2*t.count);for(let r=0,l=0,c=t.count;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(74184);class s extends i.LineSegmentsGeometry{constructor(e){super(),this.isWireframeGeometry2=!0,this.type="WireframeGeometry2",this.fromWireframeGeometry(new r.WireframeGeometry(e))}}t.WireframeGeometry2=s},51028:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new WeakMap;class s extends r.Loader{constructor(e){super(e),this.libraryPath="",this.libraryPending=null,this.libraryBinary=null,this.libraryConfig={},this.url="",this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.workerConfig={},this.materials=[]}setLibraryPath(e){return this.libraryPath=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,s){const a=new r.FileLoader(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),this.url=e,a.load(e,(n=>{if(i.has(n)){return i.get(n).promise.then(t).catch(s)}this.decodeObjects(n,e).then(t).catch(s)}),n,s)}debug(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))}decodeObjects(e,t){let n,r;const s=e.byteLength,a=this._getWorker(s).then((t=>(n=t,r=this.workerNextTaskID++,new Promise(((t,i)=>{n._callbacks[r]={resolve:t,reject:i},n.postMessage({type:"decode",id:r,buffer:e},[e])}))))).then((e=>this._createGeometry(e.data)));return a.catch((()=>!0)).then((()=>{n&&r&&this._releaseTask(n,r)})),i.set(e,{url:t,promise:a}),a}parse(e,t,n){this.decodeObjects(e,"").then(t).catch(n)}_compareMaterials(e){const t={};t.name=e.name,t.color={},t.color.r=e.color.r,t.color.g=e.color.g,t.color.b=e.color.b,t.type=e.type;for(let n=0;n0,opacity:1-e.transparency}),s=new r.TextureLoader;for(let r=0;r=0){const e=o[c.materialIndex];let t=this._createMaterial(e);t=this._compareMaterials(t),r=this._createObject(l,t)}else{const e=this._createMaterial();r=this._createObject(l,e)}if(void 0===r)continue;const a=e.layers[c.layerIndex];r.visible=!a||e.layers[c.layerIndex].visible,c.isInstanceDefinitionObject?n.push(r):t.add(r)}}for(let l=0;l{e.load("rhino3dm.js",t,void 0,n)})),n=new r.FileLoader(this.manager);n.setPath(this.libraryPath),n.setResponseType("arraybuffer");const i=new Promise(((e,t)=>{n.load("rhino3dm.wasm",e,void 0,t)}));this.libraryPending=Promise.all([t,i]).then((([e,t])=>{this.libraryConfig.wasmBinary=t;const n=a.toString(),r=["/* rhino3dm.js */",e,"/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([r]))}))}return this.libraryPending}_getWorker(e){return this._initLibrary().then((()=>{if(this.workerPool.lengtht._taskLoad?-1:1}));const t=this.workerPool[this.workerPool.length-1];return t._taskLoad+=e,t}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}dispose(){for(let e=0;e0&&(u.compact(),o=u.toThreejsJSON(),g.delete()),u.delete();break;case n.ObjectType.Extrusion:u=r.getMesh(n.MeshType.Any),u&&(o=u.toThreejsJSON(),u.delete());break;case n.ObjectType.TextDot:case n.ObjectType.Light:o=i(r);break;case n.ObjectType.InstanceReference:o=i(r),o.xform=i(r.xform),o.xform.array=r.xform.toFloatArray(!0);break;case n.ObjectType.SubD:r.subdivide(3),u=n.Mesh.createFromSubDControlNet(r),u&&(o=u.toThreejsJSON(),u.delete());break;default:console.warn(`THREE.3DMLoader: TODO: Implement ${d.constructor.name}`)}if(o)return l=i(a),l.geometry=i(r),a.groupCount>0&&(l.groupIds=a.getGroupList()),a.userStringCount>0&&(l.userStrings=a.getUserStrings()),r.userStringCount>0&&(l.geometry.userStrings=r.getUserStrings()),l.drawColor=a.drawColor(t),d=d.constructor.name,d=d.substring(11,d.length),{geometry:o,attributes:l,objectType:d};console.warn(`THREE.3DMLoader: ${d.constructor.name} has no associated mesh geometry.`)}function i(e){const t={};for(const n in e){const r=e[n];"function"!=typeof r&&("object"==typeof r&&null!==r&&r.hasOwnProperty("constructor")?t[n]={name:r.constructor.name,value:r.value}:t[n]=r)}return t}function s(e,t){let r=t,i=[];const a=[];if(e instanceof n.LineCurve)return[e.pointAtStart,e.pointAtEnd];if(e instanceof n.PolylineCurve){r=e.pointCount;for(let t=0;te.pointAt(t))),i}onmessage=function(s){const a=s.data;switch(a.type){case"init":t=a.libraryConfig;const s=t.wasmBinary;let o;e=new Promise((function(e){o={wasmBinary:s,onRuntimeInitialized:e},rhino3dm(o)})).then((()=>{n=o}));break;case"decode":const l=a.buffer;e.then((()=>{const e=function(e,t){const n=new Uint8Array(t),s=e.File3dm.fromByteArray(n),a=[],o=[],l=[],c=[],h=[],u=[],d=s.objects(),p=d.count;for(let i=0;i{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(91952);class s extends r.Loader{constructor(e){super(e),this.availableExtensions=[]}load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setResponseType("arraybuffer"),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){const t=this,n=new r.TextureLoader(this.manager);function s(e){const t=[],n=(new DOMParser).parseFromString(e,"application/xml").querySelectorAll("Relationship");for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(91952);class s extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setResponseType("arraybuffer"),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){function t(e){let t="AMF Material";const i=e.attributes.id.textContent;let s={r:1,g:1,b:1,a:1},a=null;for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{load(e,t,n,i){var s=this,a=""===s.path?r.LoaderUtils.extractUrlBase(e):s.path,o=new r.FileLoader(s.manager);o.setPath(s.path),o.setResponseType("arraybuffer"),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,(function(n){try{t(s.parse(n,a))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e,t){var n=new r.TextureLoader(this.manager);n.setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);var i={KeyFrame:class{constructor(e,t){this.time=e,this.matrix=t.clone(),this.position=new r.Vector3,this.quaternion=new r.Quaternion,this.scale=new r.Vector3(1,1,1),this.matrix.decompose(this.position,this.quaternion,this.scale),this.clone=function(){return new i.KeyFrame(this.time,this.matrix)},this.lerp=function(e,t){var n=(t-=this.time)/(e.time-this.time),r=1-n,s=this.position,a=this.quaternion,o=e.position,l=e.quaternion;return i.KeyFrame.tempAniPos.x=s.x*r+o.x*n,i.KeyFrame.tempAniPos.y=s.y*r+o.y*n,i.KeyFrame.tempAniPos.z=s.z*r+o.z*n,i.KeyFrame.tempAniQuat.set(a.x,a.y,a.z,a.w),i.KeyFrame.tempAniQuat.slerp(l,n),i.KeyFrame.tempAniMatrix.compose(i.KeyFrame.tempAniPos,i.KeyFrame.tempAniQuat,i.KeyFrame.tempAniScale)}}}};i.KeyFrame.tempAniPos=new r.Vector3,i.KeyFrame.tempAniQuat=new r.Quaternion,i.KeyFrame.tempAniScale=new r.Vector3(1,1,1),i.KeyFrame.tempAniMatrix=new r.Matrix4,i.KeyFrameTrack=function(){this.keys=[],this.target=null,this.time=0,this.length=0,this._accelTable={},this.fps=20,this.addKey=function(e){this.keys.push(e)},this.init=function(){if(this.sortKeys(),this.keys.length>0?this.length=this.keys[this.keys.length-1].time:this.length=0,this.fps)for(let e=0;e=e/this.fps){this._accelTable[e]=t;break}}},this.parseFromThree=function(e){var t=e.fps;this.target=e.node;var n=e.hierarchy[0].keys;for(let r=0;re){t=this.keys[r],n=this.keys[r+1];break}if(this.keys[r].time4&&(n.length=4);var r=0;for(let i=0;i<4;i++)r+=n[i].w*n[i].w;r=Math.sqrt(r);for(let i=0;i<4;i++)n[i].w=n[i].w/r,e[i]=n[i].i,t[i]=n[i].w}function c(e,t){if(0==e.name.indexOf("bone_"+t))return e;for(let r in e.children){var n=c(e.children[r],t);if(n)return n}}class h{constructor(){this.mPrimitiveTypes=0,this.mNumVertices=0,this.mNumFaces=0,this.mNumBones=0,this.mMaterialIndex=0,this.mVertices=[],this.mNormals=[],this.mTangents=[],this.mBitangents=[],this.mColors=[[]],this.mTextureCoords=[[]],this.mFaces=[],this.mBones=[],this.hookupSkeletons=function(e){if(0!=this.mBones.length){for(var t=[],n=[],i=e.findNode(this.mBones[0].mName);i.mParent&&i.mParent.isBone;)i=i.mParent;var s=o(i.toTHREE(e),e);this.threeNode.add(s);for(let r=0;r0&&i.setAttribute("normal",new r.BufferAttribute(this.mNormalBuffer,3)),this.mColorBuffer&&this.mColorBuffer.length>0&&i.setAttribute("color",new r.BufferAttribute(this.mColorBuffer,4)),this.mTexCoordsBuffers[0]&&this.mTexCoordsBuffers[0].length>0&&i.setAttribute("uv",new r.BufferAttribute(new Float32Array(this.mTexCoordsBuffers[0]),2)),this.mTexCoordsBuffers[1]&&this.mTexCoordsBuffers[1].length>0&&i.setAttribute("uv1",new r.BufferAttribute(new Float32Array(this.mTexCoordsBuffers[1]),2)),this.mTangentBuffer&&this.mTangentBuffer.length>0&&i.setAttribute("tangents",new r.BufferAttribute(this.mTangentBuffer,3)),this.mBitangentBuffer&&this.mBitangentBuffer.length>0&&i.setAttribute("bitangents",new r.BufferAttribute(this.mBitangentBuffer,3)),this.mBones.length>0){var s=[],a=[];for(let e=0;e0&&(n=new r.SkinnedMesh(i,t)).normalizeSkinWeights(),this.threeNode=n,n}}}class u{constructor(){this.mNumIndices=0,this.mIndices=[]}}class d{constructor(){this.x=0,this.y=0,this.z=0,this.toTHREE=function(){return new r.Vector3(this.x,this.y,this.z)}}}class p{constructor(){this.r=0,this.g=0,this.b=0,this.a=0,this.toTHREE=function(){return new r.Color(this.r,this.g,this.b)}}}class f{constructor(){this.x=0,this.y=0,this.z=0,this.w=0,this.toTHREE=function(){return new r.Quaternion(this.x,this.y,this.z,this.w)}}}class m{constructor(){this.mVertexId=0,this.mWeight=0}}class g{constructor(){this.data=[],this.toString=function(){var e="";return this.data.forEach((function(t){e+=String.fromCharCode(t)})),e.replace(/[^\x20-\x7E]+/g,"")}}}class A{constructor(){this.mTime=0,this.mValue=null}}class v{constructor(){this.mTime=0,this.mValue=null}}class y{constructor(){this.mName="",this.mTransformation=[],this.mNumChildren=0,this.mNumMeshes=0,this.mMeshes=[],this.mChildren=[],this.toTHREE=function(e){if(this.threeNode)return this.threeNode;var t=new r.Object3D;t.name=this.mName,t.matrix=this.mTransformation.toTHREE();for(let n=0;n0)var t=this.mAnimations[0].toTHREE(this);return{object:e,animation:t}}}}class L{constructor(){this.elements=[[],[],[],[]],this.toTHREE=function(){var e=new r.Matrix4;for(let t=0;t<4;++t)for(let n=0;n<4;++n)e.elements[4*t+n]=this.elements[n][t];return e}}}var F=!0;function U(e){var t=e.getFloat32(e.readOffset,F);return e.readOffset+=4,t}function O(e){var t=e.getFloat64(e.readOffset,F);return e.readOffset+=8,t}function N(e){var t=e.getUint16(e.readOffset,F);return e.readOffset+=2,t}function k(e){var t=e.getUint32(e.readOffset,F);return e.readOffset+=4,t}function G(e){var t=e.getUint32(e.readOffset,F);return e.readOffset+=4,t}function z(e){var t=new d;return t.x=U(e),t.y=U(e),t.z=U(e),t}function Q(e){var t=new p;return t.r=U(e),t.g=U(e),t.b=U(e),t}function V(e){var t=new g,n=k(e);return e.ReadBytes(t.data,1,n),t.toString()}function H(e){var t=new m;return t.mVertexId=k(e),t.mWeight=U(e),t}function j(e){var t=new L;for(let n=0;n<4;++n)for(let r=0;r<4;++r)t.elements[n][r]=U(e);return t}function W(e){var t=new A;return t.mTime=O(e),t.mValue=z(e),t}function X(e){var t=new v;return t.mTime=O(e),t.mValue=function(e){var t=new f;return t.w=U(e),t.x=U(e),t.y=U(e),t.z=U(e),t}(e),t}function Y(e,t,n){for(let r=0;r0,ce=N(n)>0,le)throw"Shortened binaries are not supported!";if(n.Seek(256,he),n.Seek(128,he),n.Seek(64,he),ce){var r=G(n),i=n.FileSize()-n.Tell(),s=[];n.Read(s,1,i);var a=[];uncompress(a,r,s,i),oe(new ArrayBuffer(a),t)}else oe(n,t);return t.toTHREE()}(e)}}t.AssimpLoader=i},58360:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{constructor(e){super(e),this.animateBonePositions=!0,this.animateBoneRotations=!0}load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){function t(e,n,i){if("ENDSITE"===i.type)return;const s={time:n,position:new r.Vector3,rotation:new r.Quaternion};i.frames.push(s);const a=new r.Quaternion,o=new r.Vector3(1,0,0),l=new r.Vector3(0,1,0),c=new r.Vector3(0,0,1);for(let t=0;t{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=new WeakMap,o=class extends s.Loader{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.workerConfig=null}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerLimit=e,this}detectSupport(e){return this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},this}load(e,t,n,r){const i=new s.FileLoader(this.manager);i.setResponseType("arraybuffer"),i.setWithCredentials(this.withCredentials);const o=new s.CompressedTexture;return i.load(e,(e=>{if(a.has(e)){return a.get(e).promise.then(t).catch(r)}this._createTexture([e]).then((function(e){o.copy(e),o.needsUpdate=!0,t&&t(o)})).catch(r)}),n,r),o}parseInternalAsync(e){const{levels:t}=e,n=new Set;for(let r=0;r(n=t,r=this.workerNextTaskID++,new Promise(((t,s)=>{n._callbacks[r]={resolve:t,reject:s},n.postMessage({type:"transcode",id:r,buffers:e,taskConfig:i},e)}))))).then((e=>{const{mipmaps:t,width:n,height:r,format:i}=e,a=new s.CompressedTexture(t,n,r,i,s.UnsignedByteType);return a.minFilter=1===t.length?s.LinearFilter:s.LinearMipmapLinearFilter,a.magFilter=s.LinearFilter,a.generateMipmaps=!1,a.needsUpdate=!0,a}));return l.catch((()=>!0)).then((()=>{n&&r&&(n._taskLoad-=o,delete n._callbacks[r])})),a.set(e[0],{promise:l}),l}_initTranscoder(){if(!this.transcoderPending){const e=new s.FileLoader(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=new Promise(((t,n)=>{e.load("basis_transcoder.js",t,void 0,n)})),n=new s.FileLoader(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);const r=new Promise(((e,t)=>{n.load("basis_transcoder.wasm",e,void 0,t)}));this.transcoderPending=Promise.all([t,r]).then((([e,t])=>{const n=o.BasisWorker.toString(),r=["/* constants */","let _EngineFormat = "+JSON.stringify(o.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(o.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(o.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([r])),this.transcoderBinary=t}))}return this.transcoderPending}_allocateWorker(e){return this._initTranscoder().then((()=>{if(this.workerPool.lengtht._taskLoad?-1:1}));const t=this.workerPool[this.workerPool.length-1];return t._taskLoad+=e,t}))}dispose(){for(let e=0;e{n={wasmBinary:a,onRuntimeInitialized:e},BASIS(n)})).then((()=>{n.initializeBasis()}));break;case"transcode":t.then((()=>{try{const{width:e,height:t,hasAlpha:r,mipmaps:a,format:o}=i.taskConfig.lowLevel?function(e){const{basisFormat:t,width:r,height:i,hasAlpha:a}=e,{transcoderFormat:o,engineFormat:l}=c(t,r,i,a),f=n.getBytesPerBlockOrPixel(o);h(n.isFormatSupported(o),"THREE.BasisTextureLoader: Unsupported format.");const m=[];if(t===s.ETC1S){const t=new n.LowLevelETC1SImageTranscoder,{endpointCount:r,endpointsData:i,selectorCount:s,selectorsData:l,tablesData:c}=e.globalData;try{let n;n=t.decodePalettes(r,i,s,l),h(n,"THREE.BasisTextureLoader: decodePalettes() failed."),n=t.decodeTables(c),h(n,"THREE.BasisTextureLoader: decodeTables() failed.");for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(37960);class s extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=""===s.path?r.LoaderUtils.extractUrlBase(e):s.path,o=new r.FileLoader(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,(function(n){try{t(s.parse(n,a))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e,t){function n(e,t){const n=[],r=e.childNodes;for(let i=0,s=r.length;i0&&t.push(new r.VectorKeyframeTrack(i+".position",s,a)),o.length>0&&t.push(new r.QuaternionKeyframeTrack(i+".quaternion",s,o)),l.length>0&&t.push(new r.VectorKeyframeTrack(i+".scale",s,l)),t}function S(e,t,n){let r,i,s,a=!0;for(i=0,s=e.length;i=0;){const r=e[t];if(null!==r.value[n])return r;t--}return null}function w(e,t,n){for(;t>>0));n=n.toLowerCase(),t="tga"===n?Ye:Xe;return t}(i);if(void 0!==t){const n=t.load(i),s=e.extra;if(void 0!==s&&void 0!==s.technique&&!1===c(s.technique)){const e=s.technique;n.wrapS=e.wrapU?r.RepeatWrapping:r.ClampToEdgeWrapping,n.wrapT=e.wrapV?r.RepeatWrapping:r.ClampToEdgeWrapping,n.offset.set(e.offsetU||0,e.offsetV||0),n.repeat.set(e.repeatU||1,e.repeatV||1)}else n.wrapS=r.RepeatWrapping,n.wrapT=r.RepeatWrapping;return n}return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",i),null}return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",e.id),null}s.name=e.name||"";const o=i.parameters;for(const r in o){const e=o[r];switch(r){case"diffuse":e.color&&s.color.fromArray(e.color),e.texture&&(s.map=a(e.texture));break;case"specular":e.color&&s.specular&&s.specular.fromArray(e.color),e.texture&&(s.specularMap=a(e.texture));break;case"bump":e.texture&&(s.normalMap=a(e.texture));break;case"ambient":e.texture&&(s.lightMap=a(e.texture));break;case"shininess":e.float&&s.shininess&&(s.shininess=e.float);break;case"emission":e.color&&s.emissive&&s.emissive.fromArray(e.color),e.texture&&(s.emissiveMap=a(e.texture))}}let l=o.transparent,h=o.transparency;if(void 0===h&&l&&(h={float:1}),void 0===l&&h&&(l={opaque:"A_ONE",data:{color:[1,1,1,1]}}),l&&h)if(l.data.texture)s.transparent=!0;else{const e=l.data.color;switch(l.opaque){case"A_ONE":s.opacity=e[3]*h.float;break;case"RGB_ZERO":s.opacity=1-e[0]*h.float;break;case"A_ZERO":s.opacity=1-e[3]*h.float;break;case"RGB_ONE":s.opacity=e[0]*h.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',l.opaque)}s.opacity<1&&(s.transparent=!0)}if(void 0!==i.extra&&void 0!==i.extra.technique){const e=i.extra.technique;for(const t in e){const n=e[t];switch(t){case"double_sided":s.side=1===n?r.DoubleSide:r.FrontSide;break;case"bump":s.normalMap=a(n.texture),s.normalScale=new r.Vector2(1,1)}}}return s}function J(e){return f(Ze.materials[e],K)}function Z(e){for(let t=0;t0?n+s:n;t.inputs[a]={id:e,offset:i},t.stride=Math.max(t.stride,i+1),"TEXCOORD"===n&&(t.hasUV=!0);break;case"vcount":t.vcount=o(r.textContent);break;case"p":t.p=o(r.textContent)}}return t}function he(e){let t=0;for(let n=0,r=e.length;n0&&t0&&f.setAttribute("position",new r.Float32BufferAttribute(s.array,s.stride)),a.array.length>0&&f.setAttribute("normal",new r.Float32BufferAttribute(a.array,a.stride)),c.array.length>0&&f.setAttribute("color",new r.Float32BufferAttribute(c.array,c.stride)),o.array.length>0&&f.setAttribute("uv",new r.Float32BufferAttribute(o.array,o.stride)),l.array.length>0&&f.setAttribute("uv2",new r.Float32BufferAttribute(l.array,l.stride)),h.length>0&&f.setAttribute("skinIndex",new r.Float32BufferAttribute(h,u)),d.length>0&&f.setAttribute("skinWeight",new r.Float32BufferAttribute(d,p)),i.data=f,i.type=e[0].type,i.materialKeys=m,i}function pe(e,t,n,r){const i=e.p,s=e.stride,a=e.vcount;function o(e){let t=i[e+n]*c;const s=t+c;for(;t4)for(let t=1,r=n-2;t<=r;t++){const n=e+s*t,r=e+s*(t+1);o(e+0*s),o(n),o(r)}e+=s*n}}else for(let h=0,u=i.length;h=t.limits.max&&(t.static=!0),t.middlePosition=(t.limits.min+t.limits.max)/2,t}function ye(e){const t={sid:e.getAttribute("sid"),name:e.getAttribute("name")||"",attachments:[],transforms:[]};for(let n=0;ni.limits.max||t{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.CompressedTextureLoader{constructor(e){super(e)}parse(e,t){const n={mipmaps:[],width:0,height:0,format:null,mipmapCount:1};function i(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}function s(e,t,n,r){const i=n*r*4,s=new Uint8Array(e,t,i),a=new Uint8Array(i);let o=0,l=0;for(let c=0;c>8&255,f>>16&255,f>>24&255))),n;p=!0,u=64,n.format=r.RGBAFormat}var f;n.mipmapCount=1,131072&h[2]&&!1!==t&&(n.mipmapCount=Math.max(1,h[7]));const m=h[28];if(n.isCubemap=!!(512&m),n.isCubemap&&(!(1024&m)||!(2048&m)||!(4096&m)||!(8192&m)||!(16384&m)||!(32768&m)))return console.error("THREE.DDSLoader.parse: Incomplete cubemap faces"),n;n.width=h[4],n.height=h[3];let g=h[1]+4;const A=n.isCubemap?6:1;for(let r=0;r>1,1),r=Math.max(r>>1,1)}}return n}}t.DDSLoader=i},8972:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new WeakMap;class s extends r.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,i){const s=new r.FileLoader(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,(e=>{const n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(i)}),n,i)}decodeDracoFile(e,t,n,r){const i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)}decodeGeometry(e,t){for(const i in t.attributeTypes){const e=t.attributeTypes[i];void 0!==e.BYTES_PER_ELEMENT&&(t.attributeTypes[i]=e.name)}const n=JSON.stringify(t);if(i.has(e)){const t=i.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const s=this.workerNextTaskID++,a=e.byteLength,o=this._getWorker(s,a).then((n=>(r=n,new Promise(((n,i)=>{r._callbacks[s]={resolve:n,reject:i},r.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return o.catch((()=>!0)).then((()=>{r&&s&&this._releaseTask(r,s)})),i.set(e,{key:n,promise:o}),o}_createGeometry(e){const t=new r.BufferGeometry;e.index&&t.setIndex(new r.BufferAttribute(e.index.array,1));for(let n=0;n{n.load(e,t,void 0,r)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{const n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const r=a.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))})),this.decoderPending}_getWorker(e,t){return this._initDecoder().then((()=>{if(this.workerPool.lengtht._taskLoad?-1:1}));const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))}dispose(){for(let e=0;e{const t=e.draco,a=new t.Decoder,o=new t.DecoderBuffer;o.Init(new Int8Array(r),r.byteLength);try{const e=function(e,t,r,i){const s=i.attributeIDs,a=i.attributeTypes;let o,l;const c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)o=new e.Mesh,l=t.DecodeBufferToMesh(r,o);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");o=new e.PointCloud,l=t.DecodeBufferToPointCloud(r,o)}if(!l.ok()||0===o.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const h={index:null,attributes:[]};for(const u in s){const r=self[a[u]];let l,c;if(i.useUniqueIDs)c=s[u],l=t.GetAttributeByUniqueId(o,c);else{if(c=t.GetAttributeId(o,e[s[u]]),-1===c)continue;l=t.GetAttribute(o,c)}h.attributes.push(n(e,t,o,u,r,l))}c===e.TRIANGULAR_MESH&&(h.index=function(e,t,n){const r=n.num_faces(),i=3*r,s=4*i,a=e._malloc(s);t.GetTrianglesUInt32Array(n,s,a);const o=new Uint32Array(e.HEAPF32.buffer,a,i).slice();return e._free(a),{array:o,itemSize:1}}(e,t,o));return e.destroy(o),h}(t,a,o,s),r=e.attributes.map((e=>e.array.buffer));e.index&&r.push(e.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:e},r)}catch(l){console.error(l),self.postMessage({type:"error",id:i.id,error:l.message})}finally{t.destroy(o),t.destroy(a)}}))}}}t.DRACOLoader=s},17408:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(91952),s="colorSpace"in new r.Texture;class a extends r.DataTextureLoader{constructor(e){super(e),this.type=r.HalfFloatType}parse(e){const t=65536,n=14,a=65537,o=16384,l=Math.pow(2.7182818,2.2);const c={l:0,c:0,lc:0};function h(e,t,n,r,i){for(;n>n&(1<r)return!1;h(6,d,p,e,l);var f=c.l;if(d=c.c,p=c.lc,o[i]=f,63==f){if(l.value-n.value>r)throw"Something wrong with hufUnpackEncTable";h(8,d,p,e,l);var m=c.l+6;if(d=c.c,p=c.lc,i+m>s+1)throw"Something wrong with hufUnpackEncTable";for(;m--;)o[i++]=0;i--}else if(f>=59){if(i+(m=f-59+2)>s+1)throw"Something wrong with hufUnpackEncTable";for(;m--;)o[i++]=0;i--}}!function(e){for(var t=0;t<=58;++t)u[t]=0;for(t=0;t0;--t){var r=n+u[t]>>1;u[t]=n,n=r}for(t=0;t0&&(e[t]=i|u[i]++<<6)}}(o)}function p(e){return 63&e}function f(e){return e>>6}const m={c:0,lc:0};function g(e,t,n,r){e=e<<8|H(n,r),t+=8,m.c=e,m.lc=t}const A={c:0,lc:0};function v(e,t,n,r,i,s,a,o,l,c){if(e==t){r<8&&(g(n,r,i,a),n=m.c,r=m.lc);var h=n>>(r-=8);h=new Uint8Array([h])[0];if(l.value+h>c)return!1;for(var u=o[l.value-1];h-- >0;)o[l.value++]=u}else{if(!(l.value32767?t-65536:t}const b={a:0,b:0};function E(e,t){var n=x(e),r=x(t),i=n+(1&r)+(r>>1),s=i,a=i-r;b.a=s,b.b=a}function _(e,t){var n=y(e),r=y(t),i=n-(r>>1)&65535,s=r+i-32768&65535;b.a=s,b.b=i}function S(e,t,n,r,i,s,a){for(var o,l=a<16384,c=n>i?i:n,h=1;h<=c;)h<<=1;for(o=h>>=1,h>>=1;h>=1;){for(var u,d,p,f,m=0,g=m+s*(i-o),A=s*h,v=s*o,y=r*h,x=r*o;m<=g;m+=v){for(var S=m,M=m+r*(n-o);S<=M;S+=x){var w=S+y,C=(T=S+A)+y;l?(E(e[S+t],e[T+t]),u=b.a,p=b.b,E(e[w+t],e[C+t]),d=b.a,f=b.b,E(u,d),e[S+t]=b.a,e[w+t]=b.b,E(p,f),e[T+t]=b.a,e[C+t]=b.b):(_(e[S+t],e[T+t]),u=b.a,p=b.b,_(e[w+t],e[C+t]),d=b.a,f=b.b,_(u,d),e[S+t]=b.a,e[w+t]=b.b,_(p,f),e[T+t]=b.a,e[C+t]=b.b)}if(n&h){var T=S+A;l?E(e[S+t],e[T+t]):_(e[S+t],e[T+t]),u=b.a,e[T+t]=b.b,e[S+t]=u}}if(i&h)for(S=m,M=m+r*(n-o);S<=M;S+=x){w=S+y;l?E(e[S+t],e[w+t]):_(e[S+t],e[w+t]),u=b.a,e[w+t]=b.b,e[S+t]=u}o=h,h>>=1}return m}function M(e,t,r,i,s,l){var c=r.value,h=V(t,r),u=V(t,r);r.value+=4;var y=V(t,r);if(r.value+=4,h<0||h>=a||u<0||u>=a)throw"Something wrong with HUF_ENCSIZE";var x=new Array(a),b=new Array(o);if(function(e){for(var t=0;t8*(i-(r.value-c)))throw"Something wrong with hufUncompress";!function(e,t,r,i){for(;t<=r;t++){var s=f(e[t]),a=p(e[t]);if(s>>a)throw"Invalid table entry";if(a>n){if((h=i[s>>a-n]).len)throw"Invalid table entry";if(h.lit++,h.p){var o=h.p;h.p=new Array(h.lit);for(var l=0;l0;l--){var h;if((h=i[(s<=n;)if((S=t[u>>d-n&16383]).len)d-=S.len,v(S.lit,o,u,d,r,0,s,c,h,y),u=A.c,d=A.lc;else{if(!S.p)throw"hufDecode issues";var b;for(b=0;b=E&&f(e[S.p[b]])==(u>>d-E&(1<>=_,d-=_;d>0;){var S;if(!(S=t[u<s||(t[i++]=e[n++],i>s));)t[i++]=e[r++]}function T(e){for(var t=e.byteLength,n=new Array,r=0,i=new DataView(e);t>0;){var s=i.getInt8(r++);if(s<0){t-=(o=-s)+1;for(var a=0;a>8==255?i+=255&r:(n[i]=r,i++),e.value++}function B(e,t){t[0]=q(e[0]),t[1]=q(e[1]),t[2]=q(e[5]),t[3]=q(e[6]),t[4]=q(e[14]),t[5]=q(e[15]),t[6]=q(e[27]),t[7]=q(e[28]),t[8]=q(e[2]),t[9]=q(e[4]),t[10]=q(e[7]),t[11]=q(e[13]),t[12]=q(e[16]),t[13]=q(e[26]),t[14]=q(e[29]),t[15]=q(e[42]),t[16]=q(e[3]),t[17]=q(e[8]),t[18]=q(e[12]),t[19]=q(e[17]),t[20]=q(e[25]),t[21]=q(e[30]),t[22]=q(e[41]),t[23]=q(e[43]),t[24]=q(e[9]),t[25]=q(e[11]),t[26]=q(e[18]),t[27]=q(e[24]),t[28]=q(e[31]),t[29]=q(e[40]),t[30]=q(e[44]),t[31]=q(e[53]),t[32]=q(e[10]),t[33]=q(e[19]),t[34]=q(e[23]),t[35]=q(e[32]),t[36]=q(e[39]),t[37]=q(e[45]),t[38]=q(e[52]),t[39]=q(e[54]),t[40]=q(e[20]),t[41]=q(e[22]),t[42]=q(e[33]),t[43]=q(e[38]),t[44]=q(e[46]),t[45]=q(e[51]),t[46]=q(e[55]),t[47]=q(e[60]),t[48]=q(e[21]),t[49]=q(e[34]),t[50]=q(e[37]),t[51]=q(e[47]),t[52]=q(e[50]),t[53]=q(e[56]),t[54]=q(e[59]),t[55]=q(e[61]),t[56]=q(e[35]),t[57]=q(e[36]),t[58]=q(e[48]),t[59]=q(e[49]),t[60]=q(e[57]),t[61]=q(e[58]),t[62]=q(e[62]),t[63]=q(e[63])}function R(e){const t=.5*Math.cos(.7853975),n=.5*Math.cos(3.14159/16),r=.5*Math.cos(3.14159/8),i=.5*Math.cos(3*3.14159/16),s=.5*Math.cos(.981746875),a=.5*Math.cos(3*3.14159/8),o=.5*Math.cos(1.374445625);for(var l=new Array(4),c=new Array(4),h=new Array(4),u=new Array(4),d=0;d<8;++d){var p=8*d;l[0]=r*e[p+2],l[1]=a*e[p+2],l[2]=r*e[p+6],l[3]=a*e[p+6],c[0]=n*e[p+1]+i*e[p+3]+s*e[p+5]+o*e[p+7],c[1]=i*e[p+1]-o*e[p+3]-n*e[p+5]-s*e[p+7],c[2]=s*e[p+1]-n*e[p+3]+o*e[p+5]+i*e[p+7],c[3]=o*e[p+1]-s*e[p+3]+i*e[p+5]-n*e[p+7],h[0]=t*(e[p+0]+e[p+4]),h[3]=t*(e[p+0]-e[p+4]),h[1]=l[0]+l[3],h[2]=l[1]-l[2],u[0]=h[0]+h[1],u[1]=h[3]+h[2],u[2]=h[3]-h[2],u[3]=h[0]-h[1],e[p+0]=u[0]+c[0],e[p+1]=u[1]+c[1],e[p+2]=u[2]+c[2],e[p+3]=u[3]+c[3],e[p+4]=u[3]-c[3],e[p+5]=u[2]-c[2],e[p+6]=u[1]-c[1],e[p+7]=u[0]-c[0]}for(var f=0;f<8;++f)l[0]=r*e[16+f],l[1]=a*e[16+f],l[2]=r*e[48+f],l[3]=a*e[48+f],c[0]=n*e[8+f]+i*e[24+f]+s*e[40+f]+o*e[56+f],c[1]=i*e[8+f]-o*e[24+f]-n*e[40+f]-s*e[56+f],c[2]=s*e[8+f]-n*e[24+f]+o*e[40+f]+i*e[56+f],c[3]=o*e[8+f]-s*e[24+f]+i*e[40+f]-n*e[56+f],h[0]=t*(e[f]+e[32+f]),h[3]=t*(e[f]-e[32+f]),h[1]=l[0]+l[3],h[2]=l[1]-l[2],u[0]=h[0]+h[1],u[1]=h[3]+h[2],u[2]=h[3]-h[2],u[3]=h[0]-h[1],e[0+f]=u[0]+c[0],e[8+f]=u[1]+c[1],e[16+f]=u[2]+c[2],e[24+f]=u[3]+c[3],e[32+f]=u[3]-c[3],e[40+f]=u[2]-c[2],e[48+f]=u[1]-c[1],e[56+f]=u[0]-c[0]}function P(e){for(var t=0;t<64;++t){var n=e[0][t],r=e[1][t],i=e[2][t];e[0][t]=n+1.5747*i,e[1][t]=n-.1873*r-.4682*i,e[2][t]=n+1.8556*r}}function D(e,t,n){for(var i=0;i<64;++i)t[n+i]=r.DataUtils.toHalfFloat(L(e[i]))}function L(e){return e<=1?Math.sign(e)*Math.pow(Math.abs(e),2.2):Math.sign(e)*Math.pow(l,Math.abs(e)-1)}function F(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function U(e){var t=e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size),n=new Uint8Array(T(t)),r=new Uint8Array(n.length);return w(n),C(n,r),new DataView(r.buffer)}function O(e){var t=e.array.slice(e.offset.value,e.offset.value+e.size),n=i.unzlibSync(t),r=new Uint8Array(n.length);return w(n),C(n,r),new DataView(r.buffer)}function N(e){for(var n=e.viewer,r={value:e.offset.value},i=new Uint16Array(e.width*e.scanlineBlockSize*(e.channels*e.type)),s=new Uint8Array(8192),a=0,o=new Array(e.channels),l=0;l=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(c<=h)for(l=0;l>3]&1<<(7&i))&&(n[r++]=i);for(var s=r-1;r0;){var l=z(t.buffer,n),c=j(t,n),h=c>>2&3,u=new Int8Array([(c>>4)-1])[0],d=j(t,n);a.push({name:l,index:u,type:d,compression:h}),o-=l.length+3}for(var p=ne.channels,f=new Array(e.channels),m=0;m=0&&(v.idx[x.index]=y),g.offset=y)}if(s.acCompressedSize>0)switch(s.acCompression){case 0:var b=new Uint16Array(s.totalAcUncompressedCount);M(e.array,t,n,s.acCompressedSize,b,s.totalAcUncompressedCount);break;case 1:var E=e.array.slice(n.value,n.value+s.totalAcUncompressedCount),_=i.unzlibSync(E);b=new Uint16Array(_.buffer);n.value+=s.totalAcUncompressedCount}if(s.dcCompressedSize>0){var S={array:e.array,offset:n,size:s.dcCompressedSize},w=new Uint16Array(O(S).buffer);n.value+=s.dcCompressedSize}if(s.rleRawSize>0){E=e.array.slice(n.value,n.value+s.rleCompressedSize);var C=T((_=i.unzlibSync(E)).buffer);n.value+=s.rleCompressedSize}var L=0,F=new Array(f.length);for(m=0;m>10,n=1023&e;return(e>>15?-1:1)*(t?31===t?n?NaN:1/0:Math.pow(2,t-15)*(1+n/1024):n/1024*6103515625e-14)}function K(e,t){var n=e.getUint16(t.value,!0);return t.value+=2,n}function J(e,t){return q(K(e,t))}function Z(e,t,n,r,i){return"string"===r||"stringvector"===r||"iccProfile"===r?function(e,t,n){var r=(new TextDecoder).decode(new Uint8Array(e).slice(t.value,t.value+n));return t.value=t.value+n,r}(t,n,i):"chlist"===r?function(e,t,n,r){for(var i=n.value,s=[];n.valuere.height?re.height-e:re.scanlineBlockSize;const t=re.size=re.height)break;for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(91952),s=n(64624);let a,o,l;class c extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=""===s.path?r.LoaderUtils.extractUrlBase(e):s.path,o=new r.FileLoader(this.manager);o.setPath(s.path),o.setResponseType("arraybuffer"),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,(function(n){try{t(s.parse(n,a))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e,t){if(function(e){const t="Kaydara FBX Binary \0";return e.byteLength>=t.length&&t===w(e,0,t.length)}(e))a=(new f).parse(e);else{const t=w(e);if(!function(e){const t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"];let n=0;function r(t){const r=e[t-1];return e=e.slice(n+t),n++,r}for(let i=0;i0,s="string"==typeof i.Content&&""!==i.Content;if(e||s){const e=this.parseImage(n[r]);t[i.RelativeFilename||i.Filename]=e}}}}for(const n in e){const r=e[n];void 0!==t[r]?e[n]=t[r]:e[n]=e[n].split("\\").pop()}return e}parseImage(e){const t=e.Content,n=e.RelativeFilename||e.Filename,r=n.slice(n.lastIndexOf(".")+1).toLowerCase();let i;switch(r){case"bmp":i="image/bmp";break;case"jpg":case"jpeg":i="image/jpeg";break;case"png":i="image/png";break;case"tif":i="image/tiff";break;case"tga":null===this.manager.getHandler(".tga")&&console.warn("FBXLoader: TGA loader not found, skipping ",n),i="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+r+'" is not supported.')}if("string"==typeof t)return"data:"+i+";base64,"+t;{const e=new Uint8Array(t);return window.URL.createObjectURL(new Blob([e],{type:i}))}}parseTextures(e){const t=new Map;if("Texture"in a.Objects){const n=a.Objects.Texture;for(const r in n){const i=this.parseTexture(n[r],e);t.set(parseInt(r),i)}}return t}parseTexture(e,t){const n=this.loadTexture(e,t);n.ID=e.id,n.name=e.attrName;const i=e.WrapModeU,s=e.WrapModeV,a=void 0!==i?i.value:0,o=void 0!==s?s.value:0;if(n.wrapS=0===a?r.RepeatWrapping:r.ClampToEdgeWrapping,n.wrapT=0===o?r.RepeatWrapping:r.ClampToEdgeWrapping,"Scaling"in e){const t=e.Scaling.value;n.repeat.x=t[0],n.repeat.y=t[1]}return n}loadTexture(e,t){let n;const i=this.textureLoader.path,s=o.get(e.id).children;let a;void 0!==s&&s.length>0&&void 0!==t[s[0].ID]&&(n=t[s[0].ID],0!==n.indexOf("blob:")&&0!==n.indexOf("data:")||this.textureLoader.setPath(void 0));const l=e.FileName.slice(-3).toLowerCase();if("tga"===l){const t=this.manager.getHandler(".tga");null===t?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",e.RelativeFilename),a=new r.Texture):(t.setPath(this.textureLoader.path),a=t.load(n))}else"psd"===l?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",e.RelativeFilename),a=new r.Texture):a=this.textureLoader.load(n);return this.textureLoader.setPath(i),a}parseMaterials(e){const t=new Map;if("Material"in a.Objects){const n=a.Objects.Material;for(const r in n){const i=this.parseMaterial(n[r],e);null!==i&&t.set(parseInt(r),i)}}return t}parseMaterial(e,t){const n=e.id,i=e.attrName;let s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!o.has(n))return null;const a=this.parseParameters(e,t,n);let l;switch(s.toLowerCase()){case"phong":l=new r.MeshPhongMaterial;break;case"lambert":l=new r.MeshLambertMaterial;break;default:console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.',s),l=new r.MeshPhongMaterial}return l.setValues(a),l.name=i,l}parseParameters(e,t,n){const i={};e.BumpFactor&&(i.bumpScale=e.BumpFactor.value),e.Diffuse?i.color=(new r.Color).fromArray(e.Diffuse.value):!e.DiffuseColor||"Color"!==e.DiffuseColor.type&&"ColorRGB"!==e.DiffuseColor.type||(i.color=(new r.Color).fromArray(e.DiffuseColor.value)),e.DisplacementFactor&&(i.displacementScale=e.DisplacementFactor.value),e.Emissive?i.emissive=(new r.Color).fromArray(e.Emissive.value):!e.EmissiveColor||"Color"!==e.EmissiveColor.type&&"ColorRGB"!==e.EmissiveColor.type||(i.emissive=(new r.Color).fromArray(e.EmissiveColor.value)),e.EmissiveFactor&&(i.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(i.opacity=parseFloat(e.Opacity.value)),i.opacity<1&&(i.transparent=!0),e.ReflectionFactor&&(i.reflectivity=e.ReflectionFactor.value),e.Shininess&&(i.shininess=e.Shininess.value),e.Specular?i.specular=(new r.Color).fromArray(e.Specular.value):e.SpecularColor&&"Color"===e.SpecularColor.type&&(i.specular=(new r.Color).fromArray(e.SpecularColor.value));const s=this;return o.get(n).children.forEach((function(e){const n=e.relationship;switch(n){case"Bump":i.bumpMap=s.getTexture(t,e.ID);break;case"Maya|TEX_ao_map":i.aoMap=s.getTexture(t,e.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":i.map=s.getTexture(t,e.ID),void 0!==i.map&&("colorSpace"in i.map?i.map.colorSpace="srgb":i.map.encoding=3001);break;case"DisplacementColor":i.displacementMap=s.getTexture(t,e.ID);break;case"EmissiveColor":i.emissiveMap=s.getTexture(t,e.ID),void 0!==i.emissiveMap&&("colorSpace"in i.emissiveMap?i.emissiveMap.colorSpace="srgb":i.emissiveMap.encoding=3001);break;case"NormalMap":case"Maya|TEX_normal_map":i.normalMap=s.getTexture(t,e.ID);break;case"ReflectionColor":i.envMap=s.getTexture(t,e.ID),void 0!==i.envMap&&(i.envMap.mapping=r.EquirectangularReflectionMapping,"colorSpace"in i.envMap?i.envMap.colorSpace="srgb":i.envMap.encoding=3001);break;case"SpecularColor":i.specularMap=s.getTexture(t,e.ID),void 0!==i.specularMap&&("colorSpace"in i.specularMap?i.specularMap.colorSpace="srgb":i.specularMap.encoding=3001);break;case"TransparentColor":case"TransparencyFactor":i.alphaMap=s.getTexture(t,e.ID),i.transparent=!0;break;default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",n)}})),i}getTexture(e,t){return"LayeredTexture"in a.Objects&&t in a.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),t=o.get(t).children[0].ID),e.get(t)}parseDeformers(){const e={},t={};if("Deformer"in a.Objects){const n=a.Objects.Deformer;for(const r in n){const i=n[r],s=o.get(parseInt(r));if("Skin"===i.attrType){const t=this.parseSkeleton(s,n);t.ID=r,s.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),t.geometryID=s.parents[0].ID,e[r]=t}else if("BlendShape"===i.attrType){const e={id:r};e.rawTargets=this.parseMorphTargets(s,n),e.id=r,s.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),t[r]=e}}}return{skeletons:e,morphTargets:t}}parseSkeleton(e,t){const n=[];return e.children.forEach((function(e){const i=t[e.ID];if("Cluster"!==i.attrType)return;const s={ID:e.ID,indices:[],weights:[],transformLink:(new r.Matrix4).fromArray(i.TransformLink.a)};"Indexes"in i&&(s.indices=i.Indexes.a,s.weights=i.Weights.a),n.push(s)})),{rawBones:n,bones:[]}}parseMorphTargets(e,t){const n=[];for(let r=0;r1?a=o:o.length>0?a=o[0]:(a=new r.MeshPhongMaterial({color:13421772}),o.push(a)),"color"in s.attributes&&o.forEach((function(e){e.vertexColors=!0})),s.FBX_Deformer?(i=new r.SkinnedMesh(s,a),i.normalizeSkinWeights()):i=new r.Mesh(s,a),i}createCurve(e,t){const n=e.children.reduce((function(e,n){return t.has(n.ID)&&(e=t.get(n.ID)),e}),null),i=new r.LineBasicMaterial({color:3342591,linewidth:1});return new r.Line(n,i)}getTransformData(e,t){const n={};"InheritType"in t&&(n.inheritType=parseInt(t.InheritType.value)),n.eulerOrder="RotationOrder"in t?S(t.RotationOrder.value):"ZYX","Lcl_Translation"in t&&(n.translation=t.Lcl_Translation.value),"PreRotation"in t&&(n.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(n.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(n.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(n.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(n.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(n.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(n.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(n.rotationPivot=t.RotationPivot.value),e.userData.transformData=n}setLookAtProperties(e,t){if("LookAtProperty"in t){o.get(e.ID).children.forEach((function(t){if("LookAtProperty"===t.relationship){const n=a.Objects.Model[t.ID];if("Lcl_Translation"in n){const t=n.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(t),l.add(e.target)):e.lookAt((new r.Vector3).fromArray(t))}}}))}}bindSkeleton(e,t,n){const i=this.parsePoseNodes();for(const s in e){const a=e[s];o.get(parseInt(a.ID)).parents.forEach((function(e){if(t.has(e.ID)){const t=e.ID;o.get(t).parents.forEach((function(e){if(n.has(e.ID)){n.get(e.ID).bind(new r.Skeleton(a.bones),i[e.ID])}}))}}))}}parsePoseNodes(){const e={};if("Pose"in a.Objects){const t=a.Objects.Pose;for(const n in t)if("BindPose"===t[n].attrType&&t[n].NbPoseNodes>0){const i=t[n].PoseNode;Array.isArray(i)?i.forEach((function(t){e[t.Node]=(new r.Matrix4).fromArray(t.Matrix.a)})):e[i.Node]=(new r.Matrix4).fromArray(i.Matrix.a)}}return e}createAmbientLight(){if("GlobalSettings"in a&&"AmbientColor"in a.GlobalSettings){const e=a.GlobalSettings.AmbientColor.value,t=e[0],n=e[1],i=e[2];if(0!==t||0!==n||0!==i){const e=new r.Color(t,n,i);l.add(new r.AmbientLight(e,1))}}}}class u{parse(e){const t=new Map;if("Geometry"in a.Objects){const n=a.Objects.Geometry;for(const r in n){const i=o.get(parseInt(r)),s=this.parseGeometry(i,n[r],e);t.set(parseInt(r),s)}}return t}parseGeometry(e,t,n){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,n);case"NurbsCurve":return this.parseNurbsGeometry(t)}}parseMeshGeometry(e,t,n){const r=n.skeletons,i=[],s=e.parents.map((function(e){return a.Objects.Model[e.ID]}));if(0===s.length)return;const o=e.children.reduce((function(e,t){return void 0!==r[t.ID]&&(e=r[t.ID]),e}),null);e.children.forEach((function(e){void 0!==n.morphTargets[e.ID]&&i.push(n.morphTargets[e.ID])}));const l=s[0],c={};"RotationOrder"in l&&(c.eulerOrder=S(l.RotationOrder.value)),"InheritType"in l&&(c.inheritType=parseInt(l.InheritType.value)),"GeometricTranslation"in l&&(c.translation=l.GeometricTranslation.value),"GeometricRotation"in l&&(c.rotation=l.GeometricRotation.value),"GeometricScaling"in l&&(c.scale=l.GeometricScaling.value);const h=_(c);return this.genGeometry(t,o,i,h)}genGeometry(e,t,n,i){const s=new r.BufferGeometry;e.attrName&&(s.name=e.attrName);const a=this.parseGeoNode(e,t),o=this.genBuffers(a),l=new r.Float32BufferAttribute(o.vertex,3);if(l.applyMatrix4(i),s.setAttribute("position",l),o.colors.length>0&&s.setAttribute("color",new r.Float32BufferAttribute(o.colors,3)),t&&(s.setAttribute("skinIndex",new r.Uint16BufferAttribute(o.weightsIndices,4)),s.setAttribute("skinWeight",new r.Float32BufferAttribute(o.vertexWeights,4)),s.FBX_Deformer=t),o.normal.length>0){const e=(new r.Matrix3).getNormalMatrix(i),t=new r.Float32BufferAttribute(o.normal,3);t.applyNormalMatrix(e),s.setAttribute("normal",t)}if(o.uvs.forEach((function(e,t){let n="uv"+(t+1).toString();0===t&&(n="uv"),s.setAttribute(n,new r.Float32BufferAttribute(o.uvs[t],2))})),a.material&&"AllSame"!==a.material.mappingType){let e=o.materialIndex[0],t=0;if(o.materialIndex.forEach((function(n,r){n!==e&&(s.addGroup(t,r-t,e),e=n,t=r)})),s.groups.length>0){const t=s.groups[s.groups.length-1],n=t.start+t.count;n!==o.materialIndex.length&&s.addGroup(n,o.materialIndex.length-n,e)}0===s.groups.length&&s.addGroup(0,o.materialIndex.length,o.materialIndex[0])}return this.addMorphTargets(s,e,n,i),s}parseGeoNode(e,t){const n={};if(n.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],n.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(n.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(n.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(n.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){n.uv=[];let t=0;for(;e.LayerElementUV[t];)e.LayerElementUV[t].UV&&n.uv.push(this.parseUVs(e.LayerElementUV[t])),t++}return n.weightTable={},null!==t&&(n.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(r,i){void 0===n.weightTable[r]&&(n.weightTable[r]=[]),n.weightTable[r].push({id:t,weight:e.weights[i]})}))}))),n}genBuffers(e){const t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]};let n=0,r=0,i=!1,s=[],a=[],o=[],l=[],c=[],h=[];const u=this;return e.vertexIndices.forEach((function(d,p){let f,m=!1;d<0&&(d^=-1,m=!0);let g=[],A=[];if(s.push(3*d,3*d+1,3*d+2),e.color){const t=x(p,n,d,e.color);o.push(t[0],t[1],t[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach((function(e){A.push(e.weight),g.push(e.id)})),A.length>4){i||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),i=!0);const e=[0,0,0,0],t=[0,0,0,0];A.forEach((function(n,r){let i=n,s=g[r];t.forEach((function(t,n,r){if(i>t){r[n]=i,i=t;const a=e[n];e[n]=s,s=a}}))})),g=e,A=t}for(;A.length<4;)A.push(0),g.push(0);for(let e=0;e<4;++e)c.push(A[e]),h.push(g[e])}if(e.normal){const t=x(p,n,d,e.normal);a.push(t[0],t[1],t[2])}e.material&&"AllSame"!==e.material.mappingType&&(f=x(p,n,d,e.material)[0]),e.uv&&e.uv.forEach((function(e,t){const r=x(p,n,d,e);void 0===l[t]&&(l[t]=[]),l[t].push(r[0]),l[t].push(r[1])})),r++,m&&(u.genFace(t,e,s,f,a,o,l,c,h,r),n++,r=0,s=[],a=[],o=[],l=[],c=[],h=[])})),t}genFace(e,t,n,r,i,s,a,o,l,c){for(let h=2;h1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");const s=e.get(i[0].ID);n[r]={name:t[r].attrName,layer:s}}return n}addClip(e){let t=[];const n=this;return e.layer.forEach((function(e){t=t.concat(n.generateTracks(e))})),new r.AnimationClip(e.name,-1,t)}generateTracks(e){const t=[];let n=new r.Vector3,i=new r.Quaternion,s=new r.Vector3;if(e.transform&&e.transform.decompose(n,i,s),n=n.toArray(),i=(new r.Euler).setFromQuaternion(i,e.eulerOrder).toArray(),s=s.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){const r=this.generateVectorTrack(e.modelName,e.T.curves,n,"position");void 0!==r&&t.push(r)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){const n=this.generateRotationTrack(e.modelName,e.R.curves,i,e.preRotation,e.postRotation,e.eulerOrder);void 0!==n&&t.push(n)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){const n=this.generateVectorTrack(e.modelName,e.S.curves,s,"scale");void 0!==n&&t.push(n)}if(void 0!==e.DeformPercent){const n=this.generateMorphTrack(e);void 0!==n&&t.push(n)}return t}generateVectorTrack(e,t,n,i){const s=this.getTimesForAllAxes(t),a=this.getKeyframeTrackValues(s,t,n);return new r.VectorKeyframeTrack(e+"."+i,s,a)}generateRotationTrack(e,t,n,i,s,a){void 0!==t.x&&(this.interpolateRotations(t.x),t.x.values=t.x.values.map(r.MathUtils.degToRad)),void 0!==t.y&&(this.interpolateRotations(t.y),t.y.values=t.y.values.map(r.MathUtils.degToRad)),void 0!==t.z&&(this.interpolateRotations(t.z),t.z.values=t.z.values.map(r.MathUtils.degToRad));const o=this.getTimesForAllAxes(t),l=this.getKeyframeTrackValues(o,t,n);void 0!==i&&((i=i.map(r.MathUtils.degToRad)).push(a),i=(new r.Euler).fromArray(i),i=(new r.Quaternion).setFromEuler(i)),void 0!==s&&((s=s.map(r.MathUtils.degToRad)).push(a),s=(new r.Euler).fromArray(s),s=(new r.Quaternion).setFromEuler(s).invert());const c=new r.Quaternion,h=new r.Euler,u=[];for(let r=0;r1){let e=1,n=t[0];for(let r=1;r=180){const s=i/180,a=r/s;let o=n+a;const l=e.times[t-1],c=(e.times[t]-l)/s;let h=l+c;const u=[],d=[];for(;h1&&(n=e[1].replace(/^(\w+)::/,""),r=e[2]),{id:t,name:n,type:r}}parseNodeProperty(e,t,n){let r=t[1].replace(/^"/,"").replace(/"$/,"").trim(),i=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===r&&","===i&&(i=n.replace(/"/g,"").replace(/,$/,"").trim());const s=this.getCurrentNode();if("Properties70"!==s.name){if("C"===r){const e=i.split(",").slice(1),t=parseInt(e[0]),n=parseInt(e[1]);let a=i.split(",").slice(3);a=a.map((function(e){return e.trim().replace(/^"/,"")})),r="connections",i=[t,n],function(e,t){for(let n=0,r=e.length,i=t.length;n=e.size():e.getOffset()+160+16>=e.size()}parseNode(e,t){const n={},r=t>=7500?e.getUint64():e.getUint32(),i=t>=7500?e.getUint64():e.getUint32();t>=7500?e.getUint64():e.getUint32();const s=e.getUint8(),a=e.getString(s);if(0===r)return null;const o=[];for(let u=0;u0?o[0]:"",c=o.length>1?o[1]:"",h=o.length>2?o[2]:"";for(n.singleProperty=1===i&&e.getOffset()===r;r>e.getOffset();){const r=this.parseNode(e,t);null!==r&&this.parseSubNode(a,n,r)}return n.propertyList=o,"number"==typeof l&&(n.id=l),""!==c&&(n.attrName=c),""!==h&&(n.attrType=h),""!==a&&(n.name=a),n}parseSubNode(e,t,n){if(!0===n.singleProperty){const e=n.propertyList[0];Array.isArray(e)?(t[n.name]=n,n.a=e):t[n.name]=e}else if("Connections"===e&&"C"===n.name){const e=[];n.propertyList.forEach((function(t,n){0!==n&&e.push(t)})),void 0===t.connections&&(t.connections=[]),t.connections.push(e)}else if("Properties70"===n.name){Object.keys(n).forEach((function(e){t[e]=n[e]}))}else if("Properties70"===e&&"P"===n.name){let e=n.propertyList[0],r=n.propertyList[1];const i=n.propertyList[2],s=n.propertyList[3];let a;0===e.indexOf("Lcl ")&&(e=e.replace("Lcl ","Lcl_")),0===r.indexOf("Lcl ")&&(r=r.replace("Lcl ","Lcl_")),a="Color"===r||"ColorRGB"===r||"Vector"===r||"Vector3D"===r||0===r.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],t[e]={type:r,type2:i,flag:s,value:a}}else void 0===t[n.name]?"number"==typeof n.id?(t[n.name]={},t[n.name][n.id]=n):t[n.name]=n:"PoseNode"===n.name?(Array.isArray(t[n.name])||(t[n.name]=[t[n.name]]),t[n.name].push(n)):void 0===t[n.name][n.id]&&(t[n.name][n.id]=n)}parseProperty(e){const t=e.getString(1);let n;switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":return n=e.getUint32(),e.getArrayBuffer(n);case"S":return n=e.getUint32(),e.getString(n);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":const r=e.getUint32(),s=e.getUint32(),a=e.getUint32();if(0===s)switch(t){case"b":case"c":return e.getBooleanArray(r);case"d":return e.getFloat64Array(r);case"f":return e.getFloat32Array(r);case"i":return e.getInt32Array(r);case"l":return e.getInt64Array(r)}const o=i.unzlibSync(new Uint8Array(e.getArrayBuffer(a))),l=new m(o.buffer);switch(t){case"b":case"c":return l.getBooleanArray(r);case"d":return l.getFloat64Array(r);case"f":return l.getFloat32Array(r);case"i":return l.getInt32Array(r);case"l":return l.getInt64Array(r)}default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}}class m{constructor(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t}getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(e){this.offset+=e}getBoolean(){return 1==(1&this.getUint8())}getBooleanArray(e){const t=[];for(let n=0;n=0&&(t=t.slice(0,n)),r.LoaderUtils.decodeText(new Uint8Array(t))}}class g{add(e,t){this[e]=t}}function A(e){const t=e.match(/FBXVersion: (\d+)/);if(t){return parseInt(t[1])}throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function v(e){return e/46186158e3}const y=[];function x(e,t,n,r){let i;switch(r.mappingType){case"ByPolygonVertex":i=e;break;case"ByPolygon":i=t;break;case"ByVertice":i=n;break;case"AllSame":i=r.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+r.mappingType)}"IndexToDirect"===r.referenceType&&(i=r.indices[i]);const s=i*r.dataSize,a=s+r.dataSize;return function(e,t,n,r){for(let i=n,s=0;i{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);class a extends s.Loader{constructor(e){super(e)}load(e,t,n,r){const i=new s.FileLoader(this.manager);i.setPath(this.path),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,(e=>{if("string"!=typeof e)throw new Error("unsupported data type");const n=JSON.parse(e),r=this.parse(n);t&&t(r)}),n,r)}loadAsync(e,t){return super.loadAsync(e,t)}parse(e){return new o(e)}}class o{constructor(e){i(this,"data"),this.data=e}generateShapes(e,t=100,n){const r=[],i={letterSpacing:0,lineHeight:1,...n},s=function(e,t,n,r){const i=Array.from(e),s=t/n.resolution,a=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*s,o=[];let c=0,h=0;for(let u=0;u{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{constructor(e){super(e),this.splitLayer=!1}load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){let t,n={x:0,y:0,z:0,e:0,f:0,extruding:!1,relative:!1},i=[];const s=new r.LineBasicMaterial({color:16711680});s.name="path";const a=new r.LineBasicMaterial({color:65280});function o(e){t={vertex:[],pathVertex:[],z:e.z},i.push(t)}function l(e,t){return n.relative?t:t-e}function c(e,t){return n.relative?e+t:t}a.name="extruded";let h=e.replace(/;.+/g,"").split("\n");for(let r=0;r0&&(e.extruding=l(n.e,e.e)>0,null!=t&&e.z==t.z||o(e)),u=n,d=e,void 0===t&&o(u),n.extruding?(t.vertex.push(u.x,u.y,u.z),t.vertex.push(d.x,d.y,d.z)):(t.pathVertex.push(u.x,u.y,u.z),t.pathVertex.push(d.x,d.y,d.z)),n=e}else if("G2"===i||"G3"===i);else if("G90"===i)n.relative=!1;else if("G91"===i)n.relative=!0;else if("G92"===i){let e=n;e.x=void 0!==s.x?s.x:e.x,e.y=void 0!==s.y?s.y:e.y,e.z=void 0!==s.z?s.z:e.z,e.e=void 0!==s.e?s.e:e.e,n=e}}var u,d;function p(e,t,n){let i=new r.BufferGeometry;i.setAttribute("position",new r.Float32BufferAttribute(e,3));let o=new r.LineSegments(i,t?a:s);o.name="layer"+n,f.add(o)}const f=new r.Group;if(f.name="gcode",this.splitLayer)for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(8636),s=n(26840);class a extends r.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new d(e)})),this.register((function(e){return new x(e)})),this.register((function(e){return new b(e)})),this.register((function(e){return new E(e)})),this.register((function(e){return new f(e)})),this.register((function(e){return new m(e)})),this.register((function(e){return new g(e)})),this.register((function(e){return new A(e)})),this.register((function(e){return new u(e)})),this.register((function(e){return new v(e)})),this.register((function(e){return new p(e)})),this.register((function(e){return new y(e)})),this.register((function(e){return new c(e)})),this.register((function(e){return new _(e)})),this.register((function(e){return new S(e)}))}load(e,t,n,i){const s=this;let a;a=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:r.LoaderUtils.extractUrlBase(e),this.manager.itemStart(e);const o=function(t){i?i(t):console.error(t),s.manager.itemError(e),s.manager.itemEnd(e)},l=new r.FileLoader(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,(function(n){try{s.parse(n,a,(function(n){t(n),s.manager.itemEnd(e)}),o)}catch(r){o(r)}}),n,o)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let s;const a={},o={};if("string"==typeof e)s=JSON.parse(e);else if(e instanceof ArrayBuffer){if(r.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4)))===M){try{a[l.KHR_BINARY_GLTF]=new T(e)}catch(u){return void(i&&i(u))}s=JSON.parse(a[l.KHR_BINARY_GLTF].content)}else s=JSON.parse(r.LoaderUtils.decodeText(new Uint8Array(e)))}else s=e;if(void 0===s.asset||s.asset.version[0]<2)return void(i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const c=new $(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let r=0;r=0&&void 0===o[e]&&console.warn('THREE.GLTFLoader: Unknown extension "'+e+'".')}}c.setExtensions(a),c.setPlugins(o),c.parse(n,i)}parseAsync(e,t){const n=this;return new Promise((function(r,i){n.parse(e,t,r,i)}))}}function o(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const l={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class c{constructor(e){this.parser=e,this.name=l.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,s)}}class b{constructor(e){this.parser=e,this.name=l.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const s=i.extensions[t],a=r.images[s.source];let o=n.textureLoader;if(a.uri){const e=n.options.manager.getHandler(a.uri);null!==e&&(o=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,s.source,o);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class E{constructor(e){this.parser=e,this.name=l.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const s=i.extensions[t],a=r.images[s.source];let o=n.textureLoader;if(a.uri){const e=n.options.manager.getHandler(a.uri);null!==e&&(o=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,s.source,o);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class _{constructor(e){this.name=l.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const e=n.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then((function(t){const n=e.byteOffset||0,r=e.byteLength||0,s=e.count,a=e.byteStride,o=new Uint8Array(t,n,r);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(s,a,o,e.mode,e.filter).then((function(e){return e.buffer})):i.ready.then((function(){const t=new ArrayBuffer(s*a);return i.decodeGltfBuffer(new Uint8Array(t),s,a,o,e.mode,e.filter),t}))}))}return null}}class S{constructor(e){this.name=l.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||void 0===n.mesh)return null;const i=t.meshes[n.mesh];for(const r of i.primitives)if(r.mode!==F.TRIANGLES&&r.mode!==F.TRIANGLE_STRIP&&r.mode!==F.TRIANGLE_FAN&&void 0!==r.mode)return null;const s=n.extensions[this.name].attributes,a=[],o={};for(const r in s)a.push(this.parser.getDependency("accessor",s[r]).then((e=>(o[r]=e,o[r]))));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then((e=>{const t=e.pop(),n=t.isGroup?t.children:[t],i=e[0].count,s=[];for(const a of n){const e=new r.Matrix4,t=new r.Vector3,n=new r.Quaternion,l=new r.Vector3(1,1,1),c=new r.InstancedMesh(a.geometry,a.material,i);for(let r=0;r=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},z={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Q={CUBICSPLINE:void 0,LINEAR:r.InterpolateLinear,STEP:r.InterpolateDiscrete},V="OPAQUE",H="MASK",j="BLEND";function W(e,t,n){for(const r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function X(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function Y(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,r=t.weights.length;n-1,s=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||n||i&&s<98?this.textureLoader=new r.TextureLoader(this.options.manager):this.textureLoader=new r.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new r.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])})).then((function(t){const s={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};W(i,s,r),X(s,r),Promise.all(n._invokeAll((function(e){return e.afterRoot&&e.afterRoot(s)}))).then((function(){e(s)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let r=0,i=t.length;r{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[r,s]of e.children.entries())i(s,t.children[r])};return i(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n=2&&f.setY(t,u[e*a+1]),a>=3&&f.setZ(t,u[e*a+2]),a>=4&&f.setW(t,u[e*a+3]),a>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return f}))}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,i=t.images[r];let s=this.textureLoader;if(i.uri){const e=n.manager.getHandler(i.uri);null!==e&&(s=e)}return this.loadTextureImage(e,r,s)}loadTextureImage(e,t,n){const i=this,s=this.json,a=s.textures[e],o=s.images[t],l=(o.uri||o.bufferView)+":"+a.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(t,n).then((function(t){t.flipY=!1,t.name=a.name||o.name||"",""===t.name&&"string"==typeof o.uri&&!1===o.uri.startsWith("data:image/")&&(t.name=o.uri);const n=(s.samplers||{})[a.sampler]||{};return t.magFilter=O[n.magFilter]||r.LinearFilter,t.minFilter=O[n.minFilter]||r.LinearMipmapLinearFilter,t.wrapS=N[n.wrapS]||r.RepeatWrapping,t.wrapT=N[n.wrapT]||r.RepeatWrapping,i.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[l]=c,c}loadImageSource(e,t){const n=this,i=this.json,s=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const a=i.images[e],o=self.URL||self.webkitURL;let l=a.uri||"",c=!1;if(void 0!==a.bufferView)l=n.getDependency("bufferView",a.bufferView).then((function(e){c=!0;const t=new Blob([e],{type:a.mimeType});return l=o.createObjectURL(t),l}));else if(void 0===a.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const h=Promise.resolve(l).then((function(e){return new Promise((function(n,i){let a=n;!0===t.isImageBitmapLoader&&(a=function(e){const t=new r.Texture(e);t.needsUpdate=!0,n(t)}),t.load(r.LoaderUtils.resolveURL(e,s.path),a,void 0,i)}))})).then((function(e){var t;return!0===c&&o.revokeObjectURL(l),e.userData.mimeType=a.mimeType||((t=a.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),e}));return this.sourceCache[e]=h,h}assignTexture(e,t,n,r){const i=this;return this.getDependency("texture",n.index).then((function(s){if(!s)return null;if(void 0!==n.texCoord&&n.texCoord>0&&((s=s.clone()).channel=n.texCoord),i.extensions[l.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[l.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=i.associations.get(s);s=i.extensions[l.KHR_TEXTURE_TRANSFORM].extendTexture(s,e),i.associations.set(s,t)}}return void 0!==r&&("colorSpace"in s?s.colorSpace=3001===r?"srgb":"srgb-linear":s.encoding=r),e[t]=s,s}))}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const i=void 0===t.attributes.tangent,s=void 0!==t.attributes.color,a=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new r.PointsMaterial,r.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e="LineBasicMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new r.LineBasicMaterial,r.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,this.cache.add(e,t)),n=t}if(i||s||a){let e="ClonedMaterial:"+n.uuid+":";i&&(e+="derivative-tangents:"),s&&(e+="vertex-colors:"),a&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),s&&(t.vertexColors=!0),a&&(t.flatShading=!0),i&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}e.material=n}getMaterialType(){return r.MeshStandardMaterial}loadMaterial(e){const t=this,n=this.json,i=this.extensions,s=n.materials[e];let a;const o={},c=[];if((s.extensions||{})[l.KHR_MATERIALS_UNLIT]){const e=i[l.KHR_MATERIALS_UNLIT];a=e.getMaterialType(),c.push(e.extendParams(o,s,t))}else{const n=s.pbrMetallicRoughness||{};if(o.color=new r.Color(1,1,1),o.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;o.color.fromArray(e),o.opacity=e[3]}void 0!==n.baseColorTexture&&c.push(t.assignTexture(o,"map",n.baseColorTexture,3001)),o.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,o.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(c.push(t.assignTexture(o,"metalnessMap",n.metallicRoughnessTexture)),c.push(t.assignTexture(o,"roughnessMap",n.metallicRoughnessTexture))),a=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),c.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,o)}))))}!0===s.doubleSided&&(o.side=r.DoubleSide);const h=s.alphaMode||V;if(h===j?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,h===H&&(o.alphaTest=void 0!==s.alphaCutoff?s.alphaCutoff:.5)),void 0!==s.normalTexture&&a!==r.MeshBasicMaterial&&(c.push(t.assignTexture(o,"normalMap",s.normalTexture)),o.normalScale=new r.Vector2(1,1),void 0!==s.normalTexture.scale)){const e=s.normalTexture.scale;o.normalScale.set(e,e)}return void 0!==s.occlusionTexture&&a!==r.MeshBasicMaterial&&(c.push(t.assignTexture(o,"aoMap",s.occlusionTexture)),void 0!==s.occlusionTexture.strength&&(o.aoMapIntensity=s.occlusionTexture.strength)),void 0!==s.emissiveFactor&&a!==r.MeshBasicMaterial&&(o.emissive=(new r.Color).fromArray(s.emissiveFactor)),void 0!==s.emissiveTexture&&a!==r.MeshBasicMaterial&&c.push(t.assignTexture(o,"emissiveMap",s.emissiveTexture,3001)),Promise.all(c).then((function(){const n=new a(o);return s.name&&(n.name=s.name),X(n,s),t.associations.set(n,{materials:e}),s.extensions&&W(i,n,s),n}))}createUniqueName(e){const t=r.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,i=this.primitiveCache;function s(e){return n[l.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return ee(n,e,t)}))}const a=[];for(let o=0,c=e.length;o0&&Y(p,a),p.name=t.createUniqueName(a.name||"mesh_"+e),X(p,a),u.extensions&&W(s,p,u),t.assignFinalMaterial(p),h.push(p)}for(let r=0,i=h.length;r1?new r.Group:1===t.length?t[0]:new r.Object3D,o!==t[0])for(let e=0,n=t.length;e{const t=new Map;for(const[n,s]of i.associations)(n instanceof r.Material||n instanceof r.Texture)&&t.set(n,s);return e.traverse((e=>{const n=i.associations.get(e);null!=n&&t.set(e,n)})),t})(s),s}))}}function ee(e,t,n){const i=t.attributes,s=[];function a(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(const r in i){const t=G[r]||r.toLowerCase();t in e.attributes||s.push(a(i[r],t))}if(void 0!==t.indices&&!e.index){const r=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));s.push(r)}return X(e,t),function(e,t,n){const i=t.attributes,s=new r.Box3;if(void 0===i.POSITION)return;{const e=n.json.accessors[i.POSITION],t=e.min,a=e.max;if(void 0===t||void 0===a)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(s.set(new r.Vector3(t[0],t[1],t[2]),new r.Vector3(a[0],a[1],a[2])),e.normalized){const t=J(U[e.componentType]);s.min.multiplyScalar(t),s.max.multiplyScalar(t)}}const a=t.targets;if(void 0!==a){const e=new r.Vector3,t=new r.Vector3;for(let r=0,i=a.length;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(56517);class s extends r.Loader{constructor(e){super(e),this.hdrLoader=new i.RGBELoader,this.type=r.HalfFloatType}load(e,t,n,i){"string"==typeof e?e=[e]:Array.isArray(e)||(console.warn("THREE.HDRCubeTextureLoader signature has changed. Use .setDataType() instead."),this.setDataType(e),e=t,t=n,n=i,i=arguments[4]);const s=new r.CubeTexture;switch(s.type=this.type,s.type){case r.FloatType:case r.HalfFloatType:"colorSpace"in s?s.colorSpace="srgb-linear":s.encoding=3e3,s.minFilter=r.LinearFilter,s.magFilter=r.LinearFilter,s.generateMipmaps=!1}const a=this;let o=0;function l(t,n,i,l){new r.FileLoader(a.manager).setPath(a.path).setResponseType("arraybuffer").setWithCredentials(a.withCredentials).load(e[t],(function(e){o++;const i=a.hdrLoader.parse(e);if(i){if(void 0!==i.data){const e=new r.DataTexture(i.data,i.width,i.height);e.type=s.type,"colorSpace"in e?e.colorSpace=s.SRGBColorSpace:e.encoding=s.encoding,e.format=s.format,e.minFilter=s.minFilter,e.magFilter=s.magFilter,e.generateMipmaps=s.generateMipmaps,s.images[t]=e}6===o&&(s.needsUpdate=!0,n&&n(s))}}),i,l)}for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(69612),s=n(91952);class a extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setResponseType("arraybuffer"),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){const t=new r.LoadingManager;t.setURLModifier((function(e){const t=function(e){for(const t in n)if(t.substr(-e.length)===e)return n[t]}(e);if(t){console.log("Loading",e);const n=new Blob([t.buffer],{type:"application/octet-stream"});return URL.createObjectURL(n)}return e}));const n=s.unzipSync(new Uint8Array(e));if(n["doc.kml"]){const e=(new DOMParser).parseFromString(fflate.strFromU8(n["doc.kml"]),"application/xml").querySelector("Placemark Model Link href");if(e){return new i.ColladaLoader(t).parse(fflate.strFromU8(n[e.textContent]))}}else{console.warn("KMZLoader: Missing doc.kml file.");for(const e in n){if("dae"===e.split(".").pop().toLowerCase()){return new i.ColladaLoader(t).parse(fflate.strFromU8(n[e]))}}}return console.error("KMZLoader: Couldn't find .dae file."),{scene:new r.Group}}}t.KMZLoader=a},68613:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(18248),o=n(82360),l=n(15328),c=n(56328),h=n(44108),u=n(1192),d=3e3,p=3001,f="",m="display-p3",g="display-p3-linear",A="srgb-linear",v="srgb",y=new WeakMap;let x,b=0;const E=class extends s.Loader{constructor(e){super(e),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new a.WorkerPool,this.workerSourceURL="",this.workerConfig=null,"undefined"!=typeof MSC_TRANSCODER&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(e){return this.transcoderPath=e,this}setWorkerLimit(e){return this.workerPool.setWorkerLimit(e),this}detectSupport(e){return this.workerConfig={astcSupported:e.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:e.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:e.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:e.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:e.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:e.extensions.has("WEBGL_compressed_texture_pvrtc")||e.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},e.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1),this}init(){if(!this.transcoderPending){const e=new s.FileLoader(this.manager);e.setPath(this.transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),n=new s.FileLoader(this.manager);n.setPath(this.transcoderPath),n.setResponseType("arraybuffer"),n.setWithCredentials(this.withCredentials);const r=n.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([t,r]).then((([e,t])=>{const n=E.BasisWorker.toString(),r=["/* constants */","let _EngineFormat = "+JSON.stringify(E.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(E.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(E.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([r])),this.transcoderBinary=t,this.workerPool.setWorkerCreator((()=>{const e=new Worker(this.workerSourceURL),t=this.transcoderBinary.slice(0);return e.postMessage({type:"init",config:this.workerConfig,transcoderBinary:t},[t]),e}))})),b>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),b++}return this.transcoderPending}load(e,t,n,r){if(null===this.workerConfig)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const i=new s.FileLoader(this.manager);i.setResponseType("arraybuffer"),i.setWithCredentials(this.withCredentials),i.load(e,(e=>{if(y.has(e)){return y.get(e).promise.then(t).catch(r)}this._createTexture(e).then((e=>t?t(e):null)).catch(r)}),n,r)}_createTextureFrom(e,t){const{faces:n,width:r,height:i,format:a,type:l,error:u,dfdFlags:d}=e;if("error"===l)return Promise.reject(u);let p;if(6===t.faceCount)p=new c.CompressedCubeTexture(n,a,s.UnsignedByteType);else{const e=n[0].mipmaps;p=t.layerCount>1?new h.CompressedArrayTexture(e,r,i,t.layerCount,a,s.UnsignedByteType):new s.CompressedTexture(e,r,i,a,s.UnsignedByteType)}p.minFilter=1===n[0].mipmaps.length?s.LinearFilter:s.LinearMipmapLinearFilter,p.magFilter=s.LinearFilter,p.generateMipmaps=!1,p.needsUpdate=!0;const f=C(t);return"colorSpace"in p?p.colorSpace=f:p.encoding=f===v?3001:3e3,p.premultiplyAlpha=!!(d&o.KHR_DF_FLAG_ALPHA_PREMULTIPLIED),p}async _createTexture(e,t={}){const n=o.read(new Uint8Array(e));if(n.vkFormat!==o.VK_FORMAT_UNDEFINED)return async function(e){const{vkFormat:t}=e;if(void 0===M[t])throw new Error("THREE.KTX2Loader: Unsupported vkFormat.");let n;e.supercompressionScheme===o.KHR_SUPERCOMPRESSION_ZSTD&&(x||(x=new Promise((async e=>{const t=new l.ZSTDDecoder;await t.init(),e(t)}))),n=await x);const r=[];for(let l=0;l>l),a=Math.max(1,e.pixelHeight>>l),c=e.pixelDepth?Math.max(1,e.pixelDepth>>l):0,h=e.levels[l];let u,d;if(e.supercompressionScheme===o.KHR_SUPERCOMPRESSION_NONE)u=h.levelData;else{if(e.supercompressionScheme!==o.KHR_SUPERCOMPRESSION_ZSTD)throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");u=n.decode(h.levelData,h.uncompressedByteLength)}d=w[t]===s.FloatType?new Float32Array(u.buffer,u.byteOffset,u.byteLength/Float32Array.BYTES_PER_ELEMENT):w[t]===s.HalfFloatType?new Uint16Array(u.buffer,u.byteOffset,u.byteLength/Uint16Array.BYTES_PER_ELEMENT):u,r.push({data:d,width:i,height:a,depth:c})}let i;if(S.has(M[t]))i=0===e.pixelDepth?new s.DataTexture(r[0].data,e.pixelWidth,e.pixelHeight):new u.Data3DTexture(r[0].data,e.pixelWidth,e.pixelHeight,e.pixelDepth);else{if(e.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");i=new s.CompressedTexture(r,e.pixelWidth,e.pixelHeight)}i.mipmaps=r,i.type=w[t],i.format=M[t],i.needsUpdate=!0;const a=C(e);"colorSpace"in i?i.colorSpace=a:i.encoding=a===v?p:d;return Promise.resolve(i)}(n);const r=t,i=this.init().then((()=>this.workerPool.postMessage({type:"transcode",buffer:e,taskConfig:r},[e]))).then((e=>this._createTextureFrom(e.data,n)));return y.set(e,{promise:i}),i}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),b--,this}};let _=E;i(_,"BasisFormat",{ETC1S:0,UASTC_4x4:1}),i(_,"TranscoderFormat",{ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16}),i(_,"EngineFormat",{RGBAFormat:s.RGBAFormat,RGBA_ASTC_4x4_Format:s.RGBA_ASTC_4x4_Format,RGBA_BPTC_Format:s.RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:s.RGBA_ETC2_EAC_Format,RGBA_PVRTC_4BPPV1_Format:s.RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT5_Format:s.RGBA_S3TC_DXT5_Format,RGB_ETC1_Format:s.RGB_ETC1_Format,RGB_ETC2_Format:s.RGB_ETC2_Format,RGB_PVRTC_4BPPV1_Format:s.RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format:s.RGB_S3TC_DXT1_Format}),i(_,"BasisWorker",(function(){let e,t,n;const r=E.EngineFormat,i=E.TranscoderFormat,s=E.BasisFormat;self.addEventListener("message",(function(a){const u=a.data;switch(u.type){case"init":e=u.config,d=u.transcoderBinary,t=new Promise((e=>{n={wasmBinary:d,onRuntimeInitialized:e},BASIS(n)})).then((()=>{n.initializeBasis(),void 0===n.KTX2File&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((()=>{try{const{faces:t,buffers:a,width:d,height:p,hasAlpha:f,format:m,dfdFlags:g}=function(t){const a=new n.KTX2File(new Uint8Array(t));function u(){a.close(),a.delete()}if(!a.isValid())throw u(),new Error("THREE.KTX2Loader:\tInvalid or unsupported .ktx2 file");const d=a.isUASTC()?s.UASTC_4x4:s.ETC1S,p=a.getWidth(),f=a.getHeight(),m=a.getLayers()||1,g=a.getLevels(),A=a.getFaces(),v=a.getHasAlpha(),y=a.getDFDFlags(),{transcoderFormat:x,engineFormat:b}=function(t,n,a,h){let u,d;const p=t===s.ETC1S?o:l;for(let r=0;r1?(i=o.origWidth,s=o.origHeight):(i=o.width,s=o.height);const l=new Uint8Array(a.getImageTranscodedSizeInBytes(n,t,0,x));if(!a.transcodeImage(l,n,t,e,x,0,-1,-1))throw u(),new Error("THREE.KTX2Loader: .transcodeImage failed.");r.push(l)}const o=h(r);t.push({data:o,width:i,height:s}),_.push(o.buffer)}E.push({mipmaps:t,width:p,height:f,format:b})}return u(),{faces:E,buffers:_,width:p,height:f,hasAlpha:v,format:b,dfdFlags:y}}(u.buffer);self.postMessage({type:"transcode",id:u.id,faces:t,width:d,height:p,hasAlpha:f,format:m,dfdFlags:g},a)}catch(t){console.error(t),self.postMessage({type:"error",id:u.id,error:t.message})}}))}var d}));const a=[{if:"astcSupported",basisFormat:[s.UASTC_4x4],transcoderFormat:[i.ASTC_4x4,i.ASTC_4x4],engineFormat:[r.RGBA_ASTC_4x4_Format,r.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.BC7_M5,i.BC7_M5],engineFormat:[r.RGBA_BPTC_Format,r.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.BC1,i.BC3],engineFormat:[r.RGB_S3TC_DXT1_Format,r.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.ETC1,i.ETC2],engineFormat:[r.RGB_ETC2_Format,r.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.ETC1],engineFormat:[r.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[s.ETC1S,s.UASTC_4x4],transcoderFormat:[i.PVRTC1_4_RGB,i.PVRTC1_4_RGBA],engineFormat:[r.RGB_PVRTC_4BPPV1_Format,r.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],o=a.sort((function(e,t){return e.priorityETC1S-t.priorityETC1S})),l=a.sort((function(e,t){return e.priorityUASTC-t.priorityUASTC}));function c(e){return e<=2||0==(e&e-1)&&0!==e}function h(e){if(1===e.length)return e[0];let t=0;for(let i=0;i{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.CompressedTextureLoader{constructor(e){super(e)}parse(e,t){const n=new s(e,1);return{mipmaps:n.mipmaps(t),width:n.pixelWidth,height:n.pixelHeight,format:n.glInternalFormat,isCubemap:6===n.numberOfFaces,mipmapCount:n.numberOfMipmapLevels}}}class s{constructor(e,t){this.arrayBuffer=e;const n=new Uint8Array(this.arrayBuffer,0,12);if(171!==n[0]||75!==n[1]||84!==n[2]||88!==n[3]||32!==n[4]||49!==n[5]||49!==n[6]||187!==n[7]||13!==n[8]||10!==n[9]||26!==n[10]||10!==n[11])return void console.error("texture missing KTX identifier");const r=Uint32Array.BYTES_PER_ELEMENT,i=new DataView(this.arrayBuffer,12,13*r),s=67305985===i.getUint32(0,!0);this.glType=i.getUint32(1*r,s),this.glTypeSize=i.getUint32(2*r,s),this.glFormat=i.getUint32(3*r,s),this.glInternalFormat=i.getUint32(4*r,s),this.glBaseInternalFormat=i.getUint32(5*r,s),this.pixelWidth=i.getUint32(6*r,s),this.pixelHeight=i.getUint32(7*r,s),this.pixelDepth=i.getUint32(8*r,s),this.numberOfArrayElements=i.getUint32(9*r,s),this.numberOfFaces=i.getUint32(10*r,s),this.numberOfMipmapLevels=i.getUint32(11*r,s),this.bytesOfKeyValueData=i.getUint32(12*r,s),0===this.glType?(this.numberOfMipmapLevels=Math.max(1,this.numberOfMipmapLevels),0!==this.pixelHeight&&0===this.pixelDepth?0===this.numberOfArrayElements?this.numberOfFaces===t?this.loadType=0:console.warn("number of faces expected"+t+", but found "+this.numberOfFaces):console.warn("texture arrays not currently supported"):console.warn("only 2D textures currently supported")):console.warn("only compressed formats currently supported")}mipmaps(e){const t=[];let n=64+this.bytesOfKeyValueData,r=this.pixelWidth,i=this.pixelHeight;const s=e?this.numberOfMipmapLevels:1;for(let a=0;a{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i="16",s="24",a=new r.Vector3,o=new r.Vector3;class l extends r.ShaderMaterial{constructor(e){super({uniforms:r.UniformsUtils.merge([r.UniformsLib.fog,{diffuse:{value:new r.Color},opacity:{value:1}}]),vertexShader:"\n attribute vec3 control0;\n attribute vec3 control1;\n attribute vec3 direction;\n varying float discardFlag;\n\n #include \n #include \n #include \n #include \n #include \n\n void main() {\n #include \n\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n gl_Position = projectionMatrix * mvPosition;\n\n // Transform the line segment ends and control points into camera clip space\n vec4 c0 = projectionMatrix * modelViewMatrix * vec4(control0, 1.0);\n vec4 c1 = projectionMatrix * modelViewMatrix * vec4(control1, 1.0);\n vec4 p0 = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n vec4 p1 = projectionMatrix * modelViewMatrix * vec4(position + direction, 1.0);\n\n c0.xy /= c0.w;\n c1.xy /= c1.w;\n p0.xy /= p0.w;\n p1.xy /= p1.w;\n\n // Get the direction of the segment and an orthogonal vector\n vec2 dir = p1.xy - p0.xy;\n vec2 norm = vec2(-dir.y, dir.x);\n\n // Get control point directions from the line\n vec2 c0dir = c0.xy - p1.xy;\n vec2 c1dir = c1.xy - p1.xy;\n\n // If the vectors to the controls points are pointed in different directions away\n // from the line segment then the line should not be drawn.\n float d0 = dot(normalize(norm), normalize(c0dir));\n float d1 = dot(normalize(norm), normalize(c1dir));\n discardFlag = float(sign(d0) != sign(d1));\n\n #include \n #include \n #include \n }\n ",fragmentShader:`\n uniform vec3 diffuse;\n uniform float opacity;\n varying float discardFlag;\n\n #include \n #include \n #include \n #include \n #include \n\n void main() {\n if (discardFlag > 0.5) discard;\n\n #include \n vec3 outgoingLight = vec3(0.0);\n vec4 diffuseColor = vec4(diffuse, opacity);\n #include \n #include \n outgoingLight = diffuseColor.rgb; // simple shader\n gl_FragColor = vec4(outgoingLight, diffuseColor.a);\n #include \n #include <${parseInt(r.REVISION.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}>\n #include \n #include \n }\n `}),Object.defineProperties(this,{opacity:{get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},color:{get:function(){return this.uniforms.diffuse.value}}}),this.setValues(e),this.isLDrawConditionalLineMaterial=!0}}class c extends r.LineSegments{constructor(e,t){super(e,t),this.isConditionalLine=!0}}const h=new r.Ray;function u(e){return"Part"===e||"Unofficial_Part"===e}class d{constructor(e,t){this.line=e,this.lineLength=e.length,this.currentCharIndex=0,this.currentChar=" ",this.lineNumber=t}seekNonSpace(){for(;this.currentCharIndex=this.lineLength}setToEnd(){this.currentCharIndex=this.lineLength}getLineNumberString(){return this.lineNumber>=0?" at line "+this.lineNumber:""}}class p{constructor(e){this.loader=e,this._cache={}}cloneResult(e){const t={};return t.faces=e.faces.map((e=>({colorCode:e.colorCode,material:e.material,vertices:e.vertices.map((e=>e.clone())),normals:e.normals.map((()=>null)),faceNormal:null}))),t.conditionalSegments=e.conditionalSegments.map((e=>({colorCode:e.colorCode,material:e.material,vertices:e.vertices.map((e=>e.clone())),controlPoints:e.controlPoints.map((e=>e.clone()))}))),t.lineSegments=e.lineSegments.map((e=>({colorCode:e.colorCode,material:e.material,vertices:e.vertices.map((e=>e.clone()))}))),t.type=e.type,t.category=e.category,t.keywords=e.keywords,t.subobjects=e.subobjects,t.totalFaces=e.totalFaces,t.startingConstructionStep=e.startingConstructionStep,t.materials=e.materials,t.group=null,t}async fetchData(e){let t=!1,n=0;for(;6!==n;){let s=e;switch(n){case 0:n+=1;break;case 1:s="parts/"+s,n+=1;break;case 2:s="p/"+s,n+=1;break;case 3:s="models/"+s,n+=1;break;case 4:s=e.substring(0,e.lastIndexOf("/")+1)+s,n+=1;break;case 5:t?n=6:(s=e=e.toLowerCase(),t=!0,n=0)}const a=this.loader,o=new r.FileLoader(a.manager);o.setPath(a.partsLibraryPath),o.setRequestHeader(a.requestHeader),o.setWithCredentials(a.withCredentials);try{return await o.loadAsync(s)}catch(i){continue}}throw new Error('LDrawLoader: Subobject "'+e+'" could not be loaded.')}parse(e,t=null){const n=this.loader,i=[],s=[],a=[],o=[],l={},c=e=>l[e]||null;let h="Model",u=null,p=null,f=0;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n"));const m=e.split("\n"),g=m.length;let A=!1,v=null,y=null,x=!1,b=!0,E=!1,_=!0,S=!1;for(let M=0;M0&&(p||(p=[]),e.forEach((function(e){p.push(e.trim())})));break;case"FILE":M>0&&(A=!0,v=t.getRemainingString(),y="",x=!1,b=!0);break;case"BFC":for(;!t.isAtTheEnd();){const e=t.getToken();switch(e){case"CERTIFY":case"NOCERTIFY":x="CERTIFY"===e,b=!0;break;case"CW":case"CCW":b="CCW"===e;break;case"INVERTNEXT":E=!0;break;case"CLIP":case"NOCLIP":_="CLIP"===e;break;default:console.warn('THREE.LDrawLoader: BFC directive "'+e+'" is unknown.')}}break;case"STEP":S=!0}break;case"1":C=t.getToken(),w=c(C);const d=parseFloat(t.getToken()),m=parseFloat(t.getToken()),O=parseFloat(t.getToken()),N=parseFloat(t.getToken()),k=parseFloat(t.getToken()),G=parseFloat(t.getToken()),z=parseFloat(t.getToken()),Q=parseFloat(t.getToken()),V=parseFloat(t.getToken()),H=parseFloat(t.getToken()),j=parseFloat(t.getToken()),W=parseFloat(t.getToken()),X=(new r.Matrix4).set(N,k,G,d,z,Q,V,m,H,j,W,O,0,0,0,1);let Y=t.getRemainingString().trim().replace(/\\/g,"/");n.fileMap[Y]?Y=n.fileMap[Y]:Y.startsWith("s/")?Y="parts/"+Y:Y.startsWith("48/")&&(Y="p/"+Y),o.push({material:w,colorCode:C,matrix:X,fileName:Y,inverted:E,startingConstructionStep:S}),E=!1;break;case"2":C=t.getToken(),w=c(C),R=t.getVector(),P=t.getVector(),T={material:w,colorCode:C,vertices:[R,P]},s.push(T);break;case"5":C=t.getToken(),w=c(C),R=t.getVector(),P=t.getVector(),F=t.getVector(),U=t.getVector(),T={material:w,colorCode:C,vertices:[R,P],controlPoints:[F,U]},a.push(T);break;case"3":C=t.getToken(),w=c(C),I=b,B=!x||!_,!0===I?(R=t.getVector(),P=t.getVector(),D=t.getVector()):(D=t.getVector(),P=t.getVector(),R=t.getVector()),i.push({material:w,colorCode:C,faceNormal:null,vertices:[R,P,D],normals:[null,null,null]}),f++,!0===B&&(i.push({material:w,colorCode:C,faceNormal:null,vertices:[D,P,R],normals:[null,null,null]}),f++);break;case"4":C=t.getToken(),w=c(C),I=b,B=!x||!_,!0===I?(R=t.getVector(),P=t.getVector(),D=t.getVector(),L=t.getVector()):(L=t.getVector(),D=t.getVector(),P=t.getVector(),R=t.getVector()),i.push({material:w,colorCode:C,faceNormal:null,vertices:[R,P,D,L],normals:[null,null,null,null]}),f+=2,!0===B&&(i.push({material:w,colorCode:C,faceNormal:null,vertices:[L,D,P,R],normals:[null,null,null,null]}),f+=2);break;default:throw new Error('LDrawLoader: Unknown line type "'+g+'"'+t.getLineNumberString()+".")}}return A&&this.setData(v,y),{faces:i,conditionalSegments:a,lineSegments:s,type:h,category:u,keywords:p,subobjects:o,totalFaces:f,startingConstructionStep:S,materials:l,fileName:t,group:null}}getData(e,t=!0){const n=e.toLowerCase(),r=this._cache[n];return null===r||r instanceof Promise?null:t?this.cloneResult(r):r}async ensureDataLoaded(e){const t=e.toLowerCase();t in this._cache||(this._cache[t]=this.fetchData(e).then((n=>{const r=this.parse(n,e);return this._cache[t]=r,r}))),await this._cache[t]}setData(e,t){const n=e.toLowerCase();this._cache[n]=this.parse(t,e)}}function f(e,t,n,r){return(!r&&e===i||r&&e===s)&&(e=t),n[e]||null}class m{constructor(e){this.loader=e,this.parseCache=new p(e),this._cache={}}async processIntoMesh(e){const t=this.loader,n=this.parseCache,l=new Set,c=async(e,a=null)=>{const o=e.subobjects,h=[];for(let t=0,r=o.length;t{const t=n.getData(e.fileName,!1);return r=t.type,/primitive/i.test(r)||"Subpart"===r?c(n.getData(e.fileName),e):this.loadModel(e.fileName).catch((e=>(console.warn(e),null)));var r}));h.push(r)}const u=new r.Group;u.userData.category=e.category,u.userData.keywords=e.keywords,e.group=u;const d=await Promise.all(h);for(let n=0,r=d.length;n1;!function(e){for(let t=0,n=e.length;tc&&([a,c]=[c,a]),n.distances.push(a,c)}}for(let r=0,f=e.length;rs&&([i,s]=[s,i]);let a=!1;for(let e=0,o=r.length;e=r[e]&&s<=r[e+1]){a=!0;break}if(a)continue}}const A={index:r,tri:t};d[g]=A}}for(;;){let e=null;for(const n in d){e=d[n];break}if(null===e)break;const t=[e];for(;t.length>0;){const e=t.pop().tri,n=e.vertices,i=e.normals,s=e.faceNormal,o=n.length;for(let l=0;l0&&u.add(A(e.faces,3,!1,e.totalFaces)),e.lineSegments.length>0&&u.add(A(e.lineSegments,2)),e.conditionalSegments.length>0&&u.add(A(e.conditionalSegments,2,!0)),u}hasCachedModel(e){return null!==e&&e.toLowerCase()in this._cache}async getCachedModel(e){if(null!==e&&this.hasCachedModel(e)){const t=e.toLowerCase();return(await this._cache[t]).clone()}return null}async loadModel(e){const t=this.parseCache,n=e.toLowerCase();if(this.hasCachedModel(e))return this.getCachedModel(e);{await t.ensureDataLoaded(e);const r=t.getData(e),i=this.processIntoMesh(r);if(this.hasCachedModel(e))return this.getCachedModel(e);u(r.type)&&(this._cache[n]=i);return(await i).clone()}}async parseModel(e){const t=this.parseCache.parse(e);return u(t.type)&&this.hasCachedModel(t.fileName)?this.getCachedModel(t.fileName):this.processIntoMesh(t)}}function g(e,t){return e.colorCode===t.colorCode?0:e.colorCode0&&d.addGroup(f,1/0,h.length-1),d.setAttribute("position",new r.BufferAttribute(s,3)),null!==l&&d.setAttribute("normal",new r.BufferAttribute(l,3));let v=null;if(2===t?v=n?new c(d,1===h.length?h[0]:h):new r.LineSegments(d,1===h.length?h[0]:h):3===t&&(v=new r.Mesh(d,1===h.length?h[0]:h)),n){v.isConditionalLine=!0;const t=new Float32Array(3*e.length*2),n=new Float32Array(3*e.length*2),i=new Float32Array(3*e.length*2);for(let r=0,s=e.length;r{this.partsCache.parseModel(e,this.materialLibrary).then((e=>{this.applyMaterialsToMesh(e,i,this.materialLibrary,!0),this.computeConstructionSteps(e),t(e)})).catch(s)}),n,s)}parse(e,t){this.partsCache.parseModel(e,this.materialLibrary).then((e=>{this.computeConstructionSteps(e),t(e)}))}setMaterials(e){this.materialLibrary={},this.materials=[];for(let t=0,n=e.length;t{if(e.isMesh||e.isLineSegments)if(Array.isArray(e.material))for(let t=0,n=e.material.length;t{e.isGroup&&(e.userData.startingConstructionStep&&t++,e.userData.constructionStep=t)})),e.userData.numConstructionSteps=t+1}}t.LDrawLoader=v},75960:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(1192);class s extends r.Loader{load(e,t,n,i){const s=new r.FileLoader(this.manager);s.setPath(this.path),s.setResponseType("text"),s.load(e,(n=>{try{t(this.parse(n))}catch(r){i?i(r):console.error(r),this.manager.itemError(e)}}),n,i)}parse(e){const t=(e=e.replace(/^#.*?(\n|\r)/gm,"").replace(/^\s*?(\n|\r)/gm,"").trim()).split(/[\n\r]+/g),n=t[0].trim().split(/\s+/g).map((e=>parseFloat(e))),s=n[1]-n[0],a=n.length;for(let r=1,i=n.length;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(1192);class s extends r.Loader{load(e,t,n,i){const s=new r.FileLoader(this.manager);s.setPath(this.path),s.setResponseType("text"),s.load(e,(n=>{try{t(this.parse(n))}catch(r){i?i(r):console.error(r),this.manager.itemError(e)}}),n,i)}parse(e){e=e.replace(/^#.*?(\n|\r)/gm,"").replace(/^\s*?(\n|\r)/gm,"").trim();let t=null,n=null;const s=new r.Vector3(0,0,0),a=new r.Vector3(1,1,1),o=e.split(/[\n\r]+/g);let l=null,c=0;for(let r=0,i=o.length;r1||o<0||h>1||h<0||u>1||u<0)throw new Error("LUTCubeLoader : Non normalized values not supported.");l[c+0]=255*o,l[c+1]=255*h,l[c+2]=255*u,l[c+3]=255,c+=4}}const h=new r.DataTexture;h.image.data=l,h.image.width=n,h.image.height=n*n,h.type=r.UnsignedByteType,h.magFilter=r.LinearFilter,h.minFilter=r.LinearFilter,h.wrapS=r.ClampToEdgeWrapping,h.wrapT=r.ClampToEdgeWrapping,h.generateMipmaps=!1,h.needsUpdate=!0;const u=new i.Data3DTexture;return u.image.data=l,u.image.width=n,u.image.height=n,u.image.depth=n,u.type=r.UnsignedByteType,u.magFilter=r.LinearFilter,u.minFilter=r.LinearFilter,u.wrapS=r.ClampToEdgeWrapping,u.wrapT=r.ClampToEdgeWrapping,u.wrapR=r.ClampToEdgeWrapping,u.generateMipmaps=!1,u.needsUpdate=!0,{title:t,size:n,domainMin:s,domainMax:a,texture:h,texture3D:u}}}t.LUTCubeLoader=s},34425:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(49708);let s;class a extends r.Loader{constructor(e,t={}){super(e),this.resourcePath=void 0!==t.resourcePath?t.resourcePath:""}load(e,t,n,i){const s=this,a=""===s.path?function(e,t){const n=e.indexOf(t);return-1===n?"./":e.substr(0,n)}(e,"Objects"):s.path,o=e.split(a).pop().split(".")[0],l=new r.FileLoader(this.manager);l.setPath(s.path),l.setResponseType("arraybuffer"),l.load(e,(function(n){try{t(s.parse(n,a,o))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e,t,n){s=(new i.IFFParser).parse(e);const a=new r.TextureLoader(this.manager).setPath(this.resourcePath||t).setCrossOrigin(this.crossOrigin);return new o(a).parse(n)}}class o{constructor(e){this.textureLoader=e}parse(e){return this.materials=new l(this.textureLoader).parse(),this.defaultLayerName=e,this.meshes=this.parseLayers(),{materials:this.materials,meshes:this.meshes}}parseLayers(){const e=[],t=[],n=new c,r=this;return s.layers.forEach((function(i){const s=n.parse(i.geometry,i),a=r.parseMesh(s,i);e[i.number]=a,-1===i.parent?t.push(a):e[i.parent].add(a)})),this.applyPivots(t),t}parseMesh(e,t){let n;const i=this.getMaterials(e.userData.matNames,t.geometry.type);return this.duplicateUVs(e,i),n="points"===t.geometry.type?new r.Points(e,i):"lines"===t.geometry.type?new r.LineSegments(e,i):new r.Mesh(e,i),t.name?n.name=t.name:n.name=this.defaultLayerName+"_layer_"+t.number,n.userData.pivot=t.pivot,n}applyPivots(e){e.forEach((function(e){e.traverse((function(e){const t=e.userData.pivot;if(e.position.x+=t[0],e.position.y+=t[1],e.position.z+=t[2],e.parent){const t=e.parent.userData.pivot;e.position.x-=t[0],e.position.y-=t[1],e.position.z-=t[2]}}))}))}getMaterials(e,t){const n=[],i=this;e.forEach((function(e,t){n[t]=i.getMaterialByName(e)})),"points"!==t&&"lines"!==t||n.forEach((function(e,i){const s={color:e.color};"points"===t?(s.size=.1,s.map=e.map,s.morphTargets=e.morphTargets,n[i]=new r.PointsMaterial(s)):"lines"===t&&(n[i]=new r.LineBasicMaterial(s))}));const s=n.filter(Boolean);return 1===s.length?s[0]:n}getMaterialByName(e){return this.materials.filter((function(t){return t.name===e}))[0]}duplicateUVs(e,t){let n=!1;Array.isArray(t)?t.forEach((function(e){e.aoMap&&(n=!0)})):t.aoMap&&(n=!0),n&&e.setAttribute("uv2",new r.BufferAttribute(e.attributes.uv.array,2))}}class l{constructor(e){this.textureLoader=e}parse(){const e=[];this.textures={};for(const t in s.materials)"LWO3"===s.format?e.push(this.parseMaterial(s.materials[t],t,s.textures)):"LWO2"===s.format&&e.push(this.parseMaterialLwo2(s.materials[t],t,s.textures));return e}parseMaterial(e,t,n){let r={name:t,side:this.getSide(e.attributes),flatShading:this.getSmooth(e.attributes)};const i=this.parseConnections(e.connections,e.nodes),s=this.parseTextureNodes(i.maps);this.parseAttributeImageMaps(i.attributes,n,s,e.maps);const a=this.parseAttributes(i.attributes,s);this.parseEnvMap(i,s,a),r=Object.assign(s,r),r=Object.assign(r,a);return new(this.getMaterialType(i.attributes))(r)}parseMaterialLwo2(e,t){let n={name:t,side:this.getSide(e.attributes),flatShading:this.getSmooth(e.attributes)};const i=this.parseAttributes(e.attributes,{});return n=Object.assign(n,i),new r.MeshPhongMaterial(n)}getSide(e){if(!e.side)return r.BackSide;switch(e.side){case 0:case 1:return r.BackSide;case 2:return r.FrontSide;case 3:return r.DoubleSide}}getSmooth(e){return!e.smooth||!e.smooth}parseConnections(e,t){const n={maps:{}},r=e.inputName,i=e.inputNodeName,s=e.nodeName,a=this;return r.forEach((function(e,r){if("Material"===e){const e=a.getNodeByRefName(i[r],t);n.attributes=e.attributes,n.envMap=e.fileName,n.name=i[r]}})),s.forEach((function(e,s){e===n.name&&(n.maps[r[s]]=a.getNodeByRefName(i[s],t))})),n}getNodeByRefName(e,t){for(const n in t)if(t[n].refName===e)return t[n]}parseTextureNodes(e){const t={};for(const n in e){const i=e[n],s=i.fileName;if(!s)return;const a=this.loadTexture(s);switch(void 0!==i.widthWrappingMode&&(a.wrapS=this.getWrappingType(i.widthWrappingMode)),void 0!==i.heightWrappingMode&&(a.wrapT=this.getWrappingType(i.heightWrappingMode)),n){case"Color":t.map=a;break;case"Roughness":t.roughnessMap=a,t.roughness=.5;break;case"Specular":t.specularMap=a,t.specular=16777215;break;case"Luminous":t.emissiveMap=a,t.emissive=8421504;break;case"Luminous Color":t.emissive=8421504;break;case"Metallic":t.metalnessMap=a,t.metalness=.5;break;case"Transparency":case"Alpha":t.alphaMap=a,t.transparent=!0;break;case"Normal":t.normalMap=a,void 0!==i.amplitude&&(t.normalScale=new r.Vector2(i.amplitude,i.amplitude));break;case"Bump":t.bumpMap=a}}return t.roughnessMap&&t.specularMap&&delete t.specularMap,t}parseAttributeImageMaps(e,t,n){for(const r in e){const i=e[r];if(i.maps){const e=i.maps[0],s=this.getTexturePathByIndex(e.imageIndex,t);if(!s)return;const a=this.loadTexture(s);switch(void 0!==e.wrap&&(a.wrapS=this.getWrappingType(e.wrap.w)),void 0!==e.wrap&&(a.wrapT=this.getWrappingType(e.wrap.h)),r){case"Color":n.map=a;break;case"Diffuse":n.aoMap=a;break;case"Roughness":n.roughnessMap=a,n.roughness=1;break;case"Specular":n.specularMap=a,n.specular=16777215;break;case"Luminosity":n.emissiveMap=a,n.emissive=8421504;break;case"Metallic":n.metalnessMap=a,n.metalness=1;break;case"Transparency":case"Alpha":n.alphaMap=a,n.transparent=!0;break;case"Normal":n.normalMap=a;break;case"Bump":n.bumpMap=a}}}}parseAttributes(e,t){const n={};return e.Color&&!t.map?n.color=(new r.Color).fromArray(e.Color.value):n.color=new r.Color,e.Transparency&&0!==e.Transparency.value&&(n.opacity=1-e.Transparency.value,n.transparent=!0),e["Bump Height"]&&(n.bumpScale=.1*e["Bump Height"].value),e["Refraction Index"]&&(n.refractionRatio=1/e["Refraction Index"].value),this.parsePhysicalAttributes(n,e,t),this.parseStandardAttributes(n,e,t),this.parsePhongAttributes(n,e,t),n}parsePhysicalAttributes(e,t){t.Clearcoat&&t.Clearcoat.value>0&&(e.clearcoat=t.Clearcoat.value,t["Clearcoat Gloss"]&&(e.clearcoatRoughness=.5*(1-t["Clearcoat Gloss"].value)))}parseStandardAttributes(e,t,n){t.Luminous&&(e.emissiveIntensity=t.Luminous.value,t["Luminous Color"]&&!n.emissive?e.emissive=(new r.Color).fromArray(t["Luminous Color"].value):e.emissive=new r.Color(8421504)),t.Roughness&&!n.roughnessMap&&(e.roughness=t.Roughness.value),t.Metallic&&!n.metalnessMap&&(e.metalness=t.Metallic.value)}parsePhongAttributes(e,t,n){t.Diffuse&&e.color.multiplyScalar(t.Diffuse.value),t.Reflection&&(e.reflectivity=t.Reflection.value,e.combine=r.AddOperation),t.Luminosity&&(e.emissiveIntensity=t.Luminosity.value,n.emissiveMap||n.map?e.emissive=new r.Color(8421504):e.emissive=e.color),t.Roughness||!t.Specular||n.specularMap||(t["Color Highlight"]?e.specular=(new r.Color).setScalar(t.Specular.value).lerp(e.color.clone().multiplyScalar(t.Specular.value),t["Color Highlight"].value):e.specular=(new r.Color).setScalar(t.Specular.value)),e.specular&&t.Glossiness&&(e.shininess=7+Math.pow(2,12*t.Glossiness.value+2))}parseEnvMap(e,t,n){if(e.envMap){const i=this.loadTexture(e.envMap);n.transparent&&n.opacity<.999?(i.mapping=r.EquirectangularRefractionMapping,void 0!==n.reflectivity&&(delete n.reflectivity,delete n.combine),void 0!==n.metalness&&delete n.metalness):i.mapping=r.EquirectangularReflectionMapping,t.envMap=i}}getTexturePathByIndex(e){let t="";return s.textures?(s.textures.forEach((function(n){n.index===e&&(t=n.fileName)})),t):t}loadTexture(e){if(!e)return null;return this.textureLoader.load(e,void 0,void 0,(function(){console.warn("LWOLoader: non-standard resource hierarchy. Use `resourcePath` parameter to specify root content directory.")}))}getWrappingType(e){switch(e){case 0:return console.warn('LWOLoader: "Reset" texture wrapping type is not supported in three.js'),r.ClampToEdgeWrapping;case 1:return r.RepeatWrapping;case 2:return r.MirroredRepeatWrapping;case 3:return r.ClampToEdgeWrapping}}getMaterialType(e){return e.Clearcoat&&e.Clearcoat.value>0?r.MeshPhysicalMaterial:e.Roughness?r.MeshStandardMaterial:r.MeshPhongMaterial}}class c{parse(e,t){const n=new r.BufferGeometry;n.setAttribute("position",new r.Float32BufferAttribute(e.points,3));const i=this.splitIndices(e.vertexIndices,e.polygonDimensions);return n.setIndex(i),this.parseGroups(n,e),n.computeVertexNormals(),this.parseUVs(n,t,i),this.parseMorphTargets(n,t,i),n.translate(-t.pivot[0],-t.pivot[1],-t.pivot[2]),n}splitIndices(e,t){const n=[];let r=0;return t.forEach((function(t){if(t<4)for(let i=0;i4){for(let i=1;i0){let t;l[n[h]]?t=l[n[h]]:(t=o,l[n[h]]=o,r[o]=n[h]),e.addGroup(u,d,t)}e.userData.matNames=r}splitMaterialIndices(e,t){const n=[];return e.forEach((function(e,r){if(e<=3)n.push(t[2*r],t[2*r+1]);else if(4===e)n.push(t[2*r],t[2*r+1],t[2*r],t[2*r+1]);else for(let i=0;i{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(20840);class s extends r.Loader{setQuality(e){this._quality=e}load(e,t,n,s){const a=this._quality||1,o=new r.CanvasTexture;o.minFilter=r.NearestFilter;const l=new r.FileLoader(this.manager);return l.setPath(this.path),l.setWithCredentials(this.withCredentials),l.load(e,(function(e){const n=JSON.parse(e),r=document.createElement("div");r.style.width=n.w+"px",r.style.height=n.h+"px",document.body.appendChild(r);const s=i.loadAnimation({container:r,animType:"canvas",loop:!0,autoplay:!0,animationData:n,rendererSettings:{dpr:a}});o.animation=s,o.image=s.container,s.addEventListener("enterFrame",(function(){o.needsUpdate=!0})),r.style.display="none",void 0!==t&&t(o)}),n,s),o}}t.LottieLoader=s},40280:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=[[-.525731,0,.850651],[-.442863,.238856,.864188],[-.295242,0,.955423],[-.309017,.5,.809017],[-.16246,.262866,.951056],[0,0,1],[0,.850651,.525731],[-.147621,.716567,.681718],[.147621,.716567,.681718],[0,.525731,.850651],[.309017,.5,.809017],[.525731,0,.850651],[.295242,0,.955423],[.442863,.238856,.864188],[.16246,.262866,.951056],[-.681718,.147621,.716567],[-.809017,.309017,.5],[-.587785,.425325,.688191],[-.850651,.525731,0],[-.864188,.442863,.238856],[-.716567,.681718,.147621],[-.688191,.587785,.425325],[-.5,.809017,.309017],[-.238856,.864188,.442863],[-.425325,.688191,.587785],[-.716567,.681718,-.147621],[-.5,.809017,-.309017],[-.525731,.850651,0],[0,.850651,-.525731],[-.238856,.864188,-.442863],[0,.955423,-.295242],[-.262866,.951056,-.16246],[0,1,0],[0,.955423,.295242],[-.262866,.951056,.16246],[.238856,.864188,.442863],[.262866,.951056,.16246],[.5,.809017,.309017],[.238856,.864188,-.442863],[.262866,.951056,-.16246],[.5,.809017,-.309017],[.850651,.525731,0],[.716567,.681718,.147621],[.716567,.681718,-.147621],[.525731,.850651,0],[.425325,.688191,.587785],[.864188,.442863,.238856],[.688191,.587785,.425325],[.809017,.309017,.5],[.681718,.147621,.716567],[.587785,.425325,.688191],[.955423,.295242,0],[1,0,0],[.951056,.16246,.262866],[.850651,-.525731,0],[.955423,-.295242,0],[.864188,-.442863,.238856],[.951056,-.16246,.262866],[.809017,-.309017,.5],[.681718,-.147621,.716567],[.850651,0,.525731],[.864188,.442863,-.238856],[.809017,.309017,-.5],[.951056,.16246,-.262866],[.525731,0,-.850651],[.681718,.147621,-.716567],[.681718,-.147621,-.716567],[.850651,0,-.525731],[.809017,-.309017,-.5],[.864188,-.442863,-.238856],[.951056,-.16246,-.262866],[.147621,.716567,-.681718],[.309017,.5,-.809017],[.425325,.688191,-.587785],[.442863,.238856,-.864188],[.587785,.425325,-.688191],[.688191,.587785,-.425325],[-.147621,.716567,-.681718],[-.309017,.5,-.809017],[0,.525731,-.850651],[-.525731,0,-.850651],[-.442863,.238856,-.864188],[-.295242,0,-.955423],[-.16246,.262866,-.951056],[0,0,-1],[.295242,0,-.955423],[.16246,.262866,-.951056],[-.442863,-.238856,-.864188],[-.309017,-.5,-.809017],[-.16246,-.262866,-.951056],[0,-.850651,-.525731],[-.147621,-.716567,-.681718],[.147621,-.716567,-.681718],[0,-.525731,-.850651],[.309017,-.5,-.809017],[.442863,-.238856,-.864188],[.16246,-.262866,-.951056],[.238856,-.864188,-.442863],[.5,-.809017,-.309017],[.425325,-.688191,-.587785],[.716567,-.681718,-.147621],[.688191,-.587785,-.425325],[.587785,-.425325,-.688191],[0,-.955423,-.295242],[0,-1,0],[.262866,-.951056,-.16246],[0,-.850651,.525731],[0,-.955423,.295242],[.238856,-.864188,.442863],[.262866,-.951056,.16246],[.5,-.809017,.309017],[.716567,-.681718,.147621],[.525731,-.850651,0],[-.238856,-.864188,-.442863],[-.5,-.809017,-.309017],[-.262866,-.951056,-.16246],[-.850651,-.525731,0],[-.716567,-.681718,-.147621],[-.716567,-.681718,.147621],[-.525731,-.850651,0],[-.5,-.809017,.309017],[-.238856,-.864188,.442863],[-.262866,-.951056,.16246],[-.864188,-.442863,.238856],[-.809017,-.309017,.5],[-.688191,-.587785,.425325],[-.681718,-.147621,.716567],[-.442863,-.238856,.864188],[-.587785,-.425325,.688191],[-.309017,-.5,.809017],[-.147621,-.716567,.681718],[-.425325,-.688191,.587785],[-.16246,-.262866,.951056],[.442863,-.238856,.864188],[.16246,-.262866,.951056],[.309017,-.5,.809017],[.147621,-.716567,.681718],[0,-.525731,.850651],[.425325,-.688191,.587785],[.587785,-.425325,.688191],[.688191,-.587785,.425325],[-.955423,.295242,0],[-.951056,.16246,.262866],[-1,0,0],[-.850651,0,.525731],[-.955423,-.295242,0],[-.951056,-.16246,.262866],[-.864188,.442863,-.238856],[-.951056,.16246,-.262866],[-.809017,.309017,-.5],[-.864188,-.442863,-.238856],[-.951056,-.16246,-.262866],[-.809017,-.309017,-.5],[-.681718,.147621,-.716567],[-.681718,-.147621,-.716567],[-.850651,0,-.525731],[-.688191,.587785,-.425325],[-.587785,.425325,-.688191],[-.425325,.688191,-.587785],[-.425325,-.688191,-.587785],[-.587785,-.425325,-.688191],[-.688191,-.587785,-.425325]];class s extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setResponseType("arraybuffer"),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){const t=new DataView(e),n={},s=["ident","version","skinwidth","skinheight","framesize","num_skins","num_vertices","num_st","num_tris","num_glcmds","num_frames","offset_skins","offset_st","offset_tris","offset_frames","offset_glcmds","offset_end"];for(let r=0;r0){const n=[];for(let t=0,r=c.length;t0){const n=[];for(let t=0,r=c.length;t{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new r.FileLoader(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.load(e,(function(e){t(s.parse(e))}),n,i)}parse(e){const t=new DataView(e),n=t.getUint32(0),i=t.getUint32(4);let s=8;const a=new Float32Array(n),o=new Float32Array(n*n).fill(0);for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(37960),s=n(79100);class a extends r.Loader{constructor(e){super(e),this.loader=new r.FileLoader(this.manager),this.parser=null,this.meshBuilder=new l(this.manager),this.animationBuilder=new u}setAnimationPath(e){return this.animationPath=e,this}load(e,t,n,i){const s=this.meshBuilder.setCrossOrigin(this.crossOrigin);let a;a=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:r.LoaderUtils.extractUrlBase(e);const o=this._extractExtension(e).toLowerCase();"pmd"===o||"pmx"===o?this["pmd"===o?"loadPMD":"loadPMX"](e,(function(e){t(s.build(e,a,n,i))}),n,i):i&&i(new Error("THREE.MMDLoader: Unknown model file extension ."+o+"."))}loadAnimation(e,t,n,r,i){const s=this.animationBuilder;this.loadVMD(e,(function(e){n(t.isCamera?s.buildCameraAnimation(e):s.build(e,t))}),r,i)}loadWithAnimation(e,t,n,r,i){const s=this;this.load(e,(function(e){s.loadAnimation(t,e,(function(t){n({mesh:e,animation:t})}),r,i)}),r,i)}loadPMD(e,t,n,r){const i=this._getParser();this.loader.setMimeType(void 0).setPath(this.path).setResponseType("arraybuffer").setRequestHeader(this.requestHeader).setWithCredentials(this.withCredentials).load(e,(function(e){t(i.parsePmd(e,!0))}),n,r)}loadPMX(e,t,n,r){const i=this._getParser();this.loader.setMimeType(void 0).setPath(this.path).setResponseType("arraybuffer").setRequestHeader(this.requestHeader).setWithCredentials(this.withCredentials).load(e,(function(e){t(i.parsePmx(e,!0))}),n,r)}loadVMD(e,t,n,r){const i=Array.isArray(e)?e:[e],s=[],a=i.length,o=this._getParser();this.loader.setMimeType(void 0).setPath(this.animationPath).setResponseType("arraybuffer").setRequestHeader(this.requestHeader).setWithCredentials(this.withCredentials);for(let l=0,c=i.length;l=e?s.skinIndices[e]:0);for(let e=0;e<4;e++)c.push(s.skinWeights.length-1>=e?s.skinWeights[e]:0)}for(let r=0;r=0&&(s.limitation=new r.Vector3(1,0,0)),n.links.push(s)}d.push(n)}else for(let x=0;x0,o.morphTargets=t.morphTargets.length>0,o.fog=!0,o.blending=r.CustomBlending,o.blendSrc=r.SrcAlphaFactor,o.blendDst=r.OneMinusSrcAlphaFactor,o.blendSrcAlpha=r.SrcAlphaFactor,o.blendDstAlpha=r.DstAlphaFactor,"pmx"===e.metadata.format&&1==(1&a.flag)?o.side=r.DoubleSide:o.side=1===o.opacity?r.FrontSide:r.DoubleSide,"pmd"===e.metadata.format){if(a.fileName){const e=a.fileName.split("*");if(o.map=this._loadTexture(e[0],i),e.length>1){const t=e[1].slice(-4).toLowerCase();o.envMap=this._loadTexture(e[1],i),o.combine=".sph"===t?r.MultiplyOperation:r.AddOperation}}const t=-1===a.toonIndex?"toon00.bmp":e.toonTextures[a.toonIndex].fileName;o.gradientMap=this._loadTexture(t,i,{isToonTexture:!0,isDefaultToonTexture:this._isDefaultToonTexture(t)}),o.userData.outlineParameters={thickness:1===a.edgeFlag?.003:0,color:[0,0,0],alpha:1,visible:1===a.edgeFlag}}else{let t,n;-1!==a.textureIndex&&(o.map=this._loadTexture(e.textures[a.textureIndex],i)),-1===a.envTextureIndex||1!==a.envFlag&&2!=a.envFlag||(o.envMap=this._loadTexture(e.textures[a.envTextureIndex],i),o.combine=1===a.envFlag?r.MultiplyOperation:r.AddOperation),-1===a.toonIndex||0!==a.toonFlag?(t="toon"+("0"+(a.toonIndex+1)).slice(-2)+".bmp",n=!0):(t=e.textures[a.toonIndex],n=!1),o.gradientMap=this._loadTexture(t,i,{isToonTexture:!0,isDefaultToonTexture:n}),o.userData.outlineParameters={thickness:a.edgeSize/300,color:a.edgeColor.slice(0,3),alpha:a.edgeColor[3],visible:0!=(16&a.flag)&&a.edgeSize>0}}void 0!==o.map&&(o.transparent||this._checkImageTransparency(o.map,t,s),o.emissive.multiplyScalar(.2)),n.push(new r.MeshToonMaterial(o))}if("pmx"===e.metadata.format){let t=function(e,t){for(let n=0,r=e.length;n2){n=n.slice(),r=r.slice(),i=i.slice();const e=r.length/n.length,t=i.length/n.length;let s=1;for(let a=2,o=n.length;as){n[s]=n[a];for(let t=0;t{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=""===this.path?r.LoaderUtils.extractUrlBase(e):this.path,o=new r.FileLoader(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(s.parse(n,a))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,t){const n=e.split("\n");let r={};const i=/\s+/,a={};for(let s=0;s=0?e.substring(0,t):e;o=o.toLowerCase();let l=t>=0?e.substring(t+1):"";if(l=l.trim(),"newmtl"===o)r={name:l},a[l]=r;else if("ka"===o||"kd"===o||"ks"===o||"ke"===o){const e=l.split(i,3);r[o]=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])]}else r[o]=l}const o=new s(this.resourcePath||t,this.materialOptions);return o.setCrossOrigin(this.crossOrigin),o.setManager(this.manager),o.setMaterials(a),o}}class s{constructor(e="",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=void 0!==this.options.side?this.options.side:r.FrontSide,this.wrap=void 0!==this.options.wrap?this.options.wrap:r.RepeatWrapping}setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;const t={};for(const n in e){const r=e[n],i={};t[n]=i;for(const e in r){let t=!0,n=r[e];const s=e.toLowerCase();switch(s){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(n=[n[0]/255,n[1]/255,n[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===n[0]&&0===n[1]&&0===n[2]&&(t=!1)}t&&(i[s]=n)}}return t}preload(){for(const e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(const t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray}create(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){const t=this,n=this.materialsInfo[e],i={name:e,side:this.side};function s(e,n){if(i[e])return;const r=t.getTextureParams(n,i),s=t.loadTexture((a=t.baseUrl,"string"!=typeof(o=r.url)||""===o?"":/^https?:\/\//i.test(o)?o:a+o));var a,o;s.repeat.copy(r.scale),s.offset.copy(r.offset),s.wrapS=t.wrap,s.wrapT=t.wrap,i[e]=s}for(const a in n){const e=n[a];let t;if(""!==e)switch(a.toLowerCase()){case"kd":i.color=(new r.Color).fromArray(e);break;case"ks":i.specular=(new r.Color).fromArray(e);break;case"ke":i.emissive=(new r.Color).fromArray(e);break;case"map_kd":s("map",e);break;case"map_ks":s("specularMap",e);break;case"map_ke":s("emissiveMap",e);break;case"norm":s("normalMap",e);break;case"map_bump":case"bump":s("bumpMap",e);break;case"map_d":s("alphaMap",e),i.transparent=!0;break;case"ns":i.shininess=parseFloat(e);break;case"d":t=parseFloat(e),t<1&&(i.opacity=t,i.transparent=!0);break;case"tr":t=parseFloat(e),this.options&&this.options.invertTrProperty&&(t=1-t),t>0&&(i.opacity=1-t,i.transparent=!0)}}return this.materials[e]=new r.MeshPhongMaterial(i),this.materials[e]}getTextureParams(e,t){const n={scale:new r.Vector2(1,1),offset:new r.Vector2(0,0)},i=e.split(/\s+/);let s;return s=i.indexOf("-bm"),s>=0&&(t.bumpScale=parseFloat(i[s+1]),i.splice(s,2)),s=i.indexOf("-s"),s>=0&&(n.scale.set(parseFloat(i[s+1]),parseFloat(i[s+2])),i.splice(s,4)),s=i.indexOf("-o"),s>=0&&(n.offset.set(parseFloat(i[s+1]),parseFloat(i[s+2])),i.splice(s,4)),n.url=i.join(" ").trim(),n}loadTexture(e,t,n,i,s){const a=void 0!==this.manager?this.manager:r.DefaultLoadingManager;let o=a.getHandler(e);null===o&&(o=new r.TextureLoader(a)),o.setCrossOrigin&&o.setCrossOrigin(this.crossOrigin);const l=o.load(e,n,i,s);return void 0!==t&&(l.mapping=t),l}}t.MTLLoader=i},34896:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(91952),s=n(69792);class a extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setResponseType("arraybuffer"),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){let t=e,n=0;const a=new Int8Array(new Int16Array([1]).buffer)[0]>0,l={};const c=function(e,r){null==r&&(r=1);let i=1,s=Uint8Array;switch(e){case"uchar":break;case"schar":s=Int8Array;break;case"ushort":s=Uint16Array,i=2;break;case"sshort":s=Int16Array,i=2;break;case"uint":s=Uint32Array,i=4;break;case"sint":s=Int32Array,i=4;break;case"float":s=Float32Array,i=4;break;case"complex":case"double":s=Float64Array,i=8}let o=new s(t.slice(n,n+=r*i));return true!=a&&(o=function(e,t){const n=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);for(let r=0;ri;e--,i++){const t=n[i];n[i]=n[e],n[e]=t}return e}(o,i)),1==r?o[0]:o}("uchar",e.byteLength),h=c.length;let u,d=null,p=0;for(u=1;u13)&&32!==r?i+=String.fromCharCode(r):(""!==i&&(o[c]=h(i,a),c++),i="");return""!==i&&(o[c]=h(i,a),c++),o}(t);else if("raw"===l.encoding){const e=new Uint8Array(t.length);for(let n=0;n{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=/^[og]\s*(.+)?/,s=/^mtllib /,a=/^usemtl /,o=/^usemap /,l=new r.Vector3,c=new r.Vector3,h=new r.Vector3,u=new r.Vector3,d=new r.Vector3;function p(){const e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration)return this.object.name=e,void(this.object.fromDeclaration=!1!==t);const n=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){const n=this._finalize(!1);n&&(n.inherited||n.groupCount<=0)&&this.materials.splice(n.index,1);const r={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){const t={index:"number"==typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(r),r},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){const t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(let n=this.materials.length-1;n>=0;n--)this.materials[n].groupCount<=0&&this.materials.splice(n,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},n&&n.name&&"function"==typeof n.clone){const e=n.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){const n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){const r=this.vertices,i=this.object.geometry.vertices;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){const r=this.normals,i=this.object.geometry.normals;i.push(r[e+0],r[e+1],r[e+2]),i.push(r[t+0],r[t+1],r[t+2]),i.push(r[n+0],r[n+1],r[n+2])},addFaceNormal:function(e,t,n){const r=this.vertices,i=this.object.geometry.normals;l.fromArray(r,e),c.fromArray(r,t),h.fromArray(r,n),d.subVectors(h,c),u.subVectors(l,c),d.cross(u),d.normalize(),i.push(d.x,d.y,d.z),i.push(d.x,d.y,d.z),i.push(d.x,d.y,d.z)},addColor:function(e,t,n){const r=this.colors,i=this.object.geometry.colors;void 0!==r[e]&&i.push(r[e+0],r[e+1],r[e+2]),void 0!==r[t]&&i.push(r[t+0],r[t+1],r[t+2]),void 0!==r[n]&&i.push(r[n+0],r[n+1],r[n+2])},addUV:function(e,t,n){const r=this.uvs,i=this.object.geometry.uvs;i.push(r[e+0],r[e+1]),i.push(r[t+0],r[t+1]),i.push(r[n+0],r[n+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,r,i,s,a,o,l){const c=this.vertices.length;let h=this.parseVertexIndex(e,c),u=this.parseVertexIndex(t,c),d=this.parseVertexIndex(n,c);if(this.addVertex(h,u,d),this.addColor(h,u,d),void 0!==a&&""!==a){const e=this.normals.length;h=this.parseNormalIndex(a,e),u=this.parseNormalIndex(o,e),d=this.parseNormalIndex(l,e),this.addNormal(h,u,d)}else this.addFaceNormal(h,u,d);if(void 0!==r&&""!==r){const e=this.uvs.length;h=this.parseUVIndex(r,e),u=this.parseUVIndex(i,e),d=this.parseUVIndex(s,e),this.addUV(h,u,d),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let n=0,r=e.length;n=7?t.colors.push(parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6])):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]));break;case"vt":t.uvs.push(parseFloat(e[1]),parseFloat(e[2]))}}else if("f"===c){const e=l.substr(1).trim().split(/\s+/),n=[];for(let t=0,i=e.length;t0){const e=r.split("/");n.push(e)}}const r=n[0];for(let i=1,s=n.length-1;i1){const e=u[1].trim().toLowerCase();t.object.smooth="0"!==e&&"off"!==e}else t.object.smooth=!0;const e=t.object.currentMaterial();e&&(e.smooth=t.object.smooth)}else{if("\0"===l)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+l+'"')}t.finalize();const f=new r.Group;f.materialLibraries=[].concat(t.materialLibraries);if(!0===!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length))for(let i=0,s=t.objects.length;i0&&c.setAttribute("normal",new r.Float32BufferAttribute(n.normals,3)),n.colors.length>0&&(l=!0,c.setAttribute("color",new r.Float32BufferAttribute(n.colors,3))),!0===n.hasUVIndices&&c.setAttribute("uv",new r.Float32BufferAttribute(n.uvs,2));const h=[];for(let i=0,d=s.length;i1){for(let e=0,t=s.length;e0){const e=new r.PointsMaterial({size:1,sizeAttenuation:!1}),n=new r.BufferGeometry;n.setAttribute("position",new r.Float32BufferAttribute(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(n.setAttribute("color",new r.Float32BufferAttribute(t.colors,3)),e.vertexColors=!0);const i=new r.Points(n,e);f.add(i)}return f}}t.OBJLoader=f},2744:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{constructor(e){super(e),this.littleEndian=!0}load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setResponseType("arraybuffer"),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,(function(n){try{t(s.parse(n,e))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e,t){const n=r.LoaderUtils.decodeText(new Uint8Array(e)),i=function(e){const t={},n=e.search(/[\r\n]DATA\s(\S*)\s/i),r=/[\r\n]DATA\s(\S*)\s/i.exec(e.substr(n-1));if(t.data=r[1],t.headerLen=r[0].length+n,t.str=e.substr(0,t.headerLen),t.str=t.str.replace(/\#.*/gi,""),t.version=/VERSION (.*)/i.exec(t.str),t.fields=/FIELDS (.*)/i.exec(t.str),t.size=/SIZE (.*)/i.exec(t.str),t.type=/TYPE (.*)/i.exec(t.str),t.count=/COUNT (.*)/i.exec(t.str),t.width=/WIDTH (.*)/i.exec(t.str),t.height=/HEIGHT (.*)/i.exec(t.str),t.viewpoint=/VIEWPOINT (.*)/i.exec(t.str),t.points=/POINTS (.*)/i.exec(t.str),null!==t.version&&(t.version=parseFloat(t.version[1])),null!==t.fields&&(t.fields=t.fields[1].split(" ")),null!==t.type&&(t.type=t.type[1].split(" ")),null!==t.width&&(t.width=parseInt(t.width[1])),null!==t.height&&(t.height=parseInt(t.height[1])),null!==t.viewpoint&&(t.viewpoint=t.viewpoint[1]),null!==t.points&&(t.points=parseInt(t.points[1],10)),null===t.points&&(t.points=t.width*t.height),null!==t.size&&(t.size=t.size[1].split(" ").map((function(e){return parseInt(e,10)}))),null!==t.count)t.count=t.count[1].split(" ").map((function(e){return parseInt(e,10)}));else{t.count=[];for(let e=0,n=t.fields.length;e>16&255,i=t>>8&255,s=t>>0&255;o.push(n/255,i/255,s/255)}void 0!==e.normal_x&&(a.push(parseFloat(r[e.normal_x])),a.push(parseFloat(r[e.normal_y])),a.push(parseFloat(r[e.normal_z])))}}if("binary_compressed"===i.data){const t=new Uint32Array(e.slice(i.headerLen,i.headerLen+8)),n=t[0],r=t[1],l=function(e,t){const n=e.length,r=new Uint8Array(t);let i,s,a,o=0,l=0;do{if(i=e[o++],i<32){if(i++,l+i>t)throw new Error("Output buffer is not large enough");if(o+i>n)throw new Error("Invalid compressed data");do{r[l++]=e[o++]}while(--i)}else{if(s=i>>5,a=l-((31&i)<<8)-1,o>=n)throw new Error("Invalid compressed data");if(7===s&&(s+=e[o++],o>=n))throw new Error("Invalid compressed data");if(a-=e[o++],l+s+2>t)throw new Error("Output buffer is not large enough");if(a<0)throw new Error("Invalid compressed data");if(a>=l)throw new Error("Invalid compressed data");do{r[l++]=r[a++]}while(2+--s)}}while(o0&&l.setAttribute("position",new r.Float32BufferAttribute(s,3)),a.length>0&&l.setAttribute("normal",new r.Float32BufferAttribute(a,3)),o.length>0&&l.setAttribute("color",new r.Float32BufferAttribute(o,3)),l.computeBoundingSphere();const c=new r.PointsMaterial({size:.005});o.length>0?c.vertexColors=!0:c.color.setHex(16777215*Math.random());const h=new r.Points(l,c);let u=t.split("").reverse().join("");return u=/([^\/]*)/.exec(u),u=u[1].split("").reverse().join(""),h.name=u,h}}t.PCDLoader=i},48584:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){function t(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function n(e,t,n,r){const i=parseInt(c[r].substr(e,t));if(i){const e=(s=n,l=i,"s"+Math.min(s,l)+"e"+Math.max(s,l));void 0===o[e]&&(a.push([n-1,i-1,1]),o[e]=a.length-1)}var s,l}const i={h:[255,255,255],he:[217,255,255],li:[204,128,255],be:[194,255,0],b:[255,181,181],c:[144,144,144],n:[48,80,248],o:[255,13,13],f:[144,224,80],ne:[179,227,245],na:[171,92,242],mg:[138,255,0],al:[191,166,166],si:[240,200,160],p:[255,128,0],s:[255,255,48],cl:[31,240,31],ar:[128,209,227],k:[143,64,212],ca:[61,255,0],sc:[230,230,230],ti:[191,194,199],v:[166,166,171],cr:[138,153,199],mn:[156,122,199],fe:[224,102,51],co:[240,144,160],ni:[80,208,80],cu:[200,128,51],zn:[125,128,176],ga:[194,143,143],ge:[102,143,143],as:[189,128,227],se:[255,161,0],br:[166,41,41],kr:[92,184,209],rb:[112,46,176],sr:[0,255,0],y:[148,255,255],zr:[148,224,224],nb:[115,194,201],mo:[84,181,181],tc:[59,158,158],ru:[36,143,143],rh:[10,125,140],pd:[0,105,133],ag:[192,192,192],cd:[255,217,143],in:[166,117,115],sn:[102,128,128],sb:[158,99,181],te:[212,122,0],i:[148,0,148],xe:[66,158,176],cs:[87,23,143],ba:[0,201,0],la:[112,212,255],ce:[255,255,199],pr:[217,255,199],nd:[199,255,199],pm:[163,255,199],sm:[143,255,199],eu:[97,255,199],gd:[69,255,199],tb:[48,255,199],dy:[31,255,199],ho:[0,255,156],er:[0,230,117],tm:[0,212,82],yb:[0,191,56],lu:[0,171,36],hf:[77,194,255],ta:[77,166,255],w:[33,148,214],re:[38,125,171],os:[38,102,150],ir:[23,84,135],pt:[208,208,224],au:[255,209,35],hg:[184,184,208],tl:[166,84,77],pb:[87,89,97],bi:[158,79,181],po:[171,92,0],at:[117,79,69],rn:[66,130,150],fr:[66,0,102],ra:[0,125,0],ac:[112,171,250],th:[0,186,255],pa:[0,161,255],u:[0,143,255],np:[0,128,255],pu:[0,107,255],am:[84,92,242],cm:[120,92,227],bk:[138,79,227],cf:[161,54,212],es:[179,31,212],fm:[179,31,186],md:[179,13,166],no:[189,13,135],lr:[199,0,102],rf:[204,0,89],db:[209,0,79],sg:[217,0,69],bh:[224,0,56],hs:[230,0,46],mt:[235,0,38],ds:[235,0,38],rg:[235,0,38],cn:[235,0,38],uut:[235,0,38],uuq:[235,0,38],uup:[235,0,38],uuh:[235,0,38],uus:[235,0,38],uuo:[235,0,38]},s=[],a=[],o={},l={},c=e.split("\n");for(let r=0,u=c.length;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{constructor(e){super(e),this.propertyNameMapping={}}load(e,t,n,i){const s=this,a=new r.FileLoader(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}setPropertyNameMapping(e){this.propertyNameMapping=e}parse(e){function t(e){let t="",n=0;const r=/ply([\s\S]*)end_header\r?\n/.exec(e);null!==r&&(t=r[1],n=new Blob([r[0]]).size);const i={comments:[],elements:[],headerLength:n,objInfo:""},s=t.split("\n");let a;function o(e,t){const n={type:e[0]};return"list"===n.type?(n.name=e[3],n.countType=e[1],n.itemType=e[2]):n.name=e[1],n.name in t&&(n.name=t[n.name]),n}for(let l=0;l=t.elements[c].count&&(c++,h=0);const r=i(t.elements[c].properties,e);o(n,t.elements[c].name,r),h++}return a(n)}function a(e){let t=new r.BufferGeometry;return e.indices.length>0&&t.setIndex(e.indices),t.setAttribute("position",new r.Float32BufferAttribute(e.vertices,3)),e.normals.length>0&&t.setAttribute("normal",new r.Float32BufferAttribute(e.normals,3)),e.uvs.length>0&&t.setAttribute("uv",new r.Float32BufferAttribute(e.uvs,2)),e.colors.length>0&&t.setAttribute("color",new r.Float32BufferAttribute(e.colors,3)),e.faceVertexUvs.length>0&&(t=t.toNonIndexed(),t.setAttribute("uv",new r.Float32BufferAttribute(e.faceVertexUvs,2))),t.computeBoundingSphere(),t}function o(e,t,n){if("vertex"===t)e.vertices.push(n.x,n.y,n.z),"nx"in n&&"ny"in n&&"nz"in n&&e.normals.push(n.nx,n.ny,n.nz),"s"in n&&"t"in n&&e.uvs.push(n.s,n.t),"red"in n&&"green"in n&&"blue"in n&&e.colors.push(n.red/255,n.green/255,n.blue/255);else if("face"===t){const t=n.vertex_indices||n.vertex_index,r=n.texcoord;3===t.length?(e.indices.push(t[0],t[1],t[2]),r&&6===r.length&&(e.faceVertexUvs.push(r[0],r[1]),e.faceVertexUvs.push(r[2],r[3]),e.faceVertexUvs.push(r[4],r[5]))):4===t.length&&(e.indices.push(t[0],t[1],t[3]),e.indices.push(t[1],t[2],t[3]))}}function l(e,t,n,r){switch(n){case"int8":case"char":return[e.getInt8(t),1];case"uint8":case"uchar":return[e.getUint8(t),1];case"int16":case"short":return[e.getInt16(t,r),2];case"uint16":case"ushort":return[e.getUint16(t,r),2];case"int32":case"int":return[e.getInt32(t,r),4];case"uint32":case"uint":return[e.getUint32(t,r),4];case"float32":case"float":return[e.getFloat32(t,r),4];case"float64":case"double":return[e.getFloat64(t,r),8]}}function c(e,t,n,r){const i={};let s,a=0;for(let o=0;o{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);let i=null;function s(){if(null===i){const e=new ArrayBuffer(2),t=new Uint8Array(e),n=new Uint16Array(e);t[0]=170,t[1]=187,i=43707===n[0]}return i}const a=[null,Float32Array,null,Int8Array,Int16Array,null,Int32Array,Uint8Array,Uint16Array,null,Uint32Array],o={Uint16Array:"getUint16",Uint32Array:"getUint32",Int16Array:"getInt16",Int32Array:"getInt32",Float32Array:"getFloat32",Float64Array:"getFloat64"};function l(e,t,n,r,i){const a=t.BYTES_PER_ELEMENT;let l;if(i===s()||1===a)l=new t(e,n,r);else{const s=new DataView(e,n,r*a),c=o[t.name],h=!i;l=new t(r);for(let e=0;e>7&1),s=r>>6&1,o=1==(r>>5&1),c=31&r;let h=0,u=0;if(o?(h=(t[2]<<16)+(t[3]<<8)+t[4],u=(t[5]<<16)+(t[6]<<8)+t[7]):(h=t[2]+(t[3]<<8)+(t[4]<<16),u=t[5]+(t[6]<<8)+(t[7]<<16)),0===n)throw new Error("PRWM decoder: Invalid format version: 0");if(1!==n)throw new Error("PRWM decoder: Unsupported format version: "+n);if(!i){if(0!==s)throw new Error("PRWM decoder: Indices type must be set to 0 for non-indexed geometries");if(0!==u)throw new Error("PRWM decoder: Number of indices must be set to 0 for non-indexed geometries")}let d=8;const p={};for(let m=0;m>7&1,s=1+(r>>4&3),c=a[15&r];d++,d=4*Math.ceil(d/4);const u=l(e,c,d,s*h,o);d+=c.BYTES_PER_ELEMENT*s*h,p[n]={type:i,cardinality:s,values:u}}d=4*Math.ceil(d/4);let f=null;return i&&(f=l(e,1===s?Uint32Array:Uint16Array,d,u,o)),{version:n,attributes:p,indices:f}}(e),n=Object.keys(t.attributes),i=new r.BufferGeometry;for(let s=0;s{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.CompressedTextureLoader{constructor(e){super(e)}parse(e,t){const n=new Uint32Array(e,0,13),i={buffer:e,header:n,loadMipmaps:t};return 55727696===n[0]?function(e){const t=e.header;let n,i;const a=t[12],o=t[2],l=t[6],c=t[7],h=t[10],u=t[11];switch(o){case 0:n=2,i=r.RGB_PVRTC_2BPPV1_Format;break;case 1:n=2,i=r.RGBA_PVRTC_2BPPV1_Format;break;case 2:n=4,i=r.RGB_PVRTC_4BPPV1_Format;break;case 3:n=4,i=r.RGBA_PVRTC_4BPPV1_Format;break;default:console.error("THREE.PVRLoader: Unsupported PVR format:",o)}return e.dataPtr=52+a,e.bpp=n,e.format=i,e.width=c,e.height=l,e.numSurfaces=h,e.numMipmaps=u,e.isCubemap=6===h,s(e)}(i):559044176===n[11]?function(e){const t=e.header,n=t[0],i=t[1],a=t[2],o=t[3],l=t[4],c=t[10],h=t[12],u=24,d=255&l;let p,f;const m=c>0;25===d?(f=m?r.RGBA_PVRTC_4BPPV1_Format:r.RGB_PVRTC_4BPPV1_Format,p=4):d===u?(f=m?r.RGBA_PVRTC_2BPPV1_Format:r.RGB_PVRTC_2BPPV1_Format,p=2):console.error("THREE.PVRLoader: Unknown PVR format:",d);return e.dataPtr=n,e.bpp=p,e.format=f,e.width=a,e.height=i,e.numSurfaces=h,e.numMipmaps=o+1,e.isCubemap=6===h,s(e)}(i):void console.error("THREE.PVRLoader: Unknown PVR format.")}}function s(e){const t={mipmaps:[],width:e.width,height:e.height,format:e.format,mipmapCount:e.numMipmaps,isCubemap:e.isCubemap},n=e.buffer;let r=e.dataPtr,i=0,s=0,a=0,o=0,l=0,c=0;const h=e.bpp,u=e.numSurfaces;2===h?(a=8,o=4):(a=4,o=4),s=a*o*h/8,t.mipmaps.length=e.numMipmaps*u;let d=0;for(;d>d,p=e.height>>d;l=h/a,c=p/o,l<2&&(l=2),c<2&&(c=2),i=l*c*s;for(let s=0;s{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.DataTextureLoader{constructor(e){super(e),this.type=r.HalfFloatType}parse(e){const t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},n=function(e,t,n){t=t||1024;let r=e.pos,i=-1,s=0,a="",o=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));for(;0>(i=o.indexOf("\n"))&&s=e.byteLength||!(l=n(e)))return t(1,"no header found");if(!(c=l.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(o.valid|=1,o.programtype=c[1],o.string+=l+"\n";l=n(e),!1!==l;)if(o.string+=l+"\n","#"!==l.charAt(0)){if((c=l.match(r))&&(o.gamma=parseFloat(c[1])),(c=l.match(i))&&(o.exposure=parseFloat(c[1])),(c=l.match(s))&&(o.valid|=2,o.format=c[1]),(c=l.match(a))&&(o.valid|=4,o.height=parseInt(c[1],10),o.width=parseInt(c[2],10)),2&o.valid&&4&o.valid)break}else o.comments+=l+"\n";return 2&o.valid?4&o.valid?o:t(3,"missing image size specifier"):t(3,"missing format specifier")}(a);if(-1!==o){const e=o.width,n=o.height,l=function(e,n,r){const i=n;if(i<8||i>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(i!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");const s=new Uint8Array(4*n*r);if(!s.length)return t(4,"unable to allocate buffer space");let a=0,o=0;const l=4*i,c=new Uint8Array(4),h=new Uint8Array(l);let u=r;for(;u>0&&oe.byteLength)return t(1);if(c[0]=e[o++],c[1]=e[o++],c[2]=e[o++],c[3]=e[o++],2!=c[0]||2!=c[1]||(c[2]<<8|c[3])!=i)return t(3,"bad rgbe scanline format");let n,r=0;for(;r128;if(i&&(n-=128),0===n||r+n>l)return t(3,"bad scanline data");if(i){const t=e[o++];for(let e=0;e{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);let i;class s extends r.DataTextureLoader{constructor(e){super(e),this.type=r.HalfFloatType,this.maxRange=7}setDataType(e){return this.type=e,this}setMaxRange(e){return this.maxRange=e,this}loadCubemap(e,t,n,i){const s=new r.CubeTexture;let a=0;const o=this;function l(n){o.load(e[n],(function(e){s.images[n]=e,a++,6===a&&(s.needsUpdate=!0,t&&t(s))}),void 0,i)}for(let r=0;r>3)]>>7-((7&f)<<0)&1);l[x]=b[C],l[x+1]=b[C+1],l[x+2]=b[C+2],l[x+3]=T<_?E[T]:255}}if(2==u)for(S=0;S>2)]>>6-((3&f)<<1)&3),l[x]=b[C],l[x+1]=b[C+1],l[x+2]=b[C+2],l[x+3]=T<_?E[T]:255;if(4==u)for(S=0;S>1)]>>4-((1&f)<<2)&15),l[x]=b[C],l[x+1]=b[C+1],l[x+2]=b[C+2],l[x+3]=T<_?E[T]:255;if(8==u)for(f=0;f>>3)]>>>7-(7&D)&1))==255*A?0:255;c[P+D]=L<<24|I<<16|I<<8|I}else if(2==u)for(D=0;D>>2)]>>>6-((3&D)<<1)&3))==85*A?0:255,c[P+D]=L<<24|I<<16|I<<8|I;else if(4==u)for(D=0;D>>1)]>>>4-((1&D)<<2)&15))==17*A?0:255,c[P+D]=L<<24|I<<16|I<<8|I;else if(8==u)for(D=0;D>>2<<5));0==a;)if(a=g(e,f,1),o=g(e,f+1,2),f+=3,0!=o){if(_&&(t=n.H.W(t,p+(1<<17))),1==o&&(r=E.J,i=E.h,u=511,d=31),2==o){l=A(e,f,5)+257,c=A(e,f+5,5)+1,h=A(e,f+10,4)+4,f+=14;for(var S=1,M=0;M<38;M+=2)E.Q[M]=0,E.Q[M+1]=0;for(M=0;MS&&(S=w)}f+=3*h,y(E.Q,S),x(E.Q,S,E.u),r=E.w,i=E.d,f=v(E.u,(1<>>4;if(B>>>8==0)t[p++]=B;else{if(256==B)break;var R=p+B-254;if(B>264){var P=E.q[B-257];R=p+(P>>>3)+A(e,f,7&P),f+=7&P}var D=i[b(e,f)&d];f+=15&D;var L=D>>>4,F=E.c[L],U=(F>>>4)+g(e,f,15&F);for(f+=15&F;p>>3),N=e[O-4]|e[O-3]<<8;_&&(t=n.H.W(t,p+N)),t.set(new s(e.buffer,e.byteOffset+O,N),p),f=O+N<<3,p+=N}return t.length==p?t:t.slice(0,p)},n.H.W=function(e,t){var n=e.length;if(t<=n)return e;var r=new Uint8Array(n<<1);return r.set(e,0),r},n.H.R=function(e,t,r,i,s,a){for(var o=n.H.e,l=n.H.Z,c=0;c>>4;if(u<=15)a[c]=u,c++;else{var d=0,p=0;16==u?(p=3+o(i,s,2),s+=2,d=a[c-1]):17==u?(p=3+o(i,s,3),s+=3):18==u&&(p=11+o(i,s,7),s+=7);for(var f=c+p;c>>1;si&&(i=o),s++}for(;s>1,l=e[a+1],c=o<<4|l,h=t-l,u=e[a]<>>15-t]=c,u++},n.H.l=function(e,t){for(var r=n.H.m.r,i=15-t,s=0;s>>i}},n.H.M=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8},n.H.I=function(e,t,n){n<<=7&t;var r=t>>>3;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},n.H.e=function(e,t,n){return(e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},n.H.i=function(e,t){return(e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},n.H.m=(e=Uint16Array,t=Uint32Array,{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}),function(){for(var e=n.H.m,t=0;t<32768;t++){var r=t;r=(4278255360&(r=(4042322160&(r=(3435973836&(r=(2863311530&r)>>>1|(1431655765&r)<<1))>>>2|(858993459&r)<<2))>>>4|(252645135&r)<<4))>>>8|(16711935&r)<<8,e.r[t]=(r>>>16|r<<16)>>>17}function i(e,t,n){for(;0!=t--;)e.push(0,n)}for(t=0;t<32;t++)e.q[t]=e.S[t]<<3|e.T[t],e.c[t]=e.p[t]<<4|e.z[t];i(e._,144,8),i(e._,112,9),i(e._,24,7),i(e._,8,8),n.H.n(e._,9),n.H.A(e._,9,e.J),n.H.l(e._,9),i(e.$,32,5),n.H.n(e.$,5),n.H.A(e.$,5,e.h),n.H.l(e.$,5),i(e.Q,19,0),i(e.C,286,0),i(e.D,30,0),i(e.v,320,0)}(),n.H.N),i.decode._readInterlace=function(e,t){for(var n=t.width,r=t.height,s=i.decode._getBPP(t),a=s>>3,o=Math.ceil(n*s/8),l=new Uint8Array(r*o),c=0,h=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],p=[8,8,4,4,2,2,1],f=0;f<7;){for(var m=d[f],g=p[f],A=0,v=0,y=h[f];y>3])>>7-(7&w)&1,l[S*o+(M>>3)]|=E<<7-((7&M)<<0)),2==s&&(E=(E=e[w>>3])>>6-(7&w)&3,l[S*o+(M>>2)]|=E<<6-((3&M)<<1)),4==s&&(E=(E=e[w>>3])>>4-(7&w)&15,l[S*o+(M>>1)]|=E<<4-((1&M)<<2)),s>=8)for(var C=S*o+M*a,T=0;T>3)+T];w+=s,M+=g}_++,S+=m}A*v!=0&&(c+=v*(1+b)),f+=1}return l},i.decode._getBPP=function(e){return[1,null,3,1,2,null,4][e.ctype]*e.depth},i.decode._filterZero=function(e,t,n,r,s){var a=i.decode._getBPP(t),o=Math.ceil(r*a/8),l=i.decode._paeth;a=Math.ceil(a/8);var c,h,u=e[n],d=0;if(u>1&&(e[n]=[0,0,1][u-2]),3==u)for(d=a;d>>1)&255;for(var p=0;p>>1);for(;d>>1)}else{for(;d>8&255,e[t+1]=255&n},readUint:function(e,t){return 16777216*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3])},writeUint:function(e,t,n){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n},readASCII:function(e,t,n){for(var r="",i=0;i=0&&o>=0?(u=p*t+f<<2,d=(o+p)*i+a+f<<2):(u=(-o+p)*t-a+f<<2,d=p*i+f<<2),0==l)r[d]=e[u],r[d+1]=e[u+1],r[d+2]=e[u+2],r[d+3]=e[u+3];else if(1==l){var m=e[u+3]*(1/255),g=e[u]*m,A=e[u+1]*m,v=e[u+2]*m,y=r[d+3]*(1/255),x=r[d]*y,b=r[d+1]*y,E=r[d+2]*y,_=1-m,S=m+y*_,M=0==S?0:1/S;r[d+3]=255*S,r[d+0]=(g+x*_)*M,r[d+1]=(A+b*_)*M,r[d+2]=(v+E*_)*M}else if(2==l)m=e[u+3],g=e[u],A=e[u+1],v=e[u+2],y=r[d+3],x=r[d],b=r[d+1],E=r[d+2],m==y&&g==x&&A==b&&v==E?(r[d]=0,r[d+1]=0,r[d+2]=0,r[d+3]=0):(r[d]=g,r[d+1]=A,r[d+2]=v,r[d+3]=m);else if(3==l){if(m=e[u+3],g=e[u],A=e[u+1],v=e[u+2],y=r[d+3],x=r[d],b=r[d+1],E=r[d+2],m==y&&g==x&&A==b&&v==E)continue;if(m<220&&y>20)return!1}return!0}}();const t=i.decode(e),n=i.toRGBA8(t)[0],s=new Uint8Array(n),a=t.width*t.height*4,o=this.type===r.HalfFloatType?new Uint16Array(a):new Float32Array(a);for(let i=0;i{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new r.FileLoader(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){function t(e,t,n){for(let r=0,i=e.length;r>5&31)/31,a=(n>>10&31)/31):(i=l,s=c,a=h)}for(let l=1;l<=3;l++){const c=e+12*l,h=3*r*3+3*(l-1);f[h]=t.getFloat32(c,!0),f[h+1]=t.getFloat32(c+4,!0),f[h+2]=t.getFloat32(c+8,!0),m[h]=n,m[h+1]=u,m[h+2]=p,d&&(o[h]=i,o[h+1]=s,o[h+2]=a)}}return p.setAttribute("position",new r.BufferAttribute(f,3)),p.setAttribute("normal",new r.BufferAttribute(m,3)),d&&(p.setAttribute("color",new r.BufferAttribute(o,3)),p.hasColors=!0,p.alpha=u),p}(n):function(e){const t=new r.BufferGeometry,n=/solid([\s\S]*?)endsolid/g,i=/facet([\s\S]*?)endfacet/g;let s=0;const a=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,o=new RegExp("vertex"+a+a+a,"g"),l=new RegExp("normal"+a+a+a,"g"),c=[],h=[],u=new r.Vector3;let d,p=0,f=0,m=0;for(;null!==(d=n.exec(e));){f=m;const e=d[0];for(;null!==(d=i.exec(e));){let e=0,t=0;const n=d[0];for(;null!==(d=l.exec(n));)u.x=parseFloat(d[1]),u.y=parseFloat(d[2]),u.z=parseFloat(d[3]),t++;for(;null!==(d=o.exec(n));)c.push(parseFloat(d[1]),parseFloat(d[2]),parseFloat(d[3])),h.push(u.x,u.y,u.z),e++,m++;1!==t&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+s),3!==e&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+s),s++}const n=f,r=m-f;t.addGroup(n,r,p),p++}return t.setAttribute("position",new r.Float32BufferAttribute(c,3)),t.setAttribute("normal",new r.Float32BufferAttribute(h,3)),t}("string"!=typeof(i=e)?r.LoaderUtils.decodeText(new Uint8Array(i)):i);var i}}t.STLLoader=i},86822:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{constructor(e){super(e),this.defaultDPI=90,this.defaultUnit="px"}load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){const t=this;function n(e,t,n,r,s,a,o,l){if(0==t||0==n)return void e.lineTo(l.x,l.y);r=r*Math.PI/180,t=Math.abs(t),n=Math.abs(n);const c=(o.x-l.x)/2,h=(o.y-l.y)/2,u=Math.cos(r)*c+Math.sin(r)*h,d=-Math.sin(r)*c+Math.cos(r)*h;let p=t*t,f=n*n;const m=u*u,g=d*d,A=m/p+g/f;if(A>1){const e=Math.sqrt(A);p=(t*=e)*t,f=(n*=e)*n}const v=p*g+f*m,y=(p*f-v)/v;let x=Math.sqrt(Math.max(0,y));s===a&&(x=-x);const b=x*t*d/n,E=-x*n*u/t,_=Math.cos(r)*b-Math.sin(r)*E+(o.x+l.x)/2,S=Math.sin(r)*b+Math.cos(r)*E+(o.y+l.y)/2,M=i(1,0,(u-b)/t,(d-E)/n),w=i((u-b)/t,(d-E)/n,(-u-b)/t,(-d-E)/n)%(2*Math.PI);e.currentPath.absellipse(_,S,t,n,M,M+w,0===a,r)}function i(e,t,n,r){const i=e*n+t*r,s=Math.sqrt(e*e+t*t)*Math.sqrt(n*n+r*r);let a=Math.acos(Math.max(-1,Math.min(1,i/s)));return e*r-t*n<0&&(a=-a),a}function s(e,t){t=Object.assign({},t);let n={};if(e.hasAttribute("class")){const t=e.getAttribute("class").split(/\s/).filter(Boolean).map((e=>e.trim()));for(let e=0;e=0;e--){const i=r[e].trim();if(""===i)continue;const s=i.indexOf("("),a=i.length;if(s>0&&s=1){const e=t[0];let r=e;t.length>=2&&(r=t[1]),n.translate(e,r)}break;case"rotate":if(t.length>=1){let e=0,r=0,i=0;e=-t[0]*Math.PI/180,t.length>=3&&(r=t[1],i=t[2]),A.identity().translate(-r,-i),v.identity().rotate(e),y.multiplyMatrices(v,A),A.identity().translate(r,i),n.multiplyMatrices(A,y)}break;case"scale":if(t.length>=1){const e=t[0];let r=e;t.length>=2&&(r=t[1]),n.scale(e,r)}break;case"skewX":1===t.length&&n.set(1,Math.tan(t[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":1===t.length&&n.set(1,0,0,Math.tan(t[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":6===t.length&&n.set(t[0],t[2],t[4],t[1],t[3],t[5],0,0,1)}}t.premultiply(n)}}return t}(e);m.length>0&&t.premultiply(m[m.length-1]);return E.copy(t),m.push(t),t}(t);let c=!0,_=null;switch(t.nodeName){case"svg":break;case"style":!function(e){if(!e.sheet||!e.sheet.cssRules||!e.sheet.cssRules.length)return;for(let t=0;te.trim()));for(let e=0;e0&&(i.copy(l),t.currentPath.currentPoint.copy(i),c=!0);break;default:console.warn(e)}h=!1}return t}(t));break;case"rect":i=s(t,i),_=function(e){const t=h(e.getAttribute("x")||0),n=h(e.getAttribute("y")||0),i=h(e.getAttribute("rx")||e.getAttribute("ry")||0),s=h(e.getAttribute("ry")||e.getAttribute("rx")||0),a=h(e.getAttribute("width")),o=h(e.getAttribute("height")),l=.448084975506,c=new r.ShapePath;c.moveTo(t+i,n),c.lineTo(t+a-i,n),(0!==i||0!==s)&&c.bezierCurveTo(t+a-i*l,n,t+a,n+s*l,t+a,n+s);c.lineTo(t+a,n+o-s),(0!==i||0!==s)&&c.bezierCurveTo(t+a,n+o-s*l,t+a-i*l,n+o,t+a-i,n+o);c.lineTo(t+i,n+o),(0!==i||0!==s)&&c.bezierCurveTo(t+i*l,n+o,t,n+o-s*l,t,n+o-s);c.lineTo(t,n+s),(0!==i||0!==s)&&c.bezierCurveTo(t,n+s*l,t+i*l,n,t+i,n);return c}(t);break;case"polygon":i=s(t,i),_=function(e){function t(e,t,n){const r=h(t),a=h(n);0===s?i.moveTo(r,a):i.lineTo(r,a),s++}const n=/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,i=new r.ShapePath;let s=0;return e.getAttribute("points").replace(n,t),i.currentPath.autoClose=!0,i}(t);break;case"polyline":i=s(t,i),_=function(e){function t(e,t,n){const r=h(t),a=h(n);0===s?i.moveTo(r,a):i.lineTo(r,a),s++}const n=/(-?[\d\.?]+)[,|\s](-?[\d\.?]+)/g,i=new r.ShapePath;let s=0;return e.getAttribute("points").replace(n,t),i.currentPath.autoClose=!1,i}(t);break;case"circle":i=s(t,i),_=function(e){const t=h(e.getAttribute("cx")||0),n=h(e.getAttribute("cy")||0),i=h(e.getAttribute("r")||0),s=new r.Path;s.absarc(t,n,i,0,2*Math.PI);const a=new r.ShapePath;return a.subPaths.push(s),a}(t);break;case"ellipse":i=s(t,i),_=function(e){const t=h(e.getAttribute("cx")||0),n=h(e.getAttribute("cy")||0),i=h(e.getAttribute("rx")||0),s=h(e.getAttribute("ry")||0),a=new r.Path;a.absellipse(t,n,i,s,0,2*Math.PI);const o=new r.ShapePath;return o.subPaths.push(a),o}(t);break;case"line":i=s(t,i),_=function(e){const t=h(e.getAttribute("x1")||0),n=h(e.getAttribute("y1")||0),i=h(e.getAttribute("x2")||0),s=h(e.getAttribute("y2")||0),a=new r.ShapePath;return a.moveTo(t,n),a.lineTo(i,s),a.currentPath.autoClose=!1,a}(t);break;case"defs":case"mask":c=!1;break;case"use":i=s(t,i);const l=t.href.baseVal.substring(1),u=t.viewportElement.getElementById(l);u?e(u,i):console.warn("SVGLoader: 'use node' references non-existent node id: "+l)}if(_&&(void 0!==i.fill&&"none"!==i.fill&&_.color.setStyle(i.fill),function(e,t){function n(e){b.set(e.x,e.y,1).applyMatrix3(t),e.set(b.x,b.y)}const r=function(e){return 0!==e.elements[1]||0!==e.elements[3]}(t),i=e.subPaths;for(let s=0,a=i.length;s0?E.copy(m[m.length-1]):E.identity())}(_.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4});return{paths:p,xml:_.documentElement}}static createShapes(e){const t=999999999,n=0,i=1,s=2,a=3,o=4,l=5,c=6,h={loc:n,t:0};function u(e,t,r,i){const a=e.x,o=t.x,l=r.x,c=i.x,u=e.y,p=t.y,f=r.y,m=i.y,g=(c-l)*(u-f)-(m-f)*(a-l),A=(m-f)*(o-a)-(c-l)*(p-u),v=g/A,y=((o-a)*(u-f)-(p-u)*(a-l))/A;if(0===A&&0!==g||v<=0||v>=1||y<0||y>1)return null;if(0===g&&0===A){for(let l=0;l<2;l++){if(d(0===l?r:i,e,t),h.loc==n){const e=0===l?r:i;return{x:e.x,y:e.y,t:h.t}}if(h.loc==s){return{x:+(a+h.t*(o-a)).toPrecision(10),y:+(u+h.t*(p-u)).toPrecision(10),t:h.t}}}return null}for(let s=0;s<2;s++)if(d(0===s?r:i,e,t),h.loc==n){const e=0===s?r:i;return{x:e.x,y:e.y,t:h.t}}return{x:+(a+v*(o-a)).toPrecision(10),y:+(u+v*(p-u)).toPrecision(10),t:v}}function d(e,t,r){const u=r.x-t.x,d=r.y-t.y,p=e.x-t.x,f=e.y-t.y,m=u*f-p*d;if(e.x===t.x&&e.y===t.y)return h.loc=n,void(h.t=0);if(e.x===r.x&&e.y===r.y)return h.loc=i,void(h.t=1);if(m<-Number.EPSILON)return void(h.loc=a);if(m>Number.EPSILON)return void(h.loc=o);if(u*p<0||d*f<0)return void(h.loc=l);if(Math.sqrt(u*u+d*d){if(t.boundingBox.containsPoint(i)){(function(e,t){const n=[],i=[];for(let s=1;se.t<=s.t+Number.EPSILON&&e.t>=s.t-Number.EPSILON))&&(n.push(s),i.push(new r.Vector2(s.x,s.y)))}}return i})(e,t.points).forEach((e=>{s.push({identifier:t.identifier,isCW:t.isCW,point:e})}))}})),s.sort(((e,t)=>e.point.x-t.point.x)),s}let f=0,m=t,g=-999999999,A=e.subPaths.map((e=>{const n=e.getPoints();let i=-999999999,s=t,a=-999999999,o=t;for(let t=0;ti&&(i=e.y),e.ya&&(a=e.x),e.x=o&&(m=o-1),{curves:e.curves,points:n,isCW:r.ShapeUtils.isClockWise(n),identifier:f++,boundingBox:new r.Box2(new r.Vector2(o,s),new r.Vector2(a,i))}}));A=A.filter((e=>e.points.length>1));const v=A.map((t=>function(e,t,n,i,s){null!=s&&""!==s||(s="nonzero");const a=new r.Vector2;e.boundingBox.getCenter(a);const o=p([new r.Vector2(n,a.y),new r.Vector2(i,a.y)],e.boundingBox,t);o.sort(((e,t)=>e.point.x-t.point.x));const l=[],c=[];o.forEach((t=>{t.identifier===e.identifier?l.push(t):c.push(t)}));const h=l[0].point.x,u=[];let d=0;for(;d0&&u[u.length-1]===c[d].identifier?u.pop():u.push(c[d].identifier),d++;if(u.push(e.identifier),"evenodd"===s){const t=u.length%2==0,n=u[u.length-2];return{identifier:e.identifier,isHole:t,for:n}}if("nonzero"===s){let n=!0,r=null,i=null;for(let e=0;e{if(!v[e.identifier].isHole){const t=new r.Shape;t.curves=e.curves;v.filter((t=>t.isHole&&t.for===e.identifier)).forEach((e=>{const n=A[e.identifier],i=new r.Path;i.curves=n.curves,t.holes.push(i)})),y.push(t)}})),y}static getStrokeStyle(e,t,n,r,i){return{strokeColor:t=void 0!==t?t:"#000",strokeWidth:e=void 0!==e?e:1,strokeLineJoin:n=void 0!==n?n:"miter",strokeLineCap:r=void 0!==r?r:"butt",strokeMiterLimit:i=void 0!==i?i:4}}static pointsToStroke(e,t,n,s){const a=[],o=[],l=[];if(0===i.pointsToStrokeWithBuffers(e,t,n,s,a,o,l))return null;const c=new r.BufferGeometry;return c.setAttribute("position",new r.Float32BufferAttribute(a,3)),c.setAttribute("normal",new r.Float32BufferAttribute(o,3)),c.setAttribute("uv",new r.Float32BufferAttribute(l,2)),c}static pointsToStrokeWithBuffers(e,t,n,i,s,a,o,l){const c=new r.Vector2,h=new r.Vector2,u=new r.Vector2,d=new r.Vector2,p=new r.Vector2,f=new r.Vector2,m=new r.Vector2,g=new r.Vector2,A=new r.Vector2,v=new r.Vector2,y=new r.Vector2,x=new r.Vector2,b=new r.Vector2,E=new r.Vector2,_=new r.Vector2,S=new r.Vector2,M=new r.Vector2;n=void 0!==n?n:12,i=void 0!==i?i:.001,l=void 0!==l?l:0;const w=(e=function(e){let t=!1;for(let r=1,s=e.length-1;r=i&&n.push(e[r]);return n.push(e[e.length-1]),n}(e)).length;if(w<2)return 0;const C=e[0].equals(e[w-1]);let T,I,B=e[0];const R=t.strokeWidth/2,P=1/(w-1);let D,L,F,U,O=0,N=!1,k=0,G=3*l,z=2*l;Q(e[0],e[1],c).multiplyScalar(R),g.copy(e[0]).sub(c),A.copy(e[0]).add(c),v.copy(g),y.copy(A);for(let r=1;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{constructor(e){super(e),this.debug=!1,this.group=null,this.position=0,this.materials=[],this.meshes=[]}load(e,t,n,i){const s=this,a=""===this.path?r.LoaderUtils.extractUrlBase(e):this.path,o=new r.FileLoader(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(s.parse(n,a))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e,t){this.group=new r.Group,this.position=0,this.materials=[],this.meshes=[],this.readFile(e,t);for(let n=0;n=t.end)return 0;this.position=t.cur;try{const n=this.readChunk(e);return t.cur+=n.size,n.id}catch(n){return this.debugMessage("Unable to read chunk at "+this.position),0}}resetPosition(){this.position-=6}readByte(e){const t=e.getUint8(this.position,!0);return this.position+=1,t}readFloat(e){try{const t=e.getFloat32(this.position,!0);return this.position+=4,t}catch(t){this.debugMessage(t+" "+this.position+" "+e.byteLength)}}readInt(e){const t=e.getInt32(this.position,!0);return this.position+=4,t}readShort(e){const t=e.getInt16(this.position,!0);return this.position+=2,t}readDWord(e){const t=e.getUint32(this.position,!0);return this.position+=4,t}readWord(e){const t=e.getUint16(this.position,!0);return this.position+=2,t}readString(e,t){let n="";for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.DataTextureLoader{constructor(e){super(e)}parse(e){const t=0,n=1,i=2,s=3,a=9,o=10,l=11,c=48,h=4,u=0,d=1,p=2,f=3;e.length<19&&console.error("THREE.TGALoader: Not enough data to contain header.");let m=0;const g=new Uint8Array(e),A={id_length:g[m++],colormap_type:g[m++],image_type:g[m++],colormap_index:g[m++]|g[m++]<<8,colormap_length:g[m++]|g[m++]<<8,colormap_size:g[m++],origin:[g[m++]|g[m++]<<8,g[m++]|g[m++]<<8],width:g[m++]|g[m++]<<8,height:g[m++]|g[m++]<<8,pixel_size:g[m++],flags:g[m++]};!function(e){switch(e.image_type){case n:case a:(e.colormap_length>256||24!==e.colormap_size||1!==e.colormap_type)&&console.error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case i:case s:case o:case l:e.colormap_type&&console.error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case t:console.error("THREE.TGALoader: No data.");default:console.error('THREE.TGALoader: Invalid type "%s".',e.image_type)}(e.width<=0||e.height<=0)&&console.error("THREE.TGALoader: Invalid image size."),8!==e.pixel_size&&16!==e.pixel_size&&24!==e.pixel_size&&32!==e.pixel_size&&console.error('THREE.TGALoader: Invalid pixel size "%s".',e.pixel_size)}(A),A.id_length+m>e.length&&console.error("THREE.TGALoader: No data."),m+=A.id_length;let v=!1,y=!1,x=!1;switch(A.image_type){case a:v=!0,y=!0;break;case n:y=!0;break;case o:v=!0;break;case i:break;case l:v=!0,x=!0;break;case s:x=!0}const b=new Uint8Array(A.width*A.height*4),E=function(e,t,n,r,i){let s,a;const o=n.pixel_size>>3,l=n.width*n.height*o;if(t&&(a=i.subarray(r,r+=n.colormap_length*(n.colormap_size>>3))),e){let e,t,n;s=new Uint8Array(l);let a=0;const c=new Uint8Array(o);for(;a>h){default:case p:s=0,o=1,m=t,a=0,l=1,g=n;break;case u:s=0,o=1,m=t,a=n-1,l=-1,g=-1;break;case f:s=t-1,o=-1,m=-1,a=0,l=1,g=n;break;case d:s=t-1,o=-1,m=-1,a=n-1,l=-1,g=-1}if(x)switch(A.pixel_size){case 8:!function(e,t,n,r,i,s,a,o){let l,c,h,u=0;const d=A.width;for(h=t;h!==r;h+=n)for(c=i;c!==a;c+=s,u++)l=o[u],e[4*(c+d*h)+0]=l,e[4*(c+d*h)+1]=l,e[4*(c+d*h)+2]=l,e[4*(c+d*h)+3]=255}(e,a,l,g,s,o,m,r);break;case 16:!function(e,t,n,r,i,s,a,o){let l,c,h=0;const u=A.width;for(c=t;c!==r;c+=n)for(l=i;l!==a;l+=s,h+=2)e[4*(l+u*c)+0]=o[h+0],e[4*(l+u*c)+1]=o[h+0],e[4*(l+u*c)+2]=o[h+0],e[4*(l+u*c)+3]=o[h+1]}(e,a,l,g,s,o,m,r);break;default:console.error("THREE.TGALoader: Format not supported.")}else switch(A.pixel_size){case 8:!function(e,t,n,r,i,s,a,o,l){const c=l;let h,u,d,p=0;const f=A.width;for(d=t;d!==r;d+=n)for(u=i;u!==a;u+=s,p++)h=o[p],e[4*(u+f*d)+3]=255,e[4*(u+f*d)+2]=c[3*h+0],e[4*(u+f*d)+1]=c[3*h+1],e[4*(u+f*d)+0]=c[3*h+2]}(e,a,l,g,s,o,m,r,i);break;case 16:!function(e,t,n,r,i,s,a,o){let l,c,h,u=0;const d=A.width;for(h=t;h!==r;h+=n)for(c=i;c!==a;c+=s,u+=2)l=o[u+0]+(o[u+1]<<8),e[4*(c+d*h)+0]=(31744&l)>>7,e[4*(c+d*h)+1]=(992&l)>>2,e[4*(c+d*h)+2]=(31&l)>>3,e[4*(c+d*h)+3]=32768&l?0:255}(e,a,l,g,s,o,m,r);break;case 24:!function(e,t,n,r,i,s,a,o){let l,c,h=0;const u=A.width;for(c=t;c!==r;c+=n)for(l=i;l!==a;l+=s,h+=3)e[4*(l+u*c)+3]=255,e[4*(l+u*c)+2]=o[h+0],e[4*(l+u*c)+1]=o[h+1],e[4*(l+u*c)+0]=o[h+2]}(e,a,l,g,s,o,m,r);break;case 32:!function(e,t,n,r,i,s,a,o){let l,c,h=0;const u=A.width;for(c=t;c!==r;c+=n)for(l=i;l!==a;l+=s,h+=4)e[4*(l+u*c)+2]=o[h+0],e[4*(l+u*c)+1]=o[h+1],e[4*(l+u*c)+0]=o[h+2],e[4*(l+u*c)+3]=o[h+3]}(e,a,l,g,s,o,m,r);break;default:console.error("THREE.TGALoader: Format not supported.")}}(b,A.width,A.height,E.pixel_data,E.palettes),{data:b,width:A.width,height:A.height,flipY:!0,generateMipmaps:!0,minFilter:r.LinearMipmapLinearFilter}}}t.TGALoader=i},71892:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(74020);class s extends r.Loader{constructor(e){super(e),this.reversed=!1}load(e,t,n,s){const a=this,o=new r.FileLoader(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(i.parse(n))}catch(r){s?s(r):console.error(r),a.manager.itemError(e)}}),n,s)}parse(e){function t(e){const t=[];let n;e.forEach((function(e){"m"===e.type.toLowerCase()?(n=[e],t.push(n)):"z"!==e.type.toLowerCase()&&n.push(e)}));const r=[];return t.forEach((function(e){const t={type:"m",x:e[e.length-1].x,y:e[e.length-1].y};r.push(t);for(let n=e.length-1;n>0;n--){const t=e[n],i={type:t.type};void 0!==t.x2&&void 0!==t.y2?(i.x1=t.x2,i.y1=t.y2,i.x2=t.x1,i.y2=t.y1):void 0!==t.x1&&void 0!==t.y1&&(i.x1=t.x1,i.y1=t.y1),i.x=e[n-1].x,i.y=e[n-1].y,r.push(i)}})),r}return function(e,n){const r=Math.round,i={},s=1e5/(72*(e.unitsPerEm||2048)),a=e.encoding.cmap.glyphIndexMap,o=Object.keys(a);for(let l=0;l{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(91952);class s extends r.Loader{load(e,t,n,i){const s=this,a=new r.FileLoader(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){const t=new r.Group,n=i.unzipSync(new Uint8Array(e.slice(16))),s=JSON.parse(i.strFromU8(n["metadata.json"])),o=new DataView(n["data.sketch"].buffer),l=o.getInt32(16,!0),c={};let u=20;for(let r=0;r0&&(s+=4),(i&e)>0&&(a+=4)}u=u+28+s+4;const l=o.getInt32(u,!0),h=new Float32Array(3*l),d=new Float32Array(4*l);u+=4;for(let c=0,p=0;c({Light:{uniforms:{mainTex:{value:(new r.TextureLoader).setPath("./textures/tiltbrush/").loader.load("Light.webp")},alphaTest:{value:.067},emission_gain:{value:.45},alpha:{value:1}},vertexShader:`\n\t\t\tprecision highp float;\n\t\t\tprecision highp int;\n\n\t\t\tattribute vec2 uv;\n\t\t\tattribute vec4 color;\n\t\t\tattribute vec3 position;\n\n\t\t\tuniform mat4 modelMatrix;\n\t\t\tuniform mat4 modelViewMatrix;\n\t\t\tuniform mat4 projectionMatrix;\n\t\t\tuniform mat4 viewMatrix;\n\t\t\tuniform mat3 normalMatrix;\n\t\t\tuniform vec3 cameraPosition;\n\n\t\t\tvarying vec2 vUv;\n\t\t\tvarying vec3 vColor;\n\n\t\t\t${l.LinearToSrgb}\n\t\t\t${l.hsv}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvUv = uv;\n\n\t\t\t\tvColor = lookup(color.rgb);\n\n\t\t\t\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n\t\t\t\tgl_Position = projectionMatrix * mvPosition;\n\n\t\t\t}\n\t\t`,fragmentShader:`\n\t\t\tprecision highp float;\n\t\t\tprecision highp int;\n\n\t\t\tuniform float emission_gain;\n\n\t\t\tuniform sampler2D mainTex;\n\t\t\tuniform float alphaTest;\n\n\t\t\tvarying vec2 vUv;\n\t\t\tvarying vec3 vColor;\n\n\t\t\t${l.BloomColor}\n\t\t\t${l.SrgbToLinear}\n\n\t\t\tvoid main(){\n\t\t\t\tvec4 col = texture2D(mainTex, vUv);\n\t\t\t\tvec3 color = vColor;\n\t\t\t\tcolor = BloomColor(color, emission_gain);\n\t\t\t\tcolor = color * col.rgb;\n\t\t\t\tcolor = color * col.a;\n\t\t\t\tcolor = SrgbToLinear(color);\n\t\t\t\tgl_FragColor = vec4(color, 1.0);\n\t\t\t}\n\t\t`,side:2,transparent:!0,depthFunc:2,depthWrite:!0,depthTest:!1,blending:5,blendDst:201,blendDstAlpha:201,blendEquation:100,blendEquationAlpha:100,blendSrc:201,blendSrcAlpha:201}});function h(e){return"Light"===o[e]?new r.RawShaderMaterial(c().Light):new r.MeshBasicMaterial({vertexColors:!0,side:r.DoubleSide})}t.TiltLoader=s},14528:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(1192);class s extends r.Loader{load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setResponseType("arraybuffer"),a.setRequestHeader(s.requestHeader),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){const t=new DataView(e),n=t.getUint32(0,!0),r=t.getUint32(4,!0);if(542658390!==n||150!==r)return void console.error("Not a valid VOX file");const i=[0,4294967295,4291624959,4288282623,4284940287,4281597951,4278255615,4294954239,4291611903,4288269567,4284927231,4281584895,4278242559,4294941183,4291598847,4288256511,4284914175,4281571839,4278229503,4294928127,4291585791,4288243455,4284901119,4281558783,4278216447,4294915071,4291572735,4288230399,4284888063,4281545727,4278203391,4294902015,4291559679,4288217343,4284875007,4281532671,4278190335,4294967244,4291624908,4288282572,4284940236,4281597900,4278255564,4294954188,4291611852,4288269516,4284927180,4281584844,4278242508,4294941132,4291598796,4288256460,4284914124,4281571788,4278229452,4294928076,4291585740,4288243404,4284901068,4281558732,4278216396,4294915020,4291572684,4288230348,4284888012,4281545676,4278203340,4294901964,4291559628,4288217292,4284874956,4281532620,4278190284,4294967193,4291624857,4288282521,4284940185,4281597849,4278255513,4294954137,4291611801,4288269465,4284927129,4281584793,4278242457,4294941081,4291598745,4288256409,4284914073,4281571737,4278229401,4294928025,4291585689,4288243353,4284901017,4281558681,4278216345,4294914969,4291572633,4288230297,4284887961,4281545625,4278203289,4294901913,4291559577,4288217241,4284874905,4281532569,4278190233,4294967142,4291624806,4288282470,4284940134,4281597798,4278255462,4294954086,4291611750,4288269414,4284927078,4281584742,4278242406,4294941030,4291598694,4288256358,4284914022,4281571686,4278229350,4294927974,4291585638,4288243302,4284900966,4281558630,4278216294,4294914918,4291572582,4288230246,4284887910,4281545574,4278203238,4294901862,4291559526,4288217190,4284874854,4281532518,4278190182,4294967091,4291624755,4288282419,4284940083,4281597747,4278255411,4294954035,4291611699,4288269363,4284927027,4281584691,4278242355,4294940979,4291598643,4288256307,4284913971,4281571635,4278229299,4294927923,4291585587,4288243251,4284900915,4281558579,4278216243,4294914867,4291572531,4288230195,4284887859,4281545523,4278203187,4294901811,4291559475,4288217139,4284874803,4281532467,4278190131,4294967040,4291624704,4288282368,4284940032,4281597696,4278255360,4294953984,4291611648,4288269312,4284926976,4281584640,4278242304,4294940928,4291598592,4288256256,4284913920,4281571584,4278229248,4294927872,4291585536,4288243200,4284900864,4281558528,4278216192,4294914816,4291572480,4288230144,4284887808,4281545472,4278203136,4294901760,4291559424,4288217088,4284874752,4281532416,4278190318,4278190301,4278190267,4278190250,4278190216,4278190199,4278190165,4278190148,4278190114,4278190097,4278251008,4278246656,4278237952,4278233600,4278224896,4278220544,4278211840,4278207488,4278198784,4278194432,4293787648,4292673536,4290445312,4289331200,4287102976,4285988864,4283760640,4282646528,4280418304,4279304192,4293848814,4292730333,4290493371,4289374890,4287137928,4286019447,4283782485,4282664004,4280427042,4279308561];let s,a=8;const o=[];for(;a>0&255)/255,x=(v>>8&255)/255,b=(v>>16&255)/255;(y>0||x>0||b>0)&&(A=!0);const E=e+s*f+a*m;0!==g[E+1]&&e!==n.x-1||p(l,e,a,-s,y,x,b),0!==g[E-1]&&0!==e||p(o,e,a,-s,y,x,b),0!==g[E+f]&&s!==n.y-1||p(h,e,a,-s,y,x,b),0!==g[E-f]&&0!==s||p(c,e,a,-s,y,x,b),0!==g[E+m]&&a!==n.z-1||p(d,e,a,-s,y,x,b),0!==g[E-m]&&0!==a||p(u,e,a,-s,y,x,b)}const v=new r.BufferGeometry;v.setAttribute("position",new r.Float32BufferAttribute(s,3)),v.computeVertexNormals();const y=new r.MeshStandardMaterial;A&&(v.setAttribute("color",new r.Float32BufferAttribute(a,3)),y.vertexColors=!0),super(v,y)}}class o extends i.Data3DTexture{constructor(e){const t=e.data,n=e.size,i=n.x,s=n.x*n.y,a=new Uint8Array(n.x*n.y*n.z);for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(99444);class s extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=""===s.path?r.LoaderUtils.extractUrlBase(e):s.path,o=new r.FileLoader(s.manager);o.setPath(s.path),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,(function(n){try{t(s.parse(n,a))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e,t){const n={};function s(e){e.DEF&&(n[e.DEF]=e);const t=e.fields;for(let n=0,r=t.length;n3?(L(e,l,s,D(a),!0),n.vertexColors=!0):n.color.setRGB(a[0],a[1],a[2]);const i=new r.Mesh(e,n);t.add(i)}if(i&&i.length>0){const e=new r.SphereGeometry(l,32,16,0,2*Math.PI,.5*Math.PI,1.5*Math.PI),s=new r.MeshBasicMaterial({fog:!1,side:r.BackSide,vertexColors:!0,depthWrite:!1,depthTest:!1});L(e,l,n,D(i),!1);const a=new r.Mesh(e,s);t.add(a)}return t.renderOrder=-1/0,t}(e);break;case"Shape":n=function(e){const t=e.fields;let n,i,s=new r.MeshBasicMaterial({color:0});for(let r=0,a=t.length;r0&&(n.transparent=!0)}else n=new r.MeshBasicMaterial({color:0});break;case"texture":const e=o[0];null!==e&&("ImageTexture"!==e.name&&"PixelTexture"!==e.name||(n.map=h(e)));break;case"textureTransform":null!==o[0]&&(t=h(o[0]));break;default:console.warn("THREE.VRMLLoader: Unknown field:",a)}}if(n.map){if(n.map.__type){switch(n.map.__type){case c.INTENSITY_ALPHA:n.opacity=1;break;case c.RGB:n.color.set(16777215);break;case c.RGBA:n.color.set(16777215),n.opacity=1}delete n.map.__type}t&&(n.map.center.copy(t.center),n.map.rotation=t.rotation,n.map.repeat.copy(t.scale),n.map.offset.copy(t.translation))}return n}(e);break;case"Material":n=function(e){const t={},n=e.fields;for(let i=0,s=n.length;i0){b=M(x,f(a,u),t,3)}else b=T(x,new r.Float32BufferAttribute(t,3));else if(a&&a.length>0){b=w(x,m(g(t,a),o))}else{b=w(x,m(t,o))}if(i)if(!0===v)if(l&&l.length>0){E=M(x,f(l,u),i,3)}else E=T(x,new r.Float32BufferAttribute(i,3));else if(l&&l.length>0){E=w(x,m(g(i,l),o))}else{E=w(x,m(i,o))}else E=R(x,n,p);if(s)if(c&&c.length>0){_=M(x,f(c,u),s,2)}else _=T(x,new r.Float32BufferAttribute(s,2));const S=new r.BufferGeometry,C=T(x,new r.Float32BufferAttribute(n,3));S.setAttribute("position",C),S.setAttribute("normal",E),b&&S.setAttribute("color",b);_&&S.setAttribute("uv",_);return S._solid=d,S._type="mesh",S}(e);break;case"IndexedLineSet":n=function(e){let t,n,i,s,a=!0;const o=e.fields;for(let r=0,p=o.length;r0){l=M(c,A(i),t,3)}else l=T(c,new r.Float32BufferAttribute(t,3));else if(i.length>0){l=C(c,v(g(t,i),s))}else{l=C(c,v(t,s))}const u=new r.BufferGeometry,d=T(c,new r.Float32BufferAttribute(n,3));u.setAttribute("position",d),l&&u.setAttribute("color",l);return u._type="line",u}(e);break;case"PointSet":n=function(e){let t,n;const i=e.fields;for(let r=0,a=i.length;r=s)&&(i+=3,r=i+1)}return n}function m(e,t){const n=[];let r=0;for(let i=0,s=t.length;i=s)&&(i+=3,r++)}return n}function g(e,t){const n=[];for(let r=0,i=t.length;r=r)&&(n+=2)}return t}function v(e,t){const n=[];let r=0;for(let i=0,s=t.length;i=s)&&(i+=2,r++)}return n}const y=new r.Vector3,x=new r.Vector3,b=new r.Vector3,E=new r.Vector2,_=new r.Vector2,S=new r.Vector2;function M(e,t,n,i){const s=[];for(let r=0,a=e.length;ri.y){o=Math.abs(e.y-u.y)/Math.abs(e.y-i.y);break}}else if(u.y>=e.y&&u.y0)throw console.error(r.errors),Error("THREE.VRMLLoader: Parsing errors detected.");return s.visit(c)}(e))}}class a{constructor(e){this.lexer=new i.Lexer(e)}lex(e){const t=this.lexer.tokenize(e);if(t.errors.length>0)throw console.error(t.errors),Error("THREE.VRMLLexer: Lexing errors detected.");return t}}class o extends i.CstParser{constructor(e){super(e);const t=this,n=e.Version,r=e.LCurly,i=e.RCurly,s=e.LSquare,a=e.RSquare,o=e.Identifier,l=e.RouteIdentifier,c=e.StringLiteral,h=e.HexLiteral,u=e.NumberLiteral,d=e.TrueLiteral,p=e.FalseLiteral,f=e.NullLiteral,m=e.DEF,g=e.USE,A=e.ROUTE,v=e.TO,y=e.NodeName;t.RULE("vrml",(function(){t.SUBRULE(t.version),t.AT_LEAST_ONE((function(){t.SUBRULE(t.node)})),t.MANY((function(){t.SUBRULE(t.route)}))})),t.RULE("version",(function(){t.CONSUME(n)})),t.RULE("node",(function(){t.OPTION((function(){t.SUBRULE(t.def)})),t.CONSUME(y),t.CONSUME(r),t.MANY((function(){t.SUBRULE(t.field)})),t.CONSUME(i)})),t.RULE("field",(function(){t.CONSUME(o),t.OR2([{ALT:function(){t.SUBRULE(t.singleFieldValue)}},{ALT:function(){t.SUBRULE(t.multiFieldValue)}}])})),t.RULE("def",(function(){t.CONSUME(m),t.OR([{ALT:function(){t.CONSUME(o)}},{ALT:function(){t.CONSUME(y)}}])})),t.RULE("use",(function(){t.CONSUME(g),t.OR([{ALT:function(){t.CONSUME(o)}},{ALT:function(){t.CONSUME(y)}}])})),t.RULE("singleFieldValue",(function(){t.AT_LEAST_ONE((function(){t.OR([{ALT:function(){t.SUBRULE(t.node)}},{ALT:function(){t.SUBRULE(t.use)}},{ALT:function(){t.CONSUME(c)}},{ALT:function(){t.CONSUME(h)}},{ALT:function(){t.CONSUME(u)}},{ALT:function(){t.CONSUME(d)}},{ALT:function(){t.CONSUME(p)}},{ALT:function(){t.CONSUME(f)}}])}))})),t.RULE("multiFieldValue",(function(){t.CONSUME(s),t.MANY((function(){t.OR([{ALT:function(){t.SUBRULE(t.node)}},{ALT:function(){t.SUBRULE(t.use)}},{ALT:function(){t.CONSUME(c)}},{ALT:function(){t.CONSUME(h)}},{ALT:function(){t.CONSUME(u)}},{ALT:function(){t.CONSUME(f)}}])})),t.CONSUME(a)})),t.RULE("route",(function(){t.CONSUME(A),t.CONSUME(l),t.CONSUME(v),t.CONSUME2(l)})),this.performSelfAnalysis()}}class l{constructor(e,t,n){this.a=e,this.b=t,this.c=n,this.normal=new r.Vector3}}const c={INTENSITY:1,INTENSITY_ALPHA:2,RGB:3,RGBA:4};t.VRMLLoader=s},74416:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(61272);class s extends r.Loader{constructor(e){super(e),this.gltfLoader=new i.GLTFLoader(e)}load(e,t,n,r){const i=this;this.gltfLoader.load(e,(function(n){try{i.parse(n,t)}catch(s){r?r(s):console.error(s),i.manager.itemError(e)}}),n,r)}setDRACOLoader(e){return this.gltfLoader.setDRACOLoader(e),this}parse(e,t){t(e)}}t.VRMLoader=s},66448:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(91952);class s extends r.Loader{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new r.FileLoader(s.manager);a.setPath(s.path),a.setResponseType("arraybuffer"),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){function t(e,t){const n=e.length,r=new Float32Array(n+t.length);return r.set(e),r.set(t,n),r}var n=r.LoaderUtils.decodeText(new Uint8Array(e,0,250)).split("\n");return-1!==n[0].indexOf("xml")?function(e){function n(e){var t,n,r,i,s,a,o="undefined"!=typeof Uint8Array?Uint8Array:Array,l=[],c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=64;for(t=0;t0)throw new Error("Invalid string. Length must be a multiple of 4");a=new o(3*h/4-(s="="===e[h-2]?2:"="===e[h-1]?1:0)),r=s>0?h-4:h;var u=0;for(t=0,n=0;t>16,a[u++]=(65280&i)>>8,a[u++]=255&i;return 2===s?(i=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,a[u++]=255&i):1===s&&(i=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}function s(e,r){var s,a,l,c,h=0;if("UInt64"===o.attributes.header_type?h=8:"UInt32"===o.attributes.header_type&&(h=4),"binary"===e.attributes.format&&r){var u,d,p,f,m,g;if("Float32"===e.attributes.type)var A=new Float32Array;else"Int64"===e.attributes.type&&(A=new Int32Array);d=(u=n(e["#text"]))[0];for(var v=1;v0?3-f%3:0,(m=[]).push(g),p=3*h,v=0;v0){n.attributes={};for(var r=0;r0&&(A[v].text=s(A[v],d)),v++;switch(p[f]){case"PointData":var x=parseInt(u.attributes.NumberOfPoints),b=g.attributes.Normals;if(x>0)for(var E=0,_=A.length;E<_;E++)if(b===A[E].attributes.Name){var S=A[E].attributes.NumberOfComponents;(c=new Float32Array(x*S)).set(A[E].text,0)}break;case"Points":(x=parseInt(u.attributes.NumberOfPoints))>0&&(S=g.DataArray.attributes.NumberOfComponents,(l=new Float32Array(x*S)).set(g.DataArray.text,0));break;case"Strips":var M=parseInt(u.attributes.NumberOfStrips);if(M>0){var w=new Int32Array(g.DataArray[0].text.length),C=new Int32Array(g.DataArray[1].text.length);w.set(g.DataArray[0].text,0),C.set(g.DataArray[1].text,0);var T=M+w.length;h=new Uint32Array(3*T-9*M);var I=0;for(E=0,_=M;E<_;E++){for(var B=[],R=0,P=C[E],D=0;R0&&(D=C[E-1]);var L=0;for(P=C[E],D=0;L0&&(D=C[E-1])}}break;case"Polys":var F=parseInt(u.attributes.NumberOfPolys);if(F>0){w=new Int32Array(g.DataArray[0].text.length),C=new Int32Array(g.DataArray[1].text.length),w.set(g.DataArray[0].text,0),C.set(g.DataArray[1].text,0),T=F+w.length,h=new Uint32Array(3*T-9*F),I=0;var U=0;for(E=0,_=F,D=0;E<_;){var O=[];for(R=0,P=C[E];R=3)for(var D=parseInt(P[0]),L=1,F=0;F=3)for(F=0;F=c.byteLength)break}var _=new r.BufferGeometry;return _.setIndex(new r.BufferAttribute(p,1)),_.setAttribute("position",new r.BufferAttribute(u,3)),d.length===u.length&&_.setAttribute("normal",new r.BufferAttribute(d,3)),_}(e)}}t.VTKLoader=s},12788:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);var s,a,o,l,c,h,u=(s=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=function(){function e(e,t){for(let r=0;r1&&void 0!==arguments[1]?arguments[1]:0;t-1&&n<2))break;var r=-1;t=(r=e.indexOf("\r\n",t))>0?r+2:(r=e.indexOf("\r",t))>0?r+1:e.indexOf("\n",t)+1}return e.substr(t)}},{key:"_readLine",value:function(e){for(var t=0;;){var n=-1;if(-1===(n=e.indexOf("//",t))&&(n=e.indexOf("#",t)),!(n>-1&&n<2))break;var r=-1;t=(r=e.indexOf("\r\n",t))>0?r+2:(r=e.indexOf("\r",t))>0?r+1:e.indexOf("\n",t)+1}return e.substr(t)}},{key:"_isBinary",value:function(e){var t=new DataView(e);if(84+50*t.getUint32(80,!0)===t.byteLength)return!0;var n=t.byteLength;for(let r=0;r127)return!0;return!1}},{key:"_ensureBinary",value:function(e){if("string"==typeof e){var t=new Uint8Array(e.length);for(let n=0;n0&&i>r)){n=-1===r?this._data.length:i+1;break}var a={children:[]},o=this._readLine(this._data.substr(n,r-n-1)).trim(),l=o.split(/ /g);if(l.length>0?(a.type=l[0],l.length>=2?a.name=l[1]:a.name=l[0]+this.Hierarchies.children.length):(a.name=o,a.type=""),"Animation"===a.type){a.data=this._data.substr(s,i-s).trim();var c=this._hierarchieParse(a,i+1);n=c.end,a.children=c.parent.children}else{var h=this._data.lastIndexOf(";",s>0?Math.min(s,i):i);if(a.data=this._data.substr(r,h-r).trim(),s<=0||i0||!this._currentObject.worked?setTimeout((function(){e._mainloop()}),1):setTimeout((function(){e.onLoad({models:e.Meshes,animations:e.animations})}),1)}},{key:"_mainProc",value:function(){for(var e=!1;;){if(!this._currentObject.worked){switch(this._currentObject.type){case"template":case"VertexDuplicationIndices":break;case"AnimTicksPerSecond":this.animTicksPerSecond=parseInt(this._currentObject.data);break;case"Frame":this._setFrame();break;case"FrameTransformMatrix":this._setFrameTransformMatrix();break;case"Mesh":this._changeRoot(),this._currentGeo={},this._currentGeo.name=this._currentObject.name.trim(),this._currentGeo.parentName=this._getParentName(this._currentObject).trim(),this._currentGeo.VertexSetedBoneCount=[],this._currentGeo.GeometryData={vertices:[],normals:[],uvs:[],skinIndices:[],skinWeights:[],indices:[],materialIndices:[]},this._currentGeo.Materials=[],this._currentGeo.normalVectors=[],this._currentGeo.BoneInfs=[],this._currentGeo.baseFrame=this._currentFrame,this._makeBoneFrom_CurrentFrame(),this._readVertexDatas(),e=!0;break;case"MeshNormals":this._readVertexDatas();break;case"MeshTextureCoords":this._setMeshTextureCoords();break;case"MeshMaterialList":this._setMeshMaterialList();break;case"Material":this._setMaterial();break;case"SkinWeights":this._setSkinWeights();break;case"AnimationSet":this._changeRoot(),this._currentAnime={},this._currentAnime.name=this._currentObject.name.trim(),this._currentAnime.AnimeFrames=[];break;case"Animation":this._currentAnimeFrames&&this._currentAnime.AnimeFrames.push(this._currentAnimeFrames),this._currentAnimeFrames=new l,this._currentAnimeFrames.boneName=this._currentObject.data.trim();break;case"AnimationKey":this._readAnimationKey(),e=!0}this._currentObject.worked=!0}if(this._currentObject.children.length>0){if(this._currentObject=this._currentObject.children.shift(),this.debug&&console.log("processing "+this._currentObject.name),e)break}else if(this._currentObject.worked&&this._currentObject.parent&&!this._currentObject.parent.parent&&this._changeRoot(),this._currentObject.parent?this._currentObject=this._currentObject.parent:e=!0,e)break}}},{key:"_changeRoot",value:function(){null!=this._currentGeo&&this._currentGeo.name&&this._makeOutputGeometry(),this._currentGeo={},null!=this._currentAnime&&this._currentAnime.name&&(this._currentAnimeFrames&&(this._currentAnime.AnimeFrames.push(this._currentAnimeFrames),this._currentAnimeFrames=null),this._makeOutputAnimation()),this._currentAnime={}}},{key:"_getParentName",value:function(e){return e.parent?e.parent.name?e.parent.name:this._getParentName(e.parent):""}},{key:"_setFrame",value:function(){this._nowFrameName=this._currentObject.name.trim(),this._currentFrame={},this._currentFrame.name=this._nowFrameName,this._currentFrame.children=[],this._currentObject.parent&&this._currentObject.parent.name&&(this._currentFrame.parentName=this._currentObject.parent.name),this.frameHierarchie.push(this._nowFrameName),this.HieStack[this._nowFrameName]=this._currentFrame}},{key:"_setFrameTransformMatrix",value:function(){this._currentFrame.FrameTransformMatrix=new r.Matrix4;var e=this._currentObject.data.split(",");this._ParseMatrixData(this._currentFrame.FrameTransformMatrix,e),this._makeBoneFrom_CurrentFrame()}},{key:"_makeBoneFrom_CurrentFrame",value:function(){if(this._currentFrame.FrameTransformMatrix){var e=new r.Bone;if(e.name=this._currentFrame.name,e.applyMatrix4(this._currentFrame.FrameTransformMatrix),e.matrixWorld=e.matrix,e.FrameTransformMatrix=this._currentFrame.FrameTransformMatrix,this._currentFrame.putBone=e,this._currentFrame.parentName)for(let e in this.HieStack)this.HieStack[e].name===this._currentFrame.parentName&&this.HieStack[e].putBone.add(this._currentFrame.putBone)}}},{key:"_readVertexDatas",value:function(){for(var e=0,t=0,n=0,r=0;;){var i=!1;if(0===n)e=this._readInt1(e).endRead,n=1,(r=this._currentObject.data.indexOf(";;",e)+1)<=0&&(r=this._currentObject.data.length);else{var s=0;switch(t){case 0:s=this._currentObject.data.indexOf(",",e)+1;break;case 1:s=this._currentObject.data.indexOf(";,",e)+1}switch((0===s||s>r)&&(s=r,n=0,i=!0),this._currentObject.type){case"Mesh":switch(t){case 0:this._readVertex1(this._currentObject.data.substr(e,s-e));break;case 1:this._readFace1(this._currentObject.data.substr(e,s-e))}break;case"MeshNormals":0===t&&this._readNormalVector1(this._currentObject.data.substr(e,s-e))}e=s+1,i&&t++}if(e>=this._currentObject.data.length)break}}},{key:"_readInt1",value:function(e){var t=this._currentObject.data.indexOf(";",e);return{refI:parseInt(this._currentObject.data.substr(e,t-e)),endRead:t+1}}},{key:"_readVertex1",value:function(e){var t=this._readLine(e.trim()).substr(0,e.length-2).split(";");this._currentGeo.GeometryData.vertices.push(parseFloat(t[0]),parseFloat(t[1]),parseFloat(t[2])),this._currentGeo.GeometryData.skinIndices.push(0,0,0,0),this._currentGeo.GeometryData.skinWeights.push(1,0,0,0),this._currentGeo.VertexSetedBoneCount.push(0)}},{key:"_readFace1",value:function(e){var t=this._readLine(e.trim()).substr(2,e.length-4).split(",");this._currentGeo.GeometryData.indices.push(parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10))}},{key:"_readNormalVector1",value:function(e){var t=this._readLine(e.trim()).substr(0,e.length-2).split(";");this._currentGeo.GeometryData.normals.push(parseFloat(t[0]),parseFloat(t[1]),parseFloat(t[2]))}},{key:"_buildGeometry",value:function(){var e=new r.BufferGeometry,t=[],n=[],i=[],s=[],a=[],o=this._currentGeo.GeometryData;for(let r=0,u=o.indices.length;r=this._currentObject.data.length)break}}},{key:"_setMeshMaterialList",value:function(){for(var e=0,t=0,n=0;;){if(n<2)e=this._readInt1(e).endRead,n++;else{var r=this._currentObject.data.indexOf(";",e);-1===r&&(r=this._currentObject.data.length,t=3,n=0);var i=this._currentObject.data.substr(e,r-e),s=this._readLine(i.trim()).split(",");for(let e=0;e=this._currentObject.data.length||t>=3)break}}},{key:"_setMaterial",value:function(){var e=new r.MeshPhongMaterial({color:16777215*Math.random()});e.side=r.FrontSide,e.name=this._currentObject.name;var t=0,n=this._currentObject.data.indexOf(";;",t),i=this._currentObject.data.substr(t,n-t),s=this._readLine(i.trim()).split(";");e.color.r=parseFloat(s[0]),e.color.g=parseFloat(s[1]),e.color.b=parseFloat(s[2]),t=n+2,n=this._currentObject.data.indexOf(";",t),i=this._currentObject.data.substr(t,n-t),e.shininess=parseFloat(this._readLine(i)),t=n+1,n=this._currentObject.data.indexOf(";;",t),i=this._currentObject.data.substr(t,n-t);var a=this._readLine(i.trim()).split(";");e.specular.r=parseFloat(a[0]),e.specular.g=parseFloat(a[1]),e.specular.b=parseFloat(a[2]),t=n+2,-1===(n=this._currentObject.data.indexOf(";;",t))&&(n=this._currentObject.data.length),i=this._currentObject.data.substr(t,n-t);var o=this._readLine(i.trim()).split(";");e.emissive.r=parseFloat(o[0]),e.emissive.g=parseFloat(o[1]),e.emissive.b=parseFloat(o[2]);for(var l=null;this._currentObject.children.length>0;){l=this._currentObject.children.shift(),this.debug&&console.log("processing "+l.name);var c=l.data.substr(1,l.data.length-2);switch(l.type){case"TextureFilename":e.map=this.texloader.load(c);break;case"BumpMapFilename":e.bumpMap=this.texloader.load(c),e.bumpScale=.05;break;case"NormalMapFilename":e.normalMap=this.texloader.load(c),e.normalScale=new r.Vector2(2,2);break;case"EmissiveMapFilename":e.emissiveMap=this.texloader.load(c);break;case"LightMapFilename":e.lightMap=this.texloader.load(c)}}this._currentGeo.Materials.push(e)}},{key:"_setSkinWeights",value:function(){var e=new o,t=0,n=this._currentObject.data.indexOf(";",t),i=this._currentObject.data.substr(t,n-t);t=n+1,e.boneName=i.substr(1,i.length-2),e.BoneIndex=this._currentGeo.BoneInfs.length,t=(n=this._currentObject.data.indexOf(";",t))+1,n=this._currentObject.data.indexOf(";",t),i=this._currentObject.data.substr(t,n-t);var s=this._readLine(i.trim()).split(",");for(let r=0;r0)for(let e=0;e0){var t=[];this._makePutBoneList(this._currentGeo.baseFrame.parentName,t);for(let e=0;e4&&console.log("warn! over 4 bone weight! :"+i)}}for(let e=0;e{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Loader{load(e,t,n,i){const s=this,a=new r.FileLoader(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{t(s.parse(n))}catch(r){i?i(r):console.error(r),s.manager.itemError(e)}}),n,i)}parse(e){const t=e.split("\n"),n=[],i=[];for(let r of t){if(r=r.trim(),"#"===r.charAt(0))continue;const e=r.split(/\s+/);3===e.length&&(n.push(parseFloat(e[0])),n.push(parseFloat(e[1])),n.push(parseFloat(e[2]))),6===e.length&&(n.push(parseFloat(e[0])),n.push(parseFloat(e[1])),n.push(parseFloat(e[2])),i.push(parseFloat(e[3])/255),i.push(parseFloat(e[4])/255),i.push(parseFloat(e[5])/255))}const s=new r.BufferGeometry;return s.setAttribute("position",new r.Float32BufferAttribute(n,3)),i.length>0&&s.setAttribute("color",new r.Float32BufferAttribute(i,3)),s}}t.XYZLoader=i},49708:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(45628),i=n(49160);class s{constructor(e){this.dv=new DataView(e),this.offset=0,this._textDecoder=new TextDecoder,this._bytes=new Uint8Array(e)}size(){return this.dv.buffer.byteLength}setOffset(e){e>0&&e=this.size()}skip(e){this.offset+=e}getUint8(){var e=this.dv.getUint8(this.offset);return this.offset+=1,e}getUint16(){var e=this.dv.getUint16(this.offset);return this.offset+=2,e}getInt32(){var e=this.dv.getInt32(this.offset,!1);return this.offset+=4,e}getUint32(){var e=this.dv.getUint32(this.offset,!1);return this.offset+=4,e}getUint64(){return 4294967296*this.getUint32()+this.getUint32()}getFloat32(){var e=this.dv.getFloat32(this.offset,!1);return this.offset+=4,e}getFloat32Array(e){for(var t=[],n=0;n ( ${this.dataOffset+this.length} )`,0==this.node?" {":"",this.skipped?"SKIPPED":"",0==this.node&&this.skipped?"}":""),0!=this.node||this.skipped||(this.depth+=1,this.formList.push(this.dataOffset+this.length)),this.skipped=!1}}closeForms(){if(this.active)for(var e=this.formList.length-1;e>=0;e--)this.offset>=this.formList[e]&&(this.depth-=1,console.log("| ".repeat(this.depth)+"}"),this.formList.splice(-1,1))}}function o(e){return e.length+1+((e.length+1)%2?1:0)}t.IFFParser=class{constructor(){this.debugger=new a}parse(e){if(this.reader=new s(e),this.tree={materials:{},layers:[],tags:[],textures:[]},this.currentLayer=this.tree,this.currentForm=this.tree,this.parseTopForm(),void 0!==this.tree.format){if("LWO2"===this.tree.format)for(this.parser=new r.LWO2Parser(this);!this.reader.endOfFile();)this.parser.parseBlock();else if("LWO3"===this.tree.format)for(this.parser=new i.LWO3Parser(this);!this.reader.endOfFile();)this.parser.parseBlock();return this.debugger.offset=this.reader.offset,this.debugger.closeForms(),this.tree}}parseTopForm(){if(this.debugger.offset=this.reader.offset,"FORM"===this.reader.getIDTag()){var e=this.reader.getUint32();this.debugger.dataOffset=this.reader.offset,this.debugger.length=e;var t=this.reader.getIDTag();("LWO2"===t||"LWO3"===t)&&(this.tree.format=t),this.debugger.node=0,this.debugger.nodeID=t,this.debugger.log()}else console.warn("LWOLoader: Top-level FORM missing.")}parseForm(e){var t=this.reader.getIDTag();switch(t){case"ISEQ":case"ANIM":case"STCC":case"VPVL":case"VPRM":case"NROT":case"WRPW":case"WRPH":case"FUNC":case"FALL":case"OPAC":case"GRAD":case"ENVS":case"VMOP":case"VMBG":case"OMAX":case"STEX":case"CKBG":case"CKEY":case"VMLA":case"VMLB":this.debugger.skipped=!0,this.skipForm(e);break;case"META":case"NNDS":case"NODS":case"NDTA":case"ADAT":case"AOVS":case"BLOK":case"IBGC":case"IOPC":case"IIMG":case"TXTR":this.debugger.length=4,this.debugger.skipped=!0;break;case"IFAL":case"ISCL":case"IPOS":case"IROT":case"IBMP":case"IUTD":case"IVTD":this.parseTextureNodeAttribute(t);break;case"ENVL":this.parseEnvelope(e);break;case"CLIP":"LWO2"===this.tree.format?this.parseForm(e):this.parseClip(e);break;case"STIL":this.parseImage();break;case"XREF":this.reader.skip(8),this.currentForm.referenceTexture={index:this.reader.getUint32(),refName:this.reader.getString()};break;case"IMST":this.parseImageStateForm(e);break;case"SURF":this.parseSurfaceForm(e);break;case"VALU":this.parseValueForm(e);break;case"NTAG":this.parseSubNode(e);break;case"ATTR":case"SATR":this.setupForm("attributes",e);break;case"NCON":this.parseConnections(e);break;case"SSHA":this.parentForm=this.currentForm,this.currentForm=this.currentSurface,this.setupForm("surfaceShader",e);break;case"SSHD":this.setupForm("surfaceShaderData",e);break;case"ENTR":this.parseEntryForm(e);break;case"IMAP":this.parseImageMap(e);break;case"TAMP":this.parseXVAL("amplitude",e);break;case"TMAP":this.setupForm("textureMap",e);break;case"CNTR":this.parseXVAL3("center",e);break;case"SIZE":this.parseXVAL3("scale",e);break;case"ROTA":this.parseXVAL3("rotation",e);break;default:this.parseUnknownForm(t,e)}this.debugger.node=0,this.debugger.nodeID=t,this.debugger.log()}setupForm(e,t){this.currentForm||(this.currentForm=this.currentNode),this.currentFormEnd=this.reader.offset+t,this.parentForm=this.currentForm,this.currentForm[e]?(console.warn("LWOLoader: form already exists on parent: ",e,this.currentForm),this.currentForm=this.currentForm[e]):(this.currentForm[e]={},this.currentForm=this.currentForm[e])}skipForm(e){this.reader.skip(e-4)}parseUnknownForm(e,t){var n,r,i;console.warn("LWOLoader: unknown FORM encountered: "+e,t),n=this.reader.dv.buffer,r=this.reader.offset,i=t-4,console.log((new TextDecoder).decode(new Uint8Array(n,r,i))),this.reader.skip(t-4)}parseSurfaceForm(e){this.reader.skip(8);var t=this.reader.getString(),n={attributes:{},connections:{},name:t,inputName:t,nodes:{},source:this.reader.getString()};this.tree.materials[t]=n,this.currentSurface=n,this.parentForm=this.tree.materials,this.currentForm=n,this.currentFormEnd=this.reader.offset+e}parseSurfaceLwo2(e){var t=this.reader.getString(),n={attributes:{},connections:{},name:t,nodes:{},source:this.reader.getString()};this.tree.materials[t]=n,this.currentSurface=n,this.parentForm=this.tree.materials,this.currentForm=n,this.currentFormEnd=this.reader.offset+e}parseSubNode(e){this.reader.skip(8);var t={name:this.reader.getString()};this.currentForm=t,this.currentNode=t,this.currentFormEnd=this.reader.offset+e}parseConnections(e){this.currentFormEnd=this.reader.offset+e,this.parentForm=this.currentForm,this.currentForm=this.currentSurface.connections}parseEntryForm(e){this.reader.skip(8);var t=this.reader.getString();this.currentForm=this.currentNode.attributes,this.setupForm(t,e)}parseValueForm(){this.reader.skip(8);var e=this.reader.getString();"double"===e?this.currentForm.value=this.reader.getUint64():"int"===e?this.currentForm.value=this.reader.getUint32():"vparam"===e?(this.reader.skip(24),this.currentForm.value=this.reader.getFloat64()):"vparam3"===e&&(this.reader.skip(24),this.currentForm.value=this.reader.getFloat64Array(3))}parseImageStateForm(){this.reader.skip(8),this.currentForm.mipMapLevel=this.reader.getFloat32()}parseImageMap(e){this.currentFormEnd=this.reader.offset+e,this.parentForm=this.currentForm,this.currentForm.maps||(this.currentForm.maps=[]);var t={};this.currentForm.maps.push(t),this.currentForm=t,this.reader.skip(10)}parseTextureNodeAttribute(e){switch(this.reader.skip(28),this.reader.skip(20),e){case"ISCL":this.currentNode.scale=this.reader.getFloat32Array(3);break;case"IPOS":this.currentNode.position=this.reader.getFloat32Array(3);break;case"IROT":this.currentNode.rotation=this.reader.getFloat32Array(3);break;case"IFAL":this.currentNode.falloff=this.reader.getFloat32Array(3);break;case"IBMP":this.currentNode.amplitude=this.reader.getFloat32();break;case"IUTD":this.currentNode.uTiles=this.reader.getFloat32();break;case"IVTD":this.currentNode.vTiles=this.reader.getFloat32()}this.reader.skip(2)}parseEnvelope(e){this.reader.skip(e-4)}parseClip(e){if("FORM"===this.reader.getIDTag())return this.reader.skip(16),void(this.currentNode.fileName=this.reader.getString());this.reader.setOffset(this.reader.offset-4),this.currentFormEnd=this.reader.offset+e,this.parentForm=this.currentForm,this.reader.skip(8);var t={index:this.reader.getUint32()};this.tree.textures.push(t),this.currentForm=t}parseClipLwo2(e){for(var t={index:this.reader.getUint32(),fileName:""};;){var n=this.reader.getIDTag(),r=this.reader.getUint16();if("STIL"===n){t.fileName=this.reader.getString();break}if(r>=e)break}this.tree.textures.push(t),this.currentForm=t}parseImage(){this.reader.skip(8),this.currentForm.fileName=this.reader.getString()}parseXVAL(e,t){var n=this.reader.offset+t-4;this.reader.skip(8),this.currentForm[e]=this.reader.getFloat32(),this.reader.setOffset(n)}parseXVAL3(e,t){var n=this.reader.offset+t-4;this.reader.skip(8),this.currentForm[e]={x:this.reader.getFloat32(),y:this.reader.getFloat32(),z:this.reader.getFloat32()},this.reader.setOffset(n)}parseObjectTag(){this.tree.objectTags||(this.tree.objectTags={}),this.tree.objectTags[this.reader.getIDTag()]={tagString:this.reader.getString()}}parseLayer(e){var t={number:this.reader.getUint16(),flags:this.reader.getUint16(),pivot:this.reader.getFloat32Array(3),name:this.reader.getString()};this.tree.layers.push(t),this.currentLayer=t;var n=16+o(this.currentLayer.name);this.currentLayer.parent=n{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.LWO2Parser=class{constructor(e){this.IFF=e}parseBlock(){this.IFF.debugger.offset=this.IFF.reader.offset,this.IFF.debugger.closeForms();const e=this.IFF.reader.getIDTag();let t=this.IFF.reader.getUint32();switch(t>this.IFF.reader.dv.byteLength-this.IFF.reader.offset&&(this.IFF.reader.offset-=4,t=this.IFF.reader.getUint16()),this.IFF.debugger.dataOffset=this.IFF.reader.offset,this.IFF.debugger.length=t,e){case"FORM":this.IFF.parseForm(t);break;case"ICON":case"VMPA":case"BBOX":case"NORM":case"PRE ":case"POST":case"KEY ":case"SPAN":case"TIME":case"CLRS":case"CLRA":case"FILT":case"DITH":case"CONT":case"BRIT":case"SATR":case"HUE ":case"GAMM":case"NEGA":case"IFLT":case"PFLT":case"PROJ":case"AXIS":case"AAST":case"PIXB":case"AUVO":case"STCK":case"PROC":case"VALU":case"FUNC":case"PNAM":case"INAM":case"GRST":case"GREN":case"GRPT":case"FKEY":case"IKEY":case"CSYS":case"OPAQ":case"CMAP":case"NLOC":case"NZOM":case"NVER":case"NSRV":case"NVSK":case"NCRD":case"WRPW":case"WRPH":case"NMOD":case"NSEL":case"NPRW":case"NPLA":case"NODS":case"VERS":case"ENUM":case"TAG ":case"OPAC":case"CGMD":case"CGTY":case"CGST":case"CGEN":case"CGTS":case"CGTE":case"OSMP":case"OMDE":case"OUTR":case"FLAG":case"TRNL":case"GLOW":case"GVAL":case"SHRP":case"RFOP":case"RSAN":case"TROP":case"RBLR":case"TBLR":case"CLRH":case"CLRF":case"ADTR":case"LINE":case"ALPH":case"VCOL":case"ENAB":case"TMAP":this.IFF.debugger.skipped=!0,this.IFF.reader.skip(t);break;case"SURF":this.IFF.parseSurfaceLwo2(t);break;case"CLIP":this.IFF.parseClipLwo2(t);break;case"IPIX":case"IMIP":case"IMOD":case"AMOD":case"IINV":case"INCR":case"IAXS":case"IFOT":case"ITIM":case"IWRL":case"IUTI":case"IINX":case"IINY":case"IINZ":case"IREF":4===t?this.IFF.currentNode[e]=this.IFF.reader.getInt32():this.IFF.reader.skip(t);break;case"OTAG":this.IFF.parseObjectTag();break;case"LAYR":this.IFF.parseLayer(t);break;case"PNTS":this.IFF.parsePoints(t);break;case"VMAP":this.IFF.parseVertexMapping(t);break;case"AUVU":case"AUVN":this.IFF.reader.skip(t-1),this.IFF.reader.getVariableLengthIndex();break;case"POLS":this.IFF.parsePolygonList(t);break;case"TAGS":this.IFF.parseTagStrings(t);break;case"PTAG":this.IFF.parsePolygonTagMapping(t);break;case"VMAD":this.IFF.parseVertexMapping(t,!0);break;case"DESC":this.IFF.currentForm.description=this.IFF.reader.getString();break;case"TEXT":case"CMNT":case"NCOM":this.IFF.currentForm.comment=this.IFF.reader.getString();break;case"NAME":this.IFF.currentForm.channelName=this.IFF.reader.getString();break;case"WRAP":this.IFF.currentForm.wrap={w:this.IFF.reader.getUint16(),h:this.IFF.reader.getUint16()};break;case"IMAG":const n=this.IFF.reader.getVariableLengthIndex();this.IFF.currentForm.imageIndex=n;break;case"OREF":this.IFF.currentForm.referenceObject=this.IFF.reader.getString();break;case"ROID":this.IFF.currentForm.referenceObjectID=this.IFF.reader.getUint32();break;case"SSHN":this.IFF.currentSurface.surfaceShaderName=this.IFF.reader.getString();break;case"AOVN":this.IFF.currentSurface.surfaceCustomAOVName=this.IFF.reader.getString();break;case"NSTA":this.IFF.currentForm.disabled=this.IFF.reader.getUint16();break;case"NRNM":this.IFF.currentForm.realName=this.IFF.reader.getString();break;case"NNME":this.IFF.currentForm.refName=this.IFF.reader.getString(),this.IFF.currentSurface.nodes[this.IFF.currentForm.refName]=this.IFF.currentForm;break;case"INME":this.IFF.currentForm.nodeName||(this.IFF.currentForm.nodeName=[]),this.IFF.currentForm.nodeName.push(this.IFF.reader.getString());break;case"IINN":this.IFF.currentForm.inputNodeName||(this.IFF.currentForm.inputNodeName=[]),this.IFF.currentForm.inputNodeName.push(this.IFF.reader.getString());break;case"IINM":this.IFF.currentForm.inputName||(this.IFF.currentForm.inputName=[]),this.IFF.currentForm.inputName.push(this.IFF.reader.getString());break;case"IONM":this.IFF.currentForm.inputOutputName||(this.IFF.currentForm.inputOutputName=[]),this.IFF.currentForm.inputOutputName.push(this.IFF.reader.getString());break;case"FNAM":this.IFF.currentForm.fileName=this.IFF.reader.getString();break;case"CHAN":4===t?this.IFF.currentForm.textureChannel=this.IFF.reader.getIDTag():this.IFF.reader.skip(t);break;case"SMAN":const r=this.IFF.reader.getFloat32();this.IFF.currentSurface.attributes.smooth=!(r<0);break;case"COLR":this.IFF.currentSurface.attributes.Color={value:this.IFF.reader.getFloat32Array(3)},this.IFF.reader.skip(2);break;case"LUMI":this.IFF.currentSurface.attributes.Luminosity={value:this.IFF.reader.getFloat32()},this.IFF.reader.skip(2);break;case"SPEC":this.IFF.currentSurface.attributes.Specular={value:this.IFF.reader.getFloat32()},this.IFF.reader.skip(2);break;case"DIFF":this.IFF.currentSurface.attributes.Diffuse={value:this.IFF.reader.getFloat32()},this.IFF.reader.skip(2);break;case"REFL":this.IFF.currentSurface.attributes.Reflection={value:this.IFF.reader.getFloat32()},this.IFF.reader.skip(2);break;case"GLOS":this.IFF.currentSurface.attributes.Glossiness={value:this.IFF.reader.getFloat32()},this.IFF.reader.skip(2);break;case"TRAN":this.IFF.currentSurface.attributes.opacity=this.IFF.reader.getFloat32(),this.IFF.reader.skip(2);break;case"BUMP":this.IFF.currentSurface.attributes.bumpStrength=this.IFF.reader.getFloat32(),this.IFF.reader.skip(2);break;case"SIDE":this.IFF.currentSurface.attributes.side=this.IFF.reader.getUint16();break;case"RIMG":this.IFF.currentSurface.attributes.reflectionMap=this.IFF.reader.getVariableLengthIndex();break;case"RIND":this.IFF.currentSurface.attributes.refractiveIndex=this.IFF.reader.getFloat32(),this.IFF.reader.skip(2);break;case"TIMG":this.IFF.currentSurface.attributes.refractionMap=this.IFF.reader.getVariableLengthIndex();break;case"IMAP":this.IFF.reader.skip(2);break;case"IUVI":this.IFF.currentNode.UVChannel=this.IFF.reader.getString(t);break;case"IUTL":this.IFF.currentNode.widthWrappingMode=this.IFF.reader.getUint32();break;case"IVTL":this.IFF.currentNode.heightWrappingMode=this.IFF.reader.getUint32();break;case"BLOK":break;default:this.IFF.parseUnknownCHUNK(e,t)}"FORM"!=e&&(this.IFF.debugger.node=1,this.IFF.debugger.nodeID=e,this.IFF.debugger.log()),this.IFF.reader.offset>=this.IFF.currentFormEnd&&(this.IFF.currentForm=this.IFF.parentForm)}}},49160:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.LWO3Parser=class{constructor(e){this.IFF=e}parseBlock(){this.IFF.debugger.offset=this.IFF.reader.offset,this.IFF.debugger.closeForms();const e=this.IFF.reader.getIDTag(),t=this.IFF.reader.getUint32();switch(this.IFF.debugger.dataOffset=this.IFF.reader.offset,this.IFF.debugger.length=t,e){case"FORM":this.IFF.parseForm(t);break;case"ICON":case"VMPA":case"BBOX":case"NORM":case"PRE ":case"POST":case"KEY ":case"SPAN":case"TIME":case"CLRS":case"CLRA":case"FILT":case"DITH":case"CONT":case"BRIT":case"SATR":case"HUE ":case"GAMM":case"NEGA":case"IFLT":case"PFLT":case"PROJ":case"AXIS":case"AAST":case"PIXB":case"STCK":case"VALU":case"PNAM":case"INAM":case"GRST":case"GREN":case"GRPT":case"FKEY":case"IKEY":case"CSYS":case"OPAQ":case"CMAP":case"NLOC":case"NZOM":case"NVER":case"NSRV":case"NCRD":case"NMOD":case"NSEL":case"NPRW":case"NPLA":case"VERS":case"ENUM":case"TAG ":case"CGMD":case"CGTY":case"CGST":case"CGEN":case"CGTS":case"CGTE":case"OSMP":case"OMDE":case"OUTR":case"FLAG":case"TRNL":case"SHRP":case"RFOP":case"RSAN":case"TROP":case"RBLR":case"TBLR":case"CLRH":case"CLRF":case"ADTR":case"GLOW":case"LINE":case"ALPH":case"VCOL":case"ENAB":this.IFF.debugger.skipped=!0,this.IFF.reader.skip(t);break;case"IPIX":case"IMIP":case"IMOD":case"AMOD":case"IINV":case"INCR":case"IAXS":case"IFOT":case"ITIM":case"IWRL":case"IUTI":case"IINX":case"IINY":case"IINZ":case"IREF":4===t?this.IFF.currentNode[e]=this.IFF.reader.getInt32():this.IFF.reader.skip(t);break;case"OTAG":this.IFF.parseObjectTag();break;case"LAYR":this.IFF.parseLayer(t);break;case"PNTS":this.IFF.parsePoints(t);break;case"VMAP":this.IFF.parseVertexMapping(t);break;case"POLS":this.IFF.parsePolygonList(t);break;case"TAGS":this.IFF.parseTagStrings(t);break;case"PTAG":this.IFF.parsePolygonTagMapping(t);break;case"VMAD":this.IFF.parseVertexMapping(t,!0);break;case"DESC":this.IFF.currentForm.description=this.IFF.reader.getString();break;case"TEXT":case"CMNT":case"NCOM":this.IFF.currentForm.comment=this.IFF.reader.getString();break;case"NAME":this.IFF.currentForm.channelName=this.IFF.reader.getString();break;case"WRAP":this.IFF.currentForm.wrap={w:this.IFF.reader.getUint16(),h:this.IFF.reader.getUint16()};break;case"IMAG":const n=this.IFF.reader.getVariableLengthIndex();this.IFF.currentForm.imageIndex=n;break;case"OREF":this.IFF.currentForm.referenceObject=this.IFF.reader.getString();break;case"ROID":this.IFF.currentForm.referenceObjectID=this.IFF.reader.getUint32();break;case"SSHN":this.IFF.currentSurface.surfaceShaderName=this.IFF.reader.getString();break;case"AOVN":this.IFF.currentSurface.surfaceCustomAOVName=this.IFF.reader.getString();break;case"NSTA":this.IFF.currentForm.disabled=this.IFF.reader.getUint16();break;case"NRNM":this.IFF.currentForm.realName=this.IFF.reader.getString();break;case"NNME":this.IFF.currentForm.refName=this.IFF.reader.getString(),this.IFF.currentSurface.nodes[this.IFF.currentForm.refName]=this.IFF.currentForm;break;case"INME":this.IFF.currentForm.nodeName||(this.IFF.currentForm.nodeName=[]),this.IFF.currentForm.nodeName.push(this.IFF.reader.getString());break;case"IINN":this.IFF.currentForm.inputNodeName||(this.IFF.currentForm.inputNodeName=[]),this.IFF.currentForm.inputNodeName.push(this.IFF.reader.getString());break;case"IINM":this.IFF.currentForm.inputName||(this.IFF.currentForm.inputName=[]),this.IFF.currentForm.inputName.push(this.IFF.reader.getString());break;case"IONM":this.IFF.currentForm.inputOutputName||(this.IFF.currentForm.inputOutputName=[]),this.IFF.currentForm.inputOutputName.push(this.IFF.reader.getString());break;case"FNAM":this.IFF.currentForm.fileName=this.IFF.reader.getString();break;case"CHAN":4===t?this.IFF.currentForm.textureChannel=this.IFF.reader.getIDTag():this.IFF.reader.skip(t);break;case"SMAN":const r=this.IFF.reader.getFloat32();this.IFF.currentSurface.attributes.smooth=!(r<0);break;case"COLR":this.IFF.currentSurface.attributes.Color={value:this.IFF.reader.getFloat32Array(3)},this.IFF.reader.skip(2);break;case"LUMI":this.IFF.currentSurface.attributes.Luminosity={value:this.IFF.reader.getFloat32()},this.IFF.reader.skip(2);break;case"SPEC":this.IFF.currentSurface.attributes.Specular={value:this.IFF.reader.getFloat32()},this.IFF.reader.skip(2);break;case"DIFF":this.IFF.currentSurface.attributes.Diffuse={value:this.IFF.reader.getFloat32()},this.IFF.reader.skip(2);break;case"REFL":this.IFF.currentSurface.attributes.Reflection={value:this.IFF.reader.getFloat32()},this.IFF.reader.skip(2);break;case"GLOS":this.IFF.currentSurface.attributes.Glossiness={value:this.IFF.reader.getFloat32()},this.IFF.reader.skip(2);break;case"TRAN":this.IFF.currentSurface.attributes.opacity=this.IFF.reader.getFloat32(),this.IFF.reader.skip(2);break;case"BUMP":this.IFF.currentSurface.attributes.bumpStrength=this.IFF.reader.getFloat32(),this.IFF.reader.skip(2);break;case"SIDE":this.IFF.currentSurface.attributes.side=this.IFF.reader.getUint16();break;case"RIMG":this.IFF.currentSurface.attributes.reflectionMap=this.IFF.reader.getVariableLengthIndex();break;case"RIND":this.IFF.currentSurface.attributes.refractiveIndex=this.IFF.reader.getFloat32(),this.IFF.reader.skip(2);break;case"TIMG":this.IFF.currentSurface.attributes.refractionMap=this.IFF.reader.getVariableLengthIndex();break;case"IMAP":this.IFF.currentSurface.attributes.imageMapIndex=this.IFF.reader.getUint32();break;case"IUVI":this.IFF.currentNode.UVChannel=this.IFF.reader.getString(t);break;case"IUTL":this.IFF.currentNode.widthWrappingMode=this.IFF.reader.getUint32();break;case"IVTL":this.IFF.currentNode.heightWrappingMode=this.IFF.reader.getUint32();break;default:this.IFF.parseUnknownCHUNK(e,t)}"FORM"!=e&&(this.IFF.debugger.node=1,this.IFF.debugger.nodeID=e,this.IFF.debugger.log()),this.IFF.reader.offset>=this.IFF.currentFormEnd&&(this.IFF.currentForm=this.IFF.parentForm)}}},36108:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Vector3,s=new r.Vector3,a=new r.Vector3;class o{constructor(e=new r.Vector3(0,0,0),t=new r.Vector3(0,1,0),n=1){this.start=e,this.end=t,this.radius=n}clone(){return new o(this.start.clone(),this.end.clone(),this.radius)}set(e,t,n){this.start.copy(e),this.end.copy(t),this.radius=n}copy(e){this.start.copy(e.start),this.end.copy(e.end),this.radius=e.radius}getCenter(e){return e.copy(this.end).add(this.start).multiplyScalar(.5)}translate(e){this.start.add(e),this.end.add(e)}checkAABBAxis(e,t,n,r,i,s,a,o,l){return(i-e{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={};t.ColorConverter=class{static setHSV(e,t,n,i){return t=r.MathUtils.euclideanModulo(t,1),n=r.MathUtils.clamp(n,0,1),i=r.MathUtils.clamp(i,0,1),e.setHSL(t,n*i/((t=(2-n)*i)<1?t:2-t),.5*t)}static getHSV(e,t){return e.getHSL(i),i.s*=i.l<.5?i.l:1-i.l,t.h=i.h,t.s=2*i.s/(i.l+i.s),t.v=i.l+i.s,t}static setCMYK(e,t,n,r,i){const s=(1-t)*(1-i),a=(1-n)*(1-i),o=(1-r)*(1-i);return e.setRGB(s,a,o)}static getCMYK(e,t){const n=e.r,r=e.g,i=e.b,s=1-Math.max(n,r,i),a=(1-n-s)/(1-s),o=(1-r-s)/(1-s),l=(1-i-s)/(1-s);return t.c=a,t.m=o,t.y=l,t.k=s,t}}},41028:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Vector3,s=new r.Line3,a=new r.Plane,o=new r.Vector3,l=new r.Triangle;class c{constructor(){this.normal=new r.Vector3,this.midpoint=new r.Vector3,this.area=0,this.constant=0,this.outside=null,this.mark=0,this.edge=null}static create(e,t,n){const r=new c,i=new h(e,r),s=new h(t,r),a=new h(n,r);return i.next=a.prev=s,s.next=i.prev=a,a.next=s.prev=i,r.edge=i,r.compute()}getEdge(e){let t=this.edge;for(;e>0;)t=t.next,e--;for(;e<0;)t=t.prev,e++;return t}compute(){const e=this.edge.tail(),t=this.edge.head(),n=this.edge.next.head();return l.set(e.point,t.point,n.point),l.getNormal(this.normal),l.getMidpoint(this.midpoint),this.area=l.getArea(),this.constant=this.normal.dot(this.midpoint),this}distanceToPoint(e){return this.normal.dot(e)-this.constant}}class h{constructor(e,t){this.vertex=e,this.prev=null,this.next=null,this.twin=null,this.face=t}head(){return this.vertex}tail(){return this.prev?this.prev.vertex:null}length(){const e=this.head(),t=this.tail();return null!==t?t.point.distanceTo(e.point):-1}lengthSquared(){const e=this.head(),t=this.tail();return null!==t?t.point.distanceToSquared(e.point):-1}setTwin(e){return this.twin=e,e.twin=this,this}}class u{constructor(e){this.point=e,this.prev=null,this.next=null,this.face=null}}class d{constructor(){this.head=null,this.tail=null}first(){return this.head}last(){return this.tail}clear(){return this.head=this.tail=null,this}insertBefore(e,t){return t.prev=e.prev,t.next=e,null===t.prev?this.head=t:t.prev.next=t,e.prev=t,this}insertAfter(e,t){return t.prev=e,t.next=e.next,null===t.next?this.tail=t:t.next.prev=t,e.next=t,this}append(e){return null===this.head?this.head=e:this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e,this}appendChain(e){for(null===this.head?this.head=e:this.tail.next=e,e.prev=this.tail;null!==e.next;)e=e.next;return this.tail=e,this}remove(e){return null===e.prev?this.head=e.next:e.prev.next=e.next,null===e.next?this.tail=e.prev:e.next.prev=e.prev,this}removeSubList(e,t){return null===e.prev?this.head=t.next:e.prev.next=t.next,null===t.next?this.tail=e.prev:t.next.prev=e.prev,this}isEmpty(){return null===this.head}}t.ConvexHull=class{constructor(){this.tolerance=-1,this.faces=[],this.newFaces=[],this.assigned=new d,this.unassigned=new d,this.vertices=[]}setFromPoints(e){if(e.length>=4){this.makeEmpty();for(let t=0,n=e.length;tthis.tolerance)return!1}return!0}intersectRay(e,t){const n=this.faces;let r=-1/0,i=1/0;for(let s=0,a=n.length;s0&&o>=0)return null;const l=0!==o?-a/o:0;if(!(l<=0)&&(o>0?i=Math.min(l,i):r=Math.max(l,r),r>i))return null}return r!==-1/0?e.at(r,t):e.at(i,t),t}intersectsRay(e){return null!==this.intersectRay(e,i)}makeEmpty(){return this.faces=[],this.vertices=[],this}addVertexToFace(e,t){return e.face=t,null===t.outside?this.assigned.append(e):this.assigned.insertBefore(t.outside,e),t.outside=e,this}removeVertexFromFace(e,t){return e===t.outside&&(null!==e.next&&e.next.face===t?t.outside=e.next:t.outside=null),this.assigned.remove(e),this}removeAllVerticesFromFace(e){if(null!==e.outside){const t=e.outside;let n=e.outside;for(;null!==n.next&&n.next.face===e;)n=n.next;return this.assigned.removeSubList(t,n),t.prev=n.next=null,e.outside=null,t}}deleteFaceVertices(e,t){const n=this.removeAllVerticesFromFace(e);if(void 0!==n)if(void 0===t)this.unassigned.appendChain(n);else{let e=n;do{const n=e.next;t.distanceToPoint(e.point)>this.tolerance?this.addVertexToFace(e,t):this.unassigned.append(e),e=n}while(null!==e)}return this}resolveUnassignedPoints(e){if(!1===this.unassigned.isEmpty()){let t=this.unassigned.first();do{const n=t.next;let r=this.tolerance,i=null;for(let s=0;sr&&(r=e,i=n),r>1e3*this.tolerance)break}}null!==i&&this.addVertexToFace(t,i),t=n}while(null!==t)}return this}computeExtremes(){const e=new r.Vector3,t=new r.Vector3,n=[],i=[];for(let r=0;r<3;r++)n[r]=i[r]=this.vertices[0];e.copy(this.vertices[0].point),t.copy(this.vertices[0].point);for(let r=0,s=this.vertices.length;rt.getComponent(e)&&(t.setComponent(e,a.getComponent(e)),i[e]=s)}return this.tolerance=3*Number.EPSILON*(Math.max(Math.abs(e.x),Math.abs(t.x))+Math.max(Math.abs(e.y),Math.abs(t.y))+Math.max(Math.abs(e.z),Math.abs(t.z))),{min:n,max:i}}computeInitialHull(){const e=this.vertices,t=this.computeExtremes(),n=t.min,r=t.max;let i=0,l=0;for(let s=0;s<3;s++){const e=r[s].point.getComponent(s)-n[s].point.getComponent(s);e>i&&(i=e,l=s)}const h=n[l],u=r[l];let d,p;i=0,s.set(h.point,u.point);for(let a=0,c=this.vertices.length;ai&&(i=e,d=t)}}i=-1,a.setFromCoplanarPoints(h.point,u.point,d.point);for(let s=0,o=this.vertices.length;si&&(i=e,p=t)}}const f=[];if(a.distanceToPoint(p.point)<0){f.push(c.create(h,u,d),c.create(p,u,h),c.create(p,d,u),c.create(p,h,d));for(let e=0;e<3;e++){const t=(e+1)%3;f[e+1].getEdge(2).setTwin(f[0].getEdge(t)),f[e+1].getEdge(1).setTwin(f[t+1].getEdge(0))}}else{f.push(c.create(h,d,u),c.create(p,h,u),c.create(p,u,d),c.create(p,d,h));for(let e=0;e<3;e++){const t=(e+1)%3;f[e+1].getEdge(2).setTwin(f[0].getEdge((3-e)%3)),f[e+1].getEdge(0).setTwin(f[t+1].getEdge(1))}}for(let s=0;s<4;s++)this.faces.push(f[s]);for(let s=0,a=e.length;si&&(i=r,e=this.faces[n])}null!==e&&this.addVertexToFace(t,e)}}return this}reindexFaces(){const e=[];for(let t=0;tt&&(t=i,e=r),r=r.next}while(null!==r&&r.face===n);return e}}computeHorizon(e,t,n,r){let i;this.deleteFaceVertices(n),n.mark=1,i=null===t?t=n.getEdge(0):t.next;do{const t=i.twin,n=t.face;0===n.mark&&(n.distanceToPoint(e)>this.tolerance?this.computeHorizon(e,t,n,r):r.push(i)),i=i.next}while(i!==t);return this}addAdjoiningFace(e,t){const n=c.create(e,t.tail(),t.head());return this.faces.push(n),n.getEdge(-1).setTwin(t.twin),n.getEdge(0)}addNewFaces(e,t){this.newFaces=[];let n=null,r=null;for(let i=0;i{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n=function(){const e=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180];for(let t=0;t<256;t++)e[256+t]=e[t];return e}();function r(e){return e*e*e*(e*(6*e-15)+10)}function i(e,t,n){return t+e*(n-t)}function s(e,t,n,r){const i=15&e,s=i<8?t:n,a=i<4?n:12==i||14==i?t:r;return(0==(1&i)?s:-s)+(0==(2&i)?a:-a)}t.ImprovedNoise=class{noise(e,t,a){const o=Math.floor(e),l=Math.floor(t),c=Math.floor(a),h=255&o,u=255&l,d=255&c,p=(e-=o)-1,f=(t-=l)-1,m=(a-=c)-1,g=r(e),A=r(t),v=r(a),y=n[h]+u,x=n[y]+d,b=n[y+1]+d,E=n[h+1]+u,_=n[E]+d,S=n[E+1]+d;return i(v,i(A,i(g,s(n[x],e,t,a),s(n[_],p,t,a)),i(g,s(n[b],e,f,a),s(n[S],p,f,a))),i(A,i(g,s(n[x+1],e,t,m),s(n[_+1],p,t,m)),i(g,s(n[b+1],e,f,m),s(n[S+1],p,f,m))))}}},91016:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);const i={rainbow:[[0,255],[.2,65535],[.5,65280],[.8,16776960],[1,16711680]],cooltowarm:[[0,3952322],[.2,10206463],[.5,14474460],[.8,16163717],[1,11797542]],blackbody:[[0,0],[.2,7864320],[.5,15086080],[.8,16776960],[1,16777215]],grayscale:[[0,0],[.2,4210752],[.5,8355712],[.8,12566463],[1,16777215]]};t.ColorMapKeywords=i,t.Lut=class{constructor(e,t=32){this.isLut=!0,this.lut=[],this.map=[],this.n=0,this.minV=0,this.maxV=1,this.setColorMap(e,t)}set(e){return!0===e.isLut&&this.copy(e),this}setMin(e){return this.minV=e,this}setMax(e){return this.maxV=e,this}setColorMap(e,t=32){this.map=i[e]||i.rainbow,this.n=t;const n=1/this.n,s=new r.Color,a=new r.Color;this.lut.length=0,this.lut.push(new r.Color(this.map[0][1]));for(let i=1;ithis.map[t][0]&&e<=this.map[t+1][0]){const n=this.map[t][0],i=this.map[t+1][0];s.setHex(this.map[t][1],"linear-srgb"),a.setHex(this.map[t+1][1],"linear-srgb");const o=(new r.Color).lerpColors(s,a,(e-n)/(i-n));this.lut.push(o)}}return this.lut.push(new r.Color(this.map[this.map.length-1][1])),this}copy(e){return this.lut=e.lut,this.map=e.map,this.n=e.n,this.minV=e.minV,this.maxV=e.maxV,this}getColor(e){e=((e=r.MathUtils.clamp(e,this.minV,this.maxV))-this.minV)/(this.maxV-this.minV);const t=Math.round(e*this.n);return this.lut[t]}addColorMap(e,t){return i[e]=t,this}createCanvas(){const e=document.createElement("canvas");return e.width=1,e.height=this.n,this.updateCanvas(e),e}updateCanvas(e){const t=e.getContext("2d",{alpha:!1}),n=t.getImageData(0,0,1,this.n),i=n.data;let s=0;const a=1/this.n,o=new r.Color,l=new r.Color,c=new r.Color;for(let r=1;r>=0;r-=a)for(let e=this.map.length-1;e>=0;e--)if(r=this.map[e-1][0]){const t=this.map[e-1][0],n=this.map[e][0];o.setHex(this.map[e-1][1],"linear-srgb"),l.setHex(this.map[e][1],"linear-srgb"),c.lerpColors(o,l,(r-t)/(n-t)),i[4*s]=Math.round(255*c.r),i[4*s+1]=Math.round(255*c.g),i[4*s+2]=Math.round(255*c.b),i[4*s+3]=255,s+=1}return t.putImageData(n,0,0),e}}},49264:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Triangle,s=new r.Vector3;t.MeshSurfaceSampler=class{constructor(e){let t=e.geometry;t.index&&(console.warn("THREE.MeshSurfaceSampler: Converting geometry to non-indexed BufferGeometry."),t=t.toNonIndexed()),this.geometry=t,this.randomFunction=Math.random,this.positionAttribute=this.geometry.getAttribute("position"),this.colorAttribute=this.geometry.getAttribute("color"),this.weightAttribute=null,this.distribution=null}setWeightAttribute(e){return this.weightAttribute=e?this.geometry.getAttribute(e):null,this}build(){const e=this.positionAttribute,t=this.weightAttribute,n=new Float32Array(e.count/3);for(let s=0;se){i=s;break}e1&&(a=1-a,o=1-o),i.a.fromBufferAttribute(this.positionAttribute,3*e),i.b.fromBufferAttribute(this.positionAttribute,3*e+1),i.c.fromBufferAttribute(this.positionAttribute,3*e+2),t.set(0,0,0).addScaledVector(i.a,a).addScaledVector(i.b,o).addScaledVector(i.c,1-(a+o)),void 0!==n&&i.getNormal(n),void 0!==r&&void 0!==this.colorAttribute&&(i.a.fromBufferAttribute(this.colorAttribute,3*e),i.b.fromBufferAttribute(this.colorAttribute,3*e+1),i.c.fromBufferAttribute(this.colorAttribute,3*e+2),s.set(0,0,0).addScaledVector(i.a,a).addScaledVector(i.b,o).addScaledVector(i.c,1-(a+o)),r.r=s.x,r.g=s.y,r.b=s.z),this}}},59672:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={c:null,u:[new r.Vector3,new r.Vector3,new r.Vector3],e:[]},s={c:null,u:[new r.Vector3,new r.Vector3,new r.Vector3],e:[]},a=[[],[],[]],o=[[],[],[]],l=[],c=new r.Vector3,h=new r.Vector3,u=new r.Vector3,d=new r.Vector3,p=new r.Vector3,f=new r.Vector3,m=new r.Matrix3,g=new r.Box3,A=new r.Matrix4,v=new r.Matrix4,y=new r.Ray;class x{constructor(e=new r.Vector3,t=new r.Vector3,n=new r.Matrix3){this.center=e,this.halfSize=t,this.rotation=n}set(e,t,n){return this.center=e,this.halfSize=t,this.rotation=n,this}copy(e){return this.center.copy(e.center),this.halfSize.copy(e.halfSize),this.rotation.copy(e.rotation),this}clone(){return(new this.constructor).copy(this)}getSize(e){return e.copy(this.halfSize).multiplyScalar(2)}clampPoint(e,t){const n=this.halfSize;d.subVectors(e,this.center),this.rotation.extractBasis(c,h,u),t.copy(this.center);const i=r.MathUtils.clamp(d.dot(c),-n.x,n.x);t.add(c.multiplyScalar(i));const s=r.MathUtils.clamp(d.dot(h),-n.y,n.y);t.add(h.multiplyScalar(s));const a=r.MathUtils.clamp(d.dot(u),-n.z,n.z);return t.add(u.multiplyScalar(a)),t}containsPoint(e){return d.subVectors(e,this.center),this.rotation.extractBasis(c,h,u),Math.abs(d.dot(c))<=this.halfSize.x&&Math.abs(d.dot(h))<=this.halfSize.y&&Math.abs(d.dot(u))<=this.halfSize.z}intersectsBox3(e){return this.intersectsOBB(b.fromBox3(e))}intersectsSphere(e){return this.clampPoint(e.center,f),f.distanceToSquared(e.center)<=e.radius*e.radius}intersectsOBB(e,t=Number.EPSILON){i.c=this.center,i.e[0]=this.halfSize.x,i.e[1]=this.halfSize.y,i.e[2]=this.halfSize.z,this.rotation.extractBasis(i.u[0],i.u[1],i.u[2]),s.c=e.center,s.e[0]=e.halfSize.x,s.e[1]=e.halfSize.y,s.e[2]=e.halfSize.z,e.rotation.extractBasis(s.u[0],s.u[1],s.u[2]);for(let o=0;o<3;o++)for(let e=0;e<3;e++)a[o][e]=i.u[o].dot(s.u[e]);d.subVectors(s.c,i.c),l[0]=d.dot(i.u[0]),l[1]=d.dot(i.u[1]),l[2]=d.dot(i.u[2]);for(let i=0;i<3;i++)for(let e=0;e<3;e++)o[i][e]=Math.abs(a[i][e])+t;let n,r;for(let a=0;a<3;a++)if(n=i.e[a],r=s.e[0]*o[a][0]+s.e[1]*o[a][1]+s.e[2]*o[a][2],Math.abs(l[a])>n+r)return!1;for(let c=0;c<3;c++)if(n=i.e[0]*o[0][c]+i.e[1]*o[1][c]+i.e[2]*o[2][c],r=s.e[c],Math.abs(l[0]*a[0][c]+l[1]*a[1][c]+l[2]*a[2][c])>n+r)return!1;return n=i.e[1]*o[2][0]+i.e[2]*o[1][0],r=s.e[1]*o[0][2]+s.e[2]*o[0][1],!(Math.abs(l[2]*a[1][0]-l[1]*a[2][0])>n+r)&&(n=i.e[1]*o[2][1]+i.e[2]*o[1][1],r=s.e[0]*o[0][2]+s.e[2]*o[0][0],!(Math.abs(l[2]*a[1][1]-l[1]*a[2][1])>n+r)&&(n=i.e[1]*o[2][2]+i.e[2]*o[1][2],r=s.e[0]*o[0][1]+s.e[1]*o[0][0],!(Math.abs(l[2]*a[1][2]-l[1]*a[2][2])>n+r)&&(n=i.e[0]*o[2][0]+i.e[2]*o[0][0],r=s.e[1]*o[1][2]+s.e[2]*o[1][1],!(Math.abs(l[0]*a[2][0]-l[2]*a[0][0])>n+r)&&(n=i.e[0]*o[2][1]+i.e[2]*o[0][1],r=s.e[0]*o[1][2]+s.e[2]*o[1][0],!(Math.abs(l[0]*a[2][1]-l[2]*a[0][1])>n+r)&&(n=i.e[0]*o[2][2]+i.e[2]*o[0][2],r=s.e[0]*o[1][1]+s.e[1]*o[1][0],!(Math.abs(l[0]*a[2][2]-l[2]*a[0][2])>n+r)&&(n=i.e[0]*o[1][0]+i.e[1]*o[0][0],r=s.e[1]*o[2][2]+s.e[2]*o[2][1],!(Math.abs(l[1]*a[0][0]-l[0]*a[1][0])>n+r)&&(n=i.e[0]*o[1][1]+i.e[1]*o[0][1],r=s.e[0]*o[2][2]+s.e[2]*o[2][0],!(Math.abs(l[1]*a[0][1]-l[0]*a[1][1])>n+r)&&(n=i.e[0]*o[1][2]+i.e[1]*o[0][2],r=s.e[0]*o[2][1]+s.e[1]*o[2][0],!(Math.abs(l[1]*a[0][2]-l[0]*a[1][2])>n+r)))))))))}intersectsPlane(e){this.rotation.extractBasis(c,h,u);const t=this.halfSize.x*Math.abs(e.normal.dot(c))+this.halfSize.y*Math.abs(e.normal.dot(h))+this.halfSize.z*Math.abs(e.normal.dot(u)),n=e.normal.dot(this.center)-e.constant;return Math.abs(n)<=t}intersectRay(e,t){return this.getSize(p),g.setFromCenterAndSize(d.set(0,0,0),p),A.setFromMatrix3(this.rotation),A.setPosition(this.center),v.copy(A).invert(),y.copy(e).applyMatrix4(v),y.intersectBox(g,t)?t.applyMatrix4(A):null}intersectsRay(e){return null!==this.intersectRay(e,d)}fromBox3(e){return e.getCenter(this.center),e.getSize(this.halfSize).multiplyScalar(.5),this.rotation.identity(),this}equals(e){return e.center.equals(this.center)&&e.halfSize.equals(this.halfSize)&&e.rotation.equals(this.rotation)}applyMatrix4(e){const t=e.elements;let n=d.set(t[0],t[1],t[2]).length();const r=d.set(t[4],t[5],t[6]).length(),i=d.set(t[8],t[9],t[10]).length();e.determinant()<0&&(n=-n),m.setFromMatrix4(e);const s=1/n,a=1/r,o=1/i;return m.elements[0]*=s,m.elements[1]*=s,m.elements[2]*=s,m.elements[3]*=a,m.elements[4]*=a,m.elements[5]*=a,m.elements[6]*=o,m.elements[7]*=o,m.elements[8]*=o,this.rotation.multiply(m),this.halfSize.x*=n,this.halfSize.y*=r,this.halfSize.z*=i,d.setFromMatrixPosition(e),this.center.add(d),this}}const b=new x;t.OBB=x},24376:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(36108),s=new r.Vector3,a=new r.Vector3,o=new r.Plane,l=new r.Line3,c=new r.Line3,h=new r.Sphere,u=new i.Capsule;class d{constructor(e){this.triangles=[],this.box=e,this.subTrees=[]}addTriangle(e){return this.bounds||(this.bounds=new r.Box3),this.bounds.min.x=Math.min(this.bounds.min.x,e.a.x,e.b.x,e.c.x),this.bounds.min.y=Math.min(this.bounds.min.y,e.a.y,e.b.y,e.c.y),this.bounds.min.z=Math.min(this.bounds.min.z,e.a.z,e.b.z,e.c.z),this.bounds.max.x=Math.max(this.bounds.max.x,e.a.x,e.b.x,e.c.x),this.bounds.max.y=Math.max(this.bounds.max.y,e.a.y,e.b.y,e.c.y),this.bounds.max.z=Math.max(this.bounds.max.z,e.a.z,e.b.z,e.c.z),this.triangles.push(e),this}calcBox(){return this.box=this.bounds.clone(),this.box.min.x-=.01,this.box.min.y-=.01,this.box.min.z-=.01,this}split(e){if(!this.box)return;const t=[],n=a.copy(this.box.max).sub(this.box.min).multiplyScalar(.5);for(let a=0;a<2;a++)for(let e=0;e<2;e++)for(let i=0;i<2;i++){const o=new r.Box3,l=s.set(a,e,i);o.min.copy(this.box.min).add(l.multiply(n)),o.max.copy(o.min).add(n),t.push(new d(o))}let i;for(;i=this.triangles.pop();)for(let e=0;e8&&e<16&&t[r].split(e+1),0!==n&&this.subTrees.push(t[r])}return this}build(){return this.calcBox(),this.split(0),this}getRayTriangles(e,t){for(let n=0;n0)for(let e=0;e0&&r>0||n<-e.radius&&r<-e.radius)return!1;const i=Math.abs(n/(Math.abs(n)+Math.abs(r))),a=s.copy(e.start).lerp(e.end,i);if(t.containsPoint(a))return{normal:o.normal.clone(),point:a.clone(),depth:Math.abs(Math.min(n,r))};const h=e.radius*e.radius,u=l.set(e.start,e.end),d=[[t.a,t.b],[t.b,t.c],[t.c,t.a]];for(let s=0;s0)for(let e=0;e0)for(let e=0;es&&(r=o.clone().add(e.origin),i=s,n=t[a])}}return i<1e100&&{distance:i,triangle:n,position:r}}fromGraphNode(e){return e.updateWorldMatrix(!0,!0),e.traverse((e=>{if(!0===e.isMesh){let t,n=!1;null!==e.geometry.index?(n=!0,t=e.geometry.toNonIndexed()):t=e.geometry;const i=t.getAttribute("position");for(let s=0;s{"use strict";var n=Object.defineProperty,r=(e,t,r)=>(((e,t,r)=>{t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.SimplexNoise=class{constructor(e=Math){r(this,"grad3",[[1,1,0],[-1,1,0],[1,-1,0],[-1,-1,0],[1,0,1],[-1,0,1],[1,0,-1],[-1,0,-1],[0,1,1],[0,-1,1],[0,1,-1],[0,-1,-1]]),r(this,"grad4",[[0,1,1,1],[0,1,1,-1],[0,1,-1,1],[0,1,-1,-1],[0,-1,1,1],[0,-1,1,-1],[0,-1,-1,1],[0,-1,-1,-1],[1,0,1,1],[1,0,1,-1],[1,0,-1,1],[1,0,-1,-1],[-1,0,1,1],[-1,0,1,-1],[-1,0,-1,1],[-1,0,-1,-1],[1,1,0,1],[1,1,0,-1],[1,-1,0,1],[1,-1,0,-1],[-1,1,0,1],[-1,1,0,-1],[-1,-1,0,1],[-1,-1,0,-1],[1,1,1,0],[1,1,-1,0],[1,-1,1,0],[1,-1,-1,0],[-1,1,1,0],[-1,1,-1,0],[-1,-1,1,0],[-1,-1,-1,0]]),r(this,"p",[]),r(this,"perm",[]),r(this,"simplex",[[0,1,2,3],[0,1,3,2],[0,0,0,0],[0,2,3,1],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,2,3,0],[0,2,1,3],[0,0,0,0],[0,3,1,2],[0,3,2,1],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,3,2,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[1,2,0,3],[0,0,0,0],[1,3,0,2],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,3,0,1],[2,3,1,0],[1,0,2,3],[1,0,3,2],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,0,3,1],[0,0,0,0],[2,1,3,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2,0,1,3],[0,0,0,0],[0,0,0,0],[0,0,0,0],[3,0,1,2],[3,0,2,1],[0,0,0,0],[3,1,2,0],[2,1,0,3],[0,0,0,0],[0,0,0,0],[0,0,0,0],[3,1,0,2],[0,0,0,0],[3,2,0,1],[3,2,1,0]]),r(this,"dot",((e,t,n)=>e[0]*t+e[1]*n)),r(this,"dot3",((e,t,n,r)=>e[0]*t+e[1]*n+e[2]*r)),r(this,"dot4",((e,t,n,r,i)=>e[0]*t+e[1]*n+e[2]*r+e[3]*i)),r(this,"noise",((e,t)=>{let n,r,i;const s=(e+t)*(.5*(Math.sqrt(3)-1)),a=Math.floor(e+s),o=Math.floor(t+s),l=(3-Math.sqrt(3))/6,c=(a+o)*l,h=e-(a-c),u=t-(o-c);let d=0,p=1;h>u&&(d=1,p=0);const f=h-d+l,m=u-p+l,g=h-1+2*l,A=u-1+2*l,v=255&a,y=255&o,x=this.perm[v+this.perm[y]]%12,b=this.perm[v+d+this.perm[y+p]]%12,E=this.perm[v+1+this.perm[y+1]]%12;let _=.5-h*h-u*u;_<0?n=0:(_*=_,n=_*_*this.dot(this.grad3[x],h,u));let S=.5-f*f-m*m;S<0?r=0:(S*=S,r=S*S*this.dot(this.grad3[b],f,m));let M=.5-g*g-A*A;return M<0?i=0:(M*=M,i=M*M*this.dot(this.grad3[E],g,A)),70*(n+r+i)})),r(this,"noise3d",((e,t,n)=>{let r,i,s,a;const o=(e+t+n)*(1/3),l=Math.floor(e+o),c=Math.floor(t+o),h=Math.floor(n+o),u=1/6,d=(l+c+h)*u,p=e-(l-d),f=t-(c-d),m=n-(h-d);let g,A,v,y,x,b;p>=f?f>=m?(g=1,A=0,v=0,y=1,x=1,b=0):p>=m?(g=1,A=0,v=0,y=1,x=0,b=1):(g=0,A=0,v=1,y=1,x=0,b=1):f{const i=this.grad4,s=this.simplex,a=this.perm,o=(Math.sqrt(5)-1)/4,l=(5-Math.sqrt(5))/20;let c,h,u,d,p;const f=(e+t+n+r)*o,m=Math.floor(e+f),g=Math.floor(t+f),A=Math.floor(n+f),v=Math.floor(r+f),y=(m+g+A+v)*l,x=e-(m-y),b=t-(g-y),E=n-(A-y),_=r-(v-y),S=(x>b?32:0)+(x>E?16:0)+(b>E?8:0)+(x>_?4:0)+(b>_?2:0)+(E>_?1:0);let M,w,C,T,I,B,R,P,D,L,F,U;M=s[S][0]>=3?1:0,w=s[S][1]>=3?1:0,C=s[S][2]>=3?1:0,T=s[S][3]>=3?1:0,I=s[S][0]>=2?1:0,B=s[S][1]>=2?1:0,R=s[S][2]>=2?1:0,P=s[S][3]>=2?1:0,D=s[S][0]>=1?1:0,L=s[S][1]>=1?1:0,F=s[S][2]>=1?1:0,U=s[S][3]>=1?1:0;const O=x-M+l,N=b-w+l,k=E-C+l,G=_-T+l,z=x-I+2*l,Q=b-B+2*l,V=E-R+2*l,H=_-P+2*l,j=x-D+3*l,W=b-L+3*l,X=E-F+3*l,Y=_-U+3*l,q=x-1+4*l,K=b-1+4*l,J=E-1+4*l,Z=_-1+4*l,$=255&m,ee=255&g,te=255&A,ne=255&v,re=a[$+a[ee+a[te+a[ne]]]]%32,ie=a[$+M+a[ee+w+a[te+C+a[ne+T]]]]%32,se=a[$+I+a[ee+B+a[te+R+a[ne+P]]]]%32,ae=a[$+D+a[ee+L+a[te+F+a[ne+U]]]]%32,oe=a[$+1+a[ee+1+a[te+1+a[ne+1]]]]%32;let le=.6-x*x-b*b-E*E-_*_;le<0?c=0:(le*=le,c=le*le*this.dot4(i[re],x,b,E,_));let ce=.6-O*O-N*N-k*k-G*G;ce<0?h=0:(ce*=ce,h=ce*ce*this.dot4(i[ie],O,N,k,G));let he=.6-z*z-Q*Q-V*V-H*H;he<0?u=0:(he*=he,u=he*he*this.dot4(i[se],z,Q,V,H));let ue=.6-j*j-W*W-X*X-Y*Y;ue<0?d=0:(ue*=ue,d=ue*ue*this.dot4(i[ae],j,W,X,Y));let de=.6-q*q-K*K-J*J-Z*Z;return de<0?p=0:(de*=de,p=de*de*this.dot4(i[oe],q,K,J,Z)),27*(c+h+u+d+p)}));for(let t=0;t<256;t++)this.p[t]=Math.floor(256*e.random());for(let t=0;t<512;t++)this.perm[t]=this.p[255&t]}}},46484:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(67824),s=new r.Vector3;class a{constructor(e=1.4,t=1e-4){this.minSizeForBreak=e,this.smallDelta=t,this.tempLine1=new r.Line3,this.tempPlane1=new r.Plane,this.tempPlane2=new r.Plane,this.tempPlane_Cut=new r.Plane,this.tempCM1=new r.Vector3,this.tempCM2=new r.Vector3,this.tempVector3=new r.Vector3,this.tempVector3_2=new r.Vector3,this.tempVector3_3=new r.Vector3,this.tempVector3_P0=new r.Vector3,this.tempVector3_P1=new r.Vector3,this.tempVector3_P2=new r.Vector3,this.tempVector3_N0=new r.Vector3,this.tempVector3_N1=new r.Vector3,this.tempVector3_AB=new r.Vector3,this.tempVector3_CB=new r.Vector3,this.tempResultObjects={object1:null,object2:null},this.segments=[];for(let n=0;n<900;n++)this.segments[n]=!1}prepareBreakableObject(e,t,n,r,i){const s=e.userData;s.mass=t,s.velocity=n.clone(),s.angularVelocity=r.clone(),s.breakable=i}subdivideByImpact(e,t,n,r,i){const s=[],a=this.tempPlane1,o=this.tempPlane2;this.tempVector3.addVectors(t,n),a.setFromCoplanarPoints(t,e.position,this.tempVector3);const l=i+r,c=this;return function i(h,u,d,p){if(Math.random()<.05*p||p>l)return void s.push(h);let f=Math.PI;0===p?(o.normal.copy(a.normal),o.constant=a.constant):p<=r?(f=(d-u)*(.2+.6*Math.random())+u,c.tempVector3_2.copy(e.position).sub(t).applyAxisAngle(n,f).add(t),o.setFromCoplanarPoints(t,c.tempVector3,c.tempVector3_2)):(f=(.5*(1&p)+.2*(2-Math.random()))*Math.PI,c.tempVector3_2.copy(t).sub(h.position).applyAxisAngle(n,f).add(h.position),c.tempVector3_3.copy(n).add(h.position),o.setFromCoplanarPoints(h.position,c.tempVector3_3,c.tempVector3_2)),c.cutByPlane(h,o,c.tempResultObjects);const m=c.tempResultObjects.object1,g=c.tempResultObjects.object2;m&&i(m,u,f,p+1),g&&i(g,f,d,p+1)}(e,0,2*Math.PI,0),s}cutByPlane(e,t,n){const s=e.geometry,o=s.attributes.position.array,l=s.attributes.normal.array,c=o.length/3;let h=c/3,u=s.getIndex();function d(e,t){const n=3*e+t;return u?u[n]:n}u&&(u=u.array,h=u.length/3);const p=[],f=[],m=this.smallDelta,g=c*c;for(let r=0;rm?(h=2,f.push(A.clone())):u<-m?(h=1,p.push(A.clone())):(h=3,p.push(A.clone()),f.push(A.clone()));let d=0;if(u=b.distanceToPoint(v),u>m?(d=2,f.push(v.clone())):u<-m?(d=1,p.push(v.clone())):(d=3,p.push(v.clone()),f.push(v.clone())),1===h&&2===d||2===h&&1===d){this.tempLine1.start.copy(A),this.tempLine1.end.copy(v);let e=new r.Vector3;if(e=b.intersectLine(this.tempLine1,e),null===e)return console.error("Internal error: segment does not intersect plane."),n.segmentedObject1=null,n.segmentedObject2=null,0;p.push(e),f.push(e.clone())}}}const E=.5*e.userData.mass;this.tempCM1.set(0,0,0);let _=0;const S=p.length;if(S>0){for(let e=0;e0){for(let e=0;e4&&(C=new r.Mesh(new i.ConvexGeometry(p),e.material),C.position.copy(this.tempCM1),C.quaternion.copy(e.quaternion),this.prepareBreakableObject(C,E,e.userData.velocity,e.userData.angularVelocity,2*_>this.minSizeForBreak),I++),w>4&&(T=new r.Mesh(new i.ConvexGeometry(f),e.material),T.position.copy(this.tempCM2),T.quaternion.copy(e.quaternion),this.prepareBreakableObject(T,E,e.userData.velocity,e.userData.angularVelocity,2*M>this.minSizeForBreak),I++),n.object1=C,n.object2=T,I}static transformFreeVector(e,t){const n=e.x,r=e.y,i=e.z,s=t.elements;return e.x=s[0]*n+s[4]*r+s[8]*i,e.y=s[1]*n+s[5]*r+s[9]*i,e.z=s[2]*n+s[6]*r+s[10]*i,e}static transformFreeVectorInverse(e,t){const n=e.x,r=e.y,i=e.z,s=t.elements;return e.x=s[0]*n+s[1]*r+s[2]*i,e.y=s[4]*n+s[5]*r+s[6]*i,e.z=s[8]*n+s[9]*r+s[10]*i,e}static transformTiedVectorInverse(e,t){const n=e.x,r=e.y,i=e.z,s=t.elements;return e.x=s[0]*n+s[1]*r+s[2]*i-s[12],e.y=s[4]*n+s[5]*r+s[6]*i-s[13],e.z=s[8]*n+s[9]*r+s[10]*i-s[14],e}static transformPlaneToLocalSpace(e,t,n){n.normal.copy(e.normal),n.constant=e.constant;const r=a.transformTiedVectorInverse(e.coplanarPoint(s),t);a.transformFreeVectorInverse(n.normal,t),n.constant=-r.dot(n.normal)}}t.ConvexObjectBreaker=a},42256:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.GPUComputationRenderer=class{constructor(e,t,n){this.variables=[],this.currentTextureIndex=0;let i=r.FloatType;const s=new r.Scene,a=new r.Camera;a.position.z=1;const o={passThruTexture:{value:null}},l=u("uniform sampler2D passThruTexture;\n\nvoid main() {\n\n\tvec2 uv = gl_FragCoord.xy / resolution.xy;\n\n\tgl_FragColor = texture2D( passThruTexture, uv );\n\n}\n",o),c=new r.Mesh(new r.PlaneGeometry(2,2),l);function h(n){n.defines.resolution="vec2( "+e.toFixed(1)+", "+t.toFixed(1)+" )"}function u(e,t){t=t||{};const n=new r.ShaderMaterial({uniforms:t,vertexShader:"void main()\t{\n\n\tgl_Position = vec4( position, 1.0 );\n\n}\n",fragmentShader:e});return h(n),n}s.add(c),this.setDataType=function(e){return i=e,this},this.addVariable=function(e,t,n){const i={name:e,initialValueTexture:n,material:this.createShaderMaterial(t),dependencies:null,renderTargets:[],wrapS:null,wrapT:null,minFilter:r.NearestFilter,magFilter:r.NearestFilter};return this.variables.push(i),i},this.setVariableDependencies=function(e,t){e.dependencies=t},this.init=function(){if(!1===n.capabilities.isWebGL2&&!1===n.extensions.has("OES_texture_float"))return"No OES_texture_float support for float textures.";if(0===n.capabilities.maxVertexTextures)return"No support for vertex shader textures.";for(let n=0;n{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Vector3,s=new r.Quaternion,a=new r.Vector3,o=new r.Vector3,l=new r.Quaternion,c=new r.Vector3;class h extends r.Object3D{constructor(){super()}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null!==this.parent?(this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.decompose(o,l,c),this.matrix.decompose(i,s,a),this.matrixWorld.compose(o,s,c)):this.matrixWorld.copy(this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);for(let t=0,n=this.children.length;t{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(40280);t.MD2Character=class{constructor(){this.scale=1,this.animationFPS=6,this.root=new r.Object3D,this.meshBody=null,this.meshWeapon=null,this.skinsBody=[],this.skinsWeapon=[],this.weapons=[],this.activeAnimation=null,this.mixer=null,this.onLoadComplete=function(){},this.loadCounter=0}loadParts(e){const t=this;function n(e,t){const n=new r.MeshLambertMaterial({color:16755200,wireframe:!0,morphTargets:!0,morphNormals:!0}),i=new r.MeshLambertMaterial({color:16777215,wireframe:!1,map:t,morphTargets:!0,morphNormals:!0}),s=new r.Mesh(e,i);return s.rotation.y=-Math.PI/2,s.castShadow=!0,s.receiveShadow=!0,s.materialTexture=i,s.materialWireframe=n,s}function s(e,t){const n=new r.TextureLoader,i=[];for(let s=0;s{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(40280),s=n(95108);t.MD2CharacterComplex=class{constructor(){this.scale=1,this.animationFPS=6,this.transitionFrames=15,this.maxSpeed=275,this.maxReverseSpeed=-275,this.frontAcceleration=600,this.backAcceleration=600,this.frontDecceleration=600,this.angularSpeed=2.5,this.root=new r.Object3D,this.meshBody=null,this.meshWeapon=null,this.controls=null,this.skinsBody=[],this.skinsWeapon=[],this.weapons=[],this.currentSkin=void 0,this.onLoadComplete=function(){},this.meshes=[],this.animations={},this.loadCounter=0,this.speed=0,this.bodyOrientation=0,this.walkSpeed=this.maxSpeed,this.crouchSpeed=.5*this.maxSpeed,this.activeAnimation=null,this.oldAnimation=null}enableShadows(e){for(let t=0;t0&&(t=(this.transitionFrames-this.blendCounter)/this.transitionFrames,this.blendCounter-=1),this.meshBody&&(this.meshBody.update(e),this.meshBody.setAnimationWeight(this.activeAnimation,t),this.meshBody.setAnimationWeight(this.oldAnimation,1-t)),this.meshWeapon&&(this.meshWeapon.update(e),this.meshWeapon.setAnimationWeight(this.activeAnimation,t),this.meshWeapon.setAnimationWeight(this.oldAnimation,1-t))}updateBehaviors(){const e=this.controls,t=this.animations;let n,r;e.crouch?(n=t.crouchMove,r=t.crouchIdle):(n=t.move,r=t.idle),e.jump&&(n=t.jump,r=t.jump),e.attack&&(e.crouch?(n=t.crouchAttack,r=t.crouchAttack):(n=t.attack,r=t.attack)),(e.moveForward||e.moveBackward||e.moveLeft||e.moveRight)&&this.activeAnimation!==n&&this.setAnimation(n),Math.abs(this.speed)<.2*this.maxSpeed&&!(e.moveLeft||e.moveRight||e.moveForward||e.moveBackward)&&this.activeAnimation!==r&&this.setAnimation(r),e.moveForward&&(this.meshBody&&(this.meshBody.setAnimationDirectionForward(this.activeAnimation),this.meshBody.setAnimationDirectionForward(this.oldAnimation)),this.meshWeapon&&(this.meshWeapon.setAnimationDirectionForward(this.activeAnimation),this.meshWeapon.setAnimationDirectionForward(this.oldAnimation))),e.moveBackward&&(this.meshBody&&(this.meshBody.setAnimationDirectionBackward(this.activeAnimation),this.meshBody.setAnimationDirectionBackward(this.oldAnimation)),this.meshWeapon&&(this.meshWeapon.setAnimationDirectionBackward(this.activeAnimation),this.meshWeapon.setAnimationDirectionBackward(this.oldAnimation)))}updateMovementModel(e){function t(e){return 1===e?1:1-Math.pow(2,-10*e)}const n=this.controls;n.crouch?this.maxSpeed=this.crouchSpeed:this.maxSpeed=this.walkSpeed,this.maxReverseSpeed=-this.maxSpeed,n.moveForward&&(this.speed=r.MathUtils.clamp(this.speed+e*this.frontAcceleration,this.maxReverseSpeed,this.maxSpeed)),n.moveBackward&&(this.speed=r.MathUtils.clamp(this.speed-e*this.backAcceleration,this.maxReverseSpeed,this.maxSpeed));if(n.moveLeft&&(this.bodyOrientation+=e*this.angularSpeed,this.speed=r.MathUtils.clamp(this.speed+1*e*this.frontAcceleration,this.maxReverseSpeed,this.maxSpeed)),n.moveRight&&(this.bodyOrientation-=e*this.angularSpeed,this.speed=r.MathUtils.clamp(this.speed+1*e*this.frontAcceleration,this.maxReverseSpeed,this.maxSpeed)),!n.moveForward&&!n.moveBackward)if(this.speed>0){const n=t(this.speed/this.maxSpeed);this.speed=r.MathUtils.clamp(this.speed-n*e*this.frontDecceleration,0,this.maxSpeed)}else{const n=t(this.speed/this.maxReverseSpeed);this.speed=r.MathUtils.clamp(this.speed+n*e*this.backAcceleration,this.maxReverseSpeed,0)}const i=this.speed*e;this.root.position.x+=Math.sin(this.bodyOrientation)*i,this.root.position.z+=Math.cos(this.bodyOrientation)*i,this.root.rotation.y=this.bodyOrientation}_createPart(e,t){const n=new r.MeshLambertMaterial({color:16755200,wireframe:!0,morphTargets:!0,morphNormals:!0}),i=new r.MeshLambertMaterial({color:16777215,wireframe:!1,map:t,morphTargets:!0,morphNormals:!0}),a=new s.MorphBlendMesh(e,i);return a.rotation.y=-Math.PI/2,a.materialTexture=i,a.materialWireframe=n,a.autoCreateAnimations(this.animationFPS),a}}},81596:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Mesh{constructor(e,t){super(e,t),this.type="MorphAnimMesh",this.mixer=new r.AnimationMixer(this),this.activeAction=null}setDirectionForward(){this.mixer.timeScale=1}setDirectionBackward(){this.mixer.timeScale=-1}playAnimation(e,t){this.activeAction&&(this.activeAction.stop(),this.activeAction=null);const n=r.AnimationClip.findByName(this,e);if(!n)throw new Error("THREE.MorphAnimMesh: animations["+e+"] undefined in .playAnimation()");{const e=this.mixer.clipAction(n);e.timeScale=n.tracks.length*t/n.duration,this.activeAction=e.play()}}updateAnimation(e){this.mixer.update(e)}copy(e,t){return super.copy(e,t),this.mixer=new r.AnimationMixer(this),this}}t.MorphAnimMesh=i},95108:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Mesh{constructor(e,t){super(e,t),this.animationsMap={},this.animationsList=[];const n=Object.keys(this.morphTargetDictionary).length,r="__default",i=n-1,s=n/1;this.createAnimation(r,0,i,s),this.setAnimationWeight(r,1)}createAnimation(e,t,n,r){const i={start:t,end:n,length:n-t+1,fps:r,duration:(n-t)/r,lastFrame:0,currentFrame:0,active:!1,time:0,direction:1,weight:1,directionBackwards:!1,mirroredLoop:!1};this.animationsMap[e]=i,this.animationsList.push(i)}autoCreateAnimations(e){const t=/([a-z]+)_?(\d+)/i;let n;const r={};let i=0;for(const s in this.morphTargetDictionary){const e=s.match(t);if(e&&e.length>1){const t=e[1];r[t]||(r[t]={start:1/0,end:-1/0});const s=r[t];is.end&&(s.end=i),n||(n=t)}i++}for(const s in r){const t=r[s];this.createAnimation(s,t.start,t.end,e)}this.firstAnimation=n}setAnimationDirectionForward(e){const t=this.animationsMap[e];t&&(t.direction=1,t.directionBackwards=!1)}setAnimationDirectionBackward(e){const t=this.animationsMap[e];t&&(t.direction=-1,t.directionBackwards=!0)}setAnimationFPS(e,t){const n=this.animationsMap[e];n&&(n.fps=t,n.duration=(n.end-n.start)/n.fps)}setAnimationDuration(e,t){const n=this.animationsMap[e];n&&(n.duration=t,n.fps=(n.end-n.start)/n.duration)}setAnimationWeight(e,t){const n=this.animationsMap[e];n&&(n.weight=t)}setAnimationTime(e,t){const n=this.animationsMap[e];n&&(n.time=t)}getAnimationTime(e){let t=0;const n=this.animationsMap[e];return n&&(t=n.time),t}getAnimationDuration(e){let t=-1;const n=this.animationsMap[e];return n&&(t=n.duration),t}playAnimation(e){const t=this.animationsMap[e];t?(t.time=0,t.active=!0):console.warn("THREE.MorphBlendMesh: animation["+e+"] undefined in .playAnimation()")}stopAnimation(e){const t=this.animationsMap[e];t&&(t.active=!1)}update(e){for(let t=0,n=this.animationsList.length;tn.duration||n.time<0)&&(n.direction*=-1,n.time>n.duration&&(n.time=n.duration,n.directionBackwards=!0),n.time<0&&(n.time=0,n.directionBackwards=!1)):(n.time=n.time%n.duration,n.time<0&&(n.time+=n.duration));const s=n.start+r.MathUtils.clamp(Math.floor(n.time/i),0,n.length-1),a=n.weight;s!==n.currentFrame&&(this.morphTargetInfluences[n.lastFrame]=0,this.morphTargetInfluences[n.currentFrame]=1*a,this.morphTargetInfluences[s]=0,n.lastFrame=n.currentFrame,n.currentFrame=s);let o=n.time%i/i;n.directionBackwards&&(o=1-o),n.currentFrame!==n.lastFrame?(this.morphTargetInfluences[n.currentFrame]=o*a,this.morphTargetInfluences[n.lastFrame]=(1-o)*a):this.morphTargetInfluences[n.currentFrame]=a}}}t.MorphBlendMesh=i},95544:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(92724);t.ProgressiveLightMap=class{constructor(e,t=1024){this.renderer=e,this.res=t,this.lightMapContainers=[],this.compiled=!1,this.scene=new r.Scene,this.scene.background=null,this.tinyTarget=new r.WebGLRenderTarget(1,1),this.buffer1Active=!1,this.firstUpdate=!0,this.warned=!1;const n=/(Android|iPad|iPhone|iPod)/g.test(navigator.userAgent)?alfFloatType:r.FloatType;this.progressiveLightMap1=new r.WebGLRenderTarget(this.res,this.res,{type:n}),this.progressiveLightMap2=new r.WebGLRenderTarget(this.res,this.res,{type:n}),this.uvMat=new r.MeshPhongMaterial,this.uvMat.uniforms={},this.uvMat.onBeforeCompile=e=>{e.vertexShader="#define USE_LIGHTMAP\n"+e.vertexShader.slice(0,-1)+"\tgl_Position = vec4((uv2 - 0.5) * 2.0, 1.0, 1.0); }";const t=e.fragmentShader.indexOf("void main() {");e.fragmentShader="varying vec2 vUv2;\n"+e.fragmentShader.slice(0,t)+"\tuniform sampler2D previousShadowMap;\n\tuniform float averagingWindow;\n"+e.fragmentShader.slice(t-1,-1)+"\nvec3 texelOld = texture2D(previousShadowMap, vUv2).rgb;\n\t\t\t\tgl_FragColor.rgb = mix(texelOld, gl_FragColor.rgb, 1.0/averagingWindow);\n\t\t\t}",e.uniforms.previousShadowMap={value:this.progressiveLightMap1.texture},e.uniforms.averagingWindow={value:100},this.uvMat.uniforms=e.uniforms,this.uvMat.userData.shader=e,this.compiled=!0}}addObjectsToLightMap(e){this.uv_boxes=[];const t=3/this.res;for(let r=0;r{const i=e[r.index].geometry.getAttribute("uv").clone();for(let e=0;e{r.vertexShader="#define USE_UV\n"+r.vertexShader.slice(0,-1)+"\tgl_Position = vec4((uv - 0.5) * 2.0, 1.0, 1.0); }";const i=r.fragmentShader.indexOf("void main() {");r.fragmentShader="#define USE_UV\n"+r.fragmentShader.slice(0,i)+"\tuniform sampler2D previousShadowMap;\n\tuniform float pixelOffset;\n"+r.fragmentShader.slice(i-1,-1)+"\tgl_FragColor.rgb = (\n\t\t\t texture2D(previousShadowMap, vUv + vec2( pixelOffset, 0.0 )).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2( 0.0 , pixelOffset)).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2( 0.0 , -pixelOffset)).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2(-pixelOffset, 0.0 )).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2( pixelOffset, pixelOffset)).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2(-pixelOffset, pixelOffset)).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2( pixelOffset, -pixelOffset)).rgb +\n\t\t\t texture2D(previousShadowMap, vUv + vec2(-pixelOffset, -pixelOffset)).rgb)/8.0;\n\t\t}",r.uniforms.previousShadowMap={value:t.texture},r.uniforms.pixelOffset={value:.5/e},n.uniforms=r.uniforms,n.userData.shader=r,this.compiled=!0},this.blurringPlane=new r.Mesh(new r.PlaneGeometry(1,1),n),this.blurringPlane.name="Blurring Plane",this.blurringPlane.frustumCulled=!1,this.blurringPlane.renderOrder=0,this.blurringPlane.material.depthWrite=!1,this.scene.add(this.blurringPlane)}}},3096:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.BufferGeometry{constructor(e,t){super();const n=[],i=[],s=[],a=[1,1,1],o=[1,1,0],l=new r.Vector3(0,1,0),c=new r.Vector3,h=new r.Vector3,u=new r.Quaternion,d=new r.Quaternion;d.setFromAxisAngle(l,Math.PI/2);const p=new r.Vector3,f=new r.Vector3;f.copy(e.getPointAt(0));const m=[new r.Vector3(-.225,0,0),new r.Vector3(0,-.05,0),new r.Vector3(0,-.175,0),new r.Vector3(0,-.05,0),new r.Vector3(.225,0,0),new r.Vector3(0,-.175,0)],g=2*Math.PI;let A=5;const v=[];for(let D=0;D=0;r--)x.copy(e[r]),x.applyQuaternion(u),x.add(p),n.push(x.x,x.y,x.z),i.push(b.x,b.y,b.z),s.push(t[0],t[1],t[2])}const _=new r.Vector3,S=new r.Vector3,M=new r.Vector3,w=new r.Vector3,C=new r.Vector3,T=new r.Vector3,I=new r.Vector3,B=new r.Vector3;function R(e,t,r){for(let a=0,o=e.length;a10?(b.set(-.75,-.35,0),b.applyQuaternion(s),b.add(o),E.set(.75,-.35,0),E.applyQuaternion(s),E.add(o),x(c,b,E),b.set(-.7,-.3,0),b.applyQuaternion(s),b.add(o),E.set(-.7,-o.y,0),E.applyQuaternion(s),E.add(o),x(h,b,E),b.set(.7,-.3,0),b.applyQuaternion(s),b.add(o),E.set(.7,-o.y,0),E.applyQuaternion(s),E.add(o),x(u,b,E)):(b.set(0,-.2,0),b.applyQuaternion(s),b.add(o),E.set(0,-o.y,0),E.applyQuaternion(s),E.add(o),x(u,b,E))}this.setAttribute("position",new r.BufferAttribute(new Float32Array(n),3)),this.setAttribute("normal",new r.BufferAttribute(new Float32Array(i),3))}}class a extends r.BufferGeometry{constructor(e,t){super();const n=[],i=new r.Vector3(0,1,0),s=new r.Vector3,a=new r.Quaternion,o=new r.Quaternion;o.setFromAxisAngle(i,Math.PI/2);const l=new r.Vector3,c=new r.Vector3;c.copy(e.getPointAt(0)),c.y=0;const h=new r.Vector3,u=new r.Vector3,d=new r.Vector3,p=new r.Vector3;for(let r=1;r<=t;r++){l.copy(e.getPointAt(r/t)),l.y=0,s.subVectors(l,c);const f=Math.atan2(s.x,s.z);a.setFromAxisAngle(i,f),h.set(-.3,0,0),h.applyQuaternion(a),h.add(l),u.set(.3,0,0),u.applyQuaternion(a),u.add(l),d.set(.3,0,0),d.applyQuaternion(o),d.add(c),p.set(-.3,0,0),p.applyQuaternion(o),p.add(c),n.push(h.x,h.y,h.z),n.push(u.x,u.y,u.z),n.push(p.x,p.y,p.z),n.push(u.x,u.y,u.z),n.push(d.x,d.y,d.z),n.push(p.x,p.y,p.z),c.copy(l),o.copy(a)}this.setAttribute("position",new r.BufferAttribute(new Float32Array(n),3))}}class o extends r.BufferGeometry{constructor(){super();const e=[];for(let t=0;t<100;t++){const t=800*Math.random()-400,n=50*Math.random()+50,r=800*Math.random()-400,i=40*Math.random()+20;e.push(t-i,n,r-i),e.push(t+i,n,r-i),e.push(t-i,n,r+i),e.push(t+i,n,r-i),e.push(t+i,n,r+i),e.push(t-i,n,r+i)}this.setAttribute("position",new r.BufferAttribute(new Float32Array(e),3))}}class l extends r.BufferGeometry{constructor(e){super();const t=[],n=[],i=new r.Raycaster;i.ray.direction.set(0,-1,0);const s=new r.Color;for(let r=0;r<2e3;r++){const r=500*Math.random()-250,a=500*Math.random()-250;i.ray.origin.set(r,50,a);const o=i.intersectObject(e);if(0===o.length)continue;const l=o[0].point.y,c=5*Math.random()+.5;let h=Math.random()*Math.PI*2;t.push(r+Math.sin(h),l,a+Math.cos(h)),t.push(r,l+c,a),t.push(r+Math.sin(h+Math.PI),l,a+Math.cos(h+Math.PI)),h+=Math.PI/2,t.push(r+Math.sin(h),l,a+Math.cos(h)),t.push(r,l+c,a),t.push(r+Math.sin(h+Math.PI),l,a+Math.cos(h+Math.PI));const u=.1*Math.random();for(let e=0;e<6;e++)s.setRGB(.2+u,.4+u,0,"srgb"),n.push(s.r,s.g,s.b)}this.setAttribute("position",new r.BufferAttribute(new Float32Array(t),3)),this.setAttribute("color",new r.BufferAttribute(new Float32Array(n),3))}}t.RollerCoasterGeometry=i,t.RollerCoasterLiftersGeometry=s,t.RollerCoasterShadowGeometry=a,t.SkyGeometry=o,t.TreesGeometry=l},53760:(e,t)=>{"use strict";var n=Object.defineProperty,r=(e,t,r)=>(((e,t,r)=>{t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function i(){!1===document.hidden&&this.reset()}t.Timer=class{constructor(){r(this,"_previousTime"),r(this,"_currentTime"),r(this,"_delta"),r(this,"_elapsed"),r(this,"_timescale"),r(this,"_useFixedDelta"),r(this,"_fixedDelta"),r(this,"_usePageVisibilityAPI"),r(this,"_pageVisibilityHandler"),this._previousTime=0,this._currentTime=0,this._delta=0,this._elapsed=0,this._timescale=1,this._useFixedDelta=!1,this._fixedDelta=16.67,this._usePageVisibilityAPI="undefined"!=typeof document&&void 0!==document.hidden}connect(){return this._usePageVisibilityAPI&&(this._pageVisibilityHandler=i.bind(this),document.addEventListener("visibilitychange",this._pageVisibilityHandler,!1)),this}dispose(){return this._usePageVisibilityAPI&&this._pageVisibilityHandler&&document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this}disableFixedDelta(){return this._useFixedDelta=!1,this}enableFixedDelta(){return this._useFixedDelta=!0,this}getDelta(){return this._delta/1e3}getElapsedTime(){return this._elapsed/1e3}getFixedDelta(){return this._fixedDelta/1e3}getTimescale(){return this._timescale}reset(){return this._currentTime=this._now(),this}setFixedDelta(e){return this._fixedDelta=1e3*e,this}setTimescale(e){return this._timescale=e,this}update(){return!0===this._useFixedDelta?this._delta=this._fixedDelta:(this._previousTime=this._currentTime,this._currentTime=this._now(),this._delta=this._currentTime-this._previousTime),this._delta*=this._timescale,this._elapsed+=this._delta,this}get elapsedTime(){return this.getElapsedTime()}_now(){return("undefined"==typeof performance?Date:performance).now()}}},25740:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.TubePainter=function(){const e=3e6,t=new r.BufferAttribute(new Float32Array(e),3);t.usage=r.DynamicDrawUsage;const n=new r.BufferAttribute(new Float32Array(e),3);n.usage=r.DynamicDrawUsage;const i=new r.BufferAttribute(new Float32Array(e),3);i.usage=r.DynamicDrawUsage;const s=new r.BufferGeometry;s.setAttribute("position",t),s.setAttribute("normal",n),s.setAttribute("color",i),s.drawRange.count=0;const a=new r.MeshStandardMaterial({vertexColors:!0}),o=new r.Mesh(s,a);o.frustumCulled=!1;const l=new r.Vector3,c=new r.Vector3,h=new r.Vector3,u=new r.Vector3,d=new r.Color(16777215);let p=1;function f(e,a,o,f){if(0===e.distanceToSquared(a))return;let m=s.drawRange.count;const g=function(e){const t=2*Math.PI,n=[],i=.01*e;for(let s=0;s<10;s++){const e=s/10*t;n.push(new r.Vector3(Math.sin(e)*i,Math.cos(e)*i,0))}return n}(p);for(let r=0,s=g.length;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(40016);t.Volume=class{constructor(e,t,n,i,s){if(void 0!==e){switch(this.xLength=Number(e)||1,this.yLength=Number(t)||1,this.zLength=Number(n)||1,this.axisOrder=["x","y","z"],i){case"Uint8":case"uint8":case"uchar":case"unsigned char":case"uint8_t":default:this.data=new Uint8Array(s);break;case"Int8":case"int8":case"signed char":case"int8_t":this.data=new Int8Array(s);break;case"Int16":case"int16":case"short":case"short int":case"signed short":case"signed short int":case"int16_t":this.data=new Int16Array(s);break;case"Uint16":case"uint16":case"ushort":case"unsigned short":case"unsigned short int":case"uint16_t":this.data=new Uint16Array(s);break;case"Int32":case"int32":case"int":case"signed int":case"int32_t":this.data=new Int32Array(s);break;case"Uint32":case"uint32":case"uint":case"unsigned int":case"uint32_t":this.data=new Uint32Array(s);break;case"longlong":case"long long":case"long long int":case"signed long long":case"signed long long int":case"int64":case"int64_t":case"ulonglong":case"unsigned long long":case"unsigned long long int":case"uint64":case"uint64_t":throw new Error("Error in Volume constructor : this type is not supported in JavaScript");case"Float32":case"float32":case"float":this.data=new Float32Array(s);break;case"Float64":case"float64":case"double":this.data=new Float64Array(s)}if(this.data.length!==this.xLength*this.yLength*this.zLength)throw new Error("Error in Volume constructor, lengths are not matching arrayBuffer size")}this.spacing=[1,1,1],this.offset=[0,0,0],this.matrix=new r.Matrix3,this.matrix.identity();let a=-1/0;Object.defineProperty(this,"lowerThreshold",{get:function(){return a},set:function(e){a=e,this.sliceList.forEach((function(e){e.geometryNeedsUpdate=!0}))}});let o=1/0;Object.defineProperty(this,"upperThreshold",{get:function(){return o},set:function(e){o=e,this.sliceList.forEach((function(e){e.geometryNeedsUpdate=!0}))}}),this.sliceList=[],this.segmentation=!1}getData(e,t,n){return this.data[n*this.xLength*this.yLength+t*this.xLength+e]}access(e,t,n){return n*this.xLength*this.yLength+t*this.xLength+e}reverseAccess(e){const t=Math.floor(e/(this.yLength*this.xLength)),n=Math.floor((e-t*this.yLength*this.xLength)/this.xLength);return[e-t*this.yLength*this.xLength-n*this.xLength,n,t]}map(e,t){const n=this.data.length;t=t||this;for(let r=0;r.9})),y=[l,c,o].find((function(e){return Math.abs(e.dot(A[1]))>.9})),x=[l,c,o].find((function(e){return Math.abs(e.dot(A[2]))>.9}));return{iLength:p,jLength:f,sliceAccess:function(e,t){const n=v===o?a:"i"===v.arglet?e:t,r=y===o?a:"i"===y.arglet?e:t,i=x===o?a:"i"===x.arglet?e:t,s=v.dot(A[0])>0?n:u.xLength-1-n,l=y.dot(A[1])>0?r:u.yLength-1-r,c=x.dot(A[2])>0?i:u.zLength-1-i;return u.access(s,l,c)},matrix:h,planeWidth:m,planeHeight:g}}extractSlice(e,t){const n=new i.VolumeSlice(this,t,e);return this.sliceList.push(n),n}repaintAllSlices(){return this.sliceList.forEach((function(e){e.repaint()})),this}computeMinMax(){let e=1/0,t=-1/0;const n=this.data.length;let r=0;for(r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.VolumeSlice=class{constructor(e,t,n){const i=this;this.volume=e,t=t||0,Object.defineProperty(this,"index",{get:function(){return t},set:function(e){return t=e,i.geometryNeedsUpdate=!0,t}}),this.axis=n||"z",this.canvas=document.createElement("canvas"),this.canvasBuffer=document.createElement("canvas"),this.updateGeometry();const s=new r.Texture(this.canvas);s.minFilter=r.LinearFilter,s.wrapS=s.wrapT=r.ClampToEdgeWrapping,"colorSpace"in s?s.colorSpace="srgb":s.encoding=3001;const a=new r.MeshBasicMaterial({map:s,side:r.DoubleSide,transparent:!0});this.mesh=new r.Mesh(this.geometry,a),this.mesh.matrixAutoUpdate=!1,this.geometryNeedsUpdate=!0,this.repaint()}repaint(){this.geometryNeedsUpdate&&this.updateGeometry();const e=this.iLength,t=this.jLength,n=this.sliceAccess,r=this.volume,i=this.canvasBuffer,s=this.ctxBuffer,a=s.getImageData(0,0,e,t),o=a.data,l=r.data,c=r.upperThreshold,h=r.lowerThreshold,u=r.windowLow,d=r.windowHigh;let p=0;if("label"===r.dataType)for(let f=0;f=this.colorMap.length?e%this.colorMap.length+1:e;const r=this.colorMap[e];o[4*p]=r>>24&255,o[4*p+1]=r>>16&255,o[4*p+2]=r>>8&255,o[4*p+3]=255&r,p++}else for(let f=0;f=e&&h<=e?r:0,e=Math.floor(255*(e-u)/(d-u)),e=e>255?255:e<0?0:0|e,o[4*p]=e,o[4*p+1]=e,o[4*p+2]=e,o[4*p+3]=r,p++}s.putImageData(a,0,0),this.ctx.drawImage(i,0,0,e,t,0,0,this.canvas.width,this.canvas.height),this.mesh.material.map.needsUpdate=!0}updateGeometry(){const e=this.volume.extractPerpendicularPlane(this.axis,this.index);this.sliceAccess=e.sliceAccess,this.jLength=e.jLength,this.iLength=e.iLength,this.matrix=e.matrix,this.canvas.width=e.planeWidth,this.canvas.height=e.planeHeight,this.canvasBuffer.width=this.iLength,this.canvasBuffer.height=this.jLength,this.ctx=this.canvas.getContext("2d"),this.ctxBuffer=this.canvasBuffer.getContext("2d"),this.geometry&&this.geometry.dispose(),this.geometry=new r.PlaneGeometry(e.planeWidth,e.planeHeight),this.mesh&&(this.mesh.geometry=this.geometry,this.mesh.matrix.identity(),this.mesh.applyMatrix4(this.matrix)),this.geometryNeedsUpdate=!1}}},10980:(e,t)=>{"use strict";let n,r;function i(e){const t={1:window.WebGLRenderingContext,2:window.WebGL2RenderingContext},n=document.createElement("div");n.id="webglmessage",n.style.fontFamily="monospace",n.style.fontSize="13px",n.style.fontWeight="normal",n.style.textAlign="center",n.style.background="#fff",n.style.color="#000",n.style.padding="1.5em",n.style.width="400px",n.style.margin="5em auto 0";let r='Your $0 does not seem to support $1';return r=t[e]?r.replace("$0","graphics card"):r.replace("$0","browser"),r=r.replace("$1",{1:"WebGL",2:"WebGL 2"}[e]),n.innerHTML=r,n}Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.getErrorMessage=i,t.getWebGL2ErrorMessage=function(){return i(2)},t.getWebGLErrorMessage=function(){return i(1)},t.isWebGL2Available=function(){var e;if(void 0!==r)return r;try{let t;const n=document.createElement("canvas");return r=!(!window.WebGL2RenderingContext||!(t=n.getContext("webgl2"))),t&&(null==(e=t.getExtension("WEBGL_lose_context"))||e.loseContext()),r}catch(t){return r=!1}},t.isWebGLAvailable=function(){var e;if(void 0!==n)return n;try{let t;const r=document.createElement("canvas");return n=!(!window.WebGLRenderingContext||!(t=r.getContext("webgl"))),t&&(null==(e=t.getExtension("WEBGL_lose_context"))||e.loseContext()),n}catch(t){return n=!1}}},26684:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=1024,o=(e=1)=>{const t=new Float32Array(4096*e*4),n=new s.DataTexture(t,a,4*e,s.RGBAFormat,s.FloatType);return n.wrapS=s.RepeatWrapping,n.wrapT=s.RepeatWrapping,n.magFilter=s.NearestFilter,n.needsUpdate=!0,n},l=(e,t,n=0)=>{const r=Math.floor(1024);t.arcLengthDivisions=r/2,t.updateArcLengths();const i=t.getSpacedPoints(r),s=t.computeFrenetFrames(r,!0);for(let o=0;o{const a=e.image,{data:o}=a,l=4096*s;o[4*t+l+0]=n,o[4*t+l+1]=r,o[4*t+l+2]=i,o[4*t+l+3]=1},h=e=>({spineTexture:{value:e},pathOffset:{type:"f",value:0},pathSegment:{type:"f",value:1},spineOffset:{type:"f",value:161},spineLength:{type:"f",value:400},flow:{type:"i",value:1}});function u(e,t,n=1){e.__ok||(e.__ok=!0,e.onBeforeCompile=e=>{if(e.__modified)return;e.__modified=!0,Object.assign(e.uniforms,t);const r=`\n\t\tuniform sampler2D spineTexture;\n\t\tuniform float pathOffset;\n\t\tuniform float pathSegment;\n\t\tuniform float spineOffset;\n\t\tuniform float spineLength;\n\t\tuniform int flow;\n\n\t\tfloat textureLayers = ${4*n}.;\n\t\tfloat textureStacks = 1.;\n\n\t\t${e.vertexShader}\n\t\t`.replace("#include ","").replace("#include ","").replace("#include ","").replace(/void\s*main\s*\(\)\s*\{/,"\n void main() {\n #include \n\n vec4 worldPos = modelMatrix * vec4(position, 1.);\n\n bool bend = flow > 0;\n float xWeight = bend ? 0. : 1.;\n\n #ifdef USE_INSTANCING\n float pathOffsetFromInstanceMatrix = instanceMatrix[3][2];\n float spineLengthFromInstanceMatrix = instanceMatrix[3][0];\n float spinePortion = bend ? (worldPos.x + spineOffset) / spineLengthFromInstanceMatrix : 0.;\n float mt = (spinePortion * pathSegment + pathOffset + pathOffsetFromInstanceMatrix)*textureStacks;\n #else\n float spinePortion = bend ? (worldPos.x + spineOffset) / spineLength : 0.;\n float mt = (spinePortion * pathSegment + pathOffset)*textureStacks;\n #endif\n\n mt = mod(mt, textureStacks);\n float rowOffset = floor(mt);\n\n #ifdef USE_INSTANCING\n rowOffset += instanceMatrix[3][1] * 4.;\n #endif\n\n vec3 spinePos = texture2D(spineTexture, vec2(mt, (0. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 a = texture2D(spineTexture, vec2(mt, (1. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 b = texture2D(spineTexture, vec2(mt, (2. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 c = texture2D(spineTexture, vec2(mt, (3. + rowOffset + 0.5) / textureLayers)).xyz;\n mat3 basis = mat3(a, b, c);\n\n vec3 transformed = basis\n * vec3(worldPos.x * xWeight, worldPos.y * 1., worldPos.z * 1.)\n + spinePos;\n\n vec3 transformedNormal = normalMatrix * (basis * objectNormal);\n\t\t\t").replace("#include ","vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n\t\t\t\tgl_Position = projectionMatrix * mvPosition;");e.vertexShader=r})}class d{constructor(e,t=1){i(this,"curveArray"),i(this,"curveLengthArray"),i(this,"object3D"),i(this,"splineTexure"),i(this,"uniforms");const n=e.clone(),r=o(t),a=h(r);n.traverse((e=>{(e instanceof s.Mesh||e instanceof s.InstancedMesh)&&(e.material=e.material.clone(),u(e.material,a,t))})),this.curveArray=new Array(t),this.curveLengthArray=new Array(t),this.object3D=n,this.splineTexure=r,this.uniforms=a}updateCurve(e,t){if(e>=this.curveArray.length)throw Error("Index out of range for Flow");const n=t.getLength();this.uniforms.spineLength.value=n,this.curveLengthArray[e]=n,this.curveArray[e]=t,l(this.splineTexure,t,e)}moveAlongCurve(e){this.uniforms.pathOffset.value+=e}}const p=new s.Matrix4;t.Flow=d,t.InstancedFlow=class extends d{constructor(e,t,n,r){const a=new s.InstancedMesh(n,r,e);a.instanceMatrix.setUsage(s.DynamicDrawUsage),a.frustumCulled=!1,super(a,t),i(this,"offsets"),i(this,"whichCurve"),this.offsets=new Array(e).fill(0),this.whichCurve=new Array(e).fill(0)}writeChanges(e){p.makeTranslation(this.curveLengthArray[this.whichCurve[e]],this.whichCurve[e],this.offsets[e]),this.object3D.setMatrixAt(e,p),this.object3D.instanceMatrix.needsUpdate=!0}moveIndividualAlongCurve(e,t){this.offsets[e]+=t,this.writeChanges(e)}setCurve(e,t){if(isNaN(t))throw Error("curve index being set is Not a Number (NaN)");this.whichCurve[e]=t,this.writeChanges(e)}},t.getUniforms=h,t.initSplineTexture=o,t.modifyShader=u,t.updateSplineTexture=l},96800:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(8636);t.EdgeSplitModifier=class{constructor(){i(this,"A",new s.Vector3),i(this,"B",new s.Vector3),i(this,"C",new s.Vector3),i(this,"positions",[]),i(this,"normals",new Float32Array),i(this,"indexes",[]),i(this,"pointToIndexMap",[]),i(this,"splitIndexes",[]),i(this,"oldNormals",[]),i(this,"computeNormals",(()=>{this.normals=new Float32Array(3*this.indexes.length);for(let e=0;e{this.pointToIndexMap=Array(this.positions.length/3);for(let e=0;e{this.A.set(this.normals[3*n],this.normals[3*n+1],this.normals[3*n+2]).normalize();const r={splitGroup:[],currentGroup:[n]};for(let i of e)i!==n&&(this.B.set(this.normals[3*i],this.normals[3*i+1],this.normals[3*i+2]).normalize(),this.B.dot(this.A){if(0===e.length)return;const r=[];for(let s of e)r.push(this.edgeSplitToGroups(e,t,s));let i=r[0];for(let s of r)s.currentGroup.length>i.currentGroup.length&&(i=s);null!=n&&this.splitIndexes.push({original:n,indexes:i.currentGroup}),i.splitGroup.length&&this.edgeSplit(i.splitGroup,t,n||i.currentGroup[0])})),i(this,"modify",((e,t,n=!0)=>{let r=!1;if(e.attributes.normal&&(r=!0,e=e.clone(),!0===n&&null!==e.index&&(this.oldNormals=e.attributes.normal.array),e.deleteAttribute("normal")),null==e.index){if(void 0===a)throw"THREE.EdgeSplitModifier relies on BufferGeometryUtils";e=a.mergeVertices(e)}this.indexes=e.index.array,this.positions=e.getAttribute("position").array,this.computeNormals(),this.mapPositionsToIndexes(),this.splitIndexes=[];for(let s of this.pointToIndexMap)this.edgeSplit(s,Math.cos(t)-.001);const i={};for(let a of Object.keys(e.attributes)){const t=e.attributes[a],n=new t.array.constructor((this.indexes.length+this.splitIndexes.length)*t.itemSize);n.set(t.array),i[a]=new s.BufferAttribute(n,t.itemSize,t.normalized)}const o=new Uint32Array(this.indexes.length);o.set(this.indexes);for(let s=0;s{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(8636),o=new s.Vector3,l=new s.Vector3;function c(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class h{constructor(e,t){i(this,"position"),i(this,"id"),i(this,"faces"),i(this,"neighbors"),i(this,"collapseCost"),i(this,"collapseNeighbor"),i(this,"minCost",0),i(this,"totalCost",0),i(this,"costCount",0),this.position=e,this.id=t,this.faces=[],this.neighbors=[],this.collapseCost=0,this.collapseNeighbor=null}addUniqueNeighbor(e){var t,n;t=this.neighbors,n=e,-1===t.indexOf(n)&&t.push(n)}removeIfNonNeighbor(e){const t=this.neighbors,n=this.faces,r=t.indexOf(e);if(-1!==r){for(let t=0;t{const n=t.position.distanceTo(e.position);let r=0;const i=[];let s,a,o,l=e.faces.length;for(s=0;s{if(0===e.neighbors.length)return e.collapseNeighbor=null,void(e.collapseCost=-.01);e.collapseCost=1e5,e.collapseNeighbor=null;for(let t=0;t{c(t,e),e.v1&&c(e.v1.faces,e),e.v2&&c(e.v2.faces,e),e.v3&&c(e.v3.faces,e);const n=[e.v1,e.v2,e.v3];let r,i;for(let s=0;s<3;s++)r=n[s],i=n[(s+1)%3],r&&i&&(r.removeIfNonNeighbor(i),i.removeIfNonNeighbor(r))})),i(this,"collapse",((e,t,n,r)=>{if(!r)return void this.removeVertex(n,e);let i;const s=[];for(i=0;i=0;i--)n.faces[i].hasVertex(r)&&this.removeFace(n.faces[i],t);for(i=n.faces.length-1;i>=0;i--)n.faces[i].replaceVertex(n,r);for(this.removeVertex(n,e),i=0;i{let t=e[0];for(let n=0;n{const n=(e=e.clone()).attributes;for(let s in n)"position"!==s&&e.deleteAttribute(s);const r=[],i=[],o=(e=a.mergeVertices(e)).getAttribute("position");for(let a=0;a{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);t.TessellateModifier=class{constructor(e=.1,t=6){i(this,"maxEdgeLength"),i(this,"maxIterations"),i(this,"modify",(e=>{null!==e.index&&(e=e.toNonIndexed());const t=this.maxIterations,n=this.maxEdgeLength*this.maxEdgeLength,r=new s.Vector3,i=new s.Vector3,a=new s.Vector3,o=new s.Vector3,l=[r,i,a,o],c=new s.Vector3,h=new s.Vector3,u=new s.Vector3,d=new s.Vector3,p=[c,h,u,d],f=new s.Color,m=new s.Color,g=new s.Color,A=new s.Color,v=[f,m,g,A],y=new s.Vector2,x=new s.Vector2,b=new s.Vector2,E=new s.Vector2,_=[y,x,b,E],S=new s.Vector2,M=new s.Vector2,w=new s.Vector2,C=new s.Vector2,T=[S,M,w,C],I=e.attributes,B=void 0!==I.normal,R=void 0!==I.color,P=void 0!==I.uv,D=void 0!==I.uv2;let L=I.position.array,F=B?I.normal.array:null,U=R?I.color.array:null,O=P?I.uv.array:null,N=D?I.uv2.array:null,k=L,G=F,z=U,Q=O,V=N,H=0,j=!0;function W(e,t,n){const r=l[e],i=l[t],s=l[n];if(k.push(r.x,r.y,r.z),k.push(i.x,i.y,i.z),k.push(s.x,s.y,s.z),B){const r=p[e],i=p[t],s=p[n];G.push(r.x,r.y,r.z),G.push(i.x,i.y,i.z),G.push(s.x,s.y,s.z)}if(R){const r=v[e],i=v[t],s=v[n];z.push(r.r,r.g,r.b),z.push(i.r,i.g,i.b),z.push(s.r,s.g,s.b)}if(P){const r=_[e],i=_[t],s=_[n];Q.push(r.x,r.y),Q.push(i.x,i.y),Q.push(s.x,s.y)}if(D){const r=T[e],i=T[t],s=T[n];V.push(r.x,r.y),V.push(i.x,i.y),V.push(s.x,s.y)}}for(;j&&Hn||l>n||p>n?(j=!0,s>=l&&s>=p?(o.lerpVectors(r,i,.5),B&&d.lerpVectors(c,h,.5),R&&A.lerpColors(f,m,.5),P&&E.lerpVectors(y,x,.5),D&&C.lerpVectors(S,M,.5),W(0,3,2),W(3,1,2)):l>=s&&l>=p?(o.lerpVectors(i,a,.5),B&&d.lerpVectors(h,u,.5),R&&A.lerpColors(m,g,.5),P&&E.lerpVectors(x,b,.5),D&&C.lerpVectors(M,w,.5),W(0,1,3),W(3,2,0)):(o.lerpVectors(r,a,.5),B&&d.lerpVectors(c,u,.5),R&&A.lerpColors(f,g,.5),P&&E.lerpVectors(y,b,.5),D&&C.lerpVectors(S,w,.5),W(0,1,3),W(3,1,2))):W(0,1,2)}}const X=new s.BufferGeometry;return X.setAttribute("position",new s.Float32BufferAttribute(k,3)),B&&X.setAttribute("normal",new s.Float32BufferAttribute(G,3)),R&&X.setAttribute("color",new s.Float32BufferAttribute(z,3)),P&&X.setAttribute("uv",new s.Float32BufferAttribute(Q,2)),D&&X.setAttribute("uv2",new s.Float32BufferAttribute(V,2)),X})),this.maxEdgeLength=e,this.maxIterations=t}}},83180:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a="_batch_id_",o=new s.Matrix4,l=(new s.Matrix4).set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1),c=`\n#ifdef BATCHING\n\tattribute float ${a};\n\tuniform highp sampler2D batchingTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\n\t}\n#endif\n`,h=`\n#ifdef BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( ${a} );\n#endif\n`;function u(e,t,n=0){const r=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){const i=e.count;for(let s=0;s","#include \n"+c).replace("#include ","#include \n"+h).replace("#include ","#include \n\n#ifdef BATCHING\n\tobjectNormal = vec4( batchingMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( batchingMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif\n").replace("#include ","#include \n\n#ifdef BATCHING\n\ttransformed = ( batchingMatrix * vec4( transformed, 1.0 ) ).xyz;\n#endif\n");for(const t in n)e.uniforms[t]=n[t];t.call(this,e,r)},e.defines=e.defines||{},e.defines.BATCHING=!1}_initializeGeometry(e){const t=this.geometry,n=this._maxVertexCount,r=this._maxGeometryCount,i=this._maxIndexCount;if(!1===this._geometryInitialized){for(const r in e.attributes){const i=e.getAttribute(r),{array:s,itemSize:a,normalized:o}=i,l=new s.constructor(n*a),c=new i.constructor(l,a,o);c.setUsage(i.usage),t.setAttribute(r,c)}if(null!==e.getIndex()){const e=n>65536?new Uint32Array(i):new Uint16Array(i);t.setIndex(new s.BufferAttribute(e,1))}const o=r>65536?new Uint32Array(n):new Uint16Array(n);t.setAttribute(a,new s.BufferAttribute(o,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute(a))throw new Error(`BatchedMesh: Geometry cannot use attribute "${a}"`);const t=this.geometry;if(Boolean(e.getIndex())!==Boolean(t.getIndex()))throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const n in t.attributes){if(n===a)continue;if(!e.hasAttribute(n))throw new Error(`BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const r=e.getAttribute(n),i=t.getAttribute(n);if(r.itemSize!==i.itemSize||r.normalized!==i.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}getGeometryCount(){return this._geometryCount}getVertexCount(){const e=this._reservedRanges;if(0===e.length)return 0;{const t=e[e.length-1];return t.vertexStart+t.vertexCount}}getIndexCount(){const e=this._reservedRanges;if(null===this.geometry.getIndex()||0===e.length)return 0;{const t=e[e.length-1];return t.indexStart+t.indexCount}}addGeometry(e,t=-1,n=-1){if(this._initializeGeometry(e),this._validateGeometry(e),this._geometryCount>=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const r={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let i=null;const l=this._reservedRanges;if(0!==this._geometryCount&&(i=l[l.length-1]),r.vertexCount=-1===t?e.getAttribute("position").count:t,r.vertexStart=null===i?0:i.vertexStart+i.vertexCount,null!==e.getIndex()&&(r.indexCount=-1===n?e.getIndex().count:n,r.indexStart=null===i?0:i.indexStart+i.indexCount),-1!==r.indexStart&&r.indexStart+r.indexCount>this._maxIndexCount||r.vertexStart+r.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const c=this._indexCounts,h=this._indexStarts,u=this._vertexCounts,d=this._vertexStarts,p=this._visible,f=this._active,m=this._matricesTexture,g=this._matrices,A=this._matricesTexture.image.data;p.push(!0),f.push(!0);const v=this._geometryCount;this._geometryCount++,g.push(new s.Matrix4),o.toArray(A,16*v),m.needsUpdate=!0,l.push(r),d.push(r.vertexStart),u.push(r.vertexCount),null!==e.getIndex()&&(h.push(r.indexCount),c.push(r.indexCount));const y=this.geometry.getAttribute(a);for(let s=0;s=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this._reservedRanges[e];if(null!==t.getIndex()&&t.getIndex().count>n.indexCount||t.attributes.position.count>n.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const r=this.geometry,i=t.getAttribute("position"),s=null!==r.getIndex(),o=r.getIndex(),l=t.getIndex(),c=n.vertexStart,h=n.vertexCount;for(const d in r.attributes){if(d===a)continue;const e=t.getAttribute(d),n=r.getAttribute(d);u(e,n,c);const i=e.itemSize;for(let t=e.count,r=h;t=t.length||!1===t[e]||(t[e]=!1,l.toArray(r,16*e),n.needsUpdate=!0),this}optimize(){throw new Error("BatchedMesh: Optimize function not implemented.")}setMatrixAt(e,t){const n=this._visible,r=this._active,i=this._matricesTexture,s=this._matrices,a=i.image.data;return e>=s.length||!1===r[e]||(!0===n[e]&&(t.toArray(a,16*e),i.needsUpdate=!0),s[e].copy(t)),this}getMatrixAt(e,t){const n=this._matrices,r=this._active;return e>=n.length||!1===r[e]?t:t.copy(n[e])}setVisibleAt(e,t){const n=this._visible,r=this._active,i=this._matricesTexture,s=this._matrices,a=i.image.data;return e>=n.length||!1===r[e]||n[e]===t||(!0===t?s[e].toArray(a,16*e):l.toArray(a,16*e),i.needsUpdate=!0,n[e]=t),this}getVisibleAt(e){const t=this._visible,n=this._active;return!(e>=t.length||!1===n[e])&&t[e]}raycast(){console.warn("BatchedMesh: Raycast function not implemented.")}copy(){throw new Error("BatchedMesh: Copy function not implemented.")}toJSON(){throw new Error("BatchedMesh: toJSON function not implemented.")}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}}t.BatchedMesh=d},67128:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Mesh{constructor(e,t){var n,i;const s=(a=e)&&a.isCubeTexture;var a;const o=(null!=(i=s?null==(n=e.image[0])?void 0:n.width:e.image.width)?i:1024)/4,l=Math.floor(Math.log2(o)),c=Math.pow(2,l),h=[s?"#define ENVMAP_TYPE_CUBE":"","#define CUBEUV_TEXEL_WIDTH "+1/(3*Math.max(c,112)),"#define CUBEUV_TEXEL_HEIGHT "+1/(4*c),`#define CUBEUV_MAX_MIP ${l}.0`].join("\n")+`\n #define ENVMAP_TYPE_CUBE_UV\n varying vec3 vWorldPosition;\n uniform float radius;\n uniform float height;\n uniform float angle;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube map;\n #else\n uniform sampler2D map;\n #endif\n // From: https://www.shadertoy.com/view/4tsBD7\n float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) \n {\n float d = dot ( rd, n );\n \n if( d > 0.0 ) { return 1e6; }\n \n vec3 o = ro - c;\n float t = - dot( n, o ) / d;\n vec3 q = o + rd * t;\n \n return ( dot( q, q ) < r * r ) ? t : 1e6;\n }\n // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm\n float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) \n {\n vec3 oc = ro - ce;\n float b = dot( oc, rd );\n float c = dot( oc, oc ) - ra * ra;\n float h = b * b - c;\n \n if( h < 0.0 ) { return -1.0; }\n \n h = sqrt( h );\n \n return - b + h;\n }\n vec3 project() \n {\n vec3 p = normalize( vWorldPosition );\n vec3 camPos = cameraPosition;\n camPos.y -= height;\n float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius );\n if( intersection > 0.0 ) {\n \n vec3 h = vec3( 0.0, - height, 0.0 );\n float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius );\n p = ( camPos + min( intersection, intersection2 ) * p ) / radius;\n } else {\n p = vec3( 0.0, 1.0, 0.0 );\n }\n return p;\n }\n #include \n #include \n void main() \n {\n vec3 projectedWorldPosition = project();\n \n #ifdef ENVMAP_TYPE_CUBE\n vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb;\n #else\n vec3 direction = normalize( projectedWorldPosition );\n vec2 uv = equirectUv( direction );\n vec3 outcolor = texture2D( map, uv ).rgb;\n #endif\n gl_FragColor = vec4( outcolor, 1.0 );\n #include \n #include <${parseInt(r.REVISION.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}>\n }\n `,u={map:{value:e},height:{value:(null==t?void 0:t.height)||15},radius:{value:(null==t?void 0:t.radius)||100}};super(new r.IcosahedronGeometry(1,16),new r.ShaderMaterial({uniforms:u,fragmentShader:h,vertexShader:"\n varying vec3 vWorldPosition;\n void main() \n {\n vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) );\n vWorldPosition = worldPosition.xyz;\n \n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n ",side:r.DoubleSide}))}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}}t.GroundProjectedEnv=i},5107:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=new s.BufferGeometry,o=new Float32Array([-1,-1,0,0,0,1,-1,0,1,0,1,1,0,1,1,-1,1,0,0,1]),l=new s.InterleavedBuffer(o,5);a.setIndex([0,1,2,0,2,3]),a.setAttribute("position",new s.InterleavedBufferAttribute(l,3,0,!1)),a.setAttribute("uv",new s.InterleavedBufferAttribute(l,2,3,!1));const c=class extends s.Mesh{constructor(){super(c.Geometry,new s.MeshBasicMaterial({opacity:0,transparent:!0})),this.isLensflare=!0,this.type="Lensflare",this.frustumCulled=!1,this.renderOrder=1/0;const e=new s.Vector3,t=new s.Vector3,n=new s.DataTexture(new Uint8Array(768),16,16,s.RGBAFormat);n.minFilter=s.NearestFilter,n.magFilter=s.NearestFilter,n.wrapS=s.ClampToEdgeWrapping,n.wrapT=s.ClampToEdgeWrapping;const r=new s.DataTexture(new Uint8Array(768),16,16,s.RGBAFormat);r.minFilter=s.NearestFilter,r.magFilter=s.NearestFilter,r.wrapS=s.ClampToEdgeWrapping,r.wrapT=s.ClampToEdgeWrapping;const i=c.Geometry,a=new s.RawShaderMaterial({uniforms:{scale:{value:null},screenPosition:{value:null}},vertexShader:"\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tuniform vec3 screenPosition;\n\t\t\t\tuniform vec2 scale;\n\n\t\t\t\tattribute vec3 position;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tgl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 );\n\n\t\t\t\t}",fragmentShader:"\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tgl_FragColor = vec4( 1.0, 0.0, 1.0, 1.0 );\n\n\t\t\t\t}",depthTest:!0,depthWrite:!1,transparent:!1}),o=new s.RawShaderMaterial({uniforms:{map:{value:n},scale:{value:null},screenPosition:{value:null}},vertexShader:"\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tuniform vec3 screenPosition;\n\t\t\t\tuniform vec2 scale;\n\n\t\t\t\tattribute vec3 position;\n\t\t\t\tattribute vec2 uv;\n\n\t\t\t\tvarying vec2 vUV;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvUV = uv;\n\n\t\t\t\t\tgl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 );\n\n\t\t\t\t}",fragmentShader:"\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tuniform sampler2D map;\n\n\t\t\t\tvarying vec2 vUV;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tgl_FragColor = texture2D( map, vUV );\n\n\t\t\t\t}",depthTest:!1,depthWrite:!1,transparent:!1}),l=new s.Mesh(i,a),h=[],d=u.Shader,p=new s.RawShaderMaterial({uniforms:{map:{value:null},occlusionMap:{value:r},color:{value:new s.Color(16777215)},scale:{value:new s.Vector2},screenPosition:{value:new s.Vector3}},vertexShader:d.vertexShader,fragmentShader:d.fragmentShader,blending:s.AdditiveBlending,transparent:!0,depthWrite:!1}),f=new s.Mesh(i,p);this.addElement=function(e){h.push(e)};const m=new s.Vector2,g=new s.Vector2,A=new s.Box2,v=new s.Vector4;this.onBeforeRender=function(s,c,u){s.getCurrentViewport(v);const d=v.w/v.z,y=v.z/2,x=v.w/2;let b=16/v.w;if(m.set(b*d,b),A.min.set(v.x,v.y),A.max.set(v.x+(v.z-16),v.y+(v.w-16)),t.setFromMatrixPosition(this.matrixWorld),t.applyMatrix4(u.matrixWorldInverse),!(t.z>0)&&(e.copy(t).applyMatrix4(u.projectionMatrix),g.x=v.x+e.x*y+y-8,g.y=v.y+e.y*x+x-8,A.containsPoint(g))){s.copyFramebufferToTexture(g,n);let t=a.uniforms;t.scale.value=m,t.screenPosition.value=e,s.renderBufferDirect(u,null,i,a,l,null),s.copyFramebufferToTexture(g,r),t=o.uniforms,t.scale.value=m,t.screenPosition.value=e,s.renderBufferDirect(u,null,i,o,l,null);const c=2*-e.x,d=2*-e.y;for(let n=0,r=h.length;n{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(44920);class s extends r.Object3D{constructor(e={}){super(),this.isLightningStorm=!0,this.stormParams=e,e.size=void 0!==e.size?e.size:1e3,e.minHeight=void 0!==e.minHeight?e.minHeight:80,e.maxHeight=void 0!==e.maxHeight?e.maxHeight:100,e.maxSlope=void 0!==e.maxSlope?e.maxSlope:1.1,e.maxLightnings=void 0!==e.maxLightnings?e.maxLightnings:3,e.lightningMinPeriod=void 0!==e.lightningMinPeriod?e.lightningMinPeriod:3,e.lightningMaxPeriod=void 0!==e.lightningMaxPeriod?e.lightningMaxPeriod:7,e.lightningMinDuration=void 0!==e.lightningMinDuration?e.lightningMinDuration:1,e.lightningMaxDuration=void 0!==e.lightningMaxDuration?e.lightningMaxDuration:2.5,this.lightningParameters=i.LightningStrike.copyParameters(e.lightningParameters,e.lightningParameters),this.lightningParameters.isEternal=!1,this.lightningMaterial=void 0!==e.lightningMaterial?e.lightningMaterial:new r.MeshBasicMaterial({color:11599871}),void 0!==e.onRayPosition?this.onRayPosition=e.onRayPosition:this.onRayPosition=function(t,n){n.set((Math.random()-.5)*e.size,0,(Math.random()-.5)*e.size);const i=r.MathUtils.lerp(e.minHeight,e.maxHeight,Math.random());t.set(e.maxSlope*(2*Math.random()-1),1,e.maxSlope*(2*Math.random()-1)).multiplyScalar(i).add(n)},this.onLightningDown=e.onLightningDown,this.inited=!1,this.nextLightningTime=0,this.lightningsMeshes=[],this.deadLightningsMeshes=[];for(let t=0;t=this.nextLightningTime){const t=this.deadLightningsMeshes.pop();if(t){const n=i.LightningStrike.copyParameters(t.geometry.rayParameters,this.lightningParameters);n.birthTime=e,n.deathTime=e+r.MathUtils.lerp(this.stormParams.lightningMinDuration,this.stormParams.lightningMaxDuration,Math.random()),this.onRayPosition(n.sourceOffset,n.destOffset),n.noiseSeed=Math.random(),this.add(t),this.lightningsMeshes.push(t)}this.nextLightningTime=this.getNextLightningTime(e)}let t=0,n=this.lightningsMeshes.length;for(;ta&&this.onLightningDown&&this.onLightningDown(s),s.state===i.LightningStrike.RAY_EXTINGUISHED?(this.lightningsMeshes.splice(this.lightningsMeshes.indexOf(r),1),this.deadLightningsMeshes.push(r),this.remove(r),n--):t++}}getNextLightningTime(e){return e+r.MathUtils.lerp(this.stormParams.lightningMinPeriod,this.stormParams.lightningMaxPeriod,Math.random())/(this.stormParams.maxLightnings+1)}copy(e,t){return super.copy(e,t),this.stormParams.size=e.stormParams.size,this.stormParams.minHeight=e.stormParams.minHeight,this.stormParams.maxHeight=e.stormParams.maxHeight,this.stormParams.maxSlope=e.stormParams.maxSlope,this.stormParams.maxLightnings=e.stormParams.maxLightnings,this.stormParams.lightningMinPeriod=e.stormParams.lightningMinPeriod,this.stormParams.lightningMaxPeriod=e.stormParams.lightningMaxPeriod,this.stormParams.lightningMinDuration=e.stormParams.lightningMinDuration,this.stormParams.lightningMaxDuration=e.stormParams.lightningMaxDuration,this.lightningParameters=i.LightningStrike.copyParameters({},e.lightningParameters),this.lightningMaterial=e.stormParams.lightningMaterial,this.onLightningDown=e.onLightningDown,this}clone(){return new this.constructor(this.stormParams).copy(this)}}t.LightningStorm=s},93340:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Mesh{constructor(e,t,n=!1,i=!1,o=1e4){const l=new r.BufferGeometry;super(l,t),this.isMarchingCubes=!0;const c=this,h=new Float32Array(36),u=new Float32Array(36),d=new Float32Array(36);function p(e,t,n){return e+(t-e)*n}function f(e,t,n,r,i,s,a,o,l,f){const m=(n-a)/(o-a),g=c.normal_cache;h[t+0]=r+m*c.delta,h[t+1]=i,h[t+2]=s,u[t+0]=p(g[e+0],g[e+3],m),u[t+1]=p(g[e+1],g[e+4],m),u[t+2]=p(g[e+2],g[e+5],m),d[t+0]=p(c.palette[3*l+0],c.palette[3*f+0],m),d[t+1]=p(c.palette[3*l+1],c.palette[3*f+1],m),d[t+2]=p(c.palette[3*l+2],c.palette[3*f+2],m)}function m(e,t,n,r,i,s,a,o,l,f){const m=(n-a)/(o-a),g=c.normal_cache;h[t+0]=r,h[t+1]=i+m*c.delta,h[t+2]=s;const A=e+3*c.yd;u[t+0]=p(g[e+0],g[A+0],m),u[t+1]=p(g[e+1],g[A+1],m),u[t+2]=p(g[e+2],g[A+2],m),d[t+0]=p(c.palette[3*l+0],c.palette[3*f+0],m),d[t+1]=p(c.palette[3*l+1],c.palette[3*f+1],m),d[t+2]=p(c.palette[3*l+2],c.palette[3*f+2],m)}function g(e,t,n,r,i,s,a,o,l,f){const m=(n-a)/(o-a),g=c.normal_cache;h[t+0]=r,h[t+1]=i,h[t+2]=s+m*c.delta;const A=e+3*c.zd;u[t+0]=p(g[e+0],g[A+0],m),u[t+1]=p(g[e+1],g[A+1],m),u[t+2]=p(g[e+2],g[A+2],m),d[t+0]=p(c.palette[3*l+0],c.palette[3*f+0],m),d[t+1]=p(c.palette[3*l+1],c.palette[3*f+1],m),d[t+2]=p(c.palette[3*l+2],c.palette[3*f+2],m)}function A(e){const t=3*e;0===c.normal_cache[t]&&(c.normal_cache[t+0]=c.field[e-1]-c.field[e+1],c.normal_cache[t+1]=c.field[e-c.yd]-c.field[e+c.yd],c.normal_cache[t+2]=c.field[e-c.zd]-c.field[e+c.zd])}function v(e,t,n,r,i){const o=r+1,l=r+c.yd,p=r+c.zd,v=o+c.yd,x=o+c.zd,b=r+c.yd+c.zd,E=o+c.yd+c.zd;let _=0;const S=c.field[r],M=c.field[o],w=c.field[l],C=c.field[v],T=c.field[p],I=c.field[x],B=c.field[b],R=c.field[E];Sthis.size-1&&(m=this.size-1);let g=Math.floor(d-h);g<1&&(g=1);let A=Math.floor(d+h);A>this.size-1&&(A=this.size-1);let v=Math.floor(p-h);v<1&&(v=1);let y,x,b,E,_,S,M,w,C,T,I,B=Math.floor(p+h);for(B>this.size-1&&(B=this.size-1),b=f;b0){this.field[E+y]+=I*o;const e=Math.sqrt((y-p)*(y-p)+(x-d)*(x-d)+(b-u)*(b-u))/h,t=1-e*e*e*(e*(6*e-15)+10);this.palette[3*(E+y)+0]+=c.r*t,this.palette[3*(E+y)+1]+=c.g*t,this.palette[3*(E+y)+2]+=c.b*t}},this.addPlaneX=function(e,t){const n=this.size,r=this.yd,i=this.zd,s=this.field;let a,o,l,c,h,u,d,p=n*Math.sqrt(e/t);for(p>n&&(p=n),a=0;a0)for(o=0;on&&(f=n),o=0;o0)for(d=o*r,a=0;an&&(f=n),l=0;l0)for(d=i*l,o=0;o=r))for(let t=-1;t<=1;t+=2){const s=t+a;if(!(s<0||s>=r))for(let t=-1;t<=1;t+=2){const a=t+o;if(a<0||a>=r)continue;h++,c+=e*(n[i*a+r*s+l]-c)/h}}}t[l]=c}},this.reset=function(){for(let e=0;eo&&console.warn("THREE.MarchingCubes: Geometry buffers too small for rendering. Please create an instance with a higher poly count.")},this.init(e)}}const s=new Int32Array([0,265,515,778,1030,1295,1541,1804,2060,2309,2575,2822,3082,3331,3593,3840,400,153,915,666,1430,1183,1941,1692,2460,2197,2975,2710,3482,3219,3993,3728,560,825,51,314,1590,1855,1077,1340,2620,2869,2111,2358,3642,3891,3129,3376,928,681,419,170,1958,1711,1445,1196,2988,2725,2479,2214,4010,3747,3497,3232,1120,1385,1635,1898,102,367,613,876,3180,3429,3695,3942,2154,2403,2665,2912,1520,1273,2035,1786,502,255,1013,764,3580,3317,4095,3830,2554,2291,3065,2800,1616,1881,1107,1370,598,863,85,348,3676,3925,3167,3414,2650,2899,2137,2384,1984,1737,1475,1226,966,719,453,204,4044,3781,3535,3270,3018,2755,2505,2240,2240,2505,2755,3018,3270,3535,3781,4044,204,453,719,966,1226,1475,1737,1984,2384,2137,2899,2650,3414,3167,3925,3676,348,85,863,598,1370,1107,1881,1616,2800,3065,2291,2554,3830,4095,3317,3580,764,1013,255,502,1786,2035,1273,1520,2912,2665,2403,2154,3942,3695,3429,3180,876,613,367,102,1898,1635,1385,1120,3232,3497,3747,4010,2214,2479,2725,2988,1196,1445,1711,1958,170,419,681,928,3376,3129,3891,3642,2358,2111,2869,2620,1340,1077,1855,1590,314,51,825,560,3728,3993,3219,3482,2710,2975,2197,2460,1692,1941,1183,1430,666,915,153,400,3840,3593,3331,3082,2822,2575,2309,2060,1804,1541,1295,1030,778,515,265,0]),a=new Int32Array([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,8,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,8,3,9,8,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,8,3,1,2,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,9,2,10,0,2,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,8,3,2,10,8,10,9,8,-1,-1,-1,-1,-1,-1,-1,3,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,11,2,8,11,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,9,0,2,3,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,11,2,1,9,11,9,8,11,-1,-1,-1,-1,-1,-1,-1,3,10,1,11,10,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,10,1,0,8,10,8,11,10,-1,-1,-1,-1,-1,-1,-1,3,9,0,3,11,9,11,10,9,-1,-1,-1,-1,-1,-1,-1,9,8,10,10,8,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4,7,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4,3,0,7,3,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,9,8,4,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4,1,9,4,7,1,7,3,1,-1,-1,-1,-1,-1,-1,-1,1,2,10,8,4,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,4,7,3,0,4,1,2,10,-1,-1,-1,-1,-1,-1,-1,9,2,10,9,0,2,8,4,7,-1,-1,-1,-1,-1,-1,-1,2,10,9,2,9,7,2,7,3,7,9,4,-1,-1,-1,-1,8,4,7,3,11,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,11,4,7,11,2,4,2,0,4,-1,-1,-1,-1,-1,-1,-1,9,0,1,8,4,7,2,3,11,-1,-1,-1,-1,-1,-1,-1,4,7,11,9,4,11,9,11,2,9,2,1,-1,-1,-1,-1,3,10,1,3,11,10,7,8,4,-1,-1,-1,-1,-1,-1,-1,1,11,10,1,4,11,1,0,4,7,11,4,-1,-1,-1,-1,4,7,8,9,0,11,9,11,10,11,0,3,-1,-1,-1,-1,4,7,11,4,11,9,9,11,10,-1,-1,-1,-1,-1,-1,-1,9,5,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,9,5,4,0,8,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,5,4,1,5,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8,5,4,8,3,5,3,1,5,-1,-1,-1,-1,-1,-1,-1,1,2,10,9,5,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,0,8,1,2,10,4,9,5,-1,-1,-1,-1,-1,-1,-1,5,2,10,5,4,2,4,0,2,-1,-1,-1,-1,-1,-1,-1,2,10,5,3,2,5,3,5,4,3,4,8,-1,-1,-1,-1,9,5,4,2,3,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,11,2,0,8,11,4,9,5,-1,-1,-1,-1,-1,-1,-1,0,5,4,0,1,5,2,3,11,-1,-1,-1,-1,-1,-1,-1,2,1,5,2,5,8,2,8,11,4,8,5,-1,-1,-1,-1,10,3,11,10,1,3,9,5,4,-1,-1,-1,-1,-1,-1,-1,4,9,5,0,8,1,8,10,1,8,11,10,-1,-1,-1,-1,5,4,0,5,0,11,5,11,10,11,0,3,-1,-1,-1,-1,5,4,8,5,8,10,10,8,11,-1,-1,-1,-1,-1,-1,-1,9,7,8,5,7,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,9,3,0,9,5,3,5,7,3,-1,-1,-1,-1,-1,-1,-1,0,7,8,0,1,7,1,5,7,-1,-1,-1,-1,-1,-1,-1,1,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,9,7,8,9,5,7,10,1,2,-1,-1,-1,-1,-1,-1,-1,10,1,2,9,5,0,5,3,0,5,7,3,-1,-1,-1,-1,8,0,2,8,2,5,8,5,7,10,5,2,-1,-1,-1,-1,2,10,5,2,5,3,3,5,7,-1,-1,-1,-1,-1,-1,-1,7,9,5,7,8,9,3,11,2,-1,-1,-1,-1,-1,-1,-1,9,5,7,9,7,2,9,2,0,2,7,11,-1,-1,-1,-1,2,3,11,0,1,8,1,7,8,1,5,7,-1,-1,-1,-1,11,2,1,11,1,7,7,1,5,-1,-1,-1,-1,-1,-1,-1,9,5,8,8,5,7,10,1,3,10,3,11,-1,-1,-1,-1,5,7,0,5,0,9,7,11,0,1,0,10,11,10,0,-1,11,10,0,11,0,3,10,5,0,8,0,7,5,7,0,-1,11,10,5,7,11,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,6,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,8,3,5,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,9,0,1,5,10,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,8,3,1,9,8,5,10,6,-1,-1,-1,-1,-1,-1,-1,1,6,5,2,6,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,6,5,1,2,6,3,0,8,-1,-1,-1,-1,-1,-1,-1,9,6,5,9,0,6,0,2,6,-1,-1,-1,-1,-1,-1,-1,5,9,8,5,8,2,5,2,6,3,2,8,-1,-1,-1,-1,2,3,11,10,6,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,11,0,8,11,2,0,10,6,5,-1,-1,-1,-1,-1,-1,-1,0,1,9,2,3,11,5,10,6,-1,-1,-1,-1,-1,-1,-1,5,10,6,1,9,2,9,11,2,9,8,11,-1,-1,-1,-1,6,3,11,6,5,3,5,1,3,-1,-1,-1,-1,-1,-1,-1,0,8,11,0,11,5,0,5,1,5,11,6,-1,-1,-1,-1,3,11,6,0,3,6,0,6,5,0,5,9,-1,-1,-1,-1,6,5,9,6,9,11,11,9,8,-1,-1,-1,-1,-1,-1,-1,5,10,6,4,7,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4,3,0,4,7,3,6,5,10,-1,-1,-1,-1,-1,-1,-1,1,9,0,5,10,6,8,4,7,-1,-1,-1,-1,-1,-1,-1,10,6,5,1,9,7,1,7,3,7,9,4,-1,-1,-1,-1,6,1,2,6,5,1,4,7,8,-1,-1,-1,-1,-1,-1,-1,1,2,5,5,2,6,3,0,4,3,4,7,-1,-1,-1,-1,8,4,7,9,0,5,0,6,5,0,2,6,-1,-1,-1,-1,7,3,9,7,9,4,3,2,9,5,9,6,2,6,9,-1,3,11,2,7,8,4,10,6,5,-1,-1,-1,-1,-1,-1,-1,5,10,6,4,7,2,4,2,0,2,7,11,-1,-1,-1,-1,0,1,9,4,7,8,2,3,11,5,10,6,-1,-1,-1,-1,9,2,1,9,11,2,9,4,11,7,11,4,5,10,6,-1,8,4,7,3,11,5,3,5,1,5,11,6,-1,-1,-1,-1,5,1,11,5,11,6,1,0,11,7,11,4,0,4,11,-1,0,5,9,0,6,5,0,3,6,11,6,3,8,4,7,-1,6,5,9,6,9,11,4,7,9,7,11,9,-1,-1,-1,-1,10,4,9,6,4,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4,10,6,4,9,10,0,8,3,-1,-1,-1,-1,-1,-1,-1,10,0,1,10,6,0,6,4,0,-1,-1,-1,-1,-1,-1,-1,8,3,1,8,1,6,8,6,4,6,1,10,-1,-1,-1,-1,1,4,9,1,2,4,2,6,4,-1,-1,-1,-1,-1,-1,-1,3,0,8,1,2,9,2,4,9,2,6,4,-1,-1,-1,-1,0,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8,3,2,8,2,4,4,2,6,-1,-1,-1,-1,-1,-1,-1,10,4,9,10,6,4,11,2,3,-1,-1,-1,-1,-1,-1,-1,0,8,2,2,8,11,4,9,10,4,10,6,-1,-1,-1,-1,3,11,2,0,1,6,0,6,4,6,1,10,-1,-1,-1,-1,6,4,1,6,1,10,4,8,1,2,1,11,8,11,1,-1,9,6,4,9,3,6,9,1,3,11,6,3,-1,-1,-1,-1,8,11,1,8,1,0,11,6,1,9,1,4,6,4,1,-1,3,11,6,3,6,0,0,6,4,-1,-1,-1,-1,-1,-1,-1,6,4,8,11,6,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7,10,6,7,8,10,8,9,10,-1,-1,-1,-1,-1,-1,-1,0,7,3,0,10,7,0,9,10,6,7,10,-1,-1,-1,-1,10,6,7,1,10,7,1,7,8,1,8,0,-1,-1,-1,-1,10,6,7,10,7,1,1,7,3,-1,-1,-1,-1,-1,-1,-1,1,2,6,1,6,8,1,8,9,8,6,7,-1,-1,-1,-1,2,6,9,2,9,1,6,7,9,0,9,3,7,3,9,-1,7,8,0,7,0,6,6,0,2,-1,-1,-1,-1,-1,-1,-1,7,3,2,6,7,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,3,11,10,6,8,10,8,9,8,6,7,-1,-1,-1,-1,2,0,7,2,7,11,0,9,7,6,7,10,9,10,7,-1,1,8,0,1,7,8,1,10,7,6,7,10,2,3,11,-1,11,2,1,11,1,7,10,6,1,6,7,1,-1,-1,-1,-1,8,9,6,8,6,7,9,1,6,11,6,3,1,3,6,-1,0,9,1,11,6,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7,8,0,7,0,6,3,11,0,11,6,0,-1,-1,-1,-1,7,11,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,0,8,11,7,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,9,11,7,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8,1,9,8,3,1,11,7,6,-1,-1,-1,-1,-1,-1,-1,10,1,2,6,11,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,2,10,3,0,8,6,11,7,-1,-1,-1,-1,-1,-1,-1,2,9,0,2,10,9,6,11,7,-1,-1,-1,-1,-1,-1,-1,6,11,7,2,10,3,10,8,3,10,9,8,-1,-1,-1,-1,7,2,3,6,2,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7,0,8,7,6,0,6,2,0,-1,-1,-1,-1,-1,-1,-1,2,7,6,2,3,7,0,1,9,-1,-1,-1,-1,-1,-1,-1,1,6,2,1,8,6,1,9,8,8,7,6,-1,-1,-1,-1,10,7,6,10,1,7,1,3,7,-1,-1,-1,-1,-1,-1,-1,10,7,6,1,7,10,1,8,7,1,0,8,-1,-1,-1,-1,0,3,7,0,7,10,0,10,9,6,10,7,-1,-1,-1,-1,7,6,10,7,10,8,8,10,9,-1,-1,-1,-1,-1,-1,-1,6,8,4,11,8,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,6,11,3,0,6,0,4,6,-1,-1,-1,-1,-1,-1,-1,8,6,11,8,4,6,9,0,1,-1,-1,-1,-1,-1,-1,-1,9,4,6,9,6,3,9,3,1,11,3,6,-1,-1,-1,-1,6,8,4,6,11,8,2,10,1,-1,-1,-1,-1,-1,-1,-1,1,2,10,3,0,11,0,6,11,0,4,6,-1,-1,-1,-1,4,11,8,4,6,11,0,2,9,2,10,9,-1,-1,-1,-1,10,9,3,10,3,2,9,4,3,11,3,6,4,6,3,-1,8,2,3,8,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1,0,4,2,4,6,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,9,0,2,3,4,2,4,6,4,3,8,-1,-1,-1,-1,1,9,4,1,4,2,2,4,6,-1,-1,-1,-1,-1,-1,-1,8,1,3,8,6,1,8,4,6,6,10,1,-1,-1,-1,-1,10,1,0,10,0,6,6,0,4,-1,-1,-1,-1,-1,-1,-1,4,6,3,4,3,8,6,10,3,0,3,9,10,9,3,-1,10,9,4,6,10,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4,9,5,7,6,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,8,3,4,9,5,11,7,6,-1,-1,-1,-1,-1,-1,-1,5,0,1,5,4,0,7,6,11,-1,-1,-1,-1,-1,-1,-1,11,7,6,8,3,4,3,5,4,3,1,5,-1,-1,-1,-1,9,5,4,10,1,2,7,6,11,-1,-1,-1,-1,-1,-1,-1,6,11,7,1,2,10,0,8,3,4,9,5,-1,-1,-1,-1,7,6,11,5,4,10,4,2,10,4,0,2,-1,-1,-1,-1,3,4,8,3,5,4,3,2,5,10,5,2,11,7,6,-1,7,2,3,7,6,2,5,4,9,-1,-1,-1,-1,-1,-1,-1,9,5,4,0,8,6,0,6,2,6,8,7,-1,-1,-1,-1,3,6,2,3,7,6,1,5,0,5,4,0,-1,-1,-1,-1,6,2,8,6,8,7,2,1,8,4,8,5,1,5,8,-1,9,5,4,10,1,6,1,7,6,1,3,7,-1,-1,-1,-1,1,6,10,1,7,6,1,0,7,8,7,0,9,5,4,-1,4,0,10,4,10,5,0,3,10,6,10,7,3,7,10,-1,7,6,10,7,10,8,5,4,10,4,8,10,-1,-1,-1,-1,6,9,5,6,11,9,11,8,9,-1,-1,-1,-1,-1,-1,-1,3,6,11,0,6,3,0,5,6,0,9,5,-1,-1,-1,-1,0,11,8,0,5,11,0,1,5,5,6,11,-1,-1,-1,-1,6,11,3,6,3,5,5,3,1,-1,-1,-1,-1,-1,-1,-1,1,2,10,9,5,11,9,11,8,11,5,6,-1,-1,-1,-1,0,11,3,0,6,11,0,9,6,5,6,9,1,2,10,-1,11,8,5,11,5,6,8,0,5,10,5,2,0,2,5,-1,6,11,3,6,3,5,2,10,3,10,5,3,-1,-1,-1,-1,5,8,9,5,2,8,5,6,2,3,8,2,-1,-1,-1,-1,9,5,6,9,6,0,0,6,2,-1,-1,-1,-1,-1,-1,-1,1,5,8,1,8,0,5,6,8,3,8,2,6,2,8,-1,1,5,6,2,1,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,3,6,1,6,10,3,8,6,5,6,9,8,9,6,-1,10,1,0,10,0,6,9,5,0,5,6,0,-1,-1,-1,-1,0,3,8,5,6,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,5,6,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,11,5,10,7,5,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,11,5,10,11,7,5,8,3,0,-1,-1,-1,-1,-1,-1,-1,5,11,7,5,10,11,1,9,0,-1,-1,-1,-1,-1,-1,-1,10,7,5,10,11,7,9,8,1,8,3,1,-1,-1,-1,-1,11,1,2,11,7,1,7,5,1,-1,-1,-1,-1,-1,-1,-1,0,8,3,1,2,7,1,7,5,7,2,11,-1,-1,-1,-1,9,7,5,9,2,7,9,0,2,2,11,7,-1,-1,-1,-1,7,5,2,7,2,11,5,9,2,3,2,8,9,8,2,-1,2,5,10,2,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1,8,2,0,8,5,2,8,7,5,10,2,5,-1,-1,-1,-1,9,0,1,5,10,3,5,3,7,3,10,2,-1,-1,-1,-1,9,8,2,9,2,1,8,7,2,10,2,5,7,5,2,-1,1,3,5,3,7,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,8,7,0,7,1,1,7,5,-1,-1,-1,-1,-1,-1,-1,9,0,3,9,3,5,5,3,7,-1,-1,-1,-1,-1,-1,-1,9,8,7,5,9,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5,8,4,5,10,8,10,11,8,-1,-1,-1,-1,-1,-1,-1,5,0,4,5,11,0,5,10,11,11,3,0,-1,-1,-1,-1,0,1,9,8,4,10,8,10,11,10,4,5,-1,-1,-1,-1,10,11,4,10,4,5,11,3,4,9,4,1,3,1,4,-1,2,5,1,2,8,5,2,11,8,4,5,8,-1,-1,-1,-1,0,4,11,0,11,3,4,5,11,2,11,1,5,1,11,-1,0,2,5,0,5,9,2,11,5,4,5,8,11,8,5,-1,9,4,5,2,11,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,5,10,3,5,2,3,4,5,3,8,4,-1,-1,-1,-1,5,10,2,5,2,4,4,2,0,-1,-1,-1,-1,-1,-1,-1,3,10,2,3,5,10,3,8,5,4,5,8,0,1,9,-1,5,10,2,5,2,4,1,9,2,9,4,2,-1,-1,-1,-1,8,4,5,8,5,3,3,5,1,-1,-1,-1,-1,-1,-1,-1,0,4,5,1,0,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8,4,5,8,5,3,9,0,5,0,3,5,-1,-1,-1,-1,9,4,5,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4,11,7,4,9,11,9,10,11,-1,-1,-1,-1,-1,-1,-1,0,8,3,4,9,7,9,11,7,9,10,11,-1,-1,-1,-1,1,10,11,1,11,4,1,4,0,7,4,11,-1,-1,-1,-1,3,1,4,3,4,8,1,10,4,7,4,11,10,11,4,-1,4,11,7,9,11,4,9,2,11,9,1,2,-1,-1,-1,-1,9,7,4,9,11,7,9,1,11,2,11,1,0,8,3,-1,11,7,4,11,4,2,2,4,0,-1,-1,-1,-1,-1,-1,-1,11,7,4,11,4,2,8,3,4,3,2,4,-1,-1,-1,-1,2,9,10,2,7,9,2,3,7,7,4,9,-1,-1,-1,-1,9,10,7,9,7,4,10,2,7,8,7,0,2,0,7,-1,3,7,10,3,10,2,7,4,10,1,10,0,4,0,10,-1,1,10,2,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4,9,1,4,1,7,7,1,3,-1,-1,-1,-1,-1,-1,-1,4,9,1,4,1,7,0,8,1,8,7,1,-1,-1,-1,-1,4,0,3,7,4,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4,8,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,9,10,8,10,11,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,0,9,3,9,11,11,9,10,-1,-1,-1,-1,-1,-1,-1,0,1,10,0,10,8,8,10,11,-1,-1,-1,-1,-1,-1,-1,3,1,10,11,3,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,2,11,1,11,9,9,11,8,-1,-1,-1,-1,-1,-1,-1,3,0,9,3,9,11,1,2,9,2,11,9,-1,-1,-1,-1,0,2,11,8,0,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,2,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,3,8,2,8,10,10,8,9,-1,-1,-1,-1,-1,-1,-1,9,10,2,0,9,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,3,8,2,8,10,0,1,8,1,10,8,-1,-1,-1,-1,1,10,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,3,8,9,1,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,9,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,3,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);t.MarchingCubes=i,t.edgeTable=s,t.triTable=a},7608:(e,t,n)=>{"use strict";var r=Object.defineProperty;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const i=n(48480),s=n(26840),a=class extends i.Mesh{constructor(e,t={}){super(e),this.isReflector=!0,this.type="Reflector",this.camera=new i.PerspectiveCamera;const n=this,r=void 0!==t.color?new i.Color(t.color):new i.Color(8355711),s=t.textureWidth||512,o=t.textureHeight||512,l=t.clipBias||0,c=t.shader||a.ReflectorShader,h=void 0!==t.multisample?t.multisample:4,u=new i.Plane,d=new i.Vector3,p=new i.Vector3,f=new i.Vector3,m=new i.Matrix4,g=new i.Vector3(0,0,-1),A=new i.Vector4,v=new i.Vector3,y=new i.Vector3,x=new i.Vector4,b=new i.Matrix4,E=this.camera,_=new i.WebGLRenderTarget(s,o,{samples:h,type:i.HalfFloatType}),S=new i.ShaderMaterial({uniforms:i.UniformsUtils.clone(c.uniforms),fragmentShader:c.fragmentShader,vertexShader:c.vertexShader});S.uniforms.tDiffuse.value=_.texture,S.uniforms.color.value=r,S.uniforms.textureMatrix.value=b,this.material=S,this.onBeforeRender=function(e,t,r){if(p.setFromMatrixPosition(n.matrixWorld),f.setFromMatrixPosition(r.matrixWorld),m.extractRotation(n.matrixWorld),d.set(0,0,1),d.applyMatrix4(m),v.subVectors(p,f),v.dot(d)>0)return;v.reflect(d).negate(),v.add(p),m.extractRotation(r.matrixWorld),g.set(0,0,-1),g.applyMatrix4(m),g.add(f),y.subVectors(p,g),y.reflect(d).negate(),y.add(p),E.position.copy(v),E.up.set(0,1,0),E.up.applyMatrix4(m),E.up.reflect(d),E.lookAt(y),E.far=r.far,E.updateMatrixWorld(),E.projectionMatrix.copy(r.projectionMatrix),b.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),b.multiply(E.projectionMatrix),b.multiply(E.matrixWorldInverse),b.multiply(n.matrixWorld),u.setFromNormalAndCoplanarPoint(d,p),u.applyMatrix4(E.matrixWorldInverse),A.set(u.normal.x,u.normal.y,u.normal.z,u.constant);const s=E.projectionMatrix;x.x=(Math.sign(A.x)+s.elements[8])/s.elements[0],x.y=(Math.sign(A.y)+s.elements[9])/s.elements[5],x.z=-1,x.w=(1+s.elements[10])/s.elements[14],A.multiplyScalar(2/A.dot(x)),s.elements[2]=A.x,s.elements[6]=A.y,s.elements[10]=A.z+1-l,s.elements[14]=A.w,n.visible=!1;const a=e.getRenderTarget(),o=e.xr.enabled,c=e.shadowMap.autoUpdate,h=e.toneMapping;let S=!1;S="outputColorSpace"in e?"srgb"===e.outputColorSpace:3001===e.outputEncoding,e.xr.enabled=!1,e.shadowMap.autoUpdate=!1,"outputColorSpace"in e?e.outputColorSpace="linear-srgb":e.outputEncoding=3e3,e.toneMapping=i.NoToneMapping,e.setRenderTarget(_),e.state.buffers.depth.setMask(!0),!1===e.autoClear&&e.clear(),e.render(t,E),e.xr.enabled=o,e.shadowMap.autoUpdate=c,e.toneMapping=h,"outputColorSpace"in e?e.outputColorSpace=S?"srgb":"srgb-linear":e.outputEncoding=S?3001:3e3,e.setRenderTarget(a);const M=r.viewport;void 0!==M&&e.state.viewport(M),n.visible=!0},this.getRenderTarget=function(){return _},this.dispose=function(){_.dispose(),n.material.dispose()}}};let o=a;var l,c,h;l=o,c="ReflectorShader",h={uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:"\n\t\tuniform mat4 textureMatrix;\n\t\tvarying vec4 vUv;\n\n\t\t#include \n\t\t#include \n\n\t\tvoid main() {\n\n\t\t\tvUv = textureMatrix * vec4( position, 1.0 );\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t\t#include \n\n\t\t}",fragmentShader:`\n\t\tuniform vec3 color;\n\t\tuniform sampler2D tDiffuse;\n\t\tvarying vec4 vUv;\n\n\t\t#include \n\n\t\tfloat blendOverlay( float base, float blend ) {\n\n\t\t\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );\n\n\t\t}\n\n\t\tvec3 blendOverlay( vec3 base, vec3 blend ) {\n\n\t\t\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#include \n\n\t\t\tvec4 base = texture2DProj( tDiffuse, vUv );\n\t\t\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );\n\n\t\t\t#include \n\t\t\t#include <${s.version>=154?"colorspace_fragment":"encodings_fragment"}>\n\n\t\t}`},((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(l,"symbol"!=typeof c?c+"":c,h),t.Reflector=o},48619:(e,t,n)=>{"use strict";var r=Object.defineProperty;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const i=n(48480),s=class extends i.Mesh{constructor(e,t={}){super(e),this.isReflectorForSSRPass=!0,this.type="ReflectorForSSRPass";const n=this,r=void 0!==t.color?new i.Color(t.color):new i.Color(8355711),a=t.textureWidth||512,o=t.textureHeight||512,l=t.clipBias||0,c=t.shader||s.ReflectorShader,h=!0===t.useDepthTexture,u=new i.Vector3(0,1,0),d=new i.Vector3,p=new i.Vector3;n.needsUpdate=!1,n.maxDistance=s.ReflectorShader.uniforms.maxDistance.value,n.opacity=s.ReflectorShader.uniforms.opacity.value,n.color=r,n.resolution=t.resolution||new i.Vector2(window.innerWidth,window.innerHeight),n._distanceAttenuation=s.ReflectorShader.defines.DISTANCE_ATTENUATION,Object.defineProperty(n,"distanceAttenuation",{get:()=>n._distanceAttenuation,set(e){n._distanceAttenuation!==e&&(n._distanceAttenuation=e,n.material.defines.DISTANCE_ATTENUATION=e,n.material.needsUpdate=!0)}}),n._fresnel=s.ReflectorShader.defines.FRESNEL,Object.defineProperty(n,"fresnel",{get:()=>n._fresnel,set(e){n._fresnel!==e&&(n._fresnel=e,n.material.defines.FRESNEL=e,n.material.needsUpdate=!0)}});const f=new i.Vector3,m=new i.Vector3,g=new i.Vector3,A=new i.Matrix4,v=new i.Vector3(0,0,-1),y=new i.Vector3,x=new i.Vector3,b=new i.Matrix4,E=new i.PerspectiveCamera;let _;h&&(_=new i.DepthTexture,_.type=i.UnsignedShortType,_.minFilter=i.NearestFilter,_.magFilter=i.NearestFilter);const S={depthTexture:h?_:null,type:i.HalfFloatType},M=new i.WebGLRenderTarget(a,o,S),w=new i.ShaderMaterial({transparent:h,defines:Object.assign({},s.ReflectorShader.defines,{useDepthTexture:h}),uniforms:i.UniformsUtils.clone(c.uniforms),fragmentShader:c.fragmentShader,vertexShader:c.vertexShader});w.uniforms.tDiffuse.value=M.texture,w.uniforms.color.value=n.color,w.uniforms.textureMatrix.value=b,h&&(w.uniforms.tDepth.value=M.depthTexture),this.material=w;const C=[new i.Plane(new i.Vector3(0,1,0),l)];this.doRender=function(e,t,r){if(w.uniforms.maxDistance.value=n.maxDistance,w.uniforms.color.value=n.color,w.uniforms.opacity.value=n.opacity,d.copy(r.position).normalize(),p.copy(d).reflect(u),w.uniforms.fresnelCoe.value=(d.dot(p)+1)/2,m.setFromMatrixPosition(n.matrixWorld),g.setFromMatrixPosition(r.matrixWorld),A.extractRotation(n.matrixWorld),f.set(0,0,1),f.applyMatrix4(A),y.subVectors(m,g),y.dot(f)>0)return;y.reflect(f).negate(),y.add(m),A.extractRotation(r.matrixWorld),v.set(0,0,-1),v.applyMatrix4(A),v.add(g),x.subVectors(m,v),x.reflect(f).negate(),x.add(m),E.position.copy(y),E.up.set(0,1,0),E.up.applyMatrix4(A),E.up.reflect(f),E.lookAt(x),E.far=r.far,E.updateMatrixWorld(),E.projectionMatrix.copy(r.projectionMatrix),w.uniforms.virtualCameraNear.value=r.near,w.uniforms.virtualCameraFar.value=r.far,w.uniforms.virtualCameraMatrixWorld.value=E.matrixWorld,w.uniforms.virtualCameraProjectionMatrix.value=r.projectionMatrix,w.uniforms.virtualCameraProjectionMatrixInverse.value=r.projectionMatrixInverse,w.uniforms.resolution.value=n.resolution,b.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),b.multiply(E.projectionMatrix),b.multiply(E.matrixWorldInverse),b.multiply(n.matrixWorld);const i=e.getRenderTarget(),s=e.xr.enabled,a=e.shadowMap.autoUpdate,o=e.clippingPlanes;e.xr.enabled=!1,e.shadowMap.autoUpdate=!1,e.clippingPlanes=C,e.setRenderTarget(M),e.state.buffers.depth.setMask(!0),!1===e.autoClear&&e.clear(),e.render(t,E),e.xr.enabled=s,e.shadowMap.autoUpdate=a,e.clippingPlanes=o,e.setRenderTarget(i);const l=r.viewport;void 0!==l&&e.state.viewport(l)},this.getRenderTarget=function(){return M}}};let a=s;var o,l,c;o=a,l="ReflectorShader",c={defines:{DISTANCE_ATTENUATION:!0,FRESNEL:!0},uniforms:{color:{value:null},tDiffuse:{value:null},tDepth:{value:null},textureMatrix:{value:new i.Matrix4},maxDistance:{value:180},opacity:{value:.5},fresnelCoe:{value:null},virtualCameraNear:{value:null},virtualCameraFar:{value:null},virtualCameraProjectionMatrix:{value:new i.Matrix4},virtualCameraMatrixWorld:{value:new i.Matrix4},virtualCameraProjectionMatrixInverse:{value:new i.Matrix4},resolution:{value:new i.Vector2}},vertexShader:"\n\t\tuniform mat4 textureMatrix;\n\t\tvarying vec4 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = textureMatrix * vec4( position, 1.0 );\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\t\tuniform vec3 color;\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform sampler2D tDepth;\n\t\tuniform float maxDistance;\n\t\tuniform float opacity;\n\t\tuniform float fresnelCoe;\n\t\tuniform float virtualCameraNear;\n\t\tuniform float virtualCameraFar;\n\t\tuniform mat4 virtualCameraProjectionMatrix;\n\t\tuniform mat4 virtualCameraProjectionMatrixInverse;\n\t\tuniform mat4 virtualCameraMatrixWorld;\n\t\tuniform vec2 resolution;\n\t\tvarying vec4 vUv;\n\t\t#include \n\t\tfloat blendOverlay( float base, float blend ) {\n\t\t\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );\n\t\t}\n\t\tvec3 blendOverlay( vec3 base, vec3 blend ) {\n\t\t\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) );\n\t\t}\n\t\tfloat getDepth( const in vec2 uv ) {\n\t\t\treturn texture2D( tDepth, uv ).x;\n\t\t}\n\t\tfloat getViewZ( const in float depth ) {\n\t\t\treturn perspectiveDepthToViewZ( depth, virtualCameraNear, virtualCameraFar );\n\t\t}\n\t\tvec3 getViewPosition( const in vec2 uv, const in float depth/*clip space*/, const in float clipW ) {\n\t\t\tvec4 clipPosition = vec4( ( vec3( uv, depth ) - 0.5 ) * 2.0, 1.0 );//ndc\n\t\t\tclipPosition *= clipW; //clip\n\t\t\treturn ( virtualCameraProjectionMatrixInverse * clipPosition ).xyz;//view\n\t\t}\n\t\tvoid main() {\n\t\t\tvec4 base = texture2DProj( tDiffuse, vUv );\n\t\t\t#ifdef useDepthTexture\n\t\t\t\tvec2 uv=(gl_FragCoord.xy-.5)/resolution.xy;\n\t\t\t\tuv.x=1.-uv.x;\n\t\t\t\tfloat depth = texture2DProj( tDepth, vUv ).r;\n\t\t\t\tfloat viewZ = getViewZ( depth );\n\t\t\t\tfloat clipW = virtualCameraProjectionMatrix[2][3] * viewZ+virtualCameraProjectionMatrix[3][3];\n\t\t\t\tvec3 viewPosition=getViewPosition( uv, depth, clipW );\n\t\t\t\tvec3 worldPosition=(virtualCameraMatrixWorld*vec4(viewPosition,1)).xyz;\n\t\t\t\tif(worldPosition.y>maxDistance) discard;\n\t\t\t\tfloat op=opacity;\n\t\t\t\t#ifdef DISTANCE_ATTENUATION\n\t\t\t\t\tfloat ratio=1.-(worldPosition.y/maxDistance);\n\t\t\t\t\tfloat attenuation=ratio*ratio;\n\t\t\t\t\top=opacity*attenuation;\n\t\t\t\t#endif\n\t\t\t\t#ifdef FRESNEL\n\t\t\t\t\top*=fresnelCoe;\n\t\t\t\t#endif\n\t\t\t\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), op );\n\t\t\t#else\n\t\t\t\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );\n\t\t\t#endif\n\t\t}\n\t"},((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(o,"symbol"!=typeof l?l+"":l,c),t.ReflectorForSSRPass=a},57675:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(7608);class i extends r.Reflector{constructor(e,t){super(e,t),this.geometry.setDrawRange(0,0)}}t.ReflectorRTT=i},25048:(e,t,n)=>{"use strict";var r=Object.defineProperty;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const i=n(48480),s=n(26840),a=class extends i.Mesh{constructor(e,t={}){super(e),this.isRefractor=!0,this.type="Refractor",this.camera=new i.PerspectiveCamera;const n=this,r=void 0!==t.color?new i.Color(t.color):new i.Color(8355711),s=t.textureWidth||512,o=t.textureHeight||512,l=t.clipBias||0,c=t.shader||a.RefractorShader,h=void 0!==t.multisample?t.multisample:4,u=this.camera;u.matrixAutoUpdate=!1,u.userData.refractor=!0;const d=new i.Plane,p=new i.Matrix4,f=new i.WebGLRenderTarget(s,o,{samples:h,type:i.HalfFloatType});this.material=new i.ShaderMaterial({uniforms:i.UniformsUtils.clone(c.uniforms),vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,transparent:!0}),this.material.uniforms.color.value=r,this.material.uniforms.tDiffuse.value=f.texture,this.material.uniforms.textureMatrix.value=p;const m=function(){const e=new i.Vector3,t=new i.Vector3,r=new i.Matrix4,s=new i.Vector3,a=new i.Vector3;return function(i){return e.setFromMatrixPosition(n.matrixWorld),t.setFromMatrixPosition(i.matrixWorld),s.subVectors(e,t),r.extractRotation(n.matrixWorld),a.set(0,0,1),a.applyMatrix4(r),s.dot(a)<0}}(),g=function(){const e=new i.Vector3,t=new i.Vector3,r=new i.Quaternion,s=new i.Vector3;return function(){n.matrixWorld.decompose(t,r,s),e.set(0,0,1).applyQuaternion(r).normalize(),e.negate(),d.setFromNormalAndCoplanarPoint(e,t)}}(),A=function(){const e=new i.Plane,t=new i.Vector4,n=new i.Vector4;return function(r){u.matrixWorld.copy(r.matrixWorld),u.matrixWorldInverse.copy(u.matrixWorld).invert(),u.projectionMatrix.copy(r.projectionMatrix),u.far=r.far,e.copy(d),e.applyMatrix4(u.matrixWorldInverse),t.set(e.normal.x,e.normal.y,e.normal.z,e.constant);const i=u.projectionMatrix;n.x=(Math.sign(t.x)+i.elements[8])/i.elements[0],n.y=(Math.sign(t.y)+i.elements[9])/i.elements[5],n.z=-1,n.w=(1+i.elements[10])/i.elements[14],t.multiplyScalar(2/t.dot(n)),i.elements[2]=t.x,i.elements[6]=t.y,i.elements[10]=t.z+1-l,i.elements[14]=t.w}}();this.onBeforeRender=function(e,t,r){!0!==r.userData.refractor&&!0!=!m(r)&&(g(),function(e){p.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),p.multiply(e.projectionMatrix),p.multiply(e.matrixWorldInverse),p.multiply(n.matrixWorld)}(r),A(r),function(e,t,r){n.visible=!1;const s=e.getRenderTarget(),a=e.xr.enabled,o=e.shadowMap.autoUpdate,l=e.toneMapping;let c=!1;c="outputColorSpace"in e?"srgb"===e.outputColorSpace:3001===e.outputEncoding,e.xr.enabled=!1,e.shadowMap.autoUpdate=!1,"outputColorSpace"in e?e.outputColorSpace="linear-srgb":e.outputEncoding=3e3,e.toneMapping=i.NoToneMapping,e.setRenderTarget(f),!1===e.autoClear&&e.clear(),e.render(t,u),e.xr.enabled=a,e.shadowMap.autoUpdate=o,e.toneMapping=l,e.setRenderTarget(s),"outputColorSpace"in e?e.outputColorSpace=c?"srgb":"srgb-linear":e.outputEncoding=c?3001:3e3;const h=r.viewport;void 0!==h&&e.state.viewport(h),n.visible=!0}(e,t,r))},this.getRenderTarget=function(){return f},this.dispose=function(){f.dispose(),n.material.dispose()}}};let o=a;var l,c,h;l=o,c="RefractorShader",h={uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:"\n\n\t\tuniform mat4 textureMatrix;\n\n\t\tvarying vec4 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = textureMatrix * vec4( position, 1.0 );\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:`\n\n\t\tuniform vec3 color;\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec4 vUv;\n\n\t\tfloat blendOverlay( float base, float blend ) {\n\n\t\t\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );\n\n\t\t}\n\n\t\tvec3 blendOverlay( vec3 base, vec3 blend ) {\n\n\t\t\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvec4 base = texture2DProj( tDiffuse, vUv );\n\t\t\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );\n\n\t\t\t#include \n\t\t\t#include <${s.version>=154?"colorspace_fragment":"encodings_fragment"}>\n\n\t\t}`},((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(l,"symbol"!=typeof c?c+"":c,h),t.Refractor=o},40480:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Matrix4;class s extends r.Mesh{constructor(e){const t=new r.MeshBasicMaterial({color:0,transparent:!0,opacity:.6,depthWrite:!1,stencilWrite:!0,stencilFunc:r.EqualStencilFunc,stencilRef:0,stencilZPass:r.IncrementStencilOp});super(e.geometry,t),this.isShadowMesh=!0,this.meshMatrix=e.matrixWorld,this.frustumCulled=!1,this.matrixAutoUpdate=!1}update(e,t){const n=e.normal.x*t.x+e.normal.y*t.y+e.normal.z*t.z+-e.constant*t.w,r=i.elements;r[0]=n-t.x*e.normal.x,r[4]=-t.x*e.normal.y,r[8]=-t.x*e.normal.z,r[12]=-t.x*-e.constant,r[1]=-t.y*e.normal.x,r[5]=n-t.y*e.normal.y,r[9]=-t.y*e.normal.z,r[13]=-t.y*-e.constant,r[2]=-t.z*e.normal.x,r[6]=-t.z*e.normal.y,r[10]=n-t.z*e.normal.z,r[14]=-t.z*-e.constant,r[3]=-t.w*e.normal.x,r[7]=-t.w*e.normal.y,r[11]=-t.w*e.normal.z,r[15]=n-t.w*-e.constant,this.matrix.multiplyMatrices(i,this.meshMatrix)}}t.ShadowMesh=s},5848:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(26840),o={uniforms:{turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new s.Vector3},up:{value:new s.Vector3(0,1,0)}},vertexShader:"\n uniform vec3 sunPosition;\n uniform float rayleigh;\n uniform float turbidity;\n uniform float mieCoefficient;\n uniform vec3 up;\n\n varying vec3 vWorldPosition;\n varying vec3 vSunDirection;\n varying float vSunfade;\n varying vec3 vBetaR;\n varying vec3 vBetaM;\n varying float vSunE;\n\n // constants for atmospheric scattering\n const float e = 2.71828182845904523536028747135266249775724709369995957;\n const float pi = 3.141592653589793238462643383279502884197169;\n\n // wavelength of used primaries, according to preetham\n const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );\n // this pre-calcuation replaces older TotalRayleigh(vec3 lambda) function:\n // (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn))\n const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );\n\n // mie stuff\n // K coefficient for the primaries\n const float v = 4.0;\n const vec3 K = vec3( 0.686, 0.678, 0.666 );\n // MieConst = pi * pow( ( 2.0 * pi ) / lambda, vec3( v - 2.0 ) ) * K\n const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );\n\n // earth shadow hack\n // cutoffAngle = pi / 1.95;\n const float cutoffAngle = 1.6110731556870734;\n const float steepness = 1.5;\n const float EE = 1000.0;\n\n float sunIntensity( float zenithAngleCos ) {\n zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );\n return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );\n }\n\n vec3 totalMie( float T ) {\n float c = ( 0.2 * T ) * 10E-18;\n return 0.434 * c * MieConst;\n }\n\n void main() {\n\n vec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n vWorldPosition = worldPosition.xyz;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n gl_Position.z = gl_Position.w; // set z to camera.far\n\n vSunDirection = normalize( sunPosition );\n\n vSunE = sunIntensity( dot( vSunDirection, up ) );\n\n vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );\n\n float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );\n\n // extinction (absorbtion + out scattering)\n // rayleigh coefficients\n vBetaR = totalRayleigh * rayleighCoefficient;\n\n // mie coefficients\n vBetaM = totalMie( turbidity ) * mieCoefficient;\n\n }\n ",fragmentShader:`\n varying vec3 vWorldPosition;\n varying vec3 vSunDirection;\n varying float vSunfade;\n varying vec3 vBetaR;\n varying vec3 vBetaM;\n varying float vSunE;\n\n uniform float mieDirectionalG;\n uniform vec3 up;\n\n const vec3 cameraPos = vec3( 0.0, 0.0, 0.0 );\n\n // constants for atmospheric scattering\n const float pi = 3.141592653589793238462643383279502884197169;\n\n const float n = 1.0003; // refractive index of air\n const float N = 2.545E25; // number of molecules per unit volume for air at 288.15K and 1013mb (sea level -45 celsius)\n\n // optical length at zenith for molecules\n const float rayleighZenithLength = 8.4E3;\n const float mieZenithLength = 1.25E3;\n // 66 arc seconds -> degrees, and the cosine of that\n const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;\n\n // 3.0 / ( 16.0 * pi )\n const float THREE_OVER_SIXTEENPI = 0.05968310365946075;\n // 1.0 / ( 4.0 * pi )\n const float ONE_OVER_FOURPI = 0.07957747154594767;\n\n float rayleighPhase( float cosTheta ) {\n return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );\n }\n\n float hgPhase( float cosTheta, float g ) {\n float g2 = pow( g, 2.0 );\n float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );\n return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );\n }\n\n void main() {\n\n vec3 direction = normalize( vWorldPosition - cameraPos );\n\n // optical length\n // cutoff angle at 90 to avoid singularity in next formula.\n float zenithAngle = acos( max( 0.0, dot( up, direction ) ) );\n float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );\n float sR = rayleighZenithLength * inverse;\n float sM = mieZenithLength * inverse;\n\n // combined extinction factor\n vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );\n\n // in scattering\n float cosTheta = dot( direction, vSunDirection );\n\n float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );\n vec3 betaRTheta = vBetaR * rPhase;\n\n float mPhase = hgPhase( cosTheta, mieDirectionalG );\n vec3 betaMTheta = vBetaM * mPhase;\n\n vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );\n Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );\n\n // nightsky\n float theta = acos( direction.y ); // elevation --\x3e y-axis, [-pi/2, pi/2]\n float phi = atan( direction.z, direction.x ); // azimuth --\x3e x-axis [-pi/2, pi/2]\n vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );\n vec3 L0 = vec3( 0.1 ) * Fex;\n\n // composition + solar disc\n float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );\n L0 += ( vSunE * 19000.0 * Fex ) * sundisk;\n\n vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );\n\n vec3 retColor = pow( texColor, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );\n\n gl_FragColor = vec4( retColor, 1.0 );\n\n #include \n #include <${a.version>=154?"colorspace_fragment":"encodings_fragment"}>\n\n }\n `},l=new s.ShaderMaterial({name:"SkyShader",fragmentShader:o.fragmentShader,vertexShader:o.vertexShader,uniforms:s.UniformsUtils.clone(o.uniforms),side:s.BackSide,depthWrite:!1});class c extends s.Mesh{constructor(){super(new s.BoxGeometry(1,1,1),l)}}i(c,"SkyShader",o),i(c,"material",l),t.Sky=c},31916:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Mesh{constructor(e,t={}){super(e),this.isWater=!0;const n=this,i=void 0!==t.textureWidth?t.textureWidth:512,s=void 0!==t.textureHeight?t.textureHeight:512,a=void 0!==t.clipBias?t.clipBias:0,o=void 0!==t.alpha?t.alpha:1,l=void 0!==t.time?t.time:0,c=void 0!==t.waterNormals?t.waterNormals:null,h=void 0!==t.sunDirection?t.sunDirection:new r.Vector3(.70707,.70707,0),u=new r.Color(void 0!==t.sunColor?t.sunColor:16777215),d=new r.Color(void 0!==t.waterColor?t.waterColor:8355711),p=void 0!==t.eye?t.eye:new r.Vector3(0,0,0),f=void 0!==t.distortionScale?t.distortionScale:20,m=void 0!==t.side?t.side:r.FrontSide,g=void 0!==t.fog&&t.fog,A=new r.Plane,v=new r.Vector3,y=new r.Vector3,x=new r.Vector3,b=new r.Matrix4,E=new r.Vector3(0,0,-1),_=new r.Vector4,S=new r.Vector3,M=new r.Vector3,w=new r.Vector4,C=new r.Matrix4,T=new r.PerspectiveCamera,I=new r.WebGLRenderTarget(i,s),B={uniforms:r.UniformsUtils.merge([r.UniformsLib.fog,r.UniformsLib.lights,{normalSampler:{value:null},mirrorSampler:{value:null},alpha:{value:1},time:{value:0},size:{value:1},distortionScale:{value:20},textureMatrix:{value:new r.Matrix4},sunColor:{value:new r.Color(8355711)},sunDirection:{value:new r.Vector3(.70707,.70707,0)},eye:{value:new r.Vector3},waterColor:{value:new r.Color(5592405)}}]),vertexShader:"\n\t\t\t\tuniform mat4 textureMatrix;\n\t\t\t\tuniform float time;\n\n\t\t\t\tvarying vec4 mirrorCoord;\n\t\t\t\tvarying vec4 worldPosition;\n\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\t\t\t\t\tmirrorCoord = modelMatrix * vec4( position, 1.0 );\n\t\t\t\t\tworldPosition = mirrorCoord.xyzw;\n\t\t\t\t\tmirrorCoord = textureMatrix * mirrorCoord;\n\t\t\t\t\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t\tgl_Position = projectionMatrix * mvPosition;\n\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t}",fragmentShader:`\n\t\t\t\tuniform sampler2D mirrorSampler;\n\t\t\t\tuniform float alpha;\n\t\t\t\tuniform float time;\n\t\t\t\tuniform float size;\n\t\t\t\tuniform float distortionScale;\n\t\t\t\tuniform sampler2D normalSampler;\n\t\t\t\tuniform vec3 sunColor;\n\t\t\t\tuniform vec3 sunDirection;\n\t\t\t\tuniform vec3 eye;\n\t\t\t\tuniform vec3 waterColor;\n\n\t\t\t\tvarying vec4 mirrorCoord;\n\t\t\t\tvarying vec4 worldPosition;\n\n\t\t\t\tvec4 getNoise( vec2 uv ) {\n\t\t\t\t\tvec2 uv0 = ( uv / 103.0 ) + vec2(time / 17.0, time / 29.0);\n\t\t\t\t\tvec2 uv1 = uv / 107.0-vec2( time / -19.0, time / 31.0 );\n\t\t\t\t\tvec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( time / 101.0, time / 97.0 );\n\t\t\t\t\tvec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( time / 109.0, time / -113.0 );\n\t\t\t\t\tvec4 noise = texture2D( normalSampler, uv0 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv1 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv2 ) +\n\t\t\t\t\t\ttexture2D( normalSampler, uv3 );\n\t\t\t\t\treturn noise * 0.5 - 1.0;\n\t\t\t\t}\n\n\t\t\t\tvoid sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) {\n\t\t\t\t\tvec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) );\n\t\t\t\t\tfloat direction = max( 0.0, dot( eyeDirection, reflection ) );\n\t\t\t\t\tspecularColor += pow( direction, shiny ) * sunColor * spec;\n\t\t\t\t\tdiffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * sunColor * diffuse;\n\t\t\t\t}\n\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#include \n\t\t\t\t\tvec4 noise = getNoise( worldPosition.xz * size );\n\t\t\t\t\tvec3 surfaceNormal = normalize( noise.xzy * vec3( 1.5, 1.0, 1.5 ) );\n\n\t\t\t\t\tvec3 diffuseLight = vec3(0.0);\n\t\t\t\t\tvec3 specularLight = vec3(0.0);\n\n\t\t\t\t\tvec3 worldToEye = eye-worldPosition.xyz;\n\t\t\t\t\tvec3 eyeDirection = normalize( worldToEye );\n\t\t\t\t\tsunLight( surfaceNormal, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );\n\n\t\t\t\t\tfloat distance = length(worldToEye);\n\n\t\t\t\t\tvec2 distortion = surfaceNormal.xz * ( 0.001 + 1.0 / distance ) * distortionScale;\n\t\t\t\t\tvec3 reflectionSample = vec3( texture2D( mirrorSampler, mirrorCoord.xy / mirrorCoord.w + distortion ) );\n\n\t\t\t\t\tfloat theta = max( dot( eyeDirection, surfaceNormal ), 0.0 );\n\t\t\t\t\tfloat rf0 = 0.3;\n\t\t\t\t\tfloat reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 );\n\t\t\t\t\tvec3 scatter = max( 0.0, dot( surfaceNormal, eyeDirection ) ) * waterColor;\n\t\t\t\t\tvec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance);\n\t\t\t\t\tvec3 outgoingLight = albedo;\n\t\t\t\t\tgl_FragColor = vec4( outgoingLight, alpha );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include <${parseInt(r.REVISION.replace(/\D+/g,""))>=154?"colorspace_fragment":"encodings_fragment"}>\n\t\t\t\t\t#include \t\n\t\t\t\t}`},R=new r.ShaderMaterial({fragmentShader:B.fragmentShader,vertexShader:B.vertexShader,uniforms:r.UniformsUtils.clone(B.uniforms),lights:!0,side:m,fog:g});R.uniforms.mirrorSampler.value=I.texture,R.uniforms.textureMatrix.value=C,R.uniforms.alpha.value=o,R.uniforms.time.value=l,R.uniforms.normalSampler.value=c,R.uniforms.sunColor.value=u,R.uniforms.waterColor.value=d,R.uniforms.sunDirection.value=h,R.uniforms.distortionScale.value=f,R.uniforms.eye.value=p,n.material=R,n.onBeforeRender=function(e,t,r){if(y.setFromMatrixPosition(n.matrixWorld),x.setFromMatrixPosition(r.matrixWorld),b.extractRotation(n.matrixWorld),v.set(0,0,1),v.applyMatrix4(b),S.subVectors(y,x),S.dot(v)>0)return;S.reflect(v).negate(),S.add(y),b.extractRotation(r.matrixWorld),E.set(0,0,-1),E.applyMatrix4(b),E.add(x),M.subVectors(y,E),M.reflect(v).negate(),M.add(y),T.position.copy(S),T.up.set(0,1,0),T.up.applyMatrix4(b),T.up.reflect(v),T.lookAt(M),T.far=r.far,T.updateMatrixWorld(),T.projectionMatrix.copy(r.projectionMatrix),C.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),C.multiply(T.projectionMatrix),C.multiply(T.matrixWorldInverse),A.setFromNormalAndCoplanarPoint(v,y),A.applyMatrix4(T.matrixWorldInverse),_.set(A.normal.x,A.normal.y,A.normal.z,A.constant);const i=T.projectionMatrix;w.x=(Math.sign(_.x)+i.elements[8])/i.elements[0],w.y=(Math.sign(_.y)+i.elements[9])/i.elements[5],w.z=-1,w.w=(1+i.elements[10])/i.elements[14],_.multiplyScalar(2/_.dot(w)),i.elements[2]=_.x,i.elements[6]=_.y,i.elements[10]=_.z+1-a,i.elements[14]=_.w,p.setFromMatrixPosition(r.matrixWorld);const s=e.getRenderTarget(),o=e.xr.enabled,l=e.shadowMap.autoUpdate;n.visible=!1,e.xr.enabled=!1,e.shadowMap.autoUpdate=!1,e.setRenderTarget(I),e.state.buffers.depth.setMask(!0),!1===e.autoClear&&e.clear(),e.render(t,T),n.visible=!0,e.xr.enabled=o,e.shadowMap.autoUpdate=l,e.setRenderTarget(s);const c=r.viewport;void 0!==c&&e.state.viewport(c)}}}t.Water=i},92440:(e,t,n)=>{"use strict";var r=Object.defineProperty;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const i=n(48480),s=n(7608),a=n(25048),o=n(26840),l=class extends i.Mesh{constructor(e,t={}){super(e),this.isWater=!0,this.type="Water";const n=this,r=void 0!==t.color?new i.Color(t.color):new i.Color(16777215),o=t.textureWidth||512,c=t.textureHeight||512,h=t.clipBias||0,u=t.flowDirection||new i.Vector2(1,0),d=t.flowSpeed||.03,p=t.reflectivity||.02,f=t.scale||1,m=t.shader||l.WaterShader,g=void 0!==t.encoding?t.encoding:3e3,A=t.flowMap||void 0,v=t.normalMap0,y=t.normalMap1,x=.15,b=.075,E=new i.Matrix4,_=new i.Clock;if(void 0===s.Reflector)return void console.error("THREE.Water: Required component Reflector not found.");if(void 0===a.Refractor)return void console.error("THREE.Water: Required component Refractor not found.");const S=new s.Reflector(e,{textureWidth:o,textureHeight:c,clipBias:h,encoding:g}),M=new a.Refractor(e,{textureWidth:o,textureHeight:c,clipBias:h,encoding:g});S.matrixAutoUpdate=!1,M.matrixAutoUpdate=!1,this.material=new i.ShaderMaterial({uniforms:i.UniformsUtils.merge([i.UniformsLib.fog,m.uniforms]),vertexShader:m.vertexShader,fragmentShader:m.fragmentShader,transparent:!0,fog:!0}),void 0!==A?(this.material.defines.USE_FLOWMAP="",this.material.uniforms.tFlowMap={type:"t",value:A}):this.material.uniforms.flowDirection={type:"v2",value:u},v.wrapS=v.wrapT=i.RepeatWrapping,y.wrapS=y.wrapT=i.RepeatWrapping,this.material.uniforms.tReflectionMap.value=S.getRenderTarget().texture,this.material.uniforms.tRefractionMap.value=M.getRenderTarget().texture,this.material.uniforms.tNormalMap0.value=v,this.material.uniforms.tNormalMap1.value=y,this.material.uniforms.color.value=r,this.material.uniforms.reflectivity.value=p,this.material.uniforms.textureMatrix.value=E,this.material.uniforms.config.value.x=0,this.material.uniforms.config.value.y=b,this.material.uniforms.config.value.z=b,this.material.uniforms.config.value.w=f,this.onBeforeRender=function(e,t,r){!function(e){E.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),E.multiply(e.projectionMatrix),E.multiply(e.matrixWorldInverse),E.multiply(n.matrixWorld)}(r),function(){const e=_.getDelta(),t=n.material.uniforms.config;t.value.x+=d*e,t.value.y=t.value.x+b,t.value.x>=x?(t.value.x=0,t.value.y=b):t.value.y>=x&&(t.value.y=t.value.y-x)}(),n.visible=!1,S.matrixWorld.copy(n.matrixWorld),M.matrixWorld.copy(n.matrixWorld),S.onBeforeRender(e,t,r),M.onBeforeRender(e,t,r),n.visible=!0}}};let c=l;var h,u,d;h=c,u="WaterShader",d={uniforms:{color:{value:null},reflectivity:{value:0},tReflectionMap:{value:null},tRefractionMap:{value:null},tNormalMap0:{value:null},tNormalMap1:{value:null},textureMatrix:{value:null},config:{value:new i.Vector4}},vertexShader:"\n\n\t\t#include \n\t\t#include \n\t\t#include \n\n\t\tuniform mat4 textureMatrix;\n\n\t\tvarying vec4 vCoord;\n\t\tvarying vec2 vUv;\n\t\tvarying vec3 vToEye;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tvCoord = textureMatrix * vec4( position, 1.0 );\n\n\t\t\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n\t\t\tvToEye = cameraPosition - worldPosition.xyz;\n\n\t\t\tvec4 mvPosition = viewMatrix * worldPosition; // used in fog_vertex\n\t\t\tgl_Position = projectionMatrix * mvPosition;\n\n\t\t\t#include \n\t\t\t#include \n\n\t\t}",fragmentShader:`\n\n\t\t#include \n\t\t#include \n\t\t#include \n\n\t\tuniform sampler2D tReflectionMap;\n\t\tuniform sampler2D tRefractionMap;\n\t\tuniform sampler2D tNormalMap0;\n\t\tuniform sampler2D tNormalMap1;\n\n\t\t#ifdef USE_FLOWMAP\n\t\t\tuniform sampler2D tFlowMap;\n\t\t#else\n\t\t\tuniform vec2 flowDirection;\n\t\t#endif\n\n\t\tuniform vec3 color;\n\t\tuniform float reflectivity;\n\t\tuniform vec4 config;\n\n\t\tvarying vec4 vCoord;\n\t\tvarying vec2 vUv;\n\t\tvarying vec3 vToEye;\n\n\t\tvoid main() {\n\n\t\t\t#include \n\n\t\t\tfloat flowMapOffset0 = config.x;\n\t\t\tfloat flowMapOffset1 = config.y;\n\t\t\tfloat halfCycle = config.z;\n\t\t\tfloat scale = config.w;\n\n\t\t\tvec3 toEye = normalize( vToEye );\n\n\t\t\t// determine flow direction\n\t\t\tvec2 flow;\n\t\t\t#ifdef USE_FLOWMAP\n\t\t\t\tflow = texture2D( tFlowMap, vUv ).rg * 2.0 - 1.0;\n\t\t\t#else\n\t\t\t\tflow = flowDirection;\n\t\t\t#endif\n\t\t\tflow.x *= - 1.0;\n\n\t\t\t// sample normal maps (distort uvs with flowdata)\n\t\t\tvec4 normalColor0 = texture2D( tNormalMap0, ( vUv * scale ) + flow * flowMapOffset0 );\n\t\t\tvec4 normalColor1 = texture2D( tNormalMap1, ( vUv * scale ) + flow * flowMapOffset1 );\n\n\t\t\t// linear interpolate to get the final normal color\n\t\t\tfloat flowLerp = abs( halfCycle - flowMapOffset0 ) / halfCycle;\n\t\t\tvec4 normalColor = mix( normalColor0, normalColor1, flowLerp );\n\n\t\t\t// calculate normal vector\n\t\t\tvec3 normal = normalize( vec3( normalColor.r * 2.0 - 1.0, normalColor.b, normalColor.g * 2.0 - 1.0 ) );\n\n\t\t\t// calculate the fresnel term to blend reflection and refraction maps\n\t\t\tfloat theta = max( dot( toEye, normal ), 0.0 );\n\t\t\tfloat reflectance = reflectivity + ( 1.0 - reflectivity ) * pow( ( 1.0 - theta ), 5.0 );\n\n\t\t\t// calculate final uv coords\n\t\t\tvec3 coord = vCoord.xyz / vCoord.w;\n\t\t\tvec2 uv = coord.xy + coord.z * normal.xz * 0.05;\n\n\t\t\tvec4 reflectColor = texture2D( tReflectionMap, vec2( 1.0 - uv.x, uv.y ) );\n\t\t\tvec4 refractColor = texture2D( tRefractionMap, uv );\n\n\t\t\t// multiply water color with the mix of both textures\n\t\t\tgl_FragColor = vec4( color, 1.0 ) * mix( refractColor, reflectColor, reflectance );\n\n\t\t\t#include \n\t\t\t#include <${o.version>=154?"colorspace_fragment":"encodings_fragment"}>\n\t\t\t#include \n\n\t\t}`},((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(h,"symbol"!=typeof u?u+"":u,d),t.Water2=c},22432:(e,t)=>{"use strict";function n(e,t,n,r){const i=t.x(),s=t.y(),a=t.z(),o=t.w(),l=i+i,c=s+s,h=a+a,u=i*l,d=i*c,p=i*h,f=s*c,m=s*h,g=a*h,A=o*l,v=o*c,y=o*h;n[r+0]=1-(f+g),n[r+1]=d+y,n[r+2]=p-v,n[r+3]=0,n[r+4]=d-y,n[r+5]=1-(u+g),n[r+6]=m+A,n[r+7]=0,n[r+8]=p+v,n[r+9]=m-A,n[r+10]=1-(u+f),n[r+11]=0,n[r+12]=e.x(),n[r+13]=e.y(),n[r+14]=e.z(),n[r+15]=1}Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t.AmmoPhysics=async function(){if("Ammo"in window==!1)return void console.error("AmmoPhysics: Couldn't find Ammo.js");const e=await Ammo(),t=new e.btDefaultCollisionConfiguration,r=new e.btCollisionDispatcher(t),i=new e.btDbvtBroadphase,s=new e.btSequentialImpulseConstraintSolver,a=new e.btDiscreteDynamicsWorld(r,i,s,t);a.setGravity(new e.btVector3(0,-9.8,0));const o=new e.btTransform,l=[],c=new WeakMap;let h=0;return setInterval((function(){const e=performance.now();if(h>0){const t=(e-h)/1e3;a.stepSimulation(t,10)}h=e;for(let t=0,r=l.length;t0&&(t.instanceMatrix.setUsage(35048),l.push(t),c.set(t,s))}(t,n,r):t.isMesh&&function(t,n,r){const i=t.position,s=t.quaternion,o=new e.btTransform;o.setIdentity(),o.setOrigin(new e.btVector3(i.x,i.y,i.z)),o.setRotation(new e.btQuaternion(s.x,s.y,s.z,s.w));const h=new e.btDefaultMotionState(o),u=new e.btVector3(0,0,0);r.calculateLocalInertia(n,u);const d=new e.btRigidBodyConstructionInfo(n,h,r,u),p=new e.btRigidBody(d);a.addRigidBody(p),n>0&&(l.push(t),c.set(t,p))}(t,n,r))},setMeshPosition:function(t,n,r=0){if(t.isInstancedMesh){const i=c.get(t)[r];i.setAngularVelocity(new e.btVector3(0,0,0)),i.setLinearVelocity(new e.btVector3(0,0,0)),o.setIdentity(),o.setOrigin(new e.btVector3(n.x,n.y,n.z)),i.setWorldTransform(o)}else if(t.isMesh){const r=c.get(t);r.setAngularVelocity(new e.btVector3(0,0,0)),r.setLinearVelocity(new e.btVector3(0,0,0)),o.setIdentity(),o.setOrigin(new e.btVector3(n.x,n.y,n.z)),r.setWorldTransform(o)}}}}},37608:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(51892),s=n(49284),a=n(45264),o=n(64552);class l extends i.Pass{constructor(e,t){super(),this.resolution=void 0!==t?t:256,this.needsInit=!0,this.adaptive=void 0===e||!!e,this.luminanceRT=null,this.previousLuminanceRT=null,this.currentLuminanceRT=null;const n=s.CopyShader;this.copyUniforms=r.UniformsUtils.clone(n.uniforms),this.materialCopy=new r.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,blending:r.NoBlending,depthTest:!1}),this.materialLuminance=new r.ShaderMaterial({uniforms:r.UniformsUtils.clone(a.LuminosityShader.uniforms),vertexShader:a.LuminosityShader.vertexShader,fragmentShader:a.LuminosityShader.fragmentShader,blending:r.NoBlending}),this.adaptLuminanceShader={defines:{MIP_LEVEL_1X1:(Math.log(this.resolution)/Math.log(2)).toFixed(1)},uniforms:{lastLum:{value:null},currentLum:{value:null},minLuminance:{value:.01},delta:{value:.016},tau:{value:1}},vertexShader:"varying vec2 vUv;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\n\n\t\t\t\tuniform sampler2D lastLum;\n\t\t\t\tuniform sampler2D currentLum;\n\t\t\t\tuniform float minLuminance;\n\t\t\t\tuniform float delta;\n\t\t\t\tuniform float tau;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec4 lastLum = texture2D( lastLum, vUv, MIP_LEVEL_1X1 );\n\t\t\t\t\tvec4 currentLum = texture2D( currentLum, vUv, MIP_LEVEL_1X1 );\n\n\t\t\t\t\tfloat fLastLum = max( minLuminance, lastLum.r );\n\t\t\t\t\tfloat fCurrentLum = max( minLuminance, currentLum.r );\n\n\t\t\t\t\t//The adaption seems to work better in extreme lighting differences\n\t\t\t\t\t//if the input luminance is squared.\n\t\t\t\t\tfCurrentLum *= fCurrentLum;\n\n\t\t\t\t\t// Adapt the luminance using Pattanaik's technique\n\t\t\t\t\tfloat fAdaptedLum = fLastLum + (fCurrentLum - fLastLum) * (1.0 - exp(-delta * tau));\n\t\t\t\t\t// \"fAdaptedLum = sqrt(fAdaptedLum);\n\t\t\t\t\tgl_FragColor.r = fAdaptedLum;\n\t\t\t\t}"},this.materialAdaptiveLum=new r.ShaderMaterial({uniforms:r.UniformsUtils.clone(this.adaptLuminanceShader.uniforms),vertexShader:this.adaptLuminanceShader.vertexShader,fragmentShader:this.adaptLuminanceShader.fragmentShader,defines:Object.assign({},this.adaptLuminanceShader.defines),blending:r.NoBlending}),this.materialToneMap=new r.ShaderMaterial({uniforms:r.UniformsUtils.clone(o.ToneMapShader.uniforms),vertexShader:o.ToneMapShader.vertexShader,fragmentShader:o.ToneMapShader.fragmentShader,blending:r.NoBlending}),this.fsQuad=new i.FullScreenQuad(null)}render(e,t,n,r){this.needsInit&&(this.reset(e),this.luminanceRT.texture.type=n.texture.type,this.previousLuminanceRT.texture.type=n.texture.type,this.currentLuminanceRT.texture.type=n.texture.type,this.needsInit=!1),this.adaptive&&(this.fsQuad.material=this.materialLuminance,this.materialLuminance.uniforms.tDiffuse.value=n.texture,e.setRenderTarget(this.currentLuminanceRT),this.fsQuad.render(e),this.fsQuad.material=this.materialAdaptiveLum,this.materialAdaptiveLum.uniforms.delta.value=r,this.materialAdaptiveLum.uniforms.lastLum.value=this.previousLuminanceRT.texture,this.materialAdaptiveLum.uniforms.currentLum.value=this.currentLuminanceRT.texture,e.setRenderTarget(this.luminanceRT),this.fsQuad.render(e),this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.luminanceRT.texture,e.setRenderTarget(this.previousLuminanceRT),this.fsQuad.render(e)),this.fsQuad.material=this.materialToneMap,this.materialToneMap.uniforms.tDiffuse.value=n.texture,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(),this.fsQuad.render(e))}reset(){this.luminanceRT&&this.luminanceRT.dispose(),this.currentLuminanceRT&&this.currentLuminanceRT.dispose(),this.previousLuminanceRT&&this.previousLuminanceRT.dispose(),this.luminanceRT=new r.WebGLRenderTarget(this.resolution,this.resolution),this.luminanceRT.texture.name="AdaptiveToneMappingPass.l",this.luminanceRT.texture.generateMipmaps=!1,this.previousLuminanceRT=new r.WebGLRenderTarget(this.resolution,this.resolution),this.previousLuminanceRT.texture.name="AdaptiveToneMappingPass.pl",this.previousLuminanceRT.texture.generateMipmaps=!1;const e={minFilter:r.LinearMipmapLinearFilter,generateMipmaps:!0};this.currentLuminanceRT=new r.WebGLRenderTarget(this.resolution,this.resolution,e),this.currentLuminanceRT.texture.name="AdaptiveToneMappingPass.cl",this.adaptive&&(this.materialToneMap.defines.ADAPTED_LUMINANCE="",this.materialToneMap.uniforms.luminanceMap.value=this.luminanceRT.texture),this.fsQuad.material=new r.MeshBasicMaterial({color:7829367}),this.materialLuminance.needsUpdate=!0,this.materialAdaptiveLum.needsUpdate=!0,this.materialToneMap.needsUpdate=!0}setAdaptive(e){e?(this.adaptive=!0,this.materialToneMap.defines.ADAPTED_LUMINANCE="",this.materialToneMap.uniforms.luminanceMap.value=this.luminanceRT.texture):(this.adaptive=!1,delete this.materialToneMap.defines.ADAPTED_LUMINANCE,this.materialToneMap.uniforms.luminanceMap.value=null),this.materialToneMap.needsUpdate=!0}setAdaptionRate(e){e&&(this.materialAdaptiveLum.uniforms.tau.value=Math.abs(e))}setMinLuminance(e){e&&(this.materialToneMap.uniforms.minLuminance.value=e,this.materialAdaptiveLum.uniforms.minLuminance.value=e)}setMaxLuminance(e){e&&(this.materialToneMap.uniforms.maxLuminance.value=e)}setAverageLuminance(e){e&&(this.materialToneMap.uniforms.averageLuminance.value=e)}setMiddleGrey(e){e&&(this.materialToneMap.uniforms.middleGrey.value=e)}dispose(){this.luminanceRT&&this.luminanceRT.dispose(),this.previousLuminanceRT&&this.previousLuminanceRT.dispose(),this.currentLuminanceRT&&this.currentLuminanceRT.dispose(),this.materialLuminance&&this.materialLuminance.dispose(),this.materialAdaptiveLum&&this.materialAdaptiveLum.dispose(),this.materialCopy&&this.materialCopy.dispose(),this.materialToneMap&&this.materialToneMap.dispose()}}t.AdaptiveToneMappingPass=l},80472:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(51892),o=n(58240);class l extends a.Pass{constructor(e=.96,t=o.AfterimageShader){super(),i(this,"shader"),i(this,"uniforms"),i(this,"textureComp"),i(this,"textureOld"),i(this,"shaderMaterial"),i(this,"compFsQuad"),i(this,"copyFsQuad"),this.shader=t,this.uniforms=s.UniformsUtils.clone(t.uniforms),this.uniforms.damp.value=e,this.textureComp=new s.WebGLRenderTarget(window.innerWidth,window.innerHeight,{minFilter:s.LinearFilter,magFilter:s.NearestFilter,format:s.RGBAFormat}),this.textureOld=new s.WebGLRenderTarget(window.innerWidth,window.innerHeight,{minFilter:s.LinearFilter,magFilter:s.NearestFilter,format:s.RGBAFormat}),this.shaderMaterial=new s.ShaderMaterial({uniforms:this.uniforms,vertexShader:this.shader.vertexShader,fragmentShader:this.shader.fragmentShader}),this.compFsQuad=new a.FullScreenQuad(this.shaderMaterial);let n=new s.MeshBasicMaterial;this.copyFsQuad=new a.FullScreenQuad(n)}render(e,t,n){this.uniforms.tOld.value=this.textureOld.texture,this.uniforms.tNew.value=n.texture,e.setRenderTarget(this.textureComp),this.compFsQuad.render(e),this.copyFsQuad.material.map=this.textureComp.texture,this.renderToScreen?(e.setRenderTarget(null),this.copyFsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(),this.copyFsQuad.render(e));let r=this.textureOld;this.textureOld=this.textureComp,this.textureComp=r}setSize(e,t){this.textureComp.setSize(e,t),this.textureOld.setSize(e,t)}}t.AfterimagePass=l},26236:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(51892),a=n(48480),o=n(75040);class l extends s.Pass{constructor(e=1,t=25,n=4,r=256){super(),i(this,"renderTargetX"),i(this,"renderTargetY"),i(this,"materialCombine"),i(this,"materialConvolution"),i(this,"fsQuad"),i(this,"combineUniforms"),i(this,"convolutionUniforms"),i(this,"blurX",new a.Vector2(.001953125,0)),i(this,"blurY",new a.Vector2(0,.001953125)),this.renderTargetX=new a.WebGLRenderTarget(r,r),this.renderTargetX.texture.name="BloomPass.x",this.renderTargetY=new a.WebGLRenderTarget(r,r),this.renderTargetY.texture.name="BloomPass.y",this.combineUniforms=a.UniformsUtils.clone(c.uniforms),this.combineUniforms.strength.value=e,this.materialCombine=new a.ShaderMaterial({uniforms:this.combineUniforms,vertexShader:c.vertexShader,fragmentShader:c.fragmentShader,blending:a.AdditiveBlending,transparent:!0}),void 0===o.ConvolutionShader&&console.error("BloomPass relies on ConvolutionShader");const l=o.ConvolutionShader;this.convolutionUniforms=a.UniformsUtils.clone(l.uniforms),this.convolutionUniforms.uImageIncrement.value=this.blurX,this.convolutionUniforms.cKernel.value=o.ConvolutionShader.buildKernel(n),this.materialConvolution=new a.ShaderMaterial({uniforms:this.convolutionUniforms,vertexShader:l.vertexShader,fragmentShader:l.fragmentShader,defines:{KERNEL_SIZE_FLOAT:t.toFixed(1),KERNEL_SIZE_INT:t.toFixed(0)}}),this.needsSwap=!1,this.fsQuad=new s.FullScreenQuad(this.materialConvolution)}render(e,t,n,r,i){i&&e.state.buffers.stencil.setTest(!1),this.fsQuad.material=this.materialConvolution,this.convolutionUniforms.tDiffuse.value=n.texture,this.convolutionUniforms.uImageIncrement.value=this.blurX,e.setRenderTarget(this.renderTargetX),e.clear(),this.fsQuad.render(e),this.convolutionUniforms.tDiffuse.value=this.renderTargetX.texture,this.convolutionUniforms.uImageIncrement.value=this.blurY,e.setRenderTarget(this.renderTargetY),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.materialCombine,this.combineUniforms.tDiffuse.value=this.renderTargetY.texture,i&&e.state.buffers.stencil.setTest(!0),e.setRenderTarget(n),this.clear&&e.clear(),this.fsQuad.render(e)}}const c={uniforms:{tDiffuse:{value:null},strength:{value:1}},vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",fragmentShader:"\n uniform float strength;\n uniform sampler2D tDiffuse;\n varying vec2 vUv;\n void main() {\n vec4 texel = texture2D( tDiffuse, vUv );\n gl_FragColor = strength * texel;\n }"};t.BloomPass=l},47216:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(51892),a=n(48480),o=n(77356);class l extends s.Pass{constructor(e,t,n){super(),i(this,"scene"),i(this,"camera"),i(this,"renderTargetDepth"),i(this,"materialDepth"),i(this,"materialBokeh"),i(this,"fsQuad"),i(this,"_oldClearColor"),i(this,"uniforms"),this.scene=e,this.camera=t;const r=void 0!==n.focus?n.focus:1,l=void 0!==n.aspect?n.aspect:t.aspect,c=void 0!==n.aperture?n.aperture:.025,h=void 0!==n.maxblur?n.maxblur:1,u=n.width||window.innerWidth||1,d=n.height||window.innerHeight||1;this.renderTargetDepth=new a.WebGLRenderTarget(u,d,{minFilter:a.NearestFilter,magFilter:a.NearestFilter}),this.renderTargetDepth.texture.name="BokehPass.depth",this.materialDepth=new a.MeshDepthMaterial,this.materialDepth.depthPacking=a.RGBADepthPacking,this.materialDepth.blending=a.NoBlending,void 0===o.BokehShader&&console.error("BokehPass relies on BokehShader");const p=o.BokehShader,f=a.UniformsUtils.clone(p.uniforms);f.tDepth.value=this.renderTargetDepth.texture,f.focus.value=r,f.aspect.value=l,f.aperture.value=c,f.maxblur.value=h,f.nearClip.value=t.near,f.farClip.value=t.far,this.materialBokeh=new a.ShaderMaterial({defines:Object.assign({},p.defines),uniforms:f,vertexShader:p.vertexShader,fragmentShader:p.fragmentShader}),this.uniforms=f,this.needsSwap=!1,this.fsQuad=new s.FullScreenQuad(this.materialBokeh),this._oldClearColor=new a.Color}render(e,t,n){this.scene.overrideMaterial=this.materialDepth,e.getClearColor(this._oldClearColor);const r=e.getClearAlpha(),i=e.autoClear;e.autoClear=!1,e.setClearColor(16777215),e.setClearAlpha(1),e.setRenderTarget(this.renderTargetDepth),e.clear(),e.render(this.scene,this.camera),this.uniforms.tColor.value=n.texture,this.uniforms.nearClip.value=this.camera.near,this.uniforms.farClip.value=this.camera.far,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),e.clear(),this.fsQuad.render(e)),this.scene.overrideMaterial=null,e.setClearColor(this._oldClearColor),e.setClearAlpha(r),e.autoClear=i}}t.BokehPass=l},60072:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(51892),a=n(48480);class o extends s.Pass{constructor(e,t){super(),i(this,"clearColor"),i(this,"clearAlpha"),i(this,"_oldClearColor"),this.needsSwap=!1,this.clearColor=void 0!==e?e:0,this.clearAlpha=void 0!==t?t:0,this._oldClearColor=new a.Color}render(e,t,n){let r;this.clearColor&&(e.getClearColor(this._oldClearColor),r=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),e.setRenderTarget(this.renderToScreen?null:n),e.clear(),this.clearColor&&e.setClearColor(this._oldClearColor,r)}}t.ClearPass=o},22456:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(51892);class s extends i.Pass{constructor(e,t,n=1){super(),this.camera=e,this.needsSwap=!1,this.cubeShader=r.ShaderLib.cube,this.cubeMesh=new r.Mesh(new r.BoxGeometry(10,10,10),new r.ShaderMaterial({uniforms:r.UniformsUtils.clone(this.cubeShader.uniforms),vertexShader:this.cubeShader.vertexShader,fragmentShader:this.cubeShader.fragmentShader,depthTest:!1,depthWrite:!1,side:r.BackSide})),Object.defineProperty(this.cubeMesh.material,"envMap",{get:function(){return this.uniforms.tCube.value}}),this.tCube=t,this.opacity=n,this.cubeScene=new r.Scene,this.cubeCamera=new r.PerspectiveCamera,this.cubeScene.add(this.cubeMesh)}render(e,t,n){const r=e.autoClear;e.autoClear=!1,this.cubeCamera.projectionMatrix.copy(this.camera.projectionMatrix),this.cubeCamera.quaternion.setFromRotationMatrix(this.camera.matrixWorld),this.cubeMesh.material.uniforms.tCube.value=this.tCube,this.cubeMesh.material.uniforms.tFlip.value=this.tCube.isCubeTexture&&!1===this.tCube.isRenderTargetTexture?-1:1,this.cubeMesh.material.uniforms.opacity.value=this.opacity,this.cubeMesh.material.transparent=this.opacity<1,e.setRenderTarget(this.renderToScreen?null:n),this.clear&&e.clear(),e.render(this.cubeScene,this.cubeCamera),e.autoClear=r}dispose(){this.cubeMesh.geometry.dispose(),this.cubeMesh.material.dispose()}}t.CubeTexturePass=s},41092:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(51892),a=n(48480),o=n(12400);class l extends s.Pass{constructor(e,t,n){super(),i(this,"material"),i(this,"fsQuad"),i(this,"uniforms"),void 0===o.DotScreenShader&&console.error("THREE.DotScreenPass relies on THREE.DotScreenShader");const r=o.DotScreenShader;this.uniforms=a.UniformsUtils.clone(r.uniforms),void 0!==e&&this.uniforms.center.value.copy(e),void 0!==t&&(this.uniforms.angle.value=t),void 0!==n&&(this.uniforms.scale.value=n),this.material=new a.ShaderMaterial({uniforms:this.uniforms,vertexShader:r.vertexShader,fragmentShader:r.fragmentShader}),this.fsQuad=new s.FullScreenQuad(this.material)}render(e,t,n){this.uniforms.tDiffuse.value=n.texture,this.uniforms.tSize.value.set(n.width,n.height),this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(),this.fsQuad.render(e))}}t.DotScreenPass=l},75756:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(49284),o=n(72412),l=n(82344);t.EffectComposer=class{constructor(e,t){if(i(this,"renderer"),i(this,"_pixelRatio"),i(this,"_width"),i(this,"_height"),i(this,"renderTarget1"),i(this,"renderTarget2"),i(this,"writeBuffer"),i(this,"readBuffer"),i(this,"renderToScreen"),i(this,"passes",[]),i(this,"copyPass"),i(this,"clock"),this.renderer=e,void 0===t){const n={minFilter:s.LinearFilter,magFilter:s.LinearFilter,format:s.RGBAFormat},r=e.getSize(new s.Vector2);this._pixelRatio=e.getPixelRatio(),this._width=r.width,this._height=r.height,(t=new s.WebGLRenderTarget(this._width*this._pixelRatio,this._height*this._pixelRatio,n)).texture.name="EffectComposer.rt1"}else this._pixelRatio=1,this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,void 0===a.CopyShader&&console.error("THREE.EffectComposer relies on CopyShader"),void 0===o.ShaderPass&&console.error("THREE.EffectComposer relies on ShaderPass"),this.copyPass=new o.ShaderPass(a.CopyShader),this.copyPass.material.blending=s.NoBlending,this.clock=new s.Clock}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(51892),a=n(48480),o=n(3600);class l extends s.Pass{constructor(e,t,n,r){super(),i(this,"material"),i(this,"fsQuad"),i(this,"uniforms"),void 0===o.FilmShader&&console.error("THREE.FilmPass relies on FilmShader");const l=o.FilmShader;this.uniforms=a.UniformsUtils.clone(l.uniforms),this.material=new a.ShaderMaterial({uniforms:this.uniforms,vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}),void 0!==r&&(this.uniforms.grayscale.value=r),void 0!==e&&(this.uniforms.nIntensity.value=e),void 0!==t&&(this.uniforms.sIntensity.value=t),void 0!==n&&(this.uniforms.sCount.value=n),this.fsQuad=new s.FullScreenQuad(this.material)}render(e,t,n,r){this.uniforms.tDiffuse.value=n.texture,this.uniforms.time.value+=r,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(),this.fsQuad.render(e))}}t.FilmPass=l},9156:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(51892),a=n(48480),o=n(10304);class l extends s.Pass{constructor(e=64){super(),i(this,"material"),i(this,"fsQuad"),i(this,"goWild"),i(this,"curF"),i(this,"randX"),i(this,"uniforms"),this.uniforms=a.UniformsUtils.clone(o.DigitalGlitch.uniforms),this.uniforms.tDisp.value=this.generateHeightmap(e),this.material=new a.ShaderMaterial({uniforms:this.uniforms,vertexShader:o.DigitalGlitch.vertexShader,fragmentShader:o.DigitalGlitch.fragmentShader}),this.fsQuad=new s.FullScreenQuad(this.material),this.goWild=!1,this.curF=0,this.generateTrigger()}render(e,t,n){!1===e.capabilities.isWebGL2&&(this.uniforms.tDisp.value.format=a.LuminanceFormat),this.uniforms.tDiffuse.value=n.texture,this.uniforms.seed.value=Math.random(),this.uniforms.byp.value=0,this.curF%this.randX==0||1==this.goWild?(this.uniforms.amount.value=Math.random()/30,this.uniforms.angle.value=a.MathUtils.randFloat(-Math.PI,Math.PI),this.uniforms.seed_x.value=a.MathUtils.randFloat(-1,1),this.uniforms.seed_y.value=a.MathUtils.randFloat(-1,1),this.uniforms.distortion_x.value=a.MathUtils.randFloat(0,1),this.uniforms.distortion_y.value=a.MathUtils.randFloat(0,1),this.curF=0,this.generateTrigger()):this.curF%this.randX{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(51892),a=n(48480),o=n(9603);class l extends s.Pass{constructor(e,t,n){super(),i(this,"material"),i(this,"fsQuad"),i(this,"uniforms"),void 0===o.HalftoneShader&&console.error("THREE.HalftonePass requires HalftoneShader"),this.uniforms=a.UniformsUtils.clone(o.HalftoneShader.uniforms),this.material=new a.ShaderMaterial({uniforms:this.uniforms,fragmentShader:o.HalftoneShader.fragmentShader,vertexShader:o.HalftoneShader.vertexShader}),this.uniforms.width.value=e,this.uniforms.height.value=t;for(const r in n)n.hasOwnProperty(r)&&this.uniforms.hasOwnProperty(r)&&(this.uniforms[r].value=n[r]);this.fsQuad=new s.FullScreenQuad(this.material)}render(e,t,n){this.material.uniforms.tDiffuse.value=n.texture,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(),this.fsQuad.render(e))}setSize(e,t){this.uniforms.width.value=e,this.uniforms.height.value=t}}t.HalftonePass=l},47004:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(72412),i={defines:{USE_3DTEXTURE:1},uniforms:{lut3d:{value:null},lut:{value:null},lutSize:{value:0},tDiffuse:{value:null},intensity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}\n\n\t",fragmentShader:"\n\n\t\tuniform float lutSize;\n\t\t#if USE_3DTEXTURE\n\t\tprecision highp sampler3D;\n\t\tuniform sampler3D lut3d;\n\t\t#else\n\t\tuniform sampler2D lut;\n\n\t\tvec3 lutLookup( sampler2D tex, float size, vec3 rgb ) {\n\n\t\t\tfloat sliceHeight = 1.0 / size;\n\t\t\tfloat yPixelHeight = 1.0 / ( size * size );\n\n\t\t\t// Get the slices on either side of the sample\n\t\t\tfloat slice = rgb.b * size;\n\t\t\tfloat interp = fract( slice );\n\t\t\tfloat slice0 = slice - interp;\n\t\t\tfloat centeredInterp = interp - 0.5;\n\n\t\t\tfloat slice1 = slice0 + sign( centeredInterp );\n\n\t\t\t// Pull y sample in by half a pixel in each direction to avoid color\n\t\t\t// bleeding from adjacent slices.\n\t\t\tfloat greenOffset = clamp( rgb.g * sliceHeight, yPixelHeight * 0.5, sliceHeight - yPixelHeight * 0.5 );\n\n\t\t\tvec2 uv0 = vec2(\n\t\t\t\trgb.r,\n\t\t\t\tslice0 * sliceHeight + greenOffset\n\t\t\t);\n\t\t\tvec2 uv1 = vec2(\n\t\t\t\trgb.r,\n\t\t\t\tslice1 * sliceHeight + greenOffset\n\t\t\t);\n\n\t\t\tvec3 sample0 = texture2D( tex, uv0 ).rgb;\n\t\t\tvec3 sample1 = texture2D( tex, uv1 ).rgb;\n\n\t\t\treturn mix( sample0, sample1, abs( centeredInterp ) );\n\n\t\t}\n\t\t#endif\n\n\t\tvarying vec2 vUv;\n\t\tuniform float intensity;\n\t\tuniform sampler2D tDiffuse;\n\t\tvoid main() {\n\n\t\t\tvec4 val = texture2D( tDiffuse, vUv );\n\t\t\tvec4 lutVal;\n\n\t\t\t// pull the sample in by half a pixel so the sample begins\n\t\t\t// at the center of the edge pixels.\n\t\t\tfloat pixelWidth = 1.0 / lutSize;\n\t\t\tfloat halfPixelWidth = 0.5 / lutSize;\n\t\t\tvec3 uvw = vec3( halfPixelWidth ) + val.rgb * ( 1.0 - pixelWidth );\n\n\t\t\t#if USE_3DTEXTURE\n\n\t\t\tlutVal = vec4( texture( lut3d, uvw ).rgb, val.a );\n\n\t\t\t#else\n\n\t\t\tlutVal = vec4( lutLookup( lut, lutSize, uvw ), val.a );\n\n\t\t\t#endif\n\n\t\t\tgl_FragColor = vec4( mix( val, lutVal, intensity ) );\n\n\t\t}\n\n\t"};class s extends r.ShaderPass{set lut(e){const t=this.material;if(e!==this.lut&&(t.uniforms.lut3d.value=null,t.uniforms.lut.value=null,e)){const n=e.isData3DTexture?1:0;n!==t.defines.USE_3DTEXTURE&&(t.defines.USE_3DTEXTURE=n,t.needsUpdate=!0),t.uniforms.lutSize.value=e.image.width,e.isData3DTexture?t.uniforms.lut3d.value=e:t.uniforms.lut.value=e}}get lut(){return this.material.uniforms.lut.value||this.material.uniforms.lut3d.value}set intensity(e){this.material.uniforms.intensity.value=e}get intensity(){return this.material.uniforms.intensity.value}constructor(e={}){super(i),this.lut=e.lut||null,this.intensity="intensity"in e?e.intensity:1}}t.LUTPass=s},82344:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(51892);class a extends s.Pass{constructor(e,t){super(),i(this,"scene"),i(this,"camera"),i(this,"inverse"),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const r=e.getContext(),i=e.state;let s,a;i.buffers.color.setMask(!1),i.buffers.depth.setMask(!1),i.buffers.color.setLocked(!0),i.buffers.depth.setLocked(!0),this.inverse?(s=0,a=1):(s=1,a=0),i.buffers.stencil.setTest(!0),i.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),i.buffers.stencil.setFunc(r.ALWAYS,s,4294967295),i.buffers.stencil.setClear(a),i.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),i.buffers.color.setLocked(!1),i.buffers.depth.setLocked(!1),i.buffers.stencil.setLocked(!1),i.buffers.stencil.setFunc(r.EQUAL,1,4294967295),i.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),i.buffers.stencil.setLocked(!0)}}class o extends s.Pass{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}t.ClearMaskPass=o,t.MaskPass=a},23264:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(51892),a=n(48480),o=n(49284);class l extends s.Pass{constructor(e,t,n,r){super(),i(this,"renderScene"),i(this,"renderCamera"),i(this,"selectedObjects"),i(this,"visibleEdgeColor"),i(this,"hiddenEdgeColor"),i(this,"edgeGlow"),i(this,"usePatternTexture"),i(this,"edgeThickness"),i(this,"edgeStrength"),i(this,"downSampleRatio"),i(this,"pulsePeriod"),i(this,"resolution"),i(this,"renderTargetMaskBuffer"),i(this,"depthMaterial"),i(this,"prepareMaskMaterial"),i(this,"renderTargetDepthBuffer"),i(this,"renderTargetMaskDownSampleBuffer"),i(this,"renderTargetBlurBuffer1"),i(this,"renderTargetBlurBuffer2"),i(this,"edgeDetectionMaterial"),i(this,"renderTargetEdgeBuffer1"),i(this,"renderTargetEdgeBuffer2"),i(this,"separableBlurMaterial1"),i(this,"separableBlurMaterial2"),i(this,"overlayMaterial"),i(this,"materialCopy"),i(this,"oldClearAlpha"),i(this,"fsQuad"),i(this,"tempPulseColor1"),i(this,"tempPulseColor2"),i(this,"textureMatrix"),i(this,"patternTexture"),i(this,"_visibilityCache"),i(this,"_oldClearColor"),i(this,"copyUniforms"),i(this,"BlurDirectionX",new a.Vector2(1,0)),i(this,"BlurDirectionY",new a.Vector2(0,1)),this.renderScene=t,this.renderCamera=n,this.selectedObjects=void 0!==r?r:[],this.visibleEdgeColor=new a.Color(1,1,1),this.hiddenEdgeColor=new a.Color(.1,.04,.02),this.edgeGlow=0,this.usePatternTexture=!1,this.edgeThickness=1,this.edgeStrength=3,this.downSampleRatio=2,this.pulsePeriod=0,this._visibilityCache=new Map,this.resolution=void 0!==e?new a.Vector2(e.x,e.y):new a.Vector2(256,256);const l=Math.round(this.resolution.x/this.downSampleRatio),c=Math.round(this.resolution.y/this.downSampleRatio);this.renderTargetMaskBuffer=new a.WebGLRenderTarget(this.resolution.x,this.resolution.y),this.renderTargetMaskBuffer.texture.name="OutlinePass.mask",this.renderTargetMaskBuffer.texture.generateMipmaps=!1,this.depthMaterial=new a.MeshDepthMaterial,this.depthMaterial.side=a.DoubleSide,this.depthMaterial.depthPacking=a.RGBADepthPacking,this.depthMaterial.blending=a.NoBlending,this.prepareMaskMaterial=this.getPrepareMaskMaterial(),this.prepareMaskMaterial.side=a.DoubleSide,this.prepareMaskMaterial.fragmentShader=function(e,t){const n=t.isPerspectiveCamera?"perspective":"orthographic";return e.replace(/DEPTH_TO_VIEW_Z/g,n+"DepthToViewZ")}(this.prepareMaskMaterial.fragmentShader,this.renderCamera),this.renderTargetDepthBuffer=new a.WebGLRenderTarget(this.resolution.x,this.resolution.y),this.renderTargetDepthBuffer.texture.name="OutlinePass.depth",this.renderTargetDepthBuffer.texture.generateMipmaps=!1,this.renderTargetMaskDownSampleBuffer=new a.WebGLRenderTarget(l,c),this.renderTargetMaskDownSampleBuffer.texture.name="OutlinePass.depthDownSample",this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps=!1,this.renderTargetBlurBuffer1=new a.WebGLRenderTarget(l,c),this.renderTargetBlurBuffer1.texture.name="OutlinePass.blur1",this.renderTargetBlurBuffer1.texture.generateMipmaps=!1,this.renderTargetBlurBuffer2=new a.WebGLRenderTarget(Math.round(l/2),Math.round(c/2)),this.renderTargetBlurBuffer2.texture.name="OutlinePass.blur2",this.renderTargetBlurBuffer2.texture.generateMipmaps=!1,this.edgeDetectionMaterial=this.getEdgeDetectionMaterial(),this.renderTargetEdgeBuffer1=new a.WebGLRenderTarget(l,c),this.renderTargetEdgeBuffer1.texture.name="OutlinePass.edge1",this.renderTargetEdgeBuffer1.texture.generateMipmaps=!1,this.renderTargetEdgeBuffer2=new a.WebGLRenderTarget(Math.round(l/2),Math.round(c/2)),this.renderTargetEdgeBuffer2.texture.name="OutlinePass.edge2",this.renderTargetEdgeBuffer2.texture.generateMipmaps=!1;this.separableBlurMaterial1=this.getSeperableBlurMaterial(4),this.separableBlurMaterial1.uniforms.texSize.value.set(l,c),this.separableBlurMaterial1.uniforms.kernelRadius.value=1,this.separableBlurMaterial2=this.getSeperableBlurMaterial(4),this.separableBlurMaterial2.uniforms.texSize.value.set(Math.round(l/2),Math.round(c/2)),this.separableBlurMaterial2.uniforms.kernelRadius.value=4,this.overlayMaterial=this.getOverlayMaterial(),void 0===o.CopyShader&&console.error("THREE.OutlinePass relies on CopyShader");const h=o.CopyShader;this.copyUniforms=a.UniformsUtils.clone(h.uniforms),this.copyUniforms.opacity.value=1,this.materialCopy=new a.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:h.vertexShader,fragmentShader:h.fragmentShader,blending:a.NoBlending,depthTest:!1,depthWrite:!1,transparent:!0}),this.enabled=!0,this.needsSwap=!1,this._oldClearColor=new a.Color,this.oldClearAlpha=1,this.fsQuad=new s.FullScreenQuad(this.materialCopy),this.tempPulseColor1=new a.Color,this.tempPulseColor2=new a.Color,this.textureMatrix=new a.Matrix4}dispose(){this.renderTargetMaskBuffer.dispose(),this.renderTargetDepthBuffer.dispose(),this.renderTargetMaskDownSampleBuffer.dispose(),this.renderTargetBlurBuffer1.dispose(),this.renderTargetBlurBuffer2.dispose(),this.renderTargetEdgeBuffer1.dispose(),this.renderTargetEdgeBuffer2.dispose()}setSize(e,t){this.renderTargetMaskBuffer.setSize(e,t),this.renderTargetDepthBuffer.setSize(e,t);let n=Math.round(e/this.downSampleRatio),r=Math.round(t/this.downSampleRatio);this.renderTargetMaskDownSampleBuffer.setSize(n,r),this.renderTargetBlurBuffer1.setSize(n,r),this.renderTargetEdgeBuffer1.setSize(n,r),this.separableBlurMaterial1.uniforms.texSize.value.set(n,r),n=Math.round(n/2),r=Math.round(r/2),this.renderTargetBlurBuffer2.setSize(n,r),this.renderTargetEdgeBuffer2.setSize(n,r),this.separableBlurMaterial2.uniforms.texSize.value.set(n,r)}changeVisibilityOfSelectedObjects(e){const t=this._visibilityCache;function n(n){n.isMesh&&(!0===e?n.visible=t.get(n):(t.set(n,n.visible),n.visible=e))}for(let r=0;r0){e.getClearColor(this._oldClearColor),this.oldClearAlpha=e.getClearAlpha();const t=e.autoClear;e.autoClear=!1,i&&e.state.buffers.stencil.setTest(!1),e.setClearColor(16777215,1),this.changeVisibilityOfSelectedObjects(!1);const r=this.renderScene.background;if(this.renderScene.background=null,this.renderScene.overrideMaterial=this.depthMaterial,e.setRenderTarget(this.renderTargetDepthBuffer),e.clear(),e.render(this.renderScene,this.renderCamera),this.changeVisibilityOfSelectedObjects(!0),this._visibilityCache.clear(),this.updateTextureMatrix(),this.changeVisibilityOfNonSelectedObjects(!1),this.renderScene.overrideMaterial=this.prepareMaskMaterial,this.prepareMaskMaterial.uniforms.cameraNearFar.value.set(this.renderCamera.near,this.renderCamera.far),this.prepareMaskMaterial.uniforms.depthTexture.value=this.renderTargetDepthBuffer.texture,this.prepareMaskMaterial.uniforms.textureMatrix.value=this.textureMatrix,e.setRenderTarget(this.renderTargetMaskBuffer),e.clear(),e.render(this.renderScene,this.renderCamera),this.renderScene.overrideMaterial=null,this.changeVisibilityOfNonSelectedObjects(!0),this._visibilityCache.clear(),this.renderScene.background=r,this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=this.renderTargetMaskBuffer.texture,e.setRenderTarget(this.renderTargetMaskDownSampleBuffer),e.clear(),this.fsQuad.render(e),this.tempPulseColor1.copy(this.visibleEdgeColor),this.tempPulseColor2.copy(this.hiddenEdgeColor),this.pulsePeriod>0){const e=.625+.75*Math.cos(.01*performance.now()/this.pulsePeriod)/2;this.tempPulseColor1.multiplyScalar(e),this.tempPulseColor2.multiplyScalar(e)}this.fsQuad.material=this.edgeDetectionMaterial,this.edgeDetectionMaterial.uniforms.maskTexture.value=this.renderTargetMaskDownSampleBuffer.texture,this.edgeDetectionMaterial.uniforms.texSize.value.set(this.renderTargetMaskDownSampleBuffer.width,this.renderTargetMaskDownSampleBuffer.height),this.edgeDetectionMaterial.uniforms.visibleEdgeColor.value=this.tempPulseColor1,this.edgeDetectionMaterial.uniforms.hiddenEdgeColor.value=this.tempPulseColor2,e.setRenderTarget(this.renderTargetEdgeBuffer1),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.separableBlurMaterial1,this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=this.BlurDirectionX,this.separableBlurMaterial1.uniforms.kernelRadius.value=this.edgeThickness,e.setRenderTarget(this.renderTargetBlurBuffer1),e.clear(),this.fsQuad.render(e),this.separableBlurMaterial1.uniforms.colorTexture.value=this.renderTargetBlurBuffer1.texture,this.separableBlurMaterial1.uniforms.direction.value=this.BlurDirectionY,e.setRenderTarget(this.renderTargetEdgeBuffer1),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.separableBlurMaterial2,this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetEdgeBuffer1.texture,this.separableBlurMaterial2.uniforms.direction.value=this.BlurDirectionX,e.setRenderTarget(this.renderTargetBlurBuffer2),e.clear(),this.fsQuad.render(e),this.separableBlurMaterial2.uniforms.colorTexture.value=this.renderTargetBlurBuffer2.texture,this.separableBlurMaterial2.uniforms.direction.value=this.BlurDirectionY,e.setRenderTarget(this.renderTargetEdgeBuffer2),e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.overlayMaterial,this.overlayMaterial.uniforms.maskTexture.value=this.renderTargetMaskBuffer.texture,this.overlayMaterial.uniforms.edgeTexture1.value=this.renderTargetEdgeBuffer1.texture,this.overlayMaterial.uniforms.edgeTexture2.value=this.renderTargetEdgeBuffer2.texture,this.overlayMaterial.uniforms.patternTexture.value=this.patternTexture,this.overlayMaterial.uniforms.edgeStrength.value=this.edgeStrength,this.overlayMaterial.uniforms.edgeGlow.value=this.edgeGlow,this.overlayMaterial.uniforms.usePatternTexture.value=this.usePatternTexture,i&&e.state.buffers.stencil.setTest(!0),e.setRenderTarget(n),this.fsQuad.render(e),e.setClearColor(this._oldClearColor,this.oldClearAlpha),e.autoClear=t}this.renderToScreen&&(this.fsQuad.material=this.materialCopy,this.copyUniforms.tDiffuse.value=n.texture,e.setRenderTarget(null),this.fsQuad.render(e))}getPrepareMaskMaterial(){return new a.ShaderMaterial({uniforms:{depthTexture:{value:null},cameraNearFar:{value:new a.Vector2(.5,.5)},textureMatrix:{value:null}},vertexShader:"#include \n\t\t\t\t#include \n\t\t\t\tvarying vec4 projTexCoord;\n\t\t\t\tvarying vec4 vPosition;\n\t\t\t\tuniform mat4 textureMatrix;\n\t\t\t\tvoid main() {\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\t\t\t\t\tvPosition = mvPosition;\n\t\t\t\t\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\t\t\t\t\tprojTexCoord = textureMatrix * worldPosition;\n\t\t\t\t}",fragmentShader:"#include \n\t\t\t\tvarying vec4 vPosition;\n\t\t\t\tvarying vec4 projTexCoord;\n\t\t\t\tuniform sampler2D depthTexture;\n\t\t\t\tuniform vec2 cameraNearFar;\n\t\t\t\tvoid main() {\n\t\t\t\t\tfloat depth = unpackRGBAToDepth(texture2DProj( depthTexture, projTexCoord ));\n\t\t\t\t\tfloat viewZ = - DEPTH_TO_VIEW_Z( depth, cameraNearFar.x, cameraNearFar.y );\n\t\t\t\t\tfloat depthTest = (-vPosition.z > viewZ) ? 1.0 : 0.0;\n\t\t\t\t\tgl_FragColor = vec4(0.0, depthTest, 1.0, 1.0);\n\t\t\t\t}"})}getEdgeDetectionMaterial(){return new a.ShaderMaterial({uniforms:{maskTexture:{value:null},texSize:{value:new a.Vector2(.5,.5)},visibleEdgeColor:{value:new a.Vector3(1,1,1)},hiddenEdgeColor:{value:new a.Vector3(1,1,1)}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\n\t\t\t\tuniform sampler2D maskTexture;\n\t\t\t\tuniform vec2 texSize;\n\t\t\t\tuniform vec3 visibleEdgeColor;\n\t\t\t\tuniform vec3 hiddenEdgeColor;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 invSize = 1.0 / texSize;\n\t\t\t\t\tvec4 uvOffset = vec4(1.0, 0.0, 0.0, 1.0) * vec4(invSize, invSize);\n\t\t\t\t\tvec4 c1 = texture2D( maskTexture, vUv + uvOffset.xy);\n\t\t\t\t\tvec4 c2 = texture2D( maskTexture, vUv - uvOffset.xy);\n\t\t\t\t\tvec4 c3 = texture2D( maskTexture, vUv + uvOffset.yw);\n\t\t\t\t\tvec4 c4 = texture2D( maskTexture, vUv - uvOffset.yw);\n\t\t\t\t\tfloat diff1 = (c1.r - c2.r)*0.5;\n\t\t\t\t\tfloat diff2 = (c3.r - c4.r)*0.5;\n\t\t\t\t\tfloat d = length( vec2(diff1, diff2) );\n\t\t\t\t\tfloat a1 = min(c1.g, c2.g);\n\t\t\t\t\tfloat a2 = min(c3.g, c4.g);\n\t\t\t\t\tfloat visibilityFactor = min(a1, a2);\n\t\t\t\t\tvec3 edgeColor = 1.0 - visibilityFactor > 0.001 ? visibleEdgeColor : hiddenEdgeColor;\n\t\t\t\t\tgl_FragColor = vec4(edgeColor, 1.0) * vec4(d);\n\t\t\t\t}"})}getSeperableBlurMaterial(e){return new a.ShaderMaterial({defines:{MAX_RADIUS:e},uniforms:{colorTexture:{value:null},texSize:{value:new a.Vector2(.5,.5)},direction:{value:new a.Vector2(.5,.5)},kernelRadius:{value:1}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"#include \n\t\t\t\tvarying vec2 vUv;\n\t\t\t\tuniform sampler2D colorTexture;\n\t\t\t\tuniform vec2 texSize;\n\t\t\t\tuniform vec2 direction;\n\t\t\t\tuniform float kernelRadius;\n\t\t\t\tfloat gaussianPdf(in float x, in float sigma) {\n\t\t\t\t\treturn 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\n\t\t\t\t}\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 invSize = 1.0 / texSize;\n\t\t\t\t\tfloat weightSum = gaussianPdf(0.0, kernelRadius);\n\t\t\t\t\tvec4 diffuseSum = texture2D( colorTexture, vUv) * weightSum;\n\t\t\t\t\tvec2 delta = direction * invSize * kernelRadius/float(MAX_RADIUS);\n\t\t\t\t\tvec2 uvOffset = delta;\n\t\t\t\t\tfor( int i = 1; i <= MAX_RADIUS; i ++ ) {\n\t\t\t\t\t\tfloat w = gaussianPdf(uvOffset.x, kernelRadius);\n\t\t\t\t\t\tvec4 sample1 = texture2D( colorTexture, vUv + uvOffset);\n\t\t\t\t\t\tvec4 sample2 = texture2D( colorTexture, vUv - uvOffset);\n\t\t\t\t\t\tdiffuseSum += ((sample1 + sample2) * w);\n\t\t\t\t\t\tweightSum += (2.0 * w);\n\t\t\t\t\t\tuvOffset += delta;\n\t\t\t\t\t}\n\t\t\t\t\tgl_FragColor = diffuseSum/weightSum;\n\t\t\t\t}"})}getOverlayMaterial(){return new a.ShaderMaterial({uniforms:{maskTexture:{value:null},edgeTexture1:{value:null},edgeTexture2:{value:null},patternTexture:{value:null},edgeStrength:{value:1},edgeGlow:{value:1},usePatternTexture:{value:0}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\n\t\t\t\tuniform sampler2D maskTexture;\n\t\t\t\tuniform sampler2D edgeTexture1;\n\t\t\t\tuniform sampler2D edgeTexture2;\n\t\t\t\tuniform sampler2D patternTexture;\n\t\t\t\tuniform float edgeStrength;\n\t\t\t\tuniform float edgeGlow;\n\t\t\t\tuniform bool usePatternTexture;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec4 edgeValue1 = texture2D(edgeTexture1, vUv);\n\t\t\t\t\tvec4 edgeValue2 = texture2D(edgeTexture2, vUv);\n\t\t\t\t\tvec4 maskColor = texture2D(maskTexture, vUv);\n\t\t\t\t\tvec4 patternColor = texture2D(patternTexture, 6.0 * vUv);\n\t\t\t\t\tfloat visibilityFactor = 1.0 - maskColor.g > 0.0 ? 1.0 : 0.5;\n\t\t\t\t\tvec4 edgeValue = edgeValue1 + edgeValue2 * edgeGlow;\n\t\t\t\t\tvec4 finalColor = edgeStrength * maskColor.r * edgeValue;\n\t\t\t\t\tif(usePatternTexture)\n\t\t\t\t\t\tfinalColor += + visibilityFactor * (1.0 - maskColor.r) * (1.0 - patternColor.r);\n\t\t\t\t\tgl_FragColor = finalColor;\n\t\t\t\t}",blending:a.AdditiveBlending,depthTest:!1,depthWrite:!1,transparent:!0})}}t.OutlinePass=l},51892:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);t.FullScreenQuad=class{constructor(e){i(this,"camera",new s.OrthographicCamera(-1,1,1,-1,0,1)),i(this,"geometry",new s.PlaneGeometry(2,2)),i(this,"mesh"),this.mesh=new s.Mesh(this.geometry,e)}get material(){return this.mesh.material}set material(e){this.mesh.material=e}dispose(){this.mesh.geometry.dispose()}render(e){e.render(this.mesh,this.camera)}},t.Pass=class{constructor(){i(this,"enabled",!0),i(this,"needsSwap",!0),i(this,"clear",!1),i(this,"renderToScreen",!1)}setSize(e,t){}render(e,t,n,r,i){console.error("THREE.Pass: .render() must be implemented in derived pass.")}}},41172:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(51892);class o extends a.Pass{constructor(e,t,n,r,a=0){super(),i(this,"scene"),i(this,"camera"),i(this,"overrideMaterial"),i(this,"clearColor"),i(this,"clearAlpha"),i(this,"clearDepth",!1),i(this,"_oldClearColor",new s.Color),this.scene=e,this.camera=t,this.overrideMaterial=n,this.clearColor=r,this.clearAlpha=a,this.clear=!0,this.needsSwap=!1}render(e,t,n){let r,i=e.autoClear;e.autoClear=!1;let s=null;void 0!==this.overrideMaterial&&(s=this.scene.overrideMaterial,this.scene.overrideMaterial=this.overrideMaterial),this.clearColor&&(e.getClearColor(this._oldClearColor),r=e.getClearAlpha(),e.setClearColor(this.clearColor,this.clearAlpha)),this.clearDepth&&e.clearDepth(),e.setRenderTarget(this.renderToScreen?null:n),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),e.render(this.scene,this.camera),this.clearColor&&e.setClearColor(this._oldClearColor,r),void 0!==this.overrideMaterial&&(this.scene.overrideMaterial=s),e.autoClear=i}}t.RenderPass=o},10728:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(51892);class s extends i.Pass{constructor(e,t,n,s,o={}){var l,c;super(),this.pixelSize=t,this.resolution=new r.Vector2,this.renderResolution=new r.Vector2,this.setSize(e.x,e.y),this.fsQuad=new i.FullScreenQuad(this.material()),this.scene=n,this.camera=s,this.normalEdgeStrength=null!=(l=o.normalEdgeStrength)?l:.3,this.depthEdgeStrength=null!=(c=o.depthEdgeStrength)?c:.4,this.rgbRenderTarget=a(this.renderResolution,r.RGBAFormat,!0),this.normalRenderTarget=a(this.renderResolution,r.RGBAFormat,!1),this.normalMaterial=new r.MeshNormalMaterial}dispose(){this.rgbRenderTarget.dispose(),this.normalRenderTarget.dispose(),this.fsQuad.dispose()}setSize(e,t){var n,r,i;this.resolution.set(e,t),this.renderResolution.set(e/this.pixelSize|0,t/this.pixelSize|0);const{x:s,y:a}=this.renderResolution;null==(n=this.rgbRenderTarget)||n.setSize(s,a),null==(r=this.normalRenderTarget)||r.setSize(s,a),null==(i=this.fsQuad)||i.material.uniforms.resolution.value.set(s,a,1/s,1/a)}setPixelSize(e){this.pixelSize=e,this.setSize(this.resolution.x,this.resolution.y)}render(e,t){const n=this.fsQuad.material.uniforms;n.normalEdgeStrength.value=this.normalEdgeStrength,n.depthEdgeStrength.value=this.depthEdgeStrength,e.setRenderTarget(this.rgbRenderTarget),e.render(this.scene,this.camera);const r=this.scene.overrideMaterial;e.setRenderTarget(this.normalRenderTarget),this.scene.overrideMaterial=this.normalMaterial,e.render(this.scene,this.camera),this.scene.overrideMaterial=r,n.tDiffuse.value=this.rgbRenderTarget.texture,n.tDepth.value=this.rgbRenderTarget.depthTexture,n.tNormal.value=this.normalRenderTarget.texture,this.renderToScreen?e.setRenderTarget(null):(e.setRenderTarget(t),this.clear&&e.clear()),this.fsQuad.render(e)}material(){return new r.ShaderMaterial({uniforms:{tDiffuse:{value:null},tDepth:{value:null},tNormal:{value:null},resolution:{value:new r.Vector4(this.renderResolution.x,this.renderResolution.y,1/this.renderResolution.x,1/this.renderResolution.y)},normalEdgeStrength:{value:0},depthEdgeStrength:{value:0}},vertexShader:"\n\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t\t\t}\n\t\t\t\t",fragmentShader:"\n\t\t\t\tuniform sampler2D tDiffuse;\n\t\t\t\tuniform sampler2D tDepth;\n\t\t\t\tuniform sampler2D tNormal;\n\t\t\t\tuniform vec4 resolution;\n\t\t\t\tuniform float normalEdgeStrength;\n\t\t\t\tuniform float depthEdgeStrength;\n\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\tfloat getDepth(int x, int y) {\n\n\t\t\t\t\treturn texture2D( tDepth, vUv + vec2(x, y) * resolution.zw ).r;\n\n\t\t\t\t}\n\n\t\t\t\tvec3 getNormal(int x, int y) {\n\n\t\t\t\t\treturn texture2D( tNormal, vUv + vec2(x, y) * resolution.zw ).rgb * 2.0 - 1.0;\n\n\t\t\t\t}\n\n\t\t\t\tfloat depthEdgeIndicator(float depth, vec3 normal) {\n\n\t\t\t\t\tfloat diff = 0.0;\n\t\t\t\t\tdiff += clamp(getDepth(1, 0) - depth, 0.0, 1.0);\n\t\t\t\t\tdiff += clamp(getDepth(-1, 0) - depth, 0.0, 1.0);\n\t\t\t\t\tdiff += clamp(getDepth(0, 1) - depth, 0.0, 1.0);\n\t\t\t\t\tdiff += clamp(getDepth(0, -1) - depth, 0.0, 1.0);\n\t\t\t\t\treturn floor(smoothstep(0.01, 0.02, diff) * 2.) / 2.;\n\n\t\t\t\t}\n\n\t\t\t\tfloat neighborNormalEdgeIndicator(int x, int y, float depth, vec3 normal) {\n\n\t\t\t\t\tfloat depthDiff = getDepth(x, y) - depth;\n\t\t\t\t\tvec3 neighborNormal = getNormal(x, y);\n\t\t\t\t\t\n\t\t\t\t\t// Edge pixels should yield to faces who's normals are closer to the bias normal.\n\t\t\t\t\tvec3 normalEdgeBias = vec3(1., 1., 1.); // This should probably be a parameter.\n\t\t\t\t\tfloat normalDiff = dot(normal - neighborNormal, normalEdgeBias);\n\t\t\t\t\tfloat normalIndicator = clamp(smoothstep(-.01, .01, normalDiff), 0.0, 1.0);\n\t\t\t\t\t\n\t\t\t\t\t// Only the shallower pixel should detect the normal edge.\n\t\t\t\t\tfloat depthIndicator = clamp(sign(depthDiff * .25 + .0025), 0.0, 1.0);\n\n\t\t\t\t\treturn (1.0 - dot(normal, neighborNormal)) * depthIndicator * normalIndicator;\n\n\t\t\t\t}\n\n\t\t\t\tfloat normalEdgeIndicator(float depth, vec3 normal) {\n\t\t\t\t\t\n\t\t\t\t\tfloat indicator = 0.0;\n\n\t\t\t\t\tindicator += neighborNormalEdgeIndicator(0, -1, depth, normal);\n\t\t\t\t\tindicator += neighborNormalEdgeIndicator(0, 1, depth, normal);\n\t\t\t\t\tindicator += neighborNormalEdgeIndicator(-1, 0, depth, normal);\n\t\t\t\t\tindicator += neighborNormalEdgeIndicator(1, 0, depth, normal);\n\n\t\t\t\t\treturn step(0.1, indicator);\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\n\t\t\t\t\tfloat depth = 0.0;\n\t\t\t\t\tvec3 normal = vec3(0.0);\n\n\t\t\t\t\tif (depthEdgeStrength > 0.0 || normalEdgeStrength > 0.0) {\n\n\t\t\t\t\t\tdepth = getDepth(0, 0);\n\t\t\t\t\t\tnormal = getNormal(0, 0);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat dei = 0.0;\n\t\t\t\t\tif (depthEdgeStrength > 0.0) \n\t\t\t\t\t\tdei = depthEdgeIndicator(depth, normal);\n\n\t\t\t\t\tfloat nei = 0.0; \n\t\t\t\t\tif (normalEdgeStrength > 0.0) \n\t\t\t\t\t\tnei = normalEdgeIndicator(depth, normal);\n\n\t\t\t\t\tfloat Strength = dei > 0.0 ? (1.0 - depthEdgeStrength * dei) : (1.0 + normalEdgeStrength * nei);\n\n\t\t\t\t\tgl_FragColor = texel * Strength;\n\n\t\t\t\t}\n\t\t\t\t"})}}function a(e,t,n){const i=new r.WebGLRenderTarget(e.x,e.y,n?{depthTexture:new r.DepthTexture(e.x,e.y),depthBuffer:!0}:void 0);return i.texture.format=t,i.texture.minFilter=r.NearestFilter,i.texture.magFilter=r.NearestFilter,i.texture.generateMipmaps=!1,i.stencilBuffer=!1,i}t.RenderPixelatedPass=s},75760:(e,t,n)=>{"use strict";var r=Object.defineProperty;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const i=n(48480),s=n(51892),a=n(7412),o=n(85616),l=n(49284),c=n(18384);class h extends s.Pass{constructor(e,t,n=!1,r=!1,h=new i.Vector2(256,256)){let u;super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.supportsDepthTextureExtension=n,this.supportsNormalTexture=r,this.originalClearColor=new i.Color,this._oldClearColor=new i.Color,this.oldClearAlpha=1,this.params={output:0,saoBias:.5,saoIntensity:.18,saoScale:1,saoKernelRadius:100,saoMinResolution:0,saoBlur:!0,saoBlurRadius:8,saoBlurStdDev:4,saoBlurDepthCutoff:.01},this.resolution=new i.Vector2(h.x,h.y),this.saoRenderTarget=new i.WebGLRenderTarget(this.resolution.x,this.resolution.y,{type:i.HalfFloatType}),this.blurIntermediateRenderTarget=this.saoRenderTarget.clone(),this.beautyRenderTarget=this.saoRenderTarget.clone(),this.normalRenderTarget=new i.WebGLRenderTarget(this.resolution.x,this.resolution.y,{minFilter:i.NearestFilter,magFilter:i.NearestFilter,type:i.HalfFloatType}),this.depthRenderTarget=this.normalRenderTarget.clone(),this.supportsDepthTextureExtension&&(u=new i.DepthTexture,u.type=i.UnsignedShortType,this.beautyRenderTarget.depthTexture=u,this.beautyRenderTarget.depthBuffer=!0),this.depthMaterial=new i.MeshDepthMaterial,this.depthMaterial.depthPacking=i.RGBADepthPacking,this.depthMaterial.blending=i.NoBlending,this.normalMaterial=new i.MeshNormalMaterial,this.normalMaterial.blending=i.NoBlending,this.saoMaterial=new i.ShaderMaterial({defines:Object.assign({},a.SAOShader.defines),fragmentShader:a.SAOShader.fragmentShader,vertexShader:a.SAOShader.vertexShader,uniforms:i.UniformsUtils.clone(a.SAOShader.uniforms)}),this.saoMaterial.extensions.derivatives=!0,this.saoMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.saoMaterial.defines.NORMAL_TEXTURE=this.supportsNormalTexture?1:0,this.saoMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.saoMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?u:this.depthRenderTarget.texture,this.saoMaterial.uniforms.tNormal.value=this.normalRenderTarget.texture,this.saoMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.saoMaterial.uniforms.cameraProjectionMatrix.value=this.camera.projectionMatrix,this.saoMaterial.blending=i.NoBlending,this.vBlurMaterial=new i.ShaderMaterial({uniforms:i.UniformsUtils.clone(o.DepthLimitedBlurShader.uniforms),defines:Object.assign({},o.DepthLimitedBlurShader.defines),vertexShader:o.DepthLimitedBlurShader.vertexShader,fragmentShader:o.DepthLimitedBlurShader.fragmentShader}),this.vBlurMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.vBlurMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.vBlurMaterial.uniforms.tDiffuse.value=this.saoRenderTarget.texture,this.vBlurMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?u:this.depthRenderTarget.texture,this.vBlurMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.vBlurMaterial.blending=i.NoBlending,this.hBlurMaterial=new i.ShaderMaterial({uniforms:i.UniformsUtils.clone(o.DepthLimitedBlurShader.uniforms),defines:Object.assign({},o.DepthLimitedBlurShader.defines),vertexShader:o.DepthLimitedBlurShader.vertexShader,fragmentShader:o.DepthLimitedBlurShader.fragmentShader}),this.hBlurMaterial.defines.DEPTH_PACKING=this.supportsDepthTextureExtension?0:1,this.hBlurMaterial.defines.PERSPECTIVE_CAMERA=this.camera.isPerspectiveCamera?1:0,this.hBlurMaterial.uniforms.tDiffuse.value=this.blurIntermediateRenderTarget.texture,this.hBlurMaterial.uniforms.tDepth.value=this.supportsDepthTextureExtension?u:this.depthRenderTarget.texture,this.hBlurMaterial.uniforms.size.value.set(this.resolution.x,this.resolution.y),this.hBlurMaterial.blending=i.NoBlending,this.materialCopy=new i.ShaderMaterial({uniforms:i.UniformsUtils.clone(l.CopyShader.uniforms),vertexShader:l.CopyShader.vertexShader,fragmentShader:l.CopyShader.fragmentShader,blending:i.NoBlending}),this.materialCopy.transparent=!0,this.materialCopy.depthTest=!1,this.materialCopy.depthWrite=!1,this.materialCopy.blending=i.CustomBlending,this.materialCopy.blendSrc=i.DstColorFactor,this.materialCopy.blendDst=i.ZeroFactor,this.materialCopy.blendEquation=i.AddEquation,this.materialCopy.blendSrcAlpha=i.DstAlphaFactor,this.materialCopy.blendDstAlpha=i.ZeroFactor,this.materialCopy.blendEquationAlpha=i.AddEquation,this.depthCopy=new i.ShaderMaterial({uniforms:i.UniformsUtils.clone(c.UnpackDepthRGBAShader.uniforms),vertexShader:c.UnpackDepthRGBAShader.vertexShader,fragmentShader:c.UnpackDepthRGBAShader.fragmentShader,blending:i.NoBlending}),this.fsQuad=new s.FullScreenQuad(null)}render(e,t,n){if(this.renderToScreen&&(this.materialCopy.blending=i.NoBlending,this.materialCopy.uniforms.tDiffuse.value=n.texture,this.materialCopy.needsUpdate=!0,this.renderPass(e,this.materialCopy,null)),1===this.params.output)return;e.getClearColor(this._oldClearColor),this.oldClearAlpha=e.getClearAlpha();const r=e.autoClear;e.autoClear=!1,e.setRenderTarget(this.depthRenderTarget),e.clear(),this.saoMaterial.uniforms.bias.value=this.params.saoBias,this.saoMaterial.uniforms.intensity.value=this.params.saoIntensity,this.saoMaterial.uniforms.scale.value=this.params.saoScale,this.saoMaterial.uniforms.kernelRadius.value=this.params.saoKernelRadius,this.saoMaterial.uniforms.minResolution.value=this.params.saoMinResolution,this.saoMaterial.uniforms.cameraNear.value=this.camera.near,this.saoMaterial.uniforms.cameraFar.value=this.camera.far;const s=this.params.saoBlurDepthCutoff*(this.camera.far-this.camera.near);this.vBlurMaterial.uniforms.depthCutoff.value=s,this.hBlurMaterial.uniforms.depthCutoff.value=s,this.vBlurMaterial.uniforms.cameraNear.value=this.camera.near,this.vBlurMaterial.uniforms.cameraFar.value=this.camera.far,this.hBlurMaterial.uniforms.cameraNear.value=this.camera.near,this.hBlurMaterial.uniforms.cameraFar.value=this.camera.far,this.params.saoBlurRadius=Math.floor(this.params.saoBlurRadius),this.prevStdDev===this.params.saoBlurStdDev&&this.prevNumSamples===this.params.saoBlurRadius||(o.BlurShaderUtils.configure(this.vBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new i.Vector2(0,1)),o.BlurShaderUtils.configure(this.hBlurMaterial,this.params.saoBlurRadius,this.params.saoBlurStdDev,new i.Vector2(1,0)),this.prevStdDev=this.params.saoBlurStdDev,this.prevNumSamples=this.params.saoBlurRadius),e.setClearColor(0),e.setRenderTarget(this.beautyRenderTarget),e.clear(),e.render(this.scene,this.camera),this.supportsDepthTextureExtension||this.renderOverride(e,this.depthMaterial,this.depthRenderTarget,0,1),this.supportsNormalTexture&&this.renderOverride(e,this.normalMaterial,this.normalRenderTarget,7829503,1),this.renderPass(e,this.saoMaterial,this.saoRenderTarget,16777215,1),this.params.saoBlur&&(this.renderPass(e,this.vBlurMaterial,this.blurIntermediateRenderTarget,16777215,1),this.renderPass(e,this.hBlurMaterial,this.saoRenderTarget,16777215,1));let a=this.materialCopy;3===this.params.output?this.supportsDepthTextureExtension?(this.materialCopy.uniforms.tDiffuse.value=this.beautyRenderTarget.depthTexture,this.materialCopy.needsUpdate=!0):(this.depthCopy.uniforms.tDiffuse.value=this.depthRenderTarget.texture,this.depthCopy.needsUpdate=!0,a=this.depthCopy):4===this.params.output?(this.materialCopy.uniforms.tDiffuse.value=this.normalRenderTarget.texture,this.materialCopy.needsUpdate=!0):(this.materialCopy.uniforms.tDiffuse.value=this.saoRenderTarget.texture,this.materialCopy.needsUpdate=!0),0===this.params.output?a.blending=i.CustomBlending:a.blending=i.NoBlending,this.renderPass(e,a,this.renderToScreen?null:n),e.setClearColor(this._oldClearColor,this.oldClearAlpha),e.autoClear=r}renderPass(e,t,n,r,i){e.getClearColor(this.originalClearColor);const s=e.getClearAlpha(),a=e.autoClear;e.setRenderTarget(n),e.autoClear=!1,null!=r&&(e.setClearColor(r),e.setClearAlpha(i||0),e.clear()),this.fsQuad.material=t,this.fsQuad.render(e),e.autoClear=a,e.setClearColor(this.originalClearColor),e.setClearAlpha(s)}renderOverride(e,t,n,r,i){e.getClearColor(this.originalClearColor);const s=e.getClearAlpha(),a=e.autoClear;e.setRenderTarget(n),e.autoClear=!1,r=t.clearColor||r,i=t.clearAlpha||i,null!=r&&(e.setClearColor(r),e.setClearAlpha(i||0),e.clear()),this.scene.overrideMaterial=t,e.render(this.scene,this.camera),this.scene.overrideMaterial=null,e.autoClear=a,e.setClearColor(this.originalClearColor),e.setClearAlpha(s)}setSize(e,t){this.beautyRenderTarget.setSize(e,t),this.saoRenderTarget.setSize(e,t),this.blurIntermediateRenderTarget.setSize(e,t),this.normalRenderTarget.setSize(e,t),this.depthRenderTarget.setSize(e,t),this.saoMaterial.uniforms.size.value.set(e,t),this.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.saoMaterial.uniforms.cameraProjectionMatrix.value=this.camera.projectionMatrix,this.saoMaterial.needsUpdate=!0,this.vBlurMaterial.uniforms.size.value.set(e,t),this.vBlurMaterial.needsUpdate=!0,this.hBlurMaterial.uniforms.size.value.set(e,t),this.hBlurMaterial.needsUpdate=!0}dispose(){this.saoRenderTarget.dispose(),this.blurIntermediateRenderTarget.dispose(),this.beautyRenderTarget.dispose(),this.normalRenderTarget.dispose(),this.depthRenderTarget.dispose(),this.depthMaterial.dispose(),this.normalMaterial.dispose(),this.saoMaterial.dispose(),this.vBlurMaterial.dispose(),this.hBlurMaterial.dispose(),this.materialCopy.dispose(),this.depthCopy.dispose(),this.fsQuad.dispose()}}var u;((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(h,"symbol"!=typeof(u="OUTPUT")?u+"":u,{Beauty:1,Default:0,SAO:2,Depth:3,Normal:4}),t.SAOPass=h},61100:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(51892),s=n(99440);class a extends i.Pass{constructor(e,t){super(),this.edgesRT=new r.WebGLRenderTarget(e,t,{depthBuffer:!1}),this.edgesRT.texture.name="SMAAPass.edges",this.weightsRT=new r.WebGLRenderTarget(e,t,{depthBuffer:!1}),this.weightsRT.texture.name="SMAAPass.weights";const n=this,a=new Image;a.src=this.getAreaTexture(),a.onload=function(){n.areaTexture.needsUpdate=!0},this.areaTexture=new r.Texture,this.areaTexture.name="SMAAPass.area",this.areaTexture.image=a,this.areaTexture.minFilter=r.LinearFilter,this.areaTexture.generateMipmaps=!1,this.areaTexture.flipY=!1;const o=new Image;o.src=this.getSearchTexture(),o.onload=function(){n.searchTexture.needsUpdate=!0},this.searchTexture=new r.Texture,this.searchTexture.name="SMAAPass.search",this.searchTexture.image=o,this.searchTexture.magFilter=r.NearestFilter,this.searchTexture.minFilter=r.NearestFilter,this.searchTexture.generateMipmaps=!1,this.searchTexture.flipY=!1,void 0===s.SMAAEdgesShader&&console.error("THREE.SMAAPass relies on SMAAShader"),this.uniformsEdges=r.UniformsUtils.clone(s.SMAAEdgesShader.uniforms),this.uniformsEdges.resolution.value.set(1/e,1/t),this.materialEdges=new r.ShaderMaterial({defines:Object.assign({},s.SMAAEdgesShader.defines),uniforms:this.uniformsEdges,vertexShader:s.SMAAEdgesShader.vertexShader,fragmentShader:s.SMAAEdgesShader.fragmentShader}),this.uniformsWeights=r.UniformsUtils.clone(s.SMAAWeightsShader.uniforms),this.uniformsWeights.resolution.value.set(1/e,1/t),this.uniformsWeights.tDiffuse.value=this.edgesRT.texture,this.uniformsWeights.tArea.value=this.areaTexture,this.uniformsWeights.tSearch.value=this.searchTexture,this.materialWeights=new r.ShaderMaterial({defines:Object.assign({},s.SMAAWeightsShader.defines),uniforms:this.uniformsWeights,vertexShader:s.SMAAWeightsShader.vertexShader,fragmentShader:s.SMAAWeightsShader.fragmentShader}),this.uniformsBlend=r.UniformsUtils.clone(s.SMAABlendShader.uniforms),this.uniformsBlend.resolution.value.set(1/e,1/t),this.uniformsBlend.tDiffuse.value=this.weightsRT.texture,this.materialBlend=new r.ShaderMaterial({uniforms:this.uniformsBlend,vertexShader:s.SMAABlendShader.vertexShader,fragmentShader:s.SMAABlendShader.fragmentShader}),this.needsSwap=!1,this.fsQuad=new i.FullScreenQuad(null)}render(e,t,n){this.uniformsEdges.tDiffuse.value=n.texture,this.fsQuad.material=this.materialEdges,e.setRenderTarget(this.edgesRT),this.clear&&e.clear(),this.fsQuad.render(e),this.fsQuad.material=this.materialWeights,e.setRenderTarget(this.weightsRT),this.clear&&e.clear(),this.fsQuad.render(e),this.uniformsBlend.tColor.value=n.texture,this.fsQuad.material=this.materialBlend,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(),this.fsQuad.render(e))}setSize(e,t){this.edgesRT.setSize(e,t),this.weightsRT.setSize(e,t),this.materialEdges.uniforms.resolution.value.set(1/e,1/t),this.materialWeights.uniforms.resolution.value.set(1/e,1/t),this.materialBlend.uniforms.resolution.value.set(1/e,1/t)}getAreaTexture(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAIAAACOVPcQAACBeklEQVR42u39W4xlWXrnh/3WWvuciIzMrKxrV8/0rWbY0+SQFKcb4owIkSIFCjY9AC1BT/LYBozRi+EX+cV+8IMsYAaCwRcBwjzMiw2jAWtgwC8WR5Q8mDFHZLNHTarZGrLJJllt1W2qKrsumZWZcTvn7L3W54e1vrXX3vuciLPPORFR1XE2EomorB0nVuz//r71re/y/1eMvb4Cb3N11xV/PP/2v4UBAwJG/7H8urx6/25/Gf8O5hypMQ0EEEQwAqLfoN/Z+97f/SW+/NvcgQk4sGBJK6H7N4PFVL+K+e0N11yNfkKvwUdwdlUAXPHHL38oa15f/i/46Ih6SuMSPmLAYAwyRKn7dfMGH97jaMFBYCJUgotIC2YAdu+LyW9vvubxAP8kAL8H/koAuOKP3+q6+xGnd5kdYCeECnGIJViwGJMAkQKfDvB3WZxjLKGh8VSCCzhwEWBpMc5/kBbjawT4HnwJfhr+pPBIu7uu+OOTo9vsmtQcniMBGkKFd4jDWMSCRUpLjJYNJkM+IRzQ+PQvIeAMTrBS2LEiaiR9b/5PuT6Ap/AcfAFO4Y3dA3DFH7/VS+M8k4baEAQfMI4QfbVDDGIRg7GKaIY52qAjTAgTvGBAPGIIghOCYAUrGFNgzA7Q3QhgCwfwAnwe5vDejgG44o/fbm1C5ZlYQvQDARPAIQGxCWBM+wWl37ZQESb4gImexGMDouhGLx1Cst0Saa4b4AqO4Hk4gxo+3DHAV/nx27p3JziPM2pVgoiia5MdEzCGULprIN7gEEeQ5IQxEBBBQnxhsDb5auGmAAYcHMA9eAAz8PBol8/xij9+C4Djlim4gJjWcwZBhCBgMIIYxGAVIkH3ZtcBuLdtRFMWsPGoY9rN+HoBji9VBYdwD2ZQg4cnO7OSq/z4rU5KKdwVbFAjNojCQzTlCLPFSxtamwh2jMUcEgg2Wm/6XgErIBhBckQtGN3CzbVacERgCnfgLswhnvqf7QyAq/z4rRZm1YglYE3affGITaZsdIe2FmMIpnOCap25I6jt2kCwCW0D1uAD9sZctNGXcQIHCkINDQgc78aCr+zjtw3BU/ijdpw3zhCwcaONwBvdeS2YZKkJNJsMPf2JKEvC28RXxxI0ASJyzQCjCEQrO4Q7sFArEzjZhaFc4cdv+/JFdKULM4px0DfUBI2hIsy06BqLhGTQEVdbfAIZXYMPesq6VoCHICzUyjwInO4Y411//LYLs6TDa9wvg2CC2rElgAnpTBziThxaL22MYhzfkghz6GAs2VHbbdM91VZu1MEEpupMMwKyVTb5ij9+u4VJG/5EgEMMmFF01cFai3isRbKbzb+YaU/MQbAm2XSMoUPAmvZzbuKYRIFApbtlrfFuUGd6vq2hXNnH78ZLh/iFhsQG3T4D1ib7k5CC6vY0DCbtrohgLEIClXiGtl10zc0CnEGIhhatLBva7NP58Tvw0qE8yWhARLQ8h4+AhQSP+I4F5xoU+VilGRJs6wnS7ruti/4KvAY/CfdgqjsMy4pf8fodQO8/gnuX3f/3xi3om1/h7THr+co3x93PP9+FBUfbNUjcjEmhcrkT+8K7ml7V10Jo05mpIEFy1NmCJWx9SIKKt+EjAL4Ez8EBVOB6havuT/rByPvHXK+9zUcfcbb254+9fydJknYnRr1oGfdaiAgpxu1Rx/Rek8KISftx3L+DfsLWAANn8Hvw0/AFeAGO9DFV3c6D+CcWbL8Dj9e7f+T1k8AZv/d7+PXWM/Z+VvdCrIvuAKO09RpEEQJM0Ci6+B4xhTWr4cZNOvhktabw0ta0rSJmqz3Yw5/AKXwenod7cAhTmBSPKf6JBdvH8IP17h95pXqw50/+BFnj88fev4NchyaK47OPhhtI8RFSvAfDSNh0Ck0p2gLxGkib5NJj/JWCr90EWQJvwBzO4AHcgztwAFN1evHPUVGwfXON+0debT1YeGON9Yy9/63X+OguiwmhIhQhD7l4sMqlG3D86Suc3qWZ4rWjI1X7u0Ytw6x3rIMeIOPDprfe2XzNgyj6PahhBjO4C3e6puDgXrdg+/5l948vF3bqwZetZ+z9Rx9zdIY5pInPK4Nk0t+l52xdK2B45Qd87nM8fsD5EfUhIcJcERw4RdqqH7Yde5V7m1vhNmtedkz6EDzUMF/2jJYWbC+4fzzA/Y+/8PPH3j9dcBAPIRP8JLXd5BpAu03aziOL3VVHZzz3CXWDPWd+SH2AnxIqQoTZpo9Ckc6HIrFbAbzNmlcg8Ag8NFDDAhbJvTBZXbC94P7t68EXfv6o+21gUtPETU7bbkLxvNKRFG2+KXzvtObonPP4rBvsgmaKj404DlshFole1Glfh02fE7bYR7dZ82oTewIBGn1Md6CG6YUF26X376oevOLzx95vhUmgblI6LBZwTCDY7vMq0op5WVXgsObOXJ+1x3qaBl9j1FeLxbhU9w1F+Wiba6s1X/TBz1LnUfuYDi4r2C69f1f14BWfP+p+W2GFKuC9phcELMYRRLur9DEZTUdEH+iEqWdaM7X4WOoPGI+ZYD2+wcQ+y+ioHUZ9dTDbArzxmi/bJI9BND0Ynd6lBdve/butBw8+f/T9D3ABa3AG8W3VPX4hBin+bj8dMMmSpp5pg7fJ6xrBFE2WQQEWnV8Qg3FbAWzYfM1rREEnmvkN2o1+acG2d/9u68GDzx91v3mAjb1zkpqT21OipPKO0b9TO5W0nTdOmAQm0TObts3aBKgwARtoPDiCT0gHgwnbArzxmtcLc08HgF1asN0C4Ms/fvD5I+7PhfqyXE/b7RbbrGyRQRT9ARZcwAUmgdoz0ehJ9Fn7QAhUjhDAQSw0bV3T3WbNa59jzmiP6GsWbGXDX2ytjy8+f9T97fiBPq9YeLdBmyuizZHaqXITnXiMUEEVcJ7K4j3BFPurtB4bixW8wTpweL8DC95szWMOqucFYGsWbGU7p3TxxxefP+r+oTVktxY0v5hbq3KiOKYnY8ddJVSBxuMMVffNbxwIOERShst73HZ78DZrHpmJmH3K6sGz0fe3UUj0eyRrSCGTTc+rjVNoGzNSv05srAxUBh8IhqChiQgVNIIBH3AVPnrsnXQZbLTm8ammv8eVXn/vWpaTem5IXRlt+U/LA21zhSb9cye6jcOfCnOwhIAYXAMVTUNV0QhVha9xjgA27ODJbLbmitt3tRN80lqG6N/khgot4ZVlOyO4WNg3OIMzhIZQpUEHieg2im6F91hB3I2tubql6BYNN9Hj5S7G0G2tahslBWKDnOiIvuAEDzakDQKDNFQT6gbn8E2y4BBubM230YIpBnDbMa+y3dx0n1S0BtuG62lCCXwcY0F72T1VRR3t2ONcsmDjbmzNt9RFs2LO2hQNyb022JisaI8rAWuw4HI3FuAIhZdOGIcdjLJvvObqlpqvWTJnnQbyi/1M9O8UxWhBs//H42I0q1Yb/XPGONzcmm+ri172mHKvZBpHkJaNJz6v9jxqiklDj3U4CA2ugpAaYMWqNXsdXbmJNd9egCnJEsphXNM+MnK3m0FCJ5S1kmJpa3DgPVbnQnPGWIDspW9ozbcO4K/9LkfaQO2KHuqlfFXSbdNzcEcwoqNEFE9zcIXu9/6n/ym/BC/C3aJLzEKPuYVlbFnfhZ8kcWxV3dbv4bKl28566wD+8C53aw49lTABp9PWbsB+knfc/Li3eVizf5vv/xmvnPKg5ihwKEwlrcHqucuVcVOxEv8aH37E3ZqpZypUulrHEtIWKUr+txHg+ojZDGlwnqmkGlzcVi1dLiNSJiHjfbRNOPwKpx9TVdTn3K05DBx4psIk4Ei8aCkJahRgffk4YnEXe07T4H2RR1u27E6wfQsBDofUgjFUFnwC2AiVtA+05J2zpiDK2Oa0c5fmAecN1iJzmpqFZxqYBCYhFTCsUNEmUnIcZ6aEA5rQVhEywG6w7HSW02XfOoBlQmjwulOFQAg66SvJblrTEX1YtJ3uG15T/BH1OfOQeuR8g/c0gdpT5fx2SKbs9EfHTKdM8A1GaJRHLVIwhcGyydZsbifAFVKl5EMKNU2Hryo+06BeTgqnxzYjThVySDikbtJPieco75lYfKAJOMEZBTjoITuWHXXZVhcUDIS2hpiXHV9Ku4u44bN5OYLDOkJo8w+xJSMbhBRHEdEs9JZUCkQrPMAvaHyLkxgkEHxiNkx/x2YB0mGsQ8EUWj/stW5YLhtS5SMu+/YBbNPDCkGTUybN8krRLBGPlZkVOA0j+a1+rkyQKWGaPHPLZOkJhioQYnVZ2hS3zVxMtgC46KuRwbJNd9nV2PHgb36F194ecf/Yeu2vAFe5nm/bRBFrnY4BauE8ERmZRFUn0k8hbftiVYSKMEme2dJCJSCGYAlNqh87bXOPdUkGy24P6d1ll21MBqqx48Fvv8ZHH8HZFY7j/uAq1xMJUFqCSUlJPmNbIiNsmwuMs/q9CMtsZsFO6SprzCS1Z7QL8xCQClEelpjTduDMsmWD8S1PT152BtvmIGvUeDA/yRn83u/x0/4qxoPHjx+PXY9pqX9bgMvh/Nz9kpP4pOe1/fYf3axUiMdHLlPpZCNjgtNFAhcHEDxTumNONhHrBduW+vOyY++70WWnPXj98eA4kOt/mj/5E05l9+O4o8ePx67HFqyC+qSSnyselqjZGaVK2TadbFLPWAQ4NBhHqDCCV7OTpo34AlSSylPtIdd2AJZlyzYQrDJ5lcWGNceD80CunPLGGzsfD+7wRb95NevJI5docQ3tgCyr5bGnyaPRlmwNsFELViOOx9loebGNq2moDOKpHLVP5al2cymWHbkfzGXL7kfRl44H9wZy33tvt+PB/Xnf93e+nh5ZlU18wCiRUa9m7kib9LYuOk+hudQNbxwm0AQqbfloimaB2lM5fChex+ylMwuTbfmXQtmWlenZljbdXTLuOxjI/fDDHY4Hjx8/Hrse0zXfPFxbUN1kKqSCCSk50m0Ajtx3ub9XHBKHXESb8iO6E+qGytF4nO0OG3SXzbJlhxBnKtKyl0NwybjvYCD30aMdjgePHz8eu56SVTBbgxJMliQ3Oauwg0QHxXE2Ez/EIReLdQj42Gzb4CLS0YJD9xUx7bsi0vJi5mUbW1QzL0h0PFk17rtiIPfJk52MB48fPx67npJJwyrBa2RCCQRTbGZSPCxTPOiND4G2pYyOQ4h4jINIJh5wFU1NFZt+IsZ59LSnDqBjZ2awbOku+yInunLcd8VA7rNnOxkPHj9+PGY9B0MWJJNozOJmlglvDMXDEozdhQWbgs/U6oBanGzLrdSNNnZFjOkmbi5bNt1lX7JLLhn3vXAg9/h4y/Hg8ePHI9dzQMEkWCgdRfYykYKnkP7D4rIujsujaKPBsB54vE2TS00ccvFY/Tth7JXeq1hz+qgVy04sAJawTsvOknHfCwdyT062HA8eP348Zj0vdoXF4pilKa2BROed+9fyw9rWRXeTFXESMOanvDZfJuJaSXouQdMdDJZtekZcLLvEeK04d8m474UDuaenW44Hjx8/Xns9YYqZpszGWB3AN/4VHw+k7WSFtJ3Qicuqb/NlVmgXWsxh570xg2UwxUw3WfO6B5nOuO8aA7lnZxuPB48fPx6znm1i4bsfcbaptF3zNT78eFPtwi1OaCNOqp1x3zUGcs/PN++AGD1+fMXrSVm2baTtPhPahbPhA71wIHd2bXzRa69nG+3CraTtPivahV/55tXWg8fyRY/9AdsY8VbSdp8V7cKrrgdfM//z6ILQFtJ2nxHtwmuoB4/kf74+gLeRtvvMaBdeSz34+vifx0YG20jbfTa0C6+tHrwe//NmOG0L8EbSdp8R7cLrrQe/996O+ai3ujQOskpTNULa7jOjXXj99eCd8lHvoFiwsbTdZ0a78PrrwTvlo966pLuRtB2fFe3Cm6oHP9kNH/W2FryxtN1nTLvwRurBO+Kj3pWXHidtx2dFu/Bm68Fb81HvykuPlrb7LGkX3mw9eGs+6h1Y8MbSdjegXcguQLjmevDpTQLMxtJ2N6NdyBZu9AbrwVvwUW+LbteULUpCdqm0HTelXbhNPe8G68Gb8lFvVfYfSNuxvrTdTWoXbozAzdaDZzfkorOj1oxVxlIMlpSIlpLrt8D4hrQL17z+c3h6hU/wv4Q/utps4+bm+6P/hIcf0JwQ5oQGPBL0eKPTYEXTW+eL/2DKn73J9BTXYANG57hz1cEMviVf/4tf5b/6C5pTQkMIWoAq7hTpOJjtAM4pxKu5vg5vXeUrtI09/Mo/5H+4z+Mp5xULh7cEm2QbRP2tFIKR7WM3fPf/jZ3SWCqLM2l4NxID5zB72HQXv3jj/8mLR5xXNA5v8EbFQEz7PpRfl1+MB/hlAN65qgDn3wTgH13hK7T59bmP+NIx1SHHU84nLOITt3iVz8mNO+lPrjGAnBFqmioNn1mTyk1ta47R6d4MrX7tjrnjYUpdUbv2rVr6YpVfsGG58AG8Ah9eyUN8CX4WfgV+G8LVWPDGb+Zd4cU584CtqSbMKxauxTg+dyn/LkVgA+IR8KHtejeFKRtTmLLpxN6mYVLjYxwXf5x2VofiZcp/lwKk4wGOpYDnoIZPdg/AAbwMfx0+ge9dgZvYjuqKe4HnGnykYo5TvJbG0Vj12JagRhwKa44H95ShkZa5RyLGGdfYvG7aw1TsF6iapPAS29mNS3NmsTQZCmgTzFwgL3upCTgtBTRwvGMAKrgLn4evwin8+afJRcff+8izUGUM63GOOuAs3tJkw7J4kyoNreqrpO6cYLQeFUd7TTpr5YOTLc9RUUogUOVJQ1GYJaFLAW0oTmKyYS46ZooP4S4EON3xQ5zC8/CX4CnM4c1PE8ApexpoYuzqlP3d4S3OJP8ZDK7cKWNaTlqmgDiiHwl1YsE41w1zT4iRTm3DBqxvOUsbMKKDa/EHxagtnta072ejc3DOIh5ojvh8l3tk1JF/AV6FU6jh3U8HwEazLgdCLYSQ+MYiAI2ltomkzttUb0gGHdSUUgsIYjTzLG3mObX4FBRaYtpDVNZrih9TgTeYOBxsEnN1gOCTM8Bsw/ieMc75w9kuAT6A+/AiHGvN/+Gn4KRkiuzpNNDYhDGFndWRpE6SVfm8U5bxnSgVV2jrg6JCKmneqey8VMFgq2+AM/i4L4RUbfSi27lNXZ7R7W9RTcq/q9fk4Xw3AMQd4I5ifAZz8FcVtm9SAom/dyN4lczJQW/kC42ZrHgcCoIf1oVMKkVItmMBi9cOeNHGLqOZk+QqQmrbc5YmYgxELUUN35z2iohstgfLIFmcMV7s4CFmI74L9+EFmGsi+tGnAOD4Yk9gIpo01Y4cA43BWGygMdr4YZekG3OBIUXXNukvJS8tqa06e+lSDCtnqqMFu6hWHXCF+WaYt64m9QBmNxi7Ioy7D+fa1yHw+FMAcPt7SysFLtoG4PXAk7JOA3aAxBRqUiAdU9Yp5lK3HLSRFtOim0sa8euEt08xvKjYjzeJ2GU7YawexrnKI9tmobInjFXCewpwriY9+RR4aaezFhMhGCppKwom0ChrgFlKzyPKkGlTW1YQrE9HJqu8hKGgMc6hVi5QRq0PZxNfrYNgE64utmRv6KKHRpxf6VDUaOvNP5jCEx5q185My/7RKz69UQu2im5k4/eownpxZxNLwiZ1AZTO2ZjWjkU9uaB2HFn6Q3u0JcsSx/qV9hTEApRzeBLDJQXxYmTnq7bdLa3+uqFrxLJ5w1TehnNHx5ECvCh2g2c3hHH5YsfdaSKddztfjQ6imKFGSyFwlLzxEGPp6r5IevVjk1AMx3wMqi1NxDVjLBiPs9tbsCkIY5we5/ML22zrCScFxnNtzsr9Wcc3CnD+pYO+4VXXiDE0oc/vQQ/fDK3oPESJMYXNmJa/DuloJZkcTpcYE8lIH8Dz8DJMiynNC86Mb2lNaaqP/+L7f2fcE/yP7/Lde8xfgSOdMxvOixZf/9p3+M4hT1+F+zApxg9XfUvYjc8qX2lfOOpK2gNRtB4flpFu9FTKCp2XJRgXnX6olp1zyYjTKJSkGmLE2NjUr1bxFM4AeAAHBUFIeSLqXR+NvH/M9fOnfHzOD2vCSyQJKzfgsCh+yi/Mmc35F2fUrw7miW33W9hBD1vpuUojFphIyvg7aTeoymDkIkeW3XLHmguMzbIAJejN6B5MDrhipE2y6SoFRO/AK/AcHHZHNIfiWrEe/C6cr3f/yOvrQKB+zMM55/GQdLDsR+ifr5Fiuu+/y+M78LzOE5dsNuXC3PYvYWd8NXvphLSkJIasrlD2/HOqQ+RjcRdjKTGWYhhVUm4yxlyiGPuMsZR7sMCHUBeTuNWA7if+ifXgc/hovftHXs/DV+Fvwe+f8shzMiMcweFgBly3//vwJfg5AN4450fn1Hd1Rm1aBLu22Dy3y3H2+OqMemkbGZ4jozcDjJf6596xOLpC0eMTHbKnxLxH27uZ/bMTGs2jOaMOY4m87CfQwF0dw53oa1k80JRuz/XgS+8fX3N9Af4qPIMfzKgCp4H5TDGe9GGeFPzSsZz80SlPTxXjgwJmC45njzgt2vbQ4b4OAdUK4/vWhO8d8v6EE8fMUsfakXbPpFJeLs2ubM/qdm/la3WP91uWhxXHjoWhyRUq2iJ/+5mA73zwIIo+LoZ/SgvIRjAd1IMvvn98PfgOvAJfhhm8scAKVWDuaRaK8aQ9f7vuPDH6Bj47ZXau7rqYJ66mTDwEDU6lLbCjCK0qTXyl5mnDoeNRxanj3FJbaksTk0faXxHxLrssgPkWB9LnA/MFleXcJozzjwsUvUG0X/QCve51qkMDXp9mtcyOy3rwBfdvVJK7D6/ACSzg3RoruIq5UDeESfEmVclDxnniU82vxMLtceD0hGZWzBNPMM/jSPne2OVatiTKUpY5vY7gc0LdUAWeWM5tH+O2I66AOWw9xT2BuyRVLGdoDHUsVRXOo/c+ZdRXvFfnxWyIV4upFLCl9eAL7h8Zv0QH8Ry8pA2cHzQpGesctVA37ZtklBTgHjyvdSeKY/RZw/kJMk0Y25cSNRWSigQtlULPTw+kzuJPeYEkXjQRpoGZobYsLF79pyd1dMRHInbgFTZqNLhDqiIsTNpoex2WLcy0/X6rHcdMMQvFSd5dWA++4P7xv89deACnmr36uGlL69bRCL6BSZsS6c0TU2TKK5gtWCzgAOOwQcurqk9j8whvziZSMLcq5hbuwBEsYjopUBkqw1yYBGpLA97SRElEmx5MCInBY5vgLk94iKqSWmhIGmkJ4Bi9m4L645J68LyY4wsFYBfUg5feP/6gWWm58IEmKQM89hq7KsZNaKtP5TxxrUZZVkNmMJtjbKrGxLNEbHPJxhqy7lAmbC32ZqeF6lTaknRWcYaFpfLUBh/rwaQycCCJmW15Kstv6jRHyJFry2C1ahkkIW0LO75s61+owxK1y3XqweX9m5YLM2DPFeOjn/iiqCKJ+yKXF8t5Yl/kNsqaSCryxPq5xWTFIaP8KSW0RYxqupaUf0RcTNSSdJZGcKYdYA6kdtrtmyBckfKXwqk0pHpUHlwWaffjNRBYFPUDWa8e3Lt/o0R0CdisKDM89cX0pvRHEfM8ca4t0s2Xx4kgo91MPQJ/0c9MQYq0co8MBh7bz1fio0UUHLR4aAIOvOmoYO6kwlEVODSSTliWtOtH6sPkrtctF9ZtJ9GIerBskvhdVS5cFNv9s1BU0AbdUgdK4FG+dRnjFmDTzniRMdZO1QhzMK355vigbdkpz9P6qjUGE5J2qAcXmwJ20cZUiAD0z+pGMx6xkzJkmEf40Hr4qZfVg2XzF9YOyoV5BjzVkUJngKf8lgNYwKECEHrCNDrWZzMlflS3yBhr/InyoUgBc/lKT4pxVrrC6g1YwcceK3BmNxZcAtz3j5EIpqguh9H6wc011YN75cKDLpFDxuwkrPQmUwW4KTbj9mZTwBwLq4aQMUZbHm1rylJ46dzR0dua2n3RYCWZsiHROeywyJGR7mXKlpryyCiouY56sFkBWEnkEB/raeh/Sw4162KeuAxMQpEkzy5alMY5wamMsWKKrtW2WpEWNnReZWONKWjrdsKZarpFjqCslq773PLmEhM448Pc3+FKr1+94vv/rfw4tEcu+lKTBe4kZSdijBrykwv9vbCMPcLQTygBjzVckSLPRVGslqdunwJ4oegtFOYb4SwxNgWLCmD7T9kVjTv5YDgpo0XBmN34Z/rEHp0sgyz7lngsrm4lvMm2Mr1zNOJYJ5cuxuQxwMGJq/TP5emlb8fsQBZviK4t8hFL+zbhtlpwaRSxQRWfeETjuauPsdGxsBVdO7nmP4xvzSoT29pRl7kGqz+k26B3Oy0YNV+SXbbQas1ctC/GarskRdFpKczVAF1ZXnLcpaMuzVe6lZ2g/1ndcvOVgRG3sdUAY1bKD6achijMPdMxV4muKVorSpiDHituH7rSTs7n/4y5DhRXo4FVBN4vO/zbAcxhENzGbHCzU/98Mcx5e7a31kWjw9FCe/zNeYyQjZsWb1uc7U33pN4Mji6hCLhivqfa9Ss6xLg031AgfesA/l99m9fgvnaF9JoE6bYKmkGNK3aPbHB96w3+DnxFm4hs0drLsk7U8kf/N/CvwQNtllna0rjq61sH8L80HAuvwH1tvBy2ChqWSCaYTaGN19sTvlfzFD6n+iKTbvtayfrfe9ueWh6GJFoxLdr7V72a5ZpvHcCPDzma0wTO4EgbLyedxstO81n57LYBOBzyfsOhUKsW1J1BB5vr/tz8RyqOFylQP9Tvst2JALsC5lsH8PyQ40DV4ANzYa4dedNiKNR1s+x2wwbR7q4/4cTxqEk4LWDebfisuo36JXLiWFjOtLrlNWh3K1rRS4xvHcDNlFnNmWBBAl5SWaL3oPOfnvbr5pdjVnEaeBJSYjuLEkyLLsWhKccadmOphZkOPgVdalj2QpSmfOsADhMWE2ZBu4+EEJI4wKTAuCoC4xwQbWXBltpxbjkXJtKxxabo9e7tyhlgb6gNlSbUpMh+l/FaqzVwewGu8BW1Zx7pTpQDJUjb8tsUTW6+GDXbMn3mLbXlXJiGdggxFAoUrtPS3wE4Nk02UZG2OOzlk7fRs7i95QCLo3E0jtrjnM7SR3uS1p4qtS2nJ5OwtQVHgOvArLBFijZUV9QtSl8dAY5d0E0hM0w3HS2DpIeB6m/A1+HfhJcGUq4sOxH+x3f5+VO+Ds9rYNI7zPXOYWPrtf8bYMx6fuOAX5jzNR0PdsuON+X1f7EERxMJJoU6GkTEWBvVolVlb5lh3tKCg6Wx1IbaMDdJ+9sUCc5KC46hKGCk3IVOS4TCqdBNfUs7Kd4iXf2RjnT/LLysJy3XDcHLh/vde3x8DoGvwgsa67vBk91G5Pe/HbOe7xwym0NXbtiuuDkGO2IJDh9oQvJ4cY4vdoqLDuoH9Zl2F/ofsekn8lkuhIlhQcffUtSjytFyp++p6NiE7Rqx/lodgKVoceEp/CP4FfjrquZaTtj2AvH5K/ywpn7M34K/SsoYDAdIN448I1/0/wveW289T1/lX5xBzc8N5IaHr0XMOQdHsIkDuJFifj20pBm5jzwUv9e2FhwRsvhAbalCIuIw3bhJihY3p6nTFFIZgiSYjfTf3aXuOjmeGn4bPoGvwl+CFzTRczBIuHBEeImHc37/lGfwZR0cXzVDOvaKfNHvwe+suZ771K/y/XcBlsoN996JpBhoE2toYxOznNEOS5TJc6Id5GEXLjrWo+LEWGNpPDU4WAwsIRROu+1vM+0oW37z/MBN9kqHnSArwPfgFJ7Cq/Ai3Ie7g7ncmI09v8sjzw9mzOAEXoIHxURueaAce5V80f/DOuuZwHM8vsMb5wBzOFWM7wymTXPAEvm4vcFpZ2ut0VZRjkiP2MlmLd6DIpbGSiHOjdnUHN90hRYmhTnmvhzp1iKDNj+b7t5hi79lWGwQ+HN9RsfFMy0FXbEwhfuczKgCbyxYwBmcFhhvo/7a44v+i3XWcwDP86PzpGQYdWh7csP5dBvZ1jNzdxC8pBGuxqSW5vw40nBpj5JhMwvOzN0RWqERHMr4Lv1kWX84xLR830G3j6yqZ1a8UstTlW+qJPOZ+sZ7xZPKTJLhiNOAFd6tk+jrTH31ncLOxid8+nzRb128HhUcru/y0Wn6iT254YPC6FtVSIMoW2sk727AhvTtrWKZTvgsmckfXYZWeNRXx/3YQ2OUxLDrbHtN11IwrgXT6c8dATDwLniYwxzO4RzuQqTKSC5gAofMZ1QBK3zQ4JWobFbcvJm87FK+6JXrKahLn54m3p+McXzzYtP8VF/QpJuh1OwieElEoI1pRxPS09FBrkq2tWCU59+HdhNtTIqKm8EBrw2RTOEDpG3IKo2Y7mFdLm3ZeVjYwVw11o/oznceMve4CgMfNym/utA/d/ILMR7gpXzRy9eDsgLcgbs8O2Va1L0zzIdwGGemTBuwROHeoMShkUc7P+ISY3KH5ZZeWqO8mFTxQYeXTNuzvvK5FGPdQfuu00DwYFY9dyhctEt+OJDdnucfpmyhzUJzfsJjr29l8S0bXBfwRS9ZT26tmMIdZucch5ZboMz3Nio3nIOsYHCGoDT4kUA9MiXEp9Xsui1S8th/kbWIrMBxDGLodWUQIWcvnXy+9M23xPiSMOiRPqM+YMXkUN3gXFrZJwXGzUaMpJfyRS9ZT0lPe8TpScuRlbMHeUmlaKDoNuy62iWNTWNFYjoxFzuJs8oR+RhRx7O4SVNSXpa0ZJQ0K1LAHDQ+D9IepkMXpcsq5EVCvClBUIzDhDoyKwDw1Lc59GbTeORivugw1IcuaEOaGWdNm+Ps5fQ7/tm0DjMegq3yM3vb5j12qUId5UZD2oxDSEWOZMSqFl/W+5oynWDa/aI04tJRQ2eTXusg86SQVu/nwSYwpW6wLjlqIzwLuxGIvoAvul0PS+ZNz0/akp/pniO/8JDnGyaCkzbhl6YcqmK/69prxPqtpx2+Km9al9sjL+rwMgHw4jE/C8/HQ3m1vBuL1fldbzd8mOueVJ92syqdEY4KJjSCde3mcRw2TA6szxedn+zwhZMps0XrqEsiUjnC1hw0TELC2Ek7uAAdzcheXv1BYLagspxpzSAoZZUsIzIq35MnFQ9DOrlNB30jq3L4pkhccKUAA8/ocvN1Rzx9QyOtERs4CVsJRK/DF71kPYrxYsGsm6RMh4cps5g1DOmM54Ly1ii0Hd3Y/BMk8VWFgBVmhqrkJCPBHAolwZaWzLR9Vb7bcWdX9NyUYE+uB2BKfuaeBUcjDljbYVY4DdtsVWvzRZdWnyUzDpjNl1Du3aloAjVJTNDpcIOVVhrHFF66lLfJL1zJr9PQ2nFJSBaKoDe+sAvLufZVHVzYh7W0h/c6AAZ+7Tvj6q9j68G/cTCS/3n1vLKHZwNi+P+pS0WkZNMBMUl+LDLuiE4omZy71r3UFMwNJV+VJ/GC5ixVUkBStsT4gGKh0Gm4Oy3qvq7Lbmq24nPdDuDR9deR11XzP4vFu3TYzfnIyiSVmgizUYGqkIXNdKTY9pgb9D2Ix5t0+NHkVzCdU03suWkkVZAoCONCn0T35gAeW38de43mf97sMOpSvj4aa1KYUm58USI7Wxxes03bAZdRzk6UtbzMaCQ6IxO0dy7X+XsjoD16hpsBeGz9dfzHj+R/Hp8nCxZRqkEDTaCKCSywjiaoMJ1TITE9eg7Jqnq8HL6gDwiZb0u0V0Rr/rmvqjxKuaLCX7ZWXTvAY+uvm3z8CP7nzVpngqrJpZKwWnCUjIviYVlirlGOzPLI3SMVyp/elvBUjjDkNhrtufFFErQ8pmdSlbK16toBHlt/HV8uHMX/vEGALkV3RJREiSlopxwdMXOZPLZ+ix+kAHpMKIk8UtE1ygtquttwxNhphrIZ1IBzjGF3IIGxGcBj6q8bHJBG8T9vdsoWrTFEuebEZuVxhhClH6P5Zo89OG9fwHNjtNQTpD0TG9PJLEYqvEY6Rlxy+ZZGfL0Aj62/bnQCXp//eeM4KzfQVJbgMQbUjlMFIm6TpcfWlZje7NBSV6IsEVmumWIbjiloUzQX9OzYdo8L1wjw2PrrpimONfmfNyzKklrgnEkSzT5QWYQW40YShyzqsRmMXbvVxKtGuYyMKaU1ugenLDm5Ily4iT14fP11Mx+xJv+zZ3MvnfdFqxU3a1W/FTB4m3Qfsyc1XUcdVhDeUDZXSFHHLQj/Y5jtC7ZqM0CXGwB4bP11i3LhOvzPGygYtiUBiwQV/4wFO0majijGsafHyRLu0yG6q35cL1rOpVxr2s5cM2jJYMCdc10Aj6q/blRpWJ//+dmm5psMl0KA2+AFRx9jMe2WbC4jQxnikd4DU8TwUjRVacgdlhmr3bpddzuJ9zXqr2xnxJfzP29RexdtjDVZqzkqa6PyvcojGrfkXiJ8SEtml/nYskicv0ivlxbqjemwUjMw5evdg8fUX9nOiC/lf94Q2i7MURk9nW1MSj5j8eAyV6y5CN2S6qbnw3vdA1Iwq+XOSCl663udN3IzLnrt+us25cI1+Z83SXQUldqQq0b5XOT17bGpLd6ssN1VMPf8c+jG8L3NeCnMdF+Ra3fRa9dft39/LuZ/3vwHoHrqGmQFafmiQw6eyzMxS05K4bL9uA+SKUQzCnSDkqOGokXyJvbgJ/BHI+qvY69//4rl20NsmK2ou2dTsyIALv/91/8n3P2Aao71WFGi8KKv1fRC5+J67Q/507/E/SOshqN5TsmYIjVt+kcjAx98iz/4SaojbIV1rexE7/C29HcYD/DX4a0rBOF5VTu7omsb11L/AWcVlcVZHSsqGuXLLp9ha8I//w3Mv+T4Ew7nTBsmgapoCrNFObIcN4pf/Ob/mrvHTGqqgAupL8qWjWPS9m/31jAe4DjA+4+uCoQoT/zOzlrNd3qd4SdphFxsUvYwGWbTWtISc3wNOWH+kHBMfc6kpmpwPgHWwqaSUG2ZWWheYOGQGaHB+eQ/kn6b3pOgLV+ODSn94wDvr8Bvb70/LLuiPPEr8OGVWfDmr45PZyccEmsVXZGe1pRNX9SU5+AVQkNTIVPCHF/jGmyDC9j4R9LfWcQvfiETmgMMUCMN1uNCakkweZsowdYobiMSlnKA93u7NzTXlSfe+SVbfnPQXmg9LpYAQxpwEtONyEyaueWM4FPjjyjG3uOaFmBTWDNgBXGEiQpsaWhnAqIijB07Dlsy3fUGeP989xbWkyf+FF2SNEtT1E0f4DYYVlxFlbaSMPIRMk/3iMU5pME2SIWJvjckciebkQuIRRyhUvkHg/iUljG5kzVog5hV7vIlCuBrmlhvgPfNHQM8lCf+FEGsYbMIBC0qC9a0uuy2wLXVbLBaP5kjHokCRxapkQyzI4QEcwgYHRZBp+XEFTqXFuNVzMtjXLJgX4gAid24Hjwc4N3dtVSe+NNiwTrzH4WVUOlDobUqr1FuAgYllc8pmzoVrELRHSIW8ViPxNy4xwjBpyR55I6J220qQTZYR4guvUICJiSpr9gFFle4RcF/OMB7BRiX8sSfhpNSO3lvEZCQfLUVTKT78Ek1LRLhWN+yLyTnp8qWUZ46b6vxdRGXfHVqx3eI75YaLa4iNNiK4NOW7wPW6lhbSOF9/M9qw8e/aoB3d156qTzxp8pXx5BKAsYSTOIIiPkp68GmTq7sZtvyzBQaRLNxIZ+paozHWoLFeExIhRBrWitHCAHrCF7/thhD8JhYz84wg93QRV88wLuLY8zF8sQ36qF1J455bOlgnELfshKVxYOXKVuKx0jaj22sczTQqPqtV/XDgpswmGTWWMSDw3ssyUunLLrVPGjYRsH5ggHeHSWiV8kT33ycFSfMgkoOK8apCye0J6VW6GOYvffgU9RWsukEi2kUV2nl4dOYUzRik9p7bcA4ggdJ53LxKcEe17B1R8eqAd7dOepV8sTXf5lhejoL85hUdhDdknPtKHFhljOT+bdq0hxbm35p2nc8+Ja1Iw+tJykgp0EWuAAZYwMVwac5KzYMslhvgHdHRrxKnvhTYcfKsxTxtTETkjHO7rr3zjoV25lAQHrqpV7bTiy2aXMmUhTBnKS91jhtR3GEoF0oLnWhWNnYgtcc4N0FxlcgT7yz3TgNIKkscx9jtV1ZKpWW+Ub1tc1eOv5ucdgpx+FJy9pgbLE7xDyXb/f+hLHVGeitHOi6A7ybo3sF8sS7w7cgdk0nJaOn3hLj3uyD0Zp5pazFIUXUpuTTU18d1EPkDoX8SkmWTnVIozEdbTcZjoqxhNHf1JrSS/AcvHjZ/SMHhL/7i5z+POsTUh/8BvNfYMTA8n+yU/MlTZxSJDRStqvEuLQKWwDctMTQogUDyQRoTQG5Kc6oQRE1yV1jCA7ri7jdZyK0sYTRjCR0Hnnd+y7nHxNgTULqw+8wj0mQKxpYvhjm9uSUxg+TTy7s2GtLUGcywhXSKZN275GsqlclX90J6bRI1aouxmgL7Q0Nen5ziM80SqMIo8cSOo+8XplT/5DHNWsSUr/6lLN/QQ3rDyzLruEW5enpf7KqZoShEduuSFOV7DLX7Ye+GmXb6/hnNNqKsVXuMDFpb9Y9eH3C6NGEzuOuI3gpMH/I6e+zDiH1fXi15t3vA1czsLws0TGEtmPEJdiiFPwlwKbgLHAFk4P6ZyPdymYYHGE0dutsChQBl2JcBFlrEkY/N5bQeXQ18gjunuMfMfsBlxJSx3niO485fwO4fGD5T/+3fPQqkneWVdwnw/3bMPkW9Wbqg+iC765Zk+xcT98ibKZc2EdgHcLoF8cSOo/Oc8fS+OyEULF4g4sJqXVcmfMfsc7A8v1/yfGXmL9I6Fn5pRwZhsPv0TxFNlAfZCvG+Oohi82UC5f/2IsJo0cTOm9YrDoKhFPEUr/LBYTUNht9zelHXDqwfPCIw4owp3mOcIQcLttWXFe3VZ/j5H3cIc0G6oPbCR+6Y2xF2EC5cGUm6wKC5tGEzhsWqw5hNidUiKX5gFWE1GXh4/Qplw4sVzOmx9QxU78g3EF6wnZlEN4FzJ1QPSLEZz1KfXC7vd8ssGdIbNUYpVx4UapyFUHzJoTOo1McSkeNn1M5MDQfs4qQuhhX5vQZFw8suwWTcyYTgioISk2YdmkhehG4PkE7w51inyAGGaU+uCXADabGzJR1fn3lwkty0asIo8cROm9Vy1g0yDxxtPvHDAmpu+PKnM8Ix1wwsGw91YJqhteaWgjYBmmQiebmSpwKKzE19hx7jkzSWOm66oPbzZ8Yj6kxVSpYjVAuvLzYMCRo3oTQecOOjjgi3NQ4l9K5/hOGhNTdcWVOTrlgYNkEXINbpCkBRyqhp+LdRB3g0OU6rMfW2HPCFFMV9nSp+uB2woepdbLBuJQyaw/ZFysXrlXwHxI0b0LovEkiOpXGA1Ijagf+KUNC6rKNa9bQnLFqYNkEnMc1uJrg2u64ELPBHpkgWbmwKpJoDhMwNbbGzAp7Yg31wS2T5rGtzit59PrKhesWG550CZpHEzpv2NGRaxlNjbMqpmEIzygJqQfjypycs2pg2cS2RY9r8HUqkqdEgKTWtWTKoRvOBPDYBltja2SO0RGjy9UHtxwRjA11ujbKF+ti5cIR9eCnxUg6owidtyoU5tK4NLji5Q3HCtiyF2IqLGYsHViOXTXOYxucDqG0HyttqYAKqYo3KTY1ekyDXRAm2AWh9JmsVh/ccg9WJ2E8YjG201sPq5ULxxX8n3XLXuMInbft2mk80rRGjCGctJ8/GFdmEQ9Ug4FlE1ll1Y7jtiraqm5Fe04VV8lvSVBL8hiPrfFVd8+7QH3Qbu2ipTVi8cvSGivc9cj8yvH11YMHdNSERtuOslM97feYFOPKzGcsI4zW0YGAbTAOaxCnxdfiYUmVWslxiIblCeAYr9VYR1gM7GmoPrilunSxxeT3DN/2eBQ9H11+nk1adn6VK71+5+Jfct4/el10/7KBZfNryUunWSCPxPECk1rdOv1WVSrQmpC+Tl46YD3ikQYcpunSQgzVB2VHFhxHVGKDgMEY5GLlQnP7FMDzw7IacAWnO6sBr12u+XanW2AO0wQ8pknnFhsL7KYIqhkEPmEXFkwaN5KQphbkUmG72wgw7WSm9RiL9QT925hkjiVIIhphFS9HKI6/8QAjlpXqg9W2C0apyaVDwKQwrwLY3j6ADR13ZyUNByQXHQu6RY09Hu6zMqXRaNZGS/KEJs0cJEe9VH1QdvBSJv9h09eiRmy0V2uJcqHcShcdvbSNg5fxkenkVprXM9rDVnX24/y9MVtncvbKY706anNl3ASll9a43UiacVquXGhvq4s2FP62NGKfQLIQYu9q1WmdMfmUrDGt8eDS0cXozH/fjmUH6Jruvm50hBDSaEU/2Ru2LEN/dl006TSc/g7tfJERxGMsgDUEr104pfWH9lQaN+M4KWQjwZbVc2rZVNHsyHal23wZtIs2JJqtIc/WLXXRFCpJkfE9jvWlfFbsNQ9pP5ZBS0zKh4R0aMFj1IjTcTnvi0Zz2rt7NdvQb2mgbju1plsH8MmbnEk7KbK0b+wC2iy3aX3szW8xeZvDwET6hWZYwqTXSSG+wMETKum0Dq/q+x62gt2ua2ppAo309TRk9TPazfV3qL9H8z7uhGqGqxNVg/FKx0HBl9OVUORn8Q8Jx9gFttGQUDr3tzcXX9xGgN0EpzN9mdZ3GATtPhL+CjxFDmkeEU6x56kqZRusLzALXVqkCN7zMEcqwjmywDQ6OhyUe0Xao1Qpyncrg6wKp9XfWDsaZplElvQ/b3sdweeghorwBDlHzgk1JmMc/wiERICVy2VJFdMjFuLQSp3S0W3+sngt2njwNgLssFGVQdJ0tu0KH4ky1LW4yrbkuaA6Iy9oz/qEMMXMMDWyIHhsAyFZc2peV9hc7kiKvfULxCl9iddfRK1f8kk9qvbdOoBtOg7ZkOZ5MsGrSHsokgLXUp9y88smniwWyuFSIRVmjplga3yD8Uij5QS1ZiM4U3Qw5QlSm2bXjFe6jzzBFtpg+/YBbLAWG7OPynNjlCw65fukGNdkJRf7yM1fOxVzbxOJVocFoYIaGwH22mIQkrvu1E2nGuebxIgW9U9TSiukPGU+Lt++c3DJPKhyhEEbXCQLUpae2exiKy6tMPe9mDRBFCEMTWrtwxN8qvuGnt6MoihKWS5NSyBhbH8StXoAz8PLOrRgLtOT/+4vcu+7vDLnqNvztOq7fmd8sMmY9Xzn1zj8Dq8+XVdu2Nv0IIySgEdQo3xVHps3Q5i3fLFsV4aiqzAiBhbgMDEd1uh8qZZ+lwhjkgokkOIv4xNJmyncdfUUzgB4oFMBtiu71Xumpz/P+cfUP+SlwFExwWW62r7b+LSPxqxn/gvMZ5z9C16t15UbNlq+jbGJtco7p8wbYlL4alSyfWdeuu0j7JA3JFNuVAwtst7F7FhWBbPFNKIUORndWtLraFLmMu7KFVDDOzqkeaiN33YAW/r76wR4XDN/yN1z7hejPau06EddkS/6XThfcz1fI/4K736fO48vlxt2PXJYFaeUkFS8U15XE3428xdtn2kc8GQlf1vkIaNRRnOMvLTWrZbElEHeLWi1o0dlKPAh1MVgbbVquPJ5+Cr8LU5/H/+I2QlHIU2ClXM9G8v7Rr7oc/hozfUUgsPnb3D+I+7WF8kNO92GY0SNvuxiE+2Bt8prVJTkzE64sfOstxuwfxUUoyk8VjcTlsqe2qITSFoSj6Epd4KsT6BZOWmtgE3hBfir8IzZDwgV4ZTZvD8VvPHERo8v+vL1DASHTz/i9OlKueHDjK5Rnx/JB1Vb1ioXdBra16dmt7dgik10yA/FwJSVY6XjA3oy4SqM2frqDPPSRMex9qs3XQtoWxMj7/Er8GWYsXgjaVz4OYumP2+9kbxvny/6kvWsEBw+fcb5bInc8APdhpOSs01tEqIkoiZjbAqKMruLbJYddHuHFRIyJcbdEdbl2sVLaySygunutBg96Y2/JjKRCdyHV+AEFtTvIpbKIXOamknYSiB6KV/0JetZITgcjjk5ZdaskBtWO86UF0ap6ozGXJk2WNiRUlCPFir66lzdm/SLSuK7EUdPz8f1z29Skq6F1fXg8+5UVR6bszncP4Tn4KUkkdJ8UFCY1zR1i8RmL/qQL3rlei4THG7OODlnKko4oI01kd3CaM08Ia18kC3GNoVaO9iDh+hWxSyTXFABXoau7Q6q9OxYg/OVEMw6jdbtSrJ9cBcewGmaZmg+bvkUnUUaGr+ZfnMH45Ivevl61hMcXsxYLFTu1hTm2zViCp7u0o5l+2PSUh9bDj6FgYypufBDhqK2+oXkiuHFHR3zfj+9PtA8oR0xnqX8qn+sx3bFODSbbF0X8EUvWQ8jBIcjo5bRmLOljDNtcqNtOe756h3l0VhKa9hDd2l1eqmsnh0MNMT/Cqnx6BInumhLT8luljzQ53RiJeA/0dxe5NK0o2fA1+GLXr6eNQWHNUOJssQaTRlGpLHKL9fD+IrQzTOMZS9fNQD4AnRNVxvTdjC+fJdcDDWQcyB00B0t9BDwTxXgaAfzDZ/DBXzRnfWMFRwuNqocOmX6OKNkY63h5n/fFcB28McVHqnXZVI27K0i4rDLNE9lDKV/rT+udVbD8dFFu2GGZ8mOt0kAXcoX3ZkIWVtw+MNf5NjR2FbivROHmhV1/pj2egv/fMGIOWTIWrV3Av8N9imV9IWml36H6cUjqEWNv9aNc+veb2sH46PRaHSuMBxvtW+twxctq0z+QsHhux8Q7rCY4Ct8lqsx7c6Sy0dl5T89rIeEuZKoVctIk1hNpfavER6yyH1Vvm3MbsUHy4ab4hWr/OZPcsRBphnaV65/ZcdYPNNwsjN/djlf9NqCw9U5ExCPcdhKxUgLSmfROpLp4WSUr8ojdwbncbvCf+a/YzRaEc6QOvXcGO256TXc5Lab9POvB+AWY7PigWYjzhifbovuunzRawsO24ZqQQAqguBtmpmPB7ysXJfyDDaV/aPGillgz1MdQg4u5MYaEtBNNHFjkRlSpd65lp4hd2AVPTfbV7FGpyIOfmNc/XVsPfg7vzaS/3nkvLL593ANLvMuRMGpQIhiF7kUEW9QDpAUbTWYBcbp4WpacHHY1aacqQyjGZS9HI3yCBT9kUZJhVOD+zUDvEH9ddR11fzPcTDQ5TlgB0KwqdXSavk9BC0pKp0WmcuowSw07VXmXC5guzSa4p0UvRw2lbDiYUx0ExJJRzWzi6Gm8cnEkfXXsdcG/M/jAJa0+bmCgdmQ9CYlNlSYZOKixmRsgiFxkrmW4l3KdFKv1DM8tk6WxPYJZhUUzcd8Kdtgrw/gkfXXDT7+avmfVak32qhtkg6NVdUS5wgkru1YzIkSduTW1FDwVWV3JQVJVuieTc0y4iDpFwc7/BvSalvKdQM8sv662cevz/+8sQVnjVAT0W2wLllw1JiMhJRxgDjCjLQsOzSFSgZqx7lAW1JW0e03yAD3asC+GD3NbQhbe+mN5GXH1F83KDOM4n/e5JIuH4NpdQARrFPBVptUNcjj4cVMcFSRTE2NpR1LEYbYMmfWpXgP9KejaPsLUhuvLCsVXznAG9dfx9SR1ud/3hZdCLHb1GMdPqRJgqDmm76mHbvOXDtiO2QPUcKo/TWkQ0i2JFXpBoo7vij1i1Lp3ADAo+qvG3V0rM//vFnnTE4hxd5Ka/Cor5YEdsLVJyKtDgVoHgtW11pWSjolPNMnrlrVj9Fv2Qn60twMwKPqr+N/wvr8z5tZcDsDrv06tkqyzESM85Ycv6XBWA2birlNCXrI6VbD2lx2L0vQO0QVTVVLH4SE67fgsfVXv8n7sz7/85Z7cMtbE6f088wSaR4kCkCm10s6pKbJhfqiUNGLq+0gLWC6eUAZFPnLjwqtKd8EwGvWX59t7iPW4X/eAN1svgRVSY990YZg06BD1ohLMtyFTI4pKTJsS9xREq9EOaPWiO2gpms7397x6nQJkbh+Fz2q/rqRROX6/M8bJrqlVW4l6JEptKeUFuMYUbtCQ7CIttpGc6MY93x1r1vgAnRXvY5cvwWPqb9uWQm+lP95QxdNMeWhOq1x0Db55C7GcUv2ZUuN6n8iKzsvOxibC//Yfs9Na8r2Rlz02vXXDT57FP/zJi66/EJSmsJKa8QxnoqW3VLQ+jZVUtJwJ8PNX1NQCwfNgdhhHD9on7PdRdrdGPF28rJr1F+3LBdeyv+8yYfLoMYet1vX4upNAjVvwOUWnlNXJXlkzk5Il6kqeoiL0C07qno+/CYBXq/+utlnsz7/Mzvy0tmI4zm4ag23PRN3t/CWryoUVJGm+5+K8RJ0V8Hc88/XHUX/HfiAq7t+BH+x6v8t438enWmdJwFA6ZINriLGKv/95f8lT9/FnyA1NMVEvQyaXuu+gz36f/DD73E4pwqpLcvm/o0Vle78n//+L/NPvoefp1pTJye6e4A/D082FERa5/opeH9zpvh13cNm19/4v/LDe5xMWTi8I0Ta0qKlK27AS/v3/r+/x/2GO9K2c7kVMonDpq7//jc5PKCxeNPpFVzaRr01wF8C4Pu76hXuX18H4LduTr79guuFD3n5BHfI+ZRFhY8w29TYhbbLi/bvBdqKE4fUgg1pBKnV3FEaCWOWyA+m3WpORZr/j+9TKJtW8yBTF2/ZEODI9/QavHkVdGFp/Pjn4Q+u5hXapsP5sOH+OXXA1LiKuqJxiMNbhTkbdJTCy4llEt6NnqRT4dhg1V3nbdrm6dYMecA1yTOL4PWTE9L5VzPFlLBCvlG58AhehnN4uHsAYinyJ+AZ/NkVvELbfOBUuOO5syBIEtiqHU1k9XeISX5bsimrkUUhnGDxourN8SgUsCZVtKyGbyGzHXdjOhsAvOAswSRyIBddRdEZWP6GZhNK/yjwew9ehBo+3jEADu7Ay2n8mDc+TS7awUHg0OMzR0LABhqLD4hJEh/BEGyBdGlSJoXYXtr+3HS4ijzVpgi0paWXtdruGTknXBz+11qT1Q2inxaTzQCO46P3lfLpyS4fou2PH/PupwZgCxNhGlj4IvUuWEsTkqMWm6i4xCSMc9N1RDQoCVcuGItJ/MRWefais+3synowi/dESgJjkilnWnBTGvRWmaw8oR15257t7CHmCf8HOn7cwI8+NQBXMBEmAa8PMRemrNCEhLGEhDQKcGZWS319BX9PFBEwGTbRBhLbDcaV3drFcDqk5kCTd2JF1Wp0HraqBx8U0wwBTnbpCadwBA/gTH/CDrcCs93LV8E0YlmmcyQRQnjBa8JESmGUfIjK/7fkaDJpmD2QptFNVJU1bbtIAjjWQizepOKptRjbzR9Kag6xZmMLLjHOtcLT3Tx9o/0EcTT1XN3E45u24AiwEypDJXihKjQxjLprEwcmRKclaDNZCVqr/V8mYWyFADbusiY5hvgFoU2vio49RgJLn5OsReRFN6tabeetiiy0V7KFHT3HyZLx491u95sn4K1QQSPKM9hNT0wMVvAWbzDSVdrKw4zRjZMyJIHkfq1VAVCDl/bUhNKlGq0zGr05+YAceXVPCttVk0oqjVwMPt+BBefx4yPtGVkUsqY3CHDPiCM5ngupUwCdbkpd8kbPrCWHhkmtIKLEetF2499eS1jZlIPGYnlcPXeM2KD9vLS0bW3ktYNqUllpKLn5ZrsxlIzxvDu5eHxzGLctkZLEY4PgSOg2IUVVcUONzUDBEpRaMoXNmUc0tFZrTZquiLyKxrSm3DvIW9Fil+AkhXu5PhEPx9mUNwqypDvZWdKlhIJQY7vn2OsnmBeOWnYZ0m1iwbbw1U60by5om47iHRV6fOgzjMf/DAZrlP40Z7syxpLK0lJ0gqaAK1c2KQKu7tabTXkLFz0sCftuwX++MyNeNn68k5Buq23YQhUh0SNTJa1ioQ0p4nUG2y0XilF1JqODqdImloPS4Bp111DEWT0jJjVv95uX9BBV7eB3bUWcu0acSVM23YZdd8R8UbQUxJ9wdu3oMuhdt929ME+mh6JXJ8di2RxbTi6TbrDquqV4aUKR2iwT6aZbyOwEXN3DUsWr8Hn4EhwNyHuXHh7/pdaUjtR7vnDh/d8c9xD/s5f501eQ1+CuDiCvGhk1AN/4Tf74RfxPwD3toLarR0zNtsnPzmS64KIRk861dMWCU8ArasG9T9H0ZBpsDGnjtAOM2+/LuIb2iIUGXNgl5ZmKD/Tw8TlaAuihaFP5yrw18v4x1898zIdP+DDAX1bM3GAMvPgRP/cJn3zCW013nrhHkrITyvYuwOUkcHuKlRSW5C6rzIdY4ppnF7J8aAJbQepgbJYBjCY9usGXDKQxq7RZfh9eg5d1UHMVATRaD/4BHK93/1iAgYZ/+jqPn8Dn4UExmWrpa3+ZOK6MvM3bjwfzxNWA2dhs8+51XHSPJiaAhGSpWevEs5xHLXcEGFXYiCONySH3fPWq93JIsBiSWvWyc3CAN+EcXoT7rCSANloPPoa31rt/5PUA/gp8Q/jDD3hyrjzlR8VkanfOvB1XPubt17vzxAfdSVbD1pzAnfgyF3ycadOTOTXhpEUoLC1HZyNGW3dtmjeXgr2r56JNmRwdNNWaQVBddd6rh4MhviEB9EFRD/7RGvePvCbwAL4Mx/D6M541hHO4D3e7g6PafdcZVw689z7NGTwo5om7A8sPhccT6qKcl9NJl9aM/9kX+e59Hh1yPqGuCCZxuITcsmNaJ5F7d0q6J3H48TO1/+M57085q2icdu2U+W36Ldllz9Agiv4YGljoEN908EzvDOrBF98/vtJwCC/BF2AG75xxEmjmMIcjxbjoaxqOK3/4hPOZzhMPBpYPG44CM0dTVm1LjLtUWWVz1Bcf8tEx0zs8O2A2YVHRxKYOiy/aOVoAaMu0i7ubu43njjmd4ibMHU1sIDHaQNKrZND/FZYdk54oCXetjq7E7IVl9eAL7t+oHnwXXtLx44czzoRFHBztYVwtH1d+NOMkupZ5MTM+gUmq90X+Bh9zjRlmaQ+m7YMqUL/veemcecAtOJ0yq1JnVlN27di2E0+Klp1tAJ4KRw1eMI7aJjsO3R8kPSI3fUFXnIOfdQe86sIIVtWDL7h//Ok6vj8vwDk08NEcI8zz7OhBy+WwalzZeZ4+0XniRfst9pAJqQHDGLzVQ2pheZnnv1OWhwO43/AgcvAEXEVVpa4db9sGvNK8wjaENHkfFQ4Ci5i7dqnQlPoLQrHXZDvO3BIXZbJOBrOaEbML6sFL798I4FhKihjHMsPjBUZYCMFr6nvaArxqXPn4lCa+cHfSa2cP27g3Z3ziYTRrcbQNGLQmGF3F3cBdzzzX7AILx0IB9rbwn9kx2G1FW3Inic+ZLIsVvKR8Zwfj0l1fkqo8LWY1M3IX14OX3r9RKTIO+d9XzAI8qRPGPn/4NC2n6o4rN8XJ82TOIvuVA8zLKUHRFgBCetlDZlqR1gLKjS39xoE7Bt8UvA6BxuEDjU3tFsEijgA+615tmZkXKqiEENrh41iLDDZNq4pKTWR3LZfnos81LOuNa15cD956vLMsJd1rqYp51gDUQqMYm2XsxnUhD2jg1DM7SeuJxxgrmpfISSXVIJIS5qJJSvJPEQ49DQTVIbYWJ9QWa/E2+c/oPK1drmC7WSfJRNKBO5Yjvcp7Gc3dmmI/Xh1kDTEuiSnWqQf37h+fTMhGnDf6dsS8SQfQWlqqwXXGlc/PEZ/SC5mtzIV0nAshlQdM/LvUtYutrEZ/Y+EAFtq1k28zQhOwLr1AIeANzhF8t9qzTdZf2qRKO6MWE9ohBYwibbOmrFtNmg3mcS+tB28xv2uKd/agYCvOP+GkSc+0lr7RXzyufL7QbkUpjLjEWFLqOIkAGu2B0tNlO9Eau2W1qcOUvVRgKzypKIQZ5KI3q0MLzqTNRYqiZOqmtqloIRlmkBHVpHmRYV6/HixbO6UC47KOFJnoMrVyr7wYz+SlW6GUaghYbY1I6kkxA2W1fSJokUdSh2LQ1GAimRGm0MT+uu57H5l7QgOWxERpO9moLRPgTtquWCfFlGlIjQaRly9odmzMOWY+IBO5tB4sW/0+VWGUh32qYk79EidWKrjWuiLpiVNGFWFRJVktyeXWmbgBBzVl8anPuXyNJlBJOlKLTgAbi/EYHVHxWiDaVR06GnHQNpJcWcK2jJtiCfG2sEHLzuI66sGrMK47nPIInPnu799935aOK2cvmvubrE38ZzZjrELCmXM2hM7UcpXD2oC3+ECVp7xtIuxptJ0jUr3sBmBS47TVxlvJ1Sqb/E0uLdvLj0lLr29ypdd/eMX3f6lrxGlKwKQxEGvw0qHbkbwrF3uHKwVENbIV2wZ13kNEF6zD+x24aLNMfDTCbDPnEikZFyTNttxWBXDaBuM8KtI2rmaMdUY7cXcUPstqTGvBGSrFWIpNMfbdea990bvAOC1YX0qbc6smDS1mPxSJoW4fwEXvjMmhlijDRq6qale6aJEuFGoppYDoBELQzLBuh/mZNx7jkinv0EtnUp50lO9hbNK57lZaMAWuWR5Yo9/kYwcYI0t4gWM47Umnl3YmpeBPqSyNp3K7s2DSAS/39KRuEN2bS4xvowV3dFRMx/VFcp2Yp8w2nTO9hCXtHG1kF1L4KlrJr2wKfyq77R7MKpFKzWlY9UkhYxyHWW6nBWPaudvEAl3CGcNpSXPZ6R9BbBtIl6cHL3gIBi+42CYXqCx1gfGWe7Ap0h3luyXdt1MKy4YUT9xSF01G16YEdWsouW9mgDHd3veyA97H+Ya47ZmEbqMY72oPztCGvK0onL44AvgC49saZKkWRz4veWljE1FHjbRJaWv6ZKKtl875h4CziFCZhG5rx7tefsl0aRT1bMHZjm8dwL/6u7wCRysaQblQoG5yAQN5zpatMNY/+yf8z+GLcH/Qn0iX2W2oEfXP4GvwQHuIL9AYGnaO3zqAX6946nkgqZNnUhx43DIdQtMFeOPrgy/y3Yd85HlJWwjLFkU3kFwq28xPnuPhMWeS+tDLV9Otllq7pQCf3uXJDN9wFDiUTgefHaiYbdfi3b3u8+iY6TnzhgehI1LTe8lcd7s1wJSzKbahCRxKKztTLXstGAiu3a6rPuQs5pk9TWAan5f0BZmGf7Ylxzzk/A7PAs4QPPPAHeFQ2hbFHszlgZuKZsJcUmbDC40sEU403cEjczstOEypa+YxevL4QBC8oRYqWdK6b7sK25tfE+oDZgtOQ2Jg8T41HGcBE6fTWHn4JtHcu9S7uYgU5KSCkl/mcnq+5/YBXOEr6lCUCwOTOM1taOI8mSxx1NsCXBEmLKbMAg5MkwbLmpBaFOPrNSlO2HnLiEqW3tHEwd8AeiQLmn+2gxjC3k6AxREqvKcJbTEzlpLiw4rNZK6oJdidbMMGX9FULKr0AkW+2qDEPBNNm5QAt2Ik2nftNWHetubosHLo2nG4vQA7GkcVCgVCgaDixHqo9UUn1A6OshapaNR/LPRYFV8siT1cCtJE0k/3WtaNSuUZYKPnsVIW0xXWnMUxq5+En4Kvw/MqQmVXnAXj9Z+9zM98zM/Agy7F/qqj2Nh67b8HjFnPP3iBn/tkpdzwEJX/whIcQUXOaikeliCRGUk7tiwF0rItwMEhjkZ309hikFoRAmLTpEXWuHS6y+am/KB/fM50aLEhGnSMwkpxzOov4H0AvgovwJ1iGzDLtJn/9BU+fAINfwUe6FHSLhu83viV/+/HrOePX+STT2B9uWGbrMHHLldRBlhS/CJQmcRxJFqZica01XixAZsYiH1uolZxLrR/SgxVIJjkpQP4PE9sE59LKLr7kltSBogS5tyszzH8Fvw8/AS8rNOg0xUS9fIaHwb+6et8Q/gyvKRjf5OusOzGx8evA/BP4IP11uN/grca5O0lcsPLJ5YjwI4QkJBOHa0WdMZYGxPbh2W2nR9v3WxEWqgp/G3+6VZbRLSAAZ3BhdhAaUL33VUSw9yjEsvbaQ9u4A/gGXwZXoEHOuU1GSj2chf+Mo+f8IcfcAxfIKVmyunRbYQVnoevwgfw3TXXcw++xNuP4fhyueEUNttEduRVaDttddoP0eSxLe2LENk6itYxlrxBNBYrNNKSQmeaLcm9c8UsaB5WyO6675yyQIAWSDpBVoA/gxmcwEvwoDv0m58UE7gHn+fJOa8/Ywan8EKRfjsopF83eCglX/Sfr7OeaRoQfvt1CGvIDccH5BCvw1sWIzRGC/66t0VTcLZQZtm6PlAasbOJ9iwWtUo7biktTSIPxnR24jxP1ZKaqq+2RcXM9OrBAm/AAs7hDJ5bNmGb+KIfwCs8a3jnjBrOFeMjHSCdbKr+2uOLfnOd9eiA8Hvvwwq54VbP2OqwkB48Ytc4YEOiH2vTXqodabfWEOzso4qxdbqD5L6tbtNPECqbhnA708DZH4QOJUXqScmUlks7Ot6FBuZw3n2mEbaUX7kDzxHOOQk8nKWMzAzu6ZZ8sOFw4RK+6PcuXo9tB4SbMz58ApfKDXf3szjNIIbGpD5TKTRxGkEMLjLl+K3wlWXBsCUxIDU+jbOiysESqAy1MGUJpXgwbTWzNOVEziIXZrJ+VIztl1PUBxTSo0dwn2bOmfDRPD3TRTGlfbCJvO9KvuhL1hMHhB9wPuPRLGHcdOWG2xc0U+5bQtAJT0nRTewXL1pgk2+rZAdeWmz3jxAqfNQQdzTlbF8uJ5ecEIWvTkevAHpwz7w78QujlD/Lr491bD8/1vhM2yrUQRrWXNQY4fGilfctMWYjL72UL/qS9eiA8EmN88nbNdour+PBbbAjOjIa4iBhfFg6rxeKdEGcL6p3EWR1Qq2Qkhs2DrnkRnmN9tG2EAqmgPw6hoL7Oza7B+3SCrR9tRftko+Lsf2F/mkTndN2LmzuMcKTuj/mX2+4Va3ki16+nnJY+S7MefpkidxwnV+4wkXH8TKnX0tsYzYp29DOOoSW1nf7nTh2akYiWmcJOuTidSaqESrTYpwjJJNVGQr+rLI7WsqerHW6Kp/oM2pKuV7T1QY9gjqlZp41/WfKpl56FV/0kvXQFRyeQ83xaTu5E8p5dNP3dUF34ihyI3GSpeCsywSh22ZJdWto9winhqifb7VRvgktxp13vyjrS0EjvrRfZ62uyqddSWaWYlwTPAtJZ2oZ3j/Sgi/mi+6vpzesfAcWNA0n8xVyw90GVFGuZjTXEQy+6GfLGLMLL523f5E0OmxVjDoOuRiH91RKU+vtoCtH7TgmvBLvtFXWLW15H9GTdVw8ow4IlRLeHECN9ym1e9K0I+Cbnhgv4Yu+aD2HaQJ80XDqOzSGAV4+4yCqBxrsJAX6ZTIoX36QnvzhhzzMfFW2dZVLOJfo0zbce5OvwXMFaZ81mOnlTVXpDZsQNuoYWveketKb5+6JOOsgX+NTm7H49fUTlx+WLuWL7qxnOFh4BxpmJx0p2gDzA/BUARuS6phR+pUsY7MMboAHx5xNsSVfVZcYSwqCKrqon7zM+8ecCkeS4nm3rINuaWvVNnMRI1IRpxTqx8PZUZ0Br/UEduo3B3hNvmgZfs9gQPj8vIOxd2kndir3awvJ6BLvoUuOfFWNYB0LR1OQJoUySKb9IlOBx74q1+ADC2G6rOdmFdJcD8BkfualA+BdjOOzP9uUhGUEX/TwhZsUduwRr8wNuXKurCixLBgpQI0mDbJr9dIqUuV+92ngkJZ7xduCk2yZKbfWrH1VBiTg9VdzsgRjW3CVXCvAwDd+c1z9dWw9+B+8MJL/eY15ZQ/HqvTwVdsZn5WQsgRRnMaWaecu3jFvMBEmgg+FJFZsnSl0zjB9OqPYaBD7qmoVyImFvzi41usesV0julaAR9dfR15Xzv9sEruRDyk1nb+QaLU67T885GTls6YgcY+UiMa25M/pwGrbCfzkvR3e0jjtuaFtnwuagHTSb5y7boBH119HXhvwP487jJLsLJ4XnUkHX5sLbS61dpiAXRoZSCrFJ+EjpeU3puVfitngYNo6PJrAigKktmwjyQdZpfq30mmtulaAx9Zfx15Xzv+cyeuiBFUs9zq8Kq+XB9a4PVvph3GV4E3y8HENJrN55H1X2p8VyqSKwVusJDKzXOZzplWdzBUFK9e+B4+uv468xvI/b5xtSAkBHQaPvtqWzllVvEOxPbuiE6+j2pvjcKsbvI7txnRErgfH7LdXqjq0IokKzga14GzQ23SSbCQvO6r+Or7SMIr/efOkkqSdMnj9mBx2DRsiY29Uj6+qK9ZrssCKaptR6HKURdwUYeUWA2kPzVKQO8ku2nU3Anhs/XWkBx3F/7wJtCTTTIKftthue1ty9xvNYLY/zo5KSbIuKbXpbEdSyeRyYdAIwKY2neyoc3+k1XUaufYga3T9daMUx/r8z1s10ITknIO0kuoMt+TB8jK0lpayqqjsJ2qtXAYwBU932zinimgmd6mTRDnQfr88q36NAI+tv24E8Pr8zxtasBqx0+xHH9HhlrwsxxNUfKOHQaZBITNf0uccj8GXiVmXAuPEAKSdN/4GLHhs/XWj92dN/uetNuBMnVR+XWDc25JLjo5Mg5IZIq226tmCsip2zZliL213YrTlL2hcFjpCduyim3M7/eB16q/blQsv5X/esDRbtJeabLIosWy3ycavwLhtxdWzbMmHiBTiVjJo6lCLjXZsi7p9PEPnsq6X6wd4bP11i0rD5fzPm/0A6brrIsllenZs0lCJlU4abakR59enZKrKe3BZihbTxlyZ2zl1+g0wvgmA166/bhwDrcn/7Ddz0eWZuJvfSESug6NzZsox3Z04FIxz0mUjMwVOOVTq1CQ0AhdbBGVdjG/CgsfUX7esJl3K/7ytWHRv683praW/8iDOCqWLLhpljDY1ZpzK75QiaZoOTpLKl60auHS/97oBXrv+umU9+FL+5+NtLFgjqVLCdbmj7pY5zPCPLOHNCwXGOcLquOhi8CmCWvbcuO73XmMUPab+ug3A6/A/78Bwe0bcS2+tgHn4J5pyS2WbOck0F51Vq3LcjhLvZ67p1ABbaL2H67bg78BfjKi/jr3+T/ABV3ilLmNXTI2SpvxWBtt6/Z//D0z/FXaGbSBgylzlsEGp+5//xrd4/ae4d8DUUjlslfIYS3t06HZpvfQtvv0N7AHWqtjP2pW08QD/FLy//da38vo8PNlKHf5y37Dxdfe/oj4kVIgFq3koLReSR76W/bx//n9k8jonZxzWTANVwEniDsg87sOSd/z7//PvMp3jQiptGVWFX2caezzAXwfgtzYUvbr0iozs32c3Uge7varH+CNE6cvEYmzbPZ9hMaYDdjK4V2iecf6EcEbdUDVUARda2KzO/JtCuDbNQB/iTeL0EG1JSO1jbXS+nLxtPMDPw1fh5+EPrgSEKE/8Gry5A73ui87AmxwdatyMEBCPNOCSKUeRZ2P6Myb5MRvgCHmA9ywsMifU+AYXcB6Xa5GibUC5TSyerxyh0j6QgLVpdyhfArRTTLqQjwe4HOD9s92D4Ap54odXAPBWLAwB02igG5Kkc+piN4lvODIFGAZgT+EO4Si1s7fjSR7vcQETUkRm9O+MXyo9OYhfe4xt9STQ2pcZRLayCV90b4D3jR0DYAfyxJ+eywg2IL7NTMXna7S/RpQ63JhWEM8U41ZyQGjwsVS0QBrEKLu8xwZsbi4wLcCT+OGidPIOCe1PiSc9Qt+go+vYqB7cG+B9d8cAD+WJPz0Am2gxXgU9IneOqDpAAXOsOltVuMzpdakJXrdPCzXiNVUpCeOos5cxnpQT39G+XVLhs1osQVvJKPZyNq8HDwd4d7pNDuWJPxVX7MSzqUDU6gfadKiNlUFTzLeFHHDlzO4kpa7aiKhBPGKwOqxsBAmYkOIpipyXcQSPlRTf+Tii0U3EJGaZsDER2qoB3h2hu0qe+NNwUooYU8y5mILbJe6OuX+2FTKy7bieTDAemaQyQ0CPthljSWO+xmFDIYiESjM5xKd6Ik5lvLq5GrQ3aCMLvmCA9wowLuWJb9xF59hVVP6O0CrBi3ZjZSNOvRy+I6klNVRJYRBaEzdN+imiUXQ8iVF8fsp+W4JXw7WISW7fDh7lptWkCwZ4d7QTXyBPfJMYK7SijjFppGnlIVJBJBYj7eUwtiP1IBXGI1XCsjNpbjENVpSAJ2hq2LTywEly3hUYazt31J8w2+aiLx3g3fohXixPfOMYm6zCGs9LVo9MoW3MCJE7R5u/WsOIjrqBoHUO0bJE9vxBpbhsd3+Nb4/vtPCZ4oZYCitNeYuC/8UDvDvy0qvkiW/cgqNqRyzqSZa/s0mqNGjtKOoTm14zZpUauiQgVfqtQiZjq7Q27JNaSK5ExRcrGCXO1FJYh6jR6CFqK7bZdQZ4t8g0rSlPfP1RdBtqaa9diqtzJkQ9duSryi2brQXbxDwbRUpFMBHjRj8+Nt7GDKgvph9okW7LX47gu0SpGnnFQ1S1lYldOsC7hYteR574ZuKs7Ei1lBsfdz7IZoxzzCVmmVqaSySzQbBVAWDek+N4jh9E/4VqZrJjPwiv9BC1XcvOWgO8275CVyBPvAtTVlDJfZkaZGU7NpqBogAj/xEHkeAuJihWYCxGN6e8+9JtSegFXF1TrhhLGP1fak3pebgPz192/8gB4d/6WT7+GdYnpH7hH/DJzzFiYPn/vjW0SgNpTNuPIZoAEZv8tlGw4+RLxy+ZjnKa5NdFoC7UaW0aduoYse6+bXg1DLg6UfRYwmhGEjqPvF75U558SANrElK/+MdpXvmqBpaXOa/MTZaa1DOcSiLaw9j0NNNst3c+63c7EKTpkvKHzu6bPbP0RkuHAVcbRY8ijP46MIbQeeT1mhA+5PV/inyDdQipf8LTvMXbwvoDy7IruDNVZKTfV4CTSRUYdybUCnGU7KUTDxLgCknqUm5aAW6/1p6eMsOYsphLzsHrE0Y/P5bQedx1F/4yPHnMB3/IOoTU9+BL8PhtjuFKBpZXnYNJxTuv+2XqolKR2UQgHhS5novuxVySJhBNRF3SoKK1XZbbXjVwWNyOjlqWJjrWJIy+P5bQedyldNScP+HZ61xKSK3jyrz+NiHG1hcOLL/+P+PDF2gOkekKGiNWKgJ+8Z/x8Iv4DdQHzcpZyF4v19I27w9/yPGDFQvmEpKtqv/TLiWMfn4sofMm9eAH8Ao0zzh7h4sJqYtxZd5/D7hkYPneDzl5idlzNHcIB0jVlQ+8ULzw/nc5/ojzl2juE0apD7LRnJxe04dMz2iOCFNtGFpTuXA5AhcTRo8mdN4kz30nVjEC4YTZQy4gpC7GlTlrePKhGsKKgeXpCYeO0MAd/GH7yKQUlXPLOasOH3FnSphjHuDvEu4gB8g66oNbtr6eMbFIA4fIBJkgayoXriw2XEDQPJrQeROAlY6aeYOcMf+IVYTU3XFlZufMHinGywaW3YLpObVBAsbjF4QJMsVUSayjk4voPsHJOQfPWDhCgDnmDl6XIRerD24HsGtw86RMHOLvVSHrKBdeVE26gKB5NKHzaIwLOmrqBWJYZDLhASG16c0Tn+CdRhWDgWXnqRZUTnPIHuMJTfLVpkoYy5CzylHVTGZMTwkGAo2HBlkQplrJX6U+uF1wZz2uwS1SQ12IqWaPuO4baZaEFBdukksJmkcTOm+YJSvoqPFzxFA/YUhIvWxcmSdPWTWwbAKVp6rxTtPFUZfKIwpzm4IoMfaYQLWgmlG5FME2gdBgm+J7J+rtS/XBbaVLsR7bpPQnpMFlo2doWaVceHk9+MkyguZNCJ1He+kuHTWyQAzNM5YSUg/GlTk9ZunAsg1qELVOhUSAK0LABIJHLKbqaEbHZLL1VA3VgqoiOKXYiS+HRyaEKgsfIqX64HYWbLRXy/qWoylIV9gudL1OWBNgBgTNmxA6b4txDT4gi3Ri7xFSLxtXpmmYnzAcWDZgY8d503LFogz5sbonDgkKcxGsWsE1OI+rcQtlgBBCSOKD1mtqYpIU8cTvBmAT0yZe+zUzeY92fYjTtGipXLhuR0ePoHk0ofNWBX+lo8Z7pAZDk8mEw5L7dVyZZoE/pTewbI6SNbiAL5xeygW4xPRuLCGbhcO4RIeTMFYHEJkYyEO9HmJfXMDEj/LaH781wHHZEtqSQ/69UnGpzH7LKIAZEDSPJnTesJTUa+rwTepI9dLJEawYV+ZkRn9g+QirD8vF8Mq0jFQ29js6kCS3E1+jZIhgPNanHdHFqFvPJLHqFwQqbIA4jhDxcNsOCCQLDomaL/dr5lyJaJU6FxPFjO3JOh3kVMcROo8u+C+jo05GjMF3P3/FuDLn5x2M04xXULPwaS6hBYki+MrMdZJSgPHlcB7nCR5bJ9Kr5ACUn9jk5kivdd8tk95SOGrtqu9lr2IhK65ZtEl7ZKrp7DrqwZfRUSN1el7+7NJxZbywOC8neNKTch5vsTEMNsoCCqHBCqIPRjIPkm0BjvFODGtto99rCl+d3wmHkW0FPdpZtC7MMcVtGFQjJLX5bdQ2+x9ypdc313uj8xlsrfuLgWXz1cRhZvJYX0iNVBRcVcmCXZs6aEf3RQF2WI/TcCbKmGU3IOoDJGDdDub0+hYckt6PlGu2BcxmhbTdj/klhccLGJMcqRjMJP1jW2ETqLSWJ/29MAoORluJ+6LPffBZbi5gqi5h6catQpmOT7/OFf5UorRpLzCqcMltBLhwd1are3kztrSzXO0LUbXRQcdLh/RdSZ+swRm819REDrtqzC4es6Gw4JCKlSnjYVpo0xeq33PrADbFLL3RuCmObVmPN+24kfa+AojDuM4umKe2QwCf6EN906HwjujaitDs5o0s1y+k3lgbT2W2i7FJdnwbLXhJUBq/9liTctSmFC/0OqUinb0QddTWamtjbHRFuWJJ6NpqZ8vO3fZJ37Db+2GkaPYLGHs7XTTdiFQJ68SkVJFVmY6McR5UycflNCsccHFaV9FNbR4NttLxw4pQ7wJd066Z0ohVbzihaxHVExd/ay04oxUKWt+AsdiQ9OUyZ2krzN19IZIwafSTFgIBnMV73ADj7V/K8u1MaY2sJp2HWm0f41tqwajEvdHWOJs510MaAqN4aoSiPCXtN2KSi46dUxHdaMquar82O1x5jqhDGvqmoE9LfxcY3zqA7/x3HA67r9ZG4O6Cuxu12/+TP+eLP+I+HErqDDCDVmBDO4larujNe7x8om2rMug0MX0rL1+IWwdwfR+p1TNTyNmVJ85ljWzbWuGv8/C7HD/izjkHNZNYlhZcUOKVzKFUxsxxN/kax+8zPWPSFKw80rJr9Tizyj3o1gEsdwgWGoxPezDdZ1TSENE1dLdNvuKL+I84nxKesZgxXVA1VA1OcL49dFlpFV5yJMhzyCmNQ+a4BqusPJ2bB+xo8V9u3x48VVIEPS/mc3DvAbXyoYr6VgDfh5do5hhHOCXMqBZUPhWYbWZECwVJljLgMUWOCB4MUuMaxGNUQDVI50TQ+S3kFgIcu2qKkNSHVoM0SHsgoZxP2d5HH8B9woOk4x5bPkKtAHucZsdykjxuIpbUrSILgrT8G7G5oCW+K0990o7E3T6AdW4TilH5kDjds+H64kS0mz24grtwlzDHBJqI8YJQExotPvoC4JBq0lEjjQkyBZ8oH2LnRsQ4Hu1QsgDTJbO8fQDnllitkxuVskoiKbRF9VwzMDvxHAdwB7mD9yCplhHFEyUWHx3WtwCbSMMTCUCcEmSGlg4gTXkHpZXWQ7kpznK3EmCHiXInqndkQjunG5kxTKEeGye7jWz9cyMR2mGiFQ15ENRBTbCp+Gh86vAyASdgmJq2MC6hoADQ3GosP0QHbnMHjyBQvQqfhy/BUbeHd5WY/G/9LK/8Ka8Jd7UFeNWEZvzPb458Dn8DGLOe3/wGL/4xP+HXlRt+M1PE2iLhR8t+lfgxsuh7AfO2AOf+owWhSZRYQbd622hbpKWKuU+XuvNzP0OseRDa+mObgDHJUSc/pKx31QdKffQ5OIJpt8GWjlgTwMc/w5MPCR/yl1XC2a2Yut54SvOtMev55Of45BOat9aWG27p2ZVORRvnEk1hqWMVUmqa7S2YtvlIpspuF1pt0syuZS2NV14mUidCSfzQzg+KqvIYCMljIx2YK2AO34fX4GWdu5xcIAb8MzTw+j/lyWM+Dw/gjs4GD6ehNgA48kX/AI7XXM/XAN4WHr+9ntywqoCakCqmKP0rmQrJJEErG2Upg1JObr01lKQy4jskWalKYfJ/EDLMpjNSHFEUAde2fltaDgmrNaWQ9+AAb8I5vKjz3L1n1LriB/BXkG/wwR9y/oRX4LlioHA4LzP2inzRx/DWmutRweFjeP3tNeSGlaE1Fde0OS11yOpmbIp2u/jF1n2RRZviJM0yBT3IZl2HWImKjQOxIyeU325b/qWyU9Moj1o07tS0G7qJDoGHg5m8yeCxMoEH8GU45tnrNM84D2l297DQ9t1YP7jki/7RmutRweEA77/HWXOh3HCxkRgldDQkAjNTMl2Iloc1qN5JfJeeTlyTRzxURTdn1Ixv2uKjs12AbdEWlBtmVdk2k7FFwj07PCZ9XAwW3dG+8xKzNFr4EnwBZpy9Qzhh3jDXebBpYcpuo4fQ44u+fD1dweEnHzI7v0xuuOALRUV8rXpFyfSTQYkhd7IHm07jpyhlkCmI0ALYqPTpUxXS+z4jgDj1Pflvmz5ecuItpIBxyTHpSTGWd9g1ApfD/bvwUhL4nT1EzqgX7cxfCcNmb3mPL/qi9SwTHJ49oj5ZLjccbTG3pRmlYi6JCG0mQrAt1+i2UXTZ2dv9IlQpN5naMYtviaXlTrFpoMsl3bOAFEa8sqPj2WCMrx3Yjx99qFwO59Aw/wgx+HlqNz8oZvA3exRDvuhL1jMQHPaOJ0+XyA3fp1OfM3qObEVdhxjvynxNMXQV4+GJyvOEFqeQBaIbbO7i63rpxCltdZShPFxkjM2FPVkn3TG+Rp9pO3l2RzFegGfxGDHIAh8SteR0C4HopXzRF61nheDw6TFN05Ebvq8M3VKKpGjjO6r7nhudTEGMtYM92HTDaR1FDMXJ1eThsbKfywyoWwrzRSXkc51flG3vIid62h29bIcFbTGhfV+faaB+ohj7dPN0C2e2lC96+XouFByen9AsunLDJZ9z7NExiUc0OuoYW6UZkIyx2YUR2z6/TiRjyKMx5GbbjLHvHuf7YmtKghf34LJfx63Yg8vrvN2zC7lY0x0tvKezo4HmGYDU+Gab6dFL+KI761lDcNifcjLrrr9LWZJctG1FfU1uwhoQE22ObjdfkSzY63CbU5hzs21WeTddH2BaL11Gi7lVdlxP1nkxqhnKhVY6knS3EPgVGg1JpN5cP/hivujOelhXcPj8HC/LyI6MkteVjlolBdMmF3a3DbsuAYhL44dxzthWSN065xxUd55Lmf0wRbOYOqH09/o9WbO2VtFdaMb4qBgtFJoT1SqoN8wPXMoXLb3p1PUEhxfnnLzGzBI0Ku7FxrKsNJj/8bn/H8fPIVOd3rfrklUB/DOeO+nkghgSPzrlPxluCMtOnDL4Yml6dK1r3vsgMxgtPOrMFUZbEUbTdIzii5beq72G4PD0DKnwjmBULUVFmy8t+k7fZ3pKc0Q4UC6jpVRqS9Umv8bxw35flZVOU1X7qkjnhZlsMbk24qQ6Hz7QcuL6sDC0iHHki96Uh2UdvmgZnjIvExy2TeJdMDZNSbdZyAHe/Yd1xsQhHiKzjh7GxQ4yqMPaywPkjMamvqrYpmO7Knad+ZQC5msCuAPWUoxrxVhrGv7a+KLXFhyONdTMrZ7ke23qiO40ZJUyzgYyX5XyL0mV7NiUzEs9mjtbMN0dERqwyAJpigad0B3/zRV7s4PIfXSu6YV/MK7+OrYe/JvfGMn/PHJe2fyUdtnFrKRNpXV0Y2559aWPt/G4BlvjTMtXlVIWCnNyA3YQBDmYIodFz41PvXPSa6rq9lWZawZ4dP115HXV/M/tnFkkrBOdzg6aP4pID+MZnTJ1SuuB6iZlyiox4HT2y3YBtkUKWooacBQUDTpjwaDt5poBHl1/HXltwP887lKKXxNUEyPqpGTyA699UqY/lt9yGdlUKra0fFWS+36iylVWrAyd7Uw0CZM0z7xKTOduznLIjG2Hx8cDPLb+OvK6Bv7n1DYci4CxUuRxrjBc0bb4vD3rN5Zz36ntLb83eVJIB8LiIzCmn6SMPjlX+yNlTjvIGjs+QzHPf60Aj62/jrzG8j9vYMFtm1VoRWCJdmw7z9N0t+c8cxZpPeK4aTRicS25QhrVtUp7U578chk4q04Wx4YoQSjFryUlpcQ1AbxZ/XVMknIU//OGl7Q6z9Zpxi0+3yFhSkjUDpnCIUhLWVX23KQ+L9vKvFKI0ZWFQgkDLvBoylrHNVmaw10zwCPrr5tlodfnf94EWnQ0lFRWy8pW9LbkLsyUVDc2NSTHGDtnD1uMtchjbCeb1mpxFP0YbcClhzdLu6lfO8Bj6q+bdT2sz/+8SZCV7VIxtt0DUn9L7r4cLYWDSXnseEpOGFuty0qbOVlS7NNzs5FOGJUqQpl2Q64/yBpZf90sxbE+//PGdZ02HSipCbmD6NItmQ4Lk5XUrGpDMkhbMm2ZVheNYV+VbUWTcv99+2NyX1VoafSuC+AN6q9bFIMv5X/eagNWXZxEa9JjlMwNWb00akGUkSoepp1/yRuuqHGbUn3UdBSTxBU6SEVklzWRUkPndVvw2PrrpjvxOvzPmwHc0hpmq82npi7GRro8dXp0KXnUQmhZbRL7NEVp1uuZmO45vuzKsHrktS3GLWXODVjw+vXXLYx4Hf7njRPd0i3aoAGX6W29GnaV5YdyDj9TFkakje7GHYzDoObfddHtOSpoi2SmzJHrB3hM/XUDDEbxP2/oosszcRlehWXUvzHv4TpBVktHqwenFo8uLVmy4DKLa5d3RtLrmrM3aMFr1183E4sewf+85VWeg1c5ag276NZrM9IJVNcmLEvDNaV62aq+14IAOGFsBt973Ra8Xv11YzXwNfmft7Jg2oS+XOyoC8/cwzi66Dhmgk38kUmP1CUiYWOX1bpD2zWXt2FCp7uq8703APAa9dfNdscR/M/bZLIyouVxqJfeWvG9Je+JVckHQ9+CI9NWxz+blX/KYYvO5n2tAP/vrlZ7+8/h9y+9qeB/Hnt967e5mevX10rALDWK//FaAT5MXdBXdP0C/BAes792c40H+AiAp1e1oH8HgH94g/Lttx1gp63op1eyoM/Bvw5/G/7xFbqJPcCXnmBiwDPb/YKO4FX4OjyCb289db2/Noqicw4i7N6TVtoz8tNwDH+8x/i6Ae7lmaQVENzJFb3Di/BFeAwz+Is9SjeQySpPqbLFlNmyz47z5a/AF+AYFvDmHqibSXTEzoT4Gc3OALaqAP4KPFUJ6n+1x+rGAM6Zd78bgJ0a8QN4GU614vxwD9e1Amy6CcskNrczLx1JIp6HE5UZD/DBHrFr2oNlgG4Odv226BodoryjGJ9q2T/AR3vQrsOCS0ctXZi3ruLlhpFDJYl4HmYtjQCP9rhdn4suySLKDt6wLcC52h8xPlcjju1fn+yhuw4LZsAGUuo2b4Fx2UwQu77uqRHXGtg92aN3tQCbFexc0uk93vhTXbct6y7MulLycoUljx8ngDMBg1tvJjAazpEmOtxlzclvj1vQf1Tx7QlPDpGpqgtdSKz/d9/hdy1vTfFHSmC9dGDZbLiezz7Ac801HirGZsWjydfZyPvHXL/Y8Mjzg8BxTZiuwKz4Eb8sBE9zznszmjvFwHKPIWUnwhqfVRcd4Ck0K6ate48m1oOfrX3/yOtvAsJ8zsPAM89sjnddmuLuDPjX9Bu/L7x7xpMzFk6nWtyQfPg278Gn4Aekz2ZgOmU9eJ37R14vwE/BL8G3aibCiWMWWDQ0ZtkPMnlcGeAu/Ag+8ZyecU5BPuy2ILD+sQqyZhAKmn7XZd+jIMTN9eBL7x95xVLSX4On8EcNlXDqmBlqS13jG4LpmGbkF/0CnOi3H8ETOIXzmnmtb0a16Tzxj1sUvQCBiXZGDtmB3KAefPH94xcUa/6vwRn80GOFyjEXFpba4A1e8KQfFF+259tx5XS4egYn8fQsLGrqGrHbztr+uByTahWuL1NUGbDpsnrwBfePPwHHIf9X4RnM4Z2ABWdxUBlqQ2PwhuDxoS0vvqB1JzS0P4h2nA/QgTrsJFn+Y3AOjs9JFC07CGWX1oNX3T/yHOzgDjwPn1PM3g9Jk9lZrMEpxnlPmBbjyo2+KFXRU52TJM/2ALcY57RUzjObbjqxVw++4P6RAOf58pcVsw9Daje3htriYrpDOonre3CudSe6bfkTEgHBHuDiyu5MCsc7BHhYDx7ePxLjqigXZsw+ijMHFhuwBmtoTPtOxOrTvYJDnC75dnUbhfwu/ZW9AgYd+peL68HD+0emKquiXHhWjJg/UrkJYzuiaL3E9aI/ytrCvAd4GcYZMCkSQxfUg3v3j8c4e90j5ZTPdvmJJGHnOCI2nHS8081X013pHuBlV1gB2MX1YNmWLHqqGN/TWmG0y6clJWthxNUl48q38Bi8vtMKyzzpFdSDhxZ5WBA5ZLt8Jv3895DduBlgbPYAj8C4B8hO68FDkoh5lydC4FiWvBOVqjYdqjiLv92t8yPDjrDaiHdUD15qkSURSGmXJwOMSxWAXYwr3zaAufJ66l+94vv3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/wHuD9tQd4f+0B3l97gPfXHuD9tQd4f+0B3l97gG8LwP8G/AL8O/A5OCq0Ys2KIdv/qOIXG/4mvFAMF16gZD+2Xvu/B8as5+8bfllWyg0zaNO5bfXj6vfhhwD86/Aq3NfRS9t9WPnhfnvCIw/CT8GLcFTMnpntdF/z9V+PWc/vWoIH+FL3Znv57PitcdGP4R/C34avw5fgRVUInCwbsn1yyA8C8zm/BH8NXoXnVE6wVPjdeCI38kX/3+Ct9dbz1pTmHFRu+Hm4O9Ch3clr99negxfwj+ER/DR8EV6B5+DuQOnTgUw5rnkY+FbNU3gNXh0o/JYTuWOvyBf9FvzX663HH/HejO8LwAl8Hl5YLTd8q7sqA3wbjuExfAFegQdwfyDoSkWY8swzEf6o4Qyewefg+cHNbqMQruSL/u/WWc+E5g7vnnEXgDmcDeSGb/F4cBcCgT+GGRzDU3hZYburAt9TEtHgbM6JoxJ+6NMzzTcf6c2bycv2+KK/f+l6LBzw5IwfqZJhA3M472pWT/ajKxnjv4AFnMEpnBTPND6s2J7qHbPAqcMK74T2mZ4VGB9uJA465It+/eL1WKhYOD7xHOkr1ajK7d0C4+ke4Hy9qXZwpgLr+Znm/uNFw8xQOSy8H9IzjUrd9+BIfenYaylf9FsXr8fBAadnPIEDna8IBcwlxnuA0/Wv6GAWPd7dDIKjMdSWueAsBj4M7TOd06qBbwDwKr7oleuxMOEcTuEZTHWvDYUO7aHqAe0Bbq+HEFRzOz7WVoTDQkVds7A4sIIxfCQdCefFRoIOF/NFL1mPab/nvOakSL/Q1aFtNpUb/nFOVX6gzyg/1nISyDfUhsokIzaBR9Kxm80s5mK+6P56il1jXic7nhQxsxSm3OwBHl4fFdLqi64nDQZvqE2at7cWAp/IVvrN6/BFL1mPhYrGMBfOi4PyjuSGf6wBBh7p/FZTghCNWGgMzlBbrNJoPJX2mW5mwZfyRffXo7OFi5pZcS4qZUrlViptrXtw+GQoyhDPS+ANjcGBNRiLCQDPZPMHuiZfdFpPSTcQwwKYdRNqpkjm7AFeeT0pJzALgo7g8YYGrMHS0iocy+YTm2vyRUvvpXCIpQ5pe666TJrcygnScUf/p0NDs/iAI/nqDHC8TmQT8x3NF91l76oDdQGwu61Z6E0ABv7uO1dbf/37Zlv+Zw/Pbh8f1s4Avur6657/+YYBvur6657/+YYBvur6657/+YYBvur6657/+aYBvuL6657/+VMA8FXWX/f8zzcN8BXXX/f8zzcNMFdbf93zP38KLPiK6697/uebtuArrr/u+Z9vGmCusP6653/+1FjwVdZf9/zPN7oHX339dc//fNMu+irrr3v+50+Bi+Zq6697/uebA/jz8Pudf9ht/fWv517J/XUzAP8C/BAeX9WCDrUpZ3/dEMBxgPcfbtTVvsYV5Yn32u03B3Ac4P3b8I+vxNBKeeL9dRMAlwO83959qGO78sT769oB7g3w/vGVYFzKE++v6wV4OMD7F7tckFkmT7y/rhHgpQO8b+4Y46XyxPvrugBeNcB7BRiX8sT767oAvmCA9woAHsoT76+rBJjLBnh3txOvkifeX1dswZcO8G6N7sXyxPvr6i340gHe3TnqVfLE++uKAb50gHcXLnrX8sR7gNdPRqwzwLu7Y/FO5Yn3AK9jXCMGeHdgxDuVJ75VAI8ljP7PAb3/RfjcZfePHBB+79dpfpH1CanN30d+mT1h9GqAxxJGM5LQeeQ1+Tb+EQJrElLb38VHQ94TRq900aMIo8cSOo+8Dp8QfsB8zpqE1NO3OI9Zrj1h9EV78PqE0WMJnUdeU6E+Jjyk/hbrEFIfeWbvId8H9oTRFwdZaxJGvziW0Hn0gqYB/wyZ0PwRlxJST+BOw9m77Amj14ii1yGM/txYQudN0qDzGe4EqfA/5GJCagsHcPaEPWH0esekSwmjRxM6b5JEcZ4ww50ilvAOFxBSx4yLW+A/YU8YvfY5+ALC6NGEzhtmyZoFZoarwBLeZxUhtY4rc3bKnjB6TKJjFUHzJoTOozF2YBpsjcyxDgzhQ1YRUse8+J4wenwmaylB82hC5w0zoRXUNXaRBmSMQUqiWSWkLsaVqc/ZE0aPTFUuJWgeTei8SfLZQeMxNaZSIzbII4aE1Nmr13P2hNHjc9E9guYNCZ032YlNwESMLcZiLQHkE4aE1BFg0yAR4z1h9AiAGRA0jyZ03tyIxWMajMPWBIsxYJCnlITU5ShiHYdZ94TR4wCmSxg9jtB5KyPGYzymAYexWEMwAPIsAdYdV6aObmNPGD0aYLoEzaMJnTc0Ygs+YDw0GAtqxBjkuP38bMRWCHn73xNGjz75P73WenCEJnhwyVe3AEe8TtKdJcYhBl97wuhNAObK66lvD/9J9NS75v17wuitAN5fe4D31x7g/bUHeH/tAd5fe4D3AO+vPcD7aw/w/toDvL/2AO+vPcD7aw/w/toDvAd4f/24ABzZ8o+KLsSLS+Pv/TqTb3P4hKlQrTGh+fbIBT0Axqznnb+L/V2mb3HkN5Mb/nEHeK7d4IcDld6lmDW/iH9E+AH1MdOw/Jlu2T1xNmY98sv4wHnD7D3uNHu54WUuOsBTbQuvBsPT/UfzNxGYzwkP8c+Yz3C+r/i6DcyRL/rZ+utRwWH5PmfvcvYEt9jLDS/bg0/B64DWKrQM8AL8FPwS9beQCe6EMKNZYJol37jBMy35otdaz0Bw2H/C2Smc7+WGB0HWDELBmOByA3r5QONo4V+DpzR/hFS4U8wMW1PXNB4TOqYz9urxRV++ntWCw/U59Ty9ebdWbrgfRS9AYKKN63ZokZVygr8GZ/gfIhZXIXPsAlNjPOLBby5c1eOLvmQ9lwkOy5x6QV1j5TYqpS05JtUgUHUp5toHGsVfn4NX4RnMCe+AxTpwmApTYxqMxwfCeJGjpXzRF61nbcHhUBPqWze9svwcHJ+S6NPscKrEjug78Dx8Lj3T8D4YxGIdxmJcwhi34fzZUr7olevZCw5vkOhoClq5zBPZAnygD/Tl9EzDh6kl3VhsHYcDEb+hCtJSvuiV69kLDm+WycrOTArHmB5/VYyP6jOVjwgGawk2zQOaTcc1L+aLXrKeveDwZqlKrw8U9Y1p66uK8dEzdYwBeUQAY7DbyYNezBfdWQ97weEtAKYQg2xJIkuveAT3dYeLGH+ShrWNwZgN0b2YL7qznr3g8JYAo5bQBziPjx7BPZ0d9RCQp4UZbnFdzBddor4XHN4KYMrB2qHFRIzzcLAHQZ5the5ovui94PCWAPefaYnxIdzRwdHCbuR4B+tbiy96Lzi8E4D7z7S0mEPd+eqO3cT53Z0Y8SV80XvB4Z0ADJi/f7X113f+7p7/+UYBvur6657/+YYBvur6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+aYBvuL6657/+VMA8FXWX/f8z58OgK+y/rrnf75RgLna+uue//lTA/CV1V/3/M837aKvvv6653++UQvmauuve/7nTwfAV1N/3fM/fzr24Cuuv+75nz8FFnxl9dc9//MOr/8/glixwRuUfM4AAAAASUVORK5CYII="}getSearchTexture(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAhCAAAAABIXyLAAAAAOElEQVRIx2NgGAWjYBSMglEwEICREYRgFBZBqDCSLA2MGPUIVQETE9iNUAqLR5gIeoQKRgwXjwAAGn4AtaFeYLEAAAAASUVORK5CYII="}}t.SMAAPass=a},83752:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(51892),s=n(49284);class a extends i.Pass{constructor(e,t,n,a){super(),this.scene=e,this.camera=t,this.sampleLevel=4,this.unbiased=!0,this.clearColor=void 0!==n?n:0,this.clearAlpha=void 0!==a?a:0,this._oldClearColor=new r.Color;const o=s.CopyShader;this.copyUniforms=r.UniformsUtils.clone(o.uniforms),this.copyMaterial=new r.ShaderMaterial({uniforms:this.copyUniforms,vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,transparent:!0,depthTest:!1,depthWrite:!1,premultipliedAlpha:!0,blending:r.AdditiveBlending}),this.fsQuad=new i.FullScreenQuad(this.copyMaterial)}dispose(){this.sampleRenderTarget&&(this.sampleRenderTarget.dispose(),this.sampleRenderTarget=null),this.copyMaterial.dispose(),this.fsQuad.dispose()}setSize(e,t){this.sampleRenderTarget&&this.sampleRenderTarget.setSize(e,t)}render(e,t,n){this.sampleRenderTarget||(this.sampleRenderTarget=new r.WebGLRenderTarget(n.width,n.height,{type:r.HalfFloatType}),this.sampleRenderTarget.texture.name="SSAARenderPass.sample");const i=o[Math.max(0,Math.min(this.sampleLevel,5))],s=e.autoClear;e.autoClear=!1,e.getClearColor(this._oldClearColor);const a=e.getClearAlpha(),l=1/i.length;this.copyUniforms.tDiffuse.value=this.sampleRenderTarget.texture;const c={fullWidth:n.width,fullHeight:n.height,offsetX:0,offsetY:0,width:n.width,height:n.height},h=Object.assign({},this.camera.view);h.enabled&&Object.assign(c,h);for(let r=0;r{"use strict";var r=Object.defineProperty;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const i=n(48480),s=n(51892),a=n(59304),o=n(92504),l=n(49284),c=class extends s.Pass{constructor(e,t,n,r){super(),this.width=void 0!==n?n:512,this.height=void 0!==r?r:512,this.clear=!0,this.camera=t,this.scene=e,this.kernelRadius=8,this.kernelSize=32,this.kernel=[],this.noiseTexture=null,this.output=0,this.minDistance=.005,this.maxDistance=.1,this._visibilityCache=new Map,this.generateSampleKernel(),this.generateRandomKernelRotations();const a=new i.DepthTexture;a.format=i.DepthStencilFormat,a.type=i.UnsignedInt248Type,this.beautyRenderTarget=new i.WebGLRenderTarget(this.width,this.height),this.normalRenderTarget=new i.WebGLRenderTarget(this.width,this.height,{minFilter:i.NearestFilter,magFilter:i.NearestFilter,depthTexture:a}),this.ssaoRenderTarget=new i.WebGLRenderTarget(this.width,this.height),this.blurRenderTarget=this.ssaoRenderTarget.clone(),void 0===o.SSAOShader&&console.error("THREE.SSAOPass: The pass relies on SSAOShader."),this.ssaoMaterial=new i.ShaderMaterial({defines:Object.assign({},o.SSAOShader.defines),uniforms:i.UniformsUtils.clone(o.SSAOShader.uniforms),vertexShader:o.SSAOShader.vertexShader,fragmentShader:o.SSAOShader.fragmentShader,blending:i.NoBlending}),this.ssaoMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.ssaoMaterial.uniforms.tNormal.value=this.normalRenderTarget.texture,this.ssaoMaterial.uniforms.tDepth.value=this.normalRenderTarget.depthTexture,this.ssaoMaterial.uniforms.tNoise.value=this.noiseTexture,this.ssaoMaterial.uniforms.kernel.value=this.kernel,this.ssaoMaterial.uniforms.cameraNear.value=this.camera.near,this.ssaoMaterial.uniforms.cameraFar.value=this.camera.far,this.ssaoMaterial.uniforms.resolution.value.set(this.width,this.height),this.ssaoMaterial.uniforms.cameraProjectionMatrix.value.copy(this.camera.projectionMatrix),this.ssaoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.normalMaterial=new i.MeshNormalMaterial,this.normalMaterial.blending=i.NoBlending,this.blurMaterial=new i.ShaderMaterial({defines:Object.assign({},o.SSAOBlurShader.defines),uniforms:i.UniformsUtils.clone(o.SSAOBlurShader.uniforms),vertexShader:o.SSAOBlurShader.vertexShader,fragmentShader:o.SSAOBlurShader.fragmentShader}),this.blurMaterial.uniforms.tDiffuse.value=this.ssaoRenderTarget.texture,this.blurMaterial.uniforms.resolution.value.set(this.width,this.height),this.depthRenderMaterial=new i.ShaderMaterial({defines:Object.assign({},o.SSAODepthShader.defines),uniforms:i.UniformsUtils.clone(o.SSAODepthShader.uniforms),vertexShader:o.SSAODepthShader.vertexShader,fragmentShader:o.SSAODepthShader.fragmentShader,blending:i.NoBlending}),this.depthRenderMaterial.uniforms.tDepth.value=this.normalRenderTarget.depthTexture,this.depthRenderMaterial.uniforms.cameraNear.value=this.camera.near,this.depthRenderMaterial.uniforms.cameraFar.value=this.camera.far,this.copyMaterial=new i.ShaderMaterial({uniforms:i.UniformsUtils.clone(l.CopyShader.uniforms),vertexShader:l.CopyShader.vertexShader,fragmentShader:l.CopyShader.fragmentShader,transparent:!0,depthTest:!1,depthWrite:!1,blendSrc:i.DstColorFactor,blendDst:i.ZeroFactor,blendEquation:i.AddEquation,blendSrcAlpha:i.DstAlphaFactor,blendDstAlpha:i.ZeroFactor,blendEquationAlpha:i.AddEquation}),this.fsQuad=new s.FullScreenQuad(null),this.originalClearColor=new i.Color}dispose(){this.beautyRenderTarget.dispose(),this.normalRenderTarget.dispose(),this.ssaoRenderTarget.dispose(),this.blurRenderTarget.dispose(),this.normalMaterial.dispose(),this.blurMaterial.dispose(),this.copyMaterial.dispose(),this.depthRenderMaterial.dispose(),this.fsQuad.dispose()}render(e,t){switch(!1===e.capabilities.isWebGL2&&(this.noiseTexture.format=i.LuminanceFormat),e.setRenderTarget(this.beautyRenderTarget),e.clear(),e.render(this.scene,this.camera),this.overrideVisibility(),this.renderOverride(e,this.normalMaterial,this.normalRenderTarget,7829503,1),this.restoreVisibility(),this.ssaoMaterial.uniforms.kernelRadius.value=this.kernelRadius,this.ssaoMaterial.uniforms.minDistance.value=this.minDistance,this.ssaoMaterial.uniforms.maxDistance.value=this.maxDistance,this.renderPass(e,this.ssaoMaterial,this.ssaoRenderTarget),this.renderPass(e,this.blurMaterial,this.blurRenderTarget),this.output){case c.OUTPUT.SSAO:this.copyMaterial.uniforms.tDiffuse.value=this.ssaoRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;case c.OUTPUT.Blur:this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;case c.OUTPUT.Beauty:this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;case c.OUTPUT.Depth:this.renderPass(e,this.depthRenderMaterial,this.renderToScreen?null:t);break;case c.OUTPUT.Normal:this.copyMaterial.uniforms.tDiffuse.value=this.normalRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;case c.OUTPUT.Default:this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t),this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget.texture,this.copyMaterial.blending=i.CustomBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;default:console.warn("THREE.SSAOPass: Unknown output type.")}}renderPass(e,t,n,r,i){e.getClearColor(this.originalClearColor);const s=e.getClearAlpha(),a=e.autoClear;e.setRenderTarget(n),e.autoClear=!1,null!=r&&(e.setClearColor(r),e.setClearAlpha(i||0),e.clear()),this.fsQuad.material=t,this.fsQuad.render(e),e.autoClear=a,e.setClearColor(this.originalClearColor),e.setClearAlpha(s)}renderOverride(e,t,n,r,i){e.getClearColor(this.originalClearColor);const s=e.getClearAlpha(),a=e.autoClear;e.setRenderTarget(n),e.autoClear=!1,r=t.clearColor||r,i=t.clearAlpha||i,null!=r&&(e.setClearColor(r),e.setClearAlpha(i||0),e.clear()),this.scene.overrideMaterial=t,e.render(this.scene,this.camera),this.scene.overrideMaterial=null,e.autoClear=a,e.setClearColor(this.originalClearColor),e.setClearAlpha(s)}setSize(e,t){this.width=e,this.height=t,this.beautyRenderTarget.setSize(e,t),this.ssaoRenderTarget.setSize(e,t),this.normalRenderTarget.setSize(e,t),this.blurRenderTarget.setSize(e,t),this.ssaoMaterial.uniforms.resolution.value.set(e,t),this.ssaoMaterial.uniforms.cameraProjectionMatrix.value.copy(this.camera.projectionMatrix),this.ssaoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.blurMaterial.uniforms.resolution.value.set(e,t)}generateSampleKernel(){const e=this.kernelSize,t=this.kernel;for(let n=0;n{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(h,"symbol"!=typeof(u="OUTPUT")?u+"":u,{Default:0,SSAO:1,Blur:2,Beauty:3,Depth:4,Normal:5}),t.SSAOPass=h},73472:(e,t,n)=>{"use strict";var r=Object.defineProperty;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const i=n(48480),s=n(51892),a=n(98589),o=n(49284),l=class extends s.Pass{constructor({renderer:e,scene:t,camera:n,width:r,height:l,selects:c,bouncing:h=!1,groundReflector:u}){super(),this.width=void 0!==r?r:512,this.height=void 0!==l?l:512,this.clear=!0,this.renderer=e,this.scene=t,this.camera=n,this.groundReflector=u,this.opacity=a.SSRShader.uniforms.opacity.value,this.output=0,this.maxDistance=a.SSRShader.uniforms.maxDistance.value,this.thickness=a.SSRShader.uniforms.thickness.value,this.tempColor=new i.Color,this._selects=c,this.selective=Array.isArray(this._selects),Object.defineProperty(this,"selects",{get(){return this._selects},set(e){this._selects!==e&&(this._selects=e,Array.isArray(e)?(this.selective=!0,this.ssrMaterial.defines.SELECTIVE=!0,this.ssrMaterial.needsUpdate=!0):(this.selective=!1,this.ssrMaterial.defines.SELECTIVE=!1,this.ssrMaterial.needsUpdate=!0))}}),this._bouncing=h,Object.defineProperty(this,"bouncing",{get(){return this._bouncing},set(e){this._bouncing!==e&&(this._bouncing=e,this.ssrMaterial.uniforms.tDiffuse.value=e?this.prevRenderTarget.texture:this.beautyRenderTarget.texture)}}),this.blur=!0,this._distanceAttenuation=a.SSRShader.defines.DISTANCE_ATTENUATION,Object.defineProperty(this,"distanceAttenuation",{get(){return this._distanceAttenuation},set(e){this._distanceAttenuation!==e&&(this._distanceAttenuation=e,this.ssrMaterial.defines.DISTANCE_ATTENUATION=e,this.ssrMaterial.needsUpdate=!0)}}),this._fresnel=a.SSRShader.defines.FRESNEL,Object.defineProperty(this,"fresnel",{get(){return this._fresnel},set(e){this._fresnel!==e&&(this._fresnel=e,this.ssrMaterial.defines.FRESNEL=e,this.ssrMaterial.needsUpdate=!0)}}),this._infiniteThick=a.SSRShader.defines.INFINITE_THICK,Object.defineProperty(this,"infiniteThick",{get(){return this._infiniteThick},set(e){this._infiniteThick!==e&&(this._infiniteThick=e,this.ssrMaterial.defines.INFINITE_THICK=e,this.ssrMaterial.needsUpdate=!0)}});const d=new i.DepthTexture;d.type=i.UnsignedShortType,d.minFilter=i.NearestFilter,d.magFilter=i.NearestFilter,this.beautyRenderTarget=new i.WebGLRenderTarget(this.width,this.height,{minFilter:i.NearestFilter,magFilter:i.NearestFilter,type:i.HalfFloatType,depthTexture:d,depthBuffer:!0}),this.prevRenderTarget=new i.WebGLRenderTarget(this.width,this.height,{minFilter:i.NearestFilter,magFilter:i.NearestFilter}),this.normalRenderTarget=new i.WebGLRenderTarget(this.width,this.height,{minFilter:i.NearestFilter,magFilter:i.NearestFilter,type:i.HalfFloatType}),this.metalnessRenderTarget=new i.WebGLRenderTarget(this.width,this.height,{minFilter:i.NearestFilter,magFilter:i.NearestFilter,type:i.HalfFloatType}),this.ssrRenderTarget=new i.WebGLRenderTarget(this.width,this.height,{minFilter:i.NearestFilter,magFilter:i.NearestFilter}),this.blurRenderTarget=this.ssrRenderTarget.clone(),this.blurRenderTarget2=this.ssrRenderTarget.clone(),this.ssrMaterial=new i.ShaderMaterial({defines:Object.assign({},a.SSRShader.defines,{MAX_STEP:Math.sqrt(this.width*this.width+this.height*this.height)}),uniforms:i.UniformsUtils.clone(a.SSRShader.uniforms),vertexShader:a.SSRShader.vertexShader,fragmentShader:a.SSRShader.fragmentShader,blending:i.NoBlending}),this.ssrMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.ssrMaterial.uniforms.tNormal.value=this.normalRenderTarget.texture,this.ssrMaterial.defines.SELECTIVE=this.selective,this.ssrMaterial.needsUpdate=!0,this.ssrMaterial.uniforms.tMetalness.value=this.metalnessRenderTarget.texture,this.ssrMaterial.uniforms.tDepth.value=this.beautyRenderTarget.depthTexture,this.ssrMaterial.uniforms.cameraNear.value=this.camera.near,this.ssrMaterial.uniforms.cameraFar.value=this.camera.far,this.ssrMaterial.uniforms.thickness.value=this.thickness,this.ssrMaterial.uniforms.resolution.value.set(this.width,this.height),this.ssrMaterial.uniforms.cameraProjectionMatrix.value.copy(this.camera.projectionMatrix),this.ssrMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.normalMaterial=new i.MeshNormalMaterial,this.normalMaterial.blending=i.NoBlending,this.metalnessOnMaterial=new i.MeshBasicMaterial({color:"white"}),this.metalnessOffMaterial=new i.MeshBasicMaterial({color:"black"}),this.blurMaterial=new i.ShaderMaterial({defines:Object.assign({},a.SSRBlurShader.defines),uniforms:i.UniformsUtils.clone(a.SSRBlurShader.uniforms),vertexShader:a.SSRBlurShader.vertexShader,fragmentShader:a.SSRBlurShader.fragmentShader}),this.blurMaterial.uniforms.tDiffuse.value=this.ssrRenderTarget.texture,this.blurMaterial.uniforms.resolution.value.set(this.width,this.height),this.blurMaterial2=new i.ShaderMaterial({defines:Object.assign({},a.SSRBlurShader.defines),uniforms:i.UniformsUtils.clone(a.SSRBlurShader.uniforms),vertexShader:a.SSRBlurShader.vertexShader,fragmentShader:a.SSRBlurShader.fragmentShader}),this.blurMaterial2.uniforms.tDiffuse.value=this.blurRenderTarget.texture,this.blurMaterial2.uniforms.resolution.value.set(this.width,this.height),this.depthRenderMaterial=new i.ShaderMaterial({defines:Object.assign({},a.SSRDepthShader.defines),uniforms:i.UniformsUtils.clone(a.SSRDepthShader.uniforms),vertexShader:a.SSRDepthShader.vertexShader,fragmentShader:a.SSRDepthShader.fragmentShader,blending:i.NoBlending}),this.depthRenderMaterial.uniforms.tDepth.value=this.beautyRenderTarget.depthTexture,this.depthRenderMaterial.uniforms.cameraNear.value=this.camera.near,this.depthRenderMaterial.uniforms.cameraFar.value=this.camera.far,this.copyMaterial=new i.ShaderMaterial({uniforms:i.UniformsUtils.clone(o.CopyShader.uniforms),vertexShader:o.CopyShader.vertexShader,fragmentShader:o.CopyShader.fragmentShader,transparent:!0,depthTest:!1,depthWrite:!1,blendSrc:i.SrcAlphaFactor,blendDst:i.OneMinusSrcAlphaFactor,blendEquation:i.AddEquation,blendSrcAlpha:i.SrcAlphaFactor,blendDstAlpha:i.OneMinusSrcAlphaFactor,blendEquationAlpha:i.AddEquation}),this.fsQuad=new s.FullScreenQuad(null),this.originalClearColor=new i.Color}dispose(){this.beautyRenderTarget.dispose(),this.prevRenderTarget.dispose(),this.normalRenderTarget.dispose(),this.metalnessRenderTarget.dispose(),this.ssrRenderTarget.dispose(),this.blurRenderTarget.dispose(),this.blurRenderTarget2.dispose(),this.normalMaterial.dispose(),this.metalnessOnMaterial.dispose(),this.metalnessOffMaterial.dispose(),this.blurMaterial.dispose(),this.blurMaterial2.dispose(),this.copyMaterial.dispose(),this.depthRenderMaterial.dispose(),this.fsQuad.dispose()}render(e,t){switch(e.setRenderTarget(this.beautyRenderTarget),e.clear(),this.groundReflector&&(this.groundReflector.visible=!1,this.groundReflector.doRender(this.renderer,this.scene,this.camera),this.groundReflector.visible=!0),e.render(this.scene,this.camera),this.groundReflector&&(this.groundReflector.visible=!1),this.renderOverride(e,this.normalMaterial,this.normalRenderTarget,0,0),this.selective&&this.renderMetalness(e,this.metalnessOnMaterial,this.metalnessRenderTarget,0,0),this.ssrMaterial.uniforms.opacity.value=this.opacity,this.ssrMaterial.uniforms.maxDistance.value=this.maxDistance,this.ssrMaterial.uniforms.thickness.value=this.thickness,this.renderPass(e,this.ssrMaterial,this.ssrRenderTarget),this.blur&&(this.renderPass(e,this.blurMaterial,this.blurRenderTarget),this.renderPass(e,this.blurMaterial2,this.blurRenderTarget2)),this.output){case l.OUTPUT.Default:this.bouncing?(this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.prevRenderTarget),this.blur?this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget2.texture:this.copyMaterial.uniforms.tDiffuse.value=this.ssrRenderTarget.texture,this.copyMaterial.blending=i.NormalBlending,this.renderPass(e,this.copyMaterial,this.prevRenderTarget),this.copyMaterial.uniforms.tDiffuse.value=this.prevRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t)):(this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t),this.blur?this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget2.texture:this.copyMaterial.uniforms.tDiffuse.value=this.ssrRenderTarget.texture,this.copyMaterial.blending=i.NormalBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t));break;case l.OUTPUT.SSR:this.blur?this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget2.texture:this.copyMaterial.uniforms.tDiffuse.value=this.ssrRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t),this.bouncing&&(this.blur?this.copyMaterial.uniforms.tDiffuse.value=this.blurRenderTarget2.texture:this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.prevRenderTarget),this.copyMaterial.uniforms.tDiffuse.value=this.ssrRenderTarget.texture,this.copyMaterial.blending=i.NormalBlending,this.renderPass(e,this.copyMaterial,this.prevRenderTarget));break;case l.OUTPUT.Beauty:this.copyMaterial.uniforms.tDiffuse.value=this.beautyRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;case l.OUTPUT.Depth:this.renderPass(e,this.depthRenderMaterial,this.renderToScreen?null:t);break;case l.OUTPUT.Normal:this.copyMaterial.uniforms.tDiffuse.value=this.normalRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;case l.OUTPUT.Metalness:this.copyMaterial.uniforms.tDiffuse.value=this.metalnessRenderTarget.texture,this.copyMaterial.blending=i.NoBlending,this.renderPass(e,this.copyMaterial,this.renderToScreen?null:t);break;default:console.warn("THREE.SSRPass: Unknown output type.")}}renderPass(e,t,n,r,i){this.originalClearColor.copy(e.getClearColor(this.tempColor));const s=e.getClearAlpha(this.tempColor),a=e.autoClear;e.setRenderTarget(n),e.autoClear=!1,null!=r&&(e.setClearColor(r),e.setClearAlpha(i||0),e.clear()),this.fsQuad.material=t,this.fsQuad.render(e),e.autoClear=a,e.setClearColor(this.originalClearColor),e.setClearAlpha(s)}renderOverride(e,t,n,r,i){this.originalClearColor.copy(e.getClearColor(this.tempColor));const s=e.getClearAlpha(this.tempColor),a=e.autoClear;e.setRenderTarget(n),e.autoClear=!1,r=t.clearColor||r,i=t.clearAlpha||i,null!=r&&(e.setClearColor(r),e.setClearAlpha(i||0),e.clear()),this.scene.overrideMaterial=t,e.render(this.scene,this.camera),this.scene.overrideMaterial=null,e.autoClear=a,e.setClearColor(this.originalClearColor),e.setClearAlpha(s)}renderMetalness(e,t,n,r,i){this.originalClearColor.copy(e.getClearColor(this.tempColor));const s=e.getClearAlpha(this.tempColor),a=e.autoClear;e.setRenderTarget(n),e.autoClear=!1,r=t.clearColor||r,i=t.clearAlpha||i,null!=r&&(e.setClearColor(r),e.setClearAlpha(i||0),e.clear()),this.scene.traverseVisible((e=>{e._SSRPassBackupMaterial=e.material,this._selects.includes(e)?e.material=this.metalnessOnMaterial:e.material=this.metalnessOffMaterial})),e.render(this.scene,this.camera),this.scene.traverseVisible((e=>{e.material=e._SSRPassBackupMaterial})),e.autoClear=a,e.setClearColor(this.originalClearColor),e.setClearAlpha(s)}setSize(e,t){this.width=e,this.height=t,this.ssrMaterial.defines.MAX_STEP=Math.sqrt(e*e+t*t),this.ssrMaterial.needsUpdate=!0,this.beautyRenderTarget.setSize(e,t),this.prevRenderTarget.setSize(e,t),this.ssrRenderTarget.setSize(e,t),this.normalRenderTarget.setSize(e,t),this.metalnessRenderTarget.setSize(e,t),this.blurRenderTarget.setSize(e,t),this.blurRenderTarget2.setSize(e,t),this.ssrMaterial.uniforms.resolution.value.set(e,t),this.ssrMaterial.uniforms.cameraProjectionMatrix.value.copy(this.camera.projectionMatrix),this.ssrMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse),this.blurMaterial.uniforms.resolution.value.set(e,t),this.blurMaterial2.uniforms.resolution.value.set(e,t)}};let c=l;var h;((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(c,"symbol"!=typeof(h="OUTPUT")?h+"":h,{Default:0,SSR:1,Beauty:3,Depth:4,Normal:5,Metalness:7}),t.SSRPass=c},32472:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(51892),s=n(49284);class a extends i.Pass{constructor(e){super(),void 0===s.CopyShader&&console.error("THREE.SavePass relies on CopyShader");const t=s.CopyShader;this.textureID="tDiffuse",this.uniforms=r.UniformsUtils.clone(t.uniforms),this.material=new r.ShaderMaterial({uniforms:this.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,blending:r.NoBlending}),this.renderTarget=e,void 0===this.renderTarget&&(this.renderTarget=new r.WebGLRenderTarget(window.innerWidth,window.innerHeight),this.renderTarget.texture.name="SavePass.rt"),this.needsSwap=!1,this.fsQuad=new i.FullScreenQuad(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),e.setRenderTarget(this.renderTarget),this.clear&&e.clear(),this.fsQuad.render(e)}}t.SavePass=a},72412:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(51892);class o extends a.Pass{constructor(e,t="tDiffuse"){super(),i(this,"textureID"),i(this,"uniforms"),i(this,"material"),i(this,"fsQuad"),this.textureID=t,e instanceof s.ShaderMaterial?(this.uniforms=e.uniforms,this.material=e):(this.uniforms=s.UniformsUtils.clone(e.uniforms),this.material=new s.ShaderMaterial({defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new a.FullScreenQuad(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}}t.ShaderPass=o},29624:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(83752);class s extends i.SSAARenderPass{constructor(e,t,n,r){super(e,t,n,r),this.sampleLevel=0,this.accumulate=!1,this.accumulateIndex=-1}render(e,t,n,i){if(!1===this.accumulate)return super.render(e,t,n,i),void(this.accumulateIndex=-1);const s=a[5];void 0===this.sampleRenderTarget&&(this.sampleRenderTarget=new r.WebGLRenderTarget(n.width,n.height,{type:r.HalfFloatType}),this.sampleRenderTarget.texture.name="TAARenderPass.sample"),void 0===this.holdRenderTarget&&(this.holdRenderTarget=new r.WebGLRenderTarget(n.width,n.height,{type:r.HalfFloatType}),this.holdRenderTarget.texture.name="TAARenderPass.hold"),-1===this.accumulateIndex&&(super.render(e,this.holdRenderTarget,n,i),this.accumulateIndex=0);const o=e.autoClear;e.autoClear=!1,e.getClearColor(this._oldClearColor);const l=e.getClearAlpha(),c=1/s.length;if(this.accumulateIndex>=0&&this.accumulateIndex=s.length)break}this.camera.clearViewOffset&&this.camera.clearViewOffset()}e.setClearColor(this.clearColor,this.clearAlpha);const h=this.accumulateIndex*c;h>0&&(this.copyUniforms.opacity.value=1,this.copyUniforms.tDiffuse.value=this.sampleRenderTarget.texture,e.setRenderTarget(t),e.clear(),this.fsQuad.render(e)),h<1&&(this.copyUniforms.opacity.value=1-h,this.copyUniforms.tDiffuse.value=this.holdRenderTarget.texture,e.setRenderTarget(t),this.fsQuad.render(e)),e.autoClear=o,e.setClearColor(this._oldClearColor,l)}dispose(){super.dispose(),void 0!==this.sampleRenderTarget&&this.sampleRenderTarget.dispose(),void 0!==this.holdRenderTarget&&this.holdRenderTarget.dispose()}}const a=[[[0,0]],[[4,4],[-4,-4]],[[-2,-6],[6,-2],[-6,2],[2,6]],[[1,-3],[-1,3],[5,1],[-3,-5],[-5,5],[-7,-1],[3,7],[7,-7]],[[1,1],[-1,-3],[-3,2],[4,-1],[-5,-2],[2,5],[5,3],[3,-5],[-2,6],[0,-7],[-4,-6],[-6,4],[-8,0],[7,-4],[6,7],[-7,-8]],[[-4,-7],[-7,-5],[-3,-5],[-5,-4],[-1,-4],[-2,-2],[-6,-1],[-4,0],[-7,1],[-1,2],[-6,3],[-3,3],[-7,6],[-3,6],[-5,7],[-1,7],[5,-7],[1,-6],[6,-5],[4,-4],[2,-3],[7,-2],[1,-1],[4,-1],[2,1],[6,2],[0,4],[4,4],[2,5],[7,5],[5,6],[3,7]]];t.TAARenderPass=s},9272:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(51892),s=n(49284);class a extends i.Pass{constructor(e,t){super();const n=s.CopyShader;this.map=e,this.opacity=void 0!==t?t:1,this.uniforms=r.UniformsUtils.clone(n.uniforms),this.material=new r.ShaderMaterial({uniforms:this.uniforms,vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,depthTest:!1,depthWrite:!1,premultipliedAlpha:!0}),this.needsSwap=!1,this.fsQuad=new i.FullScreenQuad(null)}render(e,t,n){const r=e.autoClear;e.autoClear=!1,this.fsQuad.material=this.material,this.uniforms.opacity.value=this.opacity,this.uniforms.tDiffuse.value=this.map,this.material.transparent=this.opacity<1,e.setRenderTarget(this.renderToScreen?null:n),this.clear&&e.clear(),this.fsQuad.render(e),e.autoClear=r}dispose(){this.material.dispose(),this.fsQuad.dispose()}}t.TexturePass=a},69469:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(51892),o=n(49284),l=n(86716),c=class extends a.Pass{constructor(e,t,n,r){super(),this.strength=void 0!==t?t:1,this.radius=n,this.threshold=r,this.resolution=void 0!==e?new s.Vector2(e.x,e.y):new s.Vector2(256,256),this.clearColor=new s.Color(0,0,0),this.renderTargetsHorizontal=[],this.renderTargetsVertical=[],this.nMips=5;let i=Math.round(this.resolution.x/2),c=Math.round(this.resolution.y/2);this.renderTargetBright=new s.WebGLRenderTarget(i,c,{type:s.HalfFloatType}),this.renderTargetBright.texture.name="UnrealBloomPass.bright",this.renderTargetBright.texture.generateMipmaps=!1;for(let a=0;a\n\t\t\t\tvarying vec2 vUv;\n\t\t\t\tuniform sampler2D colorTexture;\n\t\t\t\tuniform vec2 texSize;\n\t\t\t\tuniform vec2 direction;\n\n\t\t\t\tfloat gaussianPdf(in float x, in float sigma) {\n\t\t\t\t\treturn 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\n\t\t\t\t}\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 invSize = 1.0 / texSize;\n\t\t\t\t\tfloat fSigma = float(SIGMA);\n\t\t\t\t\tfloat weightSum = gaussianPdf(0.0, fSigma);\n\t\t\t\t\tvec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum;\n\t\t\t\t\tfor( int i = 1; i < KERNEL_RADIUS; i ++ ) {\n\t\t\t\t\t\tfloat x = float(i);\n\t\t\t\t\t\tfloat w = gaussianPdf(x, fSigma);\n\t\t\t\t\t\tvec2 uvOffset = direction * invSize * x;\n\t\t\t\t\t\tvec3 sample1 = texture2D( colorTexture, vUv + uvOffset).rgb;\n\t\t\t\t\t\tvec3 sample2 = texture2D( colorTexture, vUv - uvOffset).rgb;\n\t\t\t\t\t\tdiffuseSum += (sample1 + sample2) * w;\n\t\t\t\t\t\tweightSum += 2.0 * w;\n\t\t\t\t\t}\n\t\t\t\t\tgl_FragColor = vec4(diffuseSum/weightSum, 1.0);\n\t\t\t\t}"})}getCompositeMaterial(e){return new s.ShaderMaterial({defines:{NUM_MIPS:e},uniforms:{blurTexture1:{value:null},blurTexture2:{value:null},blurTexture3:{value:null},blurTexture4:{value:null},blurTexture5:{value:null},bloomStrength:{value:1},bloomFactors:{value:null},bloomTintColors:{value:null},bloomRadius:{value:0}},vertexShader:"varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",fragmentShader:"varying vec2 vUv;\n\t\t\t\tuniform sampler2D blurTexture1;\n\t\t\t\tuniform sampler2D blurTexture2;\n\t\t\t\tuniform sampler2D blurTexture3;\n\t\t\t\tuniform sampler2D blurTexture4;\n\t\t\t\tuniform sampler2D blurTexture5;\n\t\t\t\tuniform float bloomStrength;\n\t\t\t\tuniform float bloomRadius;\n\t\t\t\tuniform float bloomFactors[NUM_MIPS];\n\t\t\t\tuniform vec3 bloomTintColors[NUM_MIPS];\n\n\t\t\t\tfloat lerpBloomFactor(const in float factor) {\n\t\t\t\t\tfloat mirrorFactor = 1.2 - factor;\n\t\t\t\t\treturn mix(factor, mirrorFactor, bloomRadius);\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tgl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );\n\t\t\t\t}"})}};let h=c;i(h,"BlurDirectionX",new s.Vector2(1,0)),i(h,"BlurDirectionY",new s.Vector2(0,1)),t.UnrealBloomPass=h},51680:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(51892);class o extends a.Pass{constructor(){super(),i(this,"material"),i(this,"fsQuad"),i(this,"factor"),i(this,"time"),i(this,"uniforms"),this.uniforms={tex:{value:null},time:{value:0},factor:{value:0},resolution:{value:new s.Vector2(64,64)}},this.material=new s.ShaderMaterial({uniforms:this.uniforms,vertexShader:"\n varying vec2 vUv;\n void main(){ \n vUv = uv; \n vec4 modelViewPosition = modelViewMatrix * vec4(position, 1.0);\n gl_Position = projectionMatrix * modelViewPosition;\n }",fragmentShader:"\n uniform float time;\n uniform float factor;\n uniform vec2 resolution;\n uniform sampler2D tex;\n varying vec2 vUv;\n void main() { \n vec2 uv1 = vUv;\n vec2 uv = gl_FragCoord.xy/resolution.xy;\n float frequency = 6.0 * factor;\n float amplitude = 0.015 * factor;\n float x = uv1.y * frequency + time * .7; \n float y = uv1.x * frequency + time * .3;\n uv1.x += cos(x+y) * amplitude * cos(y);\n uv1.y += sin(x-y) * amplitude * cos(y);\n vec4 rgba = texture2D(tex, uv1);\n gl_FragColor = rgba;\n }"}),this.fsQuad=new a.FullScreenQuad(this.material),this.factor=0,this.time=0}render(e,t,n){this.uniforms.tex.value=n.texture,this.uniforms.time.value=this.time,this.uniforms.factor.value=this.factor,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(),this.fsQuad.render(e))}}t.WaterPass=o},18688:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i extends r.Object3D{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.center=new r.Vector2(.5,.5),this.addEventListener("removed",(function(){this.traverse((function(e){e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this.center=e.center,this}}const s=new r.Vector3,a=new r.Matrix4,o=new r.Matrix4,l=new r.Vector3,c=new r.Vector3;t.CSS2DObject=i,t.CSS2DRenderer=class{constructor(e={}){const t=this;let n,r,i,h;const u={objects:new WeakMap},d=void 0!==e.element?e.element:document.createElement("div");function p(e,n,r){if(e.isCSS2DObject){s.setFromMatrixPosition(e.matrixWorld),s.applyMatrix4(o);const a=!0===e.visible&&s.z>=-1&&s.z<=1&&!0===e.layers.test(r.layers);if(e.element.style.display=!0===a?"":"none",!0===a){e.onBeforeRender(t,n,r);const a=e.element;a.style.transform="translate("+-100*e.center.x+"%,"+-100*e.center.y+"%)translate("+(s.x*i+i)+"px,"+(-s.y*h+h)+"px)",a.parentNode!==d&&d.appendChild(a),e.onAfterRender(t,n,r)}const l={distanceToCameraSquared:f(r,e)};u.objects.set(e,l)}for(let t=0,i=e.children.length;t{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Vector3,s=new r.Quaternion,a=new r.Vector3;class o extends r.Object3D{constructor(e=document.createElement("div")){super(),this.isCSS3DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.addEventListener("removed",(function(){this.traverse((function(e){e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}const l=new r.Matrix4,c=new r.Matrix4;t.CSS3DObject=o,t.CSS3DRenderer=class{constructor(e={}){const t=this;let n,r,o,h;const u={camera:{style:""},objects:new WeakMap},d=void 0!==e.element?e.element:document.createElement("div");d.style.overflow="hidden",this.domElement=d;const p=document.createElement("div");p.style.transformOrigin="0 0",p.style.pointerEvents="none",d.appendChild(p);const f=document.createElement("div");function m(e){return Math.abs(e)<1e-10?0:e}function g(e){const t=e.elements;return"matrix3d("+m(t[0])+","+m(-t[1])+","+m(t[2])+","+m(t[3])+","+m(t[4])+","+m(-t[5])+","+m(t[6])+","+m(t[7])+","+m(t[8])+","+m(-t[9])+","+m(t[10])+","+m(t[11])+","+m(t[12])+","+m(-t[13])+","+m(t[14])+","+m(t[15])+")"}function A(e){const t=e.elements;return"translate(-50%,-50%)"+("matrix3d("+m(t[0])+","+m(t[1])+","+m(t[2])+","+m(t[3])+","+m(-t[4])+","+m(-t[5])+","+m(-t[6])+","+m(-t[7])+","+m(t[8])+","+m(t[9])+","+m(t[10])+","+m(t[11])+","+m(t[12])+","+m(t[13])+","+m(t[14])+","+m(t[15])+")")}function v(e,n,r,o){if(e.isCSS3DObject){const o=!0===e.visible&&!0===e.layers.test(r.layers);if(e.element.style.display=!0===o?"":"none",!0===o){let o;e.onBeforeRender(t,n,r),e.isCSS3DSprite?(l.copy(r.matrixWorldInverse),l.transpose(),0!==e.rotation2D&&l.multiply(c.makeRotationZ(e.rotation2D)),e.matrixWorld.decompose(i,s,a),l.setPosition(i),l.scale(a),l.elements[3]=0,l.elements[7]=0,l.elements[11]=0,l.elements[15]=1,o=A(l)):o=A(e.matrixWorld);const h=e.element,d=u.objects.get(e);if(void 0===d||d.style!==o){h.style.transform=o;const t={style:o};u.objects.set(e,t)}h.parentNode!==f&&f.appendChild(h),e.onAfterRender(t,n,r)}}for(let t=0,i=e.children.length;t{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i{constructor(){this.id=0,this.object=null,this.z=0,this.renderOrder=0}}class s{constructor(){this.id=0,this.v1=new a,this.v2=new a,this.v3=new a,this.normalModel=new r.Vector3,this.vertexNormalsModel=[new r.Vector3,new r.Vector3,new r.Vector3],this.vertexNormalsLength=0,this.color=new r.Color,this.material=null,this.uvs=[new r.Vector2,new r.Vector2,new r.Vector2],this.z=0,this.renderOrder=0}}class a{constructor(){this.position=new r.Vector3,this.positionWorld=new r.Vector3,this.positionScreen=new r.Vector4,this.visible=!0}copy(e){this.positionWorld.copy(e.positionWorld),this.positionScreen.copy(e.positionScreen)}}class o{constructor(){this.id=0,this.v1=new a,this.v2=new a,this.vertexColors=[new r.Color,new r.Color],this.material=null,this.z=0,this.renderOrder=0}}class l{constructor(){this.id=0,this.object=null,this.x=0,this.y=0,this.z=0,this.rotation=0,this.scale=new r.Vector2,this.material=null,this.renderOrder=0}}t.Projector=class{constructor(){let e,t,n,c,h,u,d,p,f,m,g,A=0,v=0,y=0,x=0,b=0;const E={objects:[],lights:[],elements:[]},_=new r.Vector3,S=new r.Vector4,M=new r.Box3(new r.Vector3(-1,-1,-1),new r.Vector3(1,1,1)),w=new r.Box3,C=new Array(3),T=new r.Matrix4,I=new r.Matrix4,B=new r.Matrix4,R=new r.Frustum,P=[],D=[],L=[],F=[],U=[];const O=new function(){const e=[],t=[],i=[];let l=null;const f=new r.Matrix3;function m(e){const t=e.position,n=e.positionWorld,r=e.positionScreen;n.copy(t).applyMatrix4(g),r.copy(n).applyMatrix4(I);const i=1/r.w;r.x*=i,r.y*=i,r.z*=i,e.visible=r.x>=-1&&r.x<=1&&r.y>=-1&&r.y<=1&&r.z>=-1&&r.z<=1}function A(e,t,n){return!0===e.visible||!0===t.visible||!0===n.visible||(C[0]=e.positionScreen,C[1]=t.positionScreen,C[2]=n.positionScreen,M.intersectsBox(w.setFromPoints(C)))}function b(e,t,n){return(n.positionScreen.x-e.positionScreen.x)*(t.positionScreen.y-e.positionScreen.y)-(n.positionScreen.y-e.positionScreen.y)*(t.positionScreen.x-e.positionScreen.x)<0}return{setObject:function(n){l=n,f.getNormalMatrix(l.matrixWorld),e.length=0,t.length=0,i.length=0},projectVertex:m,checkTriangleVisibility:A,checkBackfaceCulling:b,pushVertex:function(e,t,r){n=function(){if(c===v){const e=new a;return D.push(e),v++,c++,e}return D[c++]}(),n.position.set(e,t,r),m(n)},pushNormal:function(t,n,r){e.push(t,n,r)},pushColor:function(e,n,r){t.push(e,n,r)},pushUv:function(e,t){i.push(e,t)},pushLine:function(e,n){const r=D[e],i=D[n];r.positionScreen.copy(r.position).applyMatrix4(B),i.positionScreen.copy(i.position).applyMatrix4(B),!0===function(e,t){let n=0,r=1;const i=e.z+e.w,s=t.z+t.w,a=-e.z+e.w,o=-t.z+t.w;return i>=0&&s>=0&&a>=0&&o>=0||!(i<0&&s<0||a<0&&o<0)&&(i<0?n=Math.max(n,i/(i-s)):s<0&&(r=Math.min(r,i/(i-s))),a<0?n=Math.max(n,a/(a-o)):o<0&&(r=Math.min(r,a/(a-o))),!(r=-1&&e.z<=1&&(f=function(){if(m===b){const e=new l;return U.push(e),b++,m++,e}return U[m++]}(),f.id=t.id,f.x=e.x*r,f.y=e.y*r,f.z=e.z,f.renderOrder=t.renderOrder,f.object=t,f.rotation=t.rotation,f.scale.x=t.scale.x*Math.abs(f.x-(e.x+n.projectionMatrix.elements[0])/(e.w+n.projectionMatrix.elements[12])),f.scale.y=t.scale.y*Math.abs(f.y-(e.y+n.projectionMatrix.elements[5])/(e.w+n.projectionMatrix.elements[13])),f.material=t.material,E.elements.push(f))}function z(e,t){return e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id!==t.id?e.id-t.id:0}this.projectScene=function(e,n,r,i){u=0,p=0,m=0,E.elements.length=0,!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===n.parent&&!0===n.matrixWorldAutoUpdate&&n.updateMatrixWorld(),T.copy(n.matrixWorldInverse),I.multiplyMatrices(n.projectionMatrix,T),R.setFromProjectionMatrix(I),t=0,E.objects.length=0,E.lights.length=0,N(e),!0===r&&E.objects.sort(z);const s=E.objects;for(let t=0,a=s.length;t0)for(let r=0;r0)for(let r=0;r{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(57964);class s extends r.Object3D{constructor(e){super(),this.isSVGObject=!0,this.node=e}}t.SVGObject=s,t.SVGRenderer=class{constructor(){let e,t,n,s,a,o,l,c,h,u,d,p,f,m=0,g=null,A=1;const v=this,y=new r.Box2,x=new r.Box2,b=new r.Color,E=new r.Color,_=new r.Color,S=new r.Color,M=new r.Color,w=new r.Color,C=new r.Vector3,T=new r.Vector3,I=new r.Vector3,B=new r.Matrix3,R=new r.Matrix4,P=new r.Matrix4,D=[],L=new i.Projector,F=document.createElementNS("http://www.w3.org/2000/svg","svg");function U(){for(m=0;F.childNodes.length>0;)F.removeChild(F.childNodes[0])}function O(e){return null!==g?e.toFixed(g):e}function N(e,t,n){let r=t.scale.x*o,i=t.scale.y*l;n.isPointsMaterial&&(r*=n.size,i*=n.size);const s="M"+O(e.x-.5*r)+","+O(e.y-.5*i)+"h"+O(r)+"v"+O(i)+"h"+O(-r)+"z";let a="";(n.isSpriteMaterial||n.isPointsMaterial)&&(a="fill:"+n.color.getStyle()+";fill-opacity:"+n.opacity),Q(a,s)}function k(e,t,n){const r="M"+O(e.positionScreen.x)+","+O(e.positionScreen.y)+"L"+O(t.positionScreen.x)+","+O(t.positionScreen.y);if(n.isLineBasicMaterial){let e="fill:none;stroke:"+n.color.getStyle()+";stroke-opacity:"+n.opacity+";stroke-width:"+n.linewidth+";stroke-linecap:"+n.linecap;n.isLineDashedMaterial&&(e=e+";stroke-dasharray:"+n.dashSize+","+n.gapSize),Q(e,r)}}function G(e,t,r,i,s){v.info.render.vertices+=3,v.info.render.faces++;const a="M"+O(e.positionScreen.x)+","+O(e.positionScreen.y)+"L"+O(t.positionScreen.x)+","+O(t.positionScreen.y)+"L"+O(r.positionScreen.x)+","+O(r.positionScreen.y)+"z";let o="";s.isMeshBasicMaterial?(b.copy(s.color),s.vertexColors&&b.multiply(i.color)):s.isMeshLambertMaterial||s.isMeshPhongMaterial||s.isMeshStandardMaterial?(E.copy(s.color),s.vertexColors&&E.multiply(i.color),b.copy(_),T.copy(e.positionWorld).add(t.positionWorld).add(r.positionWorld).divideScalar(3),function(e,t,n,r){for(let i=0,s=e.length;i1)continue;if(h.positionScreen.z<-1||h.positionScreen.z>1)continue;if(u.positionScreen.z<-1||u.positionScreen.z>1)continue;c.positionScreen.x*=o,c.positionScreen.y*=-l,h.positionScreen.x*=o,h.positionScreen.y*=-l,u.positionScreen.x*=o,u.positionScreen.y*=-l,this.overdraw>0&&(z(c.positionScreen,h.positionScreen,this.overdraw),z(h.positionScreen,u.positionScreen,this.overdraw),z(u.positionScreen,c.positionScreen,this.overdraw)),x.setFromPoints([c.positionScreen,h.positionScreen,u.positionScreen]),!0===y.intersectsBox(x)&&G(c,h,u,n,r)}}V(),s.traverseVisible((function(e){if(e.isSVGObject){if(C.setFromMatrixPosition(e.matrixWorld),C.applyMatrix4(P),C.z<-1||C.z>1)return;const t=C.x*o,n=-C.y*l,r=e.node;r.setAttribute("transform","translate("+t+","+n+")"),F.appendChild(r)}}))}}}},18451:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},exposure:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#define saturate(a) clamp( a, 0.0, 1.0 )","uniform sampler2D tDiffuse;","uniform float exposure;","varying vec2 vUv;","vec3 RRTAndODTFit( vec3 v ) {","\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;","\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;","\treturn a / b;","}","vec3 ACESFilmicToneMapping( vec3 color ) {","\tconst mat3 ACESInputMat = mat3(","\t\tvec3( 0.59719, 0.07600, 0.02840 ),","\t\tvec3( 0.35458, 0.90834, 0.13383 ),","\t\tvec3( 0.04823, 0.01566, 0.83777 )","\t);","\tconst mat3 ACESOutputMat = mat3(","\t\tvec3( 1.60475, -0.10208, -0.00327 ),","\t\tvec3( -0.53108, 1.10813, -0.07276 ),","\t\tvec3( -0.07367, -0.00605, 1.07602 )","\t);","\tcolor = ACESInputMat * color;","\tcolor = RRTAndODTFit( color );","\tcolor = ACESOutputMat * color;","\treturn saturate( color );","}","void main() {","\tvec4 tex = texture2D( tDiffuse, vUv );","\ttex.rgb *= exposure / 0.6;","\tgl_FragColor = vec4( ACESFilmicToneMapping( tex.rgb ), tex.a );","}"].join("\n")};t.ACESFilmicToneMappingShader=n},58240:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{damp:{value:.96},tOld:{value:null},tNew:{value:null}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float damp;","uniform sampler2D tOld;","uniform sampler2D tNew;","varying vec2 vUv;","vec4 when_gt( vec4 x, float y ) {","\treturn max( sign( x - y ), 0.0 );","}","void main() {","\tvec4 texelOld = texture2D( tOld, vUv );","\tvec4 texelNew = texture2D( tNew, vUv );","\ttexelOld *= damp * when_gt( texelOld, 0.1 );","\tgl_FragColor = max(texelNew, texelOld);","}"].join("\n")};t.AfterimageShader=n},12520:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{},vertexShader:["void main() {","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["void main() {","\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );","}"].join("\n")};t.BasicShader=n},19872:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 base = texture2D( tDiffuse, vUv );","\tvec3 lumCoeff = vec3( 0.25, 0.65, 0.1 );","\tfloat lum = dot( lumCoeff, base.rgb );","\tvec3 blend = vec3( lum );","\tfloat L = min( 1.0, max( 0.0, 10.0 * ( lum - 0.45 ) ) );","\tvec3 result1 = 2.0 * base.rgb * blend;","\tvec3 result2 = 1.0 - 2.0 * ( 1.0 - blend ) * ( 1.0 - base.rgb );","\tvec3 newColor = mix( result1, result2, L );","\tfloat A2 = opacity * base.a;","\tvec3 mixRGB = A2 * newColor.rgb;","\tmixRGB += ( ( 1.0 - A2 ) * base.rgb );","\tgl_FragColor = vec4( mixRGB, base.a );","}"].join("\n")};t.BleachBypassShader=n},4056:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse1:{value:null},tDiffuse2:{value:null},mixRatio:{value:.5},opacity:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform float mixRatio;","uniform sampler2D tDiffuse1;","uniform sampler2D tDiffuse2;","varying vec2 vUv;","void main() {","\tvec4 texel1 = texture2D( tDiffuse1, vUv );","\tvec4 texel2 = texture2D( tDiffuse2, vUv );","\tgl_FragColor = opacity * mix( texel1, texel2, mixRatio );","}"].join("\n")};t.BlendShader=n},77356:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={defines:{DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tColor:{value:null},tDepth:{value:null},focus:{value:1},aspect:{value:1},aperture:{value:.025},maxblur:{value:.01},nearClip:{value:1},farClip:{value:1e3}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include ","varying vec2 vUv;","uniform sampler2D tColor;","uniform sampler2D tDepth;","uniform float maxblur;","uniform float aperture;","uniform float nearClip;","uniform float farClip;","uniform float focus;","uniform float aspect;","#include ","float getDepth( const in vec2 screenPosition ) {","\t#if DEPTH_PACKING == 1","\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );","\t#else","\treturn texture2D( tDepth, screenPosition ).x;","\t#endif","}","float getViewZ( const in float depth ) {","\t#if PERSPECTIVE_CAMERA == 1","\treturn perspectiveDepthToViewZ( depth, nearClip, farClip );","\t#else","\treturn orthographicDepthToViewZ( depth, nearClip, farClip );","\t#endif","}","void main() {","\tvec2 aspectcorrect = vec2( 1.0, aspect );","\tfloat viewZ = getViewZ( getDepth( vUv ) );","\tfloat factor = ( focus + viewZ );","\tvec2 dofblur = vec2 ( clamp( factor * aperture, -maxblur, maxblur ) );","\tvec2 dofblur9 = dofblur * 0.9;","\tvec2 dofblur7 = dofblur * 0.7;","\tvec2 dofblur4 = dofblur * 0.4;","\tvec4 col = vec4( 0.0 );","\tcol += texture2D( tColor, vUv.xy );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur9 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur9 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur9 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur9 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur9 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur9 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur9 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur9 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur7 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur7 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur7 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur7 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur7 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur7 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur7 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur7 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur4 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.4, 0.0 ) * aspectcorrect ) * dofblur4 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur4 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur4 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur4 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur4 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur4 );","\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur4 );","\tgl_FragColor = col / 41.0;","\tgl_FragColor.a = 1.0;","}"].join("\n")};t.BokehShader=n},45075:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r={uniforms:{textureWidth:{value:1},textureHeight:{value:1},focalDepth:{value:1},focalLength:{value:24},fstop:{value:.9},tColor:{value:null},tDepth:{value:null},maxblur:{value:1},showFocus:{value:0},manualdof:{value:0},vignetting:{value:0},depthblur:{value:0},threshold:{value:.5},gain:{value:2},bias:{value:.5},fringe:{value:.7},znear:{value:.1},zfar:{value:100},noise:{value:1},dithering:{value:1e-4},pentagon:{value:0},shaderFocus:{value:1},focusCoords:{value:new(n(48480).Vector2)}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include ","varying vec2 vUv;","uniform sampler2D tColor;","uniform sampler2D tDepth;","uniform float textureWidth;","uniform float textureHeight;","uniform float focalDepth; //focal distance value in meters, but you may use autofocus option below","uniform float focalLength; //focal length in mm","uniform float fstop; //f-stop value","uniform bool showFocus; //show debug focus point and focal range (red = focal point, green = focal range)","/*","make sure that these two values are the same for your camera, otherwise distances will be wrong.","*/","uniform float znear; // camera clipping start","uniform float zfar; // camera clipping end","//------------------------------------------","//user variables","const int samples = SAMPLES; //samples on the first ring","const int rings = RINGS; //ring count","const int maxringsamples = rings * samples;","uniform bool manualdof; // manual dof calculation","float ndofstart = 1.0; // near dof blur start","float ndofdist = 2.0; // near dof blur falloff distance","float fdofstart = 1.0; // far dof blur start","float fdofdist = 3.0; // far dof blur falloff distance","float CoC = 0.03; //circle of confusion size in mm (35mm film = 0.03mm)","uniform bool vignetting; // use optical lens vignetting","float vignout = 1.3; // vignetting outer border","float vignin = 0.0; // vignetting inner border","float vignfade = 22.0; // f-stops till vignete fades","uniform bool shaderFocus;","// disable if you use external focalDepth value","uniform vec2 focusCoords;","// autofocus point on screen (0.0,0.0 - left lower corner, 1.0,1.0 - upper right)","// if center of screen use vec2(0.5, 0.5);","uniform float maxblur;","//clamp value of max blur (0.0 = no blur, 1.0 default)","uniform float threshold; // highlight threshold;","uniform float gain; // highlight gain;","uniform float bias; // bokeh edge bias","uniform float fringe; // bokeh chromatic aberration / fringing","uniform bool noise; //use noise instead of pattern for sample dithering","uniform float dithering;","uniform bool depthblur; // blur the depth buffer","float dbsize = 1.25; // depth blur size","/*","next part is experimental","not looking good with small sample and ring count","looks okay starting from samples = 4, rings = 4","*/","uniform bool pentagon; //use pentagon as bokeh shape?","float feather = 0.4; //pentagon shape feather","//------------------------------------------","float penta(vec2 coords) {","\t//pentagonal shape","\tfloat scale = float(rings) - 1.3;","\tvec4 HS0 = vec4( 1.0, 0.0, 0.0, 1.0);","\tvec4 HS1 = vec4( 0.309016994, 0.951056516, 0.0, 1.0);","\tvec4 HS2 = vec4(-0.809016994, 0.587785252, 0.0, 1.0);","\tvec4 HS3 = vec4(-0.809016994,-0.587785252, 0.0, 1.0);","\tvec4 HS4 = vec4( 0.309016994,-0.951056516, 0.0, 1.0);","\tvec4 HS5 = vec4( 0.0 ,0.0 , 1.0, 1.0);","\tvec4 one = vec4( 1.0 );","\tvec4 P = vec4((coords),vec2(scale, scale));","\tvec4 dist = vec4(0.0);","\tfloat inorout = -4.0;","\tdist.x = dot( P, HS0 );","\tdist.y = dot( P, HS1 );","\tdist.z = dot( P, HS2 );","\tdist.w = dot( P, HS3 );","\tdist = smoothstep( -feather, feather, dist );","\tinorout += dot( dist, one );","\tdist.x = dot( P, HS4 );","\tdist.y = HS5.w - abs( P.z );","\tdist = smoothstep( -feather, feather, dist );","\tinorout += dist.x;","\treturn clamp( inorout, 0.0, 1.0 );","}","float bdepth(vec2 coords) {","\t// Depth buffer blur","\tfloat d = 0.0;","\tfloat kernel[9];","\tvec2 offset[9];","\tvec2 wh = vec2(1.0/textureWidth,1.0/textureHeight) * dbsize;","\toffset[0] = vec2(-wh.x,-wh.y);","\toffset[1] = vec2( 0.0, -wh.y);","\toffset[2] = vec2( wh.x -wh.y);","\toffset[3] = vec2(-wh.x, 0.0);","\toffset[4] = vec2( 0.0, 0.0);","\toffset[5] = vec2( wh.x, 0.0);","\toffset[6] = vec2(-wh.x, wh.y);","\toffset[7] = vec2( 0.0, wh.y);","\toffset[8] = vec2( wh.x, wh.y);","\tkernel[0] = 1.0/16.0; kernel[1] = 2.0/16.0; kernel[2] = 1.0/16.0;","\tkernel[3] = 2.0/16.0; kernel[4] = 4.0/16.0; kernel[5] = 2.0/16.0;","\tkernel[6] = 1.0/16.0; kernel[7] = 2.0/16.0; kernel[8] = 1.0/16.0;","\tfor( int i=0; i<9; i++ ) {","\t\tfloat tmp = texture2D(tDepth, coords + offset[i]).r;","\t\td += tmp * kernel[i];","\t}","\treturn d;","}","vec3 color(vec2 coords,float blur) {","\t//processing the sample","\tvec3 col = vec3(0.0);","\tvec2 texel = vec2(1.0/textureWidth,1.0/textureHeight);","\tcol.r = texture2D(tColor,coords + vec2(0.0,1.0)*texel*fringe*blur).r;","\tcol.g = texture2D(tColor,coords + vec2(-0.866,-0.5)*texel*fringe*blur).g;","\tcol.b = texture2D(tColor,coords + vec2(0.866,-0.5)*texel*fringe*blur).b;","\tvec3 lumcoeff = vec3(0.299,0.587,0.114);","\tfloat lum = dot(col.rgb, lumcoeff);","\tfloat thresh = max((lum-threshold)*gain, 0.0);","\treturn col+mix(vec3(0.0),col,thresh*blur);","}","vec3 debugFocus(vec3 col, float blur, float depth) {","\tfloat edge = 0.002*depth; //distance based edge smoothing","\tfloat m = clamp(smoothstep(0.0,edge,blur),0.0,1.0);","\tfloat e = clamp(smoothstep(1.0-edge,1.0,blur),0.0,1.0);","\tcol = mix(col,vec3(1.0,0.5,0.0),(1.0-m)*0.6);","\tcol = mix(col,vec3(0.0,0.5,1.0),((1.0-e)-(1.0-m))*0.2);","\treturn col;","}","float linearize(float depth) {","\treturn -zfar * znear / (depth * (zfar - znear) - zfar);","}","float vignette() {","\tfloat dist = distance(vUv.xy, vec2(0.5,0.5));","\tdist = smoothstep(vignout+(fstop/vignfade), vignin+(fstop/vignfade), dist);","\treturn clamp(dist,0.0,1.0);","}","float gather(float i, float j, int ringsamples, inout vec3 col, float w, float h, float blur) {","\tfloat rings2 = float(rings);","\tfloat step = PI*2.0 / float(ringsamples);","\tfloat pw = cos(j*step)*i;","\tfloat ph = sin(j*step)*i;","\tfloat p = 1.0;","\tif (pentagon) {","\t\tp = penta(vec2(pw,ph));","\t}","\tcol += color(vUv.xy + vec2(pw*w,ph*h), blur) * mix(1.0, i/rings2, bias) * p;","\treturn 1.0 * mix(1.0, i /rings2, bias) * p;","}","void main() {","\t//scene depth calculation","\tfloat depth = linearize(texture2D(tDepth,vUv.xy).x);","\t// Blur depth?","\tif ( depthblur ) {","\t\tdepth = linearize(bdepth(vUv.xy));","\t}","\t//focal plane calculation","\tfloat fDepth = focalDepth;","\tif (shaderFocus) {","\t\tfDepth = linearize(texture2D(tDepth,focusCoords).x);","\t}","\t// dof blur factor calculation","\tfloat blur = 0.0;","\tif (manualdof) {","\t\tfloat a = depth-fDepth; // Focal plane","\t\tfloat b = (a-fdofstart)/fdofdist; // Far DoF","\t\tfloat c = (-a-ndofstart)/ndofdist; // Near Dof","\t\tblur = (a>0.0) ? b : c;","\t} else {","\t\tfloat f = focalLength; // focal length in mm","\t\tfloat d = fDepth*1000.0; // focal plane in mm","\t\tfloat o = depth*1000.0; // depth in mm","\t\tfloat a = (o*f)/(o-f);","\t\tfloat b = (d*f)/(d-f);","\t\tfloat c = (d-f)/(d*fstop*CoC);","\t\tblur = abs(a-b)*c;","\t}","\tblur = clamp(blur,0.0,1.0);","\t// calculation of pattern for dithering","\tvec2 noise = vec2(rand(vUv.xy), rand( vUv.xy + vec2( 0.4, 0.6 ) ) )*dithering*blur;","\t// getting blur x and y step factor","\tfloat w = (1.0/textureWidth)*blur*maxblur+noise.x;","\tfloat h = (1.0/textureHeight)*blur*maxblur+noise.y;","\t// calculation of final color","\tvec3 col = vec3(0.0);","\tif(blur < 0.05) {","\t\t//some optimization thingy","\t\tcol = texture2D(tColor, vUv.xy).rgb;","\t} else {","\t\tcol = texture2D(tColor, vUv.xy).rgb;","\t\tfloat s = 1.0;","\t\tint ringsamples;","\t\tfor (int i = 1; i <= rings; i++) {","\t\t\t/*unboxstart*/","\t\t\tringsamples = i * samples;","\t\t\tfor (int j = 0 ; j < maxringsamples ; j++) {","\t\t\t\tif (j >= ringsamples) break;","\t\t\t\ts += gather(float(i), float(j), ringsamples, col, w, h, blur);","\t\t\t}","\t\t\t/*unboxend*/","\t\t}","\t\tcol /= s; //divide by sample count","\t}","\tif (showFocus) {","\t\tcol = debugFocus(col, blur, depth);","\t}","\tif (vignetting) {","\t\tcol *= vignette();","\t}","\tgl_FragColor.rgb = col;","\tgl_FragColor.a = 1.0;","} "].join("\n")},i={uniforms:{mNear:{value:1},mFar:{value:1e3}},vertexShader:["varying float vViewZDepth;","void main() {","\t#include ","\t#include ","\tvViewZDepth = - mvPosition.z;","}"].join("\n"),fragmentShader:["uniform float mNear;","uniform float mFar;","varying float vViewZDepth;","void main() {","\tfloat color = 1.0 - smoothstep( mNear, mFar, vViewZDepth );","\tgl_FragColor = vec4( vec3( color ), 1.0 );","} "].join("\n")};t.BokehDepthShader=i,t.BokehShader2=r},89216:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},brightness:{value:0},contrast:{value:0}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float brightness;","uniform float contrast;","varying vec2 vUv;","void main() {","\tgl_FragColor = texture2D( tDiffuse, vUv );","\tgl_FragColor.rgb += brightness;","\tif (contrast > 0.0) {","\t\tgl_FragColor.rgb = (gl_FragColor.rgb - 0.5) / (1.0 - contrast) + 0.5;","\t} else {","\t\tgl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + contrast) + 0.5;","\t}","}"].join("\n")};t.BrightnessContrastShader=n},75316:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={uniforms:{tDiffuse:{value:null},powRGB:{value:new r.Vector3(2,2,2)},mulRGB:{value:new r.Vector3(1,1,1)},addRGB:{value:new r.Vector3(0,0,0)}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform vec3 powRGB;","uniform vec3 mulRGB;","uniform vec3 addRGB;","varying vec2 vUv;","void main() {","\tgl_FragColor = texture2D( tDiffuse, vUv );","\tgl_FragColor.rgb = mulRGB * pow( ( gl_FragColor.rgb + addRGB ), powRGB );","}"].join("\n")};t.ColorCorrectionShader=i},90964:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r={uniforms:{tDiffuse:{value:null},color:{value:new(n(48480).Color)(16777215)}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform vec3 color;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 texel = texture2D( tDiffuse, vUv );","\tvec3 luma = vec3( 0.299, 0.587, 0.114 );","\tfloat v = dot( texel.xyz, luma );","\tgl_FragColor = vec4( v * color, texel.w );","}"].join("\n")};t.ColorifyShader=r},75040:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r={defines:{KERNEL_SIZE_FLOAT:"25.0",KERNEL_SIZE_INT:"25"},uniforms:{tDiffuse:{value:null},uImageIncrement:{value:new(n(48480).Vector2)(.001953125,0)},cKernel:{value:[]}},vertexShader:["uniform vec2 uImageIncrement;","varying vec2 vUv;","void main() {","\tvUv = uv - ( ( KERNEL_SIZE_FLOAT - 1.0 ) / 2.0 ) * uImageIncrement;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float cKernel[ KERNEL_SIZE_INT ];","uniform sampler2D tDiffuse;","uniform vec2 uImageIncrement;","varying vec2 vUv;","void main() {","\tvec2 imageCoord = vUv;","\tvec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 );","\tfor( int i = 0; i < KERNEL_SIZE_INT; i ++ ) {","\t\tsum += texture2D( tDiffuse, imageCoord ) * cKernel[ i ];","\t\timageCoord += uImageIncrement;","\t}","\tgl_FragColor = sum;","}"].join("\n"),buildKernel:function(e){const t=Math.min(2*Math.ceil(3*e)+1,25),n=.5*(t-1),r=new Array(t);let i=0;for(let o=0;o{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 texel = texture2D( tDiffuse, vUv );","\tgl_FragColor = opacity * texel;","}"].join("\n")};t.CopyShader=n},10708:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tColor:{value:null},tDepth:{value:null},focus:{value:1},maxblur:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float focus;","uniform float maxblur;","uniform sampler2D tColor;","uniform sampler2D tDepth;","varying vec2 vUv;","void main() {","\tvec4 depth = texture2D( tDepth, vUv );","\tfloat factor = depth.x - focus;","\tvec4 col = texture2D( tColor, vUv, 2.0 * maxblur * abs( focus - depth.x ) );","\tgl_FragColor = col;","\tgl_FragColor.a = 1.0;","}"].join("\n")};t.DOFMipMapShader=n},85616:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={defines:{KERNEL_RADIUS:4,DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tDiffuse:{value:null},size:{value:new r.Vector2(512,512)},sampleUvOffsets:{value:[new r.Vector2(0,0)]},sampleWeights:{value:[1]},tDepth:{value:null},cameraNear:{value:10},cameraFar:{value:1e3},depthCutoff:{value:10}},vertexShader:["#include ","uniform vec2 size;","varying vec2 vUv;","varying vec2 vInvSize;","void main() {","\tvUv = uv;","\tvInvSize = 1.0 / size;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include ","#include ","uniform sampler2D tDiffuse;","uniform sampler2D tDepth;","uniform float cameraNear;","uniform float cameraFar;","uniform float depthCutoff;","uniform vec2 sampleUvOffsets[ KERNEL_RADIUS + 1 ];","uniform float sampleWeights[ KERNEL_RADIUS + 1 ];","varying vec2 vUv;","varying vec2 vInvSize;","float getDepth( const in vec2 screenPosition ) {","\t#if DEPTH_PACKING == 1","\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );","\t#else","\treturn texture2D( tDepth, screenPosition ).x;","\t#endif","}","float getViewZ( const in float depth ) {","\t#if PERSPECTIVE_CAMERA == 1","\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );","\t#else","\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );","\t#endif","}","void main() {","\tfloat depth = getDepth( vUv );","\tif( depth >= ( 1.0 - EPSILON ) ) {","\t\tdiscard;","\t}","\tfloat centerViewZ = -getViewZ( depth );","\tbool rBreak = false, lBreak = false;","\tfloat weightSum = sampleWeights[0];","\tvec4 diffuseSum = texture2D( tDiffuse, vUv ) * weightSum;","\tfor( int i = 1; i <= KERNEL_RADIUS; i ++ ) {","\t\tfloat sampleWeight = sampleWeights[i];","\t\tvec2 sampleUvOffset = sampleUvOffsets[i] * vInvSize;","\t\tvec2 sampleUv = vUv + sampleUvOffset;","\t\tfloat viewZ = -getViewZ( getDepth( sampleUv ) );","\t\tif( abs( viewZ - centerViewZ ) > depthCutoff ) rBreak = true;","\t\tif( ! rBreak ) {","\t\t\tdiffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;","\t\t\tweightSum += sampleWeight;","\t\t}","\t\tsampleUv = vUv - sampleUvOffset;","\t\tviewZ = -getViewZ( getDepth( sampleUv ) );","\t\tif( abs( viewZ - centerViewZ ) > depthCutoff ) lBreak = true;","\t\tif( ! lBreak ) {","\t\t\tdiffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;","\t\t\tweightSum += sampleWeight;","\t\t}","\t}","\tgl_FragColor = diffuseSum / weightSum;","}"].join("\n")},s={createSampleWeights:(e,t)=>{const n=[];for(let s=0;s<=e;s++)n.push((r=s,i=t,Math.exp(-r*r/(i*i*2))/(Math.sqrt(2*Math.PI)*i)));var r,i;return n},createSampleOffsets:(e,t)=>{const n=[];for(let r=0;r<=e;r++)n.push(t.clone().multiplyScalar(r));return n},configure:(e,t,n,r)=>{e.defines.KERNEL_RADIUS=t,e.uniforms.sampleUvOffsets.value=s.createSampleOffsets(t,r),e.uniforms.sampleWeights.value=s.createSampleWeights(t,n),e.needsUpdate=!0}};t.BlurShaderUtils=s,t.DepthLimitedBlurShader=i},10304:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},tDisp:{value:null},byp:{value:0},amount:{value:.08},angle:{value:.02},seed:{value:.02},seed_x:{value:.02},seed_y:{value:.02},distortion_x:{value:.5},distortion_y:{value:.6},col_s:{value:.05}},vertexShader:"varying vec2 vUv;\n void main() {\n \t vUv = uv;\n \t gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",fragmentShader:"uniform int byp; //should we apply the glitch ?\n uniform sampler2D tDiffuse;\n uniform sampler2D tDisp;\n uniform float amount;\n uniform float angle;\n uniform float seed;\n uniform float seed_x;\n uniform float seed_y;\n uniform float distortion_x;\n uniform float distortion_y;\n uniform float col_s;\n\n varying vec2 vUv;\n\n float rand(vec2 co){\n \t return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\n }\n\n void main() {\n \tif(byp<1) {\n \t\tvec2 p = vUv;\n \t\tfloat xs = floor(gl_FragCoord.x / 0.5);\n \t\tfloat ys = floor(gl_FragCoord.y / 0.5);\n //based on staffantans glitch shader for unity https://github.com/staffantan/unityglitch\n \t\tvec4 normal = texture2D (tDisp, p*seed*seed);\n \t\tif(p.ydistortion_x-col_s*seed) {\n \t\t\tif(seed_x>0.){\n \t\t\t\tp.y = 1. - (p.y + distortion_y);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tp.y = distortion_y;\n \t\t\t}\n \t\t}\n \t\tif(p.xdistortion_y-col_s*seed) {\n \t\t\tif(seed_y>0.){\n \t\t\t\tp.x=distortion_x;\n \t\t\t}\n \t\t\telse {\n \t\t\t\tp.x = 1. - (p.x + distortion_x);\n \t\t\t}\n \t\t}\n \t\tp.x+=normal.x*seed_x*(seed/5.);\n \t\tp.y+=normal.y*seed_y*(seed/5.);\n //base from RGB shift shader\n \t\tvec2 offset = amount * vec2( cos(angle), sin(angle));\n \t\tvec4 cr = texture2D(tDiffuse, p + offset);\n \t\tvec4 cga = texture2D(tDiffuse, p);\n \t\tvec4 cb = texture2D(tDiffuse, p - offset);\n \t\tgl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);\n //add noise\n \t\tvec4 snow = 200.*amount*vec4(rand(vec2(xs * seed,ys * seed*50.))*0.2);\n \t\tgl_FragColor = gl_FragColor+ snow;\n \t}\n \telse {\n \t\tgl_FragColor=texture2D (tDiffuse, vUv);\n \t}\n }"};t.DigitalGlitch=n},12400:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={uniforms:{tDiffuse:{value:null},tSize:{value:new r.Vector2(256,256)},center:{value:new r.Vector2(.5,.5)},angle:{value:1.57},scale:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform vec2 center;","uniform float angle;","uniform float scale;","uniform vec2 tSize;","uniform sampler2D tDiffuse;","varying vec2 vUv;","float pattern() {","\tfloat s = sin( angle ), c = cos( angle );","\tvec2 tex = vUv * tSize - center;","\tvec2 point = vec2( c * tex.x - s * tex.y, s * tex.x + c * tex.y ) * scale;","\treturn ( sin( point.x ) * sin( point.y ) ) * 4.0;","}","void main() {","\tvec4 color = texture2D( tDiffuse, vUv );","\tfloat average = ( color.r + color.g + color.b ) / 3.0;","\tgl_FragColor = vec4( vec3( average * 10.0 - 5.0 + pattern() ), color.a );","}"].join("\n")};t.DotScreenShader=i},73668:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r={uniforms:{tDiffuse:{value:null},resolution:{value:new(n(48480).Vector2)(1/1024,1/512)}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["precision highp float;","","uniform sampler2D tDiffuse;","","uniform vec2 resolution;","","varying vec2 vUv;","","// FXAA 3.11 implementation by NVIDIA, ported to WebGL by Agost Biro (biro@archilogic.com)","","//----------------------------------------------------------------------------------","// File: es3-keplerFXAAassetsshaders/FXAA_DefaultES.frag","// SDK Version: v3.00","// Email: gameworks@nvidia.com","// Site: http://developer.nvidia.com/","//","// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.","//","// Redistribution and use in source and binary forms, with or without","// modification, are permitted provided that the following conditions","// are met:","// * Redistributions of source code must retain the above copyright","// notice, this list of conditions and the following disclaimer.","// * Redistributions in binary form must reproduce the above copyright","// notice, this list of conditions and the following disclaimer in the","// documentation and/or other materials provided with the distribution.","// * Neither the name of NVIDIA CORPORATION nor the names of its","// contributors may be used to endorse or promote products derived","// from this software without specific prior written permission.","//","// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY","// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE","// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR","// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR","// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,","// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,","// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR","// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY","// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT","// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE","// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","//","//----------------------------------------------------------------------------------","","#define FXAA_PC 1","#define FXAA_GLSL_100 1","#define FXAA_QUALITY_PRESET 12","","#define FXAA_GREEN_AS_LUMA 1","","/*--------------------------------------------------------------------------*/","#ifndef FXAA_PC_CONSOLE"," //"," // The console algorithm for PC is included"," // for developers targeting really low spec machines."," // Likely better to just run FXAA_PC, and use a really low preset."," //"," #define FXAA_PC_CONSOLE 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_GLSL_120"," #define FXAA_GLSL_120 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_GLSL_130"," #define FXAA_GLSL_130 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_HLSL_3"," #define FXAA_HLSL_3 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_HLSL_4"," #define FXAA_HLSL_4 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_HLSL_5"," #define FXAA_HLSL_5 0","#endif","/*==========================================================================*/","#ifndef FXAA_GREEN_AS_LUMA"," //"," // For those using non-linear color,"," // and either not able to get luma in alpha, or not wanting to,"," // this enables FXAA to run using green as a proxy for luma."," // So with this enabled, no need to pack luma in alpha."," //"," // This will turn off AA on anything which lacks some amount of green."," // Pure red and blue or combination of only R and B, will get no AA."," //"," // Might want to lower the settings for both,"," // fxaaConsoleEdgeThresholdMin"," // fxaaQualityEdgeThresholdMin"," // In order to insure AA does not get turned off on colors"," // which contain a minor amount of green."," //"," // 1 = On."," // 0 = Off."," //"," #define FXAA_GREEN_AS_LUMA 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_EARLY_EXIT"," //"," // Controls algorithm's early exit path."," // On PS3 turning this ON adds 2 cycles to the shader."," // On 360 turning this OFF adds 10ths of a millisecond to the shader."," // Turning this off on console will result in a more blurry image."," // So this defaults to on."," //"," // 1 = On."," // 0 = Off."," //"," #define FXAA_EARLY_EXIT 1","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_DISCARD"," //"," // Only valid for PC OpenGL currently."," // Probably will not work when FXAA_GREEN_AS_LUMA = 1."," //"," // 1 = Use discard on pixels which don't need AA."," // For APIs which enable concurrent TEX+ROP from same surface."," // 0 = Return unchanged color on pixels which don't need AA."," //"," #define FXAA_DISCARD 0","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_FAST_PIXEL_OFFSET"," //"," // Used for GLSL 120 only."," //"," // 1 = GL API supports fast pixel offsets"," // 0 = do not use fast pixel offsets"," //"," #ifdef GL_EXT_gpu_shader4"," #define FXAA_FAST_PIXEL_OFFSET 1"," #endif"," #ifdef GL_NV_gpu_shader5"," #define FXAA_FAST_PIXEL_OFFSET 1"," #endif"," #ifdef GL_ARB_gpu_shader5"," #define FXAA_FAST_PIXEL_OFFSET 1"," #endif"," #ifndef FXAA_FAST_PIXEL_OFFSET"," #define FXAA_FAST_PIXEL_OFFSET 0"," #endif","#endif","/*--------------------------------------------------------------------------*/","#ifndef FXAA_GATHER4_ALPHA"," //"," // 1 = API supports gather4 on alpha channel."," // 0 = API does not support gather4 on alpha channel."," //"," #if (FXAA_HLSL_5 == 1)"," #define FXAA_GATHER4_ALPHA 1"," #endif"," #ifdef GL_ARB_gpu_shader5"," #define FXAA_GATHER4_ALPHA 1"," #endif"," #ifdef GL_NV_gpu_shader5"," #define FXAA_GATHER4_ALPHA 1"," #endif"," #ifndef FXAA_GATHER4_ALPHA"," #define FXAA_GATHER4_ALPHA 0"," #endif","#endif","","","/*============================================================================"," FXAA QUALITY - TUNING KNOBS","------------------------------------------------------------------------------","NOTE the other tuning knobs are now in the shader function inputs!","============================================================================*/","#ifndef FXAA_QUALITY_PRESET"," //"," // Choose the quality preset."," // This needs to be compiled into the shader as it effects code."," // Best option to include multiple presets is to"," // in each shader define the preset, then include this file."," //"," // OPTIONS"," // -----------------------------------------------------------------------"," // 10 to 15 - default medium dither (10=fastest, 15=highest quality)"," // 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)"," // 39 - no dither, very expensive"," //"," // NOTES"," // -----------------------------------------------------------------------"," // 12 = slightly faster then FXAA 3.9 and higher edge quality (default)"," // 13 = about same speed as FXAA 3.9 and better than 12"," // 23 = closest to FXAA 3.9 visually and performance wise"," // _ = the lowest digit is directly related to performance"," // _ = the highest digit is directly related to style"," //"," #define FXAA_QUALITY_PRESET 12","#endif","","","/*============================================================================",""," FXAA QUALITY - PRESETS","","============================================================================*/","","/*============================================================================"," FXAA QUALITY - MEDIUM DITHER PRESETS","============================================================================*/","#if (FXAA_QUALITY_PRESET == 10)"," #define FXAA_QUALITY_PS 3"," #define FXAA_QUALITY_P0 1.5"," #define FXAA_QUALITY_P1 3.0"," #define FXAA_QUALITY_P2 12.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 11)"," #define FXAA_QUALITY_PS 4"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 3.0"," #define FXAA_QUALITY_P3 12.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 12)"," #define FXAA_QUALITY_PS 5"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 4.0"," #define FXAA_QUALITY_P4 12.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 13)"," #define FXAA_QUALITY_PS 6"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 4.0"," #define FXAA_QUALITY_P5 12.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 14)"," #define FXAA_QUALITY_PS 7"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 4.0"," #define FXAA_QUALITY_P6 12.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 15)"," #define FXAA_QUALITY_PS 8"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 4.0"," #define FXAA_QUALITY_P7 12.0","#endif","","/*============================================================================"," FXAA QUALITY - LOW DITHER PRESETS","============================================================================*/","#if (FXAA_QUALITY_PRESET == 20)"," #define FXAA_QUALITY_PS 3"," #define FXAA_QUALITY_P0 1.5"," #define FXAA_QUALITY_P1 2.0"," #define FXAA_QUALITY_P2 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 21)"," #define FXAA_QUALITY_PS 4"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 22)"," #define FXAA_QUALITY_PS 5"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 23)"," #define FXAA_QUALITY_PS 6"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 24)"," #define FXAA_QUALITY_PS 7"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 3.0"," #define FXAA_QUALITY_P6 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 25)"," #define FXAA_QUALITY_PS 8"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 4.0"," #define FXAA_QUALITY_P7 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 26)"," #define FXAA_QUALITY_PS 9"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 2.0"," #define FXAA_QUALITY_P7 4.0"," #define FXAA_QUALITY_P8 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 27)"," #define FXAA_QUALITY_PS 10"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 2.0"," #define FXAA_QUALITY_P7 2.0"," #define FXAA_QUALITY_P8 4.0"," #define FXAA_QUALITY_P9 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 28)"," #define FXAA_QUALITY_PS 11"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 2.0"," #define FXAA_QUALITY_P7 2.0"," #define FXAA_QUALITY_P8 2.0"," #define FXAA_QUALITY_P9 4.0"," #define FXAA_QUALITY_P10 8.0","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_QUALITY_PRESET == 29)"," #define FXAA_QUALITY_PS 12"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.5"," #define FXAA_QUALITY_P2 2.0"," #define FXAA_QUALITY_P3 2.0"," #define FXAA_QUALITY_P4 2.0"," #define FXAA_QUALITY_P5 2.0"," #define FXAA_QUALITY_P6 2.0"," #define FXAA_QUALITY_P7 2.0"," #define FXAA_QUALITY_P8 2.0"," #define FXAA_QUALITY_P9 2.0"," #define FXAA_QUALITY_P10 4.0"," #define FXAA_QUALITY_P11 8.0","#endif","","/*============================================================================"," FXAA QUALITY - EXTREME QUALITY","============================================================================*/","#if (FXAA_QUALITY_PRESET == 39)"," #define FXAA_QUALITY_PS 12"," #define FXAA_QUALITY_P0 1.0"," #define FXAA_QUALITY_P1 1.0"," #define FXAA_QUALITY_P2 1.0"," #define FXAA_QUALITY_P3 1.0"," #define FXAA_QUALITY_P4 1.0"," #define FXAA_QUALITY_P5 1.5"," #define FXAA_QUALITY_P6 2.0"," #define FXAA_QUALITY_P7 2.0"," #define FXAA_QUALITY_P8 2.0"," #define FXAA_QUALITY_P9 2.0"," #define FXAA_QUALITY_P10 4.0"," #define FXAA_QUALITY_P11 8.0","#endif","","","","/*============================================================================",""," API PORTING","","============================================================================*/","#if (FXAA_GLSL_100 == 1) || (FXAA_GLSL_120 == 1) || (FXAA_GLSL_130 == 1)"," #define FxaaBool bool"," #define FxaaDiscard discard"," #define FxaaFloat float"," #define FxaaFloat2 vec2"," #define FxaaFloat3 vec3"," #define FxaaFloat4 vec4"," #define FxaaHalf float"," #define FxaaHalf2 vec2"," #define FxaaHalf3 vec3"," #define FxaaHalf4 vec4"," #define FxaaInt2 ivec2"," #define FxaaSat(x) clamp(x, 0.0, 1.0)"," #define FxaaTex sampler2D","#else"," #define FxaaBool bool"," #define FxaaDiscard clip(-1)"," #define FxaaFloat float"," #define FxaaFloat2 float2"," #define FxaaFloat3 float3"," #define FxaaFloat4 float4"," #define FxaaHalf half"," #define FxaaHalf2 half2"," #define FxaaHalf3 half3"," #define FxaaHalf4 half4"," #define FxaaSat(x) saturate(x)","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_GLSL_100 == 1)"," #define FxaaTexTop(t, p) texture2D(t, p, 0.0)"," #define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r), 0.0)","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_GLSL_120 == 1)"," // Requires,"," // #version 120"," // And at least,"," // #extension GL_EXT_gpu_shader4 : enable"," // (or set FXAA_FAST_PIXEL_OFFSET 1 to work like DX9)"," #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)"," #if (FXAA_FAST_PIXEL_OFFSET == 1)"," #define FxaaTexOff(t, p, o, r) texture2DLodOffset(t, p, 0.0, o)"," #else"," #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)"," #endif"," #if (FXAA_GATHER4_ALPHA == 1)"," // use #extension GL_ARB_gpu_shader5 : enable"," #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)"," #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)"," #define FxaaTexGreen4(t, p) textureGather(t, p, 1)"," #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)"," #endif","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_GLSL_130 == 1)",' // Requires "#version 130" or better'," #define FxaaTexTop(t, p) textureLod(t, p, 0.0)"," #define FxaaTexOff(t, p, o, r) textureLodOffset(t, p, 0.0, o)"," #if (FXAA_GATHER4_ALPHA == 1)"," // use #extension GL_ARB_gpu_shader5 : enable"," #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)"," #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)"," #define FxaaTexGreen4(t, p) textureGather(t, p, 1)"," #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)"," #endif","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_HLSL_3 == 1)"," #define FxaaInt2 float2"," #define FxaaTex sampler2D"," #define FxaaTexTop(t, p) tex2Dlod(t, float4(p, 0.0, 0.0))"," #define FxaaTexOff(t, p, o, r) tex2Dlod(t, float4(p + (o * r), 0, 0))","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_HLSL_4 == 1)"," #define FxaaInt2 int2"," struct FxaaTex { SamplerState smpl; Texture2D tex; };"," #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)"," #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)","#endif","/*--------------------------------------------------------------------------*/","#if (FXAA_HLSL_5 == 1)"," #define FxaaInt2 int2"," struct FxaaTex { SamplerState smpl; Texture2D tex; };"," #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)"," #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)"," #define FxaaTexAlpha4(t, p) t.tex.GatherAlpha(t.smpl, p)"," #define FxaaTexOffAlpha4(t, p, o) t.tex.GatherAlpha(t.smpl, p, o)"," #define FxaaTexGreen4(t, p) t.tex.GatherGreen(t.smpl, p)"," #define FxaaTexOffGreen4(t, p, o) t.tex.GatherGreen(t.smpl, p, o)","#endif","","","/*============================================================================"," GREEN AS LUMA OPTION SUPPORT FUNCTION","============================================================================*/","#if (FXAA_GREEN_AS_LUMA == 0)"," FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.w; }","#else"," FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }","#endif","","","","","/*============================================================================",""," FXAA3 QUALITY - PC","","============================================================================*/","#if (FXAA_PC == 1)","/*--------------------------------------------------------------------------*/","FxaaFloat4 FxaaPixelShader("," //"," // Use noperspective interpolation here (turn off perspective interpolation)."," // {xy} = center of pixel"," FxaaFloat2 pos,"," //"," // Used only for FXAA Console, and not used on the 360 version."," // Use noperspective interpolation here (turn off perspective interpolation)."," // {xy_} = upper left of pixel"," // {_zw} = lower right of pixel"," FxaaFloat4 fxaaConsolePosPos,"," //"," // Input color texture."," // {rgb_} = color in linear or perceptual color space"," // if (FXAA_GREEN_AS_LUMA == 0)"," // {__a} = luma in perceptual color space (not linear)"," FxaaTex tex,"," //"," // Only used on the optimized 360 version of FXAA Console.",' // For everything but 360, just use the same input here as for "tex".'," // For 360, same texture, just alias with a 2nd sampler."," // This sampler needs to have an exponent bias of -1."," FxaaTex fxaaConsole360TexExpBiasNegOne,"," //"," // Only used on the optimized 360 version of FXAA Console.",' // For everything but 360, just use the same input here as for "tex".'," // For 360, same texture, just alias with a 3nd sampler."," // This sampler needs to have an exponent bias of -2."," FxaaTex fxaaConsole360TexExpBiasNegTwo,"," //"," // Only used on FXAA Quality."," // This must be from a constant/uniform."," // {x_} = 1.0/screenWidthInPixels"," // {_y} = 1.0/screenHeightInPixels"," FxaaFloat2 fxaaQualityRcpFrame,"," //"," // Only used on FXAA Console."," // This must be from a constant/uniform."," // This effects sub-pixel AA quality and inversely sharpness."," // Where N ranges between,"," // N = 0.50 (default)"," // N = 0.33 (sharper)"," // {x__} = -N/screenWidthInPixels"," // {_y_} = -N/screenHeightInPixels"," // {_z_} = N/screenWidthInPixels"," // {__w} = N/screenHeightInPixels"," FxaaFloat4 fxaaConsoleRcpFrameOpt,"," //"," // Only used on FXAA Console."," // Not used on 360, but used on PS3 and PC."," // This must be from a constant/uniform."," // {x__} = -2.0/screenWidthInPixels"," // {_y_} = -2.0/screenHeightInPixels"," // {_z_} = 2.0/screenWidthInPixels"," // {__w} = 2.0/screenHeightInPixels"," FxaaFloat4 fxaaConsoleRcpFrameOpt2,"," //"," // Only used on FXAA Console."," // Only used on 360 in place of fxaaConsoleRcpFrameOpt2."," // This must be from a constant/uniform."," // {x__} = 8.0/screenWidthInPixels"," // {_y_} = 8.0/screenHeightInPixels"," // {_z_} = -4.0/screenWidthInPixels"," // {__w} = -4.0/screenHeightInPixels"," FxaaFloat4 fxaaConsole360RcpFrameOpt2,"," //"," // Only used on FXAA Quality."," // This used to be the FXAA_QUALITY_SUBPIX define."," // It is here now to allow easier tuning."," // Choose the amount of sub-pixel aliasing removal."," // This can effect sharpness."," // 1.00 - upper limit (softer)"," // 0.75 - default amount of filtering"," // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)"," // 0.25 - almost off"," // 0.00 - completely off"," FxaaFloat fxaaQualitySubpix,"," //"," // Only used on FXAA Quality."," // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define."," // It is here now to allow easier tuning."," // The minimum amount of local contrast required to apply algorithm."," // 0.333 - too little (faster)"," // 0.250 - low quality"," // 0.166 - default"," // 0.125 - high quality"," // 0.063 - overkill (slower)"," FxaaFloat fxaaQualityEdgeThreshold,"," //"," // Only used on FXAA Quality."," // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define."," // It is here now to allow easier tuning."," // Trims the algorithm from processing darks."," // 0.0833 - upper limit (default, the start of visible unfiltered edges)"," // 0.0625 - high quality (faster)"," // 0.0312 - visible limit (slower)"," // Special notes when using FXAA_GREEN_AS_LUMA,"," // Likely want to set this to zero."," // As colors that are mostly not-green"," // will appear very dark in the green channel!"," // Tune by looking at mostly non-green content,"," // then start at zero and increase until aliasing is a problem."," FxaaFloat fxaaQualityEdgeThresholdMin,"," //"," // Only used on FXAA Console."," // This used to be the FXAA_CONSOLE_EDGE_SHARPNESS define."," // It is here now to allow easier tuning."," // This does not effect PS3, as this needs to be compiled in."," // Use FXAA_CONSOLE_PS3_EDGE_SHARPNESS for PS3."," // Due to the PS3 being ALU bound,"," // there are only three safe values here: 2 and 4 and 8."," // These options use the shaders ability to a free *|/ by 2|4|8."," // For all other platforms can be a non-power of two."," // 8.0 is sharper (default!!!)"," // 4.0 is softer"," // 2.0 is really soft (good only for vector graphics inputs)"," FxaaFloat fxaaConsoleEdgeSharpness,"," //"," // Only used on FXAA Console."," // This used to be the FXAA_CONSOLE_EDGE_THRESHOLD define."," // It is here now to allow easier tuning."," // This does not effect PS3, as this needs to be compiled in."," // Use FXAA_CONSOLE_PS3_EDGE_THRESHOLD for PS3."," // Due to the PS3 being ALU bound,"," // there are only two safe values here: 1/4 and 1/8."," // These options use the shaders ability to a free *|/ by 2|4|8."," // The console setting has a different mapping than the quality setting."," // Other platforms can use other values."," // 0.125 leaves less aliasing, but is softer (default!!!)"," // 0.25 leaves more aliasing, and is sharper"," FxaaFloat fxaaConsoleEdgeThreshold,"," //"," // Only used on FXAA Console."," // This used to be the FXAA_CONSOLE_EDGE_THRESHOLD_MIN define."," // It is here now to allow easier tuning."," // Trims the algorithm from processing darks."," // The console setting has a different mapping than the quality setting."," // This only applies when FXAA_EARLY_EXIT is 1."," // This does not apply to PS3,"," // PS3 was simplified to avoid more shader instructions."," // 0.06 - faster but more aliasing in darks"," // 0.05 - default"," // 0.04 - slower and less aliasing in darks"," // Special notes when using FXAA_GREEN_AS_LUMA,"," // Likely want to set this to zero."," // As colors that are mostly not-green"," // will appear very dark in the green channel!"," // Tune by looking at mostly non-green content,"," // then start at zero and increase until aliasing is a problem."," FxaaFloat fxaaConsoleEdgeThresholdMin,"," //"," // Extra constants for 360 FXAA Console only."," // Use zeros or anything else for other platforms."," // These must be in physical constant registers and NOT immediates."," // Immediates will result in compiler un-optimizing."," // {xyzw} = float4(1.0, -1.0, 0.25, -0.25)"," FxaaFloat4 fxaaConsole360ConstDir",") {","/*--------------------------------------------------------------------------*/"," FxaaFloat2 posM;"," posM.x = pos.x;"," posM.y = pos.y;"," #if (FXAA_GATHER4_ALPHA == 1)"," #if (FXAA_DISCARD == 0)"," FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);"," #if (FXAA_GREEN_AS_LUMA == 0)"," #define lumaM rgbyM.w"," #else"," #define lumaM rgbyM.y"," #endif"," #endif"," #if (FXAA_GREEN_AS_LUMA == 0)"," FxaaFloat4 luma4A = FxaaTexAlpha4(tex, posM);"," FxaaFloat4 luma4B = FxaaTexOffAlpha4(tex, posM, FxaaInt2(-1, -1));"," #else"," FxaaFloat4 luma4A = FxaaTexGreen4(tex, posM);"," FxaaFloat4 luma4B = FxaaTexOffGreen4(tex, posM, FxaaInt2(-1, -1));"," #endif"," #if (FXAA_DISCARD == 1)"," #define lumaM luma4A.w"," #endif"," #define lumaE luma4A.z"," #define lumaS luma4A.x"," #define lumaSE luma4A.y"," #define lumaNW luma4B.w"," #define lumaN luma4B.z"," #define lumaW luma4B.x"," #else"," FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);"," #if (FXAA_GREEN_AS_LUMA == 0)"," #define lumaM rgbyM.w"," #else"," #define lumaM rgbyM.y"," #endif"," #if (FXAA_GLSL_100 == 1)"," FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 0.0, 1.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0, 0.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 0.0,-1.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0, 0.0), fxaaQualityRcpFrame.xy));"," #else"," FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));"," #endif"," #endif","/*--------------------------------------------------------------------------*/"," FxaaFloat maxSM = max(lumaS, lumaM);"," FxaaFloat minSM = min(lumaS, lumaM);"," FxaaFloat maxESM = max(lumaE, maxSM);"," FxaaFloat minESM = min(lumaE, minSM);"," FxaaFloat maxWN = max(lumaN, lumaW);"," FxaaFloat minWN = min(lumaN, lumaW);"," FxaaFloat rangeMax = max(maxWN, maxESM);"," FxaaFloat rangeMin = min(minWN, minESM);"," FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;"," FxaaFloat range = rangeMax - rangeMin;"," FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);"," FxaaBool earlyExit = range < rangeMaxClamped;","/*--------------------------------------------------------------------------*/"," if(earlyExit)"," #if (FXAA_DISCARD == 1)"," FxaaDiscard;"," #else"," return rgbyM;"," #endif","/*--------------------------------------------------------------------------*/"," #if (FXAA_GATHER4_ALPHA == 0)"," #if (FXAA_GLSL_100 == 1)"," FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0,-1.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0, 1.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0,-1.0), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0, 1.0), fxaaQualityRcpFrame.xy));"," #else"," FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));"," #endif"," #else"," FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(1, -1), fxaaQualityRcpFrame.xy));"," FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));"," #endif","/*--------------------------------------------------------------------------*/"," FxaaFloat lumaNS = lumaN + lumaS;"," FxaaFloat lumaWE = lumaW + lumaE;"," FxaaFloat subpixRcpRange = 1.0/range;"," FxaaFloat subpixNSWE = lumaNS + lumaWE;"," FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;"," FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;","/*--------------------------------------------------------------------------*/"," FxaaFloat lumaNESE = lumaNE + lumaSE;"," FxaaFloat lumaNWNE = lumaNW + lumaNE;"," FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;"," FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;","/*--------------------------------------------------------------------------*/"," FxaaFloat lumaNWSW = lumaNW + lumaSW;"," FxaaFloat lumaSWSE = lumaSW + lumaSE;"," FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);"," FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);"," FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;"," FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;"," FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;"," FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;","/*--------------------------------------------------------------------------*/"," FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;"," FxaaFloat lengthSign = fxaaQualityRcpFrame.x;"," FxaaBool horzSpan = edgeHorz >= edgeVert;"," FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;","/*--------------------------------------------------------------------------*/"," if(!horzSpan) lumaN = lumaW;"," if(!horzSpan) lumaS = lumaE;"," if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;"," FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;","/*--------------------------------------------------------------------------*/"," FxaaFloat gradientN = lumaN - lumaM;"," FxaaFloat gradientS = lumaS - lumaM;"," FxaaFloat lumaNN = lumaN + lumaM;"," FxaaFloat lumaSS = lumaS + lumaM;"," FxaaBool pairN = abs(gradientN) >= abs(gradientS);"," FxaaFloat gradient = max(abs(gradientN), abs(gradientS));"," if(pairN) lengthSign = -lengthSign;"," FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);","/*--------------------------------------------------------------------------*/"," FxaaFloat2 posB;"," posB.x = posM.x;"," posB.y = posM.y;"," FxaaFloat2 offNP;"," offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;"," offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;"," if(!horzSpan) posB.x += lengthSign * 0.5;"," if( horzSpan) posB.y += lengthSign * 0.5;","/*--------------------------------------------------------------------------*/"," FxaaFloat2 posN;"," posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;"," posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;"," FxaaFloat2 posP;"," posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;"," posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;"," FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;"," FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));"," FxaaFloat subpixE = subpixC * subpixC;"," FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));","/*--------------------------------------------------------------------------*/"," if(!pairN) lumaNN = lumaSS;"," FxaaFloat gradientScaled = gradient * 1.0/4.0;"," FxaaFloat lumaMM = lumaM - lumaNN * 0.5;"," FxaaFloat subpixF = subpixD * subpixE;"," FxaaBool lumaMLTZero = lumaMM < 0.0;","/*--------------------------------------------------------------------------*/"," lumaEndN -= lumaNN * 0.5;"," lumaEndP -= lumaNN * 0.5;"," FxaaBool doneN = abs(lumaEndN) >= gradientScaled;"," FxaaBool doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;"," FxaaBool doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;","/*--------------------------------------------------------------------------*/"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 3)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 4)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 5)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 6)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 7)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 8)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 9)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 10)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 11)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;","/*--------------------------------------------------------------------------*/"," #if (FXAA_QUALITY_PS > 12)"," if(doneNP) {"," if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));"," if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));"," if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;"," if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;"," doneN = abs(lumaEndN) >= gradientScaled;"," doneP = abs(lumaEndP) >= gradientScaled;"," if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;"," if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;"," doneNP = (!doneN) || (!doneP);"," if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;"," if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }"," #endif","/*--------------------------------------------------------------------------*/"," }","/*--------------------------------------------------------------------------*/"," FxaaFloat dstN = posM.x - posN.x;"," FxaaFloat dstP = posP.x - posM.x;"," if(!horzSpan) dstN = posM.y - posN.y;"," if(!horzSpan) dstP = posP.y - posM.y;","/*--------------------------------------------------------------------------*/"," FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;"," FxaaFloat spanLength = (dstP + dstN);"," FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;"," FxaaFloat spanLengthRcp = 1.0/spanLength;","/*--------------------------------------------------------------------------*/"," FxaaBool directionN = dstN < dstP;"," FxaaFloat dst = min(dstN, dstP);"," FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;"," FxaaFloat subpixG = subpixF * subpixF;"," FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;"," FxaaFloat subpixH = subpixG * fxaaQualitySubpix;","/*--------------------------------------------------------------------------*/"," FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;"," FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);"," if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;"," if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;"," #if (FXAA_DISCARD == 1)"," return FxaaTexTop(tex, posM);"," #else"," return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);"," #endif","}","/*==========================================================================*/","#endif","","void main() {"," gl_FragColor = FxaaPixelShader("," vUv,"," vec4(0.0),"," tDiffuse,"," tDiffuse,"," tDiffuse,"," resolution,"," vec4(0.0),"," vec4(0.0),"," vec4(0.0),"," 0.75,"," 0.166,"," 0.0833,"," 0.0,"," 0.0,"," 0.0,"," vec4(0.0)"," );",""," // TODO avoid querying texture twice for same texel"," gl_FragColor.a = texture2D(tDiffuse, vUv).a;","}"].join("\n")};t.FXAAShader=r},3600:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},time:{value:0},nIntensity:{value:.5},sIntensity:{value:.05},sCount:{value:4096},grayscale:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include ","uniform float time;","uniform bool grayscale;","uniform float nIntensity;","uniform float sIntensity;","uniform float sCount;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 cTextureScreen = texture2D( tDiffuse, vUv );","\tfloat dx = rand( vUv + time );","\tvec3 cResult = cTextureScreen.rgb + cTextureScreen.rgb * clamp( 0.1 + dx, 0.0, 1.0 );","\tvec2 sc = vec2( sin( vUv.y * sCount ), cos( vUv.y * sCount ) );","\tcResult += cTextureScreen.rgb * vec3( sc.x, sc.y, sc.x ) * sIntensity;","\tcResult = cTextureScreen.rgb + clamp( nIntensity, 0.0,1.0 ) * ( cResult - cTextureScreen.rgb );","\tif( grayscale ) {","\t\tcResult = vec3( cResult.r * 0.3 + cResult.g * 0.59 + cResult.b * 0.11 );","\t}","\tgl_FragColor = vec4( cResult, cTextureScreen.a );","}"].join("\n")};t.FilmShader=n},57500:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},screenWidth:{value:1024},screenHeight:{value:1024},sampleDistance:{value:.94},waveFactor:{value:.00125}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float screenWidth;","uniform float screenHeight;","uniform float sampleDistance;","uniform float waveFactor;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 color, org, tmp, add;","\tfloat sample_dist, f;","\tvec2 vin;","\tvec2 uv = vUv;","\tadd = color = org = texture2D( tDiffuse, uv );","\tvin = ( uv - vec2( 0.5 ) ) * vec2( 1.4 );","\tsample_dist = dot( vin, vin ) * 2.0;","\tf = ( waveFactor * 100.0 + sample_dist ) * sampleDistance * 4.0;","\tvec2 sampleSize = vec2( 1.0 / screenWidth, 1.0 / screenHeight ) * vec2( f );","\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.111964, 0.993712 ) * sampleSize );","\tif( tmp.b < color.b ) color = tmp;","\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.846724, 0.532032 ) * sampleSize );","\tif( tmp.b < color.b ) color = tmp;","\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.943883, -0.330279 ) * sampleSize );","\tif( tmp.b < color.b ) color = tmp;","\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.330279, -0.943883 ) * sampleSize );","\tif( tmp.b < color.b ) color = tmp;","\tadd += tmp = texture2D( tDiffuse, uv + vec2( -0.532032, -0.846724 ) * sampleSize );","\tif( tmp.b < color.b ) color = tmp;","\tadd += tmp = texture2D( tDiffuse, uv + vec2( -0.993712, -0.111964 ) * sampleSize );","\tif( tmp.b < color.b ) color = tmp;","\tadd += tmp = texture2D( tDiffuse, uv + vec2( -0.707107, 0.707107 ) * sampleSize );","\tif( tmp.b < color.b ) color = tmp;","\tcolor = color * vec4( 2.0 ) - ( add / vec4( 8.0 ) );","\tcolor = color + ( add / vec4( 8.0 ) - color ) * ( vec4( 1.0 ) - vec4( sample_dist * 0.5 ) );","\tgl_FragColor = vec4( color.rgb * color.rgb * vec3( 0.95 ) + color.rgb, 1.0 );","}"].join("\n")};t.FocusShader=n},38808:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r={uniforms:{tDiffuse:{value:null},aspect:{value:new(n(48480).Vector2)(512,512)}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","varying vec2 vUv;","uniform vec2 aspect;","vec2 texel = vec2(1.0 / aspect.x, 1.0 / aspect.y);","mat3 G[9];","const mat3 g0 = mat3( 0.3535533845424652, 0, -0.3535533845424652, 0.5, 0, -0.5, 0.3535533845424652, 0, -0.3535533845424652 );","const mat3 g1 = mat3( 0.3535533845424652, 0.5, 0.3535533845424652, 0, 0, 0, -0.3535533845424652, -0.5, -0.3535533845424652 );","const mat3 g2 = mat3( 0, 0.3535533845424652, -0.5, -0.3535533845424652, 0, 0.3535533845424652, 0.5, -0.3535533845424652, 0 );","const mat3 g3 = mat3( 0.5, -0.3535533845424652, 0, -0.3535533845424652, 0, 0.3535533845424652, 0, 0.3535533845424652, -0.5 );","const mat3 g4 = mat3( 0, -0.5, 0, 0.5, 0, 0.5, 0, -0.5, 0 );","const mat3 g5 = mat3( -0.5, 0, 0.5, 0, 0, 0, 0.5, 0, -0.5 );","const mat3 g6 = mat3( 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.6666666865348816, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204 );","const mat3 g7 = mat3( -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, 0.6666666865348816, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408 );","const mat3 g8 = mat3( 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408 );","void main(void)","{","\tG[0] = g0,","\tG[1] = g1,","\tG[2] = g2,","\tG[3] = g3,","\tG[4] = g4,","\tG[5] = g5,","\tG[6] = g6,","\tG[7] = g7,","\tG[8] = g8;","\tmat3 I;","\tfloat cnv[9];","\tvec3 sample;","\tfor (float i=0.0; i<3.0; i++) {","\t\tfor (float j=0.0; j<3.0; j++) {","\t\t\tsample = texture2D(tDiffuse, vUv + texel * vec2(i-1.0,j-1.0) ).rgb;","\t\t\tI[int(i)][int(j)] = length(sample);","\t\t}","\t}","\tfor (int i=0; i<9; i++) {","\t\tfloat dp3 = dot(G[i][0], I[0]) + dot(G[i][1], I[1]) + dot(G[i][2], I[2]);","\t\tcnv[i] = dp3 * dp3;","\t}","\tfloat M = (cnv[0] + cnv[1]) + (cnv[2] + cnv[3]);","\tfloat S = (cnv[4] + cnv[5]) + (cnv[6] + cnv[7]) + (cnv[8] + M);","\tgl_FragColor = vec4(vec3(sqrt(M/S)), 1.0);","}"].join("\n")};t.FreiChenShader=r},96096:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{mRefractionRatio:{value:1.02},mFresnelBias:{value:.1},mFresnelPower:{value:2},mFresnelScale:{value:1},tCube:{value:null}},vertexShader:["uniform float mRefractionRatio;","uniform float mFresnelBias;","uniform float mFresnelScale;","uniform float mFresnelPower;","varying vec3 vReflect;","varying vec3 vRefract[3];","varying float vReflectionFactor;","void main() {","\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );","\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );","\tvec3 worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );","\tvec3 I = worldPosition.xyz - cameraPosition;","\tvReflect = reflect( I, worldNormal );","\tvRefract[0] = refract( normalize( I ), worldNormal, mRefractionRatio );","\tvRefract[1] = refract( normalize( I ), worldNormal, mRefractionRatio * 0.99 );","\tvRefract[2] = refract( normalize( I ), worldNormal, mRefractionRatio * 0.98 );","\tvReflectionFactor = mFresnelBias + mFresnelScale * pow( 1.0 + dot( normalize( I ), worldNormal ), mFresnelPower );","\tgl_Position = projectionMatrix * mvPosition;","}"].join("\n"),fragmentShader:["uniform samplerCube tCube;","varying vec3 vReflect;","varying vec3 vRefract[3];","varying float vReflectionFactor;","void main() {","\tvec4 reflectedColor = textureCube( tCube, vec3( -vReflect.x, vReflect.yz ) );","\tvec4 refractedColor = vec4( 1.0 );","\trefractedColor.r = textureCube( tCube, vec3( -vRefract[0].x, vRefract[0].yz ) ).r;","\trefractedColor.g = textureCube( tCube, vec3( -vRefract[1].x, vRefract[1].yz ) ).g;","\trefractedColor.b = textureCube( tCube, vec3( -vRefract[2].x, vRefract[2].yz ) ).b;","\tgl_FragColor = mix( refractedColor, reflectedColor, clamp( vReflectionFactor, 0.0, 1.0 ) );","}"].join("\n")};t.FresnelShader=n},5676:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 tex = texture2D( tDiffuse, vUv );","\tgl_FragColor = LinearTosRGB( tex );","}"].join("\n")};t.GammaCorrectionShader=n},46016:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={uniforms:{tInput:{value:null}},vertexShader:["varying vec2 vUv;","void main() {"," vUv = uv;"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["varying vec2 vUv;","uniform sampler2D tInput;","void main() {","\tgl_FragColor = vec4( 1.0 ) - texture2D( tInput, vUv );","}"].join("\n")},s={uniforms:{tInput:{value:null},fStepSize:{value:1},vSunPositionScreenSpace:{value:new r.Vector3}},vertexShader:["varying vec2 vUv;","void main() {"," vUv = uv;"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#define TAPS_PER_PASS 6.0","varying vec2 vUv;","uniform sampler2D tInput;","uniform vec3 vSunPositionScreenSpace;","uniform float fStepSize;","void main() {","\tvec2 delta = vSunPositionScreenSpace.xy - vUv;","\tfloat dist = length( delta );","\tvec2 stepv = fStepSize * delta / dist;","\tfloat iters = dist/fStepSize;","\tvec2 uv = vUv.xy;","\tfloat col = 0.0;","\tfloat f = min( 1.0, max( vSunPositionScreenSpace.z / 1000.0, 0.0 ) );","\tif ( 0.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;","\tuv += stepv;","\tif ( 1.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;","\tuv += stepv;","\tif ( 2.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;","\tuv += stepv;","\tif ( 3.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;","\tuv += stepv;","\tif ( 4.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;","\tuv += stepv;","\tif ( 5.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;","\tuv += stepv;","\tgl_FragColor = vec4( col/TAPS_PER_PASS );","\tgl_FragColor.a = 1.0;","}"].join("\n")},a={uniforms:{tColors:{value:null},tGodRays:{value:null},fGodRayIntensity:{value:.69}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["varying vec2 vUv;","uniform sampler2D tColors;","uniform sampler2D tGodRays;","uniform float fGodRayIntensity;","void main() {","\tgl_FragColor = texture2D( tColors, vUv ) + fGodRayIntensity * vec4( 1.0 - texture2D( tGodRays, vUv ).r );","\tgl_FragColor.a = 1.0;","}"].join("\n")},o={uniforms:{vSunPositionScreenSpace:{value:new r.Vector3},fAspect:{value:1},sunColor:{value:new r.Color(16772608)},bgColor:{value:new r.Color(0)}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["varying vec2 vUv;","uniform vec3 vSunPositionScreenSpace;","uniform float fAspect;","uniform vec3 sunColor;","uniform vec3 bgColor;","void main() {","\tvec2 diff = vUv - vSunPositionScreenSpace.xy;","\tdiff.x *= fAspect;","\tfloat prop = clamp( length( diff ) / 0.5, 0.0, 1.0 );","\tprop = 0.35 * pow( 1.0 - prop, 3.0 );","\tgl_FragColor.xyz = ( vSunPositionScreenSpace.z > 0.0 ) ? mix( sunColor, bgColor, 1.0 - prop ) : bgColor;","\tgl_FragColor.w = 1.0;","}"].join("\n")};t.GodRaysCombineShader=a,t.GodRaysDepthMaskShader=i,t.GodRaysFakeSunShader=o,t.GodRaysGenerateShader=s},9603:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},shape:{value:1},radius:{value:4},rotateR:{value:Math.PI/12*1},rotateG:{value:Math.PI/12*2},rotateB:{value:Math.PI/12*3},scatter:{value:0},width:{value:1},height:{value:1},blending:{value:1},blendingMode:{value:1},greyscale:{value:!1},disable:{value:!1}},vertexShader:["varying vec2 vUV;","void main() {","\tvUV = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);","}"].join("\n"),fragmentShader:["#define SQRT2_MINUS_ONE 0.41421356","#define SQRT2_HALF_MINUS_ONE 0.20710678","#define PI2 6.28318531","#define SHAPE_DOT 1","#define SHAPE_ELLIPSE 2","#define SHAPE_LINE 3","#define SHAPE_SQUARE 4","#define BLENDING_LINEAR 1","#define BLENDING_MULTIPLY 2","#define BLENDING_ADD 3","#define BLENDING_LIGHTER 4","#define BLENDING_DARKER 5","uniform sampler2D tDiffuse;","uniform float radius;","uniform float rotateR;","uniform float rotateG;","uniform float rotateB;","uniform float scatter;","uniform float width;","uniform float height;","uniform int shape;","uniform bool disable;","uniform float blending;","uniform int blendingMode;","varying vec2 vUV;","uniform bool greyscale;","const int samples = 8;","float blend( float a, float b, float t ) {","\treturn a * ( 1.0 - t ) + b * t;","}","float hypot( float x, float y ) {","\treturn sqrt( x * x + y * y );","}","float rand( vec2 seed ){","return fract( sin( dot( seed.xy, vec2( 12.9898, 78.233 ) ) ) * 43758.5453 );","}","float distanceToDotRadius( float channel, vec2 coord, vec2 normal, vec2 p, float angle, float rad_max ) {","\tfloat dist = hypot( coord.x - p.x, coord.y - p.y );","\tfloat rad = channel;","\tif ( shape == SHAPE_DOT ) {","\t\trad = pow( abs( rad ), 1.125 ) * rad_max;","\t} else if ( shape == SHAPE_ELLIPSE ) {","\t\trad = pow( abs( rad ), 1.125 ) * rad_max;","\t\tif ( dist != 0.0 ) {","\t\t\tfloat dot_p = abs( ( p.x - coord.x ) / dist * normal.x + ( p.y - coord.y ) / dist * normal.y );","\t\t\tdist = ( dist * ( 1.0 - SQRT2_HALF_MINUS_ONE ) ) + dot_p * dist * SQRT2_MINUS_ONE;","\t\t}","\t} else if ( shape == SHAPE_LINE ) {","\t\trad = pow( abs( rad ), 1.5) * rad_max;","\t\tfloat dot_p = ( p.x - coord.x ) * normal.x + ( p.y - coord.y ) * normal.y;","\t\tdist = hypot( normal.x * dot_p, normal.y * dot_p );","\t} else if ( shape == SHAPE_SQUARE ) {","\t\tfloat theta = atan( p.y - coord.y, p.x - coord.x ) - angle;","\t\tfloat sin_t = abs( sin( theta ) );","\t\tfloat cos_t = abs( cos( theta ) );","\t\trad = pow( abs( rad ), 1.4 );","\t\trad = rad_max * ( rad + ( ( sin_t > cos_t ) ? rad - sin_t * rad : rad - cos_t * rad ) );","\t}","\treturn rad - dist;","}","struct Cell {","\tvec2 normal;","\tvec2 p1;","\tvec2 p2;","\tvec2 p3;","\tvec2 p4;","\tfloat samp2;","\tfloat samp1;","\tfloat samp3;","\tfloat samp4;","};","vec4 getSample( vec2 point ) {","\tvec4 tex = texture2D( tDiffuse, vec2( point.x / width, point.y / height ) );","\tfloat base = rand( vec2( floor( point.x ), floor( point.y ) ) ) * PI2;","\tfloat step = PI2 / float( samples );","\tfloat dist = radius * 0.66;","\tfor ( int i = 0; i < samples; ++i ) {","\t\tfloat r = base + step * float( i );","\t\tvec2 coord = point + vec2( cos( r ) * dist, sin( r ) * dist );","\t\ttex += texture2D( tDiffuse, vec2( coord.x / width, coord.y / height ) );","\t}","\ttex /= float( samples ) + 1.0;","\treturn tex;","}","float getDotColour( Cell c, vec2 p, int channel, float angle, float aa ) {","\tfloat dist_c_1, dist_c_2, dist_c_3, dist_c_4, res;","\tif ( channel == 0 ) {","\t\tc.samp1 = getSample( c.p1 ).r;","\t\tc.samp2 = getSample( c.p2 ).r;","\t\tc.samp3 = getSample( c.p3 ).r;","\t\tc.samp4 = getSample( c.p4 ).r;","\t} else if (channel == 1) {","\t\tc.samp1 = getSample( c.p1 ).g;","\t\tc.samp2 = getSample( c.p2 ).g;","\t\tc.samp3 = getSample( c.p3 ).g;","\t\tc.samp4 = getSample( c.p4 ).g;","\t} else {","\t\tc.samp1 = getSample( c.p1 ).b;","\t\tc.samp3 = getSample( c.p3 ).b;","\t\tc.samp2 = getSample( c.p2 ).b;","\t\tc.samp4 = getSample( c.p4 ).b;","\t}","\tdist_c_1 = distanceToDotRadius( c.samp1, c.p1, c.normal, p, angle, radius );","\tdist_c_2 = distanceToDotRadius( c.samp2, c.p2, c.normal, p, angle, radius );","\tdist_c_3 = distanceToDotRadius( c.samp3, c.p3, c.normal, p, angle, radius );","\tdist_c_4 = distanceToDotRadius( c.samp4, c.p4, c.normal, p, angle, radius );","\tres = ( dist_c_1 > 0.0 ) ? clamp( dist_c_1 / aa, 0.0, 1.0 ) : 0.0;","\tres += ( dist_c_2 > 0.0 ) ? clamp( dist_c_2 / aa, 0.0, 1.0 ) : 0.0;","\tres += ( dist_c_3 > 0.0 ) ? clamp( dist_c_3 / aa, 0.0, 1.0 ) : 0.0;","\tres += ( dist_c_4 > 0.0 ) ? clamp( dist_c_4 / aa, 0.0, 1.0 ) : 0.0;","\tres = clamp( res, 0.0, 1.0 );","\treturn res;","}","Cell getReferenceCell( vec2 p, vec2 origin, float grid_angle, float step ) {","\tCell c;","\tvec2 n = vec2( cos( grid_angle ), sin( grid_angle ) );","\tfloat threshold = step * 0.5;","\tfloat dot_normal = n.x * ( p.x - origin.x ) + n.y * ( p.y - origin.y );","\tfloat dot_line = -n.y * ( p.x - origin.x ) + n.x * ( p.y - origin.y );","\tvec2 offset = vec2( n.x * dot_normal, n.y * dot_normal );","\tfloat offset_normal = mod( hypot( offset.x, offset.y ), step );","\tfloat normal_dir = ( dot_normal < 0.0 ) ? 1.0 : -1.0;","\tfloat normal_scale = ( ( offset_normal < threshold ) ? -offset_normal : step - offset_normal ) * normal_dir;","\tfloat offset_line = mod( hypot( ( p.x - offset.x ) - origin.x, ( p.y - offset.y ) - origin.y ), step );","\tfloat line_dir = ( dot_line < 0.0 ) ? 1.0 : -1.0;","\tfloat line_scale = ( ( offset_line < threshold ) ? -offset_line : step - offset_line ) * line_dir;","\tc.normal = n;","\tc.p1.x = p.x - n.x * normal_scale + n.y * line_scale;","\tc.p1.y = p.y - n.y * normal_scale - n.x * line_scale;","\tif ( scatter != 0.0 ) {","\t\tfloat off_mag = scatter * threshold * 0.5;","\t\tfloat off_angle = rand( vec2( floor( c.p1.x ), floor( c.p1.y ) ) ) * PI2;","\t\tc.p1.x += cos( off_angle ) * off_mag;","\t\tc.p1.y += sin( off_angle ) * off_mag;","\t}","\tfloat normal_step = normal_dir * ( ( offset_normal < threshold ) ? step : -step );","\tfloat line_step = line_dir * ( ( offset_line < threshold ) ? step : -step );","\tc.p2.x = c.p1.x - n.x * normal_step;","\tc.p2.y = c.p1.y - n.y * normal_step;","\tc.p3.x = c.p1.x + n.y * line_step;","\tc.p3.y = c.p1.y - n.x * line_step;","\tc.p4.x = c.p1.x - n.x * normal_step + n.y * line_step;","\tc.p4.y = c.p1.y - n.y * normal_step - n.x * line_step;","\treturn c;","}","float blendColour( float a, float b, float t ) {","\tif ( blendingMode == BLENDING_LINEAR ) {","\t\treturn blend( a, b, 1.0 - t );","\t} else if ( blendingMode == BLENDING_ADD ) {","\t\treturn blend( a, min( 1.0, a + b ), t );","\t} else if ( blendingMode == BLENDING_MULTIPLY ) {","\t\treturn blend( a, max( 0.0, a * b ), t );","\t} else if ( blendingMode == BLENDING_LIGHTER ) {","\t\treturn blend( a, max( a, b ), t );","\t} else if ( blendingMode == BLENDING_DARKER ) {","\t\treturn blend( a, min( a, b ), t );","\t} else {","\t\treturn blend( a, b, 1.0 - t );","\t}","}","void main() {","\tif ( ! disable ) {","\t\tvec2 p = vec2( vUV.x * width, vUV.y * height );","\t\tvec2 origin = vec2( 0, 0 );","\t\tfloat aa = ( radius < 2.5 ) ? radius * 0.5 : 1.25;","\t\tCell cell_r = getReferenceCell( p, origin, rotateR, radius );","\t\tCell cell_g = getReferenceCell( p, origin, rotateG, radius );","\t\tCell cell_b = getReferenceCell( p, origin, rotateB, radius );","\t\tfloat r = getDotColour( cell_r, p, 0, rotateR, aa );","\t\tfloat g = getDotColour( cell_g, p, 1, rotateG, aa );","\t\tfloat b = getDotColour( cell_b, p, 2, rotateB, aa );","\t\tvec4 colour = texture2D( tDiffuse, vUV );","\t\tr = blendColour( r, colour.r, blending );","\t\tg = blendColour( g, colour.g, blending );","\t\tb = blendColour( b, colour.b, blending );","\t\tif ( greyscale ) {","\t\t\tr = g = b = (r + b + g) / 3.0;","\t\t}","\t\tgl_FragColor = vec4( r, g, b, 1.0 );","\t} else {","\t\tgl_FragColor = texture2D( tDiffuse, vUV );","\t}","}"].join("\n")};t.HalftoneShader=n},97712:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:"\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ",fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform float h;\n\n varying vec2 vUv;\n\n void main() {\n\n \tvec4 sum = vec4( 0.0 );\n\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;\n\n \tgl_FragColor = sum;\n\n }\n "};t.HorizontalBlurShader=n},47992:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},h:{value:1/512},r:{value:.35}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float h;","uniform float r;","varying vec2 vUv;","void main() {","\tvec4 sum = vec4( 0.0 );","\tfloat hh = h * abs( r - vUv.y );","\tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * hh, vUv.y ) ) * 0.051;","\tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * hh, vUv.y ) ) * 0.0918;","\tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * hh, vUv.y ) ) * 0.12245;","\tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * hh, vUv.y ) ) * 0.1531;","\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","\tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * hh, vUv.y ) ) * 0.1531;","\tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * hh, vUv.y ) ) * 0.12245;","\tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * hh, vUv.y ) ) * 0.0918;","\tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * hh, vUv.y ) ) * 0.051;","\tgl_FragColor = sum;","}"].join("\n")};t.HorizontalTiltShiftShader=n},42640:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},hue:{value:0},saturation:{value:0}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float hue;","uniform float saturation;","varying vec2 vUv;","void main() {","\tgl_FragColor = texture2D( tDiffuse, vUv );","\tfloat angle = hue * 3.14159265;","\tfloat s = sin(angle), c = cos(angle);","\tvec3 weights = (vec3(2.0 * c, -sqrt(3.0) * s - c, sqrt(3.0) * s - c) + 1.0) / 3.0;","\tfloat len = length(gl_FragColor.rgb);","\tgl_FragColor.rgb = vec3(","\t\tdot(gl_FragColor.rgb, weights.xyz),","\t\tdot(gl_FragColor.rgb, weights.zxy),","\t\tdot(gl_FragColor.rgb, weights.yzx)","\t);","\tfloat average = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;","\tif (saturation > 0.0) {","\t\tgl_FragColor.rgb += (average - gl_FragColor.rgb) * (1.0 - 1.0 / (1.001 - saturation));","\t} else {","\t\tgl_FragColor.rgb += (average - gl_FragColor.rgb) * (-saturation);","\t}","}"].join("\n")};t.HueSaturationShader=n},46152:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},sides:{value:6},angle:{value:0}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float sides;","uniform float angle;","varying vec2 vUv;","void main() {","\tvec2 p = vUv - 0.5;","\tfloat r = length(p);","\tfloat a = atan(p.y, p.x) + angle;","\tfloat tau = 2. * 3.1416 ;","\ta = mod(a, tau/sides);","\ta = abs(a - tau/sides/2.) ;","\tp = r * vec2(cos(a), sin(a));","\tvec4 color = texture2D(tDiffuse, p + 0.5);","\tgl_FragColor = color;","}"].join("\n")};t.KaleidoShader=n},86716:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r={shaderID:"luminosityHighPass",uniforms:{tDiffuse:{value:null},luminosityThreshold:{value:1},smoothWidth:{value:1},defaultColor:{value:new(n(48480).Color)(0)},defaultOpacity:{value:0}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform vec3 defaultColor;","uniform float defaultOpacity;","uniform float luminosityThreshold;","uniform float smoothWidth;","varying vec2 vUv;","void main() {","\tvec4 texel = texture2D( tDiffuse, vUv );","\tvec3 luma = vec3( 0.299, 0.587, 0.114 );","\tfloat v = dot( texel.xyz, luma );","\tvec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );","\tfloat alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );","\tgl_FragColor = mix( outputColor, texel, alpha );","}"].join("\n")};t.LuminosityHighPassShader=r},45264:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include ","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 texel = texture2D( tDiffuse, vUv );","\tfloat l = linearToRelativeLuminance( texel.rgb );","\tgl_FragColor = vec4( l, l, l, texel.w );","}"].join("\n")};t.LuminosityShader=n},78312:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},side:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform int side;","varying vec2 vUv;","void main() {","\tvec2 p = vUv;","\tif (side == 0){","\t\tif (p.x > 0.5) p.x = 1.0 - p.x;","\t}else if (side == 1){","\t\tif (p.x < 0.5) p.x = 1.0 - p.x;","\t}else if (side == 2){","\t\tif (p.y < 0.5) p.y = 1.0 - p.y;","\t}else if (side == 3){","\t\tif (p.y > 0.5) p.y = 1.0 - p.y;","\t} ","\tvec4 color = texture2D(tDiffuse, p);","\tgl_FragColor = color;","}"].join("\n")};t.MirrorShader=n},35568:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={uniforms:{heightMap:{value:null},resolution:{value:new r.Vector2(512,512)},scale:{value:new r.Vector2(1,1)},height:{value:.05}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float height;","uniform vec2 resolution;","uniform sampler2D heightMap;","varying vec2 vUv;","void main() {","\tfloat val = texture2D( heightMap, vUv ).x;","\tfloat valU = texture2D( heightMap, vUv + vec2( 1.0 / resolution.x, 0.0 ) ).x;","\tfloat valV = texture2D( heightMap, vUv + vec2( 0.0, 1.0 / resolution.y ) ).x;","\tgl_FragColor = vec4( ( 0.5 * normalize( vec3( val - valU, val - valV, height ) ) + 0.5 ), 1.0 );","}"].join("\n")};t.NormalMapShader=i},80777:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={modes:{none:"NO_PARALLAX",basic:"USE_BASIC_PARALLAX",steep:"USE_STEEP_PARALLAX",occlusion:"USE_OCLUSION_PARALLAX",relief:"USE_RELIEF_PARALLAX"},uniforms:{bumpMap:{value:null},map:{value:null},parallaxScale:{value:null},parallaxMinLayers:{value:null},parallaxMaxLayers:{value:null}},vertexShader:["varying vec2 vUv;","varying vec3 vViewPosition;","varying vec3 vNormal;","void main() {","\tvUv = uv;","\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );","\tvViewPosition = -mvPosition.xyz;","\tvNormal = normalize( normalMatrix * normal );","\tgl_Position = projectionMatrix * mvPosition;","}"].join("\n"),fragmentShader:["uniform sampler2D bumpMap;","uniform sampler2D map;","uniform float parallaxScale;","uniform float parallaxMinLayers;","uniform float parallaxMaxLayers;","varying vec2 vUv;","varying vec3 vViewPosition;","varying vec3 vNormal;","#ifdef USE_BASIC_PARALLAX","\tvec2 parallaxMap( in vec3 V ) {","\t\tfloat initialHeight = texture2D( bumpMap, vUv ).r;","\t\tvec2 texCoordOffset = parallaxScale * V.xy * initialHeight;","\t\treturn vUv - texCoordOffset;","\t}","#else","\tvec2 parallaxMap( in vec3 V ) {","\t\tfloat numLayers = mix( parallaxMaxLayers, parallaxMinLayers, abs( dot( vec3( 0.0, 0.0, 1.0 ), V ) ) );","\t\tfloat layerHeight = 1.0 / numLayers;","\t\tfloat currentLayerHeight = 0.0;","\t\tvec2 dtex = parallaxScale * V.xy / V.z / numLayers;","\t\tvec2 currentTextureCoords = vUv;","\t\tfloat heightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;","\t\tfor ( int i = 0; i < 30; i += 1 ) {","\t\t\tif ( heightFromTexture <= currentLayerHeight ) {","\t\t\t\tbreak;","\t\t\t}","\t\t\tcurrentLayerHeight += layerHeight;","\t\t\tcurrentTextureCoords -= dtex;","\t\t\theightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;","\t\t}","\t\t#ifdef USE_STEEP_PARALLAX","\t\t\treturn currentTextureCoords;","\t\t#elif defined( USE_RELIEF_PARALLAX )","\t\t\tvec2 deltaTexCoord = dtex / 2.0;","\t\t\tfloat deltaHeight = layerHeight / 2.0;","\t\t\tcurrentTextureCoords += deltaTexCoord;","\t\t\tcurrentLayerHeight -= deltaHeight;","\t\t\tconst int numSearches = 5;","\t\t\tfor ( int i = 0; i < numSearches; i += 1 ) {","\t\t\t\tdeltaTexCoord /= 2.0;","\t\t\t\tdeltaHeight /= 2.0;","\t\t\t\theightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;","\t\t\t\tif( heightFromTexture > currentLayerHeight ) {","\t\t\t\t\tcurrentTextureCoords -= deltaTexCoord;","\t\t\t\t\tcurrentLayerHeight += deltaHeight;","\t\t\t\t} else {","\t\t\t\t\tcurrentTextureCoords += deltaTexCoord;","\t\t\t\t\tcurrentLayerHeight -= deltaHeight;","\t\t\t\t}","\t\t\t}","\t\t\treturn currentTextureCoords;","\t\t#elif defined( USE_OCLUSION_PARALLAX )","\t\t\tvec2 prevTCoords = currentTextureCoords + dtex;","\t\t\tfloat nextH = heightFromTexture - currentLayerHeight;","\t\t\tfloat prevH = texture2D( bumpMap, prevTCoords ).r - currentLayerHeight + layerHeight;","\t\t\tfloat weight = nextH / ( nextH - prevH );","\t\t\treturn prevTCoords * weight + currentTextureCoords * ( 1.0 - weight );","\t\t#else","\t\t\treturn vUv;","\t\t#endif","\t}","#endif","vec2 perturbUv( vec3 surfPosition, vec3 surfNormal, vec3 viewPosition ) {","\tvec2 texDx = dFdx( vUv );","\tvec2 texDy = dFdy( vUv );","\tvec3 vSigmaX = dFdx( surfPosition );","\tvec3 vSigmaY = dFdy( surfPosition );","\tvec3 vR1 = cross( vSigmaY, surfNormal );","\tvec3 vR2 = cross( surfNormal, vSigmaX );","\tfloat fDet = dot( vSigmaX, vR1 );","\tvec2 vProjVscr = ( 1.0 / fDet ) * vec2( dot( vR1, viewPosition ), dot( vR2, viewPosition ) );","\tvec3 vProjVtex;","\tvProjVtex.xy = texDx * vProjVscr.x + texDy * vProjVscr.y;","\tvProjVtex.z = dot( surfNormal, viewPosition );","\treturn parallaxMap( vProjVtex );","}","void main() {","\tvec2 mapUv = perturbUv( -vViewPosition, normalize( vNormal ), normalize( vViewPosition ) );","\tgl_FragColor = texture2D( map, mapUv );","}"].join("\n")};t.ParallaxShader=n},5948:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},resolution:{value:null},pixelSize:{value:1}},vertexShader:["varying highp vec2 vUv;","void main() {","vUv = uv;","gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float pixelSize;","uniform vec2 resolution;","varying highp vec2 vUv;","void main(){","vec2 dxy = pixelSize / resolution;","vec2 coord = dxy * floor( vUv / dxy );","gl_FragColor = texture2D(tDiffuse, coord);","}"].join("\n")};t.PixelShader=n},31136:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},amount:{value:.005},angle:{value:0}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float amount;","uniform float angle;","varying vec2 vUv;","void main() {","\tvec2 offset = amount * vec2( cos(angle), sin(angle));","\tvec4 cr = texture2D(tDiffuse, vUv + offset);","\tvec4 cga = texture2D(tDiffuse, vUv);","\tvec4 cb = texture2D(tDiffuse, vUv - offset);","\tgl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);","}"].join("\n")};t.RGBShiftShader=n},7412:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={defines:{NUM_SAMPLES:7,NUM_RINGS:4,NORMAL_TEXTURE:0,DIFFUSE_TEXTURE:0,DEPTH_PACKING:1,PERSPECTIVE_CAMERA:1},uniforms:{tDepth:{value:null},tDiffuse:{value:null},tNormal:{value:null},size:{value:new r.Vector2(512,512)},cameraNear:{value:1},cameraFar:{value:100},cameraProjectionMatrix:{value:new r.Matrix4},cameraInverseProjectionMatrix:{value:new r.Matrix4},scale:{value:1},intensity:{value:.1},bias:{value:.5},minResolution:{value:0},kernelRadius:{value:100},randomSeed:{value:0}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include ","varying vec2 vUv;","#if DIFFUSE_TEXTURE == 1","uniform sampler2D tDiffuse;","#endif","uniform sampler2D tDepth;","#if NORMAL_TEXTURE == 1","uniform sampler2D tNormal;","#endif","uniform float cameraNear;","uniform float cameraFar;","uniform mat4 cameraProjectionMatrix;","uniform mat4 cameraInverseProjectionMatrix;","uniform float scale;","uniform float intensity;","uniform float bias;","uniform float kernelRadius;","uniform float minResolution;","uniform vec2 size;","uniform float randomSeed;","// RGBA depth","#include ","vec4 getDefaultColor( const in vec2 screenPosition ) {","\t#if DIFFUSE_TEXTURE == 1","\treturn texture2D( tDiffuse, vUv );","\t#else","\treturn vec4( 1.0 );","\t#endif","}","float getDepth( const in vec2 screenPosition ) {","\t#if DEPTH_PACKING == 1","\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );","\t#else","\treturn texture2D( tDepth, screenPosition ).x;","\t#endif","}","float getViewZ( const in float depth ) {","\t#if PERSPECTIVE_CAMERA == 1","\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );","\t#else","\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );","\t#endif","}","vec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {","\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];","\tvec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );","\tclipPosition *= clipW; // unprojection.","\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;","}","vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPosition ) {","\t#if NORMAL_TEXTURE == 1","\treturn unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );","\t#else","\treturn normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );","\t#endif","}","float scaleDividedByCameraFar;","float minResolutionMultipliedByCameraFar;","float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {","\tvec3 viewDelta = sampleViewPosition - centerViewPosition;","\tfloat viewDistance = length( viewDelta );","\tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;","\treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - bias) / (1.0 + pow2( scaledScreenDistance ) );","}","// moving costly divides into consts","const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );","const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );","float getAmbientOcclusion( const in vec3 centerViewPosition ) {","\t// precompute some variables require in getOcclusion.","\tscaleDividedByCameraFar = scale / cameraFar;","\tminResolutionMultipliedByCameraFar = minResolution * cameraFar;","\tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUv );","\t// jsfiddle that shows sample pattern: https://jsfiddle.net/a16ff1p7/","\tfloat angle = rand( vUv + randomSeed ) * PI2;","\tvec2 radius = vec2( kernelRadius * INV_NUM_SAMPLES ) / size;","\tvec2 radiusStep = radius;","\tfloat occlusionSum = 0.0;","\tfloat weightSum = 0.0;","\tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {","\t\tvec2 sampleUv = vUv + vec2( cos( angle ), sin( angle ) ) * radius;","\t\tradius += radiusStep;","\t\tangle += ANGLE_STEP;","\t\tfloat sampleDepth = getDepth( sampleUv );","\t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {","\t\t\tcontinue;","\t\t}","\t\tfloat sampleViewZ = getViewZ( sampleDepth );","\t\tvec3 sampleViewPosition = getViewPosition( sampleUv, sampleDepth, sampleViewZ );","\t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );","\t\tweightSum += 1.0;","\t}","\tif( weightSum == 0.0 ) discard;","\treturn occlusionSum * ( intensity / weightSum );","}","void main() {","\tfloat centerDepth = getDepth( vUv );","\tif( centerDepth >= ( 1.0 - EPSILON ) ) {","\t\tdiscard;","\t}","\tfloat centerViewZ = getViewZ( centerDepth );","\tvec3 viewPosition = getViewPosition( vUv, centerDepth, centerViewZ );","\tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );","\tgl_FragColor = getDefaultColor( vUv );","\tgl_FragColor.xyz *= 1.0 - ambientOcclusion;","}"].join("\n")};t.SAOShader=i},99440:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={defines:{SMAA_THRESHOLD:"0.1"},uniforms:{tDiffuse:{value:null},resolution:{value:new r.Vector2(1/1024,1/512)}},vertexShader:["uniform vec2 resolution;","varying vec2 vUv;","varying vec4 vOffset[ 3 ];","void SMAAEdgeDetectionVS( vec2 texcoord ) {","\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );","\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );","\tvOffset[ 2 ] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 );","}","void main() {","\tvUv = uv;","\tSMAAEdgeDetectionVS( vUv );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","varying vec2 vUv;","varying vec4 vOffset[ 3 ];","vec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {","\tvec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );","\tvec4 delta;","\tvec3 C = texture2D( colorTex, texcoord ).rgb;","\tvec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;","\tvec3 t = abs( C - Cleft );","\tdelta.x = max( max( t.r, t.g ), t.b );","\tvec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;","\tt = abs( C - Ctop );","\tdelta.y = max( max( t.r, t.g ), t.b );","\tvec2 edges = step( threshold, delta.xy );","\tif ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )","\t\tdiscard;","\tvec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;","\tt = abs( C - Cright );","\tdelta.z = max( max( t.r, t.g ), t.b );","\tvec3 Cbottom = texture2D( colorTex, offset[1].zw ).rgb;","\tt = abs( C - Cbottom );","\tdelta.w = max( max( t.r, t.g ), t.b );","\tfloat maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );","\tvec3 Cleftleft = texture2D( colorTex, offset[2].xy ).rgb;","\tt = abs( C - Cleftleft );","\tdelta.z = max( max( t.r, t.g ), t.b );","\tvec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;","\tt = abs( C - Ctoptop );","\tdelta.w = max( max( t.r, t.g ), t.b );","\tmaxDelta = max( max( maxDelta, delta.z ), delta.w );","\tedges.xy *= step( 0.5 * maxDelta, delta.xy );","\treturn vec4( edges, 0.0, 0.0 );","}","void main() {","\tgl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );","}"].join("\n")},s={defines:{SMAA_MAX_SEARCH_STEPS:"8",SMAA_AREATEX_MAX_DISTANCE:"16",SMAA_AREATEX_PIXEL_SIZE:"( 1.0 / vec2( 160.0, 560.0 ) )",SMAA_AREATEX_SUBTEX_SIZE:"( 1.0 / 7.0 )"},uniforms:{tDiffuse:{value:null},tArea:{value:null},tSearch:{value:null},resolution:{value:new r.Vector2(1/1024,1/512)}},vertexShader:["uniform vec2 resolution;","varying vec2 vUv;","varying vec4 vOffset[ 3 ];","varying vec2 vPixcoord;","void SMAABlendingWeightCalculationVS( vec2 texcoord ) {","\tvPixcoord = texcoord / resolution;","\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 );","\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 );","\tvOffset[ 2 ] = vec4( vOffset[ 0 ].xz, vOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );","}","void main() {","\tvUv = uv;","\tSMAABlendingWeightCalculationVS( vUv );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * resolution, 0.0 )","uniform sampler2D tDiffuse;","uniform sampler2D tArea;","uniform sampler2D tSearch;","uniform vec2 resolution;","varying vec2 vUv;","varying vec4 vOffset[3];","varying vec2 vPixcoord;","#if __VERSION__ == 100","vec2 round( vec2 x ) {","\treturn sign( x ) * floor( abs( x ) + 0.5 );","}","#endif","float SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {","\te.r = bias + e.r * scale;","\treturn 255.0 * texture2D( searchTex, e, 0.0 ).r;","}","float SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {","\tvec2 e = vec2( 0.0, 1.0 );","\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {","\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;","\t\ttexcoord -= vec2( 2.0, 0.0 ) * resolution;","\t\tif ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;","\t}","\ttexcoord.x += 0.25 * resolution.x;","\ttexcoord.x += resolution.x;","\ttexcoord.x += 2.0 * resolution.x;","\ttexcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);","\treturn texcoord.x;","}","float SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {","\tvec2 e = vec2( 0.0, 1.0 );","\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {","\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;","\t\ttexcoord += vec2( 2.0, 0.0 ) * resolution;","\t\tif ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;","\t}","\ttexcoord.x -= 0.25 * resolution.x;","\ttexcoord.x -= resolution.x;","\ttexcoord.x -= 2.0 * resolution.x;","\ttexcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );","\treturn texcoord.x;","}","float SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {","\tvec2 e = vec2( 1.0, 0.0 );","\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {","\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;","\t\ttexcoord += vec2( 0.0, 2.0 ) * resolution;","\t\tif ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;","\t}","\ttexcoord.y -= 0.25 * resolution.y;","\ttexcoord.y -= resolution.y;","\ttexcoord.y -= 2.0 * resolution.y;","\ttexcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 );","\treturn texcoord.y;","}","float SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {","\tvec2 e = vec2( 1.0, 0.0 );","\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {","\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;","\t\ttexcoord -= vec2( 0.0, 2.0 ) * resolution;","\t\tif ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;","\t}","\ttexcoord.y += 0.25 * resolution.y;","\ttexcoord.y += resolution.y;","\ttexcoord.y += 2.0 * resolution.y;","\ttexcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 );","\treturn texcoord.y;","}","vec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {","\tvec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;","\ttexcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );","\ttexcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;","\treturn texture2D( areaTex, texcoord, 0.0 ).rg;","}","vec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {","\tvec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );","\tvec2 e = texture2D( edgesTex, texcoord ).rg;","\tif ( e.g > 0.0 ) {","\t\tvec2 d;","\t\tvec2 coords;","\t\tcoords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );","\t\tcoords.y = offset[ 1 ].y;","\t\td.x = coords.x;","\t\tfloat e1 = texture2D( edgesTex, coords, 0.0 ).r;","\t\tcoords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );","\t\td.y = coords.x;","\t\td = d / resolution.x - pixcoord.x;","\t\tvec2 sqrt_d = sqrt( abs( d ) );","\t\tcoords.y -= 1.0 * resolution.y;","\t\tfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;","\t\tweights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );","\t}","\tif ( e.r > 0.0 ) {","\t\tvec2 d;","\t\tvec2 coords;","\t\tcoords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );","\t\tcoords.x = offset[ 0 ].x;","\t\td.x = coords.y;","\t\tfloat e1 = texture2D( edgesTex, coords, 0.0 ).g;","\t\tcoords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );","\t\td.y = coords.y;","\t\td = d / resolution.y - pixcoord.y;","\t\tvec2 sqrt_d = sqrt( abs( d ) );","\t\tcoords.y -= 1.0 * resolution.y;","\t\tfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;","\t\tweights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );","\t}","\treturn weights;","}","void main() {","\tgl_FragColor = SMAABlendingWeightCalculationPS( vUv, vPixcoord, vOffset, tDiffuse, tArea, tSearch, ivec4( 0.0 ) );","}"].join("\n")},a={uniforms:{tDiffuse:{value:null},tColor:{value:null},resolution:{value:new r.Vector2(1/1024,1/512)}},vertexShader:["uniform vec2 resolution;","varying vec2 vUv;","varying vec4 vOffset[ 2 ];","void SMAANeighborhoodBlendingVS( vec2 texcoord ) {","\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );","\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );","}","void main() {","\tvUv = uv;","\tSMAANeighborhoodBlendingVS( vUv );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform sampler2D tColor;","uniform vec2 resolution;","varying vec2 vUv;","varying vec4 vOffset[ 2 ];","vec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {","\tvec4 a;","\ta.xz = texture2D( blendTex, texcoord ).xz;","\ta.y = texture2D( blendTex, offset[ 1 ].zw ).g;","\ta.w = texture2D( blendTex, offset[ 1 ].xy ).a;","\tif ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {","\t\treturn texture2D( colorTex, texcoord, 0.0 );","\t} else {","\t\tvec2 offset;","\t\toffset.x = a.a > a.b ? a.a : -a.b;","\t\toffset.y = a.g > a.r ? -a.g : a.r;","\t\tif ( abs( offset.x ) > abs( offset.y )) {","\t\t\toffset.y = 0.0;","\t\t} else {","\t\t\toffset.x = 0.0;","\t\t}","\t\tvec4 C = texture2D( colorTex, texcoord, 0.0 );","\t\ttexcoord += sign( offset ) * resolution;","\t\tvec4 Cop = texture2D( colorTex, texcoord, 0.0 );","\t\tfloat s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );","\t\tC.xyz = pow(C.xyz, vec3(2.2));","\t\tCop.xyz = pow(Cop.xyz, vec3(2.2));","\t\tvec4 mixed = mix(C, Cop, s);","\t\tmixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));","\t\treturn mixed;","\t}","}","void main() {","\tgl_FragColor = SMAANeighborhoodBlendingPS( vUv, vOffset, tColor, tDiffuse );","}"].join("\n")};t.SMAABlendShader=a,t.SMAAEdgesShader=i,t.SMAAWeightsShader=s},92504:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={defines:{PERSPECTIVE_CAMERA:1,KERNEL_SIZE:32},uniforms:{tDiffuse:{value:null},tNormal:{value:null},tDepth:{value:null},tNoise:{value:null},kernel:{value:null},cameraNear:{value:null},cameraFar:{value:null},resolution:{value:new r.Vector2},cameraProjectionMatrix:{value:new r.Matrix4},cameraInverseProjectionMatrix:{value:new r.Matrix4},kernelRadius:{value:8},minDistance:{value:.005},maxDistance:{value:.05}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform sampler2D tNormal;","uniform sampler2D tDepth;","uniform sampler2D tNoise;","uniform vec3 kernel[ KERNEL_SIZE ];","uniform vec2 resolution;","uniform float cameraNear;","uniform float cameraFar;","uniform mat4 cameraProjectionMatrix;","uniform mat4 cameraInverseProjectionMatrix;","uniform float kernelRadius;","uniform float minDistance;","uniform float maxDistance;","varying vec2 vUv;","#include ","float getDepth( const in vec2 screenPosition ) {","\treturn texture2D( tDepth, screenPosition ).x;","}","float getLinearDepth( const in vec2 screenPosition ) {","\t#if PERSPECTIVE_CAMERA == 1","\t\tfloat fragCoordZ = texture2D( tDepth, screenPosition ).x;","\t\tfloat viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );","\t\treturn viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );","\t#else","\t\treturn texture2D( tDepth, screenPosition ).x;","\t#endif","}","float getViewZ( const in float depth ) {","\t#if PERSPECTIVE_CAMERA == 1","\t\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );","\t#else","\t\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );","\t#endif","}","vec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {","\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];","\tvec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );","\tclipPosition *= clipW; // unprojection.","\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;","}","vec3 getViewNormal( const in vec2 screenPosition ) {","\treturn unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );","}","void main() {","\tfloat depth = getDepth( vUv );","\tfloat viewZ = getViewZ( depth );","\tvec3 viewPosition = getViewPosition( vUv, depth, viewZ );","\tvec3 viewNormal = getViewNormal( vUv );"," vec2 noiseScale = vec2( resolution.x / 4.0, resolution.y / 4.0 );","\tvec3 random = texture2D( tNoise, vUv * noiseScale ).xyz;","\tvec3 tangent = normalize( random - viewNormal * dot( random, viewNormal ) );","\tvec3 bitangent = cross( viewNormal, tangent );","\tmat3 kernelMatrix = mat3( tangent, bitangent, viewNormal );"," float occlusion = 0.0;"," for ( int i = 0; i < KERNEL_SIZE; i ++ ) {","\t\tvec3 sampleVector = kernelMatrix * kernel[ i ];","\t\tvec3 samplePoint = viewPosition + ( sampleVector * kernelRadius );","\t\tvec4 samplePointNDC = cameraProjectionMatrix * vec4( samplePoint, 1.0 );","\t\tsamplePointNDC /= samplePointNDC.w;","\t\tvec2 samplePointUv = samplePointNDC.xy * 0.5 + 0.5;","\t\tfloat realDepth = getLinearDepth( samplePointUv );","\t\tfloat sampleDepth = viewZToOrthographicDepth( samplePoint.z, cameraNear, cameraFar );","\t\tfloat delta = sampleDepth - realDepth;","\t\tif ( delta > minDistance && delta < maxDistance ) {","\t\t\tocclusion += 1.0;","\t\t}","\t}","\tocclusion = clamp( occlusion / float( KERNEL_SIZE ), 0.0, 1.0 );","\tgl_FragColor = vec4( vec3( 1.0 - occlusion ), 1.0 );","}"].join("\n")},s={defines:{PERSPECTIVE_CAMERA:1},uniforms:{tDepth:{value:null},cameraNear:{value:null},cameraFar:{value:null}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDepth;","uniform float cameraNear;","uniform float cameraFar;","varying vec2 vUv;","#include ","float getLinearDepth( const in vec2 screenPosition ) {","\t#if PERSPECTIVE_CAMERA == 1","\t\tfloat fragCoordZ = texture2D( tDepth, screenPosition ).x;","\t\tfloat viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );","\t\treturn viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );","\t#else","\t\treturn texture2D( tDepth, screenPosition ).x;","\t#endif","}","void main() {","\tfloat depth = getLinearDepth( vUv );","\tgl_FragColor = vec4( vec3( 1.0 - depth ), 1.0 );","}"].join("\n")},a={uniforms:{tDiffuse:{value:null},resolution:{value:new r.Vector2}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform vec2 resolution;","varying vec2 vUv;","void main() {","\tvec2 texelSize = ( 1.0 / resolution );","\tfloat result = 0.0;","\tfor ( int i = - 2; i <= 2; i ++ ) {","\t\tfor ( int j = - 2; j <= 2; j ++ ) {","\t\t\tvec2 offset = ( vec2( float( i ), float( j ) ) ) * texelSize;","\t\t\tresult += texture2D( tDiffuse, vUv + offset ).r;","\t\t}","\t}","\tgl_FragColor = vec4( vec3( result / ( 5.0 * 5.0 ) ), 1.0 );","}"].join("\n")};t.SSAOBlurShader=a,t.SSAODepthShader=s,t.SSAOShader=i},98589:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={defines:{MAX_STEP:0,isPerspectiveCamera:!0,isDistanceAttenuation:!0,isFresnel:!0,isInfiniteThick:!1,isSelective:!1},uniforms:{tDiffuse:{value:null},tNormal:{value:null},tMetalness:{value:null},tDepth:{value:null},cameraNear:{value:null},cameraFar:{value:null},resolution:{value:new r.Vector2},cameraProjectionMatrix:{value:new r.Matrix4},cameraInverseProjectionMatrix:{value:new r.Matrix4},opacity:{value:.5},maxDistance:{value:180},cameraRange:{value:0},surfDist:{value:.007},thickTolerance:{value:.03}},vertexShader:"\n\n varying vec2 vUv;\n\n void main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n\n ",fragmentShader:"\n\t\t// precision highp float;\n\t\tprecision highp sampler2D;\n\t\tvarying vec2 vUv;\n\t\tuniform sampler2D tDepth;\n\t\tuniform sampler2D tNormal;\n\t\tuniform sampler2D tMetalness;\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform float cameraRange;\n\t\tuniform vec2 resolution;\n\t\tuniform float opacity;\n\t\tuniform float cameraNear;\n\t\tuniform float cameraFar;\n\t\tuniform float maxDistance;\n\t\tuniform float surfDist;\n\t\tuniform mat4 cameraProjectionMatrix;\n\t\tuniform mat4 cameraInverseProjectionMatrix;\n\t\tuniform float thickTolerance;\n\t\t#include \n\t\tfloat pointToLineDistance(vec3 x0, vec3 x1, vec3 x2) {\n\t\t\t//x0: point, x1: linePointA, x2: linePointB\n\t\t\t//https://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html\n\t\t\treturn length(cross(x0-x1,x0-x2))/length(x2-x1);\n\t\t}\n\t\tfloat pointPlaneDistance(vec3 point,vec3 planePoint,vec3 planeNormal){\n\t\t\t// https://mathworld.wolfram.com/Point-PlaneDistance.html\n\t\t\t//// https://en.wikipedia.org/wiki/Plane_(geometry)\n\t\t\t//// http://paulbourke.net/geometry/pointlineplane/\n\t\t\tfloat a=planeNormal.x,b=planeNormal.y,c=planeNormal.z;\n\t\t\tfloat x0=point.x,y0=point.y,z0=point.z;\n\t\t\tfloat x=planePoint.x,y=planePoint.y,z=planePoint.z;\n\t\t\tfloat d=-(a*x+b*y+c*z);\n\t\t\tfloat distance=(a*x0+b*y0+c*z0+d)/sqrt(a*a+b*b+c*c);\n\t\t\treturn distance;\n\t\t}\n\t\tfloat getDepth( const in vec2 uv ) {\n\t\t\treturn texture2D( tDepth, uv ).x;\n\t\t}\n\t\tfloat getViewZ( const in float depth ) {\n\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#else\n\t\t\t\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#endif\n\t\t}\n\t\tvec3 getViewPosition( const in vec2 uv, const in float depth/*clip space*/, const in float clipW ) {\n\t\t\tvec4 clipPosition = vec4( ( vec3( uv, depth ) - 0.5 ) * 2.0, 1.0 );//ndc\n\t\t\tclipPosition *= clipW; //clip\n\t\t\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;//view\n\t\t}\n\t\tvec3 getViewNormal( const in vec2 uv ) {\n\t\t\treturn unpackRGBToNormal( texture2D( tNormal, uv ).xyz );\n\t\t}\n\t\tvec2 viewPositionToXY(vec3 viewPosition){\n\t\t\tvec2 xy;\n\t\t\tvec4 clip=cameraProjectionMatrix*vec4(viewPosition,1);\n\t\t\txy=clip.xy;//clip\n\t\t\tfloat clipW=clip.w;\n\t\t\txy/=clipW;//NDC\n\t\t\txy=(xy+1.)/2.;//uv\n\t\t\txy*=resolution;//screen\n\t\t\treturn xy;\n\t\t}\n\t\tvoid main(){\n\t\t\t#ifdef isSelective\n\t\t\t\tfloat metalness=texture2D(tMetalness,vUv).r;\n\t\t\t\tif(metalness==0.) return;\n\t\t\t#endif\n\n\t\t\tfloat depth = getDepth( vUv );\n\t\t\tfloat viewZ = getViewZ( depth );\n\t\t\tif(-viewZ>=cameraFar) return;\n\n\t\t\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ+cameraProjectionMatrix[3][3];\n\t\t\tvec3 viewPosition=getViewPosition( vUv, depth, clipW );\n\n\t\t\tvec2 d0=gl_FragCoord.xy;\n\t\t\tvec2 d1;\n\n\t\t\tvec3 viewNormal=getViewNormal( vUv );\n\n\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\tvec3 viewIncidenceDir=normalize(viewPosition);\n\t\t\t\tvec3 viewReflectDir=reflect(viewIncidenceDir,viewNormal);\n\t\t\t#else\n\t\t\t\tvec3 viewIncidenceDir=vec3(0,0,-1);\n\t\t\t\tvec3 viewReflectDir=reflect(viewIncidenceDir,viewNormal);\n\t\t\t#endif\n\n\t\t\tfloat maxReflectRayLen=maxDistance/dot(-viewIncidenceDir,viewNormal);\n\t\t\t// dot(a,b)==length(a)*length(b)*cos(theta) // https://www.mathsisfun.com/algebra/vectors-dot-product.html\n\t\t\t// if(a.isNormalized&&b.isNormalized) dot(a,b)==cos(theta)\n\t\t\t// maxDistance/maxReflectRayLen=cos(theta)\n\t\t\t// maxDistance/maxReflectRayLen==dot(a,b)\n\t\t\t// maxReflectRayLen==maxDistance/dot(a,b)\n\n\t\t\tvec3 d1viewPosition=viewPosition+viewReflectDir*maxReflectRayLen;\n\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\tif(d1viewPosition.z>-cameraNear){\n\t\t\t\t\t//https://tutorial.math.lamar.edu/Classes/CalcIII/EqnsOfLines.aspx\n\t\t\t\t\tfloat t=(-cameraNear-viewPosition.z)/viewReflectDir.z;\n\t\t\t\t\td1viewPosition=viewPosition+viewReflectDir*t;\n\t\t\t\t}\n\t\t\t#endif\n\t\t\td1=viewPositionToXY(d1viewPosition);\n\n\t\t\tfloat totalLen=length(d1-d0);\n\t\t\tfloat xLen=d1.x-d0.x;\n\t\t\tfloat yLen=d1.y-d0.y;\n\t\t\tfloat totalStep=max(abs(xLen),abs(yLen));\n\t\t\tfloat xSpan=xLen/totalStep;\n\t\t\tfloat ySpan=yLen/totalStep;\n\t\t\tfor(float i=0.;i=totalStep) break;\n\t\t\t\tvec2 xy=vec2(d0.x+i*xSpan,d0.y+i*ySpan);\n\t\t\t\tif(xy.x<0.||xy.x>resolution.x||xy.y<0.||xy.y>resolution.y) break;\n\t\t\t\tfloat s=length(xy-d0)/totalLen;\n\t\t\t\tvec2 uv=xy/resolution;\n\n\t\t\t\tfloat d = getDepth(uv);\n\t\t\t\tfloat vZ = getViewZ( d );\n\t\t\t\tif(-vZ>=cameraFar) continue;\n\t\t\t\tfloat cW = cameraProjectionMatrix[2][3] * vZ+cameraProjectionMatrix[3][3];\n\t\t\t\tvec3 vP=getViewPosition( uv, d, cW );\n\n\t\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\t\t// https://www.comp.nus.edu.sg/~lowkl/publications/lowk_persp_interp_techrep.pdf\n\t\t\t\t\tfloat recipVPZ=1./viewPosition.z;\n\t\t\t\t\tfloat viewReflectRayZ=1./(recipVPZ+s*(1./d1viewPosition.z-recipVPZ));\n\t\t\t\t\tfloat sD=surfDist*cW;\n\t\t\t\t#else\n\t\t\t\t\tfloat viewReflectRayZ=viewPosition.z+s*(d1viewPosition.z-viewPosition.z);\n\t\t\t\t\tfloat sD=surfDist;\n\t\t\t\t#endif\n\t\t\t\tif(viewReflectRayZ-sD>vZ) continue;\n\n\t\t\t\t#ifdef isInfiniteThick\n\t\t\t\t\tif(viewReflectRayZ+thickTolerance*clipW=0.) continue;\n\t\t\t\t\tfloat distance=pointPlaneDistance(vP,viewPosition,viewNormal);\n\t\t\t\t\tif(distance>maxDistance) break;\n\t\t\t\t\t#ifdef isDistanceAttenuation\n\t\t\t\t\t\tfloat ratio=1.-(distance/maxDistance);\n\t\t\t\t\t\tfloat attenuation=ratio*ratio;\n\t\t\t\t\t\top=opacity*attenuation;\n\t\t\t\t\t#endif\n\t\t\t\t\t#ifdef isFresnel\n\t\t\t\t\t\tfloat fresnel=(dot(viewIncidenceDir,viewReflectDir)+1.)/2.;\n\t\t\t\t\t\top*=fresnel;\n\t\t\t\t\t#endif\n\t\t\t\t\tvec4 reflectColor=texture2D(tDiffuse,uv);\n\t\t\t\t\tgl_FragColor.xyz=reflectColor.xyz;\n\t\t\t\t\tgl_FragColor.a=op;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"},s={defines:{PERSPECTIVE_CAMERA:1},uniforms:{tDepth:{value:null},cameraNear:{value:null},cameraFar:{value:null}},vertexShader:"\n\n varying vec2 vUv;\n\n void main() {\n\n \tvUv = uv;\n \tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n\n ",fragmentShader:"\n\n uniform sampler2D tDepth;\n\n uniform float cameraNear;\n uniform float cameraFar;\n\n varying vec2 vUv;\n\n #include \n\n\t\tfloat getLinearDepth( const in vec2 uv ) {\n\n\t\t\t#if PERSPECTIVE_CAMERA == 1\n\n\t\t\t\tfloat fragCoordZ = texture2D( tDepth, uv ).x;\n\t\t\t\tfloat viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );\n\t\t\t\treturn viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );\n\n\t\t\t#else\n\n\t\t\t\treturn texture2D( tDepth, uv ).x;\n\n\t\t\t#endif\n\n\t\t}\n\n void main() {\n\n \tfloat depth = getLinearDepth( vUv );\n\t\t\tfloat d = 1.0 - depth;\n\t\t\t// d=(d-.999)*1000.;\n \tgl_FragColor = vec4( vec3( d ), 1.0 );\n\n }\n\n "},a={uniforms:{tDiffuse:{value:null},resolution:{value:new r.Vector2},opacity:{value:.5}},vertexShader:"\n\n varying vec2 vUv;\n\n void main() {\n\n \tvUv = uv;\n \tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n\n ",fragmentShader:"\n\n uniform sampler2D tDiffuse;\n uniform vec2 resolution;\n varying vec2 vUv;\n void main() {\n\t\t\t//reverse engineering from PhotoShop blur filter, then change coefficient\n\n \tvec2 texelSize = ( 1.0 / resolution );\n\n\t\t\tvec4 c=texture2D(tDiffuse,vUv);\n\n\t\t\tvec2 offset;\n\n\t\t\toffset=(vec2(-1,0))*texelSize;\n\t\t\tvec4 cl=texture2D(tDiffuse,vUv+offset);\n\n\t\t\toffset=(vec2(1,0))*texelSize;\n\t\t\tvec4 cr=texture2D(tDiffuse,vUv+offset);\n\n\t\t\toffset=(vec2(0,-1))*texelSize;\n\t\t\tvec4 cb=texture2D(tDiffuse,vUv+offset);\n\n\t\t\toffset=(vec2(0,1))*texelSize;\n\t\t\tvec4 ct=texture2D(tDiffuse,vUv+offset);\n\n\t\t\t// float coeCenter=.5;\n\t\t\t// float coeSide=.125;\n\t\t\tfloat coeCenter=.2;\n\t\t\tfloat coeSide=.2;\n\t\t\tfloat a=c.a*coeCenter+cl.a*coeSide+cr.a*coeSide+cb.a*coeSide+ct.a*coeSide;\n\t\t\tvec3 rgb=(c.rgb*c.a*coeCenter+cl.rgb*cl.a*coeSide+cr.rgb*cr.a*coeSide+cb.rgb*cb.a*coeSide+ct.rgb*ct.a*coeSide)/a;\n\t\t\tgl_FragColor=vec4(rgb,a);\n\n\t\t}\n\t"};t.SSRBlurShader=a,t.SSRDepthShader=s,t.SSRShader=i},11928:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},amount:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float amount;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 color = texture2D( tDiffuse, vUv );","\tvec3 c = color.rgb;","\tcolor.r = dot( c, vec3( 1.0 - 0.607 * amount, 0.769 * amount, 0.189 * amount ) );","\tcolor.g = dot( c, vec3( 0.349 * amount, 1.0 - 0.314 * amount, 0.168 * amount ) );","\tcolor.b = dot( c, vec3( 0.272 * amount, 0.534 * amount, 1.0 - 0.869 * amount ) );","\tgl_FragColor = vec4( min( vec3( 1.0 ), color.rgb ), color.a );","}"].join("\n")};t.SepiaShader=n},96704:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r={uniforms:{tDiffuse:{value:null},resolution:{value:new(n(48480).Vector2)}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform vec2 resolution;","varying vec2 vUv;","void main() {","\tvec2 texel = vec2( 1.0 / resolution.x, 1.0 / resolution.y );","\tconst mat3 Gx = mat3( -1, -2, -1, 0, 0, 0, 1, 2, 1 );","\tconst mat3 Gy = mat3( -1, 0, 1, -2, 0, 2, -1, 0, 1 );","\tfloat tx0y0 = texture2D( tDiffuse, vUv + texel * vec2( -1, -1 ) ).r;","\tfloat tx0y1 = texture2D( tDiffuse, vUv + texel * vec2( -1, 0 ) ).r;","\tfloat tx0y2 = texture2D( tDiffuse, vUv + texel * vec2( -1, 1 ) ).r;","\tfloat tx1y0 = texture2D( tDiffuse, vUv + texel * vec2( 0, -1 ) ).r;","\tfloat tx1y1 = texture2D( tDiffuse, vUv + texel * vec2( 0, 0 ) ).r;","\tfloat tx1y2 = texture2D( tDiffuse, vUv + texel * vec2( 0, 1 ) ).r;","\tfloat tx2y0 = texture2D( tDiffuse, vUv + texel * vec2( 1, -1 ) ).r;","\tfloat tx2y1 = texture2D( tDiffuse, vUv + texel * vec2( 1, 0 ) ).r;","\tfloat tx2y2 = texture2D( tDiffuse, vUv + texel * vec2( 1, 1 ) ).r;","\tfloat valueGx = Gx[0][0] * tx0y0 + Gx[1][0] * tx1y0 + Gx[2][0] * tx2y0 + ","\t\tGx[0][1] * tx0y1 + Gx[1][1] * tx1y1 + Gx[2][1] * tx2y1 + ","\t\tGx[0][2] * tx0y2 + Gx[1][2] * tx1y2 + Gx[2][2] * tx2y2; ","\tfloat valueGy = Gy[0][0] * tx0y0 + Gy[1][0] * tx1y0 + Gy[2][0] * tx2y0 + ","\t\tGy[0][1] * tx0y1 + Gy[1][1] * tx1y1 + Gy[2][1] * tx2y1 + ","\t\tGy[0][2] * tx0y2 + Gy[1][2] * tx1y2 + Gy[2][2] * tx2y2; ","\tfloat G = sqrt( ( valueGx * valueGx ) + ( valueGy * valueGy ) );","\tgl_FragColor = vec4( vec3( G ), 1 );","}"].join("\n")};t.SobelOperatorShader=r},35424:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);let i;function s(){if(i)return i;const e=r.ShaderChunk.meshphong_frag.slice(0,r.ShaderChunk.meshphong_frag.indexOf("void main() {")),t=r.ShaderChunk.meshphong_frag.slice(r.ShaderChunk.meshphong_frag.indexOf("void main() {"));return i={uniforms:r.UniformsUtils.merge([r.ShaderLib.phong.uniforms,{thicknessMap:{value:null},thicknessColor:{value:new r.Color(16777215)},thicknessDistortion:{value:.1},thicknessAmbient:{value:0},thicknessAttenuation:{value:.1},thicknessPower:{value:2},thicknessScale:{value:10}}]),vertexShader:`\n #define USE_UV\n ${r.ShaderChunk.meshphong_vert}\n `,fragmentShader:`\n #define USE_UV',\n #define SUBSURFACE',\n\n ${e}\n\n uniform sampler2D thicknessMap;\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n \tvec3 thickness = thicknessColor * texture2D(thicknessMap, uv).r;\n \tvec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n \tfloat scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n \tvec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n \treflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n\n ${t.replace("#include ",r.ShaderChunk.lights_fragment_begin.replace(/RE_Direct\( directLight, geometry, material, reflectedLight \);/g,"\n RE_Direct( directLight, geometry, material, reflectedLight );\n\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n "))}\n `},i}const a={get uniforms(){return s().uniforms},set uniforms(e){s().uniforms=e},get vertexShader(){return s().vertexShader},set vertexShader(e){s().vertexShader=e},get fragmentShader(){return s().vertexShader},set fragmentShader(e){s().vertexShader=e}};t.SubsurfaceScatteringShader=a},50020:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );","\tvec4 newTex = vec4(tex.r, (tex.g + tex.b) * .5, (tex.g + tex.b) * .5, 1.0);","\tgl_FragColor = newTex;","}"].join("\n")};t.TechnicolorShader=n},64552:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},averageLuminance:{value:1},luminanceMap:{value:null},maxLuminance:{value:16},minLuminance:{value:.01},middleGrey:{value:.6}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include ","uniform sampler2D tDiffuse;","varying vec2 vUv;","uniform float middleGrey;","uniform float minLuminance;","uniform float maxLuminance;","#ifdef ADAPTED_LUMINANCE","\tuniform sampler2D luminanceMap;","#else","\tuniform float averageLuminance;","#endif","vec3 ToneMap( vec3 vColor ) {","\t#ifdef ADAPTED_LUMINANCE","\t\tfloat fLumAvg = texture2D(luminanceMap, vec2(0.5, 0.5)).r;","\t#else","\t\tfloat fLumAvg = averageLuminance;","\t#endif","\tfloat fLumPixel = linearToRelativeLuminance( vColor );","\tfloat fLumScaled = (fLumPixel * middleGrey) / max( minLuminance, fLumAvg );","\tfloat fLumCompressed = (fLumScaled * (1.0 + (fLumScaled / (maxLuminance * maxLuminance)))) / (1.0 + fLumScaled);","\treturn fLumCompressed * vColor;","}","void main() {","\tvec4 texel = texture2D( tDiffuse, vUv );","\tgl_FragColor = vec4( ToneMap( texel.xyz ), texel.w );","}"].join("\n")};t.ToneMapShader=n},33352:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={uniforms:{uDirLightPos:{value:new r.Vector3},uDirLightColor:{value:new r.Color(15658734)},uAmbientLightColor:{value:new r.Color(328965)},uBaseColor:{value:new r.Color(16777215)}},vertexShader:["varying vec3 vNormal;","varying vec3 vRefract;","void main() {","\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );","\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );","\tvec3 worldNormal = normalize ( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );","\tvNormal = normalize( normalMatrix * normal );","\tvec3 I = worldPosition.xyz - cameraPosition;","\tvRefract = refract( normalize( I ), worldNormal, 1.02 );","\tgl_Position = projectionMatrix * mvPosition;","}"].join("\n"),fragmentShader:["uniform vec3 uBaseColor;","uniform vec3 uDirLightPos;","uniform vec3 uDirLightColor;","uniform vec3 uAmbientLightColor;","varying vec3 vNormal;","varying vec3 vRefract;","void main() {","\tfloat directionalLightWeighting = max( dot( normalize( vNormal ), uDirLightPos ), 0.0);","\tvec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;","\tfloat intensity = smoothstep( - 0.5, 1.0, pow( length(lightWeighting), 20.0 ) );","\tintensity += length(lightWeighting) * 0.2;","\tfloat cameraWeighting = dot( normalize( vNormal ), vRefract );","\tintensity += pow( 1.0 - length( cameraWeighting ), 6.0 );","\tintensity = intensity * 0.2 + 0.3;","\tif ( intensity < 0.50 ) {","\t\tgl_FragColor = vec4( 2.0 * intensity * uBaseColor, 1.0 );","\t} else {","\t\tgl_FragColor = vec4( 1.0 - 2.0 * ( 1.0 - intensity ) * ( 1.0 - uBaseColor ), 1.0 );","}","}"].join("\n")},s={uniforms:{uDirLightPos:{value:new r.Vector3},uDirLightColor:{value:new r.Color(15658734)},uAmbientLightColor:{value:new r.Color(328965)},uBaseColor:{value:new r.Color(15658734)},uLineColor1:{value:new r.Color(8421504)},uLineColor2:{value:new r.Color(0)},uLineColor3:{value:new r.Color(0)},uLineColor4:{value:new r.Color(0)}},vertexShader:["varying vec3 vNormal;","void main() {","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","\tvNormal = normalize( normalMatrix * normal );","}"].join("\n"),fragmentShader:["uniform vec3 uBaseColor;","uniform vec3 uLineColor1;","uniform vec3 uLineColor2;","uniform vec3 uLineColor3;","uniform vec3 uLineColor4;","uniform vec3 uDirLightPos;","uniform vec3 uDirLightColor;","uniform vec3 uAmbientLightColor;","varying vec3 vNormal;","void main() {","\tfloat camera = max( dot( normalize( vNormal ), vec3( 0.0, 0.0, 1.0 ) ), 0.4);","\tfloat light = max( dot( normalize( vNormal ), uDirLightPos ), 0.0);","\tgl_FragColor = vec4( uBaseColor, 1.0 );","\tif ( length(uAmbientLightColor + uDirLightColor * light) < 1.00 ) {","\t\tgl_FragColor *= vec4( uLineColor1, 1.0 );","\t}","\tif ( length(uAmbientLightColor + uDirLightColor * camera) < 0.50 ) {","\t\tgl_FragColor *= vec4( uLineColor2, 1.0 );","\t}","}"].join("\n")},a={uniforms:{uDirLightPos:{value:new r.Vector3},uDirLightColor:{value:new r.Color(15658734)},uAmbientLightColor:{value:new r.Color(328965)},uBaseColor:{value:new r.Color(16777215)},uLineColor1:{value:new r.Color(0)},uLineColor2:{value:new r.Color(0)},uLineColor3:{value:new r.Color(0)},uLineColor4:{value:new r.Color(0)}},vertexShader:["varying vec3 vNormal;","void main() {","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","\tvNormal = normalize( normalMatrix * normal );","}"].join("\n"),fragmentShader:["uniform vec3 uBaseColor;","uniform vec3 uLineColor1;","uniform vec3 uLineColor2;","uniform vec3 uLineColor3;","uniform vec3 uLineColor4;","uniform vec3 uDirLightPos;","uniform vec3 uDirLightColor;","uniform vec3 uAmbientLightColor;","varying vec3 vNormal;","void main() {","\tfloat directionalLightWeighting = max( dot( normalize(vNormal), uDirLightPos ), 0.0);","\tvec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;","\tgl_FragColor = vec4( uBaseColor, 1.0 );","\tif ( length(lightWeighting) < 1.00 ) {","\t\tif ( mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) {","\t\t\tgl_FragColor = vec4( uLineColor1, 1.0 );","\t\t}","\t}","\tif ( length(lightWeighting) < 0.75 ) {","\t\tif (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) {","\t\t\tgl_FragColor = vec4( uLineColor2, 1.0 );","\t\t}","\t}","\tif ( length(lightWeighting) < 0.50 ) {","\t\tif (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0) {","\t\t\tgl_FragColor = vec4( uLineColor3, 1.0 );","\t\t}","\t}","\tif ( length(lightWeighting) < 0.3465 ) {","\t\tif (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0) {","\t\t\tgl_FragColor = vec4( uLineColor4, 1.0 );","\t}","\t}","}"].join("\n")},o={uniforms:{uDirLightPos:{value:new r.Vector3},uDirLightColor:{value:new r.Color(15658734)},uAmbientLightColor:{value:new r.Color(328965)},uBaseColor:{value:new r.Color(16777215)},uLineColor1:{value:new r.Color(0)}},vertexShader:["varying vec3 vNormal;","void main() {","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","\tvNormal = normalize( normalMatrix * normal );","}"].join("\n"),fragmentShader:["uniform vec3 uBaseColor;","uniform vec3 uLineColor1;","uniform vec3 uLineColor2;","uniform vec3 uLineColor3;","uniform vec3 uLineColor4;","uniform vec3 uDirLightPos;","uniform vec3 uDirLightColor;","uniform vec3 uAmbientLightColor;","varying vec3 vNormal;","void main() {","float directionalLightWeighting = max( dot( normalize(vNormal), uDirLightPos ), 0.0);","vec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;","gl_FragColor = vec4( uBaseColor, 1.0 );","if ( length(lightWeighting) < 1.00 ) {","\t\tif ( ( mod(gl_FragCoord.x, 4.001) + mod(gl_FragCoord.y, 4.0) ) > 6.00 ) {","\t\t\tgl_FragColor = vec4( uLineColor1, 1.0 );","\t\t}","\t}","\tif ( length(lightWeighting) < 0.50 ) {","\t\tif ( ( mod(gl_FragCoord.x + 2.0, 4.001) + mod(gl_FragCoord.y + 2.0, 4.0) ) > 6.00 ) {","\t\t\tgl_FragColor = vec4( uLineColor1, 1.0 );","\t\t}","\t}","}"].join("\n")};t.ToonShader1=i,t.ToonShader2=s,t.ToonShaderDotted=o,t.ToonShaderHatching=a},15392:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r={uniforms:{texture:{value:null},delta:{value:new(n(48480).Vector2)(1,1)}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["#include ","#define ITERATIONS 10.0","uniform sampler2D texture;","uniform vec2 delta;","varying vec2 vUv;","void main() {","\tvec4 color = vec4( 0.0 );","\tfloat total = 0.0;","\tfloat offset = rand( vUv );","\tfor ( float t = -ITERATIONS; t <= ITERATIONS; t ++ ) {","\t\tfloat percent = ( t + offset - 0.5 ) / ITERATIONS;","\t\tfloat weight = 1.0 - abs( percent );","\t\tcolor += texture2D( texture, vUv + delta * percent ) * weight;","\t\ttotal += weight;","\t}","\tgl_FragColor = color / total;","}"].join("\n")};t.TriangleBlurShader=r},18384:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float opacity;","uniform sampler2D tDiffuse;","varying vec2 vUv;","#include ","void main() {","\tfloat depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) );","\tgl_FragColor = vec4( vec3( depth ), opacity );","}"].join("\n")};t.UnpackDepthRGBAShader=n},86472:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:"\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ",fragmentShader:"\n\n uniform sampler2D tDiffuse;\n uniform float v;\n\n varying vec2 vUv;\n\n void main() {\n\n vec4 sum = vec4( 0.0 );\n\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;\n\n gl_FragColor = sum;\n\n }\n "};t.VerticalBlurShader=n},47228:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},v:{value:1/512},r:{value:.35}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform sampler2D tDiffuse;","uniform float v;","uniform float r;","varying vec2 vUv;","void main() {","\tvec4 sum = vec4( 0.0 );","\tfloat vv = v * abs( r - vUv.y );","\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * vv ) ) * 0.051;","\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * vv ) ) * 0.0918;","\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * vv ) ) * 0.12245;","\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * vv ) ) * 0.1531;","\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;","\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * vv ) ) * 0.1531;","\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * vv ) ) * 0.12245;","\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * vv ) ) * 0.0918;","\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * vv ) ) * 0.051;","\tgl_FragColor = sum;","}"].join("\n")};t.VerticalTiltShiftShader=n},63288:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{tDiffuse:{value:null},offset:{value:1},darkness:{value:1}},vertexShader:["varying vec2 vUv;","void main() {","\tvUv = uv;","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform float offset;","uniform float darkness;","uniform sampler2D tDiffuse;","varying vec2 vUv;","void main() {","\tvec4 texel = texture2D( tDiffuse, vUv );","\tvec2 uv = ( vUv - vec2( 0.5 ) ) * vec2( offset );","\tgl_FragColor = vec4( mix( texel.rgb, vec3( 1.0 - darkness ), dot( uv, uv ) ), texel.a );","}"].join("\n")};t.VignetteShader=n},26960:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={uniforms:{u_size:{value:new r.Vector3(1,1,1)},u_renderstyle:{value:0},u_renderthreshold:{value:.5},u_clim:{value:new r.Vector2(1,1)},u_data:{value:null},u_cmdata:{value:null}},vertexShader:["\t\tvarying vec4 v_nearpos;","\t\tvarying vec4 v_farpos;","\t\tvarying vec3 v_position;","\t\tvoid main() {","\t\t\t\tmat4 viewtransformf = modelViewMatrix;","\t\t\t\tmat4 viewtransformi = inverse(modelViewMatrix);","\t\t\t\tvec4 position4 = vec4(position, 1.0);","\t\t\t\tvec4 pos_in_cam = viewtransformf * position4;","\t\t\t\tpos_in_cam.z = -pos_in_cam.w;","\t\t\t\tv_nearpos = viewtransformi * pos_in_cam;","\t\t\t\tpos_in_cam.z = pos_in_cam.w;","\t\t\t\tv_farpos = viewtransformi * pos_in_cam;","\t\t\t\tv_position = position;","\t\t\t\tgl_Position = projectionMatrix * viewMatrix * modelMatrix * position4;","\t\t}"].join("\n"),fragmentShader:["\t\tprecision highp float;","\t\tprecision mediump sampler3D;","\t\tuniform vec3 u_size;","\t\tuniform int u_renderstyle;","\t\tuniform float u_renderthreshold;","\t\tuniform vec2 u_clim;","\t\tuniform sampler3D u_data;","\t\tuniform sampler2D u_cmdata;","\t\tvarying vec3 v_position;","\t\tvarying vec4 v_nearpos;","\t\tvarying vec4 v_farpos;","\t\tconst int MAX_STEPS = 887;\t// 887 for 512^3, 1774 for 1024^3","\t\tconst int REFINEMENT_STEPS = 4;","\t\tconst float relative_step_size = 1.0;","\t\tconst vec4 ambient_color = vec4(0.2, 0.4, 0.2, 1.0);","\t\tconst vec4 diffuse_color = vec4(0.8, 0.2, 0.2, 1.0);","\t\tconst vec4 specular_color = vec4(1.0, 1.0, 1.0, 1.0);","\t\tconst float shininess = 40.0;","\t\tvoid cast_mip(vec3 start_loc, vec3 step, int nsteps, vec3 view_ray);","\t\tvoid cast_iso(vec3 start_loc, vec3 step, int nsteps, vec3 view_ray);","\t\tfloat sample1(vec3 texcoords);","\t\tvec4 apply_colormap(float val);","\t\tvec4 add_lighting(float val, vec3 loc, vec3 step, vec3 view_ray);","\t\tvoid main() {","\t\t\t\tvec3 farpos = v_farpos.xyz / v_farpos.w;","\t\t\t\tvec3 nearpos = v_nearpos.xyz / v_nearpos.w;","\t\t\t\tvec3 view_ray = normalize(nearpos.xyz - farpos.xyz);","\t\t\t\tfloat distance = dot(nearpos - v_position, view_ray);","\t\t\t\tdistance = max(distance, min((-0.5 - v_position.x) / view_ray.x,","\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(u_size.x - 0.5 - v_position.x) / view_ray.x));","\t\t\t\tdistance = max(distance, min((-0.5 - v_position.y) / view_ray.y,","\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(u_size.y - 0.5 - v_position.y) / view_ray.y));","\t\t\t\tdistance = max(distance, min((-0.5 - v_position.z) / view_ray.z,","\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(u_size.z - 0.5 - v_position.z) / view_ray.z));","\t\t\t\tvec3 front = v_position + view_ray * distance;","\t\t\t\tint nsteps = int(-distance / relative_step_size + 0.5);","\t\t\t\tif ( nsteps < 1 )","\t\t\t\t\t\tdiscard;","\t\t\t\tvec3 step = ((v_position - front) / u_size) / float(nsteps);","\t\t\t\tvec3 start_loc = front / u_size;","\t\t\t\tif (u_renderstyle == 0)","\t\t\t\t\t\tcast_mip(start_loc, step, nsteps, view_ray);","\t\t\t\telse if (u_renderstyle == 1)","\t\t\t\t\t\tcast_iso(start_loc, step, nsteps, view_ray);","\t\t\t\tif (gl_FragColor.a < 0.05)","\t\t\t\t\t\tdiscard;","\t\t}","\t\tfloat sample1(vec3 texcoords) {","\t\t\t\t/* Sample float value from a 3D texture. Assumes intensity data. */","\t\t\t\treturn texture(u_data, texcoords.xyz).r;","\t\t}","\t\tvec4 apply_colormap(float val) {","\t\t\t\tval = (val - u_clim[0]) / (u_clim[1] - u_clim[0]);","\t\t\t\treturn texture2D(u_cmdata, vec2(val, 0.5));","\t\t}","\t\tvoid cast_mip(vec3 start_loc, vec3 step, int nsteps, vec3 view_ray) {","\t\t\t\tfloat max_val = -1e6;","\t\t\t\tint max_i = 100;","\t\t\t\tvec3 loc = start_loc;","\t\t\t\tfor (int iter=0; iter= nsteps)","\t\t\t\t\t\t\t\tbreak;","\t\t\t\t\t\tfloat val = sample1(loc);","\t\t\t\t\t\tif (val > max_val) {","\t\t\t\t\t\t\t\tmax_val = val;","\t\t\t\t\t\t\t\tmax_i = iter;","\t\t\t\t\t\t}","\t\t\t\t\t\tloc += step;","\t\t\t\t}","\t\t\t\tvec3 iloc = start_loc + step * (float(max_i) - 0.5);","\t\t\t\tvec3 istep = step / float(REFINEMENT_STEPS);","\t\t\t\tfor (int i=0; i= nsteps)","\t\t\t\t\t\t\t\tbreak;","\t\t\t\t\t\tfloat val = sample1(loc);","\t\t\t\t\t\tif (val > low_threshold) {","\t\t\t\t\t\t\t\tvec3 iloc = loc - 0.5 * step;","\t\t\t\t\t\t\t\tvec3 istep = step / float(REFINEMENT_STEPS);","\t\t\t\t\t\t\t\tfor (int i=0; i u_renderthreshold) {","\t\t\t\t\t\t\t\t\t\t\t\tgl_FragColor = add_lighting(val, iloc, dstep, view_ray);","\t\t\t\t\t\t\t\t\t\t\t\treturn;","\t\t\t\t\t\t\t\t\t\t}","\t\t\t\t\t\t\t\t\t\tiloc += istep;","\t\t\t\t\t\t\t\t}","\t\t\t\t\t\t}","\t\t\t\t\t\tloc += step;","\t\t\t\t}","\t\t}","\t\tvec4 add_lighting(float val, vec3 loc, vec3 step, vec3 view_ray)","\t\t{","\t\t\t\tvec3 V = normalize(view_ray);","\t\t\t\tvec3 N;","\t\t\t\tfloat val1, val2;","\t\t\t\tval1 = sample1(loc + vec3(-step[0], 0.0, 0.0));","\t\t\t\tval2 = sample1(loc + vec3(+step[0], 0.0, 0.0));","\t\t\t\tN[0] = val1 - val2;","\t\t\t\tval = max(max(val1, val2), val);","\t\t\t\tval1 = sample1(loc + vec3(0.0, -step[1], 0.0));","\t\t\t\tval2 = sample1(loc + vec3(0.0, +step[1], 0.0));","\t\t\t\tN[1] = val1 - val2;","\t\t\t\tval = max(max(val1, val2), val);","\t\t\t\tval1 = sample1(loc + vec3(0.0, 0.0, -step[2]));","\t\t\t\tval2 = sample1(loc + vec3(0.0, 0.0, +step[2]));","\t\t\t\tN[2] = val1 - val2;","\t\t\t\tval = max(max(val1, val2), val);","\t\t\t\tfloat gm = length(N); // gradient magnitude","\t\t\t\tN = normalize(N);","\t\t\t\tfloat Nselect = float(dot(N, V) > 0.0);","\t\t\t\tN = (2.0 * Nselect - 1.0) * N;\t// ==\tNselect * N - (1.0-Nselect)*N;","\t\t\t\tvec4 ambient_color = vec4(0.0, 0.0, 0.0, 0.0);","\t\t\t\tvec4 diffuse_color = vec4(0.0, 0.0, 0.0, 0.0);","\t\t\t\tvec4 specular_color = vec4(0.0, 0.0, 0.0, 0.0);","\t\t\t\tfor (int i=0; i<1; i++)","\t\t\t\t{","\t\t\t\t\t\tvec3 L = normalize(view_ray);\t//lightDirs[i];","\t\t\t\t\t\tfloat lightEnabled = float( length(L) > 0.0 );","\t\t\t\t\t\tL = normalize(L + (1.0 - lightEnabled));","\t\t\t\t\t\tfloat lambertTerm = clamp(dot(N, L), 0.0, 1.0);","\t\t\t\t\t\tvec3 H = normalize(L+V); // Halfway vector","\t\t\t\t\t\tfloat specularTerm = pow(max(dot(H, N), 0.0), shininess);","\t\t\t\t\t\tfloat mask1 = lightEnabled;","\t\t\t\t\t\tambient_color +=\tmask1 * ambient_color;\t// * gl_LightSource[i].ambient;","\t\t\t\t\t\tdiffuse_color +=\tmask1 * lambertTerm;","\t\t\t\t\t\tspecular_color += mask1 * specularTerm * specular_color;","\t\t\t\t}","\t\t\t\tvec4 final_color;","\t\t\t\tvec4 color = apply_colormap(val);","\t\t\t\tfinal_color = color * (ambient_color + diffuse_color) + specular_color;","\t\t\t\tfinal_color.a = color.a;","\t\t\t\treturn final_color;","\t\t}"].join("\n")};t.VolumeRenderShader1=i},22120:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const n={uniforms:{color:{value:null},time:{value:0},tDiffuse:{value:null},tDudv:{value:null},textureMatrix:{value:null}},vertexShader:["uniform mat4 textureMatrix;","varying vec2 vUv;","varying vec4 vUvRefraction;","void main() {","\tvUv = uv;","\tvUvRefraction = textureMatrix * vec4( position, 1.0 );","\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );","}"].join("\n"),fragmentShader:["uniform vec3 color;","uniform float time;","uniform sampler2D tDiffuse;","uniform sampler2D tDudv;","varying vec2 vUv;","varying vec4 vUvRefraction;","float blendOverlay( float base, float blend ) {","\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );","}","vec3 blendOverlay( vec3 base, vec3 blend ) {","\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ),blendOverlay( base.b, blend.b ) );","}","void main() {"," float waveStrength = 0.1;"," float waveSpeed = 0.03;","\tvec2 distortedUv = texture2D( tDudv, vec2( vUv.x + time * waveSpeed, vUv.y ) ).rg * waveStrength;","\tdistortedUv = vUv.xy + vec2( distortedUv.x, distortedUv.y + time * waveSpeed );","\tvec2 distortion = ( texture2D( tDudv, distortedUv ).rg * 2.0 - 1.0 ) * waveStrength;"," vec4 uv = vec4( vUvRefraction );"," uv.xy += distortion;","\tvec4 base = texture2DProj( tDiffuse, uv );","\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );","}"].join("\n")};t.WaterRefractionShader=n},76144:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.FlakesTexture=class{constructor(e=512,t=512){const n=document.createElement("canvas");n.width=e,n.height=t;const r=n.getContext("2d");r.fillStyle="rgb(127,127,255)",r.fillRect(0,0,e,t);for(let i=0;i<4e3;i++){const n=Math.random()*e,i=Math.random()*t,s=3*Math.random()+3;let a=2*Math.random()-1,o=2*Math.random()-1,l=1.5;const c=Math.sqrt(a*a+o*o+l*l);a/=c,o/=c,l/=c,r.fillStyle="rgb("+(127*a+127)+","+(127*o+127)+","+255*l+")",r.beginPath(),r.arc(n,i,s,0,2*Math.PI),r.fill()}return n}}},12944:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.getWithKey=(e,t)=>e[t]},8636:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(12944),s=e=>{let t,n,i,s=0;if(e.forEach((e=>(void 0===t&&(t=e.array.constructor),t!==e.array.constructor?(console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null):(void 0===n&&(n=e.itemSize),n!==e.itemSize?(console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null):(void 0===i&&(i=e.normalized),i!==e.normalized?(console.error("THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null):void(s+=e.array.length)))))),t&&n){const a=new t(s);let o=0;return e.forEach((e=>{a.set(e.array,o),o+=e.array.length})),new r.BufferAttribute(a,n,i)}};t.computeMorphedAttributes=function(e){if(!0!==e.geometry.isBufferGeometry)return console.error("THREE.BufferGeometryUtils: Geometry is not of type BufferGeometry."),null;const t=new r.Vector3,n=new r.Vector3,i=new r.Vector3,s=new r.Vector3,a=new r.Vector3,o=new r.Vector3,l=new r.Vector3,c=new r.Vector3,h=new r.Vector3;function u(e,r,u,d,p,f,m,g,A){t.fromBufferAttribute(u,f),n.fromBufferAttribute(u,m),i.fromBufferAttribute(u,g);const v=e.morphTargetInfluences;if(r.morphTargets&&d&&v){l.set(0,0,0),c.set(0,0,0),h.set(0,0,0);for(let e=0,r=d.length;e{let t,n=0,s=0;for(let r=0,i=e.length;r{const n=null!==e[0].index,i=new Set(Object.keys(e[0].attributes)),a=new Set(Object.keys(e[0].morphAttributes)),o={},l={},c=e[0].morphTargetsRelative,h=new r.BufferGeometry;let u=0;if(e.forEach(((e,r)=>{let s=0;if(n!==(null!==e.index))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+r+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let t in e.attributes){if(!i.has(t))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+r+'. All geometries must have compatible attributes; make sure "'+t+'" attribute exists among all geometries, or in none of them.'),null;void 0===o[t]&&(o[t]=[]),o[t].push(e.attributes[t]),s++}if(s!==i.size)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+r+". Make sure all geometries have the same number of attributes."),null;if(c!==e.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+r+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let t in e.morphAttributes){if(!a.has(t))return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+r+". .morphAttributes must be consistent throughout all geometries."),null;void 0===l[t]&&(l[t]=[]),l[t].push(e.morphAttributes[t])}if(h.userData.mergedUserData=h.userData.mergedUserData||[],h.userData.mergedUserData.push(e.userData),t){let t;if(e.index)t=e.index.count;else{if(void 0===e.attributes.position)return console.error("THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index "+r+". The geometry must have either an index or a position attribute"),null;t=e.attributes.position.count}h.addGroup(u,t,r),u+=t}})),n){let t=0;const n=[];e.forEach((e=>{const r=e.index;for(let i=0;i[])))}const p=Math.log10(1/t),f=Math.pow(10,p);for(let r=0;rn&&c.add(r)}c.normalize(),m.setXYZ(e+r,c.x,c.y,c.z)}}return u.setAttribute("normal",m),u},t.toTrianglesDrawMode=function(e,t){if(t===r.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===r.TriangleFanDrawMode||t===r.TriangleStripDrawMode){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);var i={compressNormals:function(e,t){e.geometry||console.error("Mesh must contain geometry. ");const n=e.geometry.attributes.normal;if(n||console.error("Geometry must contain normal attribute. "),n.isPacked)return;3!=n.itemSize&&console.error("normal.itemSize is not 3, which cannot be encoded. ");const i=n.array,a=n.count;let o;if("DEFAULT"==t){o=new Uint8Array(3*a);for(let e=0;e=-1&&n.max<=1){a=new Uint16Array(i.length);for(let e=0;el&&(a=i,l=o),s=h(i=c(e,t,n,"floor","ceil")),(o=u(e,t,n,s))>l&&(a=i,l=o),s=h(i=c(e,t,n,"ceil","ceil")),(o=u(e,t,n,s))>l&&(a=i),a;function c(e,t,i,s,a){var o=e/(Math.abs(e)+Math.abs(t)+Math.abs(i)),l=t/(Math.abs(e)+Math.abs(t)+Math.abs(i));if(n<0){var c=(1-Math.abs(l))*(o>=0?1:-1),h=(1-Math.abs(o))*(l>=0?1:-1);o=c,l=h;var u=1-Math.abs(o)-Math.abs(l);u>0&&(u+=.001,o+=o>0?u/2:-u/2,l+=l>0?u/2:-u/2)}return 1==r?new Int8Array([Math[s](127.5*o+(o<0?1:0)),Math[a](127.5*l+(l<0?1:0))]):2==r?new Int16Array([Math[s](32767.5*o+(o<0?1:0)),Math[a](32767.5*l+(l<0?1:0))]):void 0}function h(e){var t=e[0],n=e[1];1==r?(t/=t<0?127:128,n/=n<0?127:128):2==r&&(t/=t<0?32767:32768,n/=n<0?32767:32768);var i=1-Math.abs(t)-Math.abs(n);if(i<0){var s=t;t=(1-Math.abs(n))*(t>=0?1:-1),n=(1-Math.abs(s))*(n>=0?1:-1)}var a=Math.sqrt(t*t+n*n+i*i);return[t/a,n/a,i/a]}function u(e,t,n,r){return e*r[0]+t*r[1]+n*r[2]}},quantizedEncode:function(e,t){let n,i;1==t?(n=new Uint8Array(e.length),i=255):2==t?(n=new Uint16Array(e.length),i=65535):console.error("number of bytes error! ");const s=new r.Matrix4,a=new Float32Array(3),o=new Float32Array(3);a[0]=a[1]=a[2]=Number.MAX_VALUE,o[0]=o[1]=o[2]=-Number.MAX_VALUE;for(let r=0;r= 0.0) ? +1.0 : -1.0, (v.y >= 0.0) ? +1.0 : -1.0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn normalize(v);\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#if USE_PACKED_NORMAL == 2\n\t\t\t\t\t\tvec3 decodeNormal(vec3 packedNormal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvec3 v = (packedNormal * 2.0) - 1.0;\n\t\t\t\t\t\t\treturn normalize(v);\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\t\t\t\t#endif","#ifdef USE_PACKED_POSITION\n\t\t\t\t\t#if USE_PACKED_POSITION == 0\n\t\t\t\t\t\tuniform mat4 quantizeMatPos;\n\t\t\t\t\t#endif\n\t\t\t\t#endif","#ifdef USE_PACKED_UV\n\t\t\t\t\t#if USE_PACKED_UV == 1\n\t\t\t\t\t\tuniform mat3 quantizeMatUV;\n\t\t\t\t\t#endif\n\t\t\t\t#endif","#ifdef USE_PACKED_UV\n\t\t\t\t\t#if USE_PACKED_UV == 0\n\t\t\t\t\t\tvec2 decodeUV(vec2 packedUV)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvec2 uv = (packedUV * 2.0) - 1.0;\n\t\t\t\t\t\t\treturn uv;\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#if USE_PACKED_UV == 1\n\t\t\t\t\t\tvec2 decodeUV(vec2 packedUV)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvec2 uv = ( vec3(packedUV, 1.0) * quantizeMatUV ).xy;\n\t\t\t\t\t\t\treturn uv;\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\t\t\t\t#endif","void main() {",r.ShaderChunk.uv_vertex,"#ifdef USE_UV\n\t\t\t\t\t#ifdef USE_PACKED_UV\n\t\t\t\t\t\tvUv = decodeUV(vUv);\n\t\t\t\t\t#endif\n\t\t\t\t#endif",r.ShaderChunk.uv2_vertex,r.ShaderChunk.color_vertex,r.ShaderChunk.beginnormal_vertex,"#ifdef USE_PACKED_NORMAL\n\t\t\t\t\tobjectNormal = decodeNormal(objectNormal);\n\t\t\t\t#endif\n\n\t\t\t\t#ifdef USE_TANGENT\n\t\t\t\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t\t\t\t#endif\n\t\t\t\t",r.ShaderChunk.morphnormal_vertex,r.ShaderChunk.skinbase_vertex,r.ShaderChunk.skinnormal_vertex,r.ShaderChunk.defaultnormal_vertex,"#ifndef FLAT_SHADED","\tvNormal = normalize( transformedNormal );","#endif",r.ShaderChunk.begin_vertex,"#ifdef USE_PACKED_POSITION\n\t\t\t\t\t#if USE_PACKED_POSITION == 0\n\t\t\t\t\t\ttransformed = ( vec4(transformed, 1.0) * quantizeMatPos ).xyz;\n\t\t\t\t\t#endif\n\t\t\t\t#endif",r.ShaderChunk.morphtarget_vertex,r.ShaderChunk.skinning_vertex,r.ShaderChunk.displacementmap_vertex,r.ShaderChunk.project_vertex,r.ShaderChunk.logdepthbuf_vertex,r.ShaderChunk.clipping_planes_vertex,"vViewPosition = - mvPosition.xyz;",r.ShaderChunk.worldpos_vertex,r.ShaderChunk.envmap_vertex,r.ShaderChunk.shadowmap_vertex,r.ShaderChunk.fog_vertex,"}"].join("\n"),this.fragmentShader=["#define PHONG","uniform vec3 diffuse;","uniform vec3 emissive;","uniform vec3 specular;","uniform float shininess;","uniform float opacity;",r.ShaderChunk.common,r.ShaderChunk.packing,r.ShaderChunk.dithering_pars_fragment,r.ShaderChunk.color_pars_fragment,r.ShaderChunk.uv_pars_fragment,r.ShaderChunk.uv2_pars_fragment,r.ShaderChunk.map_pars_fragment,r.ShaderChunk.alphamap_pars_fragment,r.ShaderChunk.aomap_pars_fragment,r.ShaderChunk.lightmap_pars_fragment,r.ShaderChunk.emissivemap_pars_fragment,r.ShaderChunk.envmap_common_pars_fragment,r.ShaderChunk.envmap_pars_fragment,r.ShaderChunk.cube_uv_reflection_fragment,r.ShaderChunk.fog_pars_fragment,r.ShaderChunk.bsdfs,r.ShaderChunk.lights_pars_begin,r.ShaderChunk.lights_phong_pars_fragment,r.ShaderChunk.shadowmap_pars_fragment,r.ShaderChunk.bumpmap_pars_fragment,r.ShaderChunk.normalmap_pars_fragment,r.ShaderChunk.specularmap_pars_fragment,r.ShaderChunk.logdepthbuf_pars_fragment,r.ShaderChunk.clipping_planes_pars_fragment,"void main() {",r.ShaderChunk.clipping_planes_fragment,"vec4 diffuseColor = vec4( diffuse, opacity );","ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );","vec3 totalEmissiveRadiance = emissive;",r.ShaderChunk.logdepthbuf_fragment,r.ShaderChunk.map_fragment,r.ShaderChunk.color_fragment,r.ShaderChunk.alphamap_fragment,r.ShaderChunk.alphatest_fragment,r.ShaderChunk.specularmap_fragment,r.ShaderChunk.normal_fragment_begin,r.ShaderChunk.normal_fragment_maps,r.ShaderChunk.emissivemap_fragment,r.ShaderChunk.lights_phong_fragment,r.ShaderChunk.lights_fragment_begin,r.ShaderChunk.lights_fragment_maps,r.ShaderChunk.lights_fragment_end,r.ShaderChunk.aomap_fragment,"vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;",r.ShaderChunk.envmap_fragment,"gl_FragColor = vec4( outgoingLight, diffuseColor.a );",r.ShaderChunk.tonemapping_fragment,parseInt(r.REVISION.replace(/\D+/g,""))>=154?r.ShaderChunk.colorspace_fragment:r.ShaderChunk.encodings_fragment,r.ShaderChunk.fog_fragment,r.ShaderChunk.premultiplied_alpha_fragment,r.ShaderChunk.dithering_fragment,"}"].join("\n"),this.setValues(e)}}t.GeometryCompressionUtils=i,t.PackedPhongMaterial=s},99752:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=(e=new r.Vector3(0,0,0),t=10,n=1,s=0,a=1,o=2,l=3)=>{const c=t/2,h=[new r.Vector3(e.x-c,e.y,e.z-c),new r.Vector3(e.x-c,e.y,e.z+c),new r.Vector3(e.x+c,e.y,e.z+c),new r.Vector3(e.x+c,e.y,e.z-c)],u=[h[s],h[a],h[o],h[l]];if(0<=--n){const e=[];return Array.prototype.push.apply(e,i(u[0],c,n,s,l,o,a)),Array.prototype.push.apply(e,i(u[1],c,n,s,a,o,l)),Array.prototype.push.apply(e,i(u[2],c,n,s,a,o,l)),Array.prototype.push.apply(e,i(u[3],c,n,o,a,s,l)),e}return u},s=(e=new r.Vector3(0,0,0),t=10,n=1,i=0,a=1,o=2,l=3,c=4,h=5,u=6,d=7)=>{const p=t/2,f=[new r.Vector3(e.x-p,e.y+p,e.z-p),new r.Vector3(e.x-p,e.y+p,e.z+p),new r.Vector3(e.x-p,e.y-p,e.z+p),new r.Vector3(e.x-p,e.y-p,e.z-p),new r.Vector3(e.x+p,e.y-p,e.z-p),new r.Vector3(e.x+p,e.y-p,e.z+p),new r.Vector3(e.x+p,e.y+p,e.z+p),new r.Vector3(e.x+p,e.y+p,e.z-p)],m=[f[i],f[a],f[o],f[l],f[c],f[h],f[u],f[d]];if(--n>=0){const e=[];return Array.prototype.push.apply(e,s(m[0],p,n,i,l,c,d,u,h,o,a)),Array.prototype.push.apply(e,s(m[1],p,n,i,d,u,a,o,h,c,l)),Array.prototype.push.apply(e,s(m[2],p,n,i,d,u,a,o,h,c,l)),Array.prototype.push.apply(e,s(m[3],p,n,o,l,i,a,u,d,c,h)),Array.prototype.push.apply(e,s(m[4],p,n,o,l,i,a,u,d,c,h)),Array.prototype.push.apply(e,s(m[5],p,n,c,l,o,h,u,a,i,d)),Array.prototype.push.apply(e,s(m[6],p,n,c,l,o,h,u,a,i,d)),Array.prototype.push.apply(e,s(m[7],p,n,u,h,o,a,i,l,c,d)),e}return m},a={hilbert3D:s,gosper:(e=1)=>function(e){let t=0,n=0,r=0;const i=[0,0,0],s=e.fractal;for(let a=0,o=s.length;ai;0<=i?r++:r--){t="";for(let r=0,i=n.length;r{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480);var a,o=((a=new s.RawShaderMaterial({uniforms:{roughnessMap:{value:null},normalMap:{value:null},texelSize:{value:new s.Vector2(1,1)}},vertexShader:"\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tattribute vec3 position;\n\t\t\tattribute vec2 uv;\n\n\t\t\tvarying vec2 vUv;\n\n\t\t\tvoid main() {\n\n\t\t\t\tvUv = uv;\n\n\t\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t\t}\n\t\t",fragmentShader:"\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec2 vUv;\n\n\t\t\tuniform sampler2D roughnessMap;\n\t\t\tuniform sampler2D normalMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\n\t\t\tvec4 envMapTexelToLinear( vec4 a ) { return a; }\n\n\t\t\t#include \n\n\t\t\tfloat roughnessToVariance( float roughness ) {\n\n\t\t\t\tfloat variance = 0.0;\n\n\t\t\t\tif ( roughness >= r1 ) {\n\n\t\t\t\t\tvariance = ( r0 - roughness ) * ( v1 - v0 ) / ( r0 - r1 ) + v0;\n\n\t\t\t\t} else if ( roughness >= r4 ) {\n\n\t\t\t\t\tvariance = ( r1 - roughness ) * ( v4 - v1 ) / ( r1 - r4 ) + v1;\n\n\t\t\t\t} else if ( roughness >= r5 ) {\n\n\t\t\t\t\tvariance = ( r4 - roughness ) * ( v5 - v4 ) / ( r4 - r5 ) + v4;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfloat roughness2 = roughness * roughness;\n\n\t\t\t\t\tvariance = 1.79 * roughness2 * roughness2;\n\n\t\t\t\t}\n\n\t\t\t\treturn variance;\n\n\t\t\t}\n\n\t\t\tfloat varianceToRoughness( float variance ) {\n\n\t\t\t\tfloat roughness = 0.0;\n\n\t\t\t\tif ( variance >= v1 ) {\n\n\t\t\t\t\troughness = ( v0 - variance ) * ( r1 - r0 ) / ( v0 - v1 ) + r0;\n\n\t\t\t\t} else if ( variance >= v4 ) {\n\n\t\t\t\t\troughness = ( v1 - variance ) * ( r4 - r1 ) / ( v1 - v4 ) + r1;\n\n\t\t\t\t} else if ( variance >= v5 ) {\n\n\t\t\t\t\troughness = ( v4 - variance ) * ( r5 - r4 ) / ( v4 - v5 ) + r4;\n\n\t\t\t\t} else {\n\n\t\t\t\t\troughness = pow( 0.559 * variance, 0.25 ); // 0.559 = 1.0 / 1.79\n\n\t\t\t\t}\n\n\t\t\t\treturn roughness;\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = texture2D( roughnessMap, vUv, - 1.0 );\n\n\t\t\t\tif ( texelSize.x == 0.0 ) return;\n\n\t\t\t\tfloat roughness = gl_FragColor.g;\n\n\t\t\t\tfloat variance = roughnessToVariance( roughness );\n\n\t\t\t\tvec3 avgNormal;\n\n\t\t\t\tfor ( float x = - 1.0; x < 2.0; x += 2.0 ) {\n\n\t\t\t\t\tfor ( float y = - 1.0; y < 2.0; y += 2.0 ) {\n\n\t\t\t\t\t\tvec2 uv = vUv + vec2( x, y ) * 0.25 * texelSize;\n\n\t\t\t\t\t\tavgNormal += normalize( texture2D( normalMap, uv, - 1.0 ).xyz - 0.5 );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tvariance += 1.0 - 0.25 * length( avgNormal );\n\n\t\t\t\tgl_FragColor.g = varianceToRoughness( variance );\n\n\t\t\t}\n\t\t",blending:s.NoBlending,depthTest:!1,depthWrite:!1})).type="RoughnessMipmapper",a),l=new s.Mesh(new s.PlaneGeometry(2,2),o),c=new s.OrthographicCamera(0,1,0,1,0,1),h=null;t.RoughnessMipmapper=class{constructor(e){i(this,"generateMipmaps",(function(e){if("roughnessMap"in e!=!1){var{roughnessMap:t,normalMap:n}=e;if(null!==t&&null!==n&&t.generateMipmaps&&!e.userData.roughnessUpdated){e.userData.roughnessUpdated=!0;var r=Math.max(t.image.width,n.image.width),i=Math.max(t.image.height,n.image.height);if(s.MathUtils.isPowerOfTwo(r)&&s.MathUtils.isPowerOfTwo(i)){var a=this._renderer.getRenderTarget(),u=this._renderer.autoClear;if(this._renderer.autoClear=!1,null!==h&&h.width===r&&h.height===i||(null!==h&&h.dispose(),(h=new s.WebGLRenderTarget(r,i,{depthBuffer:!1})).scissorTest=!0),r!==t.image.width||i!==t.image.height){var d={wrapS:t.wrapS,wrapT:t.wrapT,magFilter:t.magFilter,minFilter:t.minFilter,depthBuffer:!1},p=new s.WebGLRenderTarget(r,i,d);p.texture.generateMipmaps=!0,this._renderer.setRenderTarget(p),e.roughnessMap=p.texture,e.metalnessMap==t&&(e.metalnessMap=e.roughnessMap),e.aoMap==t&&(e.aoMap=e.roughnessMap)}o.uniforms.roughnessMap.value=t,o.uniforms.normalMap.value=n;var f=new s.Vector2(0,0),m=o.uniforms.texelSize.value;for(let t=0;r>=1&&i>=1;++t,r/=2,i/=2)m.set(1/r,1/i),0==t&&m.set(0,0),h.viewport.set(f.x,f.y,r,i),h.scissor.set(f.x,f.y,r,i),this._renderer.setRenderTarget(h),this._renderer.render(l,c),this._renderer.copyFramebufferToTexture(f,e.roughnessMap,t),o.uniforms.roughnessMap.value=e.roughnessMap;t!==e.roughnessMap&&t.dispose(),this._renderer.setRenderTarget(a),this._renderer.autoClear=u}}}})),i(this,"dispose",(function(){o.dispose(),l.geometry.dispose(),null!=h&&h.dispose()})),this._renderer=e,this._renderer.compile(l,c)}}},21372:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i={createMeshesFromInstancedMesh:function(e){const t=new r.Group,n=e.count,i=e.geometry,s=e.material;for(let a=0;a{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(18384);t.ShadowMapViewer=class{constructor(e){const t=this,n=void 0!==e.name&&""!==e.name;let s;const a=10,o=10,l=256,c=256,h=new r.OrthographicCamera(window.innerWidth/-2,window.innerWidth/2,window.innerHeight/2,window.innerHeight/-2,1,10);h.position.set(0,0,2);const u=new r.Scene,d=i.UnpackDepthRGBAShader,p=r.UniformsUtils.clone(d.uniforms),f=new r.ShaderMaterial({uniforms:p,vertexShader:d.vertexShader,fragmentShader:d.fragmentShader}),m=new r.PlaneGeometry(l,c),g=new r.Mesh(m,f);let A,v;if(u.add(g),n){A=document.createElement("canvas");const t=A.getContext("2d");t.font="Bold 20px Arial";const n=t.measureText(e.name).width;A.width=n,A.height=25,t.font="Bold 20px Arial",t.fillStyle="rgba( 255, 0, 0, 1 )",t.fillText(e.name,0,20);const i=new r.Texture(A);i.magFilter=r.LinearFilter,i.minFilter=r.LinearFilter,i.needsUpdate=!0;const s=new r.MeshBasicMaterial({map:i,side:r.DoubleSide});s.transparent=!0;const a=new r.PlaneGeometry(A.width,A.height);v=new r.Mesh(a,s),u.add(v)}this.enabled=!0,this.size={width:l,height:c,set:function(e,n){this.width=e,this.height=n,g.scale.set(this.width/l,this.height/c,1),t.position.set(t.position.x,t.position.y)}},this.position={x:a,y:o,set:function(e,r){this.x=e,this.y=r;const i=t.size.width,s=t.size.height;g.position.set(-window.innerWidth/2+i/2+this.x,window.innerHeight/2-s/2-this.y,0),n&&v.position.set(g.position.x,g.position.y-t.size.height/2+A.height/2,0)}},this.render=function(t){this.enabled&&(p.tDiffuse.value=e.shadow.map.texture,s=t.autoClear,t.autoClear=!1,t.clearDepth(),t.render(u,h),t.autoClear=s)},this.updateForWindowResize=function(){this.enabled&&(h.left=window.innerWidth/-2,h.right=window.innerWidth/2,h.top=window.innerHeight/2,h.bottom=window.innerHeight/-2,h.updateProjectionMatrix(),this.update())},this.update=function(){this.position.set(this.position.x,this.position.y),this.size.set(this.size.width,this.size.height)},this.update()}}},57008:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);function i(e,t,n={}){const i=new r.Vector3,o=new r.Quaternion,l=new r.Vector3,c=new r.Matrix4,h=new r.Matrix4,u=new r.Matrix4;n.preserveMatrix=void 0===n.preserveMatrix||n.preserveMatrix,n.preservePosition=void 0===n.preservePosition||n.preservePosition,n.preserveHipPosition=void 0!==n.preserveHipPosition&&n.preserveHipPosition,n.useTargetMatrix=void 0!==n.useTargetMatrix&&n.useTargetMatrix,n.hip=void 0!==n.hip?n.hip:"hip",n.names=n.names||{};const d=t.isObject3D?t.skeleton.bones:a(t),p=e.isObject3D?e.skeleton.bones:a(e);let f,m,g,A,v;if(e.isObject3D?e.skeleton.pose():(n.useTargetMatrix=!0,n.preserveMatrix=!1),n.preservePosition){v=[];for(let e=0;e{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);t.UVsDebug=function(e,t=1024){const n=new r.Vector2,i=new r.Vector2,s=[new r.Vector2,new r.Vector2,new r.Vector2],a=[],o=document.createElement("canvas"),l=t,c=t;o.width=l,o.height=c;const h=o.getContext("2d");h.lineWidth=1,h.strokeStyle="rgb( 63, 63, 63 )",h.textAlign="center",h.fillStyle="rgb( 255, 255, 255 )",h.fillRect(0,0,l,c);const u=e.index,d=e.attributes.uv;if(u)for(let r=0,f=u.count;r.95&&h.fillText(r,n.x%1*l,(1-n.y)*c),h.font="12px Arial",h.fillStyle="rgb( 191, 191, 191 )";for(let s=0,a=t.length;s.95&&h.fillText("abc"[s]+a,i.x%1*l,(1-i.y)*c)}}}},18248:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.WorkerPool=class{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e{const r=this._getIdleWorker();-1!==r?(this._initWorker(r),this.workerStatus|=1<e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}},53197:(e,t)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});t.ARButton=class{static createButton(e,t={}){const n=document.createElement("button");function r(){n.style.display="",n.style.cursor="auto",n.style.left="calc(50% - 75px)",n.style.width="150px",n.onmouseenter=null,n.onmouseleave=null,n.onclick=null,n.textContent="AR NOT SUPPORTED"}function i(e){e.style.position="absolute",e.style.bottom="20px",e.style.padding="12px 6px",e.style.border="1px solid #fff",e.style.borderRadius="4px",e.style.background="rgba(0,0,0,0.1)",e.style.color="#fff",e.style.font="normal 13px sans-serif",e.style.textAlign="center",e.style.opacity="0.5",e.style.outline="none",e.style.zIndex="999"}if("xr"in navigator)return n.id="ARButton",n.style.display="none",i(n),navigator.xr.isSessionSupported("immersive-ar").then((function(i){i?function(){if(void 0===t.domOverlay){const e=document.createElement("div");e.style.display="none",document.body.appendChild(e);const n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("width","38px"),n.setAttribute("height","38px"),n.style.position="absolute",n.style.right="20px",n.style.top="20px",n.addEventListener("click",(function(){null==r||r.end()})),e.appendChild(n);const i=document.createElementNS("http://www.w3.org/2000/svg","path");i.setAttribute("d","M 12,12 L 28,28 M 28,12 12,28"),i.setAttribute("stroke","#fff"),i.setAttribute("stroke-width","2px"),n.appendChild(i),void 0===t.optionalFeatures&&(t.optionalFeatures=[]),t.optionalFeatures.push("dom-overlay"),t.domOverlay={root:e}}let r=null;async function i(i){i.addEventListener("end",s),e.xr.setReferenceSpaceType("local"),await e.xr.setSession(i),n.textContent="STOP AR",t.domOverlay.root.style.display="",r=i}function s(){r.removeEventListener("end",s),n.textContent="START AR",t.domOverlay.root.style.display="none",r=null}n.style.display="",n.style.cursor="pointer",n.style.left="calc(50% - 50px)",n.style.width="100px",n.textContent="START AR",n.onmouseenter=()=>{n.style.opacity="1.0"},n.onmouseleave=()=>{n.style.opacity="0.5"},n.onclick=()=>{null===r?navigator.xr.requestSession("immersive-ar",t).then(i):r.end()}}():r()})).catch(r),n;{const e=document.createElement("a");return!1===window.isSecureContext?(e.href=document.location.href.replace(/^http:/,"https:"),e.innerHTML="WEBXR NEEDS HTTPS"):(e.href="https://immersiveweb.dev/",e.innerHTML="WEBXR NOT AVAILABLE"),e.style.left="calc(50% - 90px)",e.style.width="180px",e.style.textDecoration="none",i(e),e}}}},96136:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(49392);class o extends s.Object3D{constructor(e,t,n){super(),i(this,"controller"),i(this,"motionController"),i(this,"envMap"),i(this,"mesh"),i(this,"xrInputSource"),this.controller=e,this.motionController=null,this.envMap=null,this.mesh=null,this.xrInputSource=null,e.addEventListener("connected",(r=>{const i=r.data;i.hand&&!this.motionController&&(this.xrInputSource=i,this.motionController=new a.XRHandMeshModel(this,e,void 0,i.handedness,"left"===i.handedness?t:n))})),e.addEventListener("disconnected",(()=>{this.dispose()}))}updateMatrixWorld(e){super.updateMatrixWorld(e),this.motionController&&this.motionController.updateMesh()}getPointerPosition(){const e=this.controller.joints["index-finger-tip"];return e?e.position:null}intersectBoxObject(e){const t=this.getPointerPosition();if(t){const n=new s.Sphere(t,.01),r=(new s.Box3).setFromObject(e);return n.intersectsBox(r)}return!1}checkButton(e){this.intersectBoxObject(e)?e.onPress():e.onClear(),e.isPressed()&&e.whilePressed()}dispose(){this.clear(),this.motionController=null}}t.OculusHandModel=o},57873:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const i=r(n(48480)),s=.01,a=.4,o=.01,l=.003,c=16,h=12,u=new i.Vector3(0,1,0),d=new i.Vector3(0,0,1);class p extends i.Object3D{constructor(e,t){super(),this.hand=e,this.controller=t,this.motionController=null,this.envMap=null,this.mesh=null,this.pointerGeometry=null,this.pointerMesh=null,this.pointerObject=null,this.pinched=!1,this.attached=!1,this.cursorObject=null,this.raycaster=null,this._onConnected=this._onConnected.bind(this),this._onDisconnected=this._onDisconnected.bind(this),this.hand.addEventListener("connected",this._onConnected),this.hand.addEventListener("disconnected",this._onDisconnected)}_onConnected(e){const t=e.data;t.hand&&(this.visible=!0,this.xrInputSource=t,this.createPointer())}_onDisconnected(){var e,t;this.visible=!1,this.xrInputSource=null,null==(e=this.pointerGeometry)||e.dispose(),null==(t=this.pointerMesh)||t.material.dispose(),this.clear()}_drawVerticesRing(e,t,n){const r=t.clone();for(var i=0;i1)this._updatePointerVertices(o),this.pointerMesh.position.set(0,0,-.01),this.pointerMesh.material.opacity=a;else if(i>0){const e=.007*i+l;this._updatePointerVertices(e),c<1?(this.pointerMesh.position.set(0,0,-1*e-.02*(1-c)),this.pointerMesh.material.opacity=a+.6*(1-c)):(this.pointerMesh.position.set(0,0,-1*e),this.pointerMesh.material.opacity=a)}else this._updatePointerVertices(l),this.pointerMesh.position.set(0,0,-.023),this.pointerMesh.material.opacity=1;this.cursorObject.material.opacity=this.pointerMesh.material.opacity}updateMatrixWorld(e){super.updateMatrixWorld(e),this.pointerGeometry&&(this._updatePointer(),this._updateRaycaster())}isPinched(){return this.pinched}setAttached(e){this.attached=e}isAttached(){return this.attached}intersectObject(e,t=!0){if(this.raycaster)return this.raycaster.intersectObject(e,t)}intersectObjects(e,t=!0){if(this.raycaster)return this.raycaster.intersectObjects(e,t)}checkIntersections(e,t=!1){if(this.raycaster&&!this.attached){const n=this.raycaster.intersectObjects(e,t),r=new i.Vector3(0,0,-1);if(n.length>0){const e=n[0].distance;this.cursorObject.position.copy(r.multiplyScalar(e))}else this.cursorObject.position.copy(r.multiplyScalar(1.5))}}setCursor(e){const t=new i.Vector3(0,0,-1);this.raycaster&&!this.attached&&this.cursorObject.position.copy(t.multiplyScalar(e))}dispose(){this._onDisconnected(),this.hand.removeEventListener("connected",this._onConnected),this.hand.removeEventListener("disconnected",this._onDisconnected)}}t.OculusHandPointerModel=p},22404:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const i=r(n(48480));t.createText=function(e,t){const n=document.createElement("canvas"),r=n.getContext("2d");let s=null;const a=100;r.font="normal 100px Arial",s=r.measureText(e);const o=s.width;n.width=o,n.height=a,r.font="normal 100px Arial",r.textAlign="center",r.textBaseline="middle",r.fillStyle="#ffffff",r.fillText(e,o/2,50);const l=new i.Texture(n);l.needsUpdate=!0;const c=new i.MeshBasicMaterial({color:16777215,side:i.DoubleSide,map:l,transparent:!0}),h=new i.PlaneGeometry(t*o/a,t);return new i.Mesh(h,c)}},61976:(e,t)=>{"use strict";var n=Object.defineProperty;Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=class{static createButton(e,t={}){const n=document.createElement("button");function i(){n.style.display="",n.style.cursor="auto",n.style.left="calc(50% - 75px)",n.style.width="150px",n.onmouseenter=null,n.onmouseleave=null,n.onclick=null,n.textContent="VR NOT SUPPORTED"}function s(e){e.style.position="absolute",e.style.bottom="20px",e.style.padding="12px 6px",e.style.border="1px solid #fff",e.style.borderRadius="4px",e.style.background="rgba(0,0,0,0.1)",e.style.color="#fff",e.style.font="normal 13px sans-serif",e.style.textAlign="center",e.style.opacity="0.5",e.style.outline="none",e.style.zIndex="999"}if("xr"in navigator)return s(n),n.id="VRButton",n.style.display="none",navigator.xr.isSessionSupported("immersive-vr").then((s=>{s?function(){let r=null;async function i(t){t.addEventListener("end",s),await e.xr.setSession(t),n.textContent="EXIT VR",r=t}function s(){r.removeEventListener("end",s),n.textContent="ENTER VR",r=null}n.style.display="",n.style.cursor="pointer",n.style.left="calc(50% - 50px)",n.style.width="100px",n.textContent="ENTER VR",n.onmouseenter=()=>{n.style.opacity="1.0"},n.onmouseleave=()=>{n.style.opacity="0.5"},n.onclick=()=>{var e;if(null===r){const n=[t.optionalFeatures,"local-floor","bounded-floor","hand-tracking"].flat().filter(Boolean);null==(e=navigator.xr)||e.requestSession("immersive-vr",{...t,optionalFeatures:n}).then(i)}else r.end()}}():i(),s&&r.xrSessionIsGranted&&n.click()})),n;{const e=document.createElement("a");return!1===window.isSecureContext?(e.href=document.location.href.replace(/^http:/,"https:"),e.innerHTML="WEBXR NEEDS HTTPS"):(e.href="https://immersiveweb.dev/",e.innerHTML="WEBXR NOT AVAILABLE"),e.style.left="calc(50% - 90px)",e.style.width="180px",e.style.textDecoration="none",s(e),e}}static registerSessionGrantedListener(){"undefined"!=typeof navigator&&"xr"in navigator&&navigator.xr.addEventListener("sessiongranted",(()=>{r.xrSessionIsGranted=!0}))}};let i=r;var s;((e,t,r)=>{t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(i,"symbol"!=typeof(s="xrSessionIsGranted")?s+"":s,!1),i.registerSessionGrantedListener(),t.VRButton=i},65028:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(48480),a=n(61272),o=n(9704),l=(e,t)=>{t.traverse((t=>{t instanceof s.Mesh&&"envMap"in t.material&&(t.material.envMap=e,t.material.needsUpdate=!0)}))};class c extends s.Object3D{constructor(){super(),i(this,"envMap"),i(this,"motionController"),this.motionController=null,this.envMap=null}setEnvironmentMap(e){return this.envMap==e||(this.envMap=e,l(this.envMap,this)),this}updateMatrixWorld(e){super.updateMatrixWorld(e),this.motionController&&(this.motionController.updateFromGamepad(),Object.values(this.motionController.components).forEach((e=>{Object.values(e.visualResponses).forEach((e=>{const{valueNode:t,minNode:n,maxNode:r,value:i,valueNodeProperty:s}=e;t&&(s===o.MotionControllerConstants.VisualResponseProperty.VISIBILITY&&"boolean"==typeof i?t.visible=i:s===o.MotionControllerConstants.VisualResponseProperty.TRANSFORM&&n&&r&&"number"==typeof i&&(t.quaternion.slerpQuaternions(n.quaternion,r.quaternion,i),t.position.lerpVectors(n.position,r.position,i)))}))})))}}function h(e,t){!function(e,t){Object.values(e.components).forEach((e=>{const{type:n,touchPointNodeName:r,visualResponses:i}=e;if(n===o.MotionControllerConstants.ComponentType.TOUCHPAD&&r)if(e.touchPointNode=t.getObjectByName(r),e.touchPointNode){const t=new s.SphereGeometry(.001),n=new s.MeshBasicMaterial({color:255}),r=new s.Mesh(t,n);e.touchPointNode.add(r)}else console.warn(`Could not find touch dot, ${e.touchPointNodeName}, in touchpad component ${e.id}`);Object.values(i).forEach((e=>{const{valueNodeName:n,minNodeName:r,maxNodeName:i,valueNodeProperty:s}=e;if(s===o.MotionControllerConstants.VisualResponseProperty.TRANSFORM&&r&&i){if(e.minNode=t.getObjectByName(r),e.maxNode=t.getObjectByName(i),!e.minNode)return void console.warn(`Could not find ${r} in the model`);if(!e.maxNode)return void console.warn(`Could not find ${i} in the model`)}e.valueNode=t.getObjectByName(n),e.valueNode||console.warn(`Could not find ${n} in the model`)}))}))}(e.motionController,t),e.envMap&&l(e.envMap,t),e.add(t)}t.XRControllerModelFactory=class{constructor(e=null){i(this,"gltfLoader"),i(this,"path"),i(this,"_assetCache"),this.gltfLoader=e,this.path="https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles",this._assetCache={},this.gltfLoader||(this.gltfLoader=new a.GLTFLoader)}createControllerModel(e){const t=new c;let n=null;const r=e=>{const r=e.data;"tracked-pointer"===r.targetRayMode&&r.gamepad&&o.fetchProfile(r,this.path,"generic-trigger").then((({profile:e,assetPath:i})=>{if(!i)throw new Error("no asset path");t.motionController=new o.MotionController(r,e,i);const s=t.motionController.assetUrl,a=this._assetCache[s];if(a)n=a.scene.clone(),h(t,n);else{if(!this.gltfLoader)throw new Error("GLTFLoader not set.");this.gltfLoader.setPath(""),this.gltfLoader.load(t.motionController.assetUrl,(e=>{t.motionController?(this._assetCache[s]=e,n=e.scene.clone(),h(t,n)):console.warn("motionController gone while gltf load, bailing...")}),(()=>{}),(()=>{throw new Error(`Asset ${s} missing or malformed.`)}))}})).catch((e=>{console.warn(e)}))};e.addEventListener("connected",r);const i=()=>{e.removeEventListener("connected",r),e.removeEventListener("disconnected",i),t.motionController=null,n&&t.remove(n),n=null};return e.addEventListener("disconnected",i),t}}},66540:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480);class i{constructor(e,t,n,i,s){this.xrLight=e,this.renderer=t,this.lightProbe=n,this.xrWebGLBinding=null,this.estimationStartCallback=s,this.frameCallback=this.onXRFrame.bind(this);const a=t.xr.getSession();if(i&&"XRWebGLBinding"in window){const n=new r.WebGLCubeRenderTarget(16);e.environment=n.texture;const i=t.getContext();switch(a.preferredReflectionFormat){case"srgba8":i.getExtension("EXT_sRGB");break;case"rgba16f":i.getExtension("OES_texture_half_float")}this.xrWebGLBinding=new XRWebGLBinding(a,i),this.lightProbe.addEventListener("reflectionchange",(()=>{this.updateReflection()}))}a.requestAnimationFrame(this.frameCallback)}updateReflection(){const e=this.renderer.properties.get(this.xrLight.environment);if(e){const t=this.xrWebGLBinding.getReflectionCubeMap(this.lightProbe);t&&(e.__webglTexture=t,this.xrLight.environment.needsPMREMUpdate=!0)}}onXRFrame(e,t){if(!this.xrLight)return;t.session.requestAnimationFrame(this.frameCallback);const n=t.getLightEstimate(this.lightProbe);if(n){this.xrLight.lightProbe.sh.fromArray(n.sphericalHarmonicsCoefficients),this.xrLight.lightProbe.intensity=1;const e=Math.max(1,Math.max(n.primaryLightIntensity.x,Math.max(n.primaryLightIntensity.y,n.primaryLightIntensity.z)));this.xrLight.directionalLight.color.setRGB(n.primaryLightIntensity.x/e,n.primaryLightIntensity.y/e,n.primaryLightIntensity.z/e),this.xrLight.directionalLight.intensity=e,this.xrLight.directionalLight.position.copy(n.primaryLightDirection),this.estimationStartCallback&&(this.estimationStartCallback(),this.estimationStartCallback=null)}}dispose(){this.xrLight=null,this.renderer=null,this.lightProbe=null,this.xrWebGLBinding=null}}class s extends r.Group{constructor(e,t=!0){super(),this.lightProbe=new r.LightProbe,this.lightProbe.intensity=0,this.add(this.lightProbe),this.directionalLight=new r.DirectionalLight,this.directionalLight.intensity=0,this.add(this.directionalLight),this.environment=null;let n=null,s=!1;e.xr.addEventListener("sessionstart",(()=>{const r=e.xr.getSession();"requestLightProbe"in r&&r.requestLightProbe({reflectionFormat:r.preferredReflectionFormat}).then((r=>{n=new i(this,e,r,t,(()=>{s=!0,this.dispatchEvent({type:"estimationstart"})}))}))})),e.xr.addEventListener("sessionend",(()=>{n&&(n.dispose(),n=null),s&&this.dispatchEvent({type:"estimationend"})})),this.dispose=()=>{n&&(n.dispose(),n=null),this.remove(this.lightProbe),this.lightProbe=null,this.remove(this.directionalLight),this.directionalLight=null,this.environment=null}}}t.XREstimatedLight=s},49392:(e,t,n)=>{"use strict";var r=Object.defineProperty,i=(e,t,n)=>(((e,t,n)=>{t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=n(61272);t.XRHandMeshModel=class{constructor(e,t,n="https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles/generic-hand/",r,a){i(this,"controller"),i(this,"handModel"),i(this,"bones"),this.controller=t,this.handModel=e,this.bones=[];const o=new s.GLTFLoader;a||o.setPath(n),o.load(null!=a?a:`${r}.glb`,(e=>{const t=e.scene.children[0];this.handModel.add(t);const n=t.getObjectByProperty("type","SkinnedMesh");n.frustumCulled=!1,n.castShadow=!0,n.receiveShadow=!0;["wrist","thumb-metacarpal","thumb-phalanx-proximal","thumb-phalanx-distal","thumb-tip","index-finger-metacarpal","index-finger-phalanx-proximal","index-finger-phalanx-intermediate","index-finger-phalanx-distal","index-finger-tip","middle-finger-metacarpal","middle-finger-phalanx-proximal","middle-finger-phalanx-intermediate","middle-finger-phalanx-distal","middle-finger-tip","ring-finger-metacarpal","ring-finger-phalanx-proximal","ring-finger-phalanx-intermediate","ring-finger-phalanx-distal","ring-finger-tip","pinky-finger-metacarpal","pinky-finger-phalanx-proximal","pinky-finger-phalanx-intermediate","pinky-finger-phalanx-distal","pinky-finger-tip"].forEach((e=>{const n=t.getObjectByName(e);void 0!==n?n.jointName=e:console.warn(`Couldn't find ${e} in ${r} hand mesh`),this.bones.push(n)}))}))}updateMesh(){const e=this.controller.joints;for(let t=0;t{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=n(81528),s=n(49392);class a extends r.Object3D{constructor(e){super(),this.controller=e,this.motionController=null,this.envMap=null,this.mesh=null}updateMatrixWorld(e){super.updateMatrixWorld(e),this.motionController&&this.motionController.updateMesh()}}t.XRHandModelFactory=class{constructor(){this.path=null}setPath(e){return this.path=e,this}createHandModel(e,t){const n=new a(e);return e.addEventListener("connected",(r=>{const a=r.data;a.hand&&!n.motionController&&(n.xrInputSource=a,void 0===t||"spheres"===t?n.motionController=new i.XRHandPrimitiveModel(n,e,this.path,a.handedness,{primitive:"sphere"}):"boxes"===t?n.motionController=new i.XRHandPrimitiveModel(n,e,this.path,a.handedness,{primitive:"box"}):"mesh"===t&&(n.motionController=new s.XRHandMeshModel(n,e,this.path,a.handedness)))})),e.addEventListener("disconnected",(()=>{})),n}}},81528:(e,t,n)=>{"use strict";Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const r=n(48480),i=new r.Matrix4,s=new r.Vector3;t.XRHandPrimitiveModel=class{constructor(e,t,n,i,s){let a;this.controller=t,this.handModel=e,this.envMap=null,s&&s.primitive&&"sphere"!==s.primitive?"box"===s.primitive&&(a=new r.BoxGeometry(1,1,1)):a=new r.SphereGeometry(1,10,10);const o=new r.MeshStandardMaterial;this.handMesh=new r.InstancedMesh(a,o,30),this.handMesh.instanceMatrix.setUsage(r.DynamicDrawUsage),this.handMesh.castShadow=!0,this.handMesh.receiveShadow=!0,this.handModel.add(this.handMesh),this.joints=["wrist","thumb-metacarpal","thumb-phalanx-proximal","thumb-phalanx-distal","thumb-tip","index-finger-metacarpal","index-finger-phalanx-proximal","index-finger-phalanx-intermediate","index-finger-phalanx-distal","index-finger-tip","middle-finger-metacarpal","middle-finger-phalanx-proximal","middle-finger-phalanx-intermediate","middle-finger-phalanx-distal","middle-finger-tip","ring-finger-metacarpal","ring-finger-phalanx-proximal","ring-finger-phalanx-intermediate","ring-finger-phalanx-distal","ring-finger-tip","pinky-finger-metacarpal","pinky-finger-phalanx-proximal","pinky-finger-phalanx-intermediate","pinky-finger-phalanx-distal","pinky-finger-tip"]}updateMesh(){const e=this.controller.joints;let t=0;for(let n=0;n{"use strict";const n="152",r=1,i=2,s=3,a=0,o=1,l=100,c=0,h=1,u=2,d=0,p=1,f=2,m=3,g=4,A=5,v=300,y=301,x=302,b=303,E=304,_=306,S=1e3,M=1001,w=1002,C=1003,T=1004,I=1005,B=1006,R=1007,P=1008,D=1009,L=1012,F=1014,U=1015,O=1016,N=1020,k=1023,G=1026,z=1027,Q=33776,V=33777,H=33778,j=33779,W=35840,X=35841,Y=35842,q=35843,K=37492,J=37496,Z=37808,$=37809,ee=37810,te=37811,ne=37812,re=37813,ie=37814,se=37815,ae=37816,oe=37817,le=37818,ce=37819,he=37820,ue=37821,de=36492,pe=36284,fe=36285,me=36286,ge=2300,Ae=2301,ve=2302,ye=2400,xe=2401,be=2402,Ee=2500,_e=2501,Se=3e3,Me=3001,we="",Ce="srgb",Te="srgb-linear",Ie="display-p3",Be=7680,Re=35044,Pe="300 es",De=1035;class Le{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t>8&255]+Fe[e>>16&255]+Fe[e>>24&255]+"-"+Fe[255&t]+Fe[t>>8&255]+"-"+Fe[t>>16&15|64]+Fe[t>>24&255]+"-"+Fe[63&n|128]+Fe[n>>8&255]+"-"+Fe[n>>16&255]+Fe[n>>24&255]+Fe[255&r]+Fe[r>>8&255]+Fe[r>>16&255]+Fe[r>>24&255]).toLowerCase()}function Ge(e,t,n){return Math.max(t,Math.min(n,e))}function ze(e,t){return(e%t+t)%t}function Qe(e,t,n){return(1-n)*e+n*t}function Ve(e){return 0==(e&e-1)&&0!==e}function He(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function je(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function We(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function Xe(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const Ye={DEG2RAD:Oe,RAD2DEG:Ne,generateUUID:ke,clamp:Ge,euclideanModulo:ze,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:Qe,damp:function(e,t,n,r){return Qe(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(ze(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(Ue=e);let t=Ue+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*Oe},radToDeg:function(e){return e*Ne},isPowerOfTwo:Ve,ceilPowerOfTwo:He,floorPowerOfTwo:je,setQuaternionFromProperEuler:function(e,t,n,r,i){const s=Math.cos,a=Math.sin,o=s(n/2),l=a(n/2),c=s((t+r)/2),h=a((t+r)/2),u=s((t-r)/2),d=a((t-r)/2),p=s((r-t)/2),f=a((r-t)/2);switch(i){case"XYX":e.set(o*h,l*u,l*d,o*c);break;case"YZY":e.set(l*d,o*h,l*u,o*c);break;case"ZXZ":e.set(l*u,l*d,o*h,o*c);break;case"XZX":e.set(o*h,l*f,l*p,o*c);break;case"YXY":e.set(l*p,o*h,l*f,o*c);break;case"ZYZ":e.set(l*f,l*p,o*h,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:Xe,denormalize:We};class qe{constructor(e=0,t=0){qe.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Ge(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,s=this.y-e.y;return this.x=i*n-s*r+e.x,this.y=i*r+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ke{constructor(){Ke.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,n,r,i,s,a,o,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=i,c[5]=o,c[6]=n,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,s=n[0],a=n[3],o=n[6],l=n[1],c=n[4],h=n[7],u=n[2],d=n[5],p=n[8],f=r[0],m=r[3],g=r[6],A=r[1],v=r[4],y=r[7],x=r[2],b=r[5],E=r[8];return i[0]=s*f+a*A+o*x,i[3]=s*m+a*v+o*b,i[6]=s*g+a*y+o*E,i[1]=l*f+c*A+h*x,i[4]=l*m+c*v+h*b,i[7]=l*g+c*y+h*E,i[2]=u*f+d*A+p*x,i[5]=u*m+d*v+p*b,i[8]=u*g+d*y+p*E,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8];return t*s*c-t*a*l-n*i*c+n*a*o+r*i*l-r*s*o}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8],h=c*s-a*l,u=a*o-c*i,d=l*i-s*o,p=t*h+n*u+r*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return e[0]=h*f,e[1]=(r*l-c*n)*f,e[2]=(a*n-r*s)*f,e[3]=u*f,e[4]=(c*t-r*o)*f,e[5]=(r*i-a*t)*f,e[6]=d*f,e[7]=(n*o-l*t)*f,e[8]=(s*t-n*i)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,s,a){const o=Math.cos(i),l=Math.sin(i);return this.set(n*o,n*l,-n*(o*s+l*a)+s+e,-r*l,r*o,-r*(-l*s+o*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Je.makeScale(e,t)),this}rotate(e){return this.premultiply(Je.makeRotation(-e)),this}translate(e,t){return this.premultiply(Je.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const Je=new Ke;function Ze(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const $e={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function et(e,t){return new $e[e](t)}function tt(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}const nt={};function rt(e){e in nt||(nt[e]=!0,console.warn(e))}function it(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function st(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const at=(new Ke).fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),ot=(new Ke).fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);const lt={[Te]:e=>e,[Ce]:e=>e.convertSRGBToLinear(),[Ie]:function(e){return e.convertSRGBToLinear().applyMatrix3(ot)}},ct={[Te]:e=>e,[Ce]:e=>e.convertLinearToSRGB(),[Ie]:function(e){return e.applyMatrix3(at).convertLinearToSRGB()}},ht={enabled:!0,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(e){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!e},get workingColorSpace(){return Te},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,n){if(!1===this.enabled||t===n||!t||!n)return e;const r=lt[t],i=ct[n];if(void 0===r||void 0===i)throw new Error(`Unsupported color space conversion, "${t}" to "${n}".`);return i(r(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}};let ut;class dt{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===ut&&(ut=tt("canvas")),ut.width=e.width,ut.height=e.height;const n=ut.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=ut}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=tt("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==v)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case S:e.x=e.x-Math.floor(e.x);break;case M:e.x=e.x<0?0:1;break;case w:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case S:e.y=e.y-Math.floor(e.y);break;case M:e.y=e.y<0?0:1;break;case w:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return rt("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Ce?Me:Se}set encoding(e){rt("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Me?Ce:we}}gt.DEFAULT_IMAGE=null,gt.DEFAULT_MAPPING=v,gt.DEFAULT_ANISOTROPY=1;class At{constructor(e=0,t=0,n=0,r=1){At.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r+s[12]*i,this.y=s[1]*t+s[5]*n+s[9]*r+s[13]*i,this.z=s[2]*t+s[6]*n+s[10]*r+s[14]*i,this.w=s[3]*t+s[7]*n+s[11]*r+s[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const s=.01,a=.1,o=e.elements,l=o[0],c=o[4],h=o[8],u=o[1],d=o[5],p=o[9],f=o[2],m=o[6],g=o[10];if(Math.abs(c-u)o&&e>A?eA?o=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),s=Math.atan2(i,t*n);e=Math.sin(e*s)/i,a=Math.sin(a*s)/i}const i=a*n;if(o=o*e+u*i,l=l*e+d*i,c=c*e+p*i,h=h*e+f*i,e===1-a){const e=1/Math.sqrt(o*o+l*l+c*c+h*h);o*=e,l*=e,c*=e,h*=e}}e[t]=o,e[t+1]=l,e[t+2]=c,e[t+3]=h}static multiplyQuaternionsFlat(e,t,n,r,i,s){const a=n[r],o=n[r+1],l=n[r+2],c=n[r+3],h=i[s],u=i[s+1],d=i[s+2],p=i[s+3];return e[t]=a*p+c*h+o*d-l*u,e[t+1]=o*p+c*u+l*h-a*d,e[t+2]=l*p+c*d+a*u-o*h,e[t+3]=c*p-a*h-o*u-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const n=e._x,r=e._y,i=e._z,s=e._order,a=Math.cos,o=Math.sin,l=a(n/2),c=a(r/2),h=a(i/2),u=o(n/2),d=o(r/2),p=o(i/2);switch(s){case"XYZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"YXZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"ZXY":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"ZYX":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"YZX":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case"XZY":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],s=t[1],a=t[5],o=t[9],l=t[2],c=t[6],h=t[10],u=n+a+h;if(u>0){const e=.5/Math.sqrt(u+1);this._w=.25/e,this._x=(c-o)*e,this._y=(i-l)*e,this._z=(s-r)*e}else if(n>a&&n>h){const e=2*Math.sqrt(1+n-a-h);this._w=(c-o)/e,this._x=.25*e,this._y=(r+s)/e,this._z=(i+l)/e}else if(a>h){const e=2*Math.sqrt(1+a-n-h);this._w=(i-l)/e,this._x=(r+s)/e,this._y=.25*e,this._z=(o+c)/e}else{const e=2*Math.sqrt(1+h-n-a);this._w=(s-r)/e,this._x=(i+l)/e,this._y=(o+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Ge(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,s=e._w,a=t._x,o=t._y,l=t._z,c=t._w;return this._x=n*c+s*a+r*l-i*o,this._y=r*c+s*o+i*a-n*l,this._z=i*c+s*l+n*o-r*a,this._w=s*c-n*a-r*o-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,s=this._w;let a=s*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=n,this._y=r,this._z=i,this;const o=1-a*a;if(o<=Number.EPSILON){const e=1-t;return this._w=e*s+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(o),c=Math.atan2(l,a),h=Math.sin((1-t)*c)/l,u=Math.sin(t*c)/l;return this._w=s*h+this._w*u,this._x=n*h+this._x*u,this._y=r*h+this._y*u,this._z=i*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class Et{constructor(e=0,t=0,n=0){Et.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(St.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(St.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,s=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*s,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*s,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*s,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,s=e.y,a=e.z,o=e.w,l=o*t+s*r-a*n,c=o*n+a*t-i*r,h=o*r+i*n-s*t,u=-i*t-s*n-a*r;return this.x=l*o+u*-i+c*-a-h*-s,this.y=c*o+u*-s+h*-i-l*-a,this.z=h*o+u*-a+l*-s-c*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,s=t.x,a=t.y,o=t.z;return this.x=r*o-i*a,this.y=i*s-n*o,this.z=n*a-r*s,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return _t.copy(this).projectOnVector(e),this.sub(_t)}reflect(e){return this.sub(_t.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Ge(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const _t=new Et,St=new bt;class Mt{constructor(e=new Et(1/0,1/0,1/0),t=new Et(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Ct),Ct.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ft),Ut.subVectors(this.max,Ft),It.subVectors(e.a,Ft),Bt.subVectors(e.b,Ft),Rt.subVectors(e.c,Ft),Pt.subVectors(Bt,It),Dt.subVectors(Rt,Bt),Lt.subVectors(It,Rt);let t=[0,-Pt.z,Pt.y,0,-Dt.z,Dt.y,0,-Lt.z,Lt.y,Pt.z,0,-Pt.x,Dt.z,0,-Dt.x,Lt.z,0,-Lt.x,-Pt.y,Pt.x,0,-Dt.y,Dt.x,0,-Lt.y,Lt.x,0];return!!kt(t,It,Bt,Rt,Ut)&&(t=[1,0,0,0,1,0,0,0,1],!!kt(t,It,Bt,Rt,Ut)&&(Ot.crossVectors(Pt,Dt),t=[Ot.x,Ot.y,Ot.z],kt(t,It,Bt,Rt,Ut)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Ct).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(Ct).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(wt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),wt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),wt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),wt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),wt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),wt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),wt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),wt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(wt)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const wt=[new Et,new Et,new Et,new Et,new Et,new Et,new Et,new Et],Ct=new Et,Tt=new Mt,It=new Et,Bt=new Et,Rt=new Et,Pt=new Et,Dt=new Et,Lt=new Et,Ft=new Et,Ut=new Et,Ot=new Et,Nt=new Et;function kt(e,t,n,r,i){for(let s=0,a=e.length-3;s<=a;s+=3){Nt.fromArray(e,s);const a=i.x*Math.abs(Nt.x)+i.y*Math.abs(Nt.y)+i.z*Math.abs(Nt.z),o=t.dot(Nt),l=n.dot(Nt),c=r.dot(Nt);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>a)return!1}return!0}const Gt=new Mt,zt=new Et,Qt=new Et;class Vt{constructor(e=new Et,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Gt.setFromPoints(e).getCenter(n);let r=0;for(let i=0,s=e.length;ithis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;zt.subVectors(e,this.center);const t=zt.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(zt,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(Qt.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(zt.copy(e.center).add(Qt)),this.expandByPoint(zt.copy(e.center).sub(Qt))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Ht=new Et,jt=new Et,Wt=new Et,Xt=new Et,Yt=new Et,qt=new Et,Kt=new Et;class Jt{constructor(e=new Et,t=new Et(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Ht)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Ht.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ht.copy(this.origin).addScaledVector(this.direction,t),Ht.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){jt.copy(e).add(t).multiplyScalar(.5),Wt.copy(t).sub(e).normalize(),Xt.copy(this.origin).sub(jt);const i=.5*e.distanceTo(t),s=-this.direction.dot(Wt),a=Xt.dot(this.direction),o=-Xt.dot(Wt),l=Xt.lengthSq(),c=Math.abs(1-s*s);let h,u,d,p;if(c>0)if(h=s*o-a,u=s*a-o,p=i*c,h>=0)if(u>=-p)if(u<=p){const e=1/c;h*=e,u*=e,d=h*(h+s*u+2*a)+u*(s*h+u+2*o)+l}else u=i,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u=-i,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u<=-p?(h=Math.max(0,-(-s*i+a)),u=h>0?-i:Math.min(Math.max(-i,-o),i),d=-h*h+u*(u+2*o)+l):u<=p?(h=0,u=Math.min(Math.max(-i,-o),i),d=u*(u+2*o)+l):(h=Math.max(0,-(s*i+a)),u=h>0?i:Math.min(Math.max(-i,-o),i),d=-h*h+u*(u+2*o)+l);else u=s>0?-i:i,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,h),r&&r.copy(jt).addScaledVector(Wt,u),d}intersectSphere(e,t){Ht.subVectors(e.center,this.origin);const n=Ht.dot(this.direction),r=Ht.dot(Ht)-n*n,i=e.radius*e.radius;if(r>i)return null;const s=Math.sqrt(i-r),a=n-s,o=n+s;return o<0?null:a<0?this.at(o,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,s,a,o;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(n=(e.min.x-u.x)*l,r=(e.max.x-u.x)*l):(n=(e.max.x-u.x)*l,r=(e.min.x-u.x)*l),c>=0?(i=(e.min.y-u.y)*c,s=(e.max.y-u.y)*c):(i=(e.max.y-u.y)*c,s=(e.min.y-u.y)*c),n>s||i>r?null:((i>n||isNaN(n))&&(n=i),(s=0?(a=(e.min.z-u.z)*h,o=(e.max.z-u.z)*h):(a=(e.max.z-u.z)*h,o=(e.min.z-u.z)*h),n>o||a>r?null:((a>n||n!=n)&&(n=a),(o=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,Ht)}intersectTriangle(e,t,n,r,i){Yt.subVectors(t,e),qt.subVectors(n,e),Kt.crossVectors(Yt,qt);let s,a=this.direction.dot(Kt);if(a>0){if(r)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}Xt.subVectors(this.origin,e);const o=s*this.direction.dot(qt.crossVectors(Xt,qt));if(o<0)return null;const l=s*this.direction.dot(Yt.cross(Xt));if(l<0)return null;if(o+l>a)return null;const c=-s*Xt.dot(Kt);return c<0?null:this.at(c/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Zt{constructor(){Zt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,n,r,i,s,a,o,l,c,h,u,d,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=s,g[9]=a,g[13]=o,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Zt).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/$t.setFromMatrixColumn(e,0).length(),i=1/$t.setFromMatrixColumn(e,1).length(),s=1/$t.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,i=e.z,s=Math.cos(n),a=Math.sin(n),o=Math.cos(r),l=Math.sin(r),c=Math.cos(i),h=Math.sin(i);if("XYZ"===e.order){const e=s*c,n=s*h,r=a*c,i=a*h;t[0]=o*c,t[4]=-o*h,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-a*o,t[2]=i-e*l,t[6]=r+n*l,t[10]=s*o}else if("YXZ"===e.order){const e=o*c,n=o*h,r=l*c,i=l*h;t[0]=e+i*a,t[4]=r*a-n,t[8]=s*l,t[1]=s*h,t[5]=s*c,t[9]=-a,t[2]=n*a-r,t[6]=i+e*a,t[10]=s*o}else if("ZXY"===e.order){const e=o*c,n=o*h,r=l*c,i=l*h;t[0]=e-i*a,t[4]=-s*h,t[8]=r+n*a,t[1]=n+r*a,t[5]=s*c,t[9]=i-e*a,t[2]=-s*l,t[6]=a,t[10]=s*o}else if("ZYX"===e.order){const e=s*c,n=s*h,r=a*c,i=a*h;t[0]=o*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=o*h,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=a*o,t[10]=s*o}else if("YZX"===e.order){const e=s*o,n=s*l,r=a*o,i=a*l;t[0]=o*c,t[4]=i-e*h,t[8]=r*h+n,t[1]=h,t[5]=s*c,t[9]=-a*c,t[2]=-l*c,t[6]=n*h+r,t[10]=e-i*h}else if("XZY"===e.order){const e=s*o,n=s*l,r=a*o,i=a*l;t[0]=o*c,t[4]=-h,t[8]=l*c,t[1]=e*h+i,t[5]=s*c,t[9]=n*h-r,t[2]=r*h-n,t[6]=a*c,t[10]=i*h+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(tn,e,nn)}lookAt(e,t,n){const r=this.elements;return an.subVectors(e,t),0===an.lengthSq()&&(an.z=1),an.normalize(),rn.crossVectors(n,an),0===rn.lengthSq()&&(1===Math.abs(n.z)?an.x+=1e-4:an.z+=1e-4,an.normalize(),rn.crossVectors(n,an)),rn.normalize(),sn.crossVectors(an,rn),r[0]=rn.x,r[4]=sn.x,r[8]=an.x,r[1]=rn.y,r[5]=sn.y,r[9]=an.y,r[2]=rn.z,r[6]=sn.z,r[10]=an.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,s=n[0],a=n[4],o=n[8],l=n[12],c=n[1],h=n[5],u=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],A=n[3],v=n[7],y=n[11],x=n[15],b=r[0],E=r[4],_=r[8],S=r[12],M=r[1],w=r[5],C=r[9],T=r[13],I=r[2],B=r[6],R=r[10],P=r[14],D=r[3],L=r[7],F=r[11],U=r[15];return i[0]=s*b+a*M+o*I+l*D,i[4]=s*E+a*w+o*B+l*L,i[8]=s*_+a*C+o*R+l*F,i[12]=s*S+a*T+o*P+l*U,i[1]=c*b+h*M+u*I+d*D,i[5]=c*E+h*w+u*B+d*L,i[9]=c*_+h*C+u*R+d*F,i[13]=c*S+h*T+u*P+d*U,i[2]=p*b+f*M+m*I+g*D,i[6]=p*E+f*w+m*B+g*L,i[10]=p*_+f*C+m*R+g*F,i[14]=p*S+f*T+m*P+g*U,i[3]=A*b+v*M+y*I+x*D,i[7]=A*E+v*w+y*B+x*L,i[11]=A*_+v*C+y*R+x*F,i[15]=A*S+v*T+y*P+x*U,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],s=e[1],a=e[5],o=e[9],l=e[13],c=e[2],h=e[6],u=e[10],d=e[14];return e[3]*(+i*o*h-r*l*h-i*a*u+n*l*u+r*a*d-n*o*d)+e[7]*(+t*o*d-t*l*u+i*s*u-r*s*d+r*l*c-i*o*c)+e[11]*(+t*l*h-t*a*d-i*s*h+n*s*d+i*a*c-n*l*c)+e[15]*(-r*a*c-t*o*h+t*a*u+r*s*h-n*s*u+n*o*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8],h=e[9],u=e[10],d=e[11],p=e[12],f=e[13],m=e[14],g=e[15],A=h*m*l-f*u*l+f*o*d-a*m*d-h*o*g+a*u*g,v=p*u*l-c*m*l-p*o*d+s*m*d+c*o*g-s*u*g,y=c*f*l-p*h*l+p*a*d-s*f*d-c*a*g+s*h*g,x=p*h*o-c*f*o-p*a*u+s*f*u+c*a*m-s*h*m,b=t*A+n*v+r*y+i*x;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const E=1/b;return e[0]=A*E,e[1]=(f*u*i-h*m*i-f*r*d+n*m*d+h*r*g-n*u*g)*E,e[2]=(a*m*i-f*o*i+f*r*l-n*m*l-a*r*g+n*o*g)*E,e[3]=(h*o*i-a*u*i-h*r*l+n*u*l+a*r*d-n*o*d)*E,e[4]=v*E,e[5]=(c*m*i-p*u*i+p*r*d-t*m*d-c*r*g+t*u*g)*E,e[6]=(p*o*i-s*m*i-p*r*l+t*m*l+s*r*g-t*o*g)*E,e[7]=(s*u*i-c*o*i+c*r*l-t*u*l-s*r*d+t*o*d)*E,e[8]=y*E,e[9]=(p*h*i-c*f*i-p*n*d+t*f*d+c*n*g-t*h*g)*E,e[10]=(s*f*i-p*a*i+p*n*l-t*f*l-s*n*g+t*a*g)*E,e[11]=(c*a*i-s*h*i-c*n*l+t*h*l+s*n*d-t*a*d)*E,e[12]=x*E,e[13]=(c*f*r-p*h*r+p*n*u-t*f*u-c*n*m+t*h*m)*E,e[14]=(p*a*r-s*f*r-p*n*o+t*f*o+s*n*m-t*a*m)*E,e[15]=(s*h*r-c*a*r+c*n*o-t*h*o-s*n*u+t*a*u)*E,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,s=e.x,a=e.y,o=e.z,l=i*s,c=i*a;return this.set(l*s+n,l*a-r*o,l*o+r*a,0,l*a+r*o,c*a+n,c*o-r*s,0,l*o-r*a,c*o+r*s,i*o*o+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,s){return this.set(1,n,i,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,s=t._y,a=t._z,o=t._w,l=i+i,c=s+s,h=a+a,u=i*l,d=i*c,p=i*h,f=s*c,m=s*h,g=a*h,A=o*l,v=o*c,y=o*h,x=n.x,b=n.y,E=n.z;return r[0]=(1-(f+g))*x,r[1]=(d+y)*x,r[2]=(p-v)*x,r[3]=0,r[4]=(d-y)*b,r[5]=(1-(u+g))*b,r[6]=(m+A)*b,r[7]=0,r[8]=(p+v)*E,r[9]=(m-A)*E,r[10]=(1-(u+f))*E,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=$t.set(r[0],r[1],r[2]).length();const s=$t.set(r[4],r[5],r[6]).length(),a=$t.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],en.copy(this);const o=1/i,l=1/s,c=1/a;return en.elements[0]*=o,en.elements[1]*=o,en.elements[2]*=o,en.elements[4]*=l,en.elements[5]*=l,en.elements[6]*=l,en.elements[8]*=c,en.elements[9]*=c,en.elements[10]*=c,t.setFromRotationMatrix(en),n.x=i,n.y=s,n.z=a,this}makePerspective(e,t,n,r,i,s){const a=this.elements,o=2*i/(t-e),l=2*i/(n-r),c=(t+e)/(t-e),h=(n+r)/(n-r),u=-(s+i)/(s-i),d=-2*s*i/(s-i);return a[0]=o,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=h,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,i,s){const a=this.elements,o=1/(t-e),l=1/(n-r),c=1/(s-i),h=(t+e)*o,u=(n+r)*l,d=(s+i)*c;return a[0]=2*o,a[4]=0,a[8]=0,a[12]=-h,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const $t=new Et,en=new Zt,tn=new Et(0,0,0),nn=new Et(1,1,1),rn=new Et,sn=new Et,an=new Et,on=new Zt,ln=new bt;class cn{constructor(e=0,t=0,n=0,r=cn.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],s=r[4],a=r[8],o=r[1],l=r[5],c=r[9],h=r[2],u=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(Ge(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,i)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Ge(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-h,i),this._z=0);break;case"ZXY":this._x=Math.asin(Ge(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-Ge(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(o,i)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(Ge(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,i)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-Ge(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(a,i)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return on.makeRotationFromQuaternion(e),this.setFromRotationMatrix(on,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return ln.setFromEuler(this),this.setFromQuaternion(ln,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}cn.DEFAULT_ORDER="XYZ";class hn{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(n=n.concat(i))}return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(gn,e,An),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(gn,vn,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),a.length>0&&(n.images=a),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),h.length>0&&(n.nodes=h)}return n.object=r,n;function s(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let n=0;n0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){Mn.subVectors(r,t),wn.subVectors(n,t),Cn.subVectors(e,t);const s=Mn.dot(Mn),a=Mn.dot(wn),o=Mn.dot(Cn),l=wn.dot(wn),c=wn.dot(Cn),h=s*l-a*a;if(0===h)return i.set(-2,-1,-1);const u=1/h,d=(l*o-a*c)*u,p=(s*c-a*o)*u;return i.set(1-d-p,p,d)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Tn),Tn.x>=0&&Tn.y>=0&&Tn.x+Tn.y<=1}static getUV(e,t,n,r,i,s,a,o){return!1===Fn&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Fn=!0),this.getInterpolation(e,t,n,r,i,s,a,o)}static getInterpolation(e,t,n,r,i,s,a,o){return this.getBarycoord(e,t,n,r,Tn),o.setScalar(0),o.addScaledVector(i,Tn.x),o.addScaledVector(s,Tn.y),o.addScaledVector(a,Tn.z),o}static isFrontFacing(e,t,n,r){return Mn.subVectors(n,t),wn.subVectors(e,t),Mn.cross(wn).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Mn.subVectors(this.c,this.b),wn.subVectors(this.a,this.b),.5*Mn.cross(wn).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Un.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Un.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return!1===Fn&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Fn=!0),Un.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}getInterpolation(e,t,n,r,i){return Un.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return Un.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Un.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let s,a;In.subVectors(r,n),Bn.subVectors(i,n),Pn.subVectors(e,n);const o=In.dot(Pn),l=Bn.dot(Pn);if(o<=0&&l<=0)return t.copy(n);Dn.subVectors(e,r);const c=In.dot(Dn),h=Bn.dot(Dn);if(c>=0&&h<=c)return t.copy(r);const u=o*h-c*l;if(u<=0&&o>=0&&c<=0)return s=o/(o-c),t.copy(n).addScaledVector(In,s);Ln.subVectors(e,i);const d=In.dot(Ln),p=Bn.dot(Ln);if(p>=0&&d<=p)return t.copy(i);const f=d*l-o*p;if(f<=0&&l>=0&&p<=0)return a=l/(l-p),t.copy(n).addScaledVector(Bn,a);const m=c*p-d*h;if(m<=0&&h-c>=0&&d-p>=0)return Rn.subVectors(i,r),a=(h-c)/(h-c+(d-p)),t.copy(r).addScaledVector(Rn,a);const g=1/(m+f+u);return s=f*g,a=u*g,t.copy(n).addScaledVector(In,s).addScaledVector(Bn,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let On=0;class Nn extends Le{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:On++}),this.uuid=ke(),this.name="",this.type="Material",this.blending=1,this.side=a,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=l,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Be,this.stencilZFail=Be,this.stencilZPass=Be,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),this.side!==a&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.forceSinglePass&&(n.forceSinglePass=this.forceSinglePass),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}const kn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Gn={h:0,s:0,l:0},zn={h:0,s:0,l:0};function Qn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}class Vn{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Ce){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,ht.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r=ht.workingColorSpace){return this.r=e,this.g=t,this.b=n,ht.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r=ht.workingColorSpace){if(e=ze(e,1),t=Ge(t,0,1),n=Ge(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Qn(i,r,e+1/3),this.g=Qn(i,r,e),this.b=Qn(i,r,e-1/3)}return ht.toWorkingColorSpace(this,r),this}setStyle(e,t=Ce){function n(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i;const s=r[1],a=r[2];switch(s){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const n=r[1],i=n.length;if(3===i)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===i)return this.setHex(parseInt(n,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Ce){const n=kn[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=it(e.r),this.g=it(e.g),this.b=it(e.b),this}copyLinearToSRGB(e){return this.r=st(e.r),this.g=st(e.g),this.b=st(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ce){return ht.fromWorkingColorSpace(Hn.copy(this),e),65536*Math.round(Ge(255*Hn.r,0,255))+256*Math.round(Ge(255*Hn.g,0,255))+Math.round(Ge(255*Hn.b,0,255))}getHexString(e=Ce){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=ht.workingColorSpace){ht.fromWorkingColorSpace(Hn.copy(this),t);const n=Hn.r,r=Hn.g,i=Hn.b,s=Math.max(n,r,i),a=Math.min(n,r,i);let o,l;const c=(a+s)/2;if(a===s)o=0,l=0;else{const e=s-a;switch(l=c<=.5?e/(s+a):e/(2-s-a),s){case n:o=(r-i)/e+(r>-e-14,r[256|l]=1024>>-e-14|32768,i[l]=-e-1,i[256|l]=-e-1):e<=15?(r[l]=e+15<<10,r[256|l]=e+15<<10|32768,i[l]=13,i[256|l]=13):e<128?(r[l]=31744,r[256|l]=64512,i[l]=24,i[256|l]=24):(r[l]=31744,r[256|l]=64512,i[l]=13,i[256|l]=13)}const s=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let l=1;l<1024;++l){let e=l<<13,t=0;for(;0==(8388608&e);)e<<=1,t-=8388608;e&=-8388609,t+=947912704,s[l]=e|t}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)a[l]=l<<23;a[31]=1199570944,a[32]=2147483648;for(let l=33;l<63;++l)a[l]=2147483648+(l-32<<23);a[63]=3347054592;for(let l=1;l<64;++l)32!==l&&(o[l]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:s,exponentTable:a,offsetTable:o}}function Yn(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=Ge(e,-65504,65504),Wn.floatView[0]=e;const t=Wn.uint32View[0],n=t>>23&511;return Wn.baseTable[n]+((8388607&t)>>Wn.shiftTable[n])}function qn(e){const t=e>>10;return Wn.uint32View[0]=Wn.mantissaTable[Wn.offsetTable[t]+(1023&e)]+Wn.exponentTable[t],Wn.floatView[0]}const Kn={toHalfFloat:Yn,fromHalfFloat:qn},Jn=new Et,Zn=new qe;class $n{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=Re,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const o in n){const t=n[o];e.data.attributes[o]=t.toJSON(e.data)}const r={};let i=!1;for(const o in this.morphAttributes){const t=this.morphAttributes[o],n=[];for(let r=0,i=t.length;r0&&(r[o]=n,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const l in r){const e=r[l];this.setAttribute(l,e.clone(t))}const i=e.morphAttributes;for(const l in i){const e=[],n=i[l];for(let r=0,i=n.length;r0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e(e.far-e.near)**2)return}ur.copy(i).invert(),dr.copy(e.ray).applyMatrix4(ur),null!==n.boundingBox&&!1===dr.intersectsBox(n.boundingBox)||this._computeIntersections(e,t)}}_computeIntersections(e,t){let n;const r=this.geometry,i=this.material,s=r.index,a=r.attributes.position,o=r.attributes.uv,l=r.attributes.uv1,c=r.attributes.normal,h=r.groups,u=r.drawRange;if(null!==s)if(Array.isArray(i))for(let d=0,p=h.length;dn.far?null:{distance:u,point:Cr.clone(),object:e}}(e,t,n,r,mr,gr,Ar,wr);if(d){i&&(xr.fromBufferAttribute(i,c),br.fromBufferAttribute(i,h),Er.fromBufferAttribute(i,u),d.uv=Un.getInterpolation(wr,mr,gr,Ar,xr,br,Er,new qe)),s&&(xr.fromBufferAttribute(s,c),br.fromBufferAttribute(s,h),Er.fromBufferAttribute(s,u),d.uv1=Un.getInterpolation(wr,mr,gr,Ar,xr,br,Er,new qe),d.uv2=d.uv1),l&&(_r.fromBufferAttribute(l,c),Sr.fromBufferAttribute(l,h),Mr.fromBufferAttribute(l,u),d.normal=Un.getInterpolation(wr,mr,gr,Ar,_r,Sr,Mr,new Et),d.normal.dot(r.direction)>0&&d.normal.multiplyScalar(-1));const e={a:c,b:h,c:u,normal:new Et,materialIndex:0};Un.getNormal(mr,gr,Ar,e.normal),d.face=e}return d}class Br extends hr{constructor(e=1,t=1,n=1,r=1,i=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:s};const a=this;r=Math.floor(r),i=Math.floor(i),s=Math.floor(s);const o=[],l=[],c=[],h=[];let u=0,d=0;function p(e,t,n,r,i,s,p,f,m,g,A){const v=s/m,y=p/g,x=s/2,b=p/2,E=f/2,_=m+1,S=g+1;let M=0,w=0;const C=new Et;for(let a=0;a0?1:-1,c.push(C.x,C.y,C.z),h.push(o/m),h.push(1-a/g),M+=1}}for(let a=0;a0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const r in this.extensions)!0===this.extensions[r]&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class Ur extends Sn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Zt,this.projectionMatrix=new Zt,this.projectionMatrixInverse=new Zt}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class Or extends Ur{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Ne*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Oe*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Ne*Math.atan(Math.tan(.5*Oe*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,s){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*Oe*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const s=this.view;if(null!==this.view&&this.view.enabled){const e=s.fullWidth,a=s.fullHeight;i+=s.offsetX*r/e,t-=s.offsetY*n/a,r*=s.width/e,n*=s.height/a}const a=this.filmOffset;0!==a&&(i+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Nr=-90;class kr extends Sn{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n;const r=new Or(Nr,1,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(1,0,0),this.add(r);const i=new Or(Nr,1,e,t);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(-1,0,0),this.add(i);const s=new Or(Nr,1,e,t);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(0,1,0),this.add(s);const a=new Or(Nr,1,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);const o=new Or(Nr,1,e,t);o.layers=this.layers,o.up.set(0,1,0),o.lookAt(0,0,1),this.add(o);const l=new Or(Nr,1,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,-1),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,s,a,o,l]=this.children,c=e.getRenderTarget(),h=e.toneMapping,u=e.xr.enabled;e.toneMapping=d,e.xr.enabled=!1;const p=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,s),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,o),n.texture.generateMipmaps=p,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(c),e.toneMapping=h,e.xr.enabled=u,n.texture.needsPMREMUpdate=!0}}class Gr extends gt{constructor(e,t,n,r,i,s,a,o,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:y,n,r,i,s,a,o,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class zr extends vt{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];void 0!==t.encoding&&(rt("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===Me?Ce:we),this.texture=new Gr(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:B}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new Br(5,5,5),i=new Fr({name:"CubemapFromEquirect",uniforms:Rr(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:o,blending:0});i.uniforms.tEquirect.value=t;const s=new Tr(r,i),a=t.minFilter;t.minFilter===P&&(t.minFilter=B);return new kr(1,10,this).update(e,s),t.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(t,n,r);e.setRenderTarget(i)}}const Qr=new Et,Vr=new Et,Hr=new Ke;class jr{constructor(e=new Et(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=Qr.subVectors(n,t).cross(Vr.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(Qr),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||Hr.getNormalMatrix(e),r=this.coplanarPoint(Qr).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Wr=new Vt,Xr=new Et;class Yr{constructor(e=new jr,t=new jr,n=new jr,r=new jr,i=new jr,s=new jr){this.planes=[e,t,n,r,i,s]}set(e,t,n,r,i,s){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(s),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],s=n[2],a=n[3],o=n[4],l=n[5],c=n[6],h=n[7],u=n[8],d=n[9],p=n[10],f=n[11],m=n[12],g=n[13],A=n[14],v=n[15];return t[0].setComponents(a-r,h-o,f-u,v-m).normalize(),t[1].setComponents(a+r,h+o,f+u,v+m).normalize(),t[2].setComponents(a+i,h+l,f+d,v+g).normalize(),t[3].setComponents(a-i,h-l,f-d,v-g).normalize(),t[4].setComponents(a-s,h-c,f-p,v-A).normalize(),t[5].setComponents(a+s,h+c,f+p,v+A).normalize(),this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),Wr.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),Wr.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Wr)}intersectsSprite(e){return Wr.center.set(0,0,0),Wr.radius=.7071067811865476,Wr.applyMatrix4(e.matrixWorld),this.intersectsSphere(Wr)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let i=0;i<6;i++){if(t[i].distanceToPoint(n)0?e.max.x:e.min.x,Xr.y=r.normal.y>0?e.max.y:e.min.y,Xr.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Xr)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function qr(){let e=null,t=!1,n=null,r=null;function i(t,s){n(t,s),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Kr(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, vMapUv );\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_NORMALMAP_TANGENTSPACE\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal, vNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#ifdef USE_UV\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},$r={common:{diffuse:{value:new Vn(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ke},alphaMap:{value:null},alphaMapTransform:{value:new Ke},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ke}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ke}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ke}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ke},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ke},normalScale:{value:new qe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ke},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ke}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ke}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ke}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Vn(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Vn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Ke}},sprite:{diffuse:{value:new Vn(16777215)},opacity:{value:1},center:{value:new qe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ke},alphaMap:{value:null},alphaTest:{value:0}}},ei={basic:{uniforms:Pr([$r.common,$r.specularmap,$r.envmap,$r.aomap,$r.lightmap,$r.fog]),vertexShader:Zr.meshbasic_vert,fragmentShader:Zr.meshbasic_frag},lambert:{uniforms:Pr([$r.common,$r.specularmap,$r.envmap,$r.aomap,$r.lightmap,$r.emissivemap,$r.bumpmap,$r.normalmap,$r.displacementmap,$r.fog,$r.lights,{emissive:{value:new Vn(0)}}]),vertexShader:Zr.meshlambert_vert,fragmentShader:Zr.meshlambert_frag},phong:{uniforms:Pr([$r.common,$r.specularmap,$r.envmap,$r.aomap,$r.lightmap,$r.emissivemap,$r.bumpmap,$r.normalmap,$r.displacementmap,$r.fog,$r.lights,{emissive:{value:new Vn(0)},specular:{value:new Vn(1118481)},shininess:{value:30}}]),vertexShader:Zr.meshphong_vert,fragmentShader:Zr.meshphong_frag},standard:{uniforms:Pr([$r.common,$r.envmap,$r.aomap,$r.lightmap,$r.emissivemap,$r.bumpmap,$r.normalmap,$r.displacementmap,$r.roughnessmap,$r.metalnessmap,$r.fog,$r.lights,{emissive:{value:new Vn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Zr.meshphysical_vert,fragmentShader:Zr.meshphysical_frag},toon:{uniforms:Pr([$r.common,$r.aomap,$r.lightmap,$r.emissivemap,$r.bumpmap,$r.normalmap,$r.displacementmap,$r.gradientmap,$r.fog,$r.lights,{emissive:{value:new Vn(0)}}]),vertexShader:Zr.meshtoon_vert,fragmentShader:Zr.meshtoon_frag},matcap:{uniforms:Pr([$r.common,$r.bumpmap,$r.normalmap,$r.displacementmap,$r.fog,{matcap:{value:null}}]),vertexShader:Zr.meshmatcap_vert,fragmentShader:Zr.meshmatcap_frag},points:{uniforms:Pr([$r.points,$r.fog]),vertexShader:Zr.points_vert,fragmentShader:Zr.points_frag},dashed:{uniforms:Pr([$r.common,$r.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Zr.linedashed_vert,fragmentShader:Zr.linedashed_frag},depth:{uniforms:Pr([$r.common,$r.displacementmap]),vertexShader:Zr.depth_vert,fragmentShader:Zr.depth_frag},normal:{uniforms:Pr([$r.common,$r.bumpmap,$r.normalmap,$r.displacementmap,{opacity:{value:1}}]),vertexShader:Zr.meshnormal_vert,fragmentShader:Zr.meshnormal_frag},sprite:{uniforms:Pr([$r.sprite,$r.fog]),vertexShader:Zr.sprite_vert,fragmentShader:Zr.sprite_frag},background:{uniforms:{uvTransform:{value:new Ke},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Zr.background_vert,fragmentShader:Zr.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Zr.backgroundCube_vert,fragmentShader:Zr.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Zr.cube_vert,fragmentShader:Zr.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Zr.equirect_vert,fragmentShader:Zr.equirect_frag},distanceRGBA:{uniforms:Pr([$r.common,$r.displacementmap,{referencePosition:{value:new Et},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Zr.distanceRGBA_vert,fragmentShader:Zr.distanceRGBA_frag},shadow:{uniforms:Pr([$r.lights,$r.fog,{color:{value:new Vn(0)},opacity:{value:1}}]),vertexShader:Zr.shadow_vert,fragmentShader:Zr.shadow_frag}};ei.physical={uniforms:Pr([ei.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ke},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ke},clearcoatNormalScale:{value:new qe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ke},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ke},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ke},sheen:{value:0},sheenColor:{value:new Vn(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ke},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ke},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ke},transmissionSamplerSize:{value:new qe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ke},attenuationDistance:{value:0},attenuationColor:{value:new Vn(0)},specularColor:{value:new Vn(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ke},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ke}}]),vertexShader:Zr.meshphysical_vert,fragmentShader:Zr.meshphysical_frag};const ti={r:0,b:0,g:0};function ni(e,t,n,r,i,s,l){const c=new Vn(0);let h,u,d=!0===s?0:1,p=null,f=0,m=null;function g(t,n){t.getRGB(ti,Dr(e)),r.buffers.color.setClear(ti.r,ti.g,ti.b,n,l)}return{getClearColor:function(){return c},setClearColor:function(e,t=1){c.set(e),d=t,g(c,d)},getClearAlpha:function(){return d},setClearAlpha:function(e){d=e,g(c,d)},render:function(s,A){let v=!1,y=!0===A.isScene?A.background:null;if(y&&y.isTexture){y=(A.backgroundBlurriness>0?n:t).get(y)}switch(null===y?g(c,d):y&&y.isColor&&(g(y,1),v=!0),e.xr.getEnvironmentBlendMode()){case"opaque":v=!0;break;case"additive":r.buffers.color.setClear(0,0,0,1,l),v=!0;break;case"alpha-blend":r.buffers.color.setClear(0,0,0,0,l),v=!0}(e.autoClear||v)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),y&&(y.isCubeTexture||y.mapping===_)?(void 0===u&&(u=new Tr(new Br(1,1,1),new Fr({name:"BackgroundCubeMaterial",uniforms:Rr(ei.backgroundCube.uniforms),vertexShader:ei.backgroundCube.vertexShader,fragmentShader:ei.backgroundCube.fragmentShader,side:o,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=y,u.material.uniforms.flipEnvMap.value=y.isCubeTexture&&!1===y.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,u.material.toneMapped=y.colorSpace!==Ce,p===y&&f===y.version&&m===e.toneMapping||(u.material.needsUpdate=!0,p=y,f=y.version,m=e.toneMapping),u.layers.enableAll(),s.unshift(u,u.geometry,u.material,0,0,null)):y&&y.isTexture&&(void 0===h&&(h=new Tr(new Jr(2,2),new Fr({name:"BackgroundMaterial",uniforms:Rr(ei.background.uniforms),vertexShader:ei.background.vertexShader,fragmentShader:ei.background.fragmentShader,side:a,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),Object.defineProperty(h.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(h)),h.material.uniforms.t2D.value=y,h.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,h.material.toneMapped=y.colorSpace!==Ce,!0===y.matrixAutoUpdate&&y.updateMatrix(),h.material.uniforms.uvTransform.value.copy(y.matrix),p===y&&f===y.version&&m===e.toneMapping||(h.material.needsUpdate=!0,p=y,f=y.version,m=e.toneMapping),h.layers.enableAll(),s.unshift(h,h.geometry,h.material,0,0,null))}}}function ri(e,t,n,r){const i=e.getParameter(e.MAX_VERTEX_ATTRIBS),s=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==s,o={},l=p(null);let c=l,h=!1;function u(t){return r.isWebGL2?e.bindVertexArray(t):s.bindVertexArrayOES(t)}function d(t){return r.isWebGL2?e.deleteVertexArray(t):s.deleteVertexArrayOES(t)}function p(e){const t=[],n=[],r=[];for(let s=0;s=0){const t=i[l];let n=s[l];if(void 0===n&&("instanceMatrix"===l&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===l&&e.instanceColor&&(n=e.instanceColor)),void 0===t)return!0;if(t.attribute!==n)return!0;if(n&&t.data!==n.data)return!0;a++}}return c.attributesNum!==a||c.index!==r}(i,y,d,x),b&&function(e,t,n,r){const i={},s=t.attributes;let a=0;const o=n.getAttributes();for(const l in o){if(o[l].location>=0){let t=s[l];void 0===t&&("instanceMatrix"===l&&e.instanceMatrix&&(t=e.instanceMatrix),"instanceColor"===l&&e.instanceColor&&(t=e.instanceColor));const n={};n.attribute=t,t&&t.data&&(n.data=t.data),i[l]=n,a++}}c.attributes=i,c.attributesNum=a,c.index=r}(i,y,d,x)}else{const e=!0===l.wireframe;c.geometry===y.id&&c.program===d.id&&c.wireframe===e||(c.geometry=y.id,c.program=d.id,c.wireframe=e,b=!0)}null!==x&&n.update(x,e.ELEMENT_ARRAY_BUFFER),(b||h)&&(h=!1,function(i,s,a,o){if(!1===r.isWebGL2&&(i.isInstancedMesh||o.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const l=o.attributes,c=a.getAttributes(),h=s.defaultAttributeValues;for(const t in c){const r=c[t];if(r.location>=0){let s=l[t];if(void 0===s&&("instanceMatrix"===t&&i.instanceMatrix&&(s=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(s=i.instanceColor)),void 0!==s){const t=s.normalized,a=s.itemSize,l=n.get(s);if(void 0===l)continue;const c=l.buffer,h=l.type,u=l.bytesPerElement;if(s.isInterleavedBufferAttribute){const n=s.data,l=n.stride,d=s.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===e.constructor.name;let a=void 0!==n.precision?n.precision:"highp";const o=i(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);const l=s||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,h=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),u=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),m=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),g=e.getParameter(e.MAX_VARYING_VECTORS),A=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,y=s||t.has("OES_texture_float");return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:A,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:s?e.getParameter(e.MAX_SAMPLES):0}}function ai(e){const t=this;let n=null,r=0,i=!1,s=!1;const a=new jr,o=new Ke,l={value:null,needsUpdate:!1};function c(e,n,r,i){const s=null!==e?e.length:0;let c=null;if(0!==s){if(c=l.value,!0!==i||null===c){const t=r+4*s,i=n.matrixWorldInverse;o.getNormalMatrix(i),(null===c||c.length0);t.numPlanes=r,t.numIntersection=0}();else{const e=s?0:r,t=4*e;let i=f.clippingState||null;l.value=i,i=c(u,o,t,h);for(let r=0;r!==t;++r)i[r]=n[r];f.clippingState=i,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=e}}}function oi(e){let t=new WeakMap;function n(e,t){return t===b?e.mapping=y:t===E&&(e.mapping=x),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const s=i.mapping;if(s===b||s===E){if(t.has(i)){return n(t.get(i).texture,i.mapping)}{const s=i.image;if(s&&s.height>0){const a=new zr(s.height/2);return a.fromEquirectangularTexture(e,i),t.set(i,a),i.addEventListener("dispose",r),n(a.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}class li extends Ur{constructor(e=-1,t=1,n=1,r=-1,i=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,s=n+e,a=r+t,o=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,s=i+e*this.view.width,a-=t*this.view.offsetY,o=a-t*this.view.height}this.projectionMatrix.makeOrthographic(i,s,a,o,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const ci=[.125,.215,.35,.446,.526,.582],hi=20,ui=new li,di=new Vn;let pi=null;const fi=(1+Math.sqrt(5))/2,mi=1/fi,gi=[new Et(1,1,1),new Et(-1,1,1),new Et(1,1,-1),new Et(-1,1,-1),new Et(0,fi,mi),new Et(0,fi,-mi),new Et(mi,0,fi),new Et(-mi,0,fi),new Et(fi,mi,0),new Et(-fi,mi,0)];class Ai{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){pi=this._renderer.getRenderTarget(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=bi(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=xi(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?o=ci[a-e+4-1]:0===a&&(o=0),r.push(o);const l=1/(s-2),c=-l,h=1+l,u=[c,c,h,c,h,h,c,c,h,h,c,h],d=6,p=6,f=3,m=2,g=1,A=new Float32Array(f*p*d),v=new Float32Array(m*p*d),y=new Float32Array(g*p*d);for(let e=0;e2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];A.set(r,f*p*e),v.set(u,m*p*e);const i=[e,e,e,e,e,e];y.set(i,g*p*e)}const x=new hr;x.setAttribute("position",new $n(A,f)),x.setAttribute("uv",new $n(v,m)),x.setAttribute("faceIndex",new $n(y,g)),t.push(x),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){const r=new Float32Array(hi),i=new Et(0,1,0),s=new Fr({name:"SphericalGaussianBlur",defines:{n:hi,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:Ei(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1});return s}(r,e,t)}return r}_compileMaterial(e){const t=new Tr(this._lodPlanes[0],e);this._renderer.compile(t,ui)}_sceneToCubeUV(e,t,n,r){const i=new Or(90,1,t,n),s=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],l=this._renderer,c=l.autoClear,h=l.toneMapping;l.getClearColor(di),l.toneMapping=d,l.autoClear=!1;const u=new jn({name:"PMREM.Background",side:o,depthWrite:!1,depthTest:!1}),p=new Tr(new Br,u);let f=!1;const m=e.background;m?m.isColor&&(u.color.copy(m),e.background=null,f=!0):(u.color.copy(di),f=!0);for(let o=0;o<6;o++){const t=o%3;0===t?(i.up.set(0,s[o],0),i.lookAt(a[o],0,0)):1===t?(i.up.set(0,0,s[o]),i.lookAt(0,a[o],0)):(i.up.set(0,s[o],0),i.lookAt(0,0,a[o]));const n=this._cubeSize;yi(r,t*n,o>2?n:0,n,n),l.setRenderTarget(r),f&&l.render(p,i),l.render(e,i)}p.geometry.dispose(),p.material.dispose(),l.toneMapping=h,l.autoClear=c,e.background=m}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===y||e.mapping===x;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=bi()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=xi());const i=r?this._cubemapMaterial:this._equirectMaterial,s=new Tr(this._lodPlanes[0],i);i.uniforms.envMap.value=e;const a=this._cubeSize;yi(t,0,0,3*a,2*a),n.setRenderTarget(t),n.render(s,ui)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let r=1;rhi&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const m=[];let g=0;for(let y=0;yA-4?r-A+4:0),4*(this._cubeSize-v),3*v,2*v),o.setRenderTarget(t),o.render(c,ui)}}function vi(e,t,n){const r=new vt(e,t,n);return r.texture.mapping=_,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function yi(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function xi(){return new Fr({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Ei(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function bi(){return new Fr({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Ei(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function Ei(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function _i(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const s=i.mapping,a=s===b||s===E,o=s===y||s===x;if(a||o){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new Ai(e)),r=a?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const s=i.image;if(a&&s&&s.height>0||o&&s&&function(e){let t=0;const n=6;for(let r=0;rt.maxTextureSize&&(M=Math.ceil(S/t.maxTextureSize),S=t.maxTextureSize);const w=new Float32Array(S*M*4*p),C=new yt(w,S,M,p);C.type=U,C.needsUpdate=!0;const T=4*_;for(let B=0;B0)return e;const i=t*n;let s=Ui[i];if(void 0===s&&(s=new Float32Array(i),Ui[i]=s),0!==t){r.toArray(s,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(s,i)}return s}function Qi(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n":" "} ${e}: ${n[a]}`)}return r.join("\n")}(e.getShaderSource(t),r)}return i}function ks(e,t){const n=function(e){switch(e){case Te:return["Linear","( value )"];case Ce:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",e),["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Gs(e,t){let n;switch(t){case p:n="Linear";break;case f:n="Reinhard";break;case m:n="OptimizedCineon";break;case g:n="ACESFilmic";break;case A:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function zs(e){return""!==e}function Qs(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Vs(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Hs=/^[ \t]*#include +<([\w\d./]+)>/gm;function js(e){return e.replace(Hs,Ws)}function Ws(e,t){const n=Zr[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return js(n)}const Xs=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ys(e){return e.replace(Xs,qs)}function qs(e,t,n,r){let i="";for(let s=parseInt(t);s0&&(w+="\n"),C=[E,S].filter(zs).join("\n"),C.length>0&&(C+="\n")):(w=[Ks(n),"#define SHADER_NAME "+n.shaderName,S,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+A:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+m:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(zs).join("\n"),C=[E,Ks(n),"#define SHADER_NAME "+n.shaderName,S,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+g:"",n.envMap?"#define "+A:"",n.envMap?"#define "+v:"",b?"#define CUBEUV_TEXEL_WIDTH "+b.texelWidth:"",b?"#define CUBEUV_TEXEL_HEIGHT "+b.texelHeight:"",b?"#define CUBEUV_MAX_MIP "+b.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+m:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==d?"#define TONE_MAPPING":"",n.toneMapping!==d?Zr.tonemapping_pars_fragment:"",n.toneMapping!==d?Gs("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Zr.encodings_pars_fragment,ks("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(zs).join("\n")),p=js(p),p=Qs(p,n),p=Vs(p,n),f=js(f),f=Qs(f,n),f=Vs(f,n),p=Ys(p),f=Ys(f),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(T="#version 300 es\n",w=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+w,C=["#define varying in",n.glslVersion===Pe?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Pe?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+C);const I=T+w+p,B=T+C+f,R=Us(o,o.VERTEX_SHADER,I),P=Us(o,o.FRAGMENT_SHADER,B);if(o.attachShader(M,R),o.attachShader(M,P),void 0!==n.index0AttributeName?o.bindAttribLocation(M,0,n.index0AttributeName):!0===n.morphTargets&&o.bindAttribLocation(M,0,"position"),o.linkProgram(M),e.debug.checkShaderErrors){const t=o.getProgramInfoLog(M).trim(),n=o.getShaderInfoLog(R).trim(),r=o.getShaderInfoLog(P).trim();let i=!0,s=!0;if(!1===o.getProgramParameter(M,o.LINK_STATUS))if(i=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(o,M,R,P);else{const e=Ns(o,R,"vertex"),n=Ns(o,P,"fragment");console.error("THREE.WebGLProgram: Shader Error "+o.getError()+" - VALIDATE_STATUS "+o.getProgramParameter(M,o.VALIDATE_STATUS)+"\n\nProgram Info Log: "+t+"\n"+e+"\n"+n)}else""!==t?console.warn("THREE.WebGLProgram: Program Info Log:",t):""!==n&&""!==r||(s=!1);s&&(this.diagnostics={runnable:i,programLog:t,vertexShader:{log:n,prefix:w},fragmentShader:{log:r,prefix:C}})}let D,L;return o.deleteShader(R),o.deleteShader(P),this.getUniforms=function(){return void 0===D&&(D=new Fs(o,M)),D},this.getAttributes=function(){return void 0===L&&(L=function(e,t){const n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i0,Y=s.iridescence>0,q=s.sheen>0,K=s.transmission>0,J=X&&!!s.clearcoatMap,Z=X&&!!s.clearcoatNormalMap,$=X&&!!s.clearcoatRoughnessMap,ee=Y&&!!s.iridescenceMap,te=Y&&!!s.iridescenceThicknessMap,ne=q&&!!s.sheenColorMap,re=q&&!!s.sheenRoughnessMap,ie=!!s.specularMap,se=!!s.specularColorMap,ae=!!s.specularIntensityMap,oe=K&&!!s.transmissionMap,le=K&&!!s.thicknessMap,ce=!!s.gradientMap,he=!!s.alphaMap,ue=s.alphaTest>0,de=!!s.extensions,pe=!!b.attributes.uv1,fe=!!b.attributes.uv2,me=!!b.attributes.uv3;return{isWebGL2:u,shaderID:w,shaderName:s.type,vertexShader:I,fragmentShader:B,defines:s.defines,customVertexShaderID:R,customFragmentShaderID:P,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:m,instancing:F,instancingColor:F&&null!==y.instanceColor,supportsVertexTextures:f,outputColorSpace:null===L?e.outputColorSpace:!0===L.isXRRenderTarget?L.texture.colorSpace:Te,map:U,matcap:O,envMap:N,envMapMode:N&&S.mapping,envMapCubeUVHeight:M,aoMap:k,lightMap:G,bumpMap:z,normalMap:Q,displacementMap:f&&V,emissiveMap:H,normalMapObjectSpace:Q&&1===s.normalMapType,normalMapTangentSpace:Q&&0===s.normalMapType,metalnessMap:j,roughnessMap:W,clearcoat:X,clearcoatMap:J,clearcoatNormalMap:Z,clearcoatRoughnessMap:$,iridescence:Y,iridescenceMap:ee,iridescenceThicknessMap:te,sheen:q,sheenColorMap:ne,sheenRoughnessMap:re,specularMap:ie,specularColorMap:se,specularIntensityMap:ae,transmission:K,transmissionMap:oe,thicknessMap:le,gradientMap:ce,opaque:!1===s.transparent&&1===s.blending,alphaMap:he,alphaTest:ue,combine:s.combine,mapUv:U&&A(s.map.channel),aoMapUv:k&&A(s.aoMap.channel),lightMapUv:G&&A(s.lightMap.channel),bumpMapUv:z&&A(s.bumpMap.channel),normalMapUv:Q&&A(s.normalMap.channel),displacementMapUv:V&&A(s.displacementMap.channel),emissiveMapUv:H&&A(s.emissiveMap.channel),metalnessMapUv:j&&A(s.metalnessMap.channel),roughnessMapUv:W&&A(s.roughnessMap.channel),clearcoatMapUv:J&&A(s.clearcoatMap.channel),clearcoatNormalMapUv:Z&&A(s.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:$&&A(s.clearcoatRoughnessMap.channel),iridescenceMapUv:ee&&A(s.iridescenceMap.channel),iridescenceThicknessMapUv:te&&A(s.iridescenceThicknessMap.channel),sheenColorMapUv:ne&&A(s.sheenColorMap.channel),sheenRoughnessMapUv:re&&A(s.sheenRoughnessMap.channel),specularMapUv:ie&&A(s.specularMap.channel),specularColorMapUv:se&&A(s.specularColorMap.channel),specularIntensityMapUv:ae&&A(s.specularIntensityMap.channel),transmissionMapUv:oe&&A(s.transmissionMap.channel),thicknessMapUv:le&&A(s.thicknessMap.channel),alphaMapUv:he&&A(s.alphaMap.channel),vertexTangents:Q&&!!b.attributes.tangent,vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!b.attributes.color&&4===b.attributes.color.itemSize,vertexUv1s:pe,vertexUv2s:fe,vertexUv3s:me,pointsUvs:!0===y.isPoints&&!!b.attributes.uv&&(U||he),fog:!!x,useFog:!0===s.fog,fogExp2:x&&x.isFogExp2,flatShading:!0===s.flatShading,sizeAttenuation:!0===s.sizeAttenuation,logarithmicDepthBuffer:p,skinning:!0===y.isSkinnedMesh,morphTargets:void 0!==b.morphAttributes.position,morphNormals:void 0!==b.morphAttributes.normal,morphColors:void 0!==b.morphAttributes.color,morphTargetsCount:T,morphTextureStride:D,numDirLights:l.directional.length,numPointLights:l.point.length,numSpotLights:l.spot.length,numSpotLightMaps:l.spotLightMap.length,numRectAreaLights:l.rectArea.length,numHemiLights:l.hemi.length,numDirLightShadows:l.directionalShadowMap.length,numPointLightShadows:l.pointShadowMap.length,numSpotLightShadows:l.spotShadowMap.length,numSpotLightShadowsWithMaps:l.numSpotLightShadowsWithMaps,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:s.dithering,shadowMapEnabled:e.shadowMap.enabled&&h.length>0,shadowMapType:e.shadowMap.type,toneMapping:s.toneMapped?e.toneMapping:d,useLegacyLights:e.useLegacyLights,premultipliedAlpha:s.premultipliedAlpha,doubleSided:2===s.side,flipSided:s.side===o,useDepthPacking:s.depthPacking>=0,depthPacking:s.depthPacking||0,index0AttributeName:s.index0AttributeName,extensionDerivatives:de&&!0===s.extensions.derivatives,extensionFragDepth:de&&!0===s.extensions.fragDepth,extensionDrawBuffers:de&&!0===s.extensions.drawBuffers,extensionShaderTextureLOD:de&&!0===s.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),customProgramCacheKey:s.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){l.disableAll(),t.isWebGL2&&l.enable(0);t.supportsVertexTextures&&l.enable(1);t.instancing&&l.enable(2);t.instancingColor&&l.enable(3);t.matcap&&l.enable(4);t.envMap&&l.enable(5);t.normalMapObjectSpace&&l.enable(6);t.normalMapTangentSpace&&l.enable(7);t.clearcoat&&l.enable(8);t.iridescence&&l.enable(9);t.alphaTest&&l.enable(10);t.vertexColors&&l.enable(11);t.vertexAlphas&&l.enable(12);t.vertexUv1s&&l.enable(13);t.vertexUv2s&&l.enable(14);t.vertexUv3s&&l.enable(15);t.vertexTangents&&l.enable(16);e.push(l.mask),l.disableAll(),t.fog&&l.enable(0);t.useFog&&l.enable(1);t.flatShading&&l.enable(2);t.logarithmicDepthBuffer&&l.enable(3);t.skinning&&l.enable(4);t.morphTargets&&l.enable(5);t.morphNormals&&l.enable(6);t.morphColors&&l.enable(7);t.premultipliedAlpha&&l.enable(8);t.shadowMapEnabled&&l.enable(9);t.useLegacyLights&&l.enable(10);t.doubleSided&&l.enable(11);t.flipSided&&l.enable(12);t.useDepthPacking&&l.enable(13);t.dithering&&l.enable(14);t.transmission&&l.enable(15);t.sheen&&l.enable(16);t.opaque&&l.enable(17);t.pointsUvs&&l.enable(18);e.push(l.mask)}(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=g[e.type];let n;if(t){const e=ei[t];n=Lr.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,i=h.length;e0?r.push(h):!0===a.transparent?i.push(h):n.push(h)},unshift:function(e,t,a,o,l,c){const h=s(e,t,a,o,l,c);a.transmission>0?r.unshift(h):!0===a.transparent?i.unshift(h):n.unshift(h)},finish:function(){for(let n=t,r=e.length;n1&&n.sort(e||ra),r.length>1&&r.sort(t||ia),i.length>1&&i.sort(t||ia)}}}function aa(){let e=new WeakMap;return{get:function(t,n){const r=e.get(t);let i;return void 0===r?(i=new sa,e.set(t,[i])):n>=r.length?(i=new sa,r.push(i)):i=r[n],i},dispose:function(){e=new WeakMap}}}function oa(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new Et,color:new Vn};break;case"SpotLight":n={position:new Et,direction:new Et,color:new Vn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new Et,color:new Vn,distance:0,decay:0};break;case"HemisphereLight":n={direction:new Et,skyColor:new Vn,groundColor:new Vn};break;case"RectAreaLight":n={color:new Vn,position:new Et,halfWidth:new Et,halfHeight:new Et}}return e[t.id]=n,n}}}let la=0;function ca(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function ha(e,t){const n=new oa,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new qe};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new qe,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let l=0;l<9;l++)i.probe.push(new Et);const s=new Et,a=new Zt,o=new Zt;return{setup:function(s,a){let o=0,l=0,c=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,v=0,y=0;s.sort(ca);const x=!0===a?Math.PI:1;for(let e=0,t=s.length;e0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=$r.LTC_FLOAT_1,i.rectAreaLTC2=$r.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=$r.LTC_HALF_1,i.rectAreaLTC2=$r.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=o,i.ambient[1]=l,i.ambient[2]=c;const b=i.hash;b.directionalLength===h&&b.pointLength===u&&b.spotLength===d&&b.rectAreaLength===p&&b.hemiLength===f&&b.numDirectionalShadows===m&&b.numPointShadows===g&&b.numSpotShadows===A&&b.numSpotMaps===v||(i.directional.length=h,i.spot.length=d,i.rectArea.length=p,i.point.length=u,i.hemi.length=f,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=A,i.spotShadowMap.length=A,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotLightMatrix.length=A+v-y,i.spotLightMap.length=v,i.numSpotLightShadowsWithMaps=y,b.directionalLength=h,b.pointLength=u,b.spotLength=d,b.rectAreaLength=p,b.hemiLength=f,b.numDirectionalShadows=m,b.numPointShadows=g,b.numSpotShadows=A,b.numSpotMaps=v,i.version=la++)},setupView:function(e,t){let n=0,r=0,l=0,c=0,h=0;const u=t.matrixWorldInverse;for(let d=0,p=e.length;d=s.length?(a=new ua(e,t),s.push(a)):a=s[i],a},dispose:function(){n=new WeakMap}}}class pa extends Nn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class fa extends Nn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function ma(e,t,n){let i=new Yr;const l=new qe,c=new qe,h=new At,u=new pa({depthPacking:3201}),d=new fa,p={},f=n.maxTextureSize,m={[a]:o,[o]:a,2:2},g=new Fr({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new qe},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),A=g.clone();A.defines.HORIZONTAL_PASS=1;const v=new hr;v.setAttribute("position",new $n(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const y=new Tr(v,g),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=r;let b=this.type;function E(n,r){const i=t.update(y);g.defines.VSM_SAMPLES!==n.blurSamples&&(g.defines.VSM_SAMPLES=n.blurSamples,A.defines.VSM_SAMPLES=n.blurSamples,g.needsUpdate=!0,A.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new vt(l.x,l.y)),g.uniforms.shadow_pass.value=n.map.texture,g.uniforms.resolution.value=n.mapSize,g.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,g,y,null),A.uniforms.shadow_pass.value=n.mapPass.texture,A.uniforms.resolution.value=n.mapSize,A.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,A,y,null)}function _(t,n,r,i){let a=null;const o=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==o)a=o;else if(a=!0===r.isPointLight?d:u,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const e=a.uuid,t=n.uuid;let r=p[e];void 0===r&&(r={},p[e]=r);let i=r[t];void 0===i&&(i=a.clone(),r[t]=i),a=i}if(a.visible=n.visible,a.wireframe=n.wireframe,a.side=i===s?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:m[n.side],a.alphaMap=n.alphaMap,a.alphaTest=n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,!0===r.isPointLight&&!0===a.isMeshDistanceMaterial){e.properties.get(a).light=r}return a}function S(n,r,a,o,l){if(!1===n.visible)return;if(n.layers.test(r.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&l===s)&&(!n.frustumCulled||i.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let s=0,c=t.length;sf||l.y>f)&&(l.x>f&&(c.x=Math.floor(f/u.x),l.x=c.x*u.x,o.mapSize.x=c.x),l.y>f&&(c.y=Math.floor(f/u.y),l.y=c.y*u.y,o.mapSize.y=c.y)),null===o.map||!0===p||!0===m){const e=this.type!==s?{minFilter:C,magFilter:C}:{};null!==o.map&&o.map.dispose(),o.map=new vt(l.x,l.y,e),o.map.texture.name=a.name+".shadowMap",o.camera.updateProjectionMatrix()}e.setRenderTarget(o.map),e.clear();const A=o.getViewportCount();for(let e=0;e=1):-1!==D.indexOf("OpenGL ES")&&(P=parseFloat(/^OpenGL ES (\d)/.exec(D)[1]),R=P>=2);let L=null,F={};const U=e.getParameter(e.SCISSOR_BOX),O=e.getParameter(e.VIEWPORT),N=(new At).fromArray(U),k=(new At).fromArray(O);function G(t,n,i,s){const a=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let l=0;lr||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?je:Math.floor,s=r(i*e.width),a=r(i*e.height);void 0===m&&(m=v(s,a));const o=n?v(s,a):m;o.width=s,o.height=a;return o.getContext("2d").drawImage(e,0,0,s,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+s+"x"+a+")."),o}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function x(e){return Ve(e.width)&&Ve(e.height)}function b(e,t){return e.generateMipmaps&&t&&e.minFilter!==C&&e.minFilter!==B}function E(t){e.generateMipmap(t)}function _(n,r,i,s,a=!1){if(!1===o)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=r;return r===e.RED&&(i===e.FLOAT&&(l=e.R32F),i===e.HALF_FLOAT&&(l=e.R16F),i===e.UNSIGNED_BYTE&&(l=e.R8)),r===e.RG&&(i===e.FLOAT&&(l=e.RG32F),i===e.HALF_FLOAT&&(l=e.RG16F),i===e.UNSIGNED_BYTE&&(l=e.RG8)),r===e.RGBA&&(i===e.FLOAT&&(l=e.RGBA32F),i===e.HALF_FLOAT&&(l=e.RGBA16F),i===e.UNSIGNED_BYTE&&(l=s===Ce&&!1===a?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(l=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(l=e.RGB5_A1)),l!==e.R16F&&l!==e.R32F&&l!==e.RG16F&&l!==e.RG32F&&l!==e.RGBA16F&&l!==e.RGBA32F||t.get("EXT_color_buffer_float"),l}function Q(e,t,n){return!0===b(e,n)||e.isFramebufferTexture&&e.minFilter!==C&&e.minFilter!==B?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function V(t){return t===C||t===T||t===I?e.NEAREST:e.LINEAR}function H(e){const t=e.target;t.removeEventListener("dispose",H),function(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=g.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&W(e),0===Object.keys(i).length&&g.delete(n)}r.remove(e)}(t),t.isVideoTexture&&f.delete(t)}function j(t){const n=t.target;n.removeEventListener("dispose",j),function(t){const n=t.texture,i=r.get(t),s=r.get(n);void 0!==s.__webglTexture&&(e.deleteTexture(s.__webglTexture),a.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let r=0;r<6;r++)e.deleteFramebuffer(i.__webglFramebuffer[r]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[r]);else{if(e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer)for(let t=0;t0&&s.__version!==t.version){const e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void $(s,t,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(e.TEXTURE_2D,s.__webglTexture,e.TEXTURE0+i)}const q={[S]:e.REPEAT,[M]:e.CLAMP_TO_EDGE,[w]:e.MIRRORED_REPEAT},K={[C]:e.NEAREST,[T]:e.NEAREST_MIPMAP_NEAREST,[I]:e.NEAREST_MIPMAP_LINEAR,[B]:e.LINEAR,[R]:e.LINEAR_MIPMAP_NEAREST,[P]:e.LINEAR_MIPMAP_LINEAR};function J(n,s,a){if(a?(e.texParameteri(n,e.TEXTURE_WRAP_S,q[s.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,q[s.wrapT]),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,q[s.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,K[s.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,K[s.minFilter])):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),s.wrapS===M&&s.wrapT===M||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,e.TEXTURE_MAG_FILTER,V(s.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,V(s.minFilter)),s.minFilter!==C&&s.minFilter!==B&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const a=t.get("EXT_texture_filter_anisotropic");if(s.magFilter===C)return;if(s.minFilter!==I&&s.minFilter!==P)return;if(s.type===U&&!1===t.has("OES_texture_float_linear"))return;if(!1===o&&s.type===O&&!1===t.has("OES_texture_half_float_linear"))return;(s.anisotropy>1||r.get(s).__currentAnisotropy)&&(e.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,i.getMaxAnisotropy())),r.get(s).__currentAnisotropy=s.anisotropy)}}function Z(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",H));const i=n.source;let s=g.get(i);void 0===s&&(s={},g.set(i,s));const o=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(n);if(o!==t.__cacheKey){void 0===s[o]&&(s[o]={texture:e.createTexture(),usedTimes:0},a.memory.textures++,r=!0),s[o].usedTimes++;const i=s[t.__cacheKey];void 0!==i&&(s[t.__cacheKey].usedTimes--,0===i.usedTimes&&W(n)),t.__cacheKey=o,t.__webglTexture=s[o].texture}return r}function $(t,i,a){let l=e.TEXTURE_2D;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(l=e.TEXTURE_2D_ARRAY),i.isData3DTexture&&(l=e.TEXTURE_3D);const c=Z(t,i),u=i.source;n.bindTexture(l,t.__webglTexture,e.TEXTURE0+a);const d=r.get(u);if(u.version!==d.__version||!0===c){n.activeTexture(e.TEXTURE0+a),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);const t=function(e){return!o&&(e.wrapS!==M||e.wrapT!==M||e.minFilter!==C&&e.minFilter!==B)}(i)&&!1===x(i.image);let r=y(i.image,t,!1,h);r=se(i,r);const p=x(r)||o,f=s.convert(i.format,i.colorSpace);let m,g=s.convert(i.type),A=_(i.internalFormat,f,g,i.colorSpace);J(l,i,p);const v=i.mipmaps,S=o&&!0!==i.isVideoTexture,w=void 0===d.__version||!0===c,T=Q(i,r,p);if(i.isDepthTexture)A=e.DEPTH_COMPONENT,o?A=i.type===U?e.DEPTH_COMPONENT32F:i.type===F?e.DEPTH_COMPONENT24:i.type===N?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:i.type===U&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===G&&A===e.DEPTH_COMPONENT&&i.type!==L&&i.type!==F&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=F,g=s.convert(i.type)),i.format===z&&A===e.DEPTH_COMPONENT&&(A=e.DEPTH_STENCIL,i.type!==N&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=N,g=s.convert(i.type))),w&&(S?n.texStorage2D(e.TEXTURE_2D,1,A,r.width,r.height):n.texImage2D(e.TEXTURE_2D,0,A,r.width,r.height,0,f,g,null));else if(i.isDataTexture)if(v.length>0&&p){S&&w&&n.texStorage2D(e.TEXTURE_2D,T,A,v[0].width,v[0].height);for(let t=0,r=v.length;t>=1,i>>=1}}else if(v.length>0&&p){S&&w&&n.texStorage2D(e.TEXTURE_2D,T,A,v[0].width,v[0].height);for(let t=0,r=v.length;t=e.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,o,l,r.get(a).__webglTexture,0),n.bindFramebuffer(e.FRAMEBUFFER,null)}function te(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer){let i=e.DEPTH_COMPONENT16;if(r||ie(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===U?i=e.DEPTH_COMPONENT32F:t.type===F&&(i=e.DEPTH_COMPONENT24));const r=re(n);ie(n)?d.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,i,n.width,n.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,r,i,n.width,n.height)}else e.renderbufferStorage(e.RENDERBUFFER,i,n.width,n.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(n.depthBuffer&&n.stencilBuffer){const i=re(n);r&&!1===ie(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):ie(n)?d.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let i=0;i0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function se(e,n){const r=e.colorSpace,i=e.format,s=e.type;return!0===e.isCompressedTexture||e.format===De||r!==Te&&r!==we&&(r===Ce?!1===o?!0===t.has("EXT_sRGB")&&i===k?(e.format=De,e.minFilter=B,e.generateMipmaps=!1):n=dt.sRGBToLinear(n):i===k&&s===D||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",r)),n}this.allocateTextureUnit=function(){const e=X;return e>=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),X+=1,e},this.resetTextureUnits=function(){X=0},this.setTexture2D=Y,this.setTexture2DArray=function(t,i){const s=r.get(t);t.version>0&&s.__version!==t.version?$(s,t,i):n.bindTexture(e.TEXTURE_2D_ARRAY,s.__webglTexture,e.TEXTURE0+i)},this.setTexture3D=function(t,i){const s=r.get(t);t.version>0&&s.__version!==t.version?$(s,t,i):n.bindTexture(e.TEXTURE_3D,s.__webglTexture,e.TEXTURE0+i)},this.setTextureCube=function(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?function(t,i,a){if(6!==i.image.length)return;const l=Z(t,i),h=i.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+a);const u=r.get(h);if(h.version!==u.__version||!0===l){n.activeTexture(e.TEXTURE0+a),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);const t=i.isCompressedTexture||i.image[0].isCompressedTexture,r=i.image[0]&&i.image[0].isDataTexture,d=[];for(let e=0;e<6;e++)d[e]=t||r?r?i.image[e].image:i.image[e]:y(i.image[e],!1,!0,c),d[e]=se(i,d[e]);const p=d[0],f=x(p)||o,m=s.convert(i.format,i.colorSpace),g=s.convert(i.type),A=_(i.internalFormat,m,g,i.colorSpace),v=o&&!0!==i.isVideoTexture,S=void 0===u.__version||!0===l;let M,w=Q(i,p,f);if(J(e.TEXTURE_CUBE_MAP,i,f),t){v&&S&&n.texStorage2D(e.TEXTURE_CUBE_MAP,w,A,p.width,p.height);for(let t=0;t<6;t++){M=d[t].mipmaps;for(let r=0;r0&&w++,n.texStorage2D(e.TEXTURE_CUBE_MAP,w,A,d[0].width,d[0].height));for(let t=0;t<6;t++)if(r){v?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,d[t].width,d[t].height,m,g,d[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,A,d[t].width,d[t].height,0,m,g,d[t].data);for(let r=0;r0&&!1===ie(t)){const r=d?l:[l];c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer);for(let n=0;n0&&!1===ie(t)){const i=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],s=t.width,a=t.height;let o=e.COLOR_BUFFER_BIT;const l=[],c=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,h=r.get(t),u=!0===t.isWebGLMultipleRenderTargets;if(u)for(let t=0;to+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&a<=o-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1));null!==a&&(r=t.getPose(e.targetRaySpace,n),null===r&&null!==i&&(r=i),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(ba)))}return null!==a&&(a.visible=null!==r),null!==o&&(o.visible=null!==i),null!==l&&(l.visible=null!==s),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new xa;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class _a extends gt{constructor(e,t,n,r,i,s,a,o,l,c){if((c=void 0!==c?c:G)!==G&&c!==z)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===G&&(n=F),void 0===n&&c===z&&(n=N),super(null,r,i,s,a,o,c,n,l),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==a?a:C,this.minFilter=void 0!==o?o:C,this.flipY=!1,this.generateMipmaps=!1}}class Sa extends Le{constructor(e,t){super();const n=this;let r=null,i=1,s=null,a="local-floor",o=1,l=null,c=null,h=null,u=null,d=null,p=null;const f=t.getContextAttributes();let m=null,g=null;const A=[],v=[],y=new Set,x=new Map,b=new Or;b.layers.enable(1),b.viewport=new At;const E=new Or;E.layers.enable(2),E.viewport=new At;const _=[b,E],S=new ya;S.layers.enable(1),S.layers.enable(2);let M=null,w=null;function C(e){const t=v.indexOf(e.inputSource);if(-1===t)return;const n=A[t];void 0!==n&&(n.update(e.inputSource,e.frame,l||s),n.dispatchEvent({type:e.type,data:e.inputSource}))}function T(){r.removeEventListener("select",C),r.removeEventListener("selectstart",C),r.removeEventListener("selectend",C),r.removeEventListener("squeeze",C),r.removeEventListener("squeezestart",C),r.removeEventListener("squeezeend",C),r.removeEventListener("end",T),r.removeEventListener("inputsourceschange",I);for(let e=0;e=0&&(v[r]=null,A[r].disconnect(n))}for(let t=0;t=v.length){v.push(n),r=e;break}if(null===v[e]){v[e]=n,r=e;break}}if(-1===r)break}const i=A[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=A[e];return void 0===t&&(t=new Ea,A[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=A[e];return void 0===t&&(t=new Ea,A[e]=t),t.getGripSpace()},this.getHand=function(e){let t=A[e];return void 0===t&&(t=new Ea,A[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){a=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||s},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==u?u:d},this.getBinding=function(){return h},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=async function(c){if(r=c,null!==r){if(m=e.getRenderTarget(),r.addEventListener("select",C),r.addEventListener("selectstart",C),r.addEventListener("selectend",C),r.addEventListener("squeeze",C),r.addEventListener("squeezestart",C),r.addEventListener("squeezeend",C),r.addEventListener("end",T),r.addEventListener("inputsourceschange",I),!0!==f.xrCompatible&&await t.makeXRCompatible(),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==r.renderState.layers||f.antialias,alpha:!0,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:i};d=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:d}),g=new vt(d.framebufferWidth,d.framebufferHeight,{format:k,type:D,colorSpace:e.outputColorSpace,stencilBuffer:f.stencil})}else{let n=null,s=null,a=null;f.depth&&(a=f.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=f.stencil?z:G,s=f.stencil?N:F);const o={colorFormat:t.RGBA8,depthFormat:a,scaleFactor:i};h=new XRWebGLBinding(r,t),u=h.createProjectionLayer(o),r.updateRenderState({layers:[u]}),g=new vt(u.textureWidth,u.textureHeight,{format:k,type:D,depthTexture:new _a(u.textureWidth,u.textureHeight,s,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:f.stencil,colorSpace:e.outputColorSpace,samples:f.antialias?4:0});e.properties.get(g).__ignoreDepthValues=u.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(o),l=null,s=await r.requestReferenceSpace(a),U.setContext(r),U.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode};const B=new Et,R=new Et;function P(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;S.near=E.near=b.near=e.near,S.far=E.far=b.far=e.far,M===S.near&&w===S.far||(r.updateRenderState({depthNear:S.near,depthFar:S.far}),M=S.near,w=S.far);const t=e.parent,n=S.cameras;P(S,t);for(let r=0;re&&(x.set(t,t.lastChangedTime),n.dispatchEvent({type:"planechanged",data:t}))}else y.add(t),x.set(t,r.lastChangedTime),n.dispatchEvent({type:"planeadded",data:t})}p=null})),this.setAnimationLoop=function(e){L=e},this.dispose=function(){}}}function Ma(e,t){function n(e,t){!0===e.matrixAutoUpdate&&e.updateMatrix(),t.value.copy(e.matrix)}function r(r,i){r.opacity.value=i.opacity,i.color&&r.diffuse.value.copy(i.color),i.emissive&&r.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),i.map&&(r.map.value=i.map,n(i.map,r.mapTransform)),i.alphaMap&&(r.alphaMap.value=i.alphaMap,n(i.alphaMap,r.alphaMapTransform)),i.bumpMap&&(r.bumpMap.value=i.bumpMap,n(i.bumpMap,r.bumpMapTransform),r.bumpScale.value=i.bumpScale,i.side===o&&(r.bumpScale.value*=-1)),i.normalMap&&(r.normalMap.value=i.normalMap,n(i.normalMap,r.normalMapTransform),r.normalScale.value.copy(i.normalScale),i.side===o&&r.normalScale.value.negate()),i.displacementMap&&(r.displacementMap.value=i.displacementMap,n(i.displacementMap,r.displacementMapTransform),r.displacementScale.value=i.displacementScale,r.displacementBias.value=i.displacementBias),i.emissiveMap&&(r.emissiveMap.value=i.emissiveMap,n(i.emissiveMap,r.emissiveMapTransform)),i.specularMap&&(r.specularMap.value=i.specularMap,n(i.specularMap,r.specularMapTransform)),i.alphaTest>0&&(r.alphaTest.value=i.alphaTest);const s=t.get(i).envMap;if(s&&(r.envMap.value=s,r.flipEnvMap.value=s.isCubeTexture&&!1===s.isRenderTargetTexture?-1:1,r.reflectivity.value=i.reflectivity,r.ior.value=i.ior,r.refractionRatio.value=i.refractionRatio),i.lightMap){r.lightMap.value=i.lightMap;const t=!0===e.useLegacyLights?Math.PI:1;r.lightMapIntensity.value=i.lightMapIntensity*t,n(i.lightMap,r.lightMapTransform)}i.aoMap&&(r.aoMap.value=i.aoMap,r.aoMapIntensity.value=i.aoMapIntensity,n(i.aoMap,r.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,Dr(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,i,s,a,l){i.isMeshBasicMaterial||i.isMeshLambertMaterial?r(e,i):i.isMeshToonMaterial?(r(e,i),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,i)):i.isMeshPhongMaterial?(r(e,i),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,i)):i.isMeshStandardMaterial?(r(e,i),function(e,r){e.metalness.value=r.metalness,r.metalnessMap&&(e.metalnessMap.value=r.metalnessMap,n(r.metalnessMap,e.metalnessMapTransform));e.roughness.value=r.roughness,r.roughnessMap&&(e.roughnessMap.value=r.roughnessMap,n(r.roughnessMap,e.roughnessMapTransform));const i=t.get(r).envMap;i&&(e.envMapIntensity.value=r.envMapIntensity)}(e,i),i.isMeshPhysicalMaterial&&function(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform)));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===o&&e.clearcoatNormalScale.value.negate()));t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform)));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform));t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,i,l)):i.isMeshMatcapMaterial?(r(e,i),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,i)):i.isMeshDepthMaterial?r(e,i):i.isMeshDistanceMaterial?(r(e,i),function(e,n){const r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?r(e,i):i.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}(e,i),i.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,i)):i.isPointsMaterial?function(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=.5*i,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i,s,a):i.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function wa(e,t,n,r){let i={},s={},a=[];const o=n.isWebGL2?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(e,t,n){const r=e.value;if(void 0===n[t]){if("number"==typeof r)n[t]=r;else{const e=Array.isArray(r)?r:[r],i=[];for(let t=0;t0){i=n%r;0!==i&&r-i-a.boundary<0&&(n+=r-i,e.__offset=n)}n+=a.storage}i=n%r,i>0&&(n+=r-i);e.__size=n,e.__cache={}}(n),d=function(t){const n=function(){for(let e=0;e0&&function(e,t,n,r){if(null===W){const e=Z.isWebGL2;W=new vt(1024,1024,{generateMipmaps:!0,type:J.has("EXT_color_buffer_half_float")?O:D,minFilter:P,samples:e&&!0===c?4:0})}const i=x.getRenderTarget();x.setRenderTarget(W),x.clear();const s=x.toneMapping;x.toneMapping=d,Oe(e,n,r),ne.updateMultisampleRenderTarget(W),ne.updateRenderTargetMipmap(W);let a=!1;for(let l=0,c=t.length;l0&&Oe(i,t,n),s.length>0&&Oe(s,t,n),a.length>0&&Oe(a,t,n),$.buffers.depth.setTest(!0),$.buffers.depth.setMask(!0),$.buffers.color.setMask(!0),$.setPolygonOffset(!1)}function Oe(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,s=e.length;i0?y[y.length-1]:null,v.pop(),g=v.length>0?v[v.length-1]:null},this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return _},this.getRenderTarget=function(){return S},this.setRenderTargetTextures=function(e,t,n){te.get(e.texture).__webglTexture=t,te.get(e.depthTexture).__webglTexture=n;const r=te.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===J.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=te.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){S=e,E=t,_=n;let r=!0,i=null,s=!1,a=!1;if(e){const n=te.get(e);void 0!==n.__useDefaultFramebuffer?($.bindFramebuffer(be.FRAMEBUFFER,null),r=!1):void 0===n.__webglFramebuffer?ne.setupRenderTarget(e):n.__hasExternalTextures&&ne.rebindTextures(e,te.get(e.texture).__webglTexture,te.get(e.depthTexture).__webglTexture);const o=e.texture;(o.isData3DTexture||o.isDataArrayTexture||o.isCompressedArrayTexture)&&(a=!0);const l=te.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=l[t],s=!0):i=Z.isWebGL2&&e.samples>0&&!1===ne.useMultisampledRTT(e)?te.get(e).__webglMultisampledFramebuffer:l,C.copy(e.viewport),T.copy(e.scissor),I=e.scissorTest}else C.copy(G).multiplyScalar(L).floor(),T.copy(z).multiplyScalar(L).floor(),I=Q;if($.bindFramebuffer(be.FRAMEBUFFER,i)&&Z.drawBuffers&&r&&$.drawBuffers(e,i),$.viewport(C),$.scissor(T),$.setScissorTest(I),s){const r=te.get(e.texture);be.framebufferTexture2D(be.FRAMEBUFFER,be.COLOR_ATTACHMENT0,be.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(a){const r=te.get(e.texture),i=t||0;be.framebufferTextureLayer(be.FRAMEBUFFER,be.COLOR_ATTACHMENT0,r.__webglTexture,n||0,i)}M=-1},this.readRenderTargetPixels=function(e,t,n,r,i,s,a){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let o=te.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(o=o[a]),o){$.bindFramebuffer(be.FRAMEBUFFER,o);try{const a=e.texture,o=a.format,l=a.type;if(o!==k&&ve.convert(o)!==be.getParameter(be.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===O&&(J.has("EXT_color_buffer_half_float")||Z.isWebGL2&&J.has("EXT_color_buffer_float"));if(!(l===D||ve.convert(l)===be.getParameter(be.IMPLEMENTATION_COLOR_READ_TYPE)||l===U&&(Z.isWebGL2||J.has("OES_texture_float")||J.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&be.readPixels(t,n,r,i,ve.convert(o),ve.convert(l),s)}finally{const e=null!==S?te.get(S).__webglFramebuffer:null;$.bindFramebuffer(be.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),s=Math.floor(t.image.height*r);ne.setTexture2D(t,0),be.copyTexSubImage2D(be.TEXTURE_2D,n,0,0,e.x,e.y,i,s),$.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,s=t.image.height,a=ve.convert(n.format),o=ve.convert(n.type);ne.setTexture2D(n,0),be.pixelStorei(be.UNPACK_FLIP_Y_WEBGL,n.flipY),be.pixelStorei(be.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),be.pixelStorei(be.UNPACK_ALIGNMENT,n.unpackAlignment),t.isDataTexture?be.texSubImage2D(be.TEXTURE_2D,r,e.x,e.y,i,s,a,o,t.image.data):t.isCompressedTexture?be.compressedTexSubImage2D(be.TEXTURE_2D,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):be.texSubImage2D(be.TEXTURE_2D,r,e.x,e.y,a,o,t.image),0===r&&n.generateMipmaps&&be.generateMipmap(be.TEXTURE_2D),$.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(x.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const s=e.max.x-e.min.x+1,a=e.max.y-e.min.y+1,o=e.max.z-e.min.z+1,l=ve.convert(r.format),c=ve.convert(r.type);let h;if(r.isData3DTexture)ne.setTexture3D(r,0),h=be.TEXTURE_3D;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");ne.setTexture2DArray(r,0),h=be.TEXTURE_2D_ARRAY}be.pixelStorei(be.UNPACK_FLIP_Y_WEBGL,r.flipY),be.pixelStorei(be.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),be.pixelStorei(be.UNPACK_ALIGNMENT,r.unpackAlignment);const u=be.getParameter(be.UNPACK_ROW_LENGTH),d=be.getParameter(be.UNPACK_IMAGE_HEIGHT),p=be.getParameter(be.UNPACK_SKIP_PIXELS),f=be.getParameter(be.UNPACK_SKIP_ROWS),m=be.getParameter(be.UNPACK_SKIP_IMAGES),g=n.isCompressedTexture?n.mipmaps[0]:n.image;be.pixelStorei(be.UNPACK_ROW_LENGTH,g.width),be.pixelStorei(be.UNPACK_IMAGE_HEIGHT,g.height),be.pixelStorei(be.UNPACK_SKIP_PIXELS,e.min.x),be.pixelStorei(be.UNPACK_SKIP_ROWS,e.min.y),be.pixelStorei(be.UNPACK_SKIP_IMAGES,e.min.z),n.isDataTexture||n.isData3DTexture?be.texSubImage3D(h,i,t.x,t.y,t.z,s,a,o,l,c,g.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),be.compressedTexSubImage3D(h,i,t.x,t.y,t.z,s,a,o,l,g.data)):be.texSubImage3D(h,i,t.x,t.y,t.z,s,a,o,l,c,g),be.pixelStorei(be.UNPACK_ROW_LENGTH,u),be.pixelStorei(be.UNPACK_IMAGE_HEIGHT,d),be.pixelStorei(be.UNPACK_SKIP_PIXELS,p),be.pixelStorei(be.UNPACK_SKIP_ROWS,f),be.pixelStorei(be.UNPACK_SKIP_IMAGES,m),0===i&&r.generateMipmaps&&be.generateMipmap(h),$.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?ne.setTextureCube(e,0):e.isData3DTexture?ne.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?ne.setTexture2DArray(e,0):ne.setTexture2D(e,0),$.unbindTexture()},this.resetState=function(){E=0,_=0,S=null,$.reset(),ye.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Ce?Me:Se}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Me?Ce:Te}}class Ia extends Ta{}Ia.prototype.isWebGL1Renderer=!0;class Ba{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Vn(e),this.density=t}clone(){return new Ba(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class Ra{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new Vn(e),this.near=t,this.far=n}clone(){return new Ra(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class Pa extends Sn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class Da{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=Re,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=ke()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;re.far||t.push({distance:o,point:Na.clone(),uv:Un.getInterpolation(Na,Ha,ja,Wa,Xa,Ya,qa,new qe),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Ja(e,t,n,r,i,s){za.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Qa.x=s*za.x-i*za.y,Qa.y=i*za.x+s*za.y):Qa.copy(za),e.copy(t),e.x+=Qa.x,e.y+=Qa.y,e.applyMatrix4(Va)}const Za=new Et,$a=new Et;class eo extends Sn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,r=t.length;n0){let n,r;for(n=1,r=t.length;n0){Za.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(Za);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Za.setFromMatrixPosition(e.matrixWorld),$a.setFromMatrixPosition(this.matrixWorld);const n=Za.distanceTo($a)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r=e))break;t[r-1].object.visible=!1,t[r].object.visible=!0}for(this._currentLevel=r-1;ro)continue;u.applyMatrix4(this.matrixWorld);const s=e.ray.origin.distanceTo(u);se.far||t.push({distance:s,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,s.start),r=Math.min(f.count,s.start+s.count)-1;no)continue;u.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(u);re.far||t.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;ei.far)return;s.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:t,face:null,object:a})}}class zo extends gt{constructor(e,t,n,r,i,s,a,o,l,c,h,u){super(null,s,a,o,l,c,r,i,h,u),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class Qo{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let s=1;s<=e;s++)n=this.getPoint(s/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let s;s=t||e*n[i-1];let a,o=0,l=i-1;for(;o<=l;)if(r=Math.floor(o+(l-o)/2),a=n[r]-s,a<0)o=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(r=l,n[r]===s)return r/(i-1);const c=n[r];return(r+(s-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const s=this.getPoint(r),a=this.getPoint(i),o=t||(s.isVector2?new qe:new Et);return o.copy(a).sub(s).normalize(),o}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new Et,r=[],i=[],s=[],a=new Et,o=new Zt;for(let d=0;d<=e;d++){const t=d/e;r[d]=this.getTangentAt(t,new Et)}i[0]=new Et,s[0]=new Et;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),h=Math.abs(r[0].y),u=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),h<=l&&(l=h,n.set(0,1,0)),u<=l&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),s[0].crossVectors(r[0],i[0]);for(let d=1;d<=e;d++){if(i[d]=i[d-1].clone(),s[d]=s[d-1].clone(),a.crossVectors(r[d-1],r[d]),a.length()>Number.EPSILON){a.normalize();const e=Math.acos(Ge(r[d-1].dot(r[d]),-1,1));i[d].applyMatrix4(o.makeRotationAxis(a,e))}s[d].crossVectors(r[d],i[d])}if(!0===t){let t=Math.acos(Ge(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(o.makeRotationAxis(r[n],t*n)),s[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Vo extends Qo{constructor(e=0,t=0,n=1,r=1,i=0,s=2*Math.PI,a=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=s,this.aClockwise=a,this.aRotation=o}getPoint(e,t){const n=t||new qe,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const s=Math.abs(i)r;)i-=r;i0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===c&&l===i-1&&(l=i-2,c=1),this.closed||l>0?a=r[(l-1)%i]:(Wo.subVectors(r[0],r[1]).add(r[0]),a=Wo);const h=r[l%i],u=r[(l+1)%i];if(this.closed||l+2r.length-2?r.length-1:s+1],h=r[s>r.length-3?r.length-1:s+2];return n.set(Jo(a,o.x,l.x,c.x,h.x),Jo(a,o.y,l.y,c.y,h.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){const e=r[i]-n,s=this.curves[i],a=s.getLength(),o=0===a?0:1-e/a;return s.getPointAt(o,t)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class hl extends hr{constructor(e=[new qe(0,-.5),new qe(.5,0),new qe(0,.5)],t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=Ge(r,0,2*Math.PI);const i=[],s=[],a=[],o=[],l=[],c=1/t,h=new Et,u=new qe,d=new Et,p=new Et,f=new Et;let m=0,g=0;for(let A=0;A<=e.length-1;A++)switch(A){case 0:m=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,d.x=1*g,d.y=-m,d.z=0*g,f.copy(d),d.normalize(),o.push(d.x,d.y,d.z);break;case e.length-1:o.push(f.x,f.y,f.z);break;default:m=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,d.x=1*g,d.y=-m,d.z=0*g,p.copy(d),d.x+=f.x,d.y+=f.y,d.z+=f.z,d.normalize(),o.push(d.x,d.y,d.z),f.copy(p)}for(let A=0;A<=t;A++){const i=n+A*c*r,d=Math.sin(i),p=Math.cos(i);for(let n=0;n<=e.length-1;n++){h.x=e[n].x*d,h.y=e[n].y,h.z=e[n].x*p,s.push(h.x,h.y,h.z),u.x=A/t,u.y=n/(e.length-1),a.push(u.x,u.y);const r=o[3*n+0]*d,i=o[3*n+1],c=o[3*n+0]*p;l.push(r,i,c)}}for(let A=0;A0&&A(!0),t>0&&A(!1)),this.setIndex(c),this.setAttribute("position",new nr(h,3)),this.setAttribute("normal",new nr(u,3)),this.setAttribute("uv",new nr(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new pl(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class fl extends pl{constructor(e=1,t=1,n=32,r=1,i=!1,s=0,a=2*Math.PI){super(0,e,t,n,r,i,s,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:s,thetaLength:a}}static fromJSON(e){return new fl(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ml extends hr{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],s=[];function a(e,t,n,r){const i=r+1,s=[];for(let a=0;a<=i;a++){s[a]=[];const r=e.clone().lerp(n,a/i),o=t.clone().lerp(n,a/i),l=i-a;for(let e=0;e<=l;e++)s[a][e]=0===e&&a===i?r:r.clone().lerp(o,e/l)}for(let a=0;a.9&&a<.1&&(t<.2&&(s[e+0]+=1),n<.2&&(s[e+2]+=1),r<.2&&(s[e+4]+=1))}}()}(),this.setAttribute("position",new nr(i,3)),this.setAttribute("normal",new nr(i.slice(),3)),this.setAttribute("uv",new nr(s,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ml(e.vertices,e.indices,e.radius,e.details)}}class gl extends ml{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new gl(e.radius,e.detail)}}const Al=new Et,vl=new Et,yl=new Et,xl=new Un;class bl extends hr{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,r=Math.pow(10,n),i=Math.cos(Oe*t),s=e.getIndex(),a=e.getAttribute("position"),o=s?s.count:a.count,l=[0,0,0],c=["a","b","c"],h=new Array(3),u={},d=[];for(let e=0;e80*n){o=c=e[0],l=h=e[1];for(let t=n;tc&&(c=u),d>h&&(h=d);p=Math.max(c-o,h-l),p=0!==p?32767/p:0}return wl(s,a,n,o,l,p,0),a};function Sl(e,t,n,r,i){let s,a;if(i===function(e,t,n,r){let i=0;for(let s=t,a=n-r;s0)for(s=t;s=t;s-=r)a=jl(s,e[s],e[s+1],a);return a&&kl(a,a.next)&&(Wl(a),a=a.next),a}function Ml(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!kl(r,r.next)&&0!==Nl(r.prev,r,r.next))r=r.next;else{if(Wl(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function wl(e,t,n,r,i,s,a){if(!e)return;!a&&s&&function(e,t,n,r){let i=e;do{0===i.z&&(i.z=Ll(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,s,a,o,l,c=1;do{for(n=e,e=null,s=null,a=0;n;){for(a++,r=n,o=0,t=0;t0||l>0&&r;)0!==o&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,o--):(i=r,r=r.nextZ,l--),s?s.nextZ=i:e=i,i.prevZ=s,s=i;n=r}s.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,s);let o,l,c=e;for(;e.prev!==e.next;)if(o=e.prev,l=e.next,s?Tl(e,r,i,s):Cl(e))t.push(o.i/n|0),t.push(e.i/n|0),t.push(l.i/n|0),Wl(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?wl(e=Il(Ml(e),t,n),t,n,r,i,s,2):2===a&&Bl(e,t,n,r,i,s):wl(Ml(e),t,n,r,i,s,1);break}}function Cl(e){const t=e.prev,n=e,r=e.next;if(Nl(t,n,r)>=0)return!1;const i=t.x,s=n.x,a=r.x,o=t.y,l=n.y,c=r.y,h=is?i>a?i:a:s>a?s:a,p=o>l?o>c?o:c:l>c?l:c;let f=r.next;for(;f!==t;){if(f.x>=h&&f.x<=d&&f.y>=u&&f.y<=p&&Ul(i,o,s,l,a,c,f.x,f.y)&&Nl(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function Tl(e,t,n,r){const i=e.prev,s=e,a=e.next;if(Nl(i,s,a)>=0)return!1;const o=i.x,l=s.x,c=a.x,h=i.y,u=s.y,d=a.y,p=ol?o>c?o:c:l>c?l:c,g=h>u?h>d?h:d:u>d?u:d,A=Ll(p,f,t,n,r),v=Ll(m,g,t,n,r);let y=e.prevZ,x=e.nextZ;for(;y&&y.z>=A&&x&&x.z<=v;){if(y.x>=p&&y.x<=m&&y.y>=f&&y.y<=g&&y!==i&&y!==a&&Ul(o,h,l,u,c,d,y.x,y.y)&&Nl(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==i&&x!==a&&Ul(o,h,l,u,c,d,x.x,x.y)&&Nl(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;y&&y.z>=A;){if(y.x>=p&&y.x<=m&&y.y>=f&&y.y<=g&&y!==i&&y!==a&&Ul(o,h,l,u,c,d,y.x,y.y)&&Nl(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;x&&x.z<=v;){if(x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==i&&x!==a&&Ul(o,h,l,u,c,d,x.x,x.y)&&Nl(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function Il(e,t,n){let r=e;do{const i=r.prev,s=r.next.next;!kl(i,s)&&Gl(i,r,r.next,s)&&Vl(i,s)&&Vl(s,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(s.i/n|0),Wl(r),Wl(r.next),r=e=s),r=r.next}while(r!==e);return Ml(r)}function Bl(e,t,n,r,i,s){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&Ol(a,e)){let o=Hl(a,e);return a=Ml(a,a.next),o=Ml(o,o.next),wl(a,t,n,r,i,s,0),void wl(o,t,n,r,i,s,0)}e=e.next}a=a.next}while(a!==e)}function Rl(e,t){return e.x-t.x}function Pl(e,t){const n=function(e,t){let n,r=t,i=-1/0;const s=e.x,a=e.y;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){const e=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=s&&e>i&&(i=e,n=r.x=r.x&&r.x>=l&&s!==r.x&&Ul(an.x||r.x===n.x&&Dl(n,r)))&&(n=r,u=h)),r=r.next}while(r!==o);return n}(e,t);if(!n)return t;const r=Hl(n,e);return Ml(r,r.next),Ml(n,n.next)}function Dl(e,t){return Nl(e.prev,e,t.prev)<0&&Nl(t.next,e,e.next)<0}function Ll(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Fl(e){let t=e,n=e;do{(t.x=(e-a)*(s-o)&&(e-a)*(r-o)>=(n-a)*(t-o)&&(n-a)*(s-o)>=(i-a)*(r-o)}function Ol(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Gl(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(Vl(e,t)&&Vl(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,s=(e.y+t.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&i<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Nl(e.prev,e,t.prev)||Nl(e,t.prev,t))||kl(e,t)&&Nl(e.prev,e,e.next)>0&&Nl(t.prev,t,t.next)>0)}function Nl(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function kl(e,t){return e.x===t.x&&e.y===t.y}function Gl(e,t,n,r){const i=Ql(Nl(e,t,n)),s=Ql(Nl(e,t,r)),a=Ql(Nl(n,r,e)),o=Ql(Nl(n,r,t));return i!==s&&a!==o||(!(0!==i||!zl(e,n,t))||(!(0!==s||!zl(e,r,t))||(!(0!==a||!zl(n,e,r))||!(0!==o||!zl(n,t,r)))))}function zl(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Ql(e){return e>0?1:e<0?-1:0}function Vl(e,t){return Nl(e.prev,e,e.next)<0?Nl(e,t,e.next)>=0&&Nl(e,e.prev,t)>=0:Nl(e,t,e.prev)<0||Nl(e,e.next,t)<0}function Hl(e,t){const n=new Xl(e.i,e.x,e.y),r=new Xl(t.i,t.x,t.y),i=e.next,s=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function jl(e,t,n,r){const i=new Xl(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Wl(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Xl(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Yl{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i2&&e[t-1].equals(e[0])&&e.pop()}function Kl(e,t){for(let n=0;nNumber.EPSILON){const u=Math.sqrt(h),d=Math.sqrt(l*l+c*c),p=t.x-o/u,f=t.y+a/u,m=((n.x-c/d-p)*c-(n.y+l/d-f)*l)/(a*c-o*l);r=p+a*m-e.x,i=f+o*m-e.y;const g=r*r+i*i;if(g<=2)return new qe(r,i);s=Math.sqrt(g/2)}else{let e=!1;a>Number.EPSILON?l>Number.EPSILON&&(e=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(c)&&(e=!0),e?(r=-o,i=a,s=Math.sqrt(h)):(r=a,i=o,s=Math.sqrt(h/2))}return new qe(r/s,i/s)}const R=[];for(let t=0,n=w.length,r=n-1,i=t+1;t=0;t--){const e=t/p,n=h*Math.cos(e*Math.PI/2),r=u*Math.sin(e*Math.PI/2)+d;for(let t=0,i=w.length;t=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=o+2*p;e0)&&d.push(t,r,a),(g!==n-1||o0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class mc extends Nn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Vn(16777215),this.specular=new Vn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Vn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=c,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class gc extends Nn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Vn(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Vn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class Ac extends Nn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class vc extends Nn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Vn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Vn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=c,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class yc extends Nn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Vn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new qe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class xc extends _o{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function bc(e,t,n){return _c(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)}function Ec(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function _c(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Sc(e){const t=e.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort((function(t,n){return e[t]-e[n]})),n}function Mc(e,t,n){const r=e.length,i=new e.constructor(r);for(let s=0,a=0;a!==r;++s){const r=n[s]*t;for(let n=0;n!==t;++n)i[a++]=e[r+n]}return i}function wc(e,t,n,r){let i=1,s=e[0];for(;void 0!==s&&void 0===s[r];)s=e[i++];if(void 0===s)return;let a=s[r];if(void 0!==a)if(Array.isArray(a))do{a=s[r],void 0!==a&&(t.push(s.time),n.push.apply(n,a)),s=e[i++]}while(void 0!==s);else if(void 0!==a.toArray)do{a=s[r],void 0!==a&&(t.push(s.time),a.toArray(n,n.length)),s=e[i++]}while(void 0!==s);else do{a=s[r],void 0!==a&&(t.push(s.time),n.push(a)),s=e[i++]}while(void 0!==s)}const Cc={arraySlice:bc,convertArray:Ec,isTypedArray:_c,getKeyframeOrder:Sc,sortedArray:Mc,flattenJSON:wc,subclip:function(e,t,n,r,i=30){const s=e.clone();s.name=t;const a=[];for(let l=0;l=r)){o.push(e.times[s]);for(let n=0;ns.tracks[l].times[0]&&(o=s.tracks[l].times[0]);for(let l=0;l=t.times[u]){const e=u*l+o,n=e+l-o;d=bc(t.values,e,n)}else{const e=t.createInterpolant(),n=o,r=l-o;e.evaluate(s),d=bc(e.resultBuffer,n,r)}if("quaternion"===r){(new bt).fromArray(d).normalize().conjugate().toArray(d)}const p=i.times.length;for(let e=0;e=i)break e;{const a=t[1];e=i)break t}s=n,n=0}}for(;n>>1;et;)--s;if(++s,0!==i||s!==r){i>=s&&(s=Math.max(s,1),i=s-1);const e=this.getValueSize();this.times=bc(n,i,s),this.values=bc(this.values,i*e,s*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==i;a++){const t=n[a];if("number"==typeof t&&isNaN(t)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,t),e=!1;break}if(null!==s&&s>t){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,t,s),e=!1;break}s=t}if(void 0!==r&&_c(r))for(let a=0,o=r.length;a!==o;++a){const t=r[a];if(isNaN(t)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,t),e=!1;break}}return e}optimize(){const e=bc(this.times),t=bc(this.values),n=this.getValueSize(),r=this.getInterpolation()===ve,i=e.length-1;let s=1;for(let a=1;a0){e[s]=e[i];for(let e=i*n,r=s*n,a=0;a!==n;++a)t[r+a]=t[e+a];++s}return s!==e.length?(this.times=bc(e,0,s),this.values=bc(t,0,s*n)):(this.times=e,this.values=t),this}clone(){const e=bc(this.times,0),t=bc(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Pc.prototype.TimeBufferType=Float32Array,Pc.prototype.ValueBufferType=Float32Array,Pc.prototype.DefaultInterpolation=Ae;class Dc extends Pc{}Dc.prototype.ValueTypeName="bool",Dc.prototype.ValueBufferType=Array,Dc.prototype.DefaultInterpolation=ge,Dc.prototype.InterpolantFactoryMethodLinear=void 0,Dc.prototype.InterpolantFactoryMethodSmooth=void 0;class Lc extends Pc{}Lc.prototype.ValueTypeName="color";class Fc extends Pc{}Fc.prototype.ValueTypeName="number";class Uc extends Tc{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=(n-t)/(r-t);let l=e*a;for(let c=l+a;l!==c;l+=4)bt.slerpFlat(i,0,s,l-a,s,l,o);return i}}class Oc extends Pc{InterpolantFactoryMethodLinear(e){return new Uc(this.times,this.values,this.getValueSize(),e)}}Oc.prototype.ValueTypeName="quaternion",Oc.prototype.DefaultInterpolation=Ae,Oc.prototype.InterpolantFactoryMethodSmooth=void 0;class Nc extends Pc{}Nc.prototype.ValueTypeName="string",Nc.prototype.ValueBufferType=Array,Nc.prototype.DefaultInterpolation=ge,Nc.prototype.InterpolantFactoryMethodLinear=void 0,Nc.prototype.InterpolantFactoryMethodSmooth=void 0;class kc extends Pc{}kc.prototype.ValueTypeName="vector";class Gc{constructor(e,t=-1,n,r=2500){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=ke(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let s=0,a=n.length;s!==a;++s)t.push(zc(n[s]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let i=0,s=n.length;i!==s;++i)t.push(Pc.toJSON(n[i]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,s=[];for(let a=0;a1){const e=n[1];let i=r[e];i||(r[e]=i=[]),i.push(t)}}const s=[];for(const a in r)s.push(this.CreateFromMorphTargetSequence(a,r[a],t,n));return s}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const s=[],a=[];wc(n,s,a,r),0!==s.length&&i.push(new e(t,s,a))}},r=[],i=e.name||"default",s=e.fps||30,a=e.blendMode;let o=e.length||-1;const l=e.hierarchy||[];for(let c=0;c{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==Wc[e])return void Wc[e].push({onLoad:t,onProgress:n,onError:r});Wc[e]=[],Wc[e].push({onLoad:t,onProgress:n,onError:r});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(s).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=Wc[e],r=t.body.getReader(),i=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),s=i?parseInt(i):0,a=0!==s;let o=0;const l=new ReadableStream({start(e){!function t(){r.read().then((({done:r,value:i})=>{if(r)e.close();else{o+=i.byteLength;const r=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:s});for(let e=0,t=n.length;e{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,a)));case"json":return e.json();default:if(void 0===a)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(a),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then((e=>r.decode(e)))}}})).then((t=>{Qc.add(e,t);const n=Wc[e];delete Wc[e];for(let e=0,r=n.length;e{const n=Wc[e];if(void 0===n)throw this.manager.itemError(e),t;delete Wc[e];for(let e=0,r=n.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class qc extends jc{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,s=Qc.get(e);if(void 0!==s)return i.manager.itemStart(e),setTimeout((function(){t&&t(s),i.manager.itemEnd(e)}),0),s;const a=tt("img");function o(){c(),Qc.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){c(),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}function c(){a.removeEventListener("load",o,!1),a.removeEventListener("error",l,!1)}return a.addEventListener("load",o,!1),a.addEventListener("error",l,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),i.manager.itemStart(e),a.src=e,a}}class Kc extends Sn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Vn(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}class Jc extends Kc{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Sn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Vn(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const Zc=new Zt,$c=new Et,eh=new Et;class th{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new qe(512,512),this.map=null,this.mapPass=null,this.matrix=new Zt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Yr,this._frameExtents=new qe(1,1),this._viewportCount=1,this._viewports=[new At(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;$c.setFromMatrixPosition(e.matrixWorld),t.position.copy($c),eh.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(eh),t.updateMatrixWorld(),Zc.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Zc),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Zc)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class nh extends th{constructor(){super(new Or(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=2*Ne*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class rh extends Kc{constructor(e,t,n=0,r=Math.PI/3,i=0,s=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Sn.DEFAULT_UP),this.updateMatrix(),this.target=new Sn,this.distance=n,this.angle=r,this.penumbra=i,this.decay=s,this.map=null,this.shadow=new nh}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const ih=new Zt,sh=new Et,ah=new Et;class oh extends th{constructor(){super(new Or(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new qe(4,2),this._viewportCount=6,this._viewports=[new At(2,1,1,1),new At(0,1,1,1),new At(3,1,1,1),new At(1,1,1,1),new At(3,0,1,1),new At(1,0,1,1)],this._cubeDirections=[new Et(1,0,0),new Et(-1,0,0),new Et(0,0,1),new Et(0,0,-1),new Et(0,1,0),new Et(0,-1,0)],this._cubeUps=[new Et(0,1,0),new Et(0,1,0),new Et(0,1,0),new Et(0,1,0),new Et(0,0,1),new Et(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),sh.setFromMatrixPosition(e.matrixWorld),n.position.copy(sh),ah.copy(n.position),ah.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(ah),n.updateMatrixWorld(),r.makeTranslation(-sh.x,-sh.y,-sh.z),ih.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ih)}}class lh extends Kc{constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new oh}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class ch extends th{constructor(){super(new li(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class hh extends Kc{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Sn.DEFAULT_UP),this.updateMatrix(),this.target=new Sn,this.shadow=new ch}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class uh extends Kc{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class dh extends Kc{constructor(e,t,n=10,r=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class ph{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new Et)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,s=this.coefficients;return t.copy(s[0]).multiplyScalar(.282095),t.addScaledVector(s[1],.488603*r),t.addScaledVector(s[2],.488603*i),t.addScaledVector(s[3],.488603*n),t.addScaledVector(s[4],n*r*1.092548),t.addScaledVector(s[5],r*i*1.092548),t.addScaledVector(s[6],.315392*(3*i*i-1)),t.addScaledVector(s[7],n*i*1.092548),t.addScaledVector(s[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,s=this.coefficients;return t.copy(s[0]).multiplyScalar(.886227),t.addScaledVector(s[1],1.023328*r),t.addScaledVector(s[2],1.023328*i),t.addScaledVector(s[3],1.023328*n),t.addScaledVector(s[4],.858086*n*r),t.addScaledVector(s[5],.858086*r*i),t.addScaledVector(s[6],.743125*i*i-.247708),t.addScaledVector(s[7],.858086*n*i),t.addScaledVector(s[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}class fh extends Kc{constructor(e=new ph,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class mh extends jc{constructor(e){super(e),this.textures={}}load(e,t,n,r){const i=this,s=new Yc(i.manager);s.setPath(i.path),s.setRequestHeader(i.requestHeader),s.setWithCredentials(i.withCredentials),s.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(s){r?r(s):console.error(s),i.manager.itemError(e)}}),n,r)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}const r=mh.createMaterialFromType(e.type);if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=e.sheen),void 0!==e.sheenColor&&(r.sheenColor=(new Vn).setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(r.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.specularIntensity&&(r.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==r.specularColor&&r.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.iridescence&&(r.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(r.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),1!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.forceSinglePass&&(r.forceSinglePass=e.forceSinglePass),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const i in e.uniforms){const t=e.uniforms[i];switch(r.uniforms[i]={},t.type){case"t":r.uniforms[i].value=n(t.value);break;case"c":r.uniforms[i].value=(new Vn).setHex(t.value);break;case"v2":r.uniforms[i].value=(new qe).fromArray(t.value);break;case"v3":r.uniforms[i].value=(new Et).fromArray(t.value);break;case"v4":r.uniforms[i].value=(new At).fromArray(t.value);break;case"m3":r.uniforms[i].value=(new Ke).fromArray(t.value);break;case"m4":r.uniforms[i].value=(new Zt).fromArray(t.value);break;default:r.uniforms[i].value=t.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(r.glslVersion=e.glslVersion),void 0!==e.extensions)for(const i in e.extensions)r.extensions[i]=e.extensions[i];if(void 0!==e.lights&&(r.lights=e.lights),void 0!==e.clipping&&(r.clipping=e.clipping),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new qe).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new qe).fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(r.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){return new{ShadowMaterial:uc,SpriteMaterial:Ua,RawShaderMaterial:dc,ShaderMaterial:Fr,PointsMaterial:Lo,MeshPhysicalMaterial:fc,MeshStandardMaterial:pc,MeshPhongMaterial:mc,MeshToonMaterial:gc,MeshNormalMaterial:Ac,MeshLambertMaterial:vc,MeshDepthMaterial:pa,MeshDistanceMaterial:fa,MeshBasicMaterial:jn,MeshMatcapMaterial:yc,LineDashedMaterial:xc,LineBasicMaterial:_o,Material:Nn}[e]}}class gh{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let r=0,i=e.length;r0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let o=t,l=t+t;o!==l;++o)if(n[o]!==n[o+t]){a.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let i=n,s=r;i!==s;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let s=0;s!==i;++s)e[t+s]=e[n+s]}_slerp(e,t,n,r){bt.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const s=this._workIndex*i;bt.multiplyQuaternionsFlat(e,s,e,t,e,n),bt.slerpFlat(e,t,e,t,e,s,r)}_lerp(e,t,n,r,i){const s=1-r;for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]*s+e[n+a]*r}}_lerpAdditive(e,t,n,r,i){for(let s=0;s!==i;++s){const i=t+s;e[i]=e[i]+e[n+s]*r}}}const kh="\\[\\]\\.:\\/",Gh=new RegExp("["+kh+"]","g"),zh="[^"+kh+"]",Qh="[^"+kh.replace("\\.","")+"]",Vh=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",zh)+/(WCOD+)?/.source.replace("WCOD",Qh)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",zh)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",zh)+"$"),Hh=["material","materials","bones","map"];class jh{constructor(e,t,n){this.path=t,this.parsedPath=n||jh.parseTrackName(t),this.node=jh.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new jh.Composite(e,t,n):new jh(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Gh,"")}static parseTrackName(e){const t=Vh.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==Hh.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r0){const e=this._interpolants,t=this._propertyBindings;if(this.blendMode===_e)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(s),t[n].accumulateAdditive(a);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(s),t[n].accumulate(r,a)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const s=2202===n;if(0===e)return-1===i?r:s&&1==(1&i)?t-r:r;if(2200===n){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const a=this.repetitions-i;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){const t=e<0;this._setEndings(t,!t,s)}else this._setEndings(!1,!1,s);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(s&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=xe,r.endingEnd=xe):(r.endingStart=e?this.zeroSlopeAtStart?xe:ye:be,r.endingEnd=t?this.zeroSlopeAtEnd?xe:ye:be)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let s=this._weightInterpolant;null===s&&(s=r._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,o=s.sampleValues;return a[0]=i,o[0]=t,a[1]=i+e,o[1]=n,this}}const Xh=new Float32Array(1);class Yh{constructor(e){this.value=e}clone(){return new Yh(void 0===this.value.clone?this.value:this.value.clone())}}let qh=0;function Kh(e,t){return e.distance-t.distance}function Jh(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r){const r=e.children;for(let e=0,i=r.length;e=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),s=this._accuIndex^=1;for(let l=0;l!==n;++l){t[l]._update(r,e,i,s)}const a=this._bindings,o=this._nActiveBindings;for(let l=0;l!==o;++l)a[l].apply(s);return this}setTime(e){this.time=0;for(let t=0;t=i){const s=i++,c=e[s];t[c.uuid]=l,e[l]=c,t[o]=s,e[s]=a;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[s],i=t[l];t[l]=r,t[s]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,s=e.length;for(let a=0,o=arguments.length;a!==o;++a){const o=arguments[a].uuid,l=t[o];if(void 0!==l)if(delete t[o],l0&&(t[a.uuid]=l),e[l]=a,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const s=this._paths,a=this._parsedPaths,o=this._objects,l=o.length,c=this.nCachedObjects_,h=new Array(l);r=i.length,n[e]=r,s.push(e),a.push(t),i.push(h);for(let u=c,d=o.length;u!==d;++u){const n=o[u];h[u]=new jh(n,e,t)}return h}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,s=this._bindings,a=s.length-1,o=s[a];t[e[a]]=n,s[n]=o,s.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}},t.AnimationUtils=Cc,t.ArcCurve=Ho,t.ArrayCamera=ya,t.ArrowHelper=class extends Sn{constructor(e=new Et(0,0,1),t=new Et(0,0,0),n=1,r=16776960,i=.2*n,s=.2*i){super(),this.type="ArrowHelper",void 0===Au&&(Au=new hr,Au.setAttribute("position",new nr([0,0,0,0,1,0],3)),vu=new pl(0,.5,1,5,1),vu.translate(0,-.5,0)),this.position.copy(t),this.line=new Io(Au,new _o({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Tr(vu,new jn({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,s)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{gu.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(gu,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}},t.Audio=Dh,t.AudioAnalyser=class{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;nthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Zh).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}},t.Box3=Mt,t.Box3Helper=class extends Po{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new hr;r.setIndex(new $n(n,1)),r.setAttribute("position",new nr([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(r,new _o({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}},t.BoxBufferGeometry=class extends Br{constructor(e,t,n,r,i,s){console.warn("THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry."),super(e,t,n,r,i,s)}},t.BoxGeometry=Br,t.BoxHelper=class extends Po{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new hr;i.setIndex(new $n(n,1)),i.setAttribute("position",new $n(r,3)),super(i,new _o({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&mu.setFromObject(this.object),mu.isEmpty())return;const t=mu.min,n=mu.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=t.x,i[4]=n.y,i[5]=n.z,i[6]=t.x,i[7]=t.y,i[8]=n.z,i[9]=n.x,i[10]=t.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=t.z,i[15]=t.x,i[16]=n.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=n.x,i[22]=t.y,i[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}},t.BufferAttribute=$n,t.BufferGeometry=hr,t.BufferGeometryLoader=vh,t.ByteType=1010,t.Cache=Qc,t.Camera=Ur,t.CameraHelper=class extends Po{constructor(e){const t=new hr,n=new _o({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],i=[],s={};function a(e,t){o(e),o(t)}function o(e){r.push(0,0,0),i.push(0,0,0),void 0===s[e]&&(s[e]=[]),s[e].push(r.length/3-1)}a("n1","n2"),a("n2","n4"),a("n4","n3"),a("n3","n1"),a("f1","f2"),a("f2","f4"),a("f4","f3"),a("f3","f1"),a("n1","f1"),a("n2","f2"),a("n3","f3"),a("n4","f4"),a("p","n1"),a("p","n2"),a("p","n3"),a("p","n4"),a("u1","u2"),a("u2","u3"),a("u3","u1"),a("c","t"),a("p","c"),a("cn1","cn2"),a("cn3","cn4"),a("cf1","cf2"),a("cf3","cf4"),t.setAttribute("position",new nr(r,3)),t.setAttribute("color",new nr(i,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=s,this.update();const l=new Vn(16755200),c=new Vn(16711680),h=new Vn(43775),u=new Vn(16777215),d=new Vn(3355443);this.setColors(l,c,h,u,d)}setColors(e,t,n,r,i){const s=this.geometry.getAttribute("color");s.setXYZ(0,e.r,e.g,e.b),s.setXYZ(1,e.r,e.g,e.b),s.setXYZ(2,e.r,e.g,e.b),s.setXYZ(3,e.r,e.g,e.b),s.setXYZ(4,e.r,e.g,e.b),s.setXYZ(5,e.r,e.g,e.b),s.setXYZ(6,e.r,e.g,e.b),s.setXYZ(7,e.r,e.g,e.b),s.setXYZ(8,e.r,e.g,e.b),s.setXYZ(9,e.r,e.g,e.b),s.setXYZ(10,e.r,e.g,e.b),s.setXYZ(11,e.r,e.g,e.b),s.setXYZ(12,e.r,e.g,e.b),s.setXYZ(13,e.r,e.g,e.b),s.setXYZ(14,e.r,e.g,e.b),s.setXYZ(15,e.r,e.g,e.b),s.setXYZ(16,e.r,e.g,e.b),s.setXYZ(17,e.r,e.g,e.b),s.setXYZ(18,e.r,e.g,e.b),s.setXYZ(19,e.r,e.g,e.b),s.setXYZ(20,e.r,e.g,e.b),s.setXYZ(21,e.r,e.g,e.b),s.setXYZ(22,e.r,e.g,e.b),s.setXYZ(23,e.r,e.g,e.b),s.setXYZ(24,t.r,t.g,t.b),s.setXYZ(25,t.r,t.g,t.b),s.setXYZ(26,t.r,t.g,t.b),s.setXYZ(27,t.r,t.g,t.b),s.setXYZ(28,t.r,t.g,t.b),s.setXYZ(29,t.r,t.g,t.b),s.setXYZ(30,t.r,t.g,t.b),s.setXYZ(31,t.r,t.g,t.b),s.setXYZ(32,n.r,n.g,n.b),s.setXYZ(33,n.r,n.g,n.b),s.setXYZ(34,n.r,n.g,n.b),s.setXYZ(35,n.r,n.g,n.b),s.setXYZ(36,n.r,n.g,n.b),s.setXYZ(37,n.r,n.g,n.b),s.setXYZ(38,r.r,r.g,r.b),s.setXYZ(39,r.r,r.g,r.b),s.setXYZ(40,i.r,i.g,i.b),s.setXYZ(41,i.r,i.g,i.b),s.setXYZ(42,i.r,i.g,i.b),s.setXYZ(43,i.r,i.g,i.b),s.setXYZ(44,i.r,i.g,i.b),s.setXYZ(45,i.r,i.g,i.b),s.setXYZ(46,i.r,i.g,i.b),s.setXYZ(47,i.r,i.g,i.b),s.setXYZ(48,i.r,i.g,i.b),s.setXYZ(49,i.r,i.g,i.b),s.needsUpdate=!0}update(){const e=this.geometry,t=this.pointMap;pu.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),fu("c",t,e,pu,0,0,-1),fu("t",t,e,pu,0,0,1),fu("n1",t,e,pu,-1,-1,-1),fu("n2",t,e,pu,1,-1,-1),fu("n3",t,e,pu,-1,1,-1),fu("n4",t,e,pu,1,1,-1),fu("f1",t,e,pu,-1,-1,1),fu("f2",t,e,pu,1,-1,1),fu("f3",t,e,pu,-1,1,1),fu("f4",t,e,pu,1,1,1),fu("u1",t,e,pu,.7,1.1,-1),fu("u2",t,e,pu,-.7,1.1,-1),fu("u3",t,e,pu,0,2,-1),fu("cf1",t,e,pu,-1,0,1),fu("cf2",t,e,pu,1,0,1),fu("cf3",t,e,pu,0,-1,1),fu("cf4",t,e,pu,0,1,1),fu("cn1",t,e,pu,-1,0,-1),fu("cn2",t,e,pu,1,0,-1),fu("cn3",t,e,pu,0,-1,-1),fu("cn4",t,e,pu,0,1,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}},t.CanvasTexture=class extends gt{constructor(e,t,n,r,i,s,a,o,l){super(e,t,n,r,i,s,a,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}},t.CapsuleBufferGeometry=class extends ul{constructor(e,t,n,r){console.warn("THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry."),super(e,t,n,r)}},t.CapsuleGeometry=ul,t.CatmullRomCurve3=Ko,t.CineonToneMapping=m,t.CircleBufferGeometry=class extends dl{constructor(e,t,n,r){console.warn("THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry."),super(e,t,n,r)}},t.CircleGeometry=dl,t.ClampToEdgeWrapping=M,t.Clock=Ch,t.Color=Vn,t.ColorKeyframeTrack=Lc,t.ColorManagement=ht,t.CompressedArrayTexture=class extends zo{constructor(e,t,n,r,i,s){super(e,t,n,i,s),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=M}},t.CompressedTexture=zo,t.CompressedTextureLoader=class extends jc{constructor(e){super(e)}load(e,t,n,r){const i=this,s=[],a=new zo,o=new Yc(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(i.withCredentials);let l=0;function c(c){o.load(e[c],(function(e){const n=i.parse(e,!0);s[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(a.minFilter=B),a.image=s,a.format=n.format,a.needsUpdate=!0,t&&t(a))}),n,r)}if(Array.isArray(e))for(let h=0,u=e.length;h0){const n=new Vc(t);i=new qc(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,i=e.length;t0){r=new qc(this.manager),r.setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t1)for(let c=0;cNumber.EPSILON){if(l<0&&(n=t[s],o=-o,a=t[i],l=-l),e.ya.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-o*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(a.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=a.x)return!0}}return r}const n=Yl.isClockWise,r=this.subPaths;if(0===r.length)return[];let i,s,a;const o=[];if(1===r.length)return s=r[0],a=new El,a.curves=s.curves,o.push(a),o;let l=!n(r[0].getPoints());l=e?!l:l;const c=[],h=[];let u,d,p=[],f=0;h[f]=void 0,p[f]=[];for(let m=0,g=r.length;m1){let e=!1,n=0;for(let t=0,r=h.length;t0&&!1===e&&(p=c)}for(let m=0,g=h.length;m=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}},t.WebGL1Renderer=Ia,t.WebGL3DRenderTarget=class extends vt{constructor(e=1,t=1,n=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new xt(null,e,t,n),this.texture.isRenderTargetTexture=!0}},t.WebGLArrayRenderTarget=class extends vt{constructor(e=1,t=1,n=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new yt(null,e,t,n),this.texture.isRenderTargetTexture=!0}},t.WebGLCubeRenderTarget=zr,t.WebGLMultipleRenderTargets=class extends vt{constructor(e=1,t=1,n=1,r={}){super(e,t,r),this.isWebGLMultipleRenderTargets=!0;const i=this.texture;this.texture=[];for(let s=0;s{"use strict";function r(e){let t=0,n=0;for(const a of e)t+=a.w*a.h,n=Math.max(n,a.w);e.sort(((e,t)=>t.h-e.h));const r=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),n),h:1/0}];let i=0,s=0;for(const a of e)for(let e=r.length-1;e>=0;e--){const t=r[e];if(!(a.w>t.w||a.h>t.h)){if(a.x=t.x,a.y=t.y,s=Math.max(s,a.y+a.h),i=Math.max(i,a.x+a.w),a.w===t.w&&a.h===t.h){const t=r.pop();er})},79224:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ACESFilmicToneMapping:()=>te,AddEquation:()=>S,AddOperation:()=>K,AdditiveAnimationBlendMode:()=>Bt,AdditiveBlending:()=>x,AlphaFormat:()=>De,AlwaysDepth:()=>z,AlwaysStencilFunc:()=>an,AmbientLight:()=>fd,AmbientLightProbe:()=>Rd,AnimationAction:()=>sp,AnimationClip:()=>Nu,AnimationLoader:()=>Xu,AnimationMixer:()=>op,AnimationObjectGroup:()=>ip,AnimationUtils:()=>Mu,ArcCurve:()=>Qc,ArrayCamera:()=>fl,ArrowHelper:()=>Zp,Audio:()=>Vd,AudioAnalyser:()=>qd,AudioContext:()=>Td,AudioListener:()=>Qd,AudioLoader:()=>Id,AxesHelper:()=>$p,BackSide:()=>m,BasicDepthPacking:()=>Ut,BasicShadowMap:()=>h,Bone:()=>rc,BooleanKeyframeTrack:()=>Ru,Box2:()=>yp,Box3:()=>pr,Box3Helper:()=>Xp,BoxBufferGeometry:()=>tf,BoxGeometry:()=>Ss,BoxHelper:()=>Wp,BufferAttribute:()=>Gi,BufferGeometry:()=>is,BufferGeometryLoader:()=>bd,ByteType:()=>_e,Cache:()=>Gu,Camera:()=>Bs,CameraHelper:()=>Vp,CanvasTexture:()=>kc,CapsuleBufferGeometry:()=>nf,CapsuleGeometry:()=>ch,CatmullRomCurve3:()=>Yc,CineonToneMapping:()=>ee,CircleBufferGeometry:()=>rf,CircleGeometry:()=>hh,ClampToEdgeWrapping:()=>he,Clock:()=>Ud,Color:()=>Bi,ColorKeyframeTrack:()=>Pu,ColorManagement:()=>qn,CompressedArrayTexture:()=>Nc,CompressedTexture:()=>Oc,CompressedTextureLoader:()=>Yu,ConeBufferGeometry:()=>sf,ConeGeometry:()=>dh,CubeCamera:()=>Ds,CubeReflectionMapping:()=>ie,CubeRefractionMapping:()=>se,CubeTexture:()=>Ls,CubeTextureLoader:()=>Ku,CubeUVReflectionMapping:()=>le,CubicBezierCurve:()=>Zc,CubicBezierCurve3:()=>$c,CubicInterpolant:()=>Cu,CullFaceBack:()=>o,CullFaceFront:()=>l,CullFaceFrontBack:()=>c,CullFaceNone:()=>a,Curve:()=>Gc,CurvePath:()=>ah,CustomBlending:()=>_,CustomToneMapping:()=>ne,CylinderBufferGeometry:()=>af,CylinderGeometry:()=>uh,Cylindrical:()=>Ap,Data3DTexture:()=>ar,DataArrayTexture:()=>ir,DataTexture:()=>ic,DataTextureLoader:()=>Ju,DataUtils:()=>Oi,DecrementStencilOp:()=>Yt,DecrementWrapStencilOp:()=>Kt,DefaultLoadingManager:()=>Qu,DepthFormat:()=>Oe,DepthStencilFormat:()=>Ne,DepthTexture:()=>vl,DirectionalLight:()=>pd,DirectionalLightHelper:()=>Gp,DiscreteInterpolant:()=>Iu,DisplayP3ColorSpace:()=>Vt,DodecahedronBufferGeometry:()=>of,DodecahedronGeometry:()=>fh,DoubleSide:()=>g,DstAlphaFactor:()=>F,DstColorFactor:()=>O,DynamicCopyUsage:()=>fn,DynamicDrawUsage:()=>ln,DynamicReadUsage:()=>un,EdgesGeometry:()=>yh,EllipseCurve:()=>zc,EqualDepth:()=>H,EqualStencilFunc:()=>en,EquirectangularReflectionMapping:()=>ae,EquirectangularRefractionMapping:()=>oe,Euler:()=>Kr,EventDispatcher:()=>yn,ExtrudeBufferGeometry:()=>lf,ExtrudeGeometry:()=>qh,FileLoader:()=>Wu,Float16BufferAttribute:()=>Yi,Float32BufferAttribute:()=>qi,Float64BufferAttribute:()=>Ki,FloatType:()=>Te,Fog:()=>wl,FogExp2:()=>Ml,FramebufferTexture:()=>Uc,FrontSide:()=>f,Frustum:()=>Qs,GLBufferAttribute:()=>dp,GLSL1:()=>gn,GLSL3:()=>An,GreaterDepth:()=>W,GreaterEqualDepth:()=>j,GreaterEqualStencilFunc:()=>sn,GreaterStencilFunc:()=>nn,GridHelper:()=>Fp,Group:()=>ml,HalfFloatType:()=>Ie,HemisphereLight:()=>ed,HemisphereLightHelper:()=>Lp,HemisphereLightProbe:()=>Bd,IcosahedronBufferGeometry:()=>cf,IcosahedronGeometry:()=>Jh,ImageBitmapLoader:()=>wd,ImageLoader:()=>qu,ImageUtils:()=>Jn,IncrementStencilOp:()=>Xt,IncrementWrapStencilOp:()=>qt,InstancedBufferAttribute:()=>lc,InstancedBufferGeometry:()=>xd,InstancedInterleavedBuffer:()=>up,InstancedMesh:()=>gc,Int16BufferAttribute:()=>Hi,Int32BufferAttribute:()=>Wi,Int8BufferAttribute:()=>zi,IntType:()=>we,InterleavedBuffer:()=>Tl,InterleavedBufferAttribute:()=>Bl,Interpolant:()=>wu,InterpolateDiscrete:()=>_t,InterpolateLinear:()=>St,InterpolateSmooth:()=>Mt,InvertStencilOp:()=>Jt,KeepStencilOp:()=>jt,KeyframeTrack:()=>Bu,LOD:()=>ql,LatheBufferGeometry:()=>hf,LatheGeometry:()=>lh,Layers:()=>Jr,LessDepth:()=>Q,LessEqualDepth:()=>V,LessEqualStencilFunc:()=>tn,LessStencilFunc:()=>$t,Light:()=>$u,LightProbe:()=>Ad,Line:()=>_c,Line3:()=>Ep,LineBasicMaterial:()=>Ac,LineCurve:()=>eh,LineCurve3:()=>th,LineDashedMaterial:()=>vu,LineLoop:()=>Cc,LineSegments:()=>wc,LinearEncoding:()=>Lt,LinearFilter:()=>Ae,LinearInterpolant:()=>Tu,LinearMipMapLinearFilter:()=>be,LinearMipMapNearestFilter:()=>ye,LinearMipmapLinearFilter:()=>xe,LinearMipmapNearestFilter:()=>ve,LinearSRGBColorSpace:()=>Qt,LinearToneMapping:()=>Z,Loader:()=>Vu,LoaderUtils:()=>yd,LoadingManager:()=>zu,LoopOnce:()=>xt,LoopPingPong:()=>Et,LoopRepeat:()=>bt,LuminanceAlphaFormat:()=>Ue,LuminanceFormat:()=>Fe,MOUSE:()=>i,Material:()=>Mi,MaterialLoader:()=>vd,MathUtils:()=>Dn,Matrix3:()=>Fn,Matrix4:()=>Gr,MaxEquation:()=>T,Mesh:()=>Es,MeshBasicMaterial:()=>Pi,MeshDepthMaterial:()=>ll,MeshDistanceMaterial:()=>cl,MeshLambertMaterial:()=>gu,MeshMatcapMaterial:()=>Au,MeshNormalMaterial:()=>mu,MeshPhongMaterial:()=>pu,MeshPhysicalMaterial:()=>du,MeshStandardMaterial:()=>uu,MeshToonMaterial:()=>fu,MinEquation:()=>C,MirroredRepeatWrapping:()=>ue,MixOperation:()=>q,MultiplyBlending:()=>E,MultiplyOperation:()=>Y,NearestFilter:()=>de,NearestMipMapLinearFilter:()=>ge,NearestMipMapNearestFilter:()=>fe,NearestMipmapLinearFilter:()=>me,NearestMipmapNearestFilter:()=>pe,NeverDepth:()=>G,NeverStencilFunc:()=>Zt,NoBlending:()=>v,NoColorSpace:()=>Gt,NoToneMapping:()=>J,NormalAnimationBlendMode:()=>It,NormalBlending:()=>y,NotEqualDepth:()=>X,NotEqualStencilFunc:()=>rn,NumberKeyframeTrack:()=>Du,Object3D:()=>ui,ObjectLoader:()=>Ed,ObjectSpaceNormalMap:()=>kt,OctahedronBufferGeometry:()=>uf,OctahedronGeometry:()=>Zh,OneFactor:()=>B,OneMinusDstAlphaFactor:()=>U,OneMinusDstColorFactor:()=>N,OneMinusSrcAlphaFactor:()=>L,OneMinusSrcColorFactor:()=>P,OrthographicCamera:()=>na,PCFShadowMap:()=>u,PCFSoftShadowMap:()=>d,PMREMGenerator:()=>ua,Path:()=>oh,PerspectiveCamera:()=>Rs,Plane:()=>ks,PlaneBufferGeometry:()=>df,PlaneGeometry:()=>js,PlaneHelper:()=>Yp,PointLight:()=>ud,PointLightHelper:()=>Bp,Points:()=>Dc,PointsMaterial:()=>Tc,PolarGridHelper:()=>Up,PolyhedronBufferGeometry:()=>pf,PolyhedronGeometry:()=>ph,PositionalAudio:()=>Yd,PropertyBinding:()=>rp,PropertyMixer:()=>Kd,QuadraticBezierCurve:()=>nh,QuadraticBezierCurve3:()=>rh,Quaternion:()=>cr,QuaternionKeyframeTrack:()=>Fu,QuaternionLinearInterpolant:()=>Lu,RED_GREEN_RGTC2_Format:()=>vt,RED_RGTC1_Format:()=>gt,REVISION:()=>r,RGBADepthPacking:()=>Ot,RGBAFormat:()=>Le,RGBAIntegerFormat:()=>Ve,RGBA_ASTC_10x10_Format:()=>dt,RGBA_ASTC_10x5_Format:()=>ct,RGBA_ASTC_10x6_Format:()=>ht,RGBA_ASTC_10x8_Format:()=>ut,RGBA_ASTC_12x10_Format:()=>pt,RGBA_ASTC_12x12_Format:()=>ft,RGBA_ASTC_4x4_Format:()=>tt,RGBA_ASTC_5x4_Format:()=>nt,RGBA_ASTC_5x5_Format:()=>rt,RGBA_ASTC_6x5_Format:()=>it,RGBA_ASTC_6x6_Format:()=>st,RGBA_ASTC_8x5_Format:()=>at,RGBA_ASTC_8x6_Format:()=>ot,RGBA_ASTC_8x8_Format:()=>lt,RGBA_BPTC_Format:()=>mt,RGBA_ETC2_EAC_Format:()=>et,RGBA_PVRTC_2BPPV1_Format:()=>Je,RGBA_PVRTC_4BPPV1_Format:()=>Ke,RGBA_S3TC_DXT1_Format:()=>je,RGBA_S3TC_DXT3_Format:()=>We,RGBA_S3TC_DXT5_Format:()=>Xe,RGB_ETC1_Format:()=>Ze,RGB_ETC2_Format:()=>$e,RGB_PVRTC_2BPPV1_Format:()=>qe,RGB_PVRTC_4BPPV1_Format:()=>Ye,RGB_S3TC_DXT1_Format:()=>He,RGFormat:()=>ze,RGIntegerFormat:()=>Qe,RawShaderMaterial:()=>hu,Ray:()=>kr,Raycaster:()=>pp,RectAreaLight:()=>md,RedFormat:()=>ke,RedIntegerFormat:()=>Ge,ReinhardToneMapping:()=>$,RepeatWrapping:()=>ce,ReplaceStencilOp:()=>Wt,ReverseSubtractEquation:()=>w,RingBufferGeometry:()=>ff,RingGeometry:()=>$h,SIGNED_RED_GREEN_RGTC2_Format:()=>yt,SIGNED_RED_RGTC1_Format:()=>At,SRGBColorSpace:()=>zt,Scene:()=>Cl,ShaderChunk:()=>Ws,ShaderLib:()=>Ys,ShaderMaterial:()=>Is,ShadowMaterial:()=>cu,Shape:()=>xh,ShapeBufferGeometry:()=>mf,ShapeGeometry:()=>eu,ShapePath:()=>ef,ShapeUtils:()=>Wh,ShortType:()=>Se,Skeleton:()=>oc,SkeletonHelper:()=>Tp,SkinnedMesh:()=>nc,Source:()=>Zn,Sphere:()=>Rr,SphereBufferGeometry:()=>gf,SphereGeometry:()=>tu,Spherical:()=>gp,SphericalHarmonics3:()=>gd,SplineCurve:()=>ih,SpotLight:()=>ad,SpotLightHelper:()=>Sp,Sprite:()=>jl,SpriteMaterial:()=>Rl,SrcAlphaFactor:()=>D,SrcAlphaSaturateFactor:()=>k,SrcColorFactor:()=>R,StaticCopyUsage:()=>pn,StaticDrawUsage:()=>on,StaticReadUsage:()=>hn,StereoCamera:()=>Fd,StreamCopyUsage:()=>mn,StreamDrawUsage:()=>cn,StreamReadUsage:()=>dn,StringKeyframeTrack:()=>Uu,SubtractEquation:()=>M,SubtractiveBlending:()=>b,TOUCH:()=>s,TangentSpaceNormalMap:()=>Nt,TetrahedronBufferGeometry:()=>Af,TetrahedronGeometry:()=>nu,Texture:()=>tr,TextureLoader:()=>Zu,TorusBufferGeometry:()=>vf,TorusGeometry:()=>ru,TorusKnotBufferGeometry:()=>yf,TorusKnotGeometry:()=>iu,Triangle:()=>_i,TriangleFanDrawMode:()=>Dt,TriangleStripDrawMode:()=>Pt,TrianglesDrawMode:()=>Rt,TubeBufferGeometry:()=>xf,TubeGeometry:()=>su,TwoPassDoubleSide:()=>A,UVMapping:()=>re,Uint16BufferAttribute:()=>ji,Uint32BufferAttribute:()=>Xi,Uint8BufferAttribute:()=>Qi,Uint8ClampedBufferAttribute:()=>Vi,Uniform:()=>lp,UniformsGroup:()=>hp,UniformsLib:()=>Xs,UniformsUtils:()=>Ts,UnsignedByteType:()=>Ee,UnsignedInt248Type:()=>Pe,UnsignedIntType:()=>Ce,UnsignedShort4444Type:()=>Be,UnsignedShort5551Type:()=>Re,UnsignedShortType:()=>Me,VSMShadowMap:()=>p,Vector2:()=>Ln,Vector3:()=>hr,Vector4:()=>nr,VectorKeyframeTrack:()=>Ou,VideoTexture:()=>Fc,WebGL1Renderer:()=>Sl,WebGL3DRenderTarget:()=>or,WebGLArrayRenderTarget:()=>sr,WebGLCubeRenderTarget:()=>Fs,WebGLMultipleRenderTargets:()=>lr,WebGLRenderTarget:()=>rr,WebGLRenderer:()=>_l,WebGLUtils:()=>pl,WireframeGeometry:()=>au,WrapAroundEnding:()=>Tt,ZeroCurvatureEnding:()=>wt,ZeroFactor:()=>I,ZeroSlopeEnding:()=>Ct,ZeroStencilOp:()=>Ht,_SRGBAFormat:()=>vn,sRGBEncoding:()=>Ft});const r="152",i={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},s={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},a=0,o=1,l=2,c=3,h=0,u=1,d=2,p=3,f=0,m=1,g=2,A=2,v=0,y=1,x=2,b=3,E=4,_=5,S=100,M=101,w=102,C=103,T=104,I=200,B=201,R=202,P=203,D=204,L=205,F=206,U=207,O=208,N=209,k=210,G=0,z=1,Q=2,V=3,H=4,j=5,W=6,X=7,Y=0,q=1,K=2,J=0,Z=1,$=2,ee=3,te=4,ne=5,re=300,ie=301,se=302,ae=303,oe=304,le=306,ce=1e3,he=1001,ue=1002,de=1003,pe=1004,fe=1004,me=1005,ge=1005,Ae=1006,ve=1007,ye=1007,xe=1008,be=1008,Ee=1009,_e=1010,Se=1011,Me=1012,we=1013,Ce=1014,Te=1015,Ie=1016,Be=1017,Re=1018,Pe=1020,De=1021,Le=1023,Fe=1024,Ue=1025,Oe=1026,Ne=1027,ke=1028,Ge=1029,ze=1030,Qe=1031,Ve=1033,He=33776,je=33777,We=33778,Xe=33779,Ye=35840,qe=35841,Ke=35842,Je=35843,Ze=36196,$e=37492,et=37496,tt=37808,nt=37809,rt=37810,it=37811,st=37812,at=37813,ot=37814,lt=37815,ct=37816,ht=37817,ut=37818,dt=37819,pt=37820,ft=37821,mt=36492,gt=36283,At=36284,vt=36285,yt=36286,xt=2200,bt=2201,Et=2202,_t=2300,St=2301,Mt=2302,wt=2400,Ct=2401,Tt=2402,It=2500,Bt=2501,Rt=0,Pt=1,Dt=2,Lt=3e3,Ft=3001,Ut=3200,Ot=3201,Nt=0,kt=1,Gt="",zt="srgb",Qt="srgb-linear",Vt="display-p3",Ht=0,jt=7680,Wt=7681,Xt=7682,Yt=7683,qt=34055,Kt=34056,Jt=5386,Zt=512,$t=513,en=514,tn=515,nn=516,rn=517,sn=518,an=519,on=35044,ln=35048,cn=35040,hn=35045,un=35049,dn=35041,pn=35046,fn=35050,mn=35042,gn="100",An="300 es",vn=1035;class yn{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t>8&255]+xn[e>>16&255]+xn[e>>24&255]+"-"+xn[255&t]+xn[t>>8&255]+"-"+xn[t>>16&15|64]+xn[t>>24&255]+"-"+xn[63&n|128]+xn[n>>8&255]+"-"+xn[n>>16&255]+xn[n>>24&255]+xn[255&r]+xn[r>>8&255]+xn[r>>16&255]+xn[r>>24&255]).toLowerCase()}function Mn(e,t,n){return Math.max(t,Math.min(n,e))}function wn(e,t){return(e%t+t)%t}function Cn(e,t,n){return(1-n)*e+n*t}function Tn(e){return 0==(e&e-1)&&0!==e}function In(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function Bn(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function Rn(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function Pn(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const Dn={DEG2RAD:En,RAD2DEG:_n,generateUUID:Sn,clamp:Mn,euclideanModulo:wn,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:Cn,damp:function(e,t,n,r){return Cn(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(wn(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(bn=e);let t=bn+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*En},radToDeg:function(e){return e*_n},isPowerOfTwo:Tn,ceilPowerOfTwo:In,floorPowerOfTwo:Bn,setQuaternionFromProperEuler:function(e,t,n,r,i){const s=Math.cos,a=Math.sin,o=s(n/2),l=a(n/2),c=s((t+r)/2),h=a((t+r)/2),u=s((t-r)/2),d=a((t-r)/2),p=s((r-t)/2),f=a((r-t)/2);switch(i){case"XYX":e.set(o*h,l*u,l*d,o*c);break;case"YZY":e.set(l*d,o*h,l*u,o*c);break;case"ZXZ":e.set(l*u,l*d,o*h,o*c);break;case"XZX":e.set(o*h,l*f,l*p,o*c);break;case"YXY":e.set(l*p,o*h,l*f,o*c);break;case"ZYZ":e.set(l*f,l*p,o*h,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:Pn,denormalize:Rn};class Ln{constructor(e=0,t=0){Ln.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Mn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,s=this.y-e.y;return this.x=i*n-s*r+e.x,this.y=i*r+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Fn{constructor(){Fn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,n,r,i,s,a,o,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=a,c[3]=t,c[4]=i,c[5]=o,c[6]=n,c[7]=s,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,s=n[0],a=n[3],o=n[6],l=n[1],c=n[4],h=n[7],u=n[2],d=n[5],p=n[8],f=r[0],m=r[3],g=r[6],A=r[1],v=r[4],y=r[7],x=r[2],b=r[5],E=r[8];return i[0]=s*f+a*A+o*x,i[3]=s*m+a*v+o*b,i[6]=s*g+a*y+o*E,i[1]=l*f+c*A+h*x,i[4]=l*m+c*v+h*b,i[7]=l*g+c*y+h*E,i[2]=u*f+d*A+p*x,i[5]=u*m+d*v+p*b,i[8]=u*g+d*y+p*E,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8];return t*s*c-t*a*l-n*i*c+n*a*o+r*i*l-r*s*o}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8],h=c*s-a*l,u=a*o-c*i,d=l*i-s*o,p=t*h+n*u+r*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return e[0]=h*f,e[1]=(r*l-c*n)*f,e[2]=(a*n-r*s)*f,e[3]=u*f,e[4]=(c*t-r*o)*f,e[5]=(r*i-a*t)*f,e[6]=d*f,e[7]=(n*o-l*t)*f,e[8]=(s*t-n*i)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,s,a){const o=Math.cos(i),l=Math.sin(i);return this.set(n*o,n*l,-n*(o*s+l*a)+s+e,-r*l,r*o,-r*(-l*s+o*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Un.makeScale(e,t)),this}rotate(e){return this.premultiply(Un.makeRotation(-e)),this}translate(e,t){return this.premultiply(Un.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const Un=new Fn;function On(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const Nn={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function kn(e,t){return new Nn[e](t)}function Gn(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}const zn={};function Qn(e){e in zn||(zn[e]=!0,console.warn(e))}function Vn(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Hn(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const jn=(new Fn).fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),Wn=(new Fn).fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);const Xn={[Qt]:e=>e,[zt]:e=>e.convertSRGBToLinear(),[Vt]:function(e){return e.convertSRGBToLinear().applyMatrix3(Wn)}},Yn={[Qt]:e=>e,[zt]:e=>e.convertLinearToSRGB(),[Vt]:function(e){return e.applyMatrix3(jn).convertLinearToSRGB()}},qn={enabled:!0,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(e){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!e},get workingColorSpace(){return Qt},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,n){if(!1===this.enabled||t===n||!t||!n)return e;const r=Xn[t],i=Yn[n];if(void 0===r||void 0===i)throw new Error(`Unsupported color space conversion, "${t}" to "${n}".`);return i(r(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}};let Kn;class Jn{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Kn&&(Kn=Gn("canvas")),Kn.width=e.width,Kn.height=e.height;const n=Kn.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Kn}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=Gn("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==re)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case ce:e.x=e.x-Math.floor(e.x);break;case he:e.x=e.x<0?0:1;break;case ue:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case ce:e.y=e.y-Math.floor(e.y);break;case he:e.y=e.y<0?0:1;break;case ue:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Qn("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===zt?Ft:Lt}set encoding(e){Qn("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Ft?zt:Gt}}tr.DEFAULT_IMAGE=null,tr.DEFAULT_MAPPING=re,tr.DEFAULT_ANISOTROPY=1;class nr{constructor(e=0,t=0,n=0,r=1){nr.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r+s[12]*i,this.y=s[1]*t+s[5]*n+s[9]*r+s[13]*i,this.z=s[2]*t+s[6]*n+s[10]*r+s[14]*i,this.w=s[3]*t+s[7]*n+s[11]*r+s[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const s=.01,a=.1,o=e.elements,l=o[0],c=o[4],h=o[8],u=o[1],d=o[5],p=o[9],f=o[2],m=o[6],g=o[10];if(Math.abs(c-u)o&&e>A?eA?o=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),s=Math.atan2(i,t*n);e=Math.sin(e*s)/i,a=Math.sin(a*s)/i}const i=a*n;if(o=o*e+u*i,l=l*e+d*i,c=c*e+p*i,h=h*e+f*i,e===1-a){const e=1/Math.sqrt(o*o+l*l+c*c+h*h);o*=e,l*=e,c*=e,h*=e}}e[t]=o,e[t+1]=l,e[t+2]=c,e[t+3]=h}static multiplyQuaternionsFlat(e,t,n,r,i,s){const a=n[r],o=n[r+1],l=n[r+2],c=n[r+3],h=i[s],u=i[s+1],d=i[s+2],p=i[s+3];return e[t]=a*p+c*h+o*d-l*u,e[t+1]=o*p+c*u+l*h-a*d,e[t+2]=l*p+c*d+a*u-o*h,e[t+3]=c*p-a*h-o*u-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const n=e._x,r=e._y,i=e._z,s=e._order,a=Math.cos,o=Math.sin,l=a(n/2),c=a(r/2),h=a(i/2),u=o(n/2),d=o(r/2),p=o(i/2);switch(s){case"XYZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"YXZ":this._x=u*c*h+l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"ZXY":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h-u*d*p;break;case"ZYX":this._x=u*c*h-l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h+u*d*p;break;case"YZX":this._x=u*c*h+l*d*p,this._y=l*d*h+u*c*p,this._z=l*c*p-u*d*h,this._w=l*c*h-u*d*p;break;case"XZY":this._x=u*c*h-l*d*p,this._y=l*d*h-u*c*p,this._z=l*c*p+u*d*h,this._w=l*c*h+u*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],s=t[1],a=t[5],o=t[9],l=t[2],c=t[6],h=t[10],u=n+a+h;if(u>0){const e=.5/Math.sqrt(u+1);this._w=.25/e,this._x=(c-o)*e,this._y=(i-l)*e,this._z=(s-r)*e}else if(n>a&&n>h){const e=2*Math.sqrt(1+n-a-h);this._w=(c-o)/e,this._x=.25*e,this._y=(r+s)/e,this._z=(i+l)/e}else if(a>h){const e=2*Math.sqrt(1+a-n-h);this._w=(i-l)/e,this._x=(r+s)/e,this._y=.25*e,this._z=(o+c)/e}else{const e=2*Math.sqrt(1+h-n-a);this._w=(s-r)/e,this._x=(i+l)/e,this._y=(o+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Mn(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,s=e._w,a=t._x,o=t._y,l=t._z,c=t._w;return this._x=n*c+s*a+r*l-i*o,this._y=r*c+s*o+i*a-n*l,this._z=i*c+s*l+n*o-r*a,this._w=s*c-n*a-r*o-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,s=this._w;let a=s*e._w+n*e._x+r*e._y+i*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=n,this._y=r,this._z=i,this;const o=1-a*a;if(o<=Number.EPSILON){const e=1-t;return this._w=e*s+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(o),c=Math.atan2(l,a),h=Math.sin((1-t)*c)/l,u=Math.sin(t*c)/l;return this._w=s*h+this._w*u,this._x=n*h+this._x*u,this._y=r*h+this._y*u,this._z=i*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class hr{constructor(e=0,t=0,n=0){hr.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(dr.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(dr.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,s=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*s,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*s,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*s,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,s=e.y,a=e.z,o=e.w,l=o*t+s*r-a*n,c=o*n+a*t-i*r,h=o*r+i*n-s*t,u=-i*t-s*n-a*r;return this.x=l*o+u*-i+c*-a-h*-s,this.y=c*o+u*-s+h*-i-l*-a,this.z=h*o+u*-a+l*-s-c*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,s=t.x,a=t.y,o=t.z;return this.x=r*o-i*a,this.y=i*s-n*o,this.z=n*a-r*s,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return ur.copy(this).projectOnVector(e),this.sub(ur)}reflect(e){return this.sub(ur.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(Mn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ur=new hr,dr=new cr;class pr{constructor(e=new hr(1/0,1/0,1/0),t=new hr(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,mr),mr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(_r),Sr.subVectors(this.max,_r),Ar.subVectors(e.a,_r),vr.subVectors(e.b,_r),yr.subVectors(e.c,_r),xr.subVectors(vr,Ar),br.subVectors(yr,vr),Er.subVectors(Ar,yr);let t=[0,-xr.z,xr.y,0,-br.z,br.y,0,-Er.z,Er.y,xr.z,0,-xr.x,br.z,0,-br.x,Er.z,0,-Er.x,-xr.y,xr.x,0,-br.y,br.x,0,-Er.y,Er.x,0];return!!Cr(t,Ar,vr,yr,Sr)&&(t=[1,0,0,0,1,0,0,0,1],!!Cr(t,Ar,vr,yr,Sr)&&(Mr.crossVectors(xr,br),t=[Mr.x,Mr.y,Mr.z],Cr(t,Ar,vr,yr,Sr)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,mr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(mr).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(fr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fr)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const fr=[new hr,new hr,new hr,new hr,new hr,new hr,new hr,new hr],mr=new hr,gr=new pr,Ar=new hr,vr=new hr,yr=new hr,xr=new hr,br=new hr,Er=new hr,_r=new hr,Sr=new hr,Mr=new hr,wr=new hr;function Cr(e,t,n,r,i){for(let s=0,a=e.length-3;s<=a;s+=3){wr.fromArray(e,s);const a=i.x*Math.abs(wr.x)+i.y*Math.abs(wr.y)+i.z*Math.abs(wr.z),o=t.dot(wr),l=n.dot(wr),c=r.dot(wr);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>a)return!1}return!0}const Tr=new pr,Ir=new hr,Br=new hr;class Rr{constructor(e=new hr,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Tr.setFromPoints(e).getCenter(n);let r=0;for(let i=0,s=e.length;ithis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Ir.subVectors(e,this.center);const t=Ir.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(Ir,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(Br.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Ir.copy(e.center).add(Br)),this.expandByPoint(Ir.copy(e.center).sub(Br))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Pr=new hr,Dr=new hr,Lr=new hr,Fr=new hr,Ur=new hr,Or=new hr,Nr=new hr;class kr{constructor(e=new hr,t=new hr(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Pr)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Pr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Pr.copy(this.origin).addScaledVector(this.direction,t),Pr.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Dr.copy(e).add(t).multiplyScalar(.5),Lr.copy(t).sub(e).normalize(),Fr.copy(this.origin).sub(Dr);const i=.5*e.distanceTo(t),s=-this.direction.dot(Lr),a=Fr.dot(this.direction),o=-Fr.dot(Lr),l=Fr.lengthSq(),c=Math.abs(1-s*s);let h,u,d,p;if(c>0)if(h=s*o-a,u=s*a-o,p=i*c,h>=0)if(u>=-p)if(u<=p){const e=1/c;h*=e,u*=e,d=h*(h+s*u+2*a)+u*(s*h+u+2*o)+l}else u=i,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u=-i,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;else u<=-p?(h=Math.max(0,-(-s*i+a)),u=h>0?-i:Math.min(Math.max(-i,-o),i),d=-h*h+u*(u+2*o)+l):u<=p?(h=0,u=Math.min(Math.max(-i,-o),i),d=u*(u+2*o)+l):(h=Math.max(0,-(s*i+a)),u=h>0?i:Math.min(Math.max(-i,-o),i),d=-h*h+u*(u+2*o)+l);else u=s>0?-i:i,h=Math.max(0,-(s*u+a)),d=-h*h+u*(u+2*o)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,h),r&&r.copy(Dr).addScaledVector(Lr,u),d}intersectSphere(e,t){Pr.subVectors(e.center,this.origin);const n=Pr.dot(this.direction),r=Pr.dot(Pr)-n*n,i=e.radius*e.radius;if(r>i)return null;const s=Math.sqrt(i-r),a=n-s,o=n+s;return o<0?null:a<0?this.at(o,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,s,a,o;const l=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,u=this.origin;return l>=0?(n=(e.min.x-u.x)*l,r=(e.max.x-u.x)*l):(n=(e.max.x-u.x)*l,r=(e.min.x-u.x)*l),c>=0?(i=(e.min.y-u.y)*c,s=(e.max.y-u.y)*c):(i=(e.max.y-u.y)*c,s=(e.min.y-u.y)*c),n>s||i>r?null:((i>n||isNaN(n))&&(n=i),(s=0?(a=(e.min.z-u.z)*h,o=(e.max.z-u.z)*h):(a=(e.max.z-u.z)*h,o=(e.min.z-u.z)*h),n>o||a>r?null:((a>n||n!=n)&&(n=a),(o=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,Pr)}intersectTriangle(e,t,n,r,i){Ur.subVectors(t,e),Or.subVectors(n,e),Nr.crossVectors(Ur,Or);let s,a=this.direction.dot(Nr);if(a>0){if(r)return null;s=1}else{if(!(a<0))return null;s=-1,a=-a}Fr.subVectors(this.origin,e);const o=s*this.direction.dot(Or.crossVectors(Fr,Or));if(o<0)return null;const l=s*this.direction.dot(Ur.cross(Fr));if(l<0)return null;if(o+l>a)return null;const c=-s*Fr.dot(Nr);return c<0?null:this.at(c/a,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Gr{constructor(){Gr.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,n,r,i,s,a,o,l,c,h,u,d,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=s,g[9]=a,g[13]=o,g[2]=l,g[6]=c,g[10]=h,g[14]=u,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Gr).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/zr.setFromMatrixColumn(e,0).length(),i=1/zr.setFromMatrixColumn(e,1).length(),s=1/zr.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,i=e.z,s=Math.cos(n),a=Math.sin(n),o=Math.cos(r),l=Math.sin(r),c=Math.cos(i),h=Math.sin(i);if("XYZ"===e.order){const e=s*c,n=s*h,r=a*c,i=a*h;t[0]=o*c,t[4]=-o*h,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-a*o,t[2]=i-e*l,t[6]=r+n*l,t[10]=s*o}else if("YXZ"===e.order){const e=o*c,n=o*h,r=l*c,i=l*h;t[0]=e+i*a,t[4]=r*a-n,t[8]=s*l,t[1]=s*h,t[5]=s*c,t[9]=-a,t[2]=n*a-r,t[6]=i+e*a,t[10]=s*o}else if("ZXY"===e.order){const e=o*c,n=o*h,r=l*c,i=l*h;t[0]=e-i*a,t[4]=-s*h,t[8]=r+n*a,t[1]=n+r*a,t[5]=s*c,t[9]=i-e*a,t[2]=-s*l,t[6]=a,t[10]=s*o}else if("ZYX"===e.order){const e=s*c,n=s*h,r=a*c,i=a*h;t[0]=o*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=o*h,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=a*o,t[10]=s*o}else if("YZX"===e.order){const e=s*o,n=s*l,r=a*o,i=a*l;t[0]=o*c,t[4]=i-e*h,t[8]=r*h+n,t[1]=h,t[5]=s*c,t[9]=-a*c,t[2]=-l*c,t[6]=n*h+r,t[10]=e-i*h}else if("XZY"===e.order){const e=s*o,n=s*l,r=a*o,i=a*l;t[0]=o*c,t[4]=-h,t[8]=l*c,t[1]=e*h+i,t[5]=s*c,t[9]=n*h-r,t[2]=r*h-n,t[6]=a*c,t[10]=i*h+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Vr,e,Hr)}lookAt(e,t,n){const r=this.elements;return Xr.subVectors(e,t),0===Xr.lengthSq()&&(Xr.z=1),Xr.normalize(),jr.crossVectors(n,Xr),0===jr.lengthSq()&&(1===Math.abs(n.z)?Xr.x+=1e-4:Xr.z+=1e-4,Xr.normalize(),jr.crossVectors(n,Xr)),jr.normalize(),Wr.crossVectors(Xr,jr),r[0]=jr.x,r[4]=Wr.x,r[8]=Xr.x,r[1]=jr.y,r[5]=Wr.y,r[9]=Xr.y,r[2]=jr.z,r[6]=Wr.z,r[10]=Xr.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,s=n[0],a=n[4],o=n[8],l=n[12],c=n[1],h=n[5],u=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],A=n[3],v=n[7],y=n[11],x=n[15],b=r[0],E=r[4],_=r[8],S=r[12],M=r[1],w=r[5],C=r[9],T=r[13],I=r[2],B=r[6],R=r[10],P=r[14],D=r[3],L=r[7],F=r[11],U=r[15];return i[0]=s*b+a*M+o*I+l*D,i[4]=s*E+a*w+o*B+l*L,i[8]=s*_+a*C+o*R+l*F,i[12]=s*S+a*T+o*P+l*U,i[1]=c*b+h*M+u*I+d*D,i[5]=c*E+h*w+u*B+d*L,i[9]=c*_+h*C+u*R+d*F,i[13]=c*S+h*T+u*P+d*U,i[2]=p*b+f*M+m*I+g*D,i[6]=p*E+f*w+m*B+g*L,i[10]=p*_+f*C+m*R+g*F,i[14]=p*S+f*T+m*P+g*U,i[3]=A*b+v*M+y*I+x*D,i[7]=A*E+v*w+y*B+x*L,i[11]=A*_+v*C+y*R+x*F,i[15]=A*S+v*T+y*P+x*U,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],s=e[1],a=e[5],o=e[9],l=e[13],c=e[2],h=e[6],u=e[10],d=e[14];return e[3]*(+i*o*h-r*l*h-i*a*u+n*l*u+r*a*d-n*o*d)+e[7]*(+t*o*d-t*l*u+i*s*u-r*s*d+r*l*c-i*o*c)+e[11]*(+t*l*h-t*a*d-i*s*h+n*s*d+i*a*c-n*l*c)+e[15]*(-r*a*c-t*o*h+t*a*u+r*s*h-n*s*u+n*o*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],s=e[4],a=e[5],o=e[6],l=e[7],c=e[8],h=e[9],u=e[10],d=e[11],p=e[12],f=e[13],m=e[14],g=e[15],A=h*m*l-f*u*l+f*o*d-a*m*d-h*o*g+a*u*g,v=p*u*l-c*m*l-p*o*d+s*m*d+c*o*g-s*u*g,y=c*f*l-p*h*l+p*a*d-s*f*d-c*a*g+s*h*g,x=p*h*o-c*f*o-p*a*u+s*f*u+c*a*m-s*h*m,b=t*A+n*v+r*y+i*x;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const E=1/b;return e[0]=A*E,e[1]=(f*u*i-h*m*i-f*r*d+n*m*d+h*r*g-n*u*g)*E,e[2]=(a*m*i-f*o*i+f*r*l-n*m*l-a*r*g+n*o*g)*E,e[3]=(h*o*i-a*u*i-h*r*l+n*u*l+a*r*d-n*o*d)*E,e[4]=v*E,e[5]=(c*m*i-p*u*i+p*r*d-t*m*d-c*r*g+t*u*g)*E,e[6]=(p*o*i-s*m*i-p*r*l+t*m*l+s*r*g-t*o*g)*E,e[7]=(s*u*i-c*o*i+c*r*l-t*u*l-s*r*d+t*o*d)*E,e[8]=y*E,e[9]=(p*h*i-c*f*i-p*n*d+t*f*d+c*n*g-t*h*g)*E,e[10]=(s*f*i-p*a*i+p*n*l-t*f*l-s*n*g+t*a*g)*E,e[11]=(c*a*i-s*h*i-c*n*l+t*h*l+s*n*d-t*a*d)*E,e[12]=x*E,e[13]=(c*f*r-p*h*r+p*n*u-t*f*u-c*n*m+t*h*m)*E,e[14]=(p*a*r-s*f*r-p*n*o+t*f*o+s*n*m-t*a*m)*E,e[15]=(s*h*r-c*a*r+c*n*o-t*h*o-s*n*u+t*a*u)*E,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,s=e.x,a=e.y,o=e.z,l=i*s,c=i*a;return this.set(l*s+n,l*a-r*o,l*o+r*a,0,l*a+r*o,c*a+n,c*o-r*s,0,l*o-r*a,c*o+r*s,i*o*o+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,s){return this.set(1,n,i,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,s=t._y,a=t._z,o=t._w,l=i+i,c=s+s,h=a+a,u=i*l,d=i*c,p=i*h,f=s*c,m=s*h,g=a*h,A=o*l,v=o*c,y=o*h,x=n.x,b=n.y,E=n.z;return r[0]=(1-(f+g))*x,r[1]=(d+y)*x,r[2]=(p-v)*x,r[3]=0,r[4]=(d-y)*b,r[5]=(1-(u+g))*b,r[6]=(m+A)*b,r[7]=0,r[8]=(p+v)*E,r[9]=(m-A)*E,r[10]=(1-(u+f))*E,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=zr.set(r[0],r[1],r[2]).length();const s=zr.set(r[4],r[5],r[6]).length(),a=zr.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],Qr.copy(this);const o=1/i,l=1/s,c=1/a;return Qr.elements[0]*=o,Qr.elements[1]*=o,Qr.elements[2]*=o,Qr.elements[4]*=l,Qr.elements[5]*=l,Qr.elements[6]*=l,Qr.elements[8]*=c,Qr.elements[9]*=c,Qr.elements[10]*=c,t.setFromRotationMatrix(Qr),n.x=i,n.y=s,n.z=a,this}makePerspective(e,t,n,r,i,s){const a=this.elements,o=2*i/(t-e),l=2*i/(n-r),c=(t+e)/(t-e),h=(n+r)/(n-r),u=-(s+i)/(s-i),d=-2*s*i/(s-i);return a[0]=o,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=l,a[9]=h,a[13]=0,a[2]=0,a[6]=0,a[10]=u,a[14]=d,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,i,s){const a=this.elements,o=1/(t-e),l=1/(n-r),c=1/(s-i),h=(t+e)*o,u=(n+r)*l,d=(s+i)*c;return a[0]=2*o,a[4]=0,a[8]=0,a[12]=-h,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-u,a[2]=0,a[6]=0,a[10]=-2*c,a[14]=-d,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const zr=new hr,Qr=new Gr,Vr=new hr(0,0,0),Hr=new hr(1,1,1),jr=new hr,Wr=new hr,Xr=new hr,Yr=new Gr,qr=new cr;class Kr{constructor(e=0,t=0,n=0,r=Kr.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],s=r[4],a=r[8],o=r[1],l=r[5],c=r[9],h=r[2],u=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(Mn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-s,i)):(this._x=Math.atan2(u,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Mn(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(a,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-h,i),this._z=0);break;case"ZXY":this._x=Math.asin(Mn(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-Mn(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(u,d),this._z=Math.atan2(o,i)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(Mn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-h,i)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-Mn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(u,l),this._y=Math.atan2(a,i)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Yr.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Yr,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return qr.setFromEuler(this),this.setFromQuaternion(qr,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Kr.DEFAULT_ORDER="XYZ";class Jr{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(n=n.concat(i))}return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ri,e,ii),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ri,si,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),a.length>0&&(n.images=a),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),h.length>0&&(n.nodes=h)}return n.object=r,n;function s(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let n=0;n0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){di.subVectors(r,t),pi.subVectors(n,t),fi.subVectors(e,t);const s=di.dot(di),a=di.dot(pi),o=di.dot(fi),l=pi.dot(pi),c=pi.dot(fi),h=s*l-a*a;if(0===h)return i.set(-2,-1,-1);const u=1/h,d=(l*o-a*c)*u,p=(s*c-a*o)*u;return i.set(1-d-p,p,d)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,mi),mi.x>=0&&mi.y>=0&&mi.x+mi.y<=1}static getUV(e,t,n,r,i,s,a,o){return!1===Ei&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ei=!0),this.getInterpolation(e,t,n,r,i,s,a,o)}static getInterpolation(e,t,n,r,i,s,a,o){return this.getBarycoord(e,t,n,r,mi),o.setScalar(0),o.addScaledVector(i,mi.x),o.addScaledVector(s,mi.y),o.addScaledVector(a,mi.z),o}static isFrontFacing(e,t,n,r){return di.subVectors(n,t),pi.subVectors(e,t),di.cross(pi).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return di.subVectors(this.c,this.b),pi.subVectors(this.a,this.b),.5*di.cross(pi).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return _i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return _i.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return!1===Ei&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ei=!0),_i.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}getInterpolation(e,t,n,r,i){return _i.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return _i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return _i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let s,a;gi.subVectors(r,n),Ai.subVectors(i,n),yi.subVectors(e,n);const o=gi.dot(yi),l=Ai.dot(yi);if(o<=0&&l<=0)return t.copy(n);xi.subVectors(e,r);const c=gi.dot(xi),h=Ai.dot(xi);if(c>=0&&h<=c)return t.copy(r);const u=o*h-c*l;if(u<=0&&o>=0&&c<=0)return s=o/(o-c),t.copy(n).addScaledVector(gi,s);bi.subVectors(e,i);const d=gi.dot(bi),p=Ai.dot(bi);if(p>=0&&d<=p)return t.copy(i);const f=d*l-o*p;if(f<=0&&l>=0&&p<=0)return a=l/(l-p),t.copy(n).addScaledVector(Ai,a);const m=c*p-d*h;if(m<=0&&h-c>=0&&d-p>=0)return vi.subVectors(i,r),a=(h-c)/(h-c+(d-p)),t.copy(r).addScaledVector(vi,a);const g=1/(m+f+u);return s=f*g,a=u*g,t.copy(n).addScaledVector(gi,s).addScaledVector(Ai,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Si=0;class Mi extends yn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Si++}),this.uuid=Sn(),this.name="",this.type="Material",this.blending=y,this.side=f,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=D,this.blendDst=L,this.blendEquation=S,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=V,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=an,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=jt,this.stencilZFail=jt,this.stencilZPass=jt,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==y&&(n.blending=this.blending),this.side!==f&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.forceSinglePass&&(n.forceSinglePass=this.forceSinglePass),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}const wi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ci={h:0,s:0,l:0},Ti={h:0,s:0,l:0};function Ii(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}class Bi{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=zt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,qn.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r=qn.workingColorSpace){return this.r=e,this.g=t,this.b=n,qn.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r=qn.workingColorSpace){if(e=wn(e,1),t=Mn(t,0,1),n=Mn(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Ii(i,r,e+1/3),this.g=Ii(i,r,e),this.b=Ii(i,r,e-1/3)}return qn.toWorkingColorSpace(this,r),this}setStyle(e,t=zt){function n(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i;const s=r[1],a=r[2];switch(s){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const n=r[1],i=n.length;if(3===i)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===i)return this.setHex(parseInt(n,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=zt){const n=wi[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Vn(e.r),this.g=Vn(e.g),this.b=Vn(e.b),this}copyLinearToSRGB(e){return this.r=Hn(e.r),this.g=Hn(e.g),this.b=Hn(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=zt){return qn.fromWorkingColorSpace(Ri.copy(this),e),65536*Math.round(Mn(255*Ri.r,0,255))+256*Math.round(Mn(255*Ri.g,0,255))+Math.round(Mn(255*Ri.b,0,255))}getHexString(e=zt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=qn.workingColorSpace){qn.fromWorkingColorSpace(Ri.copy(this),t);const n=Ri.r,r=Ri.g,i=Ri.b,s=Math.max(n,r,i),a=Math.min(n,r,i);let o,l;const c=(a+s)/2;if(a===s)o=0,l=0;else{const e=s-a;switch(l=c<=.5?e/(s+a):e/(2-s-a),s){case n:o=(r-i)/e+(r>-e-14,r[256|l]=1024>>-e-14|32768,i[l]=-e-1,i[256|l]=-e-1):e<=15?(r[l]=e+15<<10,r[256|l]=e+15<<10|32768,i[l]=13,i[256|l]=13):e<128?(r[l]=31744,r[256|l]=64512,i[l]=24,i[256|l]=24):(r[l]=31744,r[256|l]=64512,i[l]=13,i[256|l]=13)}const s=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let l=1;l<1024;++l){let e=l<<13,t=0;for(;0==(8388608&e);)e<<=1,t-=8388608;e&=-8388609,t+=947912704,s[l]=e|t}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)a[l]=l<<23;a[31]=1199570944,a[32]=2147483648;for(let l=33;l<63;++l)a[l]=2147483648+(l-32<<23);a[63]=3347054592;for(let l=1;l<64;++l)32!==l&&(o[l]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:s,exponentTable:a,offsetTable:o}}function Fi(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=Mn(e,-65504,65504),Di.floatView[0]=e;const t=Di.uint32View[0],n=t>>23&511;return Di.baseTable[n]+((8388607&t)>>Di.shiftTable[n])}function Ui(e){const t=e>>10;return Di.uint32View[0]=Di.mantissaTable[Di.offsetTable[t]+(1023&e)]+Di.exponentTable[t],Di.floatView[0]}const Oi={toHalfFloat:Fi,fromHalfFloat:Ui},Ni=new hr,ki=new Ln;class Gi{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=on,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const o in n){const t=n[o];e.data.attributes[o]=t.toJSON(e.data)}const r={};let i=!1;for(const o in this.morphAttributes){const t=this.morphAttributes[o],n=[];for(let r=0,i=t.length;r0&&(r[o]=n,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const s=this.groups;s.length>0&&(e.data.groups=JSON.parse(JSON.stringify(s)));const a=this.boundingSphere;return null!==a&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const l in r){const e=r[l];this.setAttribute(l,e.clone(t))}const i=e.morphAttributes;for(const l in i){const e=[],n=i[l];for(let r=0,i=n.length;r0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e(e.far-e.near)**2)return}ss.copy(i).invert(),as.copy(e.ray).applyMatrix4(ss),null!==n.boundingBox&&!1===as.intersectsBox(n.boundingBox)||this._computeIntersections(e,t)}}_computeIntersections(e,t){let n;const r=this.geometry,i=this.material,s=r.index,a=r.attributes.position,o=r.attributes.uv,l=r.attributes.uv1,c=r.attributes.normal,h=r.groups,u=r.drawRange;if(null!==s)if(Array.isArray(i))for(let d=0,p=h.length;dn.far?null:{distance:c,point:bs.clone(),object:e}}(e,t,n,r,cs,hs,us,xs);if(h){i&&(fs.fromBufferAttribute(i,o),ms.fromBufferAttribute(i,l),gs.fromBufferAttribute(i,c),h.uv=_i.getInterpolation(xs,cs,hs,us,fs,ms,gs,new Ln)),s&&(fs.fromBufferAttribute(s,o),ms.fromBufferAttribute(s,l),gs.fromBufferAttribute(s,c),h.uv1=_i.getInterpolation(xs,cs,hs,us,fs,ms,gs,new Ln),h.uv2=h.uv1),a&&(As.fromBufferAttribute(a,o),vs.fromBufferAttribute(a,l),ys.fromBufferAttribute(a,c),h.normal=_i.getInterpolation(xs,cs,hs,us,As,vs,ys,new hr),h.normal.dot(r.direction)>0&&h.normal.multiplyScalar(-1));const e={a:o,b:l,c:c,normal:new hr,materialIndex:0};_i.getNormal(cs,hs,us,e.normal),h.face=e}return h}class Ss extends is{constructor(e=1,t=1,n=1,r=1,i=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:s};const a=this;r=Math.floor(r),i=Math.floor(i),s=Math.floor(s);const o=[],l=[],c=[],h=[];let u=0,d=0;function p(e,t,n,r,i,s,p,f,m,g,A){const v=s/m,y=p/g,x=s/2,b=p/2,E=f/2,_=m+1,S=g+1;let M=0,w=0;const C=new hr;for(let a=0;a0?1:-1,c.push(C.x,C.y,C.z),h.push(o/m),h.push(1-a/g),M+=1}}for(let a=0;a0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const r in this.extensions)!0===this.extensions[r]&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class Bs extends ui{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Gr,this.projectionMatrix=new Gr,this.projectionMatrixInverse=new Gr}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class Rs extends Bs{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*_n*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*En*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*_n*Math.atan(Math.tan(.5*En*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,s){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*En*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const s=this.view;if(null!==this.view&&this.view.enabled){const e=s.fullWidth,a=s.fullHeight;i+=s.offsetX*r/e,t-=s.offsetY*n/a,r*=s.width/e,n*=s.height/a}const a=this.filmOffset;0!==a&&(i+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Ps=-90;class Ds extends ui{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n;const r=new Rs(Ps,1,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(1,0,0),this.add(r);const i=new Rs(Ps,1,e,t);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(-1,0,0),this.add(i);const s=new Rs(Ps,1,e,t);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(0,1,0),this.add(s);const a=new Rs(Ps,1,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);const o=new Rs(Ps,1,e,t);o.layers=this.layers,o.up.set(0,1,0),o.lookAt(0,0,1),this.add(o);const l=new Rs(Ps,1,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,-1),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,s,a,o,l]=this.children,c=e.getRenderTarget(),h=e.toneMapping,u=e.xr.enabled;e.toneMapping=J,e.xr.enabled=!1;const d=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,s),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,o),n.texture.generateMipmaps=d,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(c),e.toneMapping=h,e.xr.enabled=u,n.texture.needsPMREMUpdate=!0}}class Ls extends tr{constructor(e,t,n,r,i,s,a,o,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:ie,n,r,i,s,a,o,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Fs extends rr{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];void 0!==t.encoding&&(Qn("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===Ft?zt:Gt),this.texture=new Ls(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:Ae}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new Ss(5,5,5),i=new Is({name:"CubemapFromEquirect",uniforms:Ms(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:m,blending:v});i.uniforms.tEquirect.value=t;const s=new Es(r,i),a=t.minFilter;t.minFilter===xe&&(t.minFilter=Ae);return new Ds(1,10,this).update(e,s),t.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(t,n,r);e.setRenderTarget(i)}}const Us=new hr,Os=new hr,Ns=new Fn;class ks{constructor(e=new hr(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=Us.subVectors(n,t).cross(Os.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(Us),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||Ns.getNormalMatrix(e),r=this.coplanarPoint(Us).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const Gs=new Rr,zs=new hr;class Qs{constructor(e=new ks,t=new ks,n=new ks,r=new ks,i=new ks,s=new ks){this.planes=[e,t,n,r,i,s]}set(e,t,n,r,i,s){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(i),a[5].copy(s),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],s=n[2],a=n[3],o=n[4],l=n[5],c=n[6],h=n[7],u=n[8],d=n[9],p=n[10],f=n[11],m=n[12],g=n[13],A=n[14],v=n[15];return t[0].setComponents(a-r,h-o,f-u,v-m).normalize(),t[1].setComponents(a+r,h+o,f+u,v+m).normalize(),t[2].setComponents(a+i,h+l,f+d,v+g).normalize(),t[3].setComponents(a-i,h-l,f-d,v-g).normalize(),t[4].setComponents(a-s,h-c,f-p,v-A).normalize(),t[5].setComponents(a+s,h+c,f+p,v+A).normalize(),this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),Gs.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),Gs.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Gs)}intersectsSprite(e){return Gs.center.set(0,0,0),Gs.radius=.7071067811865476,Gs.applyMatrix4(e.matrixWorld),this.intersectsSphere(Gs)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let i=0;i<6;i++){if(t[i].distanceToPoint(n)0?e.max.x:e.min.x,zs.y=r.normal.y>0?e.max.y:e.min.y,zs.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(zs)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Vs(){let e=null,t=!1,n=null,r=null;function i(t,s){n(t,s),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Hs(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, vMapUv );\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_NORMALMAP_TANGENTSPACE\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal, vNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#ifdef USE_UV\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},Xs={common:{diffuse:{value:new Bi(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Fn},alphaMap:{value:null},alphaMapTransform:{value:new Fn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Fn}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Fn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Fn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Fn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Fn},normalScale:{value:new Ln(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Fn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Fn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Fn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Fn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Bi(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Bi(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Fn}},sprite:{diffuse:{value:new Bi(16777215)},opacity:{value:1},center:{value:new Ln(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Fn},alphaMap:{value:null},alphaTest:{value:0}}},Ys={basic:{uniforms:ws([Xs.common,Xs.specularmap,Xs.envmap,Xs.aomap,Xs.lightmap,Xs.fog]),vertexShader:Ws.meshbasic_vert,fragmentShader:Ws.meshbasic_frag},lambert:{uniforms:ws([Xs.common,Xs.specularmap,Xs.envmap,Xs.aomap,Xs.lightmap,Xs.emissivemap,Xs.bumpmap,Xs.normalmap,Xs.displacementmap,Xs.fog,Xs.lights,{emissive:{value:new Bi(0)}}]),vertexShader:Ws.meshlambert_vert,fragmentShader:Ws.meshlambert_frag},phong:{uniforms:ws([Xs.common,Xs.specularmap,Xs.envmap,Xs.aomap,Xs.lightmap,Xs.emissivemap,Xs.bumpmap,Xs.normalmap,Xs.displacementmap,Xs.fog,Xs.lights,{emissive:{value:new Bi(0)},specular:{value:new Bi(1118481)},shininess:{value:30}}]),vertexShader:Ws.meshphong_vert,fragmentShader:Ws.meshphong_frag},standard:{uniforms:ws([Xs.common,Xs.envmap,Xs.aomap,Xs.lightmap,Xs.emissivemap,Xs.bumpmap,Xs.normalmap,Xs.displacementmap,Xs.roughnessmap,Xs.metalnessmap,Xs.fog,Xs.lights,{emissive:{value:new Bi(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ws.meshphysical_vert,fragmentShader:Ws.meshphysical_frag},toon:{uniforms:ws([Xs.common,Xs.aomap,Xs.lightmap,Xs.emissivemap,Xs.bumpmap,Xs.normalmap,Xs.displacementmap,Xs.gradientmap,Xs.fog,Xs.lights,{emissive:{value:new Bi(0)}}]),vertexShader:Ws.meshtoon_vert,fragmentShader:Ws.meshtoon_frag},matcap:{uniforms:ws([Xs.common,Xs.bumpmap,Xs.normalmap,Xs.displacementmap,Xs.fog,{matcap:{value:null}}]),vertexShader:Ws.meshmatcap_vert,fragmentShader:Ws.meshmatcap_frag},points:{uniforms:ws([Xs.points,Xs.fog]),vertexShader:Ws.points_vert,fragmentShader:Ws.points_frag},dashed:{uniforms:ws([Xs.common,Xs.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ws.linedashed_vert,fragmentShader:Ws.linedashed_frag},depth:{uniforms:ws([Xs.common,Xs.displacementmap]),vertexShader:Ws.depth_vert,fragmentShader:Ws.depth_frag},normal:{uniforms:ws([Xs.common,Xs.bumpmap,Xs.normalmap,Xs.displacementmap,{opacity:{value:1}}]),vertexShader:Ws.meshnormal_vert,fragmentShader:Ws.meshnormal_frag},sprite:{uniforms:ws([Xs.sprite,Xs.fog]),vertexShader:Ws.sprite_vert,fragmentShader:Ws.sprite_frag},background:{uniforms:{uvTransform:{value:new Fn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ws.background_vert,fragmentShader:Ws.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Ws.backgroundCube_vert,fragmentShader:Ws.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ws.cube_vert,fragmentShader:Ws.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ws.equirect_vert,fragmentShader:Ws.equirect_frag},distanceRGBA:{uniforms:ws([Xs.common,Xs.displacementmap,{referencePosition:{value:new hr},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ws.distanceRGBA_vert,fragmentShader:Ws.distanceRGBA_frag},shadow:{uniforms:ws([Xs.lights,Xs.fog,{color:{value:new Bi(0)},opacity:{value:1}}]),vertexShader:Ws.shadow_vert,fragmentShader:Ws.shadow_frag}};Ys.physical={uniforms:ws([Ys.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Fn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Fn},clearcoatNormalScale:{value:new Ln(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Fn},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Fn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Fn},sheen:{value:0},sheenColor:{value:new Bi(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Fn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Fn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Fn},transmissionSamplerSize:{value:new Ln},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Fn},attenuationDistance:{value:0},attenuationColor:{value:new Bi(0)},specularColor:{value:new Bi(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Fn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Fn}}]),vertexShader:Ws.meshphysical_vert,fragmentShader:Ws.meshphysical_frag};const qs={r:0,b:0,g:0};function Ks(e,t,n,r,i,s,a){const o=new Bi(0);let l,c,h=!0===s?0:1,u=null,d=0,p=null;function g(t,n){t.getRGB(qs,Cs(e)),r.buffers.color.setClear(qs.r,qs.g,qs.b,n,a)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),h=t,g(o,h)},getClearAlpha:function(){return h},setClearAlpha:function(e){h=e,g(o,h)},render:function(s,A){let v=!1,y=!0===A.isScene?A.background:null;if(y&&y.isTexture){y=(A.backgroundBlurriness>0?n:t).get(y)}switch(null===y?g(o,h):y&&y.isColor&&(g(y,1),v=!0),e.xr.getEnvironmentBlendMode()){case"opaque":v=!0;break;case"additive":r.buffers.color.setClear(0,0,0,1,a),v=!0;break;case"alpha-blend":r.buffers.color.setClear(0,0,0,0,a),v=!0}(e.autoClear||v)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),y&&(y.isCubeTexture||y.mapping===le)?(void 0===c&&(c=new Es(new Ss(1,1,1),new Is({name:"BackgroundCubeMaterial",uniforms:Ms(Ys.backgroundCube.uniforms),vertexShader:Ys.backgroundCube.vertexShader,fragmentShader:Ys.backgroundCube.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(c)),c.material.uniforms.envMap.value=y,c.material.uniforms.flipEnvMap.value=y.isCubeTexture&&!1===y.isRenderTargetTexture?-1:1,c.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,c.material.toneMapped=y.colorSpace!==zt,u===y&&d===y.version&&p===e.toneMapping||(c.material.needsUpdate=!0,u=y,d=y.version,p=e.toneMapping),c.layers.enableAll(),s.unshift(c,c.geometry,c.material,0,0,null)):y&&y.isTexture&&(void 0===l&&(l=new Es(new js(2,2),new Is({name:"BackgroundMaterial",uniforms:Ms(Ys.background.uniforms),vertexShader:Ys.background.vertexShader,fragmentShader:Ys.background.fragmentShader,side:f,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=y,l.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,l.material.toneMapped=y.colorSpace!==zt,!0===y.matrixAutoUpdate&&y.updateMatrix(),l.material.uniforms.uvTransform.value.copy(y.matrix),u===y&&d===y.version&&p===e.toneMapping||(l.material.needsUpdate=!0,u=y,d=y.version,p=e.toneMapping),l.layers.enableAll(),s.unshift(l,l.geometry,l.material,0,0,null))}}}function Js(e,t,n,r){const i=e.getParameter(e.MAX_VERTEX_ATTRIBS),s=r.isWebGL2?null:t.get("OES_vertex_array_object"),a=r.isWebGL2||null!==s,o={},l=p(null);let c=l,h=!1;function u(t){return r.isWebGL2?e.bindVertexArray(t):s.bindVertexArrayOES(t)}function d(t){return r.isWebGL2?e.deleteVertexArray(t):s.deleteVertexArrayOES(t)}function p(e){const t=[],n=[],r=[];for(let s=0;s=0){const t=i[l];let n=s[l];if(void 0===n&&("instanceMatrix"===l&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===l&&e.instanceColor&&(n=e.instanceColor)),void 0===t)return!0;if(t.attribute!==n)return!0;if(n&&t.data!==n.data)return!0;a++}}return c.attributesNum!==a||c.index!==r}(i,y,d,x),b&&function(e,t,n,r){const i={},s=t.attributes;let a=0;const o=n.getAttributes();for(const l in o){if(o[l].location>=0){let t=s[l];void 0===t&&("instanceMatrix"===l&&e.instanceMatrix&&(t=e.instanceMatrix),"instanceColor"===l&&e.instanceColor&&(t=e.instanceColor));const n={};n.attribute=t,t&&t.data&&(n.data=t.data),i[l]=n,a++}}c.attributes=i,c.attributesNum=a,c.index=r}(i,y,d,x)}else{const e=!0===l.wireframe;c.geometry===y.id&&c.program===d.id&&c.wireframe===e||(c.geometry=y.id,c.program=d.id,c.wireframe=e,b=!0)}null!==x&&n.update(x,e.ELEMENT_ARRAY_BUFFER),(b||h)&&(h=!1,function(i,s,a,o){if(!1===r.isWebGL2&&(i.isInstancedMesh||o.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const l=o.attributes,c=a.getAttributes(),h=s.defaultAttributeValues;for(const t in c){const r=c[t];if(r.location>=0){let s=l[t];if(void 0===s&&("instanceMatrix"===t&&i.instanceMatrix&&(s=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(s=i.instanceColor)),void 0!==s){const t=s.normalized,a=s.itemSize,l=n.get(s);if(void 0===l)continue;const c=l.buffer,h=l.type,u=l.bytesPerElement;if(s.isInterleavedBufferAttribute){const n=s.data,l=n.stride,d=s.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const s="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===e.constructor.name;let a=void 0!==n.precision?n.precision:"highp";const o=i(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);const l=s||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,h=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),u=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),m=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),g=e.getParameter(e.MAX_VARYING_VECTORS),A=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),v=u>0,y=s||t.has("OES_texture_float");return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:a,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:u,maxTextureSize:d,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:A,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:s?e.getParameter(e.MAX_SAMPLES):0}}function ea(e){const t=this;let n=null,r=0,i=!1,s=!1;const a=new ks,o=new Fn,l={value:null,needsUpdate:!1};function c(e,n,r,i){const s=null!==e?e.length:0;let c=null;if(0!==s){if(c=l.value,!0!==i||null===c){const t=r+4*s,i=n.matrixWorldInverse;o.getNormalMatrix(i),(null===c||c.length0);t.numPlanes=r,t.numIntersection=0}();else{const e=s?0:r,t=4*e;let i=f.clippingState||null;l.value=i,i=c(u,o,t,h);for(let r=0;r!==t;++r)i[r]=n[r];f.clippingState=i,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=e}}}function ta(e){let t=new WeakMap;function n(e,t){return t===ae?e.mapping=ie:t===oe&&(e.mapping=se),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const s=i.mapping;if(s===ae||s===oe){if(t.has(i)){return n(t.get(i).texture,i.mapping)}{const s=i.image;if(s&&s.height>0){const a=new Fs(s.height/2);return a.fromEquirectangularTexture(e,i),t.set(i,a),i.addEventListener("dispose",r),n(a.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}class na extends Bs{constructor(e=-1,t=1,n=1,r=-1,i=.1,s=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,s){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,s=n+e,a=r+t,o=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,s=i+e*this.view.width,a-=t*this.view.offsetY,o=a-t*this.view.height}this.projectionMatrix.makeOrthographic(i,s,a,o,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const ra=[.125,.215,.35,.446,.526,.582],ia=20,sa=new na,aa=new Bi;let oa=null;const la=(1+Math.sqrt(5))/2,ca=1/la,ha=[new hr(1,1,1),new hr(-1,1,1),new hr(1,1,-1),new hr(-1,1,-1),new hr(0,la,ca),new hr(0,la,-ca),new hr(ca,0,la),new hr(-ca,0,la),new hr(la,ca,0),new hr(-la,ca,0)];class ua{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){oa=this._renderer.getRenderTarget(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=ma(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=fa(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?o=ra[a-e+4-1]:0===a&&(o=0),r.push(o);const l=1/(s-2),c=-l,h=1+l,u=[c,c,h,c,h,h,c,c,h,h,c,h],d=6,p=6,f=3,m=2,g=1,A=new Float32Array(f*p*d),v=new Float32Array(m*p*d),y=new Float32Array(g*p*d);for(let e=0;e2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];A.set(r,f*p*e),v.set(u,m*p*e);const i=[e,e,e,e,e,e];y.set(i,g*p*e)}const x=new is;x.setAttribute("position",new Gi(A,f)),x.setAttribute("uv",new Gi(v,m)),x.setAttribute("faceIndex",new Gi(y,g)),t.push(x),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){const r=new Float32Array(ia),i=new hr(0,1,0),s=new Is({name:"SphericalGaussianBlur",defines:{n:ia,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:ga(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:v,depthTest:!1,depthWrite:!1});return s}(r,e,t)}return r}_compileMaterial(e){const t=new Es(this._lodPlanes[0],e);this._renderer.compile(t,sa)}_sceneToCubeUV(e,t,n,r){const i=new Rs(90,1,t,n),s=[1,-1,1,1,1,1],a=[1,1,1,-1,-1,-1],o=this._renderer,l=o.autoClear,c=o.toneMapping;o.getClearColor(aa),o.toneMapping=J,o.autoClear=!1;const h=new Pi({name:"PMREM.Background",side:m,depthWrite:!1,depthTest:!1}),u=new Es(new Ss,h);let d=!1;const p=e.background;p?p.isColor&&(h.color.copy(p),e.background=null,d=!0):(h.color.copy(aa),d=!0);for(let f=0;f<6;f++){const t=f%3;0===t?(i.up.set(0,s[f],0),i.lookAt(a[f],0,0)):1===t?(i.up.set(0,0,s[f]),i.lookAt(0,a[f],0)):(i.up.set(0,s[f],0),i.lookAt(0,0,a[f]));const n=this._cubeSize;pa(r,t*n,f>2?n:0,n,n),o.setRenderTarget(r),d&&o.render(u,i),o.render(e,i)}u.geometry.dispose(),u.material.dispose(),o.toneMapping=c,o.autoClear=l,e.background=p}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===ie||e.mapping===se;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=ma()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=fa());const i=r?this._cubemapMaterial:this._equirectMaterial,s=new Es(this._lodPlanes[0],i);i.uniforms.envMap.value=e;const a=this._cubeSize;pa(t,0,0,3*a,2*a),n.setRenderTarget(t),n.render(s,sa)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let r=1;ria&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const m=[];let g=0;for(let y=0;yA-4?r-A+4:0),4*(this._cubeSize-v),3*v,2*v),o.setRenderTarget(t),o.render(c,sa)}}function da(e,t,n){const r=new rr(e,t,n);return r.texture.mapping=le,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function pa(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function fa(){return new Is({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:ga(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:v,depthTest:!1,depthWrite:!1})}function ma(){return new Is({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:ga(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:v,depthTest:!1,depthWrite:!1})}function ga(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function Aa(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const s=i.mapping,a=s===ae||s===oe,o=s===ie||s===se;if(a||o){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new ua(e)),r=a?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const s=i.image;if(a&&s&&s.height>0||o&&s&&function(e){let t=0;const n=6;for(let r=0;rt.maxTextureSize&&(M=Math.ceil(S/t.maxTextureSize),S=t.maxTextureSize);const w=new Float32Array(S*M*4*p),C=new ir(w,S,M,p);C.type=Te,C.needsUpdate=!0;const T=4*_;for(let B=0;B0)return e;const i=t*n;let s=Ba[i];if(void 0===s&&(s=new Float32Array(i),Ba[i]=s),0!==t){r.toArray(s,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(s,i)}return s}function Ua(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n":" "} ${e}: ${n[a]}`)}return r.join("\n")}(e.getShaderSource(t),r)}return i}function Lo(e,t){const n=function(e){switch(e){case Qt:return["Linear","( value )"];case zt:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",e),["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Fo(e,t){let n;switch(t){case Z:n="Linear";break;case $:n="Reinhard";break;case ee:n="OptimizedCineon";break;case te:n="ACESFilmic";break;case ne:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function Uo(e){return""!==e}function Oo(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function No(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const ko=/^[ \t]*#include +<([\w\d./]+)>/gm;function Go(e){return e.replace(ko,zo)}function zo(e,t){const n=Ws[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return Go(n)}const Qo=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Vo(e){return e.replace(Qo,Ho)}function Ho(e,t,n,r){let i="";for(let s=parseInt(t);s0&&(y+="\n"),x=[g,A].filter(Uo).join("\n"),x.length>0&&(x+="\n")):(y=[jo(n),"#define SHADER_NAME "+n.shaderName,A,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+h:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Uo).join("\n"),x=[g,jo(n),"#define SHADER_NAME "+n.shaderName,A,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+h:"",n.envMap?"#define "+f:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==J?"#define TONE_MAPPING":"",n.toneMapping!==J?Ws.tonemapping_pars_fragment:"",n.toneMapping!==J?Fo("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Ws.encodings_pars_fragment,Lo("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Uo).join("\n")),a=Go(a),a=Oo(a,n),a=No(a,n),o=Go(o),o=Oo(o,n),o=No(o,n),a=Vo(a),o=Vo(o),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(b="#version 300 es\n",y=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+y,x=["#define varying in",n.glslVersion===An?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===An?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+x);const E=b+y+a,_=b+x+o,S=Ro(i,i.VERTEX_SHADER,E),M=Ro(i,i.FRAGMENT_SHADER,_);if(i.attachShader(v,S),i.attachShader(v,M),void 0!==n.index0AttributeName?i.bindAttribLocation(v,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(v,0,"position"),i.linkProgram(v),e.debug.checkShaderErrors){const t=i.getProgramInfoLog(v).trim(),n=i.getShaderInfoLog(S).trim(),r=i.getShaderInfoLog(M).trim();let s=!0,a=!0;if(!1===i.getProgramParameter(v,i.LINK_STATUS))if(s=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(i,v,S,M);else{const e=Do(i,S,"vertex"),n=Do(i,M,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(v,i.VALIDATE_STATUS)+"\n\nProgram Info Log: "+t+"\n"+e+"\n"+n)}else""!==t?console.warn("THREE.WebGLProgram: Program Info Log:",t):""!==n&&""!==r||(a=!1);a&&(this.diagnostics={runnable:s,programLog:t,vertexShader:{log:n,prefix:y},fragmentShader:{log:r,prefix:x}})}let w,C;return i.deleteShader(S),i.deleteShader(M),this.getUniforms=function(){return void 0===w&&(w=new Bo(i,v)),w},this.getAttributes=function(){return void 0===C&&(C=function(e,t){const n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i0,Y=s.iridescence>0,q=s.sheen>0,K=s.transmission>0,Z=X&&!!s.clearcoatMap,$=X&&!!s.clearcoatNormalMap,ee=X&&!!s.clearcoatRoughnessMap,te=Y&&!!s.iridescenceMap,ne=Y&&!!s.iridescenceThicknessMap,re=q&&!!s.sheenColorMap,ie=q&&!!s.sheenRoughnessMap,se=!!s.specularMap,ae=!!s.specularColorMap,oe=!!s.specularIntensityMap,ce=K&&!!s.transmissionMap,he=K&&!!s.thicknessMap,ue=!!s.gradientMap,de=!!s.alphaMap,pe=s.alphaTest>0,fe=!!s.extensions,me=!!E.attributes.uv1,ge=!!E.attributes.uv2,Ae=!!E.attributes.uv3;return{isWebGL2:h,shaderID:w,shaderName:s.type,vertexShader:I,fragmentShader:B,defines:s.defines,customVertexShaderID:R,customFragmentShaderID:P,isRawShaderMaterial:!0===s.isRawShaderMaterial,glslVersion:s.glslVersion,precision:p,instancing:F,instancingColor:F&&null!==x.instanceColor,supportsVertexTextures:d,outputColorSpace:null===L?e.outputColorSpace:!0===L.isXRRenderTarget?L.texture.colorSpace:Qt,map:U,matcap:O,envMap:N,envMapMode:N&&S.mapping,envMapCubeUVHeight:M,aoMap:k,lightMap:G,bumpMap:z,normalMap:Q,displacementMap:d&&V,emissiveMap:H,normalMapObjectSpace:Q&&s.normalMapType===kt,normalMapTangentSpace:Q&&s.normalMapType===Nt,metalnessMap:j,roughnessMap:W,clearcoat:X,clearcoatMap:Z,clearcoatNormalMap:$,clearcoatRoughnessMap:ee,iridescence:Y,iridescenceMap:te,iridescenceThicknessMap:ne,sheen:q,sheenColorMap:re,sheenRoughnessMap:ie,specularMap:se,specularColorMap:ae,specularIntensityMap:oe,transmission:K,transmissionMap:ce,thicknessMap:he,gradientMap:ue,opaque:!1===s.transparent&&s.blending===y,alphaMap:de,alphaTest:pe,combine:s.combine,mapUv:U&&A(s.map.channel),aoMapUv:k&&A(s.aoMap.channel),lightMapUv:G&&A(s.lightMap.channel),bumpMapUv:z&&A(s.bumpMap.channel),normalMapUv:Q&&A(s.normalMap.channel),displacementMapUv:V&&A(s.displacementMap.channel),emissiveMapUv:H&&A(s.emissiveMap.channel),metalnessMapUv:j&&A(s.metalnessMap.channel),roughnessMapUv:W&&A(s.roughnessMap.channel),clearcoatMapUv:Z&&A(s.clearcoatMap.channel),clearcoatNormalMapUv:$&&A(s.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ee&&A(s.clearcoatRoughnessMap.channel),iridescenceMapUv:te&&A(s.iridescenceMap.channel),iridescenceThicknessMapUv:ne&&A(s.iridescenceThicknessMap.channel),sheenColorMapUv:re&&A(s.sheenColorMap.channel),sheenRoughnessMapUv:ie&&A(s.sheenRoughnessMap.channel),specularMapUv:se&&A(s.specularMap.channel),specularColorMapUv:ae&&A(s.specularColorMap.channel),specularIntensityMapUv:oe&&A(s.specularIntensityMap.channel),transmissionMapUv:ce&&A(s.transmissionMap.channel),thicknessMapUv:he&&A(s.thicknessMap.channel),alphaMapUv:de&&A(s.alphaMap.channel),vertexTangents:Q&&!!E.attributes.tangent,vertexColors:s.vertexColors,vertexAlphas:!0===s.vertexColors&&!!E.attributes.color&&4===E.attributes.color.itemSize,vertexUv1s:me,vertexUv2s:ge,vertexUv3s:Ae,pointsUvs:!0===x.isPoints&&!!E.attributes.uv&&(U||de),fog:!!b,useFog:!0===s.fog,fogExp2:b&&b.isFogExp2,flatShading:!0===s.flatShading,sizeAttenuation:!0===s.sizeAttenuation,logarithmicDepthBuffer:u,skinning:!0===x.isSkinnedMesh,morphTargets:void 0!==E.morphAttributes.position,morphNormals:void 0!==E.morphAttributes.normal,morphColors:void 0!==E.morphAttributes.color,morphTargetsCount:T,morphTextureStride:D,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:s.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:s.toneMapped?e.toneMapping:J,useLegacyLights:e.useLegacyLights,premultipliedAlpha:s.premultipliedAlpha,doubleSided:s.side===g,flipSided:s.side===m,useDepthPacking:s.depthPacking>=0,depthPacking:s.depthPacking||0,index0AttributeName:s.index0AttributeName,extensionDerivatives:fe&&!0===s.extensions.derivatives,extensionFragDepth:fe&&!0===s.extensions.fragDepth,extensionDrawBuffers:fe&&!0===s.extensions.drawBuffers,extensionShaderTextureLOD:fe&&!0===s.extensions.shaderTextureLOD,rendererExtensionFragDepth:h||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||r.has("EXT_shader_texture_lod"),customProgramCacheKey:s.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){o.disableAll(),t.isWebGL2&&o.enable(0);t.supportsVertexTextures&&o.enable(1);t.instancing&&o.enable(2);t.instancingColor&&o.enable(3);t.matcap&&o.enable(4);t.envMap&&o.enable(5);t.normalMapObjectSpace&&o.enable(6);t.normalMapTangentSpace&&o.enable(7);t.clearcoat&&o.enable(8);t.iridescence&&o.enable(9);t.alphaTest&&o.enable(10);t.vertexColors&&o.enable(11);t.vertexAlphas&&o.enable(12);t.vertexUv1s&&o.enable(13);t.vertexUv2s&&o.enable(14);t.vertexUv3s&&o.enable(15);t.vertexTangents&&o.enable(16);e.push(o.mask),o.disableAll(),t.fog&&o.enable(0);t.useFog&&o.enable(1);t.flatShading&&o.enable(2);t.logarithmicDepthBuffer&&o.enable(3);t.skinning&&o.enable(4);t.morphTargets&&o.enable(5);t.morphNormals&&o.enable(6);t.morphColors&&o.enable(7);t.premultipliedAlpha&&o.enable(8);t.shadowMapEnabled&&o.enable(9);t.useLegacyLights&&o.enable(10);t.doubleSided&&o.enable(11);t.flipSided&&o.enable(12);t.useDepthPacking&&o.enable(13);t.dithering&&o.enable(14);t.transmission&&o.enable(15);t.sheen&&o.enable(16);t.opaque&&o.enable(17);t.pointsUvs&&o.enable(18);e.push(o.mask)}(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=f[e.type];let n;if(t){const e=Ys[t];n=Ts.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,i=c.length;e0?r.push(h):!0===a.transparent?i.push(h):n.push(h)},unshift:function(e,t,a,o,l,c){const h=s(e,t,a,o,l,c);a.transmission>0?r.unshift(h):!0===a.transparent?i.unshift(h):n.unshift(h)},finish:function(){for(let n=t,r=e.length;n1&&n.sort(e||Zo),r.length>1&&r.sort(t||$o),i.length>1&&i.sort(t||$o)}}}function tl(){let e=new WeakMap;return{get:function(t,n){const r=e.get(t);let i;return void 0===r?(i=new el,e.set(t,[i])):n>=r.length?(i=new el,r.push(i)):i=r[n],i},dispose:function(){e=new WeakMap}}}function nl(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new hr,color:new Bi};break;case"SpotLight":n={position:new hr,direction:new hr,color:new Bi,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new hr,color:new Bi,distance:0,decay:0};break;case"HemisphereLight":n={direction:new hr,skyColor:new Bi,groundColor:new Bi};break;case"RectAreaLight":n={color:new Bi,position:new hr,halfWidth:new hr,halfHeight:new hr}}return e[t.id]=n,n}}}let rl=0;function il(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function sl(e,t){const n=new nl,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ln};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ln,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let l=0;l<9;l++)i.probe.push(new hr);const s=new hr,a=new Gr,o=new Gr;return{setup:function(s,a){let o=0,l=0,c=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let h=0,u=0,d=0,p=0,f=0,m=0,g=0,A=0,v=0,y=0;s.sort(il);const x=!0===a?Math.PI:1;for(let e=0,t=s.length;e0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=Xs.LTC_FLOAT_1,i.rectAreaLTC2=Xs.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=Xs.LTC_HALF_1,i.rectAreaLTC2=Xs.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=o,i.ambient[1]=l,i.ambient[2]=c;const b=i.hash;b.directionalLength===h&&b.pointLength===u&&b.spotLength===d&&b.rectAreaLength===p&&b.hemiLength===f&&b.numDirectionalShadows===m&&b.numPointShadows===g&&b.numSpotShadows===A&&b.numSpotMaps===v||(i.directional.length=h,i.spot.length=d,i.rectArea.length=p,i.point.length=u,i.hemi.length=f,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=A,i.spotShadowMap.length=A,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotLightMatrix.length=A+v-y,i.spotLightMap.length=v,i.numSpotLightShadowsWithMaps=y,b.directionalLength=h,b.pointLength=u,b.spotLength=d,b.rectAreaLength=p,b.hemiLength=f,b.numDirectionalShadows=m,b.numPointShadows=g,b.numSpotShadows=A,b.numSpotMaps=v,i.version=rl++)},setupView:function(e,t){let n=0,r=0,l=0,c=0,h=0;const u=t.matrixWorldInverse;for(let d=0,p=e.length;d=s.length?(a=new al(e,t),s.push(a)):a=s[i],a},dispose:function(){n=new WeakMap}}}class ll extends Mi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Ut,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class cl extends Mi{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function hl(e,t,n){let r=new Qs;const i=new Ln,s=new Ln,a=new nr,o=new ll({depthPacking:Ot}),l=new cl,c={},h=n.maxTextureSize,d={[f]:m,[m]:f,[g]:g},A=new Is({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ln},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),y=A.clone();y.defines.HORIZONTAL_PASS=1;const x=new is;x.setAttribute("position",new Gi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Es(x,A),E=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=u;let _=this.type;function S(n,r){const s=t.update(b);A.defines.VSM_SAMPLES!==n.blurSamples&&(A.defines.VSM_SAMPLES=n.blurSamples,y.defines.VSM_SAMPLES=n.blurSamples,A.needsUpdate=!0,y.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new rr(i.x,i.y)),A.uniforms.shadow_pass.value=n.map.texture,A.uniforms.resolution.value=n.mapSize,A.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,s,A,b,null),y.uniforms.shadow_pass.value=n.mapPass.texture,y.uniforms.resolution.value=n.mapSize,y.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,s,y,b,null)}function M(t,n,r,i){let s=null;const a=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==a)s=a;else if(s=!0===r.isPointLight?l:o,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const e=s.uuid,t=n.uuid;let r=c[e];void 0===r&&(r={},c[e]=r);let i=r[t];void 0===i&&(i=s.clone(),r[t]=i),s=i}if(s.visible=n.visible,s.wireframe=n.wireframe,s.side=i===p?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:d[n.side],s.alphaMap=n.alphaMap,s.alphaTest=n.alphaTest,s.map=n.map,s.clipShadows=n.clipShadows,s.clippingPlanes=n.clippingPlanes,s.clipIntersection=n.clipIntersection,s.displacementMap=n.displacementMap,s.displacementScale=n.displacementScale,s.displacementBias=n.displacementBias,s.wireframeLinewidth=n.wireframeLinewidth,s.linewidth=n.linewidth,!0===r.isPointLight&&!0===s.isMeshDistanceMaterial){e.properties.get(s).light=r}return s}function w(n,i,s,a,o){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&o===p)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let l=0,c=t.length;lh||i.y>h)&&(i.x>h&&(s.x=Math.floor(h/u.x),i.x=s.x*u.x,c.mapSize.x=s.x),i.y>h&&(s.y=Math.floor(h/u.y),i.y=s.y*u.y,c.mapSize.y=s.y)),null===c.map||!0===f||!0===m){const e=this.type!==p?{minFilter:de,magFilter:de}:{};null!==c.map&&c.map.dispose(),c.map=new rr(i.x,i.y,e),c.map.texture.name=l.name+".shadowMap",c.camera.updateProjectionMatrix()}e.setRenderTarget(c.map),e.clear();const A=c.getViewportCount();for(let e=0;e=1):-1!==de.indexOf("OpenGL ES")&&(ue=parseFloat(/^OpenGL ES (\d)/.exec(de)[1]),he=ue>=2);let pe=null,fe={};const me=e.getParameter(e.SCISSOR_BOX),ge=e.getParameter(e.VIEWPORT),Ae=(new nr).fromArray(me),ve=(new nr).fromArray(ge);function ye(t,n,i,s){const a=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let l=0;lr||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?Bn:Math.floor,s=r(i*e.width),a=r(i*e.height);void 0===m&&(m=v(s,a));const o=n?v(s,a):m;o.width=s,o.height=a;return o.getContext("2d").drawImage(e,0,0,s,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+s+"x"+a+")."),o}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function x(e){return Tn(e.width)&&Tn(e.height)}function b(e,t){return e.generateMipmaps&&t&&e.minFilter!==de&&e.minFilter!==Ae}function E(t){e.generateMipmap(t)}function _(n,r,i,s,a=!1){if(!1===o)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=r;return r===e.RED&&(i===e.FLOAT&&(l=e.R32F),i===e.HALF_FLOAT&&(l=e.R16F),i===e.UNSIGNED_BYTE&&(l=e.R8)),r===e.RG&&(i===e.FLOAT&&(l=e.RG32F),i===e.HALF_FLOAT&&(l=e.RG16F),i===e.UNSIGNED_BYTE&&(l=e.RG8)),r===e.RGBA&&(i===e.FLOAT&&(l=e.RGBA32F),i===e.HALF_FLOAT&&(l=e.RGBA16F),i===e.UNSIGNED_BYTE&&(l=s===zt&&!1===a?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(l=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(l=e.RGB5_A1)),l!==e.R16F&&l!==e.R32F&&l!==e.RG16F&&l!==e.RG32F&&l!==e.RGBA16F&&l!==e.RGBA32F||t.get("EXT_color_buffer_float"),l}function S(e,t,n){return!0===b(e,n)||e.isFramebufferTexture&&e.minFilter!==de&&e.minFilter!==Ae?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function M(t){return t===de||t===pe||t===me?e.NEAREST:e.LINEAR}function w(e){const t=e.target;t.removeEventListener("dispose",w),function(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=g.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&T(e),0===Object.keys(i).length&&g.delete(n)}r.remove(e)}(t),t.isVideoTexture&&f.delete(t)}function C(t){const n=t.target;n.removeEventListener("dispose",C),function(t){const n=t.texture,i=r.get(t),s=r.get(n);void 0!==s.__webglTexture&&(e.deleteTexture(s.__webglTexture),a.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let r=0;r<6;r++)e.deleteFramebuffer(i.__webglFramebuffer[r]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[r]);else{if(e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer)for(let t=0;t0&&s.__version!==t.version){const e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void F(s,t,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(e.TEXTURE_2D,s.__webglTexture,e.TEXTURE0+i)}const R={[ce]:e.REPEAT,[he]:e.CLAMP_TO_EDGE,[ue]:e.MIRRORED_REPEAT},P={[de]:e.NEAREST,[pe]:e.NEAREST_MIPMAP_NEAREST,[me]:e.NEAREST_MIPMAP_LINEAR,[Ae]:e.LINEAR,[ve]:e.LINEAR_MIPMAP_NEAREST,[xe]:e.LINEAR_MIPMAP_LINEAR};function D(n,s,a){if(a?(e.texParameteri(n,e.TEXTURE_WRAP_S,R[s.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,R[s.wrapT]),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,R[s.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,P[s.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,P[s.minFilter])):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),s.wrapS===he&&s.wrapT===he||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,e.TEXTURE_MAG_FILTER,M(s.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,M(s.minFilter)),s.minFilter!==de&&s.minFilter!==Ae&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const a=t.get("EXT_texture_filter_anisotropic");if(s.magFilter===de)return;if(s.minFilter!==me&&s.minFilter!==xe)return;if(s.type===Te&&!1===t.has("OES_texture_float_linear"))return;if(!1===o&&s.type===Ie&&!1===t.has("OES_texture_half_float_linear"))return;(s.anisotropy>1||r.get(s).__currentAnisotropy)&&(e.texParameterf(n,a.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(s.anisotropy,i.getMaxAnisotropy())),r.get(s).__currentAnisotropy=s.anisotropy)}}function L(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",w));const i=n.source;let s=g.get(i);void 0===s&&(s={},g.set(i,s));const o=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(n);if(o!==t.__cacheKey){void 0===s[o]&&(s[o]={texture:e.createTexture(),usedTimes:0},a.memory.textures++,r=!0),s[o].usedTimes++;const i=s[t.__cacheKey];void 0!==i&&(s[t.__cacheKey].usedTimes--,0===i.usedTimes&&T(n)),t.__cacheKey=o,t.__webglTexture=s[o].texture}return r}function F(t,i,a){let l=e.TEXTURE_2D;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(l=e.TEXTURE_2D_ARRAY),i.isData3DTexture&&(l=e.TEXTURE_3D);const c=L(t,i),u=i.source;n.bindTexture(l,t.__webglTexture,e.TEXTURE0+a);const d=r.get(u);if(u.version!==d.__version||!0===c){n.activeTexture(e.TEXTURE0+a),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);const t=function(e){return!o&&(e.wrapS!==he||e.wrapT!==he||e.minFilter!==de&&e.minFilter!==Ae)}(i)&&!1===x(i.image);let r=y(i.image,t,!1,h);r=z(i,r);const p=x(r)||o,f=s.convert(i.format,i.colorSpace);let m,g=s.convert(i.type),A=_(i.internalFormat,f,g,i.colorSpace);D(l,i,p);const v=i.mipmaps,M=o&&!0!==i.isVideoTexture,w=void 0===d.__version||!0===c,C=S(i,r,p);if(i.isDepthTexture)A=e.DEPTH_COMPONENT,o?A=i.type===Te?e.DEPTH_COMPONENT32F:i.type===Ce?e.DEPTH_COMPONENT24:i.type===Pe?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:i.type===Te&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===Oe&&A===e.DEPTH_COMPONENT&&i.type!==Me&&i.type!==Ce&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=Ce,g=s.convert(i.type)),i.format===Ne&&A===e.DEPTH_COMPONENT&&(A=e.DEPTH_STENCIL,i.type!==Pe&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=Pe,g=s.convert(i.type))),w&&(M?n.texStorage2D(e.TEXTURE_2D,1,A,r.width,r.height):n.texImage2D(e.TEXTURE_2D,0,A,r.width,r.height,0,f,g,null));else if(i.isDataTexture)if(v.length>0&&p){M&&w&&n.texStorage2D(e.TEXTURE_2D,C,A,v[0].width,v[0].height);for(let t=0,r=v.length;t>=1,i>>=1}}else if(v.length>0&&p){M&&w&&n.texStorage2D(e.TEXTURE_2D,C,A,v[0].width,v[0].height);for(let t=0,r=v.length;t=e.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,o,l,r.get(a).__webglTexture,0),n.bindFramebuffer(e.FRAMEBUFFER,null)}function O(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer){let i=e.DEPTH_COMPONENT16;if(r||G(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===Te?i=e.DEPTH_COMPONENT32F:t.type===Ce&&(i=e.DEPTH_COMPONENT24));const r=k(n);G(n)?d.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,i,n.width,n.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,r,i,n.width,n.height)}else e.renderbufferStorage(e.RENDERBUFFER,i,n.width,n.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(n.depthBuffer&&n.stencilBuffer){const i=k(n);r&&!1===G(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):G(n)?d.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let i=0;i0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function z(e,n){const r=e.colorSpace,i=e.format,s=e.type;return!0===e.isCompressedTexture||e.format===vn||r!==Qt&&r!==Gt&&(r===zt?!1===o?!0===t.has("EXT_sRGB")&&i===Le?(e.format=vn,e.minFilter=Ae,e.generateMipmaps=!1):n=Jn.sRGBToLinear(n):i===Le&&s===Ee||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",r)),n}this.allocateTextureUnit=function(){const e=I;return e>=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),I+=1,e},this.resetTextureUnits=function(){I=0},this.setTexture2D=B,this.setTexture2DArray=function(t,i){const s=r.get(t);t.version>0&&s.__version!==t.version?F(s,t,i):n.bindTexture(e.TEXTURE_2D_ARRAY,s.__webglTexture,e.TEXTURE0+i)},this.setTexture3D=function(t,i){const s=r.get(t);t.version>0&&s.__version!==t.version?F(s,t,i):n.bindTexture(e.TEXTURE_3D,s.__webglTexture,e.TEXTURE0+i)},this.setTextureCube=function(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?function(t,i,a){if(6!==i.image.length)return;const l=L(t,i),h=i.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+a);const u=r.get(h);if(h.version!==u.__version||!0===l){n.activeTexture(e.TEXTURE0+a),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);const t=i.isCompressedTexture||i.image[0].isCompressedTexture,r=i.image[0]&&i.image[0].isDataTexture,d=[];for(let e=0;e<6;e++)d[e]=t||r?r?i.image[e].image:i.image[e]:y(i.image[e],!1,!0,c),d[e]=z(i,d[e]);const p=d[0],f=x(p)||o,m=s.convert(i.format,i.colorSpace),g=s.convert(i.type),A=_(i.internalFormat,m,g,i.colorSpace),v=o&&!0!==i.isVideoTexture,M=void 0===u.__version||!0===l;let w,C=S(i,p,f);if(D(e.TEXTURE_CUBE_MAP,i,f),t){v&&M&&n.texStorage2D(e.TEXTURE_CUBE_MAP,C,A,p.width,p.height);for(let t=0;t<6;t++){w=d[t].mipmaps;for(let r=0;r0&&C++,n.texStorage2D(e.TEXTURE_CUBE_MAP,C,A,d[0].width,d[0].height));for(let t=0;t<6;t++)if(r){v?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,d[t].width,d[t].height,m,g,d[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,A,d[t].width,d[t].height,0,m,g,d[t].data);for(let r=0;r0&&!1===G(t)){const r=d?l:[l];c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer);for(let n=0;n0&&!1===G(t)){const i=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],s=t.width,a=t.height;let o=e.COLOR_BUFFER_BIT;const l=[],c=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,h=r.get(t),u=!0===t.isWebGLMultipleRenderTargets;if(u)for(let t=0;to+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&a<=o-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1));null!==a&&(r=t.getPose(e.targetRaySpace,n),null===r&&null!==i&&(r=i),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(gl)))}return null!==a&&(a.visible=null!==r),null!==o&&(o.visible=null!==i),null!==l&&(l.visible=null!==s),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new ml;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class vl extends tr{constructor(e,t,n,r,i,s,a,o,l,c){if((c=void 0!==c?c:Oe)!==Oe&&c!==Ne)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===Oe&&(n=Ce),void 0===n&&c===Ne&&(n=Pe),super(null,r,i,s,a,o,c,n,l),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==a?a:de,this.minFilter=void 0!==o?o:de,this.flipY=!1,this.generateMipmaps=!1}}class yl extends yn{constructor(e,t){super();const n=this;let r=null,i=1,s=null,a="local-floor",o=1,l=null,c=null,h=null,u=null,d=null,p=null;const f=t.getContextAttributes();let m=null,g=null;const A=[],v=[],y=new Set,x=new Map,b=new Rs;b.layers.enable(1),b.viewport=new nr;const E=new Rs;E.layers.enable(2),E.viewport=new nr;const _=[b,E],S=new fl;S.layers.enable(1),S.layers.enable(2);let M=null,w=null;function C(e){const t=v.indexOf(e.inputSource);if(-1===t)return;const n=A[t];void 0!==n&&(n.update(e.inputSource,e.frame,l||s),n.dispatchEvent({type:e.type,data:e.inputSource}))}function T(){r.removeEventListener("select",C),r.removeEventListener("selectstart",C),r.removeEventListener("selectend",C),r.removeEventListener("squeeze",C),r.removeEventListener("squeezestart",C),r.removeEventListener("squeezeend",C),r.removeEventListener("end",T),r.removeEventListener("inputsourceschange",I);for(let e=0;e=0&&(v[r]=null,A[r].disconnect(n))}for(let t=0;t=v.length){v.push(n),r=e;break}if(null===v[e]){v[e]=n,r=e;break}}if(-1===r)break}const i=A[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=A[e];return void 0===t&&(t=new Al,A[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=A[e];return void 0===t&&(t=new Al,A[e]=t),t.getGripSpace()},this.getHand=function(e){let t=A[e];return void 0===t&&(t=new Al,A[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){a=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||s},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==u?u:d},this.getBinding=function(){return h},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=async function(c){if(r=c,null!==r){if(m=e.getRenderTarget(),r.addEventListener("select",C),r.addEventListener("selectstart",C),r.addEventListener("selectend",C),r.addEventListener("squeeze",C),r.addEventListener("squeezestart",C),r.addEventListener("squeezeend",C),r.addEventListener("end",T),r.addEventListener("inputsourceschange",I),!0!==f.xrCompatible&&await t.makeXRCompatible(),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==r.renderState.layers||f.antialias,alpha:!0,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:i};d=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:d}),g=new rr(d.framebufferWidth,d.framebufferHeight,{format:Le,type:Ee,colorSpace:e.outputColorSpace,stencilBuffer:f.stencil})}else{let n=null,s=null,a=null;f.depth&&(a=f.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=f.stencil?Ne:Oe,s=f.stencil?Pe:Ce);const o={colorFormat:t.RGBA8,depthFormat:a,scaleFactor:i};h=new XRWebGLBinding(r,t),u=h.createProjectionLayer(o),r.updateRenderState({layers:[u]}),g=new rr(u.textureWidth,u.textureHeight,{format:Le,type:Ee,depthTexture:new vl(u.textureWidth,u.textureHeight,s,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:f.stencil,colorSpace:e.outputColorSpace,samples:f.antialias?4:0});e.properties.get(g).__ignoreDepthValues=u.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(o),l=null,s=await r.requestReferenceSpace(a),L.setContext(r),L.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode};const B=new hr,R=new hr;function P(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;S.near=E.near=b.near=e.near,S.far=E.far=b.far=e.far,M===S.near&&w===S.far||(r.updateRenderState({depthNear:S.near,depthFar:S.far}),M=S.near,w=S.far);const t=e.parent,n=S.cameras;P(S,t);for(let r=0;re&&(x.set(t,t.lastChangedTime),n.dispatchEvent({type:"planechanged",data:t}))}else y.add(t),x.set(t,r.lastChangedTime),n.dispatchEvent({type:"planeadded",data:t})}p=null})),this.setAnimationLoop=function(e){D=e},this.dispose=function(){}}}function xl(e,t){function n(e,t){!0===e.matrixAutoUpdate&&e.updateMatrix(),t.value.copy(e.matrix)}function r(r,i){r.opacity.value=i.opacity,i.color&&r.diffuse.value.copy(i.color),i.emissive&&r.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),i.map&&(r.map.value=i.map,n(i.map,r.mapTransform)),i.alphaMap&&(r.alphaMap.value=i.alphaMap,n(i.alphaMap,r.alphaMapTransform)),i.bumpMap&&(r.bumpMap.value=i.bumpMap,n(i.bumpMap,r.bumpMapTransform),r.bumpScale.value=i.bumpScale,i.side===m&&(r.bumpScale.value*=-1)),i.normalMap&&(r.normalMap.value=i.normalMap,n(i.normalMap,r.normalMapTransform),r.normalScale.value.copy(i.normalScale),i.side===m&&r.normalScale.value.negate()),i.displacementMap&&(r.displacementMap.value=i.displacementMap,n(i.displacementMap,r.displacementMapTransform),r.displacementScale.value=i.displacementScale,r.displacementBias.value=i.displacementBias),i.emissiveMap&&(r.emissiveMap.value=i.emissiveMap,n(i.emissiveMap,r.emissiveMapTransform)),i.specularMap&&(r.specularMap.value=i.specularMap,n(i.specularMap,r.specularMapTransform)),i.alphaTest>0&&(r.alphaTest.value=i.alphaTest);const s=t.get(i).envMap;if(s&&(r.envMap.value=s,r.flipEnvMap.value=s.isCubeTexture&&!1===s.isRenderTargetTexture?-1:1,r.reflectivity.value=i.reflectivity,r.ior.value=i.ior,r.refractionRatio.value=i.refractionRatio),i.lightMap){r.lightMap.value=i.lightMap;const t=!0===e.useLegacyLights?Math.PI:1;r.lightMapIntensity.value=i.lightMapIntensity*t,n(i.lightMap,r.lightMapTransform)}i.aoMap&&(r.aoMap.value=i.aoMap,r.aoMapIntensity.value=i.aoMapIntensity,n(i.aoMap,r.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,Cs(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,i,s,a,o){i.isMeshBasicMaterial||i.isMeshLambertMaterial?r(e,i):i.isMeshToonMaterial?(r(e,i),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,i)):i.isMeshPhongMaterial?(r(e,i),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,i)):i.isMeshStandardMaterial?(r(e,i),function(e,r){e.metalness.value=r.metalness,r.metalnessMap&&(e.metalnessMap.value=r.metalnessMap,n(r.metalnessMap,e.metalnessMapTransform));e.roughness.value=r.roughness,r.roughnessMap&&(e.roughnessMap.value=r.roughnessMap,n(r.roughnessMap,e.roughnessMapTransform));const i=t.get(r).envMap;i&&(e.envMapIntensity.value=r.envMapIntensity)}(e,i),i.isMeshPhysicalMaterial&&function(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform)));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===m&&e.clearcoatNormalScale.value.negate()));t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform)));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform));t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,i,o)):i.isMeshMatcapMaterial?(r(e,i),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,i)):i.isMeshDepthMaterial?r(e,i):i.isMeshDistanceMaterial?(r(e,i),function(e,n){const r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?r(e,i):i.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}(e,i),i.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,i)):i.isPointsMaterial?function(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=.5*i,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i,s,a):i.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function bl(e,t,n,r){let i={},s={},a=[];const o=n.isWebGL2?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(e,t,n){const r=e.value;if(void 0===n[t]){if("number"==typeof r)n[t]=r;else{const e=Array.isArray(r)?r:[r],i=[];for(let t=0;t0){i=n%r;0!==i&&r-i-a.boundary<0&&(n+=r-i,e.__offset=n)}n+=a.storage}i=n%r,i>0&&(n+=r-i);e.__size=n,e.__cache={}}(n),d=function(t){const n=function(){for(let e=0;e0&&function(e,t,n,r){if(null===z){const e=X.isWebGL2;z=new rr(1024,1024,{generateMipmaps:!0,type:W.has("EXT_color_buffer_half_float")?Ie:Ee,minFilter:xe,samples:e&&!0===o?4:0})}const i=x.getRenderTarget();x.setRenderTarget(z),x.clear();const s=x.toneMapping;x.toneMapping=J,Ue(e,n,r),Z.updateMultisampleRenderTarget(z),Z.updateRenderTargetMipmap(z);let a=!1;for(let o=0,l=t.length;o0&&Ue(i,t,n),s.length>0&&Ue(s,t,n),a.length>0&&Ue(a,t,n),Y.buffers.depth.setTest(!0),Y.buffers.depth.setMask(!0),Y.buffers.color.setMask(!0),Y.setPolygonOffset(!1)}function Ue(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,s=e.length;i0?y[y.length-1]:null,v.pop(),p=v.length>0?v[v.length-1]:null},this.getActiveCubeFace=function(){return E},this.getActiveMipmapLevel=function(){return _},this.getRenderTarget=function(){return S},this.setRenderTargetTextures=function(e,t,n){K.get(e.texture).__webglTexture=t,K.get(e.depthTexture).__webglTexture=n;const r=K.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===W.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=K.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){S=e,E=t,_=n;let r=!0,i=null,s=!1,a=!1;if(e){const n=K.get(e);void 0!==n.__useDefaultFramebuffer?(Y.bindFramebuffer(Ae.FRAMEBUFFER,null),r=!1):void 0===n.__webglFramebuffer?Z.setupRenderTarget(e):n.__hasExternalTextures&&Z.rebindTextures(e,K.get(e.texture).__webglTexture,K.get(e.depthTexture).__webglTexture);const o=e.texture;(o.isData3DTexture||o.isDataArrayTexture||o.isCompressedArrayTexture)&&(a=!0);const l=K.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=l[t],s=!0):i=X.isWebGL2&&e.samples>0&&!1===Z.useMultisampledRTT(e)?K.get(e).__webglMultisampledFramebuffer:l,C.copy(e.viewport),T.copy(e.scissor),I=e.scissorTest}else C.copy(F).multiplyScalar(P).floor(),T.copy(U).multiplyScalar(P).floor(),I=O;if(Y.bindFramebuffer(Ae.FRAMEBUFFER,i)&&X.drawBuffers&&r&&Y.drawBuffers(e,i),Y.viewport(C),Y.scissor(T),Y.setScissorTest(I),s){const r=K.get(e.texture);Ae.framebufferTexture2D(Ae.FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,Ae.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(a){const r=K.get(e.texture),i=t||0;Ae.framebufferTextureLayer(Ae.FRAMEBUFFER,Ae.COLOR_ATTACHMENT0,r.__webglTexture,n||0,i)}M=-1},this.readRenderTargetPixels=function(e,t,n,r,i,s,a){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let o=K.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==a&&(o=o[a]),o){Y.bindFramebuffer(Ae.FRAMEBUFFER,o);try{const a=e.texture,o=a.format,l=a.type;if(o!==Le&&fe.convert(o)!==Ae.getParameter(Ae.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===Ie&&(W.has("EXT_color_buffer_half_float")||X.isWebGL2&&W.has("EXT_color_buffer_float"));if(!(l===Ee||fe.convert(l)===Ae.getParameter(Ae.IMPLEMENTATION_COLOR_READ_TYPE)||l===Te&&(X.isWebGL2||W.has("OES_texture_float")||W.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&Ae.readPixels(t,n,r,i,fe.convert(o),fe.convert(l),s)}finally{const e=null!==S?K.get(S).__webglFramebuffer:null;Y.bindFramebuffer(Ae.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),s=Math.floor(t.image.height*r);Z.setTexture2D(t,0),Ae.copyTexSubImage2D(Ae.TEXTURE_2D,n,0,0,e.x,e.y,i,s),Y.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,s=t.image.height,a=fe.convert(n.format),o=fe.convert(n.type);Z.setTexture2D(n,0),Ae.pixelStorei(Ae.UNPACK_FLIP_Y_WEBGL,n.flipY),Ae.pixelStorei(Ae.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),Ae.pixelStorei(Ae.UNPACK_ALIGNMENT,n.unpackAlignment),t.isDataTexture?Ae.texSubImage2D(Ae.TEXTURE_2D,r,e.x,e.y,i,s,a,o,t.image.data):t.isCompressedTexture?Ae.compressedTexSubImage2D(Ae.TEXTURE_2D,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,a,t.mipmaps[0].data):Ae.texSubImage2D(Ae.TEXTURE_2D,r,e.x,e.y,a,o,t.image),0===r&&n.generateMipmaps&&Ae.generateMipmap(Ae.TEXTURE_2D),Y.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(x.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const s=e.max.x-e.min.x+1,a=e.max.y-e.min.y+1,o=e.max.z-e.min.z+1,l=fe.convert(r.format),c=fe.convert(r.type);let h;if(r.isData3DTexture)Z.setTexture3D(r,0),h=Ae.TEXTURE_3D;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Z.setTexture2DArray(r,0),h=Ae.TEXTURE_2D_ARRAY}Ae.pixelStorei(Ae.UNPACK_FLIP_Y_WEBGL,r.flipY),Ae.pixelStorei(Ae.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),Ae.pixelStorei(Ae.UNPACK_ALIGNMENT,r.unpackAlignment);const u=Ae.getParameter(Ae.UNPACK_ROW_LENGTH),d=Ae.getParameter(Ae.UNPACK_IMAGE_HEIGHT),p=Ae.getParameter(Ae.UNPACK_SKIP_PIXELS),f=Ae.getParameter(Ae.UNPACK_SKIP_ROWS),m=Ae.getParameter(Ae.UNPACK_SKIP_IMAGES),g=n.isCompressedTexture?n.mipmaps[0]:n.image;Ae.pixelStorei(Ae.UNPACK_ROW_LENGTH,g.width),Ae.pixelStorei(Ae.UNPACK_IMAGE_HEIGHT,g.height),Ae.pixelStorei(Ae.UNPACK_SKIP_PIXELS,e.min.x),Ae.pixelStorei(Ae.UNPACK_SKIP_ROWS,e.min.y),Ae.pixelStorei(Ae.UNPACK_SKIP_IMAGES,e.min.z),n.isDataTexture||n.isData3DTexture?Ae.texSubImage3D(h,i,t.x,t.y,t.z,s,a,o,l,c,g.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Ae.compressedTexSubImage3D(h,i,t.x,t.y,t.z,s,a,o,l,g.data)):Ae.texSubImage3D(h,i,t.x,t.y,t.z,s,a,o,l,c,g),Ae.pixelStorei(Ae.UNPACK_ROW_LENGTH,u),Ae.pixelStorei(Ae.UNPACK_IMAGE_HEIGHT,d),Ae.pixelStorei(Ae.UNPACK_SKIP_PIXELS,p),Ae.pixelStorei(Ae.UNPACK_SKIP_ROWS,f),Ae.pixelStorei(Ae.UNPACK_SKIP_IMAGES,m),0===i&&r.generateMipmaps&&Ae.generateMipmap(h),Y.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?Z.setTextureCube(e,0):e.isData3DTexture?Z.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?Z.setTexture2DArray(e,0):Z.setTexture2D(e,0),Y.unbindTexture()},this.resetState=function(){E=0,_=0,S=null,Y.reset(),me.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===zt?Ft:Lt}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Ft?zt:Qt}}class Sl extends _l{}Sl.prototype.isWebGL1Renderer=!0;class Ml{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Bi(e),this.density=t}clone(){return new Ml(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class wl{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new Bi(e),this.near=t,this.far=n}clone(){return new wl(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class Cl extends ui{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class Tl{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=on,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Sn()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;re.far||t.push({distance:o,point:Dl.clone(),uv:_i.getInterpolation(Dl,kl,Gl,zl,Ql,Vl,Hl,new Ln),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Wl(e,t,n,r,i,s){Ul.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Ol.x=s*Ul.x-i*Ul.y,Ol.y=i*Ul.x+s*Ul.y):Ol.copy(Ul),e.copy(t),e.x+=Ol.x,e.y+=Ol.y,e.applyMatrix4(Nl)}const Xl=new hr,Yl=new hr;class ql extends ui{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,r=t.length;n0){let n,r;for(n=1,r=t.length;n0){Xl.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(Xl);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Xl.setFromMatrixPosition(e.matrixWorld),Yl.setFromMatrixPosition(this.matrixWorld);const n=Xl.distanceTo(Yl)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r=e))break;t[r-1].object.visible=!1,t[r].object.visible=!0}for(this._currentLevel=r-1;ro)continue;u.applyMatrix4(this.matrixWorld);const s=e.ray.origin.distanceTo(u);se.far||t.push({distance:s,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,s.start),r=Math.min(f.count,s.start+s.count)-1;no)continue;u.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(u);re.far||t.push({distance:r,point:h.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;ei.far)return;s.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:t,face:null,object:a})}}class Fc extends tr{constructor(e,t,n,r,i,s,a,o,l){super(e,t,n,r,i,s,a,o,l),this.isVideoTexture=!0,this.minFilter=void 0!==s?s:Ae,this.magFilter=void 0!==i?i:Ae,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class Uc extends tr{constructor(e,t,n){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=n,this.magFilter=de,this.minFilter=de,this.generateMipmaps=!1,this.needsUpdate=!0}}class Oc extends tr{constructor(e,t,n,r,i,s,a,o,l,c,h,u){super(null,s,a,o,l,c,r,i,h,u),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class Nc extends Oc{constructor(e,t,n,r,i,s){super(e,t,n,i,s),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=he}}class kc extends tr{constructor(e,t,n,r,i,s,a,o,l){super(e,t,n,r,i,s,a,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Gc{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let s=1;s<=e;s++)n=this.getPoint(s/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let s;s=t||e*n[i-1];let a,o=0,l=i-1;for(;o<=l;)if(r=Math.floor(o+(l-o)/2),a=n[r]-s,a<0)o=r+1;else{if(!(a>0)){l=r;break}l=r-1}if(r=l,n[r]===s)return r/(i-1);const c=n[r];return(r+(s-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const s=this.getPoint(r),a=this.getPoint(i),o=t||(s.isVector2?new Ln:new hr);return o.copy(a).sub(s).normalize(),o}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new hr,r=[],i=[],s=[],a=new hr,o=new Gr;for(let d=0;d<=e;d++){const t=d/e;r[d]=this.getTangentAt(t,new hr)}i[0]=new hr,s[0]=new hr;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),h=Math.abs(r[0].y),u=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),h<=l&&(l=h,n.set(0,1,0)),u<=l&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],a),s[0].crossVectors(r[0],i[0]);for(let d=1;d<=e;d++){if(i[d]=i[d-1].clone(),s[d]=s[d-1].clone(),a.crossVectors(r[d-1],r[d]),a.length()>Number.EPSILON){a.normalize();const e=Math.acos(Mn(r[d-1].dot(r[d]),-1,1));i[d].applyMatrix4(o.makeRotationAxis(a,e))}s[d].crossVectors(r[d],i[d])}if(!0===t){let t=Math.acos(Mn(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(a.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(o.makeRotationAxis(r[n],t*n)),s[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class zc extends Gc{constructor(e=0,t=0,n=1,r=1,i=0,s=2*Math.PI,a=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=s,this.aClockwise=a,this.aRotation=o}getPoint(e,t){const n=t||new Ln,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const s=Math.abs(i)r;)i-=r;i0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===c&&l===i-1&&(l=i-2,c=1),this.closed||l>0?a=r[(l-1)%i]:(Hc.subVectors(r[0],r[1]).add(r[0]),a=Hc);const h=r[l%i],u=r[(l+1)%i];if(this.closed||l+2r.length-2?r.length-1:s+1],h=r[s>r.length-3?r.length-1:s+2];return n.set(qc(a,o.x,l.x,c.x,h.x),qc(a,o.y,l.y,c.y,h.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){const e=r[i]-n,s=this.curves[i],a=s.getLength(),o=0===a?0:1-e/a;return s.getPointAt(o,t)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class lh extends is{constructor(e=[new Ln(0,-.5),new Ln(.5,0),new Ln(0,.5)],t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=Mn(r,0,2*Math.PI);const i=[],s=[],a=[],o=[],l=[],c=1/t,h=new hr,u=new Ln,d=new hr,p=new hr,f=new hr;let m=0,g=0;for(let A=0;A<=e.length-1;A++)switch(A){case 0:m=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,d.x=1*g,d.y=-m,d.z=0*g,f.copy(d),d.normalize(),o.push(d.x,d.y,d.z);break;case e.length-1:o.push(f.x,f.y,f.z);break;default:m=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,d.x=1*g,d.y=-m,d.z=0*g,p.copy(d),d.x+=f.x,d.y+=f.y,d.z+=f.z,d.normalize(),o.push(d.x,d.y,d.z),f.copy(p)}for(let A=0;A<=t;A++){const i=n+A*c*r,d=Math.sin(i),p=Math.cos(i);for(let n=0;n<=e.length-1;n++){h.x=e[n].x*d,h.y=e[n].y,h.z=e[n].x*p,s.push(h.x,h.y,h.z),u.x=A/t,u.y=n/(e.length-1),a.push(u.x,u.y);const r=o[3*n+0]*d,i=o[3*n+1],c=o[3*n+0]*p;l.push(r,i,c)}}for(let A=0;A0&&A(!0),t>0&&A(!1)),this.setIndex(c),this.setAttribute("position",new qi(h,3)),this.setAttribute("normal",new qi(u,3)),this.setAttribute("uv",new qi(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new uh(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class dh extends uh{constructor(e=1,t=1,n=32,r=1,i=!1,s=0,a=2*Math.PI){super(0,e,t,n,r,i,s,a),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:s,thetaLength:a}}static fromJSON(e){return new dh(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ph extends is{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],s=[];function a(e,t,n,r){const i=r+1,s=[];for(let a=0;a<=i;a++){s[a]=[];const r=e.clone().lerp(n,a/i),o=t.clone().lerp(n,a/i),l=i-a;for(let e=0;e<=l;e++)s[a][e]=0===e&&a===i?r:r.clone().lerp(o,e/l)}for(let a=0;a.9&&a<.1&&(t<.2&&(s[e+0]+=1),n<.2&&(s[e+2]+=1),r<.2&&(s[e+4]+=1))}}()}(),this.setAttribute("position",new qi(i,3)),this.setAttribute("normal",new qi(i.slice(),3)),this.setAttribute("uv",new qi(s,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ph(e.vertices,e.indices,e.radius,e.details)}}class fh extends ph{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new fh(e.radius,e.detail)}}const mh=new hr,gh=new hr,Ah=new hr,vh=new _i;class yh extends is{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,r=Math.pow(10,n),i=Math.cos(En*t),s=e.getIndex(),a=e.getAttribute("position"),o=s?s.count:a.count,l=[0,0,0],c=["a","b","c"],h=new Array(3),u={},d=[];for(let e=0;e80*n){o=c=e[0],l=h=e[1];for(let t=n;tc&&(c=u),d>h&&(h=d);p=Math.max(c-o,h-l),p=0!==p?32767/p:0}return Sh(s,a,n,o,l,p,0),a};function Eh(e,t,n,r,i){let s,a;if(i===function(e,t,n,r){let i=0;for(let s=t,a=n-r;s0)for(s=t;s=t;s-=r)a=Vh(s,e[s],e[s+1],a);return a&&Oh(a,a.next)&&(Hh(a),a=a.next),a}function _h(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!Oh(r,r.next)&&0!==Uh(r.prev,r,r.next))r=r.next;else{if(Hh(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function Sh(e,t,n,r,i,s,a){if(!e)return;!a&&s&&function(e,t,n,r){let i=e;do{0===i.z&&(i.z=Ph(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,s,a,o,l,c=1;do{for(n=e,e=null,s=null,a=0;n;){for(a++,r=n,o=0,t=0;t0||l>0&&r;)0!==o&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,o--):(i=r,r=r.nextZ,l--),s?s.nextZ=i:e=i,i.prevZ=s,s=i;n=r}s.nextZ=null,c*=2}while(a>1)}(i)}(e,r,i,s);let o,l,c=e;for(;e.prev!==e.next;)if(o=e.prev,l=e.next,s?wh(e,r,i,s):Mh(e))t.push(o.i/n|0),t.push(e.i/n|0),t.push(l.i/n|0),Hh(e),e=l.next,c=l.next;else if((e=l)===c){a?1===a?Sh(e=Ch(_h(e),t,n),t,n,r,i,s,2):2===a&&Th(e,t,n,r,i,s):Sh(_h(e),t,n,r,i,s,1);break}}function Mh(e){const t=e.prev,n=e,r=e.next;if(Uh(t,n,r)>=0)return!1;const i=t.x,s=n.x,a=r.x,o=t.y,l=n.y,c=r.y,h=is?i>a?i:a:s>a?s:a,p=o>l?o>c?o:c:l>c?l:c;let f=r.next;for(;f!==t;){if(f.x>=h&&f.x<=d&&f.y>=u&&f.y<=p&&Lh(i,o,s,l,a,c,f.x,f.y)&&Uh(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function wh(e,t,n,r){const i=e.prev,s=e,a=e.next;if(Uh(i,s,a)>=0)return!1;const o=i.x,l=s.x,c=a.x,h=i.y,u=s.y,d=a.y,p=ol?o>c?o:c:l>c?l:c,g=h>u?h>d?h:d:u>d?u:d,A=Ph(p,f,t,n,r),v=Ph(m,g,t,n,r);let y=e.prevZ,x=e.nextZ;for(;y&&y.z>=A&&x&&x.z<=v;){if(y.x>=p&&y.x<=m&&y.y>=f&&y.y<=g&&y!==i&&y!==a&&Lh(o,h,l,u,c,d,y.x,y.y)&&Uh(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==i&&x!==a&&Lh(o,h,l,u,c,d,x.x,x.y)&&Uh(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;y&&y.z>=A;){if(y.x>=p&&y.x<=m&&y.y>=f&&y.y<=g&&y!==i&&y!==a&&Lh(o,h,l,u,c,d,y.x,y.y)&&Uh(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;x&&x.z<=v;){if(x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==i&&x!==a&&Lh(o,h,l,u,c,d,x.x,x.y)&&Uh(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function Ch(e,t,n){let r=e;do{const i=r.prev,s=r.next.next;!Oh(i,s)&&Nh(i,r,r.next,s)&&zh(i,s)&&zh(s,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(s.i/n|0),Hh(r),Hh(r.next),r=e=s),r=r.next}while(r!==e);return _h(r)}function Th(e,t,n,r,i,s){let a=e;do{let e=a.next.next;for(;e!==a.prev;){if(a.i!==e.i&&Fh(a,e)){let o=Qh(a,e);return a=_h(a,a.next),o=_h(o,o.next),Sh(a,t,n,r,i,s,0),void Sh(o,t,n,r,i,s,0)}e=e.next}a=a.next}while(a!==e)}function Ih(e,t){return e.x-t.x}function Bh(e,t){const n=function(e,t){let n,r=t,i=-1/0;const s=e.x,a=e.y;do{if(a<=r.y&&a>=r.next.y&&r.next.y!==r.y){const e=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=s&&e>i&&(i=e,n=r.x=r.x&&r.x>=l&&s!==r.x&&Lh(an.x||r.x===n.x&&Rh(n,r)))&&(n=r,u=h)),r=r.next}while(r!==o);return n}(e,t);if(!n)return t;const r=Qh(n,e);return _h(r,r.next),_h(n,n.next)}function Rh(e,t){return Uh(e.prev,e,t.prev)<0&&Uh(t.next,e,e.next)<0}function Ph(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Dh(e){let t=e,n=e;do{(t.x=(e-a)*(s-o)&&(e-a)*(r-o)>=(n-a)*(t-o)&&(n-a)*(s-o)>=(i-a)*(r-o)}function Fh(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Nh(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(zh(e,t)&&zh(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,s=(e.y+t.y)/2;do{n.y>s!=n.next.y>s&&n.next.y!==n.y&&i<(n.next.x-n.x)*(s-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(Uh(e.prev,e,t.prev)||Uh(e,t.prev,t))||Oh(e,t)&&Uh(e.prev,e,e.next)>0&&Uh(t.prev,t,t.next)>0)}function Uh(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Oh(e,t){return e.x===t.x&&e.y===t.y}function Nh(e,t,n,r){const i=Gh(Uh(e,t,n)),s=Gh(Uh(e,t,r)),a=Gh(Uh(n,r,e)),o=Gh(Uh(n,r,t));return i!==s&&a!==o||(!(0!==i||!kh(e,n,t))||(!(0!==s||!kh(e,r,t))||(!(0!==a||!kh(n,e,r))||!(0!==o||!kh(n,t,r)))))}function kh(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Gh(e){return e>0?1:e<0?-1:0}function zh(e,t){return Uh(e.prev,e,e.next)<0?Uh(e,t,e.next)>=0&&Uh(e,e.prev,t)>=0:Uh(e,t,e.prev)<0||Uh(e,e.next,t)<0}function Qh(e,t){const n=new jh(e.i,e.x,e.y),r=new jh(t.i,t.x,t.y),i=e.next,s=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function Vh(e,t,n,r){const i=new jh(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Hh(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function jh(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Wh{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i2&&e[t-1].equals(e[0])&&e.pop()}function Yh(e,t){for(let n=0;nNumber.EPSILON){const u=Math.sqrt(h),d=Math.sqrt(l*l+c*c),p=t.x-o/u,f=t.y+a/u,m=((n.x-c/d-p)*c-(n.y+l/d-f)*l)/(a*c-o*l);r=p+a*m-e.x,i=f+o*m-e.y;const g=r*r+i*i;if(g<=2)return new Ln(r,i);s=Math.sqrt(g/2)}else{let e=!1;a>Number.EPSILON?l>Number.EPSILON&&(e=!0):a<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(c)&&(e=!0),e?(r=-o,i=a,s=Math.sqrt(h)):(r=a,i=o,s=Math.sqrt(h/2))}return new Ln(r/s,i/s)}const R=[];for(let t=0,n=w.length,r=n-1,i=t+1;t=0;t--){const e=t/p,n=h*Math.cos(e*Math.PI/2),r=u*Math.sin(e*Math.PI/2)+d;for(let t=0,i=w.length;t=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=o+2*p;e0)&&d.push(t,r,a),(g!==n-1||o0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class pu extends Mi{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Bi(16777215),this.specular=new Bi(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Bi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Ln(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Y,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class fu extends Mi{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Bi(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Bi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Ln(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class mu extends Mi{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Ln(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class gu extends Mi{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Bi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Bi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Ln(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Y,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Au extends Mi{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Bi(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Ln(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class vu extends Ac{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function yu(e,t,n){return bu(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)}function xu(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function bu(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Eu(e){const t=e.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort((function(t,n){return e[t]-e[n]})),n}function _u(e,t,n){const r=e.length,i=new e.constructor(r);for(let s=0,a=0;a!==r;++s){const r=n[s]*t;for(let n=0;n!==t;++n)i[a++]=e[r+n]}return i}function Su(e,t,n,r){let i=1,s=e[0];for(;void 0!==s&&void 0===s[r];)s=e[i++];if(void 0===s)return;let a=s[r];if(void 0!==a)if(Array.isArray(a))do{a=s[r],void 0!==a&&(t.push(s.time),n.push.apply(n,a)),s=e[i++]}while(void 0!==s);else if(void 0!==a.toArray)do{a=s[r],void 0!==a&&(t.push(s.time),a.toArray(n,n.length)),s=e[i++]}while(void 0!==s);else do{a=s[r],void 0!==a&&(t.push(s.time),n.push(a)),s=e[i++]}while(void 0!==s)}const Mu={arraySlice:yu,convertArray:xu,isTypedArray:bu,getKeyframeOrder:Eu,sortedArray:_u,flattenJSON:Su,subclip:function(e,t,n,r,i=30){const s=e.clone();s.name=t;const a=[];for(let l=0;l=r)){o.push(e.times[s]);for(let n=0;ns.tracks[l].times[0]&&(o=s.tracks[l].times[0]);for(let l=0;l=t.times[u]){const e=u*l+o,n=e+l-o;d=yu(t.values,e,n)}else{const e=t.createInterpolant(),n=o,r=l-o;e.evaluate(s),d=yu(e.resultBuffer,n,r)}if("quaternion"===r){(new cr).fromArray(d).normalize().conjugate().toArray(d)}const p=i.times.length;for(let e=0;e=i)break e;{const a=t[1];e=i)break t}s=n,n=0}}for(;n>>1;et;)--s;if(++s,0!==i||s!==r){i>=s&&(s=Math.max(s,1),i=s-1);const e=this.getValueSize();this.times=yu(n,i,s),this.values=yu(this.values,i*e,s*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==i;a++){const t=n[a];if("number"==typeof t&&isNaN(t)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,t),e=!1;break}if(null!==s&&s>t){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,t,s),e=!1;break}s=t}if(void 0!==r&&bu(r))for(let a=0,o=r.length;a!==o;++a){const t=r[a];if(isNaN(t)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,t),e=!1;break}}return e}optimize(){const e=yu(this.times),t=yu(this.values),n=this.getValueSize(),r=this.getInterpolation()===Mt,i=e.length-1;let s=1;for(let a=1;a0){e[s]=e[i];for(let e=i*n,r=s*n,a=0;a!==n;++a)t[r+a]=t[e+a];++s}return s!==e.length?(this.times=yu(e,0,s),this.values=yu(t,0,s*n)):(this.times=e,this.values=t),this}clone(){const e=yu(this.times,0),t=yu(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Bu.prototype.TimeBufferType=Float32Array,Bu.prototype.ValueBufferType=Float32Array,Bu.prototype.DefaultInterpolation=St;class Ru extends Bu{}Ru.prototype.ValueTypeName="bool",Ru.prototype.ValueBufferType=Array,Ru.prototype.DefaultInterpolation=_t,Ru.prototype.InterpolantFactoryMethodLinear=void 0,Ru.prototype.InterpolantFactoryMethodSmooth=void 0;class Pu extends Bu{}Pu.prototype.ValueTypeName="color";class Du extends Bu{}Du.prototype.ValueTypeName="number";class Lu extends wu{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,s=this.sampleValues,a=this.valueSize,o=(n-t)/(r-t);let l=e*a;for(let c=l+a;l!==c;l+=4)cr.slerpFlat(i,0,s,l-a,s,l,o);return i}}class Fu extends Bu{InterpolantFactoryMethodLinear(e){return new Lu(this.times,this.values,this.getValueSize(),e)}}Fu.prototype.ValueTypeName="quaternion",Fu.prototype.DefaultInterpolation=St,Fu.prototype.InterpolantFactoryMethodSmooth=void 0;class Uu extends Bu{}Uu.prototype.ValueTypeName="string",Uu.prototype.ValueBufferType=Array,Uu.prototype.DefaultInterpolation=_t,Uu.prototype.InterpolantFactoryMethodLinear=void 0,Uu.prototype.InterpolantFactoryMethodSmooth=void 0;class Ou extends Bu{}Ou.prototype.ValueTypeName="vector";class Nu{constructor(e,t=-1,n,r=It){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=Sn(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let s=0,a=n.length;s!==a;++s)t.push(ku(n[s]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let i=0,s=n.length;i!==s;++i)t.push(Bu.toJSON(n[i]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,s=[];for(let a=0;a1){const e=n[1];let i=r[e];i||(r[e]=i=[]),i.push(t)}}const s=[];for(const a in r)s.push(this.CreateFromMorphTargetSequence(a,r[a],t,n));return s}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const s=[],a=[];Su(n,s,a,r),0!==s.length&&i.push(new e(t,s,a))}},r=[],i=e.name||"default",s=e.fps||30,a=e.blendMode;let o=e.length||-1;const l=e.hierarchy||[];for(let c=0;c{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==Hu[e])return void Hu[e].push({onLoad:t,onProgress:n,onError:r});Hu[e]=[],Hu[e].push({onLoad:t,onProgress:n,onError:r});const s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(s).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=Hu[e],r=t.body.getReader(),i=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),s=i?parseInt(i):0,a=0!==s;let o=0;const l=new ReadableStream({start(e){!function t(){r.read().then((({done:r,value:i})=>{if(r)e.close();else{o+=i.byteLength;const r=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:s});for(let e=0,t=n.length;e{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,a)));case"json":return e.json();default:if(void 0===a)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(a),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then((e=>r.decode(e)))}}})).then((t=>{Gu.add(e,t);const n=Hu[e];delete Hu[e];for(let e=0,r=n.length;e{const n=Hu[e];if(void 0===n)throw this.manager.itemError(e),t;delete Hu[e];for(let e=0,r=n.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Xu extends Vu{constructor(e){super(e)}load(e,t,n,r){const i=this,s=new Wu(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(s){r?r(s):console.error(s),i.manager.itemError(e)}}),n,r)}parse(e){const t=[];for(let n=0;n0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const i in e.uniforms){const t=e.uniforms[i];switch(r.uniforms[i]={},t.type){case"t":r.uniforms[i].value=n(t.value);break;case"c":r.uniforms[i].value=(new Bi).setHex(t.value);break;case"v2":r.uniforms[i].value=(new Ln).fromArray(t.value);break;case"v3":r.uniforms[i].value=(new hr).fromArray(t.value);break;case"v4":r.uniforms[i].value=(new nr).fromArray(t.value);break;case"m3":r.uniforms[i].value=(new Fn).fromArray(t.value);break;case"m4":r.uniforms[i].value=(new Gr).fromArray(t.value);break;default:r.uniforms[i].value=t.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(r.glslVersion=e.glslVersion),void 0!==e.extensions)for(const i in e.extensions)r.extensions[i]=e.extensions[i];if(void 0!==e.lights&&(r.lights=e.lights),void 0!==e.clipping&&(r.clipping=e.clipping),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new Ln).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new Ln).fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(r.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){return new{ShadowMaterial:cu,SpriteMaterial:Rl,RawShaderMaterial:hu,ShaderMaterial:Is,PointsMaterial:Tc,MeshPhysicalMaterial:du,MeshStandardMaterial:uu,MeshPhongMaterial:pu,MeshToonMaterial:fu,MeshNormalMaterial:mu,MeshLambertMaterial:gu,MeshDepthMaterial:ll,MeshDistanceMaterial:cl,MeshBasicMaterial:Pi,MeshMatcapMaterial:Au,LineDashedMaterial:vu,LineBasicMaterial:Ac,Material:Mi}[e]}}class yd{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let r=0,i=e.length;r0){const n=new zu(t);i=new qu(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,i=e.length;t0){r=new qu(this.manager),r.setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let o=t,l=t+t;o!==l;++o)if(n[o]!==n[o+t]){a.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let i=n,s=r;i!==s;++i)t[i]=t[r+i%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let s=0;s!==i;++s)e[t+s]=e[n+s]}_slerp(e,t,n,r){cr.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const s=this._workIndex*i;cr.multiplyQuaternionsFlat(e,s,e,t,e,n),cr.slerpFlat(e,t,e,t,e,s,r)}_lerp(e,t,n,r,i){const s=1-r;for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]*s+e[n+a]*r}}_lerpAdditive(e,t,n,r,i){for(let s=0;s!==i;++s){const i=t+s;e[i]=e[i]+e[n+s]*r}}}const Jd="\\[\\]\\.:\\/",Zd=new RegExp("["+Jd+"]","g"),$d="[^"+Jd+"]",ep="[^"+Jd.replace("\\.","")+"]",tp=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",$d)+/(WCOD+)?/.source.replace("WCOD",ep)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",$d)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",$d)+"$"),np=["material","materials","bones","map"];class rp{constructor(e,t,n){this.path=t,this.parsedPath=n||rp.parseTrackName(t),this.node=rp.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new rp.Composite(e,t,n):new rp(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Zd,"")}static parseTrackName(e){const t=tp.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==np.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r=i){const s=i++,c=e[s];t[c.uuid]=l,e[l]=c,t[o]=s,e[s]=a;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[s],i=t[l];t[l]=r,t[s]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,s=e.length;for(let a=0,o=arguments.length;a!==o;++a){const o=arguments[a].uuid,l=t[o];if(void 0!==l)if(delete t[o],l0&&(t[a.uuid]=l),e[l]=a,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const s=this._paths,a=this._parsedPaths,o=this._objects,l=o.length,c=this.nCachedObjects_,h=new Array(l);r=i.length,n[e]=r,s.push(e),a.push(t),i.push(h);for(let u=c,d=o.length;u!==d;++u){const n=o[u];h[u]=new rp(n,e,t)}return h}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,s=this._bindings,a=s.length-1,o=s[a];t[e[a]]=n,s[n]=o,s.pop(),i[n]=i[a],i.pop(),r[n]=r[a],r.pop()}}}class sp{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,s=i.length,a=new Array(s),o={endingStart:wt,endingEnd:wt};for(let l=0;l!==s;++l){const e=i[l].createInterpolant(null);a[l]=e,e.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=bt,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,s=n/r;e.warp(1,i,t),this.warp(s,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,s=this.timeScale;let a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const o=a.parameterPositions,l=a.sampleValues;return o[0]=i,o[1]=i+n,l[0]=e/s,l[1]=t/s,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;r<0||0===n?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);const s=this._updateTime(t),a=this._updateWeight(e);if(a>0){const e=this._interpolants,t=this._propertyBindings;if(this.blendMode===Bt)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(s),t[n].accumulateAdditive(a);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(s),t[n].accumulate(r,a)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const s=n===Et;if(0===e)return-1===i?r:s&&1==(1&i)?t-r:r;if(n===xt){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const a=this.repetitions-i;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===a){const t=e<0;this._setEndings(t,!t,s)}else this._setEndings(!1,!1,s);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(s&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=Ct,r.endingEnd=Ct):(r.endingStart=e?this.zeroSlopeAtStart?Ct:wt:Tt,r.endingEnd=t?this.zeroSlopeAtEnd?Ct:wt:Tt)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let s=this._weightInterpolant;null===s&&(s=r._lendControlInterpolant(),this._weightInterpolant=s);const a=s.parameterPositions,o=s.sampleValues;return a[0]=i,o[0]=t,a[1]=i+e,o[1]=n,this}}const ap=new Float32Array(1);class op extends yn{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,s=e._propertyBindings,a=e._interpolants,o=n.uuid,l=this._bindingsByRootAndName;let c=l[o];void 0===c&&(c={},l[o]=c);for(let h=0;h!==i;++h){const e=r[h],i=e.name;let l=c[i];if(void 0!==l)++l.referenceCount,s[h]=l;else{if(l=s[h],void 0!==l){null===l._cacheIndex&&(++l.referenceCount,this._addInactiveBinding(l,o,i));continue}const r=t&&t._propertyBindings[h].binding.parsedPath;l=new Kd(rp.create(n,i,r),e.ValueTypeName,e.getValueSize()),++l.referenceCount,this._addInactiveBinding(l,o,i),s[h]=l}a[h].resultBuffer=l.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),s=this._accuIndex^=1;for(let l=0;l!==n;++l){t[l]._update(r,e,i,s)}const a=this._bindings,o=this._nActiveBindings;for(let l=0;l!==o;++l)a[l].apply(s);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,vp).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const xp=new hr,bp=new hr;class Ep{constructor(e=new hr,t=new hr){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){xp.subVectors(e,this.start),bp.subVectors(this.end,this.start);const n=bp.dot(bp);let r=bp.dot(xp)/n;return t&&(r=Mn(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const _p=new hr;class Sp extends ui{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new is,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,a=1,o=32;s1)for(let c=0;c.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{qp.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(qp,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class $p extends wc{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new is;n.setAttribute("position",new qi(t,3)),n.setAttribute("color",new qi([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));super(n,new Ac({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,n){const r=new Bi,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class ef{constructor(){this.type="ShapePath",this.color=new Bi,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new oh,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,s){return this.currentPath.bezierCurveTo(e,t,n,r,i,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(e,t){const n=t.length;let r=!1;for(let i=n-1,s=0;sNumber.EPSILON){if(l<0&&(n=t[s],o=-o,a=t[i],l=-l),e.ya.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-o*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(a.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=a.x)return!0}}return r}const n=Wh.isClockWise,r=this.subPaths;if(0===r.length)return[];let i,s,a;const o=[];if(1===r.length)return s=r[0],a=new xh,a.curves=s.curves,o.push(a),o;let l=!n(r[0].getPoints());l=e?!l:l;const c=[],h=[];let u,d,p=[],f=0;h[f]=void 0,p[f]=[];for(let m=0,g=r.length;m1){let e=!1,n=0;for(let t=0,r=h.length;t0&&!1===e&&(p=c)}for(let m=0,g=h.length;m{e.exports=JSON.parse('{"pluginId":"about","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"defaultSidebar":[{"type":"link","label":"About","href":"/about/","docId":"index"},{"type":"link","label":"Description and architecture","href":"/about/architect","docId":"architect"},{"type":"link","label":"Development roadmap","href":"/about/roadmap","docId":"roadmap"},{"type":"link","label":"Core contributors","href":"/about/team","docId":"team"},{"type":"link","label":"The Waku Network","href":"/about/waku-network","docId":"waku-network"}]},"docs":{"architect":{"id":"architect","title":"Description and architecture","description":"Waku is a family of protocols that enable private, censorship-resistant communications over an open-source, decentralised network. By communications, we mean the exchange of data or messages between two or more entities, whether they are users, devices, or nodes.","sidebar":"defaultSidebar"},"index":{"id":"index","title":"About","description":"Waku is a suite of generalised messaging protocols aiming to be the communication standard for the decentralised web. It enables private and secure human-to-human, machine-to-machine, and human-to-machine communication without reliance on centralised intermediaries. Messaging through Waku is possible from one-to-one to many-to-many.","sidebar":"defaultSidebar"},"roadmap":{"id":"roadmap","title":"Development roadmap","description":"Waku v1 is in production and was quickly adopted by the Status Mobile application. Yet, this initial version was unable to handle the scale required to support popular applications, prompting the v2 rewrite. Waku v2 has seen encouraging initial adoption beyond Status by projects such as Railgun\'s private transaction system and The Graph\'s indexer communication network Graphcast.","sidebar":"defaultSidebar"},"team":{"id":"team","title":"Core contributors","description":"Leading Waku\'s R&D efforts is Franck Royer. Franck draws on more than five years of experience within the blockchain and crypto ecosystem, and over 13 years as a software engineer and team lead with a primary focus on backend development for mission-critical applications.","sidebar":"defaultSidebar"},"waku-network":{"id":"waku-network","title":"The Waku Network","description":"The Waku Network Gen 0 is the first iteration of a public network for peer-to-peer messaging built on the Waku protocol stack. Its goal is to offer a permissionless, auto-scalable, DoS protected shared messaging layer for the decentralized web.","sidebar":"defaultSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/79dc5662.32ed59b6.js b/assets/js/79dc5662.32ed59b6.js new file mode 100644 index 00000000..91a31d16 --- /dev/null +++ b/assets/js/79dc5662.32ed59b6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[888],{95788:(e,t,i)=>{i.d(t,{Iu:()=>c,yg:()=>p});var n=i(11504);function o(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function r(e){for(var t=1;t=0||(o[i]=e[i]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}var l=n.createContext({}),u=function(e){var t=n.useContext(l),i=t;return e&&(i="function"==typeof e?e(t):r(r({},t),e)),i},c=function(e){var t=u(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",h={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},y=n.forwardRef((function(e,t){var i=e.components,o=e.mdxType,a=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),d=u(i),y=o,p=d["".concat(l,".").concat(y)]||d[y]||h[y]||a;return i?n.createElement(p,r(r({ref:t},c),{},{components:i})):n.createElement(p,r({ref:t},c))}));function p(e,t){var i=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=i.length,r=new Array(a);r[0]=y;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:o,r[1]=s;for(var u=2;u{i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>u});var n=i(45072),o=(i(11504),i(95788));const a={displayed_sidebar:null,sidebar_class_name:"hidden",pagination_prev:null,pagination_next:null},r="Terms of Use",s={unversionedId:"terms",id:"terms",title:"Terms of Use",description:"Last updated: 14 February 2024",source:"@site/root-pages/terms.md",sourceDirName:".",slug:"/terms",permalink:"/terms",draft:!1,tags:[],version:"current",frontMatter:{displayed_sidebar:null,sidebar_class_name:"hidden",pagination_prev:null,pagination_next:null}},l={},u=[{value:"1) Who we are",id:"1-who-we-are",level:3},{value:"2) Disclaimers",id:"2-disclaimers",level:3},{value:"3) Forward looking statements",id:"3-forward-looking-statements",level:3},{value:"4) Intellectual property rights",id:"4-intellectual-property-rights",level:3},{value:"5) Third-party website links",id:"5-third-party-website-links",level:3},{value:"6) Limitation of liability",id:"6-limitation-of-liability",level:3},{value:"7) Indemnity",id:"7-indemnity",level:3},{value:"8) Modifications",id:"8-modifications",level:3},{value:"9) Governing law",id:"9-governing-law",level:3},{value:"10) Disputes",id:"10-disputes",level:3},{value:"11) About these Website Terms of Use",id:"11-about-these-website-terms-of-use",level:3}],c={toc:u},d="wrapper";function h(e){let{components:t,...i}=e;return(0,o.yg)(d,(0,n.c)({},c,i,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("h1",{id:"terms-of-use"},"Terms of Use"),(0,o.yg)("p",null,"Last updated: 14 February 2024"),(0,o.yg)("p",null,"These website terms of use ('",(0,o.yg)("strong",{parentName:"p"},"Website Terms of Use"),"') are entered into by you and us, and they govern your access and use of this Website, including any content and functionality contained in the Website."),(0,o.yg)("p",null,"It is your responsibility to read the Website Terms of Use carefully before your use of the Website and your use of the Website means you have agreed to be bound and comply with these Website Terms of Use."),(0,o.yg)("p",null,"If you do not agree with these Website Terms of Use, you must not access or use the Website."),(0,o.yg)("h3",{id:"1-who-we-are"},"1) Who we are"),(0,o.yg)("p",null,"For the purposes of these Website Terms of Use, the relevant entity is the Logos Collective Association, which has its registered office in Zug and its legal domicile address at:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre"},"Logos Collective Association\nc/o PST Consulting GmbH\nBaarerstrasse 10\n6300 Zug\nSwitzerland\n")),(0,o.yg)("p",null,"Whenever we refer to \u201cLogos\u201d, \u201cwe\u201d, \u201cus\u201d or any other similar references, we are referring to the Logos Collective Association."),(0,o.yg)("h3",{id:"2-disclaimers"},"2) Disclaimers"),(0,o.yg)("p",null,"The Website is provided by us on an \u2018as is\u2019 basis and you use the Website at your own sole discretion and risk."),(0,o.yg)("p",null,"We disclaim all warranties of any kind, express or implied, including without limitation the warranties of merchantability, fitness for a particular purpose, and non-infringement of intellectual property or other violation of rights. We do not warrant or make any representations concerning the completeness, accuracy, legality, utility, reliability, suitability or availability of the use of the Website, the content on this Website or otherwise relating to the Website, such content or on any sites linked to this site.These disclaimers will apply to the maximum extent permitted by applicable law."),(0,o.yg)("p",null,"We make no claims that the Website or any of its content is accessible, legally compliant or appropriate in your jurisdiction. Your access or use of the Website is at your own sole discretion and you are solely responsible for complying with any applicable local laws."),(0,o.yg)("p",null,"The content herein or as accessible through this website is intended to be made available for informational purposes only and should not be considered as creating any expectations or forming the basis of any contract, commitment or binding obligation with us. No information herein shall be considered to contain or be relied upon as a promise, representation, warranty or guarantee, whether express or implied and whether as to the past, present or the future in relation to the projects and matters described herein."),(0,o.yg)("p",null,"The information contained herein does not constitute financial, legal, tax, or other advice and should not be treated as such."),(0,o.yg)("p",null,"Nothing in this Website should be construed by you as an offer to buy or sell, or soliciting any offer to buy or sell any tokens or any security."),(0,o.yg)("h3",{id:"3-forward-looking-statements"},"3) Forward looking statements"),(0,o.yg)("p",null,"The Website may also contain forward-looking statements that are based on current expectations, estimates, forecasts, assumptions and projections about the technology, industry and markets in general."),(0,o.yg)("p",null,"The forward looking statements, which may include statements about the roadmap, project descriptions, technical details, functionalities, features, the development and use of tokens by projects, and any other statements related to such matters or as accessible through this website are subject to a high degree of risk and uncertainty. The forward looking statements are subject to change based on, among other things, market conditions, technical developments, and regulatory environment. The actual development and results, including the order and the timeline, might vary from what\u2019s presented. The information contained herein is a summary and does not purport to be accurate, reliable or complete and we bear no responsibility for the accuracy, reliability or completeness of information contained herein. Because of the high degree of risk and uncertainty described above, you should not place undue reliance on any matters described in this website or as accessible through this website."),(0,o.yg)("p",null,"While we aim to update our website regularly, all information, including the timeline and the specifics of each stage, is subject to change and may be amended or supplemented at any time, without notice and at our sole discretion."),(0,o.yg)("h3",{id:"4-intellectual-property-rights"},"4) Intellectual property rights"),(0,o.yg)("p",null,"The Website and its contents are made available under Creative Commons Attribution 4.0 International license (CC-BY 4.0). In essence this licence allows users to copy, modify and distribute the content in any format for any purpose, including commercial use, subject to certain requirements such as attributing us. For the full terms of this licence, please refer to the following website: ",(0,o.yg)("a",{parentName:"p",href:"https://creativecommons.org/licenses/by/4.0/"},"https://creativecommons.org/licenses/by/4.0/"),"."),(0,o.yg)("h3",{id:"5-third-party-website-links"},"5) Third-party website links"),(0,o.yg)("p",null,"To the extent the Website provides any links to a third party website, then their terms and conditions, including privacy policies, govern your use of those third party websites. By linking such third party websites, Status does not represent or imply that it endorses or supports such third party websites or content therein, or that it believes such third party websites and content therein to be accurate, useful or non-harmful. We have no control over such third party websites and will not be liable for your use of or activities on any third party websites accessed through the Website. If you access such third party websites through the Website, it is at your own risk and you are solely responsible for your activities on such third party websites."),(0,o.yg)("h3",{id:"6-limitation-of-liability"},"6) Limitation of liability"),(0,o.yg)("p",null,"We will not be held liable to you under any contract, negligence, strict liability, or other legal or equitable theory for any lost profits, cost of procurement for substitute services, or any special, incidental, or consequential damages related to, arising from, or in any way connected with these Website Terms of Use, the Website, the content on the Website, or your use of the Website, even if we have been advised of the possibility of such damages. In any event, our aggregate liability for such claims is limited to EUR 100 (one hundred Euros). This limitation of liability will apply to the maximum extent permitted by applicable law."),(0,o.yg)("h3",{id:"7-indemnity"},"7) Indemnity"),(0,o.yg)("p",null,"You shall indemnify us and hold us harmless from and against any and all claims, damages and expenses, including attorneys\u2019 fees, arising from or related to your use of the Website, the content on the Website, including without limitation your violation of these Website Terms of Use."),(0,o.yg)("h3",{id:"8-modifications"},"8) Modifications"),(0,o.yg)("p",null,"We may modify or replace any part of this Website Terms of Use at any time and without notice. You are responsible for checking the Website periodically for any changes. The new Website Terms of Use will be effective immediately upon its posting on the Website."),(0,o.yg)("h3",{id:"9-governing-law"},"9) Governing law"),(0,o.yg)("p",null,"Swiss law governs these Website Terms of Use and any disputes between you and us, whether in court or arbitration, without regard to conflict of laws provisions."),(0,o.yg)("h3",{id:"10-disputes"},"10) Disputes"),(0,o.yg)("p",null,"In these terms, \u201cdispute\u201d has the broadest meaning enforceable by law and includes any claim you make against or controversy you may have in relation to these Website Terms of Use, the Website, the content on the Website, or your use of the Website."),(0,o.yg)("p",null,"We prefer arbitration over litigation as we believe it meets our principle of resolving disputes in the most effective and cost effective manner. You are bound by the following arbitration clause, which waives your right to litigation and to be heard by a judge. Please note that court review of an arbitration award is limited. You also waive all your rights to a jury trial (if any) in any and all jurisdictions."),(0,o.yg)("p",null,"If a (potential) dispute arises, you must first use your reasonable efforts to resolve it amicably with us. If these efforts do not result in a resolution of such dispute, you shall then send us a written notice of dispute setting out (i) the nature of the dispute, and the claim you are making; and (ii) the remedy you are seeking."),(0,o.yg)("p",null,"If we and you are unable to further resolve this dispute within sixty (60) calendar days of us receiving this notice of dispute, then any such dispute will be referred to and finally resolved by you and us through an arbitration administered by the Swiss Chambers\u2019 Arbitration Institution in accordance with the Swiss Rules of International Arbitration for the time being in force, which rules are deemed to be incorporated herein by reference. The arbitral decision may be enforced in any court. The arbitration will be held in Zug, Switzerland, and may be conducted via video conference virtual/online methods if possible. The tribunal will consist of one arbitrator, and all proceedings as well as communications between the parties will be kept confidential. The language of the arbitration will be in English. Payment of all relevant fees in respect of the arbitration, including filing, administration and arbitrator fees will be in accordance with the Swiss Rules of International Arbitration."),(0,o.yg)("p",null,"Regardless of any applicable statute of limitations, you must bring any claims within one year after the claim arose or the time when you should have reasonably known about the claim. You also waive the right to participate in a class action lawsuit or a classwide arbitration against us."),(0,o.yg)("h3",{id:"11-about-these-website-terms-of-use"},"11) About these Website Terms of Use"),(0,o.yg)("p",null,"These Website Terms of Use cover the entire agreement between you and us regarding the Website and supersede all prior and contemporaneous understandings, agreements, representations and warranties, both written and oral, with respect to the Website."),(0,o.yg)("p",null,"The captions and headings identifying sections and subsections of these Website Terms of Use are for reference only and do not define, modify, expand, limit, or affect the interpretation of any provisions of these Website Terms of Use."),(0,o.yg)("p",null,"If any part of these Website Terms of Use is held invalid or unenforceable, that part will be severable from these Website Terms of Use, and the remaining portions will remain in full force and effect. If we fail to enforce any of these Website Terms of Use, that does not mean that we have waived our right to enforce them."),(0,o.yg)("p",null,"If you have any specific questions about these Website Terms of Use, please contact us at ",(0,o.yg)("a",{parentName:"p",href:"mailto:legal@free.technology"},"legal@free.technology"),"."),(0,o.yg)("p",null,"This document is licensed under CC-BY-SA."))}h.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/81bf376d.c4cd8e75.js b/assets/js/81bf376d.c4cd8e75.js new file mode 100644 index 00000000..c0dd3473 --- /dev/null +++ b/assets/js/81bf376d.c4cd8e75.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[600],{95788:(e,t,o)=>{o.d(t,{Iu:()=>p,yg:()=>h});var a=o(11504);function r(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}return o}function n(e){for(var t=1;t=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}var l=a.createContext({}),c=function(e){var t=a.useContext(l),o=t;return e&&(o="function"==typeof e?e(t):n(n({},t),e)),o},p=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},y=a.forwardRef((function(e,t){var o=e.components,r=e.mdxType,i=e.originalType,l=e.parentName,p=s(e,["components","mdxType","originalType","parentName"]),u=c(o),y=r,h=u["".concat(l,".").concat(y)]||u[y]||d[y]||i;return o?a.createElement(h,n(n({ref:t},p),{},{components:o})):a.createElement(h,n({ref:t},p))}));function h(e,t){var o=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var i=o.length,n=new Array(i);n[0]=y;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:r,n[1]=s;for(var c=2;c{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>n,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>c});var a=o(45072),r=(o(11504),o(95788));const i={displayed_sidebar:null,sidebar_class_name:"hidden",pagination_prev:null,pagination_next:null},n="Privacy Policy",s={unversionedId:"privacy-policy",id:"privacy-policy",title:"Privacy Policy",description:"Last updated: 9 February 2024",source:"@site/root-pages/privacy-policy.md",sourceDirName:".",slug:"/privacy-policy",permalink:"/privacy-policy",draft:!1,tags:[],version:"current",frontMatter:{displayed_sidebar:null,sidebar_class_name:"hidden",pagination_prev:null,pagination_next:null}},l={},c=[{value:"1) Who we are",id:"1-who-we-are",level:3},{value:"2) We limit the collection and processing of personal data from your use of the Website",id:"2-we-limit-the-collection-and-processing-of-personal-data-from-your-use-of-the-website",level:3},{value:"3) Third party processing of personal data",id:"3-third-party-processing-of-personal-data",level:3},{value:"4) Security measures we take in respect of the Website",id:"4-security-measures-we-take-in-respect-of-the-website",level:3},{value:"5) Exporting data outside the European Union and Switzerland",id:"5-exporting-data-outside-the-european-union-and-switzerland",level:3},{value:"6) Your choices and rights",id:"6-your-choices-and-rights",level:3},{value:"7) Third party links",id:"7-third-party-links",level:3},{value:"8) This Privacy Policy might change",id:"8-this-privacy-policy-might-change",level:3},{value:"9) Contact information",id:"9-contact-information",level:3}],p={toc:c},u="wrapper";function d(e){let{components:t,...o}=e;return(0,r.yg)(u,(0,a.c)({},p,o,{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"privacy-policy"},"Privacy Policy"),(0,r.yg)("p",null,"Last updated: 9 February 2024"),(0,r.yg)("p",null,"This Privacy Policy is intended to inform users of our approach to privacy in respect of this website (",(0,r.yg)("strong",{parentName:"p"},'"Website"'),"). In this regard, if you are visiting our Website, this Privacy Policy applies to you."),(0,r.yg)("h3",{id:"1-who-we-are"},"1) Who we are"),(0,r.yg)("p",null,"For the purposes of this Privacy Policy and the collection and processing of personal data as a controller, the relevant entity is the Logos Collective Association, which has its registered office in Zug and its legal domicile address at"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"Logos Collective Association\nc/o PST Consulting GmbH\nBaarerstrasse 10\n6300 Zug\nSwitzerland\n")),(0,r.yg)("p",null,"Whenever we refer to \u201cLogos\u201d, \u201cwe\u201d or other similar references, we are referring to the Logos Collective Association."),(0,r.yg)("h3",{id:"2-we-limit-the-collection-and-processing-of-personal-data-from-your-use-of-the-website"},"2) We limit the collection and processing of personal data from your use of the Website"),(0,r.yg)("p",null,"We aim to limit the collection and collection and processing of personal data from users of the Website. We only collect and process certain personal data for specific purposes and where we have the legal basis to do so under applicable privacy legislation. We will not collect or process any personal data that we don\u2019t need and where we do store any personal data, we will only store it for the least amount of time needed for the indicated purpose. "),(0,r.yg)("p",null,"In this regard, we collect and process the following personal data from your use of the Website: "),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"IP address"),": As part of such use of the Website we briefly process your IP address but we have no way of identifying you. We however have a legitimate interest in processing such IP addresses to ensure the technical functionality and enhance the security measures of the Website. This IP address is not stored by us over time.")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Collection of email addresses"),': We collect your email address and first name (or if preferred, your pseudonym), on our website for the purpose of sending you information in relation to the project (s) on this website concerning technical and non-technical content and updates, as well as potentially invitations to project related events. Your email address is securely stored on our self-hosted servers, and we have implemented measures to protect such personal data by securing it with appropriate technical and organisational measures. We will not share such personal data to third parties without your consent, except as required by law. We will only collect and process your email address, first name and if applicable, your pseudonym on the basis of you providing your consent for us to do so. If you wish to stop receiving our email communications, you can do so by clicking the "unsubscribe" link in the emails you receive from us.')),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},(0,r.yg)("strong",{parentName:"p"},"Fathom Analytics"),": We note that we make use of Fathom Analytics, which you can read more about here: ",(0,r.yg)("a",{parentName:"p",href:"https://usefathom.com/"},"https://usefathom.com/"),". In short, Fathom Analytics is an alternative to Google Analytics, that doesn\u2019t compromise visitor privacy for data. Fathom Analytics collects trends and insights, not personal details about specific website visitors. Fathom Analytics offers simple traffic insights such as top pages, top referrers, bounce rate, and average time people spend on a site."))),(0,r.yg)("h3",{id:"3-third-party-processing-of-personal-data"},"3) Third party processing of personal data"),(0,r.yg)("p",null,"In addition to our limited and collection of personal data, third parties may collect or process personal data as a result of the Website making use of certain features or to provide certain content. To the extent you interact with such third party content or features, their respective privacy policies will apply. "),(0,r.yg)("p",null,"We would however like to draw your attention to the following: "),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("strong",{parentName:"li"},"Youtube"),": The Website may embed videos from Youtube, a service provided by Google LLC, using Youtube\u2019s privacy-enhanced mode. When you interact with such videos, Youtube may place cookies on your personal device. The cookies do not directly identify individual users and YouTube will not store information to personalise your experience unless you are logged in to a Google account. We do not have any control over these cookies set by Youtube and it is recommended that you review YouTube\u2019s embedding videos information page.")),(0,r.yg)("h3",{id:"4-security-measures-we-take-in-respect-of-the-website"},"4) Security measures we take in respect of the Website"),(0,r.yg)("p",null,"As a general approach, we take data security seriously and we have implemented a variety of security measures on the Website to maintain the safety of your personal data when you submit such information to us. "),(0,r.yg)("h3",{id:"5-exporting-data-outside-the-european-union-and-switzerland"},"5) Exporting data outside the European Union and Switzerland"),(0,r.yg)("p",null,"We are obliged to protect the privacy of personal data that you may have submitted in the unlikely event that we export your personal data to places outside the European Union or Switzerland. This means that personal data will only be processed in countries or by parties that provide an adequate level of protection as deemed by Switzerland or the European Commission. Otherwise, we will use other forms of protections, such as specific forms of contractual clauses to ensure such personal data is provided the same protection as required in Switzerland or Europe. In any event, the transmission of personal data outside the European Union and Switzerland will always occur in conformity with applicable privacy legislation. "),(0,r.yg)("h3",{id:"6-your-choices-and-rights"},"6) Your choices and rights"),(0,r.yg)("p",null,"As explained in this Privacy Policy, we limit our collection and processing of your personal data wherever possible. Nonetheless, you still have certain choices and rights in respect of the personal data which we do collect and process. As laid out in relevant privacy legislation, you have the right to:"),(0,r.yg)("ul",null,(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"Ask us to correct or update your personal data (where reasonably possible);")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"Ask us to remove your personal data from our systems;")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"Ask us for a copy of your personal data, which may also be transferred to another data controller at your request;")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"Withdraw your consent to process your personal data (only if consent was asked for a processing activity), which only affects processing activities that are based on your consent and doesn\u2019t affect the validity of such processing activities before you have withdrawn your consent;")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"Object to the processing of your personal data; and")),(0,r.yg)("li",{parentName:"ul"},(0,r.yg)("p",{parentName:"li"},"File a complaint with the Federal Data Protection and Information Commissioner (FDPIC), if you believe that your personal data has been processed unlawfully."))),(0,r.yg)("h3",{id:"7-third-party-links"},"7) Third party links"),(0,r.yg)("p",null,"On this Website, you may come across links to third party websites. These third party sites have separate and independent privacy policies. We therefore have no responsibility or liability for the content and activities of these third party websites."),(0,r.yg)("h3",{id:"8-this-privacy-policy-might-change"},"8) This Privacy Policy might change"),(0,r.yg)("p",null,"We may modify or replace any part of this Privacy Policy at any time and without notice. Please check the Website periodically for any changes. The new Privacy Policy will be effective immediately upon its posting on our Website."),(0,r.yg)("h3",{id:"9-contact-information"},"9) Contact information"),(0,r.yg)("p",null,"To the extent that you have any questions about the Privacy Policy, please contact us at ",(0,r.yg)("a",{parentName:"p",href:"mailto:legal@free.technology"},"legal@free.technology"),"."),(0,r.yg)("p",null,"This document is licensed under CC-BY-SA."))}d.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/848.3792785a.js b/assets/js/848.3792785a.js new file mode 100644 index 00000000..de8758d1 --- /dev/null +++ b/assets/js/848.3792785a.js @@ -0,0 +1 @@ +(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[848],{61707:(n,t,e)=>{n.exports=function(){function n(t,e,i){function r(a,u){if(!e[a]){if(!t[a]){if(c)return c(a,!0);var o=new Error("Cannot find module '"+a+"'");throw o.code="MODULE_NOT_FOUND",o}var s=e[a]={exports:{}};t[a][0].call(s.exports,(function(n){return r(t[a][1][n]||n)}),s,s.exports,n,t,e,i)}return e[a].exports}for(var c=void 0,a=0;a0&&void 0!==arguments[0]?arguments[0]:{},i=e.defaultLayoutOptions,c=void 0===i?{}:i,u=e.algorithms,o=void 0===u?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:u,s=e.workerFactory,h=e.workerUrl;if(r(this,n),this.defaultLayoutOptions=c,this.initialized=!1,void 0===h&&void 0===s)throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var f=s;void 0!==h&&void 0===s&&(f=function(n){return new Worker(n)});var l=f(h);if("function"!=typeof l.postMessage)throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new a(l),this.worker.postMessage({cmd:"register",algorithms:o}).then((function(n){return t.initialized=!0})).catch(console.err)}return i(n,[{key:"layout",value:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.layoutOptions,i=void 0===e?this.defaultLayoutOptions:e,r=t.logging,c=void 0!==r&&r,a=t.measureExecutionTime,u=void 0!==a&&a;return n?this.worker.postMessage({cmd:"layout",graph:n,layoutOptions:i,options:{logging:c,measureExecutionTime:u}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker.terminate()}}]),n}();e.default=c;var a=function(){function n(t){var e=this;if(r(this,n),void 0===t)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=t,this.worker.onmessage=function(n){setTimeout((function(){e.receive(e,n)}),0)}}return i(n,[{key:"postMessage",value:function(n){var t=this.id||0;this.id=t+1,n.id=t;var e=this;return new Promise((function(i,r){e.resolvers[t]=function(n,t){n?(e.convertGwtStyleError(n),r(n)):i(t)},e.worker.postMessage(n)}))}},{key:"receive",value:function(n,t){var e=t.data,i=n.resolvers[e.id];i&&(delete n.resolvers[e.id],e.error?i(e.error):i(null,e.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(n){if(n){var t=n.__java$exception;t&&(t.cause&&t.cause.backingJsObject&&(n.cause=t.cause.backingJsObject,this.convertGwtStyleError(n.cause)),delete n.__java$exception)}}}]),n}()},{}],2:[function(n,t,i){(function(n){(function(){"use strict";var e;function r(){}function c(){}function a(){}function u(){}function o(){}function s(){}function h(){}function f(){}function l(){}function b(){}function w(){}function d(){}function g(){}function p(){}function v(){}function m(){}function y(){}function k(){}function j(){}function E(){}function T(){}function M(){}function S(){}function P(){}function C(){}function I(){}function O(){}function A(){}function $(){}function L(){}function N(){}function x(){}function D(){}function R(){}function K(){}function _(){}function F(){}function B(){}function H(){}function q(){}function G(){}function z(){}function U(){}function X(){}function W(){}function V(){}function Q(){}function J(){}function Y(){}function Z(){}function nn(){}function tn(){}function en(){}function rn(){}function cn(){}function an(){}function un(){}function on(){}function sn(){}function hn(){}function fn(){}function ln(){}function bn(){}function wn(){}function dn(){}function gn(){}function pn(){}function vn(){}function mn(){}function yn(){}function kn(){}function jn(){}function En(){}function Tn(){}function Mn(){}function Sn(){}function Pn(){}function Cn(){}function In(){}function On(){}function An(){}function $n(){}function Ln(){}function Nn(){}function xn(){}function Dn(){}function Rn(){}function Kn(){}function _n(){}function Fn(){}function Bn(){}function Hn(){}function qn(){}function Gn(){}function zn(){}function Un(){}function Xn(){}function Wn(){}function Vn(){}function Qn(){}function Jn(){}function Yn(){}function Zn(){}function nt(){}function tt(){}function et(){}function it(){}function rt(){}function ct(){}function at(){}function ut(){}function ot(){}function st(){}function ht(){}function ft(){}function lt(){}function bt(){}function wt(){}function dt(){}function gt(){}function pt(){}function vt(){}function mt(){}function yt(){}function kt(){}function jt(){}function Et(){}function Tt(){}function Mt(){}function St(){}function Pt(){}function Ct(){}function It(){}function Ot(){}function At(){}function $t(){}function Lt(){}function Nt(){}function xt(){}function Dt(){}function Rt(){}function Kt(){}function _t(){}function Ft(){}function Bt(){}function Ht(){}function qt(){}function Gt(){}function zt(){}function Ut(){}function Xt(){}function Wt(){}function Vt(){}function Qt(){}function Jt(){}function Yt(){}function Zt(){}function ne(){}function te(){}function ee(){}function ie(){}function re(){}function ce(){}function ae(){}function ue(){}function oe(){}function se(){}function he(){}function fe(){}function le(){}function be(){}function we(){}function de(){}function ge(){}function pe(){}function ve(){}function me(){}function ye(){}function ke(){}function je(){}function Ee(){}function Te(){}function Me(){}function Se(){}function Pe(){}function Ce(){}function Ie(){}function Oe(){}function Ae(){}function $e(){}function Le(){}function Ne(){}function xe(){}function De(){}function Re(){}function Ke(){}function _e(){}function Fe(){}function Be(){}function He(){}function qe(){}function Ge(){}function ze(){}function Ue(){}function Xe(){}function We(){}function Ve(){}function Qe(){}function Je(){}function Ye(){}function Ze(){}function ni(){}function ti(){}function ei(){}function ii(){}function ri(){}function ci(){}function ai(){}function ui(){}function oi(){}function si(){}function hi(){}function fi(){}function li(){}function bi(){}function wi(){}function di(){}function gi(){}function pi(){}function vi(){}function mi(){}function yi(){}function ki(){}function ji(){}function Ei(){}function Ti(){}function Mi(){}function Si(){}function Pi(){}function Ci(){}function Ii(){}function Oi(){}function Ai(){}function $i(){}function Li(){}function Ni(){}function xi(){}function Di(){}function Ri(){}function Ki(){}function _i(){}function Fi(){}function Bi(){}function Hi(){}function qi(){}function Gi(){}function zi(){}function Ui(){}function Xi(){}function Wi(){}function Vi(){}function Qi(){}function Ji(){}function Yi(){}function Zi(){}function nr(){}function tr(){}function er(){}function ir(){}function rr(){}function cr(){}function ar(){}function ur(){}function or(){}function sr(){}function hr(){}function fr(){}function lr(){}function br(){}function wr(){}function dr(){}function gr(){}function pr(){}function vr(){}function mr(){}function yr(){}function kr(){}function jr(){}function Er(){}function Tr(){}function Mr(){}function Sr(){}function Pr(){}function Cr(){}function Ir(){}function Or(){}function Ar(){}function $r(){}function Lr(){}function Nr(){}function xr(){}function Dr(){}function Rr(){}function Kr(){}function _r(){}function Fr(){}function Br(){}function Hr(){}function qr(){}function Gr(){}function zr(){}function Ur(){}function Xr(){}function Wr(){}function Vr(){}function Qr(){}function Jr(){}function Yr(){}function Zr(){}function nc(){}function tc(){}function ec(){}function ic(){}function rc(){}function cc(){}function ac(){}function uc(){}function oc(){}function sc(){}function hc(){}function fc(){}function lc(){}function bc(){}function wc(){}function dc(){}function gc(){}function pc(){}function vc(){}function mc(){}function yc(){}function kc(){}function jc(){}function Ec(){}function Tc(){}function Mc(){}function Sc(){}function Pc(){}function Cc(){}function Ic(){}function Oc(){}function Ac(){}function $c(){}function Lc(){}function Nc(){}function xc(){}function Dc(){}function Rc(){}function Kc(){}function _c(){}function Fc(){}function Bc(){}function Hc(){}function qc(){}function Gc(){}function zc(){}function Uc(){}function Xc(){}function Wc(){}function Vc(){}function Qc(){}function Jc(){}function Yc(){}function Zc(){}function na(){}function ta(){}function ea(){}function ia(){}function ra(){}function ca(){}function aa(){}function ua(){}function oa(){}function sa(){}function ha(){}function fa(){}function la(){}function ba(){}function wa(){}function da(){}function ga(){}function pa(){}function va(){}function ma(){}function ya(){}function ka(){}function ja(){}function Ea(){}function Ta(){}function Ma(){}function Sa(){}function Pa(){}function Ca(){}function Ia(){}function Oa(){}function Aa(){}function $a(){}function La(){}function Na(){}function xa(){}function Da(){}function Ra(){}function Ka(){}function _a(){}function Fa(){}function Ba(){}function Ha(){}function qa(){}function Ga(){}function za(){}function Ua(){}function Xa(){}function Wa(){}function Va(){}function Qa(){}function Ja(){}function Ya(){}function Za(){}function nu(){}function tu(){}function eu(){}function iu(){}function ru(){}function cu(){}function au(){}function uu(){}function ou(){}function su(){}function hu(){}function fu(){}function lu(){}function bu(){}function wu(){}function du(){}function gu(){}function pu(){}function vu(){}function mu(){}function yu(){}function ku(){}function ju(){}function Eu(){}function Tu(){}function Mu(){}function Su(){}function Pu(){}function Cu(){}function Iu(){}function Ou(){}function Au(){}function $u(){}function Lu(){}function Nu(){}function xu(){}function Du(){}function Ru(){}function Ku(){}function _u(){}function Fu(){}function Bu(){}function Hu(){}function qu(){}function Gu(){}function zu(){}function Uu(){}function Xu(){}function Wu(){}function Vu(){}function Qu(){}function Ju(){}function Yu(){}function Zu(){}function no(){}function to(){}function eo(){}function io(){}function ro(){}function co(){}function ao(){}function uo(){}function oo(){}function so(){}function ho(){}function fo(){}function lo(){}function bo(){}function wo(){}function go(){}function po(){}function vo(){}function mo(){}function yo(){}function ko(){}function jo(){}function Eo(){}function To(){}function Mo(){}function So(){}function Po(){}function Co(){}function Io(){}function Oo(){}function Ao(){}function $o(){}function Lo(){}function No(){}function xo(){}function Do(){}function Ro(){}function Ko(){}function _o(){}function Fo(){}function Bo(){}function Ho(){}function qo(){}function Go(){}function zo(){}function Uo(){}function Xo(){}function Wo(){}function Vo(){}function Qo(){}function Jo(){}function Yo(){}function Zo(){}function ns(){}function ts(){}function es(){}function is(){}function rs(){}function cs(){}function as(){}function us(){}function os(){}function ss(){}function hs(){}function fs(){}function ls(){}function bs(){}function ws(){}function ds(){}function gs(){}function ps(){}function vs(){}function ms(){}function ys(){}function ks(){}function js(){}function Es(){}function Ts(){}function Ms(){}function Ss(){}function Ps(){}function Cs(){}function Is(){}function Os(){}function As(){}function $s(){}function Ls(){}function Ns(){}function xs(){}function Ds(){}function Rs(){}function Ks(){}function _s(){}function Fs(){}function Bs(){}function Hs(){}function qs(){}function Gs(){}function zs(){}function Us(){}function Xs(){}function Ws(){}function Vs(){}function Qs(){}function Js(){}function Ys(){}function Zs(){}function nh(){}function th(){}function eh(){}function ih(){}function rh(){}function ch(){}function ah(){}function uh(){}function oh(){}function sh(){}function hh(){}function fh(){}function lh(){}function bh(){}function wh(){}function dh(){}function gh(){}function ph(){}function vh(){}function mh(){}function yh(){}function kh(){}function jh(){}function Eh(){}function Th(){}function Mh(){}function Sh(){}function Ph(){}function Ch(){}function Ih(){}function Oh(){}function Ah(){}function $h(){}function Lh(){}function Nh(){}function xh(){}function Dh(){}function Rh(){}function Kh(){}function _h(n){}function Fh(n){}function Bh(){iy()}function Hh(){Gsn()}function qh(){Epn()}function Gh(){_kn()}function zh(){jSn()}function Uh(){fRn()}function Xh(){Kyn()}function Wh(){rkn()}function Vh(){EM()}function Qh(){mM()}function Jh(){q_()}function Yh(){TM()}function Zh(){Irn()}function nf(){SM()}function tf(){I6()}function ef(){Pin()}function rf(){Q8()}function cf(){_Z()}function af(){zsn()}function uf(){_Mn()}function of(){Cin()}function sf(){U2()}function hf(){fWn()}function ff(){Gyn()}function lf(){FZ()}function bf(){HXn()}function wf(){RZ()}function df(){Iin()}function gf(){Jun()}function pf(){GZ()}function vf(){C9()}function mf(){PM()}function yf(){KAn()}function kf(){Uyn()}function jf(){Fcn()}function Ef(){MMn()}function Tf(){bRn()}function Mf(){Bvn()}function Sf(){CAn()}function Pf(){Ran()}function Cf(){HZ()}function If(){s_n()}function Of(){$An()}function Af(){W$n()}function $f(){x9()}function Lf(){SMn()}function Nf(){sWn()}function xf(){Xsn()}function Df(){vdn()}function Rf(){qBn()}function Kf(){u_()}function _f(){wcn()}function Ff(){fFn()}function Bf(n){kW(n)}function Hf(n){this.a=n}function qf(n){this.a=n}function Gf(n){this.a=n}function zf(n){this.a=n}function Uf(n){this.a=n}function Xf(n){this.a=n}function Wf(n){this.a=n}function Vf(n){this.a=n}function Qf(n){this.a=n}function Jf(n){this.a=n}function Yf(n){this.a=n}function Zf(n){this.a=n}function nl(n){this.a=n}function tl(n){this.a=n}function el(n){this.a=n}function il(n){this.a=n}function rl(n){this.a=n}function cl(n){this.a=n}function al(n){this.a=n}function ul(n){this.a=n}function ol(n){this.a=n}function sl(n){this.b=n}function hl(n){this.c=n}function fl(n){this.a=n}function ll(n){this.a=n}function bl(n){this.a=n}function wl(n){this.a=n}function dl(n){this.a=n}function gl(n){this.a=n}function pl(n){this.a=n}function vl(n){this.a=n}function ml(n){this.a=n}function yl(n){this.a=n}function kl(n){this.a=n}function jl(n){this.a=n}function El(n){this.a=n}function Tl(n){this.a=n}function Ml(n){this.a=n}function Sl(n){this.a=n}function Pl(n){this.a=n}function Cl(){this.a=[]}function Il(n,t){n.a=t}function Ol(n,t){n.a=t}function Al(n,t){n.b=t}function $l(n,t){n.b=t}function Ll(n,t){n.b=t}function Nl(n,t){n.j=t}function xl(n,t){n.g=t}function Dl(n,t){n.i=t}function Rl(n,t){n.c=t}function Kl(n,t){n.d=t}function _l(n,t){n.d=t}function Fl(n,t){n.c=t}function Bl(n,t){n.k=t}function Hl(n,t){n.c=t}function ql(n,t){n.c=t}function Gl(n,t){n.a=t}function zl(n,t){n.a=t}function Ul(n,t){n.f=t}function Xl(n,t){n.a=t}function Wl(n,t){n.b=t}function Vl(n,t){n.d=t}function Ql(n,t){n.i=t}function Jl(n,t){n.o=t}function Yl(n,t){n.r=t}function Zl(n,t){n.a=t}function nb(n,t){n.b=t}function tb(n,t){n.e=t}function eb(n,t){n.f=t}function ib(n,t){n.g=t}function rb(n,t){n.e=t}function cb(n,t){n.f=t}function ab(n,t){n.f=t}function ub(n,t){n.n=t}function ob(n,t){n.a=t}function sb(n,t){n.a=t}function hb(n,t){n.c=t}function fb(n,t){n.c=t}function lb(n,t){n.d=t}function bb(n,t){n.e=t}function wb(n,t){n.g=t}function db(n,t){n.a=t}function gb(n,t){n.c=t}function pb(n,t){n.d=t}function vb(n,t){n.e=t}function mb(n,t){n.f=t}function yb(n,t){n.j=t}function kb(n,t){n.a=t}function jb(n,t){n.b=t}function Eb(n,t){n.a=t}function Tb(n){n.b=n.a}function Mb(n){n.c=n.d.d}function Sb(n){this.d=n}function Pb(n){this.a=n}function Cb(n){this.a=n}function Ib(n){this.a=n}function Ob(n){this.a=n}function Ab(n){this.a=n}function $b(n){this.a=n}function Lb(n){this.a=n}function Nb(n){this.a=n}function xb(n){this.a=n}function Db(n){this.a=n}function Rb(n){this.a=n}function Kb(n){this.a=n}function _b(n){this.a=n}function Fb(n){this.a=n}function Bb(n){this.b=n}function Hb(n){this.b=n}function qb(n){this.b=n}function Gb(n){this.a=n}function zb(n){this.a=n}function Ub(n){this.a=n}function Xb(n){this.c=n}function Wb(n){this.c=n}function Vb(n){this.c=n}function Qb(n){this.a=n}function Jb(n){this.a=n}function Yb(n){this.a=n}function Zb(n){this.a=n}function nw(n){this.a=n}function tw(n){this.a=n}function ew(n){this.a=n}function iw(n){this.a=n}function rw(n){this.a=n}function cw(n){this.a=n}function aw(n){this.a=n}function uw(n){this.a=n}function ow(n){this.a=n}function sw(n){this.a=n}function hw(n){this.a=n}function fw(n){this.a=n}function lw(n){this.a=n}function bw(n){this.a=n}function ww(n){this.a=n}function dw(n){this.a=n}function gw(n){this.a=n}function pw(n){this.a=n}function vw(n){this.a=n}function mw(n){this.a=n}function yw(n){this.a=n}function kw(n){this.a=n}function jw(n){this.a=n}function Ew(n){this.a=n}function Tw(n){this.a=n}function Mw(n){this.a=n}function Sw(n){this.a=n}function Pw(n){this.a=n}function Cw(n){this.a=n}function Iw(n){this.a=n}function Ow(n){this.a=n}function Aw(n){this.a=n}function $w(n){this.a=n}function Lw(n){this.a=n}function Nw(n){this.a=n}function xw(n){this.a=n}function Dw(n){this.a=n}function Rw(n){this.a=n}function Kw(n){this.a=n}function _w(n){this.a=n}function Fw(n){this.a=n}function Bw(n){this.e=n}function Hw(n){this.a=n}function qw(n){this.a=n}function Gw(n){this.a=n}function zw(n){this.a=n}function Uw(n){this.a=n}function Xw(n){this.a=n}function Ww(n){this.a=n}function Vw(n){this.a=n}function Qw(n){this.a=n}function Jw(n){this.a=n}function Yw(n){this.a=n}function Zw(n){this.a=n}function nd(n){this.a=n}function td(n){this.a=n}function ed(n){this.a=n}function id(n){this.a=n}function rd(n){this.a=n}function cd(n){this.a=n}function ad(n){this.a=n}function ud(n){this.a=n}function od(n){this.a=n}function sd(n){this.a=n}function hd(n){this.a=n}function fd(n){this.a=n}function ld(n){this.a=n}function bd(n){this.a=n}function wd(n){this.a=n}function dd(n){this.a=n}function gd(n){this.a=n}function pd(n){this.a=n}function vd(n){this.a=n}function md(n){this.a=n}function yd(n){this.a=n}function kd(n){this.a=n}function jd(n){this.a=n}function Ed(n){this.a=n}function Td(n){this.a=n}function Md(n){this.a=n}function Sd(n){this.a=n}function Pd(n){this.a=n}function Cd(n){this.a=n}function Id(n){this.a=n}function Od(n){this.a=n}function Ad(n){this.a=n}function $d(n){this.a=n}function Ld(n){this.a=n}function Nd(n){this.a=n}function xd(n){this.a=n}function Dd(n){this.a=n}function Rd(n){this.a=n}function Kd(n){this.a=n}function _d(n){this.a=n}function Fd(n){this.a=n}function Bd(n){this.c=n}function Hd(n){this.b=n}function qd(n){this.a=n}function Gd(n){this.a=n}function zd(n){this.a=n}function Ud(n){this.a=n}function Xd(n){this.a=n}function Wd(n){this.a=n}function Vd(n){this.a=n}function Qd(n){this.a=n}function Jd(n){this.a=n}function Yd(n){this.a=n}function Zd(n){this.a=n}function ng(n){this.a=n}function tg(n){this.a=n}function eg(n){this.a=n}function ig(n){this.a=n}function rg(n){this.a=n}function cg(n){this.a=n}function ag(n){this.a=n}function ug(n){this.a=n}function og(n){this.a=n}function sg(n){this.a=n}function hg(n){this.a=n}function fg(n){this.a=n}function lg(n){this.a=n}function bg(n){this.a=n}function wg(n){this.a=n}function dg(n){this.a=n}function gg(n){this.a=n}function pg(n){this.a=n}function vg(n){this.a=n}function mg(n){this.a=n}function yg(n){this.a=n}function kg(n){this.a=n}function jg(n){this.a=n}function Eg(n){this.a=n}function Tg(n){this.a=n}function Mg(n){this.a=n}function Sg(n){this.a=n}function Pg(n){this.a=n}function Cg(n){this.a=n}function Ig(n){this.a=n}function Og(n){this.a=n}function Ag(n){this.a=n}function $g(n){this.a=n}function Lg(n){this.a=n}function Ng(n){this.a=n}function xg(n){this.a=n}function Dg(n){this.a=n}function Rg(n){this.a=n}function Kg(n){this.a=n}function _g(n){this.a=n}function Fg(n){this.a=n}function Bg(n){this.a=n}function Hg(n){this.a=n}function qg(n){this.a=n}function Gg(n){this.a=n}function zg(n){this.a=n}function Ug(n){this.a=n}function Xg(n){this.a=n}function Wg(n){this.a=n}function Vg(n){this.a=n}function Qg(n){this.a=n}function Jg(n){this.a=n}function Yg(n){this.a=n}function Zg(n){this.a=n}function np(n){this.a=n}function tp(n){this.a=n}function ep(n){this.a=n}function ip(n){this.a=n}function rp(n){this.a=n}function cp(n){this.a=n}function ap(n){this.a=n}function up(n){this.b=n}function op(n){this.f=n}function sp(n){this.a=n}function hp(n){this.a=n}function fp(n){this.a=n}function lp(n){this.a=n}function bp(n){this.a=n}function wp(n){this.a=n}function dp(n){this.a=n}function gp(n){this.a=n}function pp(n){this.a=n}function vp(n){this.a=n}function mp(n){this.a=n}function yp(n){this.b=n}function kp(n){this.c=n}function jp(n){this.e=n}function Ep(n){this.a=n}function Tp(n){this.a=n}function Mp(n){this.a=n}function Sp(n){this.a=n}function Pp(n){this.a=n}function Cp(n){this.d=n}function Ip(n){this.a=n}function Op(n){this.a=n}function Ap(n){this.e=n}function $p(){this.a=0}function Lp(){DA(this)}function Np(){xA(this)}function xp(){$U(this)}function Dp(){wV(this)}function Rp(){_h(this)}function Kp(){this.c=L$t}function _p(n,t){t.Wb(n)}function Fp(n,t){n.b+=t}function Bp(n){n.b=new ok}function Hp(n){return n.e}function qp(n){return n.a}function Gp(n){return n.a}function zp(n){return n.a}function Up(n){return n.a}function Xp(n){return n.a}function Wp(){return null}function Vp(){return null}function Qp(){aE(),dXn()}function Jp(n){n.b.tf(n.e)}function Yp(n,t){n.b=t-n.b}function Zp(n,t){n.a=t-n.a}function nv(n,t){t.ad(n.a)}function tv(n,t){qCn(t,n)}function ev(n,t,e){n.Od(e,t)}function iv(n,t){n.e=t,t.b=n}function rv(n){s_(),this.a=n}function cv(n){s_(),this.a=n}function av(n){s_(),this.a=n}function uv(n){WX(),this.a=n}function ov(n){PJ(),ett.be(n)}function sv(){gN.call(this)}function hv(){gN.call(this)}function fv(){sv.call(this)}function lv(){sv.call(this)}function bv(){sv.call(this)}function wv(){sv.call(this)}function dv(){sv.call(this)}function gv(){sv.call(this)}function pv(){sv.call(this)}function vv(){sv.call(this)}function mv(){sv.call(this)}function yv(){sv.call(this)}function kv(){sv.call(this)}function jv(){this.a=this}function Ev(){this.Bb|=256}function Tv(){this.b=new PO}function Mv(){Mv=O,new xp}function Sv(){fv.call(this)}function Pv(n,t){n.length=t}function Cv(n,t){WB(n.a,t)}function Iv(n,t){USn(n.c,t)}function Ov(n,t){TU(n.b,t)}function Av(n,t){Ivn(n.a,t)}function $v(n,t){Oln(n.a,t)}function Lv(n,t){ban(n.e,t)}function Nv(n){AOn(n.c,n.b)}function xv(n,t){n.kc().Nb(t)}function Dv(n){this.a=gbn(n)}function Rv(){this.a=new xp}function Kv(){this.a=new xp}function _v(){this.a=new Np}function Fv(){this.a=new Np}function Bv(){this.a=new Np}function Hv(){this.a=new kn}function qv(){this.a=new k6}function Gv(){this.a=new bt}function zv(){this.a=new WT}function Uv(){this.a=new D0}function Xv(){this.a=new cZ}function Wv(){this.a=new AR}function Vv(){this.a=new Np}function Qv(){this.a=new Np}function Jv(){this.a=new Np}function Yv(){this.a=new Np}function Zv(){this.d=new Np}function nm(){this.a=new Rv}function tm(){this.a=new xp}function em(){this.b=new xp}function im(){this.b=new Np}function rm(){this.e=new Np}function cm(){this.d=new Np}function am(){this.a=new uf}function um(){Np.call(this)}function om(){_v.call(this)}function sm(){NR.call(this)}function hm(){Qv.call(this)}function fm(){lm.call(this)}function lm(){Rp.call(this)}function bm(){Rp.call(this)}function wm(){bm.call(this)}function dm(){dJ.call(this)}function gm(){dJ.call(this)}function pm(){Wm.call(this)}function vm(){Wm.call(this)}function mm(){Wm.call(this)}function ym(){Vm.call(this)}function km(){JT.call(this)}function jm(){eo.call(this)}function Em(){eo.call(this)}function Tm(){ny.call(this)}function Mm(){ny.call(this)}function Sm(){xp.call(this)}function Pm(){xp.call(this)}function Cm(){xp.call(this)}function Im(){Rv.call(this)}function Om(){jin.call(this)}function Am(){Ev.call(this)}function $m(){OL.call(this)}function Lm(){OL.call(this)}function Nm(){xp.call(this)}function xm(){xp.call(this)}function Dm(){xp.call(this)}function Rm(){yo.call(this)}function Km(){yo.call(this)}function _m(){Rm.call(this)}function Fm(){Dh.call(this)}function Bm(n){dtn.call(this,n)}function Hm(n){dtn.call(this,n)}function qm(n){Qf.call(this,n)}function Gm(n){MT.call(this,n)}function zm(n){Gm.call(this,n)}function Um(n){MT.call(this,n)}function Xm(){this.a=new JT}function Wm(){this.a=new Rv}function Vm(){this.a=new xp}function Qm(){this.a=new Np}function Jm(){this.j=new Np}function Ym(){this.a=new Xa}function Zm(){this.a=new LE}function ny(){this.a=new mo}function ty(){ty=O,_nt=new xk}function ey(){ey=O,Knt=new Nk}function iy(){iy=O,Ont=new c}function ry(){ry=O,znt=new cN}function cy(n){Gm.call(this,n)}function ay(n){Gm.call(this,n)}function uy(n){d4.call(this,n)}function oy(n){d4.call(this,n)}function sy(n){VK.call(this,n)}function hy(n){ySn.call(this,n)}function fy(n){CT.call(this,n)}function ly(n){OT.call(this,n)}function by(n){OT.call(this,n)}function wy(n){OT.call(this,n)}function dy(n){fz.call(this,n)}function gy(n){dy.call(this,n)}function py(){Pl.call(this,{})}function vy(n){CL(),this.a=n}function my(n){n.b=null,n.c=0}function yy(n,t){n.e=t,Cxn(n,t)}function ky(n,t){n.a=t,aCn(n)}function jy(n,t,e){n.a[t.g]=e}function Ey(n,t,e){wjn(e,n,t)}function Ty(n,t){ZR(t.i,n.n)}function My(n,t){ssn(n).td(t)}function Sy(n,t){return n*n/t}function Py(n,t){return n.g-t.g}function Cy(n){return new Sl(n)}function Iy(n){return new GX(n)}function Oy(n){dy.call(this,n)}function Ay(n){dy.call(this,n)}function $y(n){dy.call(this,n)}function Ly(n){fz.call(this,n)}function Ny(n){_cn(),this.a=n}function xy(n){a_(),this.a=n}function Dy(n){FG(),this.f=n}function Ry(n){FG(),this.f=n}function Ky(n){dy.call(this,n)}function _y(n){dy.call(this,n)}function Fy(n){dy.call(this,n)}function By(n){dy.call(this,n)}function Hy(n){dy.call(this,n)}function qy(n){return kW(n),n}function Gy(n){return kW(n),n}function zy(n){return kW(n),n}function Uy(n){return kW(n),n}function Xy(n){return kW(n),n}function Wy(n){return n.b==n.c}function Vy(n){return!!n&&n.b}function Qy(n){return!!n&&n.k}function Jy(n){return!!n&&n.j}function Yy(n){kW(n),this.a=n}function Zy(n){return Zon(n),n}function nk(n){vU(n,n.length)}function tk(n){dy.call(this,n)}function ek(n){dy.call(this,n)}function ik(n){dy.call(this,n)}function rk(n){dy.call(this,n)}function ck(n){dy.call(this,n)}function ak(n){dy.call(this,n)}function uk(n){ZN.call(this,n,0)}function ok(){o1.call(this,12,3)}function sk(){sk=O,ttt=new j}function hk(){hk=O,Jnt=new r}function fk(){fk=O,rtt=new g}function lk(){lk=O,htt=new v}function bk(){throw Hp(new pv)}function wk(){throw Hp(new pv)}function dk(){throw Hp(new pv)}function gk(){throw Hp(new pv)}function pk(){throw Hp(new pv)}function vk(){throw Hp(new pv)}function mk(){this.a=SD(yX(FWn))}function yk(n){s_(),this.a=yX(n)}function kk(n,t){n.Td(t),t.Sd(n)}function jk(n,t){n.a.ec().Mc(t)}function Ek(n,t,e){n.c.lf(t,e)}function Tk(n){Ay.call(this,n)}function Mk(n){_y.call(this,n)}function Sk(){Ab.call(this,"")}function Pk(){Ab.call(this,"")}function Ck(){Ab.call(this,"")}function Ik(){Ab.call(this,"")}function Ok(n){Ay.call(this,n)}function Ak(n){Hb.call(this,n)}function $k(n){bN.call(this,n)}function Lk(n){Ak.call(this,n)}function Nk(){tl.call(this,null)}function xk(){tl.call(this,null)}function Dk(){Dk=O,PJ()}function Rk(){Rk=O,ket=mEn()}function Kk(n){return n.a?n.b:0}function _k(n){return n.a?n.b:0}function Fk(n,t){return n.a-t.a}function Bk(n,t){return n.a-t.a}function Hk(n,t){return n.a-t.a}function qk(n,t){return m7(n,t)}function Gk(n,t){return gZ(n,t)}function zk(n,t){return t in n.a}function Uk(n,t){return n.f=t,n}function Xk(n,t){return n.b=t,n}function Wk(n,t){return n.c=t,n}function Vk(n,t){return n.g=t,n}function Qk(n,t){return n.a=t,n}function Jk(n,t){return n.f=t,n}function Yk(n,t){return n.k=t,n}function Zk(n,t){return n.a=t,n}function nj(n,t){return n.e=t,n}function tj(n,t){return n.e=t,n}function ej(n,t){return n.f=t,n}function ij(n,t){n.b=!0,n.d=t}function rj(n,t){n.b=new wA(t)}function cj(n,t,e){t.td(n.a[e])}function aj(n,t,e){t.we(n.a[e])}function uj(n,t){return n.b-t.b}function oj(n,t){return n.g-t.g}function sj(n,t){return n.s-t.s}function hj(n,t){return n?0:t-1}function fj(n,t){return n?0:t-1}function lj(n,t){return n?t-1:0}function bj(n,t){return t.Yf(n)}function wj(n,t){return n.b=t,n}function dj(n,t){return n.a=t,n}function gj(n,t){return n.c=t,n}function pj(n,t){return n.d=t,n}function vj(n,t){return n.e=t,n}function mj(n,t){return n.f=t,n}function yj(n,t){return n.a=t,n}function kj(n,t){return n.b=t,n}function jj(n,t){return n.c=t,n}function Ej(n,t){return n.c=t,n}function Tj(n,t){return n.b=t,n}function Mj(n,t){return n.d=t,n}function Sj(n,t){return n.e=t,n}function Pj(n,t){return n.f=t,n}function Cj(n,t){return n.g=t,n}function Ij(n,t){return n.a=t,n}function Oj(n,t){return n.i=t,n}function Aj(n,t){return n.j=t,n}function $j(n,t){return n.k=t,n}function Lj(n,t){return n.j=t,n}function Nj(n,t){_Mn(),CZ(t,n)}function xj(n,t,e){GG(n.a,t,e)}function Dj(n){BV.call(this,n)}function Rj(n){BV.call(this,n)}function Kj(n){n_.call(this,n)}function _j(n){qbn.call(this,n)}function Fj(n){gtn.call(this,n)}function Bj(n){pQ.call(this,n)}function Hj(n){pQ.call(this,n)}function qj(){O$.call(this,"")}function Gj(){this.a=0,this.b=0}function zj(){this.b=0,this.a=0}function Uj(n,t){n.b=0,Nen(n,t)}function Xj(n,t){n.c=t,n.b=!0}function Wj(n,t){return n.c._b(t)}function Vj(n){return n.e&&n.e()}function Qj(n){return n?n.d:null}function Jj(n,t){return gfn(n.b,t)}function Yj(n){return n?n.g:null}function Zj(n){return n?n.i:null}function nE(n){return ED(n),n.o}function tE(){tE=O,dOt=Xkn()}function eE(){eE=O,gOt=oTn()}function iE(){iE=O,n$t=Vkn()}function rE(){rE=O,dLt=Wkn()}function cE(){cE=O,gLt=iCn()}function aE(){aE=O,lAt=cin()}function uE(){throw Hp(new pv)}function oE(){throw Hp(new pv)}function sE(){throw Hp(new pv)}function hE(){throw Hp(new pv)}function fE(){throw Hp(new pv)}function lE(){throw Hp(new pv)}function bE(n){this.a=new XT(n)}function wE(n){lUn(),DXn(this,n)}function dE(n){this.a=new Wz(n)}function gE(n,t){for(;n.ye(t););}function pE(n,t){for(;n.sd(t););}function vE(n,t){return n.a+=t,n}function mE(n,t){return n.a+=t,n}function yE(n,t){return n.a+=t,n}function kE(n,t){return n.a+=t,n}function jE(n){return EW(n),n.a}function EE(n){return n.b!=n.d.c}function TE(n){return n.l|n.m<<22}function ME(n,t){return n.d[t.p]}function SE(n,t){return Sxn(n,t)}function PE(n,t,e){n.splice(t,e)}function CE(n){n.c?NDn(n):xDn(n)}function IE(n){this.a=0,this.b=n}function OE(){this.a=new CNn(ijt)}function AE(){this.b=new CNn(qyt)}function $E(){this.b=new CNn(WEt)}function LE(){this.b=new CNn(WEt)}function NE(){throw Hp(new pv)}function xE(){throw Hp(new pv)}function DE(){throw Hp(new pv)}function RE(){throw Hp(new pv)}function KE(){throw Hp(new pv)}function _E(){throw Hp(new pv)}function FE(){throw Hp(new pv)}function BE(){throw Hp(new pv)}function HE(){throw Hp(new pv)}function qE(){throw Hp(new pv)}function GE(){throw Hp(new yv)}function zE(){throw Hp(new yv)}function UE(n){this.a=new XE(n)}function XE(n){Gin(this,n,OEn())}function WE(n){return!n||pW(n)}function VE(n){return-1!=WLt[n]}function QE(){0!=ctt&&(ctt=0),utt=-1}function JE(){null==PWn&&(PWn=[])}function YE(n,t){tAn(QQ(n.a),t)}function ZE(n,t){tAn(QQ(n.a),t)}function nT(n,t){HL.call(this,n,t)}function tT(n,t){nT.call(this,n,t)}function eT(n,t){this.b=n,this.c=t}function iT(n,t){this.b=n,this.a=t}function rT(n,t){this.a=n,this.b=t}function cT(n,t){this.a=n,this.b=t}function aT(n,t){this.a=n,this.b=t}function uT(n,t){this.a=n,this.b=t}function oT(n,t){this.a=n,this.b=t}function sT(n,t){this.a=n,this.b=t}function hT(n,t){this.a=n,this.b=t}function fT(n,t){this.a=n,this.b=t}function lT(n,t){this.b=n,this.a=t}function bT(n,t){this.b=n,this.a=t}function wT(n,t){this.b=n,this.a=t}function dT(n,t){this.b=n,this.a=t}function gT(n,t){this.f=n,this.g=t}function pT(n,t){this.e=n,this.d=t}function vT(n,t){this.g=n,this.i=t}function mT(n,t){this.a=n,this.b=t}function yT(n,t){this.a=n,this.f=t}function kT(n,t){this.b=n,this.c=t}function jT(n,t){this.a=n,this.b=t}function ET(n,t){this.a=n,this.b=t}function TT(n,t){this.a=n,this.b=t}function MT(n){aN(n.dc()),this.c=n}function ST(n){this.b=BB(yX(n),83)}function PT(n){this.a=BB(yX(n),83)}function CT(n){this.a=BB(yX(n),15)}function IT(n){this.a=BB(yX(n),15)}function OT(n){this.b=BB(yX(n),47)}function AT(){this.q=new e.Date}function $T(){$T=O,Btt=new A}function LT(){LT=O,bet=new P}function NT(n){return n.f.c+n.g.c}function xT(n,t){return n.b.Hc(t)}function DT(n,t){return n.b.Ic(t)}function RT(n,t){return n.b.Qc(t)}function KT(n,t){return n.b.Hc(t)}function _T(n,t){return n.c.uc(t)}function FT(n,t){return n.a._b(t)}function BT(n,t){return Nfn(n.c,t)}function HT(n,t){return hU(n.b,t)}function qT(n,t){return n>t&&t0}function sS(n,t){return Vhn(n,t)<0}function hS(n,t){return n.a.get(t)}function fS(n,t){return t.split(n)}function lS(n,t){return hU(n.e,t)}function bS(n){return kW(n),!1}function wS(n){w1.call(this,n,21)}function dS(n,t){_Y.call(this,n,t)}function gS(n,t){gT.call(this,n,t)}function pS(n,t){gT.call(this,n,t)}function vS(n){VX(),VK.call(this,n)}function mS(n,t){jG(n,n.length,t)}function yS(n,t){QU(n,n.length,t)}function kS(n,t,e){t.ud(n.a.Ge(e))}function jS(n,t,e){t.we(n.a.Fe(e))}function ES(n,t,e){t.td(n.a.Kb(e))}function TS(n,t,e){n.Mb(e)&&t.td(e)}function MS(n,t,e){n.splice(t,0,e)}function SS(n,t){return SN(n.e,t)}function PS(n,t){this.d=n,this.e=t}function CS(n,t){this.b=n,this.a=t}function IS(n,t){this.b=n,this.a=t}function OS(n,t){this.b=n,this.a=t}function AS(n,t){this.a=n,this.b=t}function $S(n,t){this.a=n,this.b=t}function LS(n,t){this.a=n,this.b=t}function NS(n,t){this.a=n,this.b=t}function xS(n,t){this.a=n,this.b=t}function DS(n,t){this.b=n,this.a=t}function RS(n,t){this.b=n,this.a=t}function KS(n,t){gT.call(this,n,t)}function _S(n,t){gT.call(this,n,t)}function FS(n,t){gT.call(this,n,t)}function BS(n,t){gT.call(this,n,t)}function HS(n,t){gT.call(this,n,t)}function qS(n,t){gT.call(this,n,t)}function GS(n,t){gT.call(this,n,t)}function zS(n,t){gT.call(this,n,t)}function US(n,t){gT.call(this,n,t)}function XS(n,t){gT.call(this,n,t)}function WS(n,t){gT.call(this,n,t)}function VS(n,t){gT.call(this,n,t)}function QS(n,t){gT.call(this,n,t)}function JS(n,t){gT.call(this,n,t)}function YS(n,t){gT.call(this,n,t)}function ZS(n,t){gT.call(this,n,t)}function nP(n,t){gT.call(this,n,t)}function tP(n,t){gT.call(this,n,t)}function eP(n,t){this.a=n,this.b=t}function iP(n,t){this.a=n,this.b=t}function rP(n,t){this.a=n,this.b=t}function cP(n,t){this.a=n,this.b=t}function aP(n,t){this.a=n,this.b=t}function uP(n,t){this.a=n,this.b=t}function oP(n,t){this.a=n,this.b=t}function sP(n,t){this.a=n,this.b=t}function hP(n,t){this.a=n,this.b=t}function fP(n,t){this.b=n,this.a=t}function lP(n,t){this.b=n,this.a=t}function bP(n,t){this.b=n,this.a=t}function wP(n,t){this.b=n,this.a=t}function dP(n,t){this.c=n,this.d=t}function gP(n,t){this.e=n,this.d=t}function pP(n,t){this.a=n,this.b=t}function vP(n,t){this.b=t,this.c=n}function mP(n,t){gT.call(this,n,t)}function yP(n,t){gT.call(this,n,t)}function kP(n,t){gT.call(this,n,t)}function jP(n,t){gT.call(this,n,t)}function EP(n,t){gT.call(this,n,t)}function TP(n,t){gT.call(this,n,t)}function MP(n,t){gT.call(this,n,t)}function SP(n,t){gT.call(this,n,t)}function PP(n,t){gT.call(this,n,t)}function CP(n,t){gT.call(this,n,t)}function IP(n,t){gT.call(this,n,t)}function OP(n,t){gT.call(this,n,t)}function AP(n,t){gT.call(this,n,t)}function $P(n,t){gT.call(this,n,t)}function LP(n,t){gT.call(this,n,t)}function NP(n,t){gT.call(this,n,t)}function xP(n,t){gT.call(this,n,t)}function DP(n,t){gT.call(this,n,t)}function RP(n,t){gT.call(this,n,t)}function KP(n,t){gT.call(this,n,t)}function _P(n,t){gT.call(this,n,t)}function FP(n,t){gT.call(this,n,t)}function BP(n,t){gT.call(this,n,t)}function HP(n,t){gT.call(this,n,t)}function qP(n,t){gT.call(this,n,t)}function GP(n,t){gT.call(this,n,t)}function zP(n,t){gT.call(this,n,t)}function UP(n,t){gT.call(this,n,t)}function XP(n,t){gT.call(this,n,t)}function WP(n,t){gT.call(this,n,t)}function VP(n,t){gT.call(this,n,t)}function QP(n,t){gT.call(this,n,t)}function JP(n,t){gT.call(this,n,t)}function YP(n,t){gT.call(this,n,t)}function ZP(n,t){this.b=n,this.a=t}function nC(n,t){this.a=n,this.b=t}function tC(n,t){this.a=n,this.b=t}function eC(n,t){this.a=n,this.b=t}function iC(n,t){this.a=n,this.b=t}function rC(n,t){gT.call(this,n,t)}function cC(n,t){gT.call(this,n,t)}function aC(n,t){this.b=n,this.d=t}function uC(n,t){gT.call(this,n,t)}function oC(n,t){gT.call(this,n,t)}function sC(n,t){this.a=n,this.b=t}function hC(n,t){this.a=n,this.b=t}function fC(n,t){gT.call(this,n,t)}function lC(n,t){gT.call(this,n,t)}function bC(n,t){gT.call(this,n,t)}function wC(n,t){gT.call(this,n,t)}function dC(n,t){gT.call(this,n,t)}function gC(n,t){gT.call(this,n,t)}function pC(n,t){gT.call(this,n,t)}function vC(n,t){gT.call(this,n,t)}function mC(n,t){gT.call(this,n,t)}function yC(n,t){gT.call(this,n,t)}function kC(n,t){gT.call(this,n,t)}function jC(n,t){gT.call(this,n,t)}function EC(n,t){gT.call(this,n,t)}function TC(n,t){gT.call(this,n,t)}function MC(n,t){gT.call(this,n,t)}function SC(n,t){gT.call(this,n,t)}function PC(n,t){return SN(n.c,t)}function CC(n,t){return SN(t.b,n)}function IC(n,t){return-n.b.Je(t)}function OC(n,t){return SN(n.g,t)}function AC(n,t){gT.call(this,n,t)}function $C(n,t){gT.call(this,n,t)}function LC(n,t){this.a=n,this.b=t}function NC(n,t){this.a=n,this.b=t}function xC(n,t){this.a=n,this.b=t}function DC(n,t){gT.call(this,n,t)}function RC(n,t){gT.call(this,n,t)}function KC(n,t){gT.call(this,n,t)}function _C(n,t){gT.call(this,n,t)}function FC(n,t){gT.call(this,n,t)}function BC(n,t){gT.call(this,n,t)}function HC(n,t){gT.call(this,n,t)}function qC(n,t){gT.call(this,n,t)}function GC(n,t){gT.call(this,n,t)}function zC(n,t){gT.call(this,n,t)}function UC(n,t){gT.call(this,n,t)}function XC(n,t){gT.call(this,n,t)}function WC(n,t){gT.call(this,n,t)}function VC(n,t){gT.call(this,n,t)}function QC(n,t){gT.call(this,n,t)}function JC(n,t){gT.call(this,n,t)}function YC(n,t){this.a=n,this.b=t}function ZC(n,t){this.a=n,this.b=t}function nI(n,t){this.a=n,this.b=t}function tI(n,t){this.a=n,this.b=t}function eI(n,t){this.a=n,this.b=t}function iI(n,t){this.a=n,this.b=t}function rI(n,t){this.a=n,this.b=t}function cI(n,t){gT.call(this,n,t)}function aI(n,t){this.a=n,this.b=t}function uI(n,t){this.a=n,this.b=t}function oI(n,t){this.a=n,this.b=t}function sI(n,t){this.a=n,this.b=t}function hI(n,t){this.a=n,this.b=t}function fI(n,t){this.a=n,this.b=t}function lI(n,t){this.b=n,this.a=t}function bI(n,t){this.b=n,this.a=t}function wI(n,t){this.b=n,this.a=t}function dI(n,t){this.b=n,this.a=t}function gI(n,t){this.a=n,this.b=t}function pI(n,t){this.a=n,this.b=t}function vI(n,t){YLn(n.a,BB(t,56))}function mI(n,t){v7(n.a,BB(t,11))}function yI(n,t){return hH(),t!=n}function kI(){return Rk(),new ket}function jI(){qZ(),this.b=new Rv}function EI(){dxn(),this.a=new Rv}function TI(){KZ(),KG.call(this)}function MI(n,t){gT.call(this,n,t)}function SI(n,t){this.a=n,this.b=t}function PI(n,t){this.a=n,this.b=t}function CI(n,t){this.a=n,this.b=t}function II(n,t){this.a=n,this.b=t}function OI(n,t){this.a=n,this.b=t}function AI(n,t){this.a=n,this.b=t}function $I(n,t){this.d=n,this.b=t}function LI(n,t){this.d=n,this.e=t}function NI(n,t){this.f=n,this.c=t}function xI(n,t){this.b=n,this.c=t}function DI(n,t){this.i=n,this.g=t}function RI(n,t){this.e=n,this.a=t}function KI(n,t){this.a=n,this.b=t}function _I(n,t){n.i=null,arn(n,t)}function FI(n,t){n&&VW(hAt,n,t)}function BI(n,t){return rdn(n.a,t)}function HI(n){return adn(n.c,n.b)}function qI(n){return n?n.dd():null}function GI(n){return null==n?null:n}function zI(n){return typeof n===$Wn}function UI(n){return typeof n===LWn}function XI(n){return typeof n===NWn}function WI(n,t){return n.Hd().Xb(t)}function VI(n,t){return Qcn(n.Kc(),t)}function QI(n,t){return 0==Vhn(n,t)}function JI(n,t){return Vhn(n,t)>=0}function YI(n,t){return 0!=Vhn(n,t)}function ZI(n){return""+(kW(n),n)}function nO(n,t){return n.substr(t)}function tO(n){return zbn(n),n.d.gc()}function eO(n){return zOn(n,n.c),n}function iO(n){return YH(null==n),n}function rO(n,t){return n.a+=""+t,n}function cO(n,t){return n.a+=""+t,n}function aO(n,t){return n.a+=""+t,n}function uO(n,t){return n.a+=""+t,n}function oO(n,t){return n.a+=""+t,n}function sO(n,t){return n.a+=""+t,n}function hO(n,t){r5(n,t,n.a,n.a.a)}function fO(n,t){r5(n,t,n.c.b,n.c)}function lO(n,t,e){Kjn(t,RPn(n,e))}function bO(n,t,e){Kjn(t,RPn(n,e))}function wO(n,t){Tnn(new AL(n),t)}function dO(n,t){n.q.setTime(j2(t))}function gO(n,t){zz.call(this,n,t)}function pO(n,t){zz.call(this,n,t)}function vO(n,t){zz.call(this,n,t)}function mO(n){$U(this),Tcn(this,n)}function yO(n){return l1(n,0),null}function kO(n){return n.a=0,n.b=0,n}function jO(n,t){return n.a=t.g+1,n}function EO(n,t){return 2==n.j[t.p]}function TO(n){return sX(BB(n,79))}function MO(){MO=O,Art=lhn(tpn())}function SO(){SO=O,Zot=lhn(ENn())}function PO(){this.b=new XT(etn(12))}function CO(){this.b=0,this.a=!1}function IO(){this.b=0,this.a=!1}function OO(n){this.a=n,Bh.call(this)}function AO(n){this.a=n,Bh.call(this)}function $O(n,t){iR.call(this,n,t)}function LO(n,t){tK.call(this,n,t)}function NO(n,t){DI.call(this,n,t)}function xO(n,t){Aan.call(this,n,t)}function DO(n,t){QN.call(this,n,t)}function RO(n,t){nS(),VW(mAt,n,t)}function KO(n,t){return fx(n.a,0,t)}function _O(n,t){return n.a.a.a.cc(t)}function FO(n,t){return GI(n)===GI(t)}function BO(n,t){return Pln(n.a,t.a)}function HO(n,t){return E$(n.a,t.a)}function qO(n,t){return FU(n.a,t.a)}function GO(n,t){return n.indexOf(t)}function zO(n,t){return n==t?0:n?1:-1}function UO(n){return n<10?"0"+n:""+n}function XO(n){return yX(n),new OO(n)}function WO(n){return M$(n.l,n.m,n.h)}function VO(n){return CY((kW(n),n))}function QO(n){return CY((kW(n),n))}function JO(n,t){return E$(n.g,t.g)}function YO(n){return typeof n===LWn}function ZO(n){return n==Zat||n==eut}function nA(n){return n==Zat||n==nut}function tA(n){return E7(n.b.b,n,0)}function eA(n){this.a=kI(),this.b=n}function iA(n){this.a=kI(),this.b=n}function rA(n,t){return WB(n.a,t),t}function cA(n,t){return WB(n.c,t),n}function aA(n,t){return Ycn(n.a,t),n}function uA(n,t){return G_(),t.a+=n}function oA(n,t){return G_(),t.a+=n}function sA(n,t){return G_(),t.c+=n}function hA(n,t){z9(n,0,n.length,t)}function fA(){ew.call(this,new v4)}function lA(){uG.call(this,0,0,0,0)}function bA(){UV.call(this,0,0,0,0)}function wA(n){this.a=n.a,this.b=n.b}function dA(n){return n==_Pt||n==FPt}function gA(n){return n==HPt||n==KPt}function pA(n){return n==fvt||n==hvt}function vA(n){return n!=QCt&&n!=JCt}function mA(n){return n.Lg()&&n.Mg()}function yA(n){return mV(BB(n,118))}function kA(n){return Ycn(new B2,n)}function jA(n,t){return new Aan(t,n)}function EA(n,t){return new Aan(t,n)}function TA(n,t,e){jen(n,t),Een(n,e)}function MA(n,t,e){Sen(n,t),Men(n,e)}function SA(n,t,e){Pen(n,t),Cen(n,e)}function PA(n,t,e){Ten(n,t),Oen(n,e)}function CA(n,t,e){Ien(n,t),Aen(n,e)}function IA(n,t){Dsn(n,t),xen(n,n.D)}function OA(n){NI.call(this,n,!0)}function AA(n,t,e){ND.call(this,n,t,e)}function $A(n){ODn(),san.call(this,n)}function LA(){gS.call(this,"Head",1)}function NA(){gS.call(this,"Tail",3)}function xA(n){n.c=x8(Ant,HWn,1,0,5,1)}function DA(n){n.a=x8(Ant,HWn,1,8,5,1)}function RA(n){Otn(n.xf(),new Sw(n))}function KA(n){return null!=n?nsn(n):0}function _A(n,t){return Ctn(t,WY(n))}function FA(n,t){return Ctn(t,WY(n))}function BA(n,t){return n[n.length]=t}function HA(n,t){return n[n.length]=t}function qA(n){return FB(n.b.Kc(),n.a)}function GA(n,t){return Uin(PX(n.d),t)}function zA(n,t){return Uin(PX(n.g),t)}function UA(n,t){return Uin(PX(n.j),t)}function XA(n,t){iR.call(this,n.b,t)}function WA(n){uG.call(this,n,n,n,n)}function VA(n){return n.b&&VBn(n),n.a}function QA(n){return n.b&&VBn(n),n.c}function JA(n,t){Qet||(n.b=t)}function YA(n,t,e){return $X(n,t,e),e}function ZA(n,t,e){$X(n.c[t.g],t.g,e)}function n$(n,t,e){BB(n.c,69).Xh(t,e)}function t$(n,t,e){SA(e,e.i+n,e.j+t)}function e$(n,t){f9(a4(n.a),e1(t))}function i$(n,t){f9(H7(n.a),i1(t))}function r$(n){wWn(),Ap.call(this,n)}function c$(n){return null==n?0:nsn(n)}function a$(){a$=O,syt=new Hbn(oCt)}function u$(){u$=O,new o$,new Np}function o$(){new xp,new xp,new xp}function s$(){s$=O,Mv(),itt=new xp}function h$(){h$=O,e.Math.log(2)}function f$(){f$=O,zM(),R$t=COt}function l$(){throw Hp(new tk(Tnt))}function b$(){throw Hp(new tk(Tnt))}function w$(){throw Hp(new tk(Mnt))}function d$(){throw Hp(new tk(Mnt))}function g$(n){this.a=n,QB.call(this,n)}function p$(n){this.a=n,ST.call(this,n)}function v$(n){this.a=n,ST.call(this,n)}function m$(n,t){yG(n.c,n.c.length,t)}function y$(n){return n.at?1:0}function T$(n,t){return Vhn(n,t)>0?n:t}function M$(n,t,e){return{l:n,m:t,h:e}}function S$(n,t){null!=n.a&&mI(t,n.a)}function P$(n){n.a=new $,n.c=new $}function C$(n){this.b=n,this.a=new Np}function I$(n){this.b=new et,this.a=n}function O$(n){LR.call(this),this.a=n}function A$(){gS.call(this,"Range",2)}function $$(){tjn(),this.a=new CNn(Uat)}function L$(n,t){yX(t),EV(n).Jc(new b)}function N$(n,t){return BZ(),t.n.b+=n}function x$(n,t,e){return VW(n.g,e,t)}function D$(n,t,e){return VW(n.k,e,t)}function R$(n,t){return VW(n.a,t.a,t)}function K$(n,t,e){return Idn(t,e,n.c)}function _$(n){return new xC(n.c,n.d)}function F$(n){return new xC(n.c,n.d)}function B$(n){return new xC(n.a,n.b)}function H$(n,t){return tzn(n.a,t,null)}function q$(n){SZ(n,null),MZ(n,null)}function G$(n){WZ(n,null),VZ(n,null)}function z$(){QN.call(this,null,null)}function U$(){JN.call(this,null,null)}function X$(n){this.a=n,xp.call(this)}function W$(n){this.b=(SQ(),new Xb(n))}function V$(n){n.j=x8(Ftt,sVn,310,0,0,1)}function Q$(n,t,e){n.c.Vc(t,BB(e,133))}function J$(n,t,e){n.c.ji(t,BB(e,133))}function Y$(n,t){sqn(n),n.Gc(BB(t,15))}function Z$(n,t){return Bqn(n.c,n.b,t)}function nL(n,t){return new pN(n.Kc(),t)}function tL(n,t){return-1!=Fun(n.Kc(),t)}function eL(n,t){return null!=n.a.Bc(t)}function iL(n){return n.Ob()?n.Pb():null}function rL(n){return Bdn(n,0,n.length)}function cL(n,t){return null!=n&&Qpn(n,t)}function aL(n,t){n.q.setHours(t),lBn(n,t)}function uL(n,t){n.c&&(RH(t),kY(t))}function oL(n,t,e){BB(n.Kb(e),164).Nb(t)}function sL(n,t,e){return HGn(n,t,e),e}function hL(n,t,e){n.a=1502^t,n.b=e^aJn}function fL(n,t,e){return n.a[t.g][e.g]}function lL(n,t){return n.a[t.c.p][t.p]}function bL(n,t){return n.e[t.c.p][t.p]}function wL(n,t){return n.c[t.c.p][t.p]}function dL(n,t){return n.j[t.p]=pLn(t)}function gL(n,t){return f6(n.f,t.tg())}function pL(n,t){return f6(n.b,t.tg())}function vL(n,t){return n.a0?t*t/n:t*t*100}function xx(n,t){return n>0?t/(n*n):100*t}function Dx(n,t,e){return WB(t,own(n,e))}function Rx(n,t,e){x9(),n.Xe(t)&&e.td(n)}function Kx(n,t,e){n.Zc(t).Rb(e)}function _x(n,t,e){return n.a+=t,n.b+=e,n}function Fx(n,t,e){return n.a*=t,n.b*=e,n}function Bx(n,t,e){return n.a-=t,n.b-=e,n}function Hx(n,t){return n.a=t.a,n.b=t.b,n}function qx(n){return n.a=-n.a,n.b=-n.b,n}function Gx(n){this.c=n,this.a=1,this.b=1}function zx(n){this.c=n,Pen(n,0),Cen(n,0)}function Ux(n){JT.call(this),nin(this,n)}function Xx(n){RXn(),Bp(this),this.mf(n)}function Wx(n,t){QM(),QN.call(this,n,t)}function Vx(n,t){JM(),JN.call(this,n,t)}function Qx(n,t){JM(),JN.call(this,n,t)}function Jx(n,t){JM(),Vx.call(this,n,t)}function Yx(n,t,e){y9.call(this,n,t,e,2)}function Zx(n,t){f$(),cG.call(this,n,t)}function nD(n,t){f$(),Zx.call(this,n,t)}function tD(n,t){f$(),Zx.call(this,n,t)}function eD(n,t){f$(),tD.call(this,n,t)}function iD(n,t){f$(),cG.call(this,n,t)}function rD(n,t){f$(),iD.call(this,n,t)}function cD(n,t){f$(),cG.call(this,n,t)}function aD(n,t){return n.c.Fc(BB(t,133))}function uD(n,t,e){return NHn(F7(n,t),e)}function oD(n,t,e){return t.Qk(n.e,n.c,e)}function sD(n,t,e){return t.Rk(n.e,n.c,e)}function hD(n,t){return tfn(n.e,BB(t,49))}function fD(n,t,e){sln(H7(n.a),t,i1(e))}function lD(n,t,e){sln(a4(n.a),t,e1(e))}function bD(n,t){t.$modCount=n.$modCount}function wD(){wD=O,Vkt=new up("root")}function dD(){dD=O,pAt=new Tm,new Mm}function gD(){this.a=new pY,this.b=new pY}function pD(){jin.call(this),this.Bb|=BQn}function vD(){gT.call(this,"GROW_TREE",0)}function mD(n){return null==n?null:wUn(n)}function yD(n){return null==n?null:LSn(n)}function kD(n){return null==n?null:Bbn(n)}function jD(n){return null==n?null:Bbn(n)}function ED(n){null==n.o&&g$n(n)}function TD(n){return YH(null==n||zI(n)),n}function MD(n){return YH(null==n||UI(n)),n}function SD(n){return YH(null==n||XI(n)),n}function PD(n){this.q=new e.Date(j2(n))}function CD(n,t){this.c=n,pT.call(this,n,t)}function ID(n,t){this.a=n,CD.call(this,n,t)}function OD(n,t){this.d=n,Mb(this),this.b=t}function AD(n,t){B8.call(this,n),this.a=t}function $D(n,t){B8.call(this,n),this.a=t}function LD(n){qwn.call(this,0,0),this.f=n}function ND(n,t,e){W6.call(this,n,t,e,null)}function xD(n,t,e){W6.call(this,n,t,e,null)}function DD(n,t,e){return n.ue(t,e)<=0?e:t}function RD(n,t,e){return n.ue(t,e)<=0?t:e}function KD(n,t){return BB(lnn(n.b,t),149)}function _D(n,t){return BB(lnn(n.c,t),229)}function FD(n){return BB(xq(n.a,n.b),287)}function BD(n){return new xC(n.c,n.d+n.a)}function HD(n){return BZ(),pA(BB(n,197))}function qD(){qD=O,$rt=nbn((mdn(),_It))}function GD(n,t){t.a?Fxn(n,t):MN(n.a,t.b)}function zD(n,t){Qet||WB(n.a,t)}function UD(n,t){return mM(),wan(t.d.i,n)}function XD(n,t){return Irn(),new cKn(t,n)}function WD(n,t){return OJ(t,uYn),n.f=t,n}function VD(n,t,e){return e=T_n(n,t,3,e)}function QD(n,t,e){return e=T_n(n,t,6,e)}function JD(n,t,e){return e=T_n(n,t,9,e)}function YD(n,t,e){++n.j,n.Ki(),L8(n,t,e)}function ZD(n,t,e){++n.j,n.Hi(t,n.oi(t,e))}function nR(n,t,e){n.Zc(t).Rb(e)}function tR(n,t,e){return ZBn(n.c,n.b,t,e)}function eR(n,t){return(t&DWn)%n.d.length}function iR(n,t){up.call(this,n),this.a=t}function rR(n,t){kp.call(this,n),this.a=t}function cR(n,t){kp.call(this,n),this.a=t}function aR(n,t){this.c=n,gtn.call(this,t)}function uR(n,t){this.a=n,yp.call(this,t)}function oR(n,t){this.a=n,yp.call(this,t)}function sR(n){this.a=(lin(n,AVn),new Y6(n))}function hR(n){this.a=(lin(n,AVn),new Y6(n))}function fR(n){return!n.a&&(n.a=new w),n.a}function lR(n){return n>8?0:n+1}function bR(n,t){return hN(),n==t?0:n?1:-1}function wR(n,t,e){return mG(n,BB(t,22),e)}function dR(n,t,e){return n.apply(t,e)}function gR(n,t,e){return n.a+=Bdn(t,0,e),n}function pR(n,t){var e;return e=n.e,n.e=t,e}function vR(n,t){n[iJn].call(n,t)}function mR(n,t){n[iJn].call(n,t)}function yR(n,t){n.a.Vc(n.b,t),++n.b,n.c=-1}function kR(n){$U(n.e),n.d.b=n.d,n.d.a=n.d}function jR(n){n.b?jR(n.b):n.f.c.zc(n.e,n.d)}function ER(n,t,e){dM(),Il(n,t.Ce(n.a,e))}function TR(n,t){return Qj(Mdn(n.a,t,!0))}function MR(n,t){return Qj(Sdn(n.a,t,!0))}function SR(n,t){return qk(new Array(t),n)}function PR(n){return String.fromCharCode(n)}function CR(n){return null==n?null:n.message}function IR(){this.a=new Np,this.b=new Np}function OR(){this.a=new bt,this.b=new Tv}function AR(){this.b=new Gj,this.c=new Np}function $R(){this.d=new Gj,this.e=new Gj}function LR(){this.n=new Gj,this.o=new Gj}function NR(){this.n=new bm,this.i=new bA}function xR(){this.a=new nf,this.b=new uc}function DR(){this.a=new Np,this.d=new Np}function RR(){this.b=new Rv,this.a=new Rv}function KR(){this.b=new xp,this.a=new xp}function _R(){this.b=new AE,this.a=new da}function FR(){NR.call(this),this.a=new Gj}function BR(n){Oan.call(this,n,(Z9(),Net))}function HR(n,t,e,i){uG.call(this,n,t,e,i)}function qR(n,t,e){null!=e&&Lin(t,Amn(n,e))}function GR(n,t,e){null!=e&&Nin(t,Amn(n,e))}function zR(n,t,e){return e=T_n(n,t,11,e)}function UR(n,t){return n.a+=t.a,n.b+=t.b,n}function XR(n,t){return n.a-=t.a,n.b-=t.b,n}function WR(n,t){return n.n.a=(kW(t),t+10)}function VR(n,t){return n.n.a=(kW(t),t+10)}function QR(n,t){return t==n||Sjn(CLn(t),n)}function JR(n,t){return null==VW(n.a,t,"")}function YR(n,t){return mM(),!wan(t.d.i,n)}function ZR(n,t){dA(n.f)?c$n(n,t):ITn(n,t)}function nK(n,t){return t.Hh(n.a)}function tK(n,t){Ay.call(this,e9n+n+o8n+t)}function eK(n,t,e,i){eU.call(this,n,t,e,i)}function iK(n,t,e,i){eU.call(this,n,t,e,i)}function rK(n,t,e,i){iK.call(this,n,t,e,i)}function cK(n,t,e,i){iU.call(this,n,t,e,i)}function aK(n,t,e,i){iU.call(this,n,t,e,i)}function uK(n,t,e,i){iU.call(this,n,t,e,i)}function oK(n,t,e,i){aK.call(this,n,t,e,i)}function sK(n,t,e,i){aK.call(this,n,t,e,i)}function hK(n,t,e,i){uK.call(this,n,t,e,i)}function fK(n,t,e,i){sK.call(this,n,t,e,i)}function lK(n,t,e,i){Zz.call(this,n,t,e,i)}function bK(n,t,e){this.a=n,ZN.call(this,t,e)}function wK(n,t,e){this.c=t,this.b=e,this.a=n}function dK(n,t,e){return n.d=BB(t.Kb(e),164)}function gK(n,t){return n.Aj().Nh().Kh(n,t)}function pK(n,t){return n.Aj().Nh().Ih(n,t)}function vK(n,t){return kW(n),GI(n)===GI(t)}function mK(n,t){return kW(n),GI(n)===GI(t)}function yK(n,t){return Qj(Mdn(n.a,t,!1))}function kK(n,t){return Qj(Sdn(n.a,t,!1))}function jK(n,t){return n.b.sd(new $S(n,t))}function EK(n,t){return n.b.sd(new LS(n,t))}function TK(n,t){return n.b.sd(new NS(n,t))}function MK(n,t,e){return n.lastIndexOf(t,e)}function SK(n,t,e){return Pln(n[t.b],n[e.b])}function PK(n,t){return hon(t,(HXn(),Rdt),n)}function CK(n,t){return E$(t.a.d.p,n.a.d.p)}function IK(n,t){return E$(n.a.d.p,t.a.d.p)}function OK(n,t){return Pln(n.c-n.s,t.c-t.s)}function AK(n){return n.c?E7(n.c.a,n,0):-1}function $K(n){return n<100?null:new Fj(n)}function LK(n){return n==UCt||n==WCt||n==XCt}function NK(n,t){return cL(t,15)&&QDn(n.c,t)}function xK(n,t){Qet||t&&(n.d=t)}function DK(n,t){return!!lsn(n,t)}function RK(n,t){this.c=n,GU.call(this,n,t)}function KK(n){this.c=n,vO.call(this,bVn,0)}function _K(n,t){YB.call(this,n,n.length,t)}function FK(n,t,e){return BB(n.c,69).lk(t,e)}function BK(n,t,e){return BB(n.c,69).mk(t,e)}function HK(n,t,e){return oD(n,BB(t,332),e)}function qK(n,t,e){return sD(n,BB(t,332),e)}function GK(n,t,e){return IEn(n,BB(t,332),e)}function zK(n,t,e){return QTn(n,BB(t,332),e)}function UK(n,t){return null==t?null:lfn(n.b,t)}function XK(n){return UI(n)?(kW(n),n):n.ke()}function WK(n){return!isNaN(n)&&!isFinite(n)}function VK(n){s_(),this.a=(SQ(),new Ak(n))}function QK(n){hH(),this.d=n,this.a=new Lp}function JK(n,t,e){this.a=n,this.b=t,this.c=e}function YK(n,t,e){this.a=n,this.b=t,this.c=e}function ZK(n,t,e){this.d=n,this.b=e,this.a=t}function n_(n){P$(this),yQ(this),Frn(this,n)}function t_(n){xA(this),tH(this.c,0,n.Pc())}function e_(n){fW(n.a),z8(n.c,n.b),n.b=null}function i_(n){this.a=n,$T(),fan(Date.now())}function r_(){r_=O,iit=new r,rit=new r}function c_(){c_=O,Tet=new L,Met=new N}function a_(){a_=O,wAt=x8(Ant,HWn,1,0,5,1)}function u_(){u_=O,M$t=x8(Ant,HWn,1,0,5,1)}function o_(){o_=O,S$t=x8(Ant,HWn,1,0,5,1)}function s_(){s_=O,new rv((SQ(),SQ(),set))}function h_(n){return Z9(),Cnn((n7(),_et),n)}function f_(n){return qsn(),Cnn((e8(),Zet),n)}function l_(n){return hpn(),Cnn((I4(),pit),n)}function b_(n){return Rnn(),Cnn((O4(),kit),n)}function w_(n){return tRn(),Cnn((xan(),Fit),n)}function d_(n){return Dtn(),Cnn((Z6(),Wit),n)}function g_(n){return Y9(),Cnn((n8(),trt),n)}function p_(n){return G7(),Cnn((t8(),urt),n)}function v_(n){return dWn(),Cnn((MO(),Art),n)}function m_(n){return Dan(),Cnn((e7(),_rt),n)}function y_(n){return Hpn(),Cnn((i7(),zrt),n)}function k_(n){return qpn(),Cnn((r7(),ict),n)}function j_(n){return wM(),Cnn((Q2(),act),n)}function E_(n){return Knn(),Cnn((A4(),_ct),n)}function T_(n){return q7(),Cnn((i8(),Lat),n)}function M_(n){return yMn(),Cnn((Xnn(),qat),n)}function S_(n){return Aun(),Cnn((t7(),rut),n)}function P_(n){return Bfn(),Cnn((r8(),gut),n)}function C_(n,t){if(!n)throw Hp(new _y(t))}function I_(n){return uSn(),Cnn((hen(),Aut),n)}function O_(n){uG.call(this,n.d,n.c,n.a,n.b)}function A_(n){uG.call(this,n.d,n.c,n.a,n.b)}function $_(n,t,e){this.b=n,this.c=t,this.a=e}function L_(n,t,e){this.b=n,this.a=t,this.c=e}function N_(n,t,e){this.a=n,this.b=t,this.c=e}function x_(n,t,e){this.a=n,this.b=t,this.c=e}function D_(n,t,e){this.a=n,this.b=t,this.c=e}function R_(n,t,e){this.a=n,this.b=t,this.c=e}function K_(n,t,e){this.b=n,this.a=t,this.c=e}function __(n,t,e){this.e=t,this.b=n,this.d=e}function F_(n,t,e){return dM(),n.a.Od(t,e),t}function B_(n){var t;return(t=new jn).e=n,t}function H_(n){var t;return(t=new Zv).b=n,t}function q_(){q_=O,Uut=new Ne,Xut=new xe}function G_(){G_=O,dst=new vr,gst=new mr}function z_(n){return Iun(),Cnn((a7(),ost),n)}function U_(n){return Oun(),Cnn((o7(),Est),n)}function X_(n){return kDn(),Cnn((Gcn(),Vst),n)}function W_(n){return $Pn(),Cnn((ben(),rht),n)}function V_(n){return V8(),Cnn((R4(),oht),n)}function Q_(n){return Oin(),Cnn((c8(),bht),n)}function J_(n){return LEn(),Cnn((Hnn(),Ost),n)}function Y_(n){return Crn(),Cnn((o8(),_st),n)}function Z_(n){return uin(),Cnn((a8(),vht),n)}function nF(n){return Vvn(),Cnn((Fnn(),Mht),n)}function tF(n){return _nn(),Cnn((L4(),Iht),n)}function eF(n){return Yun(),Cnn((u8(),Nht),n)}function iF(n){return gSn(),Cnn((pen(),Hht),n)}function rF(n){return g7(),Cnn((N4(),Uht),n)}function cF(n){return Bjn(),Cnn((den(),nft),n)}function aF(n){return YMn(),Cnn((wen(),oft),n)}function uF(n){return bDn(),Cnn((Vun(),yft),n)}function oF(n){return Kan(),Cnn((h8(),Mft),n)}function sF(n){return z7(),Cnn((s8(),Oft),n)}function hF(n){return z2(),Cnn((K4(),Nft),n)}function fF(n){return Tbn(),Cnn((qnn(),zlt),n)}function lF(n){return TTn(),Cnn((gen(),rvt),n)}function bF(n){return Mhn(),Cnn((f8(),svt),n)}function wF(n){return bvn(),Cnn((s7(),dvt),n)}function dF(n){return ain(),Cnn((w8(),Uvt),n)}function gF(n){return sNn(),Cnn((qcn(),$vt),n)}function pF(n){return mon(),Cnn((b8(),Rvt),n)}function vF(n){return U7(),Cnn((D4(),Bvt),n)}function mF(n){return Hcn(),Cnn((l8(),Jvt),n)}function yF(n){return Nvn(),Cnn((Bnn(),jvt),n)}function kF(n){return A6(),Cnn((x4(),tmt),n)}function jF(n){return Usn(),Cnn((g8(),amt),n)}function EF(n){return dcn(),Cnn((p8(),fmt),n)}function TF(n){return $un(),Cnn((d8(),gmt),n)}function MF(n){return oin(),Cnn((v8(),Nmt),n)}function SF(n){return Q4(),Cnn((F4(),Gmt),n)}function PF(n){return gY(),Cnn((B4(),iyt),n)}function CF(n){return oZ(),Cnn((H4(),uyt),n)}function IF(n){return O6(),Cnn((_4(),Pyt),n)}function OF(n){return dY(),Cnn((q4(),Dyt),n)}function AF(n){return zyn(),Cnn((c7(),Hyt),n)}function $F(n){return DPn(),Cnn((ven(),Yyt),n)}function LF(n){return sZ(),Cnn((U4(),Fkt),n)}function NF(n){return Prn(),Cnn((z4(),Zkt),n)}function xF(n){return B0(),Cnn((G4(),Gkt),n)}function DF(n){return Cbn(),Cnn((m8(),rjt),n)}function RF(n){return D9(),Cnn((X4(),ojt),n)}function KF(n){return Hsn(),Cnn((y8(),bjt),n)}function _F(n){return Omn(),Cnn((u7(),zjt),n)}function FF(n){return Bcn(),Cnn((j8(),Qjt),n)}function BF(n){return Sbn(),Cnn((k8(),eEt),n)}function HF(n){return JLn(),Cnn((Unn(),BEt),n)}function qF(n){return Pbn(),Cnn((E8(),UEt),n)}function GF(n){return CM(),Cnn((W2(),VEt),n)}function zF(n){return IM(),Cnn((X2(),YEt),n)}function UF(n){return $6(),Cnn((V4(),eTt),n)}function XF(n){return $Sn(),Cnn((Gnn(),sTt),n)}function WF(n){return OM(),Cnn((V2(),UTt),n)}function VF(n){return Lun(),Cnn((W4(),QTt),n)}function QF(n){return rpn(),Cnn((znn(),bMt),n)}function JF(n){return PPn(),Cnn((zcn(),EMt),n)}function YF(n){return wvn(),Cnn((len(),xMt),n)}function ZF(n){return wEn(),Cnn((fen(),tSt),n)}function nB(n){return lWn(),Cnn((SO(),Zot),n)}function tB(n){return Srn(),Cnn(($4(),zut),n)}function eB(n){return Ffn(),Cnn((Wnn(),GPt),n)}function iB(n){return Rtn(),Cnn((M8(),VPt),n)}function rB(n){return Mbn(),Cnn((l7(),tCt),n)}function cB(n){return nMn(),Cnn((yen(),sCt),n)}function aB(n){return ufn(),Cnn((T8(),kCt),n)}function uB(n){return Xyn(),Cnn((f7(),PCt),n)}function oB(n){return n$n(),Cnn((Nan(),KCt),n)}function sB(n){return cpn(),Cnn((Vnn(),zCt),n)}function hB(n){return QEn(),Cnn((Htn(),ZCt),n)}function fB(n){return lIn(),Cnn((men(),uIt),n)}function lB(n){return mdn(),Cnn((w7(),BIt),n)}function bB(n){return n_n(),Cnn((Qun(),YIt),n)}function wB(n){return kUn(),Cnn((Qnn(),OIt),n)}function dB(n){return Fwn(),Cnn((b7(),rOt),n)}function gB(n){return Bsn(),Cnn((h7(),fOt),n)}function pB(n){return hAn(),Cnn((Ucn(),cAt),n)}function vB(n,t){return kW(n),n+(kW(t),t)}function mB(n,t){return $T(),f9(QQ(n.a),t)}function yB(n,t){return $T(),f9(QQ(n.a),t)}function kB(n,t){this.c=n,this.a=t,this.b=t-n}function jB(n,t,e){this.a=n,this.b=t,this.c=e}function EB(n,t,e){this.a=n,this.b=t,this.c=e}function TB(n,t,e){this.a=n,this.b=t,this.c=e}function MB(n,t,e){this.a=n,this.b=t,this.c=e}function SB(n,t,e){this.a=n,this.b=t,this.c=e}function PB(n,t,e){this.e=n,this.a=t,this.c=e}function CB(n,t,e){f$(),mY.call(this,n,t,e)}function IB(n,t,e){f$(),rW.call(this,n,t,e)}function OB(n,t,e){f$(),rW.call(this,n,t,e)}function AB(n,t,e){f$(),rW.call(this,n,t,e)}function $B(n,t,e){f$(),IB.call(this,n,t,e)}function LB(n,t,e){f$(),IB.call(this,n,t,e)}function NB(n,t,e){f$(),LB.call(this,n,t,e)}function xB(n,t,e){f$(),OB.call(this,n,t,e)}function DB(n,t,e){f$(),AB.call(this,n,t,e)}function RB(n,t){return yX(n),yX(t),new hT(n,t)}function KB(n,t){return yX(n),yX(t),new _H(n,t)}function _B(n,t){return yX(n),yX(t),new FH(n,t)}function FB(n,t){return yX(n),yX(t),new lT(n,t)}function BB(n,t){return YH(null==n||Qpn(n,t)),n}function HB(n){var t;return fnn(t=new Np,n),t}function qB(n){var t;return fnn(t=new Rv,n),t}function GB(n){var t;return qrn(t=new zv,n),t}function zB(n){var t;return qrn(t=new JT,n),t}function UB(n){return!n.e&&(n.e=new Np),n.e}function XB(n){return!n.c&&(n.c=new Bo),n.c}function WB(n,t){return n.c[n.c.length]=t,!0}function VB(n,t){this.c=n,this.b=t,this.a=!1}function QB(n){this.d=n,Mb(this),this.b=rz(n.d)}function JB(){this.a=";,;",this.b="",this.c=""}function YB(n,t,e){Uz.call(this,t,e),this.a=n}function ZB(n,t,e){this.b=n,gO.call(this,t,e)}function nH(n,t,e){this.c=n,PS.call(this,t,e)}function tH(n,t,e){_Cn(e,0,n,t,e.length,!1)}function eH(n,t,e,i,r){n.b=t,n.c=e,n.d=i,n.a=r}function iH(n,t){t&&(n.b=t,n.a=(EW(t),t.a))}function rH(n,t,e,i,r){n.d=t,n.c=e,n.a=i,n.b=r}function cH(n){var t,e;t=n.b,e=n.c,n.b=e,n.c=t}function aH(n){var t,e;e=n.d,t=n.a,n.d=t,n.a=e}function uH(n){return uan(xU(YO(n)?Pan(n):n))}function oH(n,t){return E$(oq(n.d),oq(t.d))}function sH(n,t){return t==(kUn(),CIt)?n.c:n.d}function hH(){hH=O,kUn(),Rmt=CIt,Kmt=oIt}function fH(){this.b=Gy(MD(mpn((fRn(),aat))))}function lH(n){return dM(),x8(Ant,HWn,1,n,5,1)}function bH(n){return new xC(n.c+n.b,n.d+n.a)}function wH(n,t){return SM(),E$(n.d.p,t.d.p)}function dH(n){return Px(0!=n.b),Atn(n,n.a.a)}function gH(n){return Px(0!=n.b),Atn(n,n.c.b)}function pH(n,t){if(!n)throw Hp(new $y(t))}function vH(n,t){if(!n)throw Hp(new _y(t))}function mH(n,t,e){dP.call(this,n,t),this.b=e}function yH(n,t,e){LI.call(this,n,t),this.c=e}function kH(n,t,e){btn.call(this,t,e),this.d=n}function jH(n){o_(),yo.call(this),this.th(n)}function EH(n,t,e){this.a=n,NO.call(this,t,e)}function TH(n,t,e){this.a=n,NO.call(this,t,e)}function MH(n,t,e){LI.call(this,n,t),this.c=e}function SH(){R5(),oW.call(this,(WM(),zAt))}function PH(n){return null!=n&&!Xbn(n,LAt,NAt)}function CH(n,t){return(Wfn(n)<<4|Wfn(t))&QVn}function IH(n,t){return nV(),zvn(n,t),new GW(n,t)}function OH(n,t){var e;n.n&&(e=t,WB(n.f,e))}function AH(n,t,e){rtn(n,t,new GX(e))}function $H(n,t){var e;return e=n.c,Kin(n,t),e}function LH(n,t){return n.g=t<0?-1:t,n}function NH(n,t){return ztn(n),n.a*=t,n.b*=t,n}function xH(n,t,e,i,r){n.c=t,n.d=e,n.b=i,n.a=r}function DH(n,t){return r5(n,t,n.c.b,n.c),!0}function RH(n){n.a.b=n.b,n.b.a=n.a,n.a=n.b=null}function KH(n){this.b=n,this.a=lz(this.b.a).Ed()}function _H(n,t){this.b=n,this.a=t,Bh.call(this)}function FH(n,t){this.a=n,this.b=t,Bh.call(this)}function BH(n,t){Uz.call(this,t,1040),this.a=n}function HH(n){return 0==n||isNaN(n)?n:n<0?-1:1}function qH(n){return MQ(),PMn(n)==YY(OMn(n))}function GH(n){return MQ(),OMn(n)==YY(PMn(n))}function zH(n,t){return Jjn(n,new dP(t.a,t.b))}function UH(n){return!b5(n)&&n.c.i.c==n.d.i.c}function XH(n){var t;return t=n.n,n.a.b+t.d+t.a}function WH(n){var t;return t=n.n,n.e.b+t.d+t.a}function VH(n){var t;return t=n.n,n.e.a+t.b+t.c}function QH(n){return wWn(),new oG(0,n)}function JH(n){return n.a?n.a:eQ(n)}function YH(n){if(!n)throw Hp(new Ky(null))}function ZH(){ZH=O,SQ(),uLt=new Gb(P7n)}function nq(){nq=O,new svn((ty(),_nt),(ey(),Knt))}function tq(){tq=O,Itt=x8(Att,sVn,19,256,0,1)}function eq(n,t,e,i){awn.call(this,n,t,e,i,0,0)}function iq(n,t,e){return VW(n.b,BB(e.b,17),t)}function rq(n,t,e){return VW(n.b,BB(e.b,17),t)}function cq(n,t){return WB(n,new xC(t.a,t.b))}function aq(n,t){return n.c=t)throw Hp(new Sv)}function _z(n,t,e){return $X(t,0,Hq(t[0],e[0])),t}function Fz(n,t,e){t.Ye(e,Gy(MD(RX(n.b,e)))*n.a)}function Bz(n,t,e){return jDn(),Dcn(n,t)&&Dcn(n,e)}function Hz(n){return lIn(),!n.Hc(eIt)&&!n.Hc(rIt)}function qz(n){return new xC(n.c+n.b/2,n.d+n.a/2)}function Gz(n,t){return t.kh()?tfn(n.b,BB(t,49)):t}function zz(n,t){this.e=n,this.d=0!=(64&t)?t|hVn:t}function Uz(n,t){this.c=0,this.d=n,this.b=64|t|hVn}function Xz(n){this.b=new Y6(11),this.a=(PQ(),n)}function Wz(n){this.b=null,this.a=(PQ(),n||wet)}function Vz(n){this.a=rvn(n.a),this.b=new t_(n.b)}function Qz(n){this.b=n,cx.call(this,n),ML(this)}function Jz(n){this.b=n,ux.call(this,n),SL(this)}function Yz(n,t,e){this.a=n,eK.call(this,t,e,5,6)}function Zz(n,t,e,i){this.b=n,$L.call(this,t,e,i)}function nU(n,t,e,i,r){k9.call(this,n,t,e,i,r,-1)}function tU(n,t,e,i,r){j9.call(this,n,t,e,i,r,-1)}function eU(n,t,e,i){$L.call(this,n,t,e),this.b=i}function iU(n,t,e,i){yH.call(this,n,t,e),this.b=i}function rU(n){NI.call(this,n,!1),this.a=!1}function cU(n,t){this.b=n,hl.call(this,n.b),this.a=t}function aU(n,t){WX(),jT.call(this,n,sfn(new Yy(t)))}function uU(n,t){return wWn(),new cW(n,t,0)}function oU(n,t){return wWn(),new cW(6,n,t)}function sU(n,t){return mK(n.substr(0,t.length),t)}function hU(n,t){return XI(t)?eJ(n,t):!!AJ(n.f,t)}function fU(n,t){for(kW(t);n.Ob();)t.td(n.Pb())}function lU(n,t,e){ODn(),this.e=n,this.d=t,this.a=e}function bU(n,t,e,i){var r;(r=n.i).i=t,r.a=e,r.b=i}function wU(n){var t;for(t=n;t.f;)t=t.f;return t}function dU(n){var t;return Px(null!=(t=Eon(n))),t}function gU(n){var t;return Px(null!=(t=mln(n))),t}function pU(n,t){var e;return w6(t,e=n.a.gc()),e-t}function vU(n,t){var e;for(e=0;e0?e.Math.log(n/t):-100}function FU(n,t){return Vhn(n,t)<0?-1:Vhn(n,t)>0?1:0}function BU(n,t,e){return SHn(n,BB(t,46),BB(e,167))}function HU(n,t){return BB(wz(lz(n.a)).Xb(t),42).cd()}function qU(n,t){return ptn(t,n.length),new BH(n,t)}function GU(n,t){this.d=n,AL.call(this,n),this.e=t}function zU(n){this.d=(kW(n),n),this.a=0,this.c=bVn}function UU(n,t){Ap.call(this,1),this.a=n,this.b=t}function XU(n,t){return n.c?XU(n.c,t):WB(n.b,t),n}function WU(n,t,e){var i;return i=dnn(n,t),r4(n,t,e),i}function VU(n,t){return m7(n.slice(0,t),n)}function QU(n,t,e){var i;for(i=0;i=n.g}function ZX(n,t,e){return NRn(n,yrn(n,t,e))}function nW(n,t){var e;dnn(n,e=n.a.length),r4(n,e,t)}function tW(n,t){console[n].call(console,t)}function eW(n,t){var e;++n.j,e=n.Vi(),n.Ii(n.oi(e,t))}function iW(n,t,e){BB(t.b,65),Otn(t.a,new EB(n,e,t))}function rW(n,t,e){jp.call(this,t),this.a=n,this.b=e}function cW(n,t,e){Ap.call(this,n),this.a=t,this.b=e}function aW(n,t,e){this.a=n,kp.call(this,t),this.b=e}function uW(n,t,e){this.a=n,H2.call(this,8,t,null,e)}function oW(n){this.a=(kW(_9n),_9n),this.b=n,new Nm}function sW(n){this.c=n,this.b=this.c.a,this.a=this.c.e}function hW(n){this.c=n,this.b=n.a.d.a,bD(n.a.e,this)}function fW(n){Mx(-1!=n.c),n.d.$c(n.c),n.b=n.c,n.c=-1}function lW(n){return e.Math.sqrt(n.a*n.a+n.b*n.b)}function bW(n,t){return Kz(t,n.a.c.length),xq(n.a,t)}function wW(n,t){return GI(n)===GI(t)||null!=n&&Nfn(n,t)}function dW(n){return 0>=n?new VT:Win(n-1)}function gW(n){return!!SNt&&eJ(SNt,n)}function pW(n){return n?n.dc():!n.Kc().Ob()}function vW(n){return!n.a&&n.c?n.c.b:n.a}function mW(n){return!n.a&&(n.a=new $L(LOt,n,4)),n.a}function yW(n){return!n.d&&(n.d=new $L(VAt,n,1)),n.d}function kW(n){if(null==n)throw Hp(new gv);return n}function jW(n){n.c?n.c.He():(n.d=!0,QNn(n))}function EW(n){n.c?EW(n.c):(Qln(n),n.d=!0)}function TW(n){TV(n.a),n.b=x8(Ant,HWn,1,n.b.length,5,1)}function MW(n,t){return E$(t.j.c.length,n.j.c.length)}function SW(n,t){n.c<0||n.b.b=0?n.Bh(e):cIn(n,t)}function CW(n){return n.c.i.c==n.d.i.c}function IW(n){if(4!=n.p)throw Hp(new dv);return n.e}function OW(n){if(3!=n.p)throw Hp(new dv);return n.e}function AW(n){if(6!=n.p)throw Hp(new dv);return n.f}function $W(n){if(6!=n.p)throw Hp(new dv);return n.k}function LW(n){if(3!=n.p)throw Hp(new dv);return n.j}function NW(n){if(4!=n.p)throw Hp(new dv);return n.j}function xW(n){return!n.b&&(n.b=new Tp(new xm)),n.b}function DW(n){return-2==n.c&&gb(n,uMn(n.g,n.b)),n.c}function RW(n,t){var e;return(e=mX("",n)).n=t,e.i=1,e}function KW(n,t){LG(BB(t.b,65),n),Otn(t.a,new Aw(n))}function _W(n,t){f9((!n.a&&(n.a=new oR(n,n)),n.a),t)}function FW(n,t){this.b=n,GU.call(this,n,t),ML(this)}function BW(n,t){this.b=n,RK.call(this,n,t),SL(this)}function HW(n,t,e,i){vT.call(this,n,t),this.d=e,this.a=i}function qW(n,t,e,i){vT.call(this,n,e),this.a=t,this.f=i}function GW(n,t){W$.call(this,Vin(yX(n),yX(t))),this.a=t}function zW(){dMn.call(this,S7n,(rE(),dLt)),Wqn(this)}function UW(){dMn.call(this,V9n,(iE(),n$t)),OHn(this)}function XW(){gT.call(this,"DELAUNAY_TRIANGULATION",0)}function WW(n){return String.fromCharCode.apply(null,n)}function VW(n,t,e){return XI(t)?mZ(n,t,e):jCn(n.f,t,e)}function QW(n){return SQ(),n?n.ve():(PQ(),PQ(),get)}function JW(n,t,e){return Nun(),e.pg(n,BB(t.cd(),146))}function YW(n,t){return nq(),new svn(new rN(n),new iN(t))}function ZW(n){return lin(n,NVn),ttn(rbn(rbn(5,n),n/10|0))}function nV(){nV=O,Bnt=new hy(Pun(Gk(Hnt,1),kVn,42,0,[]))}function tV(n){return!n.d&&(n.d=new Hb(n.c.Cc())),n.d}function eV(n){return!n.a&&(n.a=new Lk(n.c.vc())),n.a}function iV(n){return!n.b&&(n.b=new Ak(n.c.ec())),n.b}function rV(n,t){for(;t-- >0;)n=n<<1|(n<0?1:0);return n}function cV(n,t){return GI(n)===GI(t)||null!=n&&Nfn(n,t)}function aV(n,t){return hN(),BB(t.b,19).a(i=CY(e))&&++i,i}function ZV(n){var t;return cen(t=new Kp,n),t}function nQ(n){var t;return DMn(t=new Kp,n),t}function tQ(n,t){return Kcn(t,RX(n.f,t)),null}function eQ(n){return Jin(n)||null}function iQ(n){return!n.b&&(n.b=new eU(_Ot,n,12,3)),n.b}function rQ(n){return null!=n&&xT(jAt,n.toLowerCase())}function cQ(n,t){return Pln(iG(n)*eG(n),iG(t)*eG(t))}function aQ(n,t){return Pln(iG(n)*eG(n),iG(t)*eG(t))}function uQ(n,t){return Pln(n.d.c+n.d.b/2,t.d.c+t.d.b/2)}function oQ(n,t){return Pln(n.g.c+n.g.b/2,t.g.c+t.g.b/2)}function sQ(n,t,e){e.a?Cen(n,t.b-n.f/2):Pen(n,t.a-n.g/2)}function hQ(n,t,e,i){this.a=n,this.b=t,this.c=e,this.d=i}function fQ(n,t,e,i){this.a=n,this.b=t,this.c=e,this.d=i}function lQ(n,t,e,i){this.e=n,this.a=t,this.c=e,this.d=i}function bQ(n,t,e,i){this.a=n,this.c=t,this.d=e,this.b=i}function wQ(n,t,e,i){f$(),e6.call(this,t,e,i),this.a=n}function dQ(n,t,e,i){f$(),e6.call(this,t,e,i),this.a=n}function gQ(n,t){this.a=n,OD.call(this,n,BB(n.d,15).Zc(t))}function pQ(n){this.f=n,this.c=this.f.e,n.f>0&&ujn(this)}function vQ(n,t,e,i){this.b=n,this.c=i,vO.call(this,t,e)}function mQ(n){return Px(n.b=0&&mK(n.substr(e,t.length),t)}function LJ(n,t,e,i,r,c,a){return new b4(n.e,t,e,i,r,c,a)}function NJ(n,t,e,i,r,c){this.a=n,kin.call(this,t,e,i,r,c)}function xJ(n,t,e,i,r,c){this.a=n,kin.call(this,t,e,i,r,c)}function DJ(n,t){this.g=n,this.d=Pun(Gk(Out,1),a1n,10,0,[t])}function RJ(n,t){this.e=n,this.a=Ant,this.b=ARn(t),this.c=t}function KJ(n,t){NR.call(this),xtn(this),this.a=n,this.c=t}function _J(n,t,e,i){$X(n.c[t.g],e.g,i),$X(n.c[e.g],t.g,i)}function FJ(n,t,e,i){$X(n.c[t.g],t.g,e),$X(n.b[t.g],t.g,i)}function BJ(){return A6(),Pun(Gk(cmt,1),$Vn,376,0,[Zvt,Yvt])}function HJ(){return g7(),Pun(Gk(Zht,1),$Vn,479,0,[Ght,qht])}function qJ(){return _nn(),Pun(Gk(Lht,1),$Vn,419,0,[Sht,Pht])}function GJ(){return V8(),Pun(Gk(lht,1),$Vn,422,0,[cht,aht])}function zJ(){return z2(),Pun(Gk(Glt,1),$Vn,420,0,[Aft,$ft])}function UJ(){return U7(),Pun(Gk(zvt,1),$Vn,421,0,[Kvt,_vt])}function XJ(){return Q4(),Pun(Gk(Vmt,1),$Vn,523,0,[Hmt,Bmt])}function WJ(){return O6(),Pun(Gk(xyt,1),$Vn,520,0,[Myt,Tyt])}function VJ(){return gY(),Pun(Gk(ayt,1),$Vn,516,0,[tyt,nyt])}function QJ(){return oZ(),Pun(Gk(Syt,1),$Vn,515,0,[ryt,cyt])}function JJ(){return dY(),Pun(Gk(Byt,1),$Vn,455,0,[Lyt,Nyt])}function YJ(){return B0(),Pun(Gk(Ykt,1),$Vn,425,0,[Hkt,Bkt])}function ZJ(){return sZ(),Pun(Gk(qkt,1),$Vn,480,0,[Rkt,Kkt])}function nY(){return Prn(),Pun(Gk(ijt,1),$Vn,495,0,[Qkt,Jkt])}function tY(){return D9(),Pun(Gk(ljt,1),$Vn,426,0,[cjt,ajt])}function eY(){return Lun(),Pun(Gk(JTt,1),$Vn,429,0,[WTt,XTt])}function iY(){return $6(),Pun(Gk(oTt,1),$Vn,430,0,[nTt,ZEt])}function rY(){return hpn(),Pun(Gk(yit,1),$Vn,428,0,[dit,wit])}function cY(){return Rnn(),Pun(Gk(Kit,1),$Vn,427,0,[vit,mit])}function aY(){return Knn(),Pun(Gk($at,1),$Vn,424,0,[Dct,Rct])}function uY(){return Srn(),Pun(Gk(Wut,1),$Vn,511,0,[qut,Hut])}function oY(n,t,e,i){return e>=0?n.jh(t,e,i):n.Sg(null,e,i)}function sY(n){return 0==n.b.b?n.a.$e():dH(n.b)}function hY(n){if(5!=n.p)throw Hp(new dv);return dG(n.f)}function fY(n){if(5!=n.p)throw Hp(new dv);return dG(n.k)}function lY(n){return GI(n.a)===GI((wcn(),I$t))&&Rqn(n),n.a}function bY(n){this.a=BB(yX(n),271),this.b=(SQ(),new dN(n))}function wY(n,t){Zl(this,new xC(n.a,n.b)),nb(this,zB(t))}function dY(){dY=O,Lyt=new oC(cYn,0),Nyt=new oC(aYn,1)}function gY(){gY=O,tyt=new cC(aYn,0),nyt=new cC(cYn,1)}function pY(){ay.call(this,new XT(etn(12))),aN(!0),this.a=2}function vY(n,t,e){wWn(),Ap.call(this,n),this.b=t,this.a=e}function mY(n,t,e){f$(),jp.call(this,t),this.a=n,this.b=e}function yY(n){NR.call(this),xtn(this),this.a=n,this.c=!0}function kY(n){var t;t=n.c.d.b,n.b=t,n.a=n.c.d,t.a=n.c.d.b=n}function jY(n){pin(n.a),RA(n.a),twn(new Pw(n.a))}function EY(n,t){oRn(n,!0),Otn(n.e.wf(),new $_(n,!0,t))}function TY(n,t){return c4(t),Jen(n,x8(ANt,hQn,25,t,15,1),t)}function MY(n,t){return MQ(),n==YY(PMn(t))||n==YY(OMn(t))}function SY(n,t){return null==t?qI(AJ(n.f,null)):hS(n.g,t)}function PY(n){return 0==n.b?null:(Px(0!=n.b),Atn(n,n.a.a))}function CY(n){return 0|Math.max(Math.min(n,DWn),-2147483648)}function IY(n,t){var e=Znt[n.charCodeAt(0)];return null==e?n:e}function OY(n,t){return WQ(n,"set1"),WQ(t,"set2"),new ET(n,t)}function AY(n,t){return UR(qx(nen(n.f,t)),n.f.d)}function $Y(n,t){var e;return JGn(n,t,e=new q),e.d}function LY(n,t,e,i){var r;r=new FR,t.a[e.g]=r,mG(n.b,i,r)}function NY(n,t,e){var i;(i=n.Yg(t))>=0?n.sh(i,e):TLn(n,t,e)}function xY(n,t,e){hZ(),n&&VW(fAt,n,t),n&&VW(hAt,n,e)}function DY(n,t,e){this.i=new Np,this.b=n,this.g=t,this.a=e}function RY(n,t,e){this.c=new Np,this.e=n,this.f=t,this.b=e}function KY(n,t,e){this.a=new Np,this.e=n,this.f=t,this.c=e}function _Y(n,t){V$(this),this.f=t,this.g=n,jQ(this),this._d()}function FY(n,t){var e;e=n.q.getHours(),n.q.setDate(t),lBn(n,e)}function BY(n,t){var e;for(yX(t),e=n.a;e;e=e.c)t.Od(e.g,e.i)}function HY(n){var t;return $on(t=new bE(etn(n.length)),n),t}function qY(n){function t(){}return t.prototype=n||{},new t}function GY(n,t){return!!wun(n,t)&&(ein(n),!0)}function zY(n,t){if(null==t)throw Hp(new gv);return ugn(n,t)}function UY(n){if(n.qe())return null;var t=n.n;return SWn[t]}function XY(n){return n.Db>>16!=3?null:BB(n.Cb,33)}function WY(n){return n.Db>>16!=9?null:BB(n.Cb,33)}function VY(n){return n.Db>>16!=6?null:BB(n.Cb,79)}function QY(n){return n.Db>>16!=7?null:BB(n.Cb,235)}function JY(n){return n.Db>>16!=7?null:BB(n.Cb,160)}function YY(n){return n.Db>>16!=11?null:BB(n.Cb,33)}function ZY(n,t){var e;return(e=n.Yg(t))>=0?n.lh(e):qIn(n,t)}function nZ(n,t){var e;return oMn(e=new Lq(t),n),new t_(e)}function tZ(n){var t;return t=n.d,t=n.si(n.f),f9(n,t),t.Ob()}function eZ(n,t){return n.b+=t.b,n.c+=t.c,n.d+=t.d,n.a+=t.a,n}function iZ(n,t){return e.Math.abs(n)0}function cZ(){this.a=new fA,this.e=new Rv,this.g=0,this.i=0}function aZ(n){this.a=n,this.b=x8(_mt,sVn,1944,n.e.length,0,2)}function uZ(n,t,e){var i;i=Non(n,t,e),n.b=new mrn(i.c.length)}function oZ(){oZ=O,ryt=new rC(pYn,0),cyt=new rC("UP",1)}function sZ(){sZ=O,Rkt=new bC(U3n,0),Kkt=new bC("FAN",1)}function hZ(){hZ=O,fAt=new xp,hAt=new xp,FI(yet,new wo)}function fZ(n){if(0!=n.p)throw Hp(new dv);return YI(n.f,0)}function lZ(n){if(0!=n.p)throw Hp(new dv);return YI(n.k,0)}function bZ(n){return n.Db>>16!=3?null:BB(n.Cb,147)}function wZ(n){return n.Db>>16!=6?null:BB(n.Cb,235)}function dZ(n){return n.Db>>16!=17?null:BB(n.Cb,26)}function gZ(n,t){var e=n.a=n.a||[];return e[t]||(e[t]=n.le(t))}function pZ(n,t){var e;return null==(e=n.a.get(t))?new Array:e}function vZ(n,t){var e;e=n.q.getHours(),n.q.setMonth(t),lBn(n,e)}function mZ(n,t,e){return null==t?jCn(n.f,null,e):ubn(n.g,t,e)}function yZ(n,t,e,i,r,c){return new N7(n.e,t,n.aj(),e,i,r,c)}function kZ(n,t,e){return n.a=fx(n.a,0,t)+""+e+nO(n.a,t),n}function jZ(n,t,e){return WB(n.a,(nV(),zvn(t,e),new vT(t,e))),n}function EZ(n){return oN(n.c),n.e=n.a=n.c,n.c=n.c.c,++n.d,n.a.f}function TZ(n){return oN(n.e),n.c=n.a=n.e,n.e=n.e.e,--n.d,n.a.f}function MZ(n,t){n.d&&y7(n.d.e,n),n.d=t,n.d&&WB(n.d.e,n)}function SZ(n,t){n.c&&y7(n.c.g,n),n.c=t,n.c&&WB(n.c.g,n)}function PZ(n,t){n.c&&y7(n.c.a,n),n.c=t,n.c&&WB(n.c.a,n)}function CZ(n,t){n.i&&y7(n.i.j,n),n.i=t,n.i&&WB(n.i.j,n)}function IZ(n,t,e){this.a=t,this.c=n,this.b=(yX(e),new t_(e))}function OZ(n,t,e){this.a=t,this.c=n,this.b=(yX(e),new t_(e))}function AZ(n,t){this.a=n,this.c=B$(this.a),this.b=new gJ(t)}function $Z(n){return Qln(n),AV(n,new vw(new Rv))}function LZ(n,t){if(n<0||n>t)throw Hp(new Ay(jJn+n+EJn+t))}function NZ(n,t){return IG(n.a,t)?EU(n,BB(t,22).g,null):null}function xZ(n){return Shn(),hN(),0!=BB(n.a,81).d.e}function DZ(){DZ=O,Xnt=lhn((ry(),Pun(Gk(Wnt,1),$Vn,538,0,[znt])))}function RZ(){RZ=O,pmt=WG(new B2,(yMn(),Bat),(lWn(),qot))}function KZ(){KZ=O,vmt=WG(new B2,(yMn(),Bat),(lWn(),qot))}function _Z(){_Z=O,ymt=WG(new B2,(yMn(),Bat),(lWn(),qot))}function FZ(){FZ=O,zmt=dq(new B2,(yMn(),Bat),(lWn(),dot))}function BZ(){BZ=O,Qmt=dq(new B2,(yMn(),Bat),(lWn(),dot))}function HZ(){HZ=O,Zmt=dq(new B2,(yMn(),Bat),(lWn(),dot))}function qZ(){qZ=O,oyt=dq(new B2,(yMn(),Bat),(lWn(),dot))}function GZ(){GZ=O,zkt=WG(new B2,(zyn(),Fyt),(DPn(),zyt))}function zZ(n,t,e,i){this.c=n,this.d=i,WZ(this,t),VZ(this,e)}function UZ(n){this.c=new JT,this.b=n.b,this.d=n.c,this.a=n.a}function XZ(n){this.a=e.Math.cos(n),this.b=e.Math.sin(n)}function WZ(n,t){n.a&&y7(n.a.k,n),n.a=t,n.a&&WB(n.a.k,n)}function VZ(n,t){n.b&&y7(n.b.f,n),n.b=t,n.b&&WB(n.b.f,n)}function QZ(n,t){iW(n,n.b,n.c),BB(n.b.b,65),t&&BB(t.b,65).b}function JZ(n,t){zln(n,t),cL(n.Cb,88)&&ACn(P5(BB(n.Cb,88)),2)}function YZ(n,t){cL(n.Cb,88)&&ACn(P5(BB(n.Cb,88)),4),Nrn(n,t)}function ZZ(n,t){cL(n.Cb,179)&&(BB(n.Cb,179).tb=null),Nrn(n,t)}function n1(n,t){return ZM(),hnn(t)?new lq(t,n):new xI(t,n)}function t1(n,t){null!=t.c&&nW(n,new GX(t.c))}function e1(n){var t;return iE(),cen(t=new Kp,n),t}function i1(n){var t;return iE(),cen(t=new Kp,n),t}function r1(n,t){var e;return e=new HX(n),t.c[t.c.length]=e,e}function c1(n,t){var e;return(e=BB(lfn(OQ(n.a),t),14))?e.gc():0}function a1(n){return Qln(n),PQ(),PQ(),ytn(n,det)}function u1(n){for(var t;;)if(t=n.Pb(),!n.Ob())return t}function o1(n,t){Um.call(this,new XT(etn(n))),lin(t,oVn),this.a=t}function s1(n,t,e){Hfn(t,e,n.gc()),this.c=n,this.a=t,this.b=e-t}function h1(n,t,e){var i;Hfn(t,e,n.c.length),i=e-t,PE(n.c,t,i)}function f1(n,t){hL(n,dG(e0(kz(t,24),sJn)),dG(e0(t,sJn)))}function l1(n,t){if(n<0||n>=t)throw Hp(new Ay(jJn+n+EJn+t))}function b1(n,t){if(n<0||n>=t)throw Hp(new Ok(jJn+n+EJn+t))}function w1(n,t){this.b=(kW(n),n),this.a=0==(t&_Qn)?64|t|hVn:t}function d1(n){DA(this),Pv(this.a,kon(e.Math.max(8,n))<<1)}function g1(n){return Aon(Pun(Gk(PMt,1),sVn,8,0,[n.i.n,n.n,n.a]))}function p1(){return qsn(),Pun(Gk(nit,1),$Vn,132,0,[zet,Uet,Xet])}function v1(){return Dtn(),Pun(Gk(Vit,1),$Vn,232,0,[Git,zit,Uit])}function m1(){return Y9(),Pun(Gk(ert,1),$Vn,461,0,[Jit,Qit,Yit])}function y1(){return G7(),Pun(Gk(Ort,1),$Vn,462,0,[crt,rrt,irt])}function k1(){return Bfn(),Pun(Gk(mut,1),$Vn,423,0,[wut,but,lut])}function j1(){return q7(),Pun(Gk(Hat,1),$Vn,379,0,[Oat,Iat,Aat])}function E1(){return Mhn(),Pun(Gk(wvt,1),$Vn,378,0,[cvt,avt,uvt])}function T1(){return Oin(),Pun(Gk(pht,1),$Vn,314,0,[hht,sht,fht])}function M1(){return uin(),Pun(Gk(Tht,1),$Vn,337,0,[wht,ght,dht])}function S1(){return Yun(),Pun(Gk(Bht,1),$Vn,450,0,[Aht,Oht,$ht])}function P1(){return Crn(),Pun(Gk(Wst,1),$Vn,361,0,[Rst,Dst,xst])}function C1(){return z7(),Pun(Gk(Lft,1),$Vn,303,0,[Pft,Cft,Sft])}function I1(){return Kan(),Pun(Gk(Ift,1),$Vn,292,0,[jft,Eft,kft])}function O1(){return ain(),Pun(Gk(Qvt,1),$Vn,452,0,[Gvt,Hvt,qvt])}function A1(){return mon(),Pun(Gk(Fvt,1),$Vn,339,0,[Nvt,Lvt,xvt])}function $1(){return Hcn(),Pun(Gk(nmt,1),$Vn,375,0,[Xvt,Wvt,Vvt])}function L1(){return $un(),Pun(Gk(Smt,1),$Vn,377,0,[bmt,wmt,lmt])}function N1(){return Usn(),Pun(Gk(hmt,1),$Vn,336,0,[emt,imt,rmt])}function x1(){return dcn(),Pun(Gk(dmt,1),$Vn,338,0,[smt,umt,omt])}function D1(){return oin(),Pun(Gk(xmt,1),$Vn,454,0,[Omt,Amt,$mt])}function R1(){return Cbn(),Pun(Gk(ujt,1),$Vn,442,0,[ejt,njt,tjt])}function K1(){return Hsn(),Pun(Gk(Gjt,1),$Vn,380,0,[sjt,hjt,fjt])}function _1(){return Sbn(),Pun(Gk(NEt,1),$Vn,381,0,[Zjt,nEt,Yjt])}function F1(){return Bcn(),Pun(Gk(Jjt,1),$Vn,293,0,[Xjt,Wjt,Ujt])}function B1(){return Pbn(),Pun(Gk(WEt,1),$Vn,437,0,[HEt,qEt,GEt])}function H1(){return ufn(),Pun(Gk(SCt,1),$Vn,334,0,[vCt,pCt,mCt])}function q1(){return Rtn(),Pun(Gk(nCt,1),$Vn,272,0,[zPt,UPt,XPt])}function G1(n,t){return k$n(n,t,cL(t,99)&&0!=(BB(t,18).Bb&BQn))}function z1(n,t,e){var i;return(i=cHn(n,t,!1)).b<=t&&i.a<=e}function U1(n,t,e){var i;(i=new ca).b=t,i.a=e,++t.b,WB(n.d,i)}function X1(n,t){var e;return Tx(!!(e=(kW(n),n).g)),kW(t),e(t)}function W1(n,t){var e,i;return i=pU(n,t),e=n.a.Zc(i),new kT(n,e)}function V1(n){return n.Db>>16!=6?null:BB(cAn(n),235)}function Q1(n){if(2!=n.p)throw Hp(new dv);return dG(n.f)&QVn}function J1(n){if(2!=n.p)throw Hp(new dv);return dG(n.k)&QVn}function Y1(n){return n.a==(R5(),eLt)&&db(n,eLn(n.g,n.b)),n.a}function Z1(n){return n.d==(R5(),eLt)&&pb(n,NKn(n.g,n.b)),n.d}function n0(n){return Px(n.ai?1:0}function w0(n,t){var e;return e=S7(t),BB(RX(n.c,e),19).a}function d0(n,t){var e;for(e=n+"";e.length0&&0==n.a[--n.d];);0==n.a[n.d++]&&(n.e=0)}function W0(n){return n.a?0==n.e.length?n.a.a:n.a.a+""+n.e:n.c}function V0(n){return!(!n.a||0==H7(n.a.a).i||n.b&&Kvn(n.b))}function Q0(n){return!(!n.u||0==a4(n.u.a).i||n.n&&Rvn(n.n))}function J0(n){return yq(n.e.Hd().gc()*n.c.Hd().gc(),16,new zf(n))}function Y0(n,t){return FU(fan(n.q.getTime()),fan(t.q.getTime()))}function Z0(n){return BB(Qgn(n,x8(yut,c1n,17,n.c.length,0,1)),474)}function n2(n){return BB(Qgn(n,x8(Out,a1n,10,n.c.length,0,1)),193)}function t2(n){return BZ(),!(b5(n)||!b5(n)&&n.c.i.c==n.d.i.c)}function e2(n,t,e){yX(n),xyn(new IZ(new t_(n),t,e))}function i2(n,t,e){yX(n),Dyn(new OZ(new t_(n),t,e))}function r2(n,t){var e;return e=1-t,n.a[e]=wrn(n.a[e],e),wrn(n,t)}function c2(n,t){var e;n.e=new Ym,m$(e=wDn(t),n.c),IDn(n,e,0)}function a2(n,t,e,i){var r;(r=new vu).a=t,r.b=e,r.c=i,DH(n.a,r)}function u2(n,t,e,i){var r;(r=new vu).a=t,r.b=e,r.c=i,DH(n.b,r)}function o2(n){var t,e;return e=t_n(t=new lX,n),yzn(t),e}function s2(){var n,t;return n=new Kp,WB(V$t,t=n),t}function h2(n){return n.j.c=x8(Ant,HWn,1,0,5,1),TV(n.c),gV(n.a),n}function f2(n){return MM(),cL(n.g,10)?BB(n.g,10):null}function l2(n){return!EV(n).dc()&&(L$(n,new m),!0)}function b2(n){if(!("stack"in n))try{throw n}catch(t){}return n}function w2(n,t){if(n<0||n>=t)throw Hp(new Ay(LCn(n,t)));return n}function d2(n,t,e){if(n<0||te)throw Hp(new Ay(oPn(n,t,e)))}function g2(n,t){if(TU(n.a,t),t.d)throw Hp(new dy(IJn));t.d=n}function p2(n,t){if(t.$modCount!=n.$modCount)throw Hp(new vv)}function v2(n,t){return!!cL(t,42)&&Mmn(n.a,BB(t,42))}function m2(n,t){return!!cL(t,42)&&Mmn(n.a,BB(t,42))}function y2(n,t){return!!cL(t,42)&&Mmn(n.a,BB(t,42))}function k2(n,t){return n.a<=n.b&&(t.ud(n.a++),!0)}function j2(n){var t;return YO(n)?-0==(t=n)?0:t:pnn(n)}function E2(n){var t;return EW(n),t=new F,gE(n.a,new gw(t)),t}function T2(n){var t;return EW(n),t=new _,gE(n.a,new dw(t)),t}function M2(n,t){this.a=n,Sb.call(this,n),LZ(t,n.gc()),this.b=t}function S2(n){this.e=n,this.b=this.e.a.entries(),this.a=new Array}function P2(n){return yq(n.e.Hd().gc()*n.c.Hd().gc(),273,new Gf(n))}function C2(n){return new Y6((lin(n,NVn),ttn(rbn(rbn(5,n),n/10|0))))}function I2(n){return BB(Qgn(n,x8(Gut,u1n,11,n.c.length,0,1)),1943)}function O2(n,t,e){return e.f.c.length>0?BU(n.a,t,e):BU(n.b,t,e)}function A2(n,t,e){n.d&&y7(n.d.e,n),n.d=t,n.d&&kG(n.d.e,e,n)}function $2(n,t){vXn(t,n),aH(n.d),aH(BB(mMn(n,(HXn(),Agt)),207))}function L2(n,t){pXn(t,n),cH(n.d),cH(BB(mMn(n,(HXn(),Agt)),207))}function N2(n,t){var e,i;return i=null,(e=zY(n,t))&&(i=e.fe()),i}function x2(n,t){var e,i;return i=null,(e=dnn(n,t))&&(i=e.ie()),i}function D2(n,t){var e,i;return i=null,(e=zY(n,t))&&(i=e.ie()),i}function R2(n,t){var e,i;return i=null,(e=zY(n,t))&&(i=yPn(e)),i}function K2(n,t,e){var i;return i=Qdn(e),wKn(n.g,i,t),wKn(n.i,t,e),t}function _2(n,t,e){var i;i=Ldn();try{return dR(n,t,e)}finally{y3(i)}}function F2(n){var t;t=n.Wg(),this.a=cL(t,69)?BB(t,69).Zh():t.Kc()}function B2(){Jm.call(this),this.j.c=x8(Ant,HWn,1,0,5,1),this.a=-1}function H2(n,t,e,i){this.d=n,this.n=t,this.g=e,this.o=i,this.p=-1}function q2(n,t,e,i){this.e=i,this.d=null,this.c=n,this.a=t,this.b=e}function G2(n,t,e){this.d=new Fd(this),this.e=n,this.i=t,this.f=e}function z2(){z2=O,Aft=new DP(eYn,0),$ft=new DP("TOP_LEFT",1)}function U2(){U2=O,Tmt=YW(iln(1),iln(4)),Emt=YW(iln(1),iln(2))}function X2(){X2=O,YEt=lhn((IM(),Pun(Gk(tTt,1),$Vn,551,0,[QEt])))}function W2(){W2=O,VEt=lhn((CM(),Pun(Gk(JEt,1),$Vn,482,0,[XEt])))}function V2(){V2=O,UTt=lhn((OM(),Pun(Gk(VTt,1),$Vn,530,0,[GTt])))}function Q2(){Q2=O,act=lhn((wM(),Pun(Gk(Pct,1),$Vn,481,0,[rct])))}function J2(){return Dan(),Pun(Gk(Grt,1),$Vn,406,0,[Rrt,Nrt,xrt,Drt])}function Y2(){return Z9(),Pun(Gk(Fet,1),$Vn,297,0,[Net,xet,Det,Ret])}function Z2(){return qpn(),Pun(Gk(cct,1),$Vn,394,0,[Zrt,Yrt,nct,tct])}function n3(){return Hpn(),Pun(Gk(Urt,1),$Vn,323,0,[Brt,Frt,Hrt,qrt])}function t3(){return Aun(),Pun(Gk(dut,1),$Vn,405,0,[Zat,eut,nut,tut])}function e3(){return Iun(),Pun(Gk(pst,1),$Vn,360,0,[ast,rst,cst,ist])}function i3(n,t,e,i){return cL(e,54)?new Ox(n,t,e,i):new sz(n,t,e,i)}function r3(){return Oun(),Pun(Gk(Ist,1),$Vn,411,0,[vst,mst,yst,kst])}function c3(n){return n.j==(kUn(),SIt)&&SN(UOn(n),oIt)}function a3(n,t){var e;SZ(e=t.a,t.c.d),MZ(e,t.d.d),Ztn(e.a,n.n)}function u3(n,t){return BB($N(Iz(BB(h6(n.k,t),15).Oc(),Qst)),113)}function o3(n,t){return BB($N(Oz(BB(h6(n.k,t),15).Oc(),Qst)),113)}function s3(n){return new w1(tcn(BB(n.a.dd(),14).gc(),n.a.cd()),16)}function h3(n){return cL(n,14)?BB(n,14).dc():!n.Kc().Ob()}function f3(n){return MM(),cL(n.g,145)?BB(n.g,145):null}function l3(n){if(n.e.g!=n.b)throw Hp(new vv);return!!n.c&&n.d>0}function b3(n){return Px(n.b!=n.d.c),n.c=n.b,n.b=n.b.a,++n.a,n.c.c}function w3(n,t){kW(t),$X(n.a,n.c,t),n.c=n.c+1&n.a.length-1,wyn(n)}function d3(n,t){kW(t),n.b=n.b-1&n.a.length-1,$X(n.a,n.b,t),wyn(n)}function g3(n,t){var e;for(e=n.j.c.length;e0&&aHn(n.g,0,t,0,n.i),t}function x3(n,t){var e;return nS(),!(e=BB(RX(mAt,n),55))||e.wj(t)}function D3(n){if(1!=n.p)throw Hp(new dv);return dG(n.f)<<24>>24}function R3(n){if(1!=n.p)throw Hp(new dv);return dG(n.k)<<24>>24}function K3(n){if(7!=n.p)throw Hp(new dv);return dG(n.k)<<16>>16}function _3(n){if(7!=n.p)throw Hp(new dv);return dG(n.f)<<16>>16}function F3(n){var t;for(t=0;n.Ob();)n.Pb(),t=rbn(t,1);return ttn(t)}function B3(n,t){var e;return e=new Ik,n.xd(e),e.a+="..",t.yd(e),e.a}function H3(n,t,e){var i;i=BB(RX(n.g,e),57),WB(n.a.c,new rI(t,i))}function q3(n,t,e){return Tz(MD(qI(AJ(n.f,t))),MD(qI(AJ(n.f,e))))}function G3(n,t,e){return UFn(n,t,e,cL(t,99)&&0!=(BB(t,18).Bb&BQn))}function z3(n,t,e){return pBn(n,t,e,cL(t,99)&&0!=(BB(t,18).Bb&BQn))}function U3(n,t,e){return x$n(n,t,e,cL(t,99)&&0!=(BB(t,18).Bb&BQn))}function X3(n,t){return n==(uSn(),Cut)&&t==Cut?4:n==Cut||t==Cut?8:32}function W3(n,t){return GI(t)===GI(n)?"(this Map)":null==t?zWn:Bbn(t)}function V3(n,t){return BB(null==t?qI(AJ(n.f,null)):hS(n.g,t),281)}function Q3(n,t,e){var i;return i=Qdn(e),VW(n.b,i,t),VW(n.c,t,e),t}function J3(n,t){var e;for(e=t;e;)_x(n,e.i,e.j),e=YY(e);return n}function Y3(n,t){var e;return e=rJ(HB(new C7(n,t))),Cq(new C7(n,t)),e}function Z3(n,t){var e;return ZM(),TSn(e=BB(n,66).Mj(),t),e.Ok(t)}function n4(n,t,e,i,r){WB(t,mCn(r,X$n(r,e,i))),UMn(n,r,t)}function t4(n,t,e){n.i=0,n.e=0,t!=e&&(Won(n,t,e),Xon(n,t,e))}function e4(n,t){var e;e=n.q.getHours(),n.q.setFullYear(t+sQn),lBn(n,e)}function i4(n,t,e){if(e){var i=e.ee();n.a[t]=i(e)}else delete n.a[t]}function r4(n,t,e){if(e){var i=e.ee();e=i(e)}else e=void 0;n.a[t]=e}function c4(n){if(n<0)throw Hp(new By("Negative array size: "+n))}function a4(n){return n.n||(P5(n),n.n=new JG(n,VAt,n),kJ(n)),n.n}function u4(n){return Px(n.a=0&&n.a[e]===t[e];e--);return e<0}function T4(n,t){var e;return zsn(),0!=(e=n.j.g-t.j.g)?e:0}function M4(n,t){return kW(t),null!=n.a?PG(t.Kb(n.a)):Set}function S4(n){var t;return n?new Lq(n):(qrn(t=new fA,n),t)}function P4(n,t){return t.b.Kb(T7(n,t.c.Ee(),new yw(t)))}function C4(n){yTn(),hL(this,dG(e0(kz(n,24),sJn)),dG(e0(n,sJn)))}function I4(){I4=O,pit=lhn((hpn(),Pun(Gk(yit,1),$Vn,428,0,[dit,wit])))}function O4(){O4=O,kit=lhn((Rnn(),Pun(Gk(Kit,1),$Vn,427,0,[vit,mit])))}function A4(){A4=O,_ct=lhn((Knn(),Pun(Gk($at,1),$Vn,424,0,[Dct,Rct])))}function $4(){$4=O,zut=lhn((Srn(),Pun(Gk(Wut,1),$Vn,511,0,[qut,Hut])))}function L4(){L4=O,Iht=lhn((_nn(),Pun(Gk(Lht,1),$Vn,419,0,[Sht,Pht])))}function N4(){N4=O,Uht=lhn((g7(),Pun(Gk(Zht,1),$Vn,479,0,[Ght,qht])))}function x4(){x4=O,tmt=lhn((A6(),Pun(Gk(cmt,1),$Vn,376,0,[Zvt,Yvt])))}function D4(){D4=O,Bvt=lhn((U7(),Pun(Gk(zvt,1),$Vn,421,0,[Kvt,_vt])))}function R4(){R4=O,oht=lhn((V8(),Pun(Gk(lht,1),$Vn,422,0,[cht,aht])))}function K4(){K4=O,Nft=lhn((z2(),Pun(Gk(Glt,1),$Vn,420,0,[Aft,$ft])))}function _4(){_4=O,Pyt=lhn((O6(),Pun(Gk(xyt,1),$Vn,520,0,[Myt,Tyt])))}function F4(){F4=O,Gmt=lhn((Q4(),Pun(Gk(Vmt,1),$Vn,523,0,[Hmt,Bmt])))}function B4(){B4=O,iyt=lhn((gY(),Pun(Gk(ayt,1),$Vn,516,0,[tyt,nyt])))}function H4(){H4=O,uyt=lhn((oZ(),Pun(Gk(Syt,1),$Vn,515,0,[ryt,cyt])))}function q4(){q4=O,Dyt=lhn((dY(),Pun(Gk(Byt,1),$Vn,455,0,[Lyt,Nyt])))}function G4(){G4=O,Gkt=lhn((B0(),Pun(Gk(Ykt,1),$Vn,425,0,[Hkt,Bkt])))}function z4(){z4=O,Zkt=lhn((Prn(),Pun(Gk(ijt,1),$Vn,495,0,[Qkt,Jkt])))}function U4(){U4=O,Fkt=lhn((sZ(),Pun(Gk(qkt,1),$Vn,480,0,[Rkt,Kkt])))}function X4(){X4=O,ojt=lhn((D9(),Pun(Gk(ljt,1),$Vn,426,0,[cjt,ajt])))}function W4(){W4=O,QTt=lhn((Lun(),Pun(Gk(JTt,1),$Vn,429,0,[WTt,XTt])))}function V4(){V4=O,eTt=lhn(($6(),Pun(Gk(oTt,1),$Vn,430,0,[nTt,ZEt])))}function Q4(){Q4=O,Hmt=new YP("UPPER",0),Bmt=new YP("LOWER",1)}function J4(n,t){var e;qQ(e=new py,"x",t.a),qQ(e,"y",t.b),nW(n,e)}function Y4(n,t){var e;qQ(e=new py,"x",t.a),qQ(e,"y",t.b),nW(n,e)}function Z4(n,t){var e,i;i=!1;do{i|=e=bon(n,t)}while(e);return i}function n5(n,t){var e,i;for(e=t,i=0;e>0;)i+=n.a[e],e-=e&-e;return i}function t5(n,t){var e;for(e=t;e;)_x(n,-e.i,-e.j),e=YY(e);return n}function e5(n,t){var e,i;for(kW(t),i=n.Kc();i.Ob();)e=i.Pb(),t.td(e)}function i5(n,t){var e;return new vT(e=t.cd(),n.e.pc(e,BB(t.dd(),14)))}function r5(n,t,e,i){var r;(r=new $).c=t,r.b=e,r.a=i,i.b=e.a=r,++n.b}function c5(n,t,e){var i;return l1(t,n.c.length),i=n.c[t],n.c[t]=e,i}function a5(n,t,e){return BB(null==t?jCn(n.f,null,e):ubn(n.g,t,e),281)}function u5(n){return n.c&&n.d?p0(n.c)+"->"+p0(n.d):"e_"+PN(n)}function o5(n,t){return(Qln(n),jE(new Rq(n,new Q9(t,n.a)))).sd(tit)}function s5(){return yMn(),Pun(Gk(Uat,1),$Vn,356,0,[Rat,Kat,_at,Fat,Bat])}function h5(){return kUn(),Pun(Gk(FIt,1),JZn,61,0,[PIt,sIt,oIt,SIt,CIt])}function f5(n){return Dk(),function(){return _2(n,this,arguments)}}function l5(){return Date.now?Date.now():(new Date).getTime()}function b5(n){return!(!n.c||!n.d||!n.c.i||n.c.i!=n.d.i)}function w5(n){if(!n.c.Sb())throw Hp(new yv);return n.a=!0,n.c.Ub()}function d5(n){n.i=0,yS(n.b,null),yS(n.c,null),n.a=null,n.e=null,++n.g}function g5(n){dS.call(this,null==n?zWn:Bbn(n),cL(n,78)?BB(n,78):null)}function p5(n){eWn(),Bp(this),this.a=new JT,dsn(this,n),DH(this.a,n)}function v5(){xA(this),this.b=new xC(RQn,RQn),this.a=new xC(KQn,KQn)}function m5(n,t){this.c=0,this.b=t,pO.call(this,n,17493),this.a=this.c}function y5(n){k5(),Qet||(this.c=n,this.e=!0,this.a=new Np)}function k5(){k5=O,Qet=!0,Wet=!1,Vet=!1,Yet=!1,Jet=!1}function j5(n,t){return!!cL(t,149)&&mK(n.c,BB(t,149).c)}function E5(n,t){var e;return e=0,n&&(e+=n.f.a/2),t&&(e+=t.f.a/2),e}function T5(n,t){return BB(lnn(n.d,t),23)||BB(lnn(n.e,t),23)}function M5(n){this.b=n,AL.call(this,n),this.a=BB(yan(this.b.a,4),126)}function S5(n){this.b=n,ax.call(this,n),this.a=BB(yan(this.b.a,4),126)}function P5(n){return n.t||(n.t=new dp(n),sln(new xy(n),0,n.t)),n.t}function C5(){return Ffn(),Pun(Gk(WPt,1),$Vn,103,0,[BPt,FPt,_Pt,KPt,HPt])}function I5(){return cpn(),Pun(Gk(YCt,1),$Vn,249,0,[BCt,qCt,_Ct,FCt,HCt])}function O5(){return rpn(),Pun(Gk(jMt,1),$Vn,175,0,[hMt,sMt,uMt,fMt,oMt])}function A5(){return $Sn(),Pun(Gk(zTt,1),$Vn,316,0,[iTt,rTt,uTt,cTt,aTt])}function $5(){return Nvn(),Pun(Gk(Avt,1),$Vn,315,0,[yvt,pvt,vvt,gvt,mvt])}function L5(){return Vvn(),Pun(Gk(Cht,1),$Vn,335,0,[yht,mht,jht,Eht,kht])}function N5(){return JLn(),Pun(Gk(zEt,1),$Vn,355,0,[DEt,xEt,KEt,REt,_Et])}function x5(){return LEn(),Pun(Gk(Kst,1),$Vn,363,0,[Mst,Pst,Cst,Sst,Tst])}function D5(){return Tbn(),Pun(Gk(ivt,1),$Vn,163,0,[qlt,_lt,Flt,Blt,Hlt])}function R5(){var n,t;R5=O,iE(),t=new Ev,tLt=t,n=new Om,eLt=n}function K5(n){var t;return n.c||cL(t=n.r,88)&&(n.c=BB(t,26)),n.c}function _5(n){return n.e=3,n.d=n.Yb(),2!=n.e&&(n.e=0,!0)}function F5(n){return M$(n&SQn,n>>22&SQn,n<0?PQn:0)}function B5(n){var t,e,i;for(e=0,i=(t=n).length;e0?Edn(n,t):Ixn(n,-t)}function z5(n,t){return 0==t||0==n.e?n:t>0?Ixn(n,t):Edn(n,-t)}function U5(n){if(dAn(n))return n.c=n.a,n.a.Pb();throw Hp(new yv)}function X5(n){var t,e;return t=n.c.i,e=n.d.i,t.k==(uSn(),Mut)&&e.k==Mut}function W5(n){var t;return qan(t=new wJ,n),hon(t,(HXn(),vgt),null),t}function V5(n,t,e){var i;return(i=n.Yg(t))>=0?n._g(i,e,!0):cOn(n,t,e)}function Q5(n,t,e,i){var r;for(r=0;rt)throw Hp(new Ay(dCn(n,t,"index")));return n}function d6(n,t,e,i){var r;return vTn(r=x8(ANt,hQn,25,t,15,1),n,t,e,i),r}function g6(n,t){var e;e=n.q.getHours()+(t/60|0),n.q.setMinutes(t),lBn(n,e)}function p6(n,t){return e.Math.min(W8(t.a,n.d.d.c),W8(t.b,n.d.d.c))}function v6(n,t){return XI(t)?null==t?gAn(n.f,null):Gan(n.g,t):gAn(n.f,t)}function m6(n){this.c=n,this.a=new Wb(this.c.a),this.b=new Wb(this.c.b)}function y6(){this.e=new Np,this.c=new Np,this.d=new Np,this.b=new Np}function k6(){this.g=new Bv,this.b=new Bv,this.a=new Np,this.k=new Np}function j6(n,t,e){this.a=n,this.c=t,this.d=e,WB(t.e,this),WB(e.b,this)}function E6(n,t){gO.call(this,t.rd(),-6&t.qd()),kW(n),this.a=n,this.b=t}function T6(n,t){pO.call(this,t.rd(),-6&t.qd()),kW(n),this.a=n,this.b=t}function M6(n,t){vO.call(this,t.rd(),-6&t.qd()),kW(n),this.a=n,this.b=t}function S6(n,t,e){this.a=n,this.b=t,this.c=e,WB(n.t,this),WB(t.i,this)}function P6(){this.b=new JT,this.a=new JT,this.b=new JT,this.a=new JT}function C6(){C6=O,TMt=new up("org.eclipse.elk.labels.labelManager")}function I6(){I6=O,est=new iR("separateLayerConnections",(Iun(),ast))}function O6(){O6=O,Myt=new uC("REGULAR",0),Tyt=new uC("CRITICAL",1)}function A6(){A6=O,Zvt=new XP("STACKED",0),Yvt=new XP("SEQUENCED",1)}function $6(){$6=O,nTt=new TC("FIXED",0),ZEt=new TC("CENTER_NODE",1)}function L6(n,t){var e;return e=xGn(n,t),n.b=new mrn(e.c.length),yqn(n,e)}function N6(n,t,e){return++n.e,--n.f,BB(n.d[t].$c(e),133).dd()}function x6(n){var t;return n.a||cL(t=n.r,148)&&(n.a=BB(t,148)),n.a}function D6(n){return n.a?n.e?D6(n.e):null:n}function R6(n,t){return n.pt.p?-1:0}function K6(n,t){return kW(t),n.c=0,"Initial capacity must not be negative")}function Z6(){Z6=O,Wit=lhn((Dtn(),Pun(Gk(Vit,1),$Vn,232,0,[Git,zit,Uit])))}function n8(){n8=O,trt=lhn((Y9(),Pun(Gk(ert,1),$Vn,461,0,[Jit,Qit,Yit])))}function t8(){t8=O,urt=lhn((G7(),Pun(Gk(Ort,1),$Vn,462,0,[crt,rrt,irt])))}function e8(){e8=O,Zet=lhn((qsn(),Pun(Gk(nit,1),$Vn,132,0,[zet,Uet,Xet])))}function i8(){i8=O,Lat=lhn((q7(),Pun(Gk(Hat,1),$Vn,379,0,[Oat,Iat,Aat])))}function r8(){r8=O,gut=lhn((Bfn(),Pun(Gk(mut,1),$Vn,423,0,[wut,but,lut])))}function c8(){c8=O,bht=lhn((Oin(),Pun(Gk(pht,1),$Vn,314,0,[hht,sht,fht])))}function a8(){a8=O,vht=lhn((uin(),Pun(Gk(Tht,1),$Vn,337,0,[wht,ght,dht])))}function u8(){u8=O,Nht=lhn((Yun(),Pun(Gk(Bht,1),$Vn,450,0,[Aht,Oht,$ht])))}function o8(){o8=O,_st=lhn((Crn(),Pun(Gk(Wst,1),$Vn,361,0,[Rst,Dst,xst])))}function s8(){s8=O,Oft=lhn((z7(),Pun(Gk(Lft,1),$Vn,303,0,[Pft,Cft,Sft])))}function h8(){h8=O,Mft=lhn((Kan(),Pun(Gk(Ift,1),$Vn,292,0,[jft,Eft,kft])))}function f8(){f8=O,svt=lhn((Mhn(),Pun(Gk(wvt,1),$Vn,378,0,[cvt,avt,uvt])))}function l8(){l8=O,Jvt=lhn((Hcn(),Pun(Gk(nmt,1),$Vn,375,0,[Xvt,Wvt,Vvt])))}function b8(){b8=O,Rvt=lhn((mon(),Pun(Gk(Fvt,1),$Vn,339,0,[Nvt,Lvt,xvt])))}function w8(){w8=O,Uvt=lhn((ain(),Pun(Gk(Qvt,1),$Vn,452,0,[Gvt,Hvt,qvt])))}function d8(){d8=O,gmt=lhn(($un(),Pun(Gk(Smt,1),$Vn,377,0,[bmt,wmt,lmt])))}function g8(){g8=O,amt=lhn((Usn(),Pun(Gk(hmt,1),$Vn,336,0,[emt,imt,rmt])))}function p8(){p8=O,fmt=lhn((dcn(),Pun(Gk(dmt,1),$Vn,338,0,[smt,umt,omt])))}function v8(){v8=O,Nmt=lhn((oin(),Pun(Gk(xmt,1),$Vn,454,0,[Omt,Amt,$mt])))}function m8(){m8=O,rjt=lhn((Cbn(),Pun(Gk(ujt,1),$Vn,442,0,[ejt,njt,tjt])))}function y8(){y8=O,bjt=lhn((Hsn(),Pun(Gk(Gjt,1),$Vn,380,0,[sjt,hjt,fjt])))}function k8(){k8=O,eEt=lhn((Sbn(),Pun(Gk(NEt,1),$Vn,381,0,[Zjt,nEt,Yjt])))}function j8(){j8=O,Qjt=lhn((Bcn(),Pun(Gk(Jjt,1),$Vn,293,0,[Xjt,Wjt,Ujt])))}function E8(){E8=O,UEt=lhn((Pbn(),Pun(Gk(WEt,1),$Vn,437,0,[HEt,qEt,GEt])))}function T8(){T8=O,kCt=lhn((ufn(),Pun(Gk(SCt,1),$Vn,334,0,[vCt,pCt,mCt])))}function M8(){M8=O,VPt=lhn((Rtn(),Pun(Gk(nCt,1),$Vn,272,0,[zPt,UPt,XPt])))}function S8(){return QEn(),Pun(Gk(aIt,1),$Vn,98,0,[JCt,QCt,VCt,UCt,WCt,XCt])}function P8(n,t){return!n.o&&(n.o=new y9((CXn(),MOt),rAt,n,0)),rdn(n.o,t)}function C8(n){return!n.g&&(n.g=new oo),!n.g.d&&(n.g.d=new lp(n)),n.g.d}function I8(n){return!n.g&&(n.g=new oo),!n.g.a&&(n.g.a=new bp(n)),n.g.a}function O8(n){return!n.g&&(n.g=new oo),!n.g.b&&(n.g.b=new fp(n)),n.g.b}function A8(n){return!n.g&&(n.g=new oo),!n.g.c&&(n.g.c=new wp(n)),n.g.c}function $8(n,t,e){var i,r;for(r=new Aan(t,n),i=0;ie||t=0?n._g(e,!0,!0):cOn(n,t,!0)}function P9(n,t){return Pln(Gy(MD(mMn(n,(hWn(),Tlt)))),Gy(MD(mMn(t,Tlt))))}function C9(){C9=O,Ukt=ogn(ogn(FM(new B2,(zyn(),Kyt)),(DPn(),Qyt)),Uyt)}function I9(n,t,e){var i;return i=Non(n,t,e),n.b=new mrn(i.c.length),sDn(n,i)}function O9(n){if(n.b<=0)throw Hp(new yv);return--n.b,n.a-=n.c.c,iln(n.a)}function A9(n){var t;if(!n.a)throw Hp(new lV);return t=n.a,n.a=YY(n.a),t}function $9(n){for(;!n.a;)if(!TK(n.c,new pw(n)))return!1;return!0}function L9(n){return yX(n),cL(n,198)?BB(n,198):new ol(n)}function N9(n){x9(),BB(n.We((sWn(),fPt)),174).Fc((lIn(),iIt)),n.Ye(hPt,null)}function x9(){x9=O,tMt=new bu,iMt=new wu,eMt=vsn((sWn(),hPt),tMt,qSt,iMt)}function D9(){D9=O,cjt=new pC("LEAF_NUMBER",0),ajt=new pC("NODE_SIZE",1)}function R9(n,t,e){n.a=t,n.c=e,n.b.a.$b(),yQ(n.d),n.e.a.c=x8(Ant,HWn,1,0,5,1)}function K9(n){n.a=x8(ANt,hQn,25,n.b+1,15,1),n.c=x8(ANt,hQn,25,n.b,15,1),n.d=0}function _9(n,t){n.a.ue(t.d,n.b)>0&&(WB(n.c,new mH(t.c,t.d,n.d)),n.b=t.d)}function F9(n,t){if(null==n.g||t>=n.i)throw Hp(new LO(t,n.i));return n.g[t]}function B9(n,t,e){if(xsn(n,e),null!=e&&!n.wj(e))throw Hp(new lv);return e}function H9(n){var t;if(n.Ek())for(t=n.i-1;t>=0;--t)Wtn(n,t);return N3(n)}function q9(n){var t,e;if(!n.b)return null;for(e=n.b;t=e.a[0];)e=t;return e}function G9(n,t){var e;return c4(t),(e=m7(n.slice(0,t),n)).length=t,e}function z9(n,t,e,i){PQ(),i=i||wet,gCn(n.slice(t,e),n,t,e,-t,i)}function U9(n,t,e,i,r){return t<0?cOn(n,e,i):BB(e,66).Nj().Pj(n,n.yh(),t,i,r)}function X9(n){return cL(n,172)?""+BB(n,172).a:null==n?null:Bbn(n)}function W9(n){return cL(n,172)?""+BB(n,172).a:null==n?null:Bbn(n)}function V9(n,t){if(t.a)throw Hp(new dy(IJn));TU(n.a,t),t.a=n,!n.j&&(n.j=t)}function Q9(n,t){vO.call(this,t.rd(),-16449&t.qd()),kW(n),this.a=n,this.c=t}function J9(n,t){var e,i;return i=t/n.c.Hd().gc()|0,e=t%n.c.Hd().gc(),U6(n,i,e)}function Y9(){Y9=O,Jit=new GS(cYn,0),Qit=new GS(eYn,1),Yit=new GS(aYn,2)}function Z9(){Z9=O,Net=new gS("All",0),xet=new LA,Det=new A$,Ret=new NA}function n7(){n7=O,_et=lhn((Z9(),Pun(Gk(Fet,1),$Vn,297,0,[Net,xet,Det,Ret])))}function t7(){t7=O,rut=lhn((Aun(),Pun(Gk(dut,1),$Vn,405,0,[Zat,eut,nut,tut])))}function e7(){e7=O,_rt=lhn((Dan(),Pun(Gk(Grt,1),$Vn,406,0,[Rrt,Nrt,xrt,Drt])))}function i7(){i7=O,zrt=lhn((Hpn(),Pun(Gk(Urt,1),$Vn,323,0,[Brt,Frt,Hrt,qrt])))}function r7(){r7=O,ict=lhn((qpn(),Pun(Gk(cct,1),$Vn,394,0,[Zrt,Yrt,nct,tct])))}function c7(){c7=O,Hyt=lhn((zyn(),Pun(Gk(qyt,1),$Vn,393,0,[Ryt,Kyt,_yt,Fyt])))}function a7(){a7=O,ost=lhn((Iun(),Pun(Gk(pst,1),$Vn,360,0,[ast,rst,cst,ist])))}function u7(){u7=O,zjt=lhn((Omn(),Pun(Gk(Vjt,1),$Vn,340,0,[qjt,Bjt,Hjt,Fjt])))}function o7(){o7=O,Est=lhn((Oun(),Pun(Gk(Ist,1),$Vn,411,0,[vst,mst,yst,kst])))}function s7(){s7=O,dvt=lhn((bvn(),Pun(Gk(kvt,1),$Vn,197,0,[lvt,bvt,fvt,hvt])))}function h7(){h7=O,fOt=lhn((Bsn(),Pun(Gk(wOt,1),$Vn,396,0,[uOt,oOt,aOt,sOt])))}function f7(){f7=O,PCt=lhn((Xyn(),Pun(Gk(RCt,1),$Vn,285,0,[MCt,jCt,ECt,TCt])))}function l7(){l7=O,tCt=lhn((Mbn(),Pun(Gk(oCt,1),$Vn,218,0,[ZPt,JPt,QPt,YPt])))}function b7(){b7=O,rOt=lhn((Fwn(),Pun(Gk(cOt,1),$Vn,311,0,[eOt,ZIt,tOt,nOt])))}function w7(){w7=O,BIt=lhn((mdn(),Pun(Gk(JIt,1),$Vn,374,0,[KIt,_It,RIt,DIt])))}function d7(){d7=O,qBn(),HLt=RQn,BLt=KQn,GLt=new Nb(RQn),qLt=new Nb(KQn)}function g7(){g7=O,Ght=new OP(QZn,0),qht=new OP("IMPROVE_STRAIGHTNESS",1)}function p7(n,t){return hH(),WB(n,new rI(t,iln(t.e.c.length+t.g.c.length)))}function v7(n,t){return hH(),WB(n,new rI(t,iln(t.e.c.length+t.g.c.length)))}function m7(n,t){return 10!=vnn(t)&&Pun(tsn(t),t.hm,t.__elementTypeId$,vnn(t),n),n}function y7(n,t){var e;return-1!=(e=E7(n,t,0))&&(s6(n,e),!0)}function k7(n,t){var e;return(e=BB(v6(n.e,t),387))?(RH(e),e.e):null}function j7(n){var t;return YO(n)&&(t=0-n,!isNaN(t))?t:uan(aon(n))}function E7(n,t,e){for(;e=0?Zpn(n,e,!0,!0):cOn(n,t,!0)}function Z7(n,t){var e,i;return MM(),e=f3(n),i=f3(t),!!e&&!!i&&!Kpn(e.k,i.k)}function nnn(n,t){Pen(n,null==t||WK((kW(t),t))||isNaN((kW(t),t))?0:(kW(t),t))}function tnn(n,t){Cen(n,null==t||WK((kW(t),t))||isNaN((kW(t),t))?0:(kW(t),t))}function enn(n,t){Sen(n,null==t||WK((kW(t),t))||isNaN((kW(t),t))?0:(kW(t),t))}function inn(n,t){Men(n,null==t||WK((kW(t),t))||isNaN((kW(t),t))?0:(kW(t),t))}function rnn(n){(this.q?this.q:(SQ(),SQ(),het)).Ac(n.q?n.q:(SQ(),SQ(),het))}function cnn(n,t){return cL(t,99)&&0!=(BB(t,18).Bb&BQn)?new xO(t,n):new Aan(t,n)}function ann(n,t){return cL(t,99)&&0!=(BB(t,18).Bb&BQn)?new xO(t,n):new Aan(t,n)}function unn(n,t){Vrt=new it,ect=t,BB((Wrt=n).b,65),K8(Wrt,Vrt,null),uqn(Wrt)}function onn(n,t,e){var i;return i=n.g[t],jL(n,t,n.oi(t,e)),n.gi(t,e,i),n.ci(),i}function snn(n,t){var e;return(e=n.Xc(t))>=0&&(n.$c(e),!0)}function hnn(n){var t;return n.d!=n.r&&(t=Ikn(n),n.e=!!t&&t.Cj()==E9n,n.d=t),n.e}function fnn(n,t){var e;for(yX(n),yX(t),e=!1;t.Ob();)e|=n.Fc(t.Pb());return e}function lnn(n,t){var e;return(e=BB(RX(n.e,t),387))?(uL(n,e),e.e):null}function bnn(n){var t,e;return t=n/60|0,0==(e=n%60)?""+t:t+":"+e}function wnn(n,t){return Qln(n),new Rq(n,new KK(new M6(t,n.a)))}function dnn(n,t){var e=n.a[t],i=(Zun(),ftt)[typeof e];return i?i(e):khn(typeof e)}function gnn(n){switch(n.g){case 0:return DWn;case 1:return-1;default:return 0}}function pnn(n){return Kkn(n,(X7(),gtt))<0?-CN(aon(n)):n.l+n.m*IQn+n.h*OQn}function vnn(n){return null==n.__elementTypeCategory$?10:n.__elementTypeCategory$}function mnn(n){var t;return null!=(t=0==n.b.c.length?null:xq(n.b,0))&&hrn(n,0),t}function ynn(n,t){for(;t[0]=0;)++t[0]}function knn(n,t){this.e=t,this.a=Van(n),this.a<54?this.f=j2(n):this.c=npn(n)}function jnn(n,t,e,i){wWn(),Ap.call(this,26),this.c=n,this.a=t,this.d=e,this.b=i}function Enn(n,t,e){var i,r;for(i=10,r=0;rn.a[i]&&(i=e);return i}function Lnn(n,t){var e;return 0==(e=Ibn(n.e.c,t.e.c))?Pln(n.e.d,t.e.d):e}function Nnn(n,t){return 0==t.e||0==n.e?eet:($On(),ANn(n,t))}function xnn(n,t){if(!n)throw Hp(new _y(JNn("Enum constant undefined: %s",t)))}function Dnn(){Dnn=O,uut=new St,out=new Tt,cut=new At,aut=new $t,sut=new Lt}function Rnn(){Rnn=O,vit=new BS("BY_SIZE",0),mit=new BS("BY_SIZE_AND_SHAPE",1)}function Knn(){Knn=O,Dct=new XS("EADES",0),Rct=new XS("FRUCHTERMAN_REINGOLD",1)}function _nn(){_nn=O,Sht=new PP("READING_DIRECTION",0),Pht=new PP("ROTATION",1)}function Fnn(){Fnn=O,Mht=lhn((Vvn(),Pun(Gk(Cht,1),$Vn,335,0,[yht,mht,jht,Eht,kht])))}function Bnn(){Bnn=O,jvt=lhn((Nvn(),Pun(Gk(Avt,1),$Vn,315,0,[yvt,pvt,vvt,gvt,mvt])))}function Hnn(){Hnn=O,Ost=lhn((LEn(),Pun(Gk(Kst,1),$Vn,363,0,[Mst,Pst,Cst,Sst,Tst])))}function qnn(){qnn=O,zlt=lhn((Tbn(),Pun(Gk(ivt,1),$Vn,163,0,[qlt,_lt,Flt,Blt,Hlt])))}function Gnn(){Gnn=O,sTt=lhn(($Sn(),Pun(Gk(zTt,1),$Vn,316,0,[iTt,rTt,uTt,cTt,aTt])))}function znn(){znn=O,bMt=lhn((rpn(),Pun(Gk(jMt,1),$Vn,175,0,[hMt,sMt,uMt,fMt,oMt])))}function Unn(){Unn=O,BEt=lhn((JLn(),Pun(Gk(zEt,1),$Vn,355,0,[DEt,xEt,KEt,REt,_Et])))}function Xnn(){Xnn=O,qat=lhn((yMn(),Pun(Gk(Uat,1),$Vn,356,0,[Rat,Kat,_at,Fat,Bat])))}function Wnn(){Wnn=O,GPt=lhn((Ffn(),Pun(Gk(WPt,1),$Vn,103,0,[BPt,FPt,_Pt,KPt,HPt])))}function Vnn(){Vnn=O,zCt=lhn((cpn(),Pun(Gk(YCt,1),$Vn,249,0,[BCt,qCt,_Ct,FCt,HCt])))}function Qnn(){Qnn=O,OIt=lhn((kUn(),Pun(Gk(FIt,1),JZn,61,0,[PIt,sIt,oIt,SIt,CIt])))}function Jnn(n,t){var e;return(e=BB(RX(n.a,t),134))||(e=new Zn,VW(n.a,t,e)),e}function Ynn(n){var t;return!!(t=BB(mMn(n,(hWn(),Rft)),305))&&t.a==n}function Znn(n){var t;return!!(t=BB(mMn(n,(hWn(),Rft)),305))&&t.i==n}function ntn(n,t){return kW(t),Dz(n),!!n.d.Ob()&&(t.td(n.d.Pb()),!0)}function ttn(n){return Vhn(n,DWn)>0?DWn:Vhn(n,_Vn)<0?_Vn:dG(n)}function etn(n){return n<3?(lin(n,IVn),n+1):n=0&&t=-.01&&n.a<=fYn&&(n.a=0),n.b>=-.01&&n.b<=fYn&&(n.b=0),n}function atn(n,t){return t==(c_(),c_(),Met)?n.toLocaleLowerCase():n.toLowerCase()}function utn(n){return(0!=(2&n.i)?"interface ":0!=(1&n.i)?"":"class ")+(ED(n),n.o)}function otn(n){var t;t=new $m,f9((!n.q&&(n.q=new eU(QAt,n,11,10)),n.q),t)}function stn(n,t){var e;return e=t>0?t-1:t,$j(Lj(Fen(LH(new Xm,e),n.n),n.j),n.k)}function htn(n,t,e,i){n.j=-1,qOn(n,EPn(n,t,e),(ZM(),BB(t,66).Mj().Ok(i)))}function ftn(n){this.g=n,this.f=new Np,this.a=e.Math.min(this.g.c.c,this.g.d.c)}function ltn(n){this.b=new Np,this.a=new Np,this.c=new Np,this.d=new Np,this.e=n}function btn(n,t){this.a=new xp,this.e=new xp,this.b=(Mhn(),uvt),this.c=n,this.b=t}function wtn(n,t,e){NR.call(this),xtn(this),this.a=n,this.c=e,this.b=t.d,this.f=t.e}function dtn(n){this.d=n,this.c=n.c.vc().Kc(),this.b=null,this.a=null,this.e=(ry(),znt)}function gtn(n){if(n<0)throw Hp(new _y("Illegal Capacity: "+n));this.g=this.ri(n)}function ptn(n,t){if(0>n||n>t)throw Hp(new Tk("fromIndex: 0, toIndex: "+n+hJn+t))}function vtn(n){var t;if(n.a==n.b.a)throw Hp(new yv);return t=n.a,n.c=t,n.a=n.a.e,t}function mtn(n){var t;Mx(!!n.c),t=n.c.a,Atn(n.d,n.c),n.b==n.c?n.b=t:--n.a,n.c=null}function ytn(n,t){var e;return Qln(n),e=new vQ(n,n.a.rd(),4|n.a.qd(),t),new Rq(n,e)}function ktn(n,t){var e,i;return(e=BB(lfn(n.d,t),14))?(i=t,n.e.pc(i,e)):null}function jtn(n,t){var e;for(e=n.Kc();e.Ob();)hon(BB(e.Pb(),70),(hWn(),ult),t)}function Etn(n){var t;return(t=Gy(MD(mMn(n,(HXn(),agt)))))<0&&hon(n,agt,t=0),t}function Ttn(n,t,i){var r;Fkn(i,r=e.Math.max(0,n.b/2-.5),1),WB(t,new iP(i,r))}function Mtn(n,t,e){return CY(HH(n.a.e[BB(t.a,10).p]-n.a.e[BB(e.a,10).p]))}function Stn(n,t,e,i,r,c){var a;SZ(a=W5(i),r),MZ(a,c),YIn(n.a,i,new L_(a,t,e.f))}function Ptn(n,t){var e;if(!(e=NNn(n.Tg(),t)))throw Hp(new _y(r6n+t+u6n));return e}function Ctn(n,t){var e;for(e=n;YY(e);)if((e=YY(e))==t)return!0;return!1}function Itn(n,t){var e,i,r;for(i=t.a.cd(),e=BB(t.a.dd(),14).gc(),r=0;r0&&(n.a/=t,n.b/=t),n}function Utn(n){var t;return n.w?n.w:((t=V1(n))&&!t.kh()&&(n.w=t),t)}function Xtn(n){var t;return null==n?null:VTn(t=BB(n,190),t.length)}function Wtn(n,t){if(null==n.g||t>=n.i)throw Hp(new LO(t,n.i));return n.li(t,n.g[t])}function Vtn(n){var t,e;for(t=n.a.d.j,e=n.c.d.j;t!=e;)orn(n.b,t),t=Mln(t);orn(n.b,t)}function Qtn(n){var t;for(t=0;t=14&&t<=16)),n}function ien(n,t,e){var i=function(){return n.apply(i,arguments)};return t.apply(i,e),i}function ren(n,t,e){var i,r;i=t;do{r=Gy(n.p[i.p])+e,n.p[i.p]=r,i=n.a[i.p]}while(i!=t)}function cen(n,t){var e,i;i=n.a,e=Qfn(n,t,null),i!=t&&!n.e&&(e=azn(n,t,e)),e&&e.Fi()}function aen(n,t){return h$(),rin(KVn),e.Math.abs(n-t)<=KVn||n==t||isNaN(n)&&isNaN(t)}function uen(n,t){return h$(),rin(KVn),e.Math.abs(n-t)<=KVn||n==t||isNaN(n)&&isNaN(t)}function oen(n,t){return _Mn(),E$(n.b.c.length-n.e.c.length,t.b.c.length-t.e.c.length)}function sen(n,t){return Zj(Yrn(n,t,dG(cbn(SVn,rV(dG(cbn(null==t?0:nsn(t),PVn)),15)))))}function hen(){hen=O,Aut=lhn((uSn(),Pun(Gk($ut,1),$Vn,267,0,[Cut,Put,Mut,Iut,Sut,Tut])))}function fen(){fen=O,tSt=lhn((wEn(),Pun(Gk(qPt,1),$Vn,291,0,[ZMt,YMt,JMt,VMt,WMt,QMt])))}function len(){len=O,xMt=lhn((wvn(),Pun(Gk(nSt,1),$Vn,248,0,[CMt,AMt,$Mt,LMt,IMt,OMt])))}function ben(){ben=O,rht=lhn(($Pn(),Pun(Gk(uht,1),$Vn,227,0,[Zst,tht,Yst,nht,eht,Jst])))}function wen(){wen=O,oft=lhn((YMn(),Pun(Gk(mft,1),$Vn,275,0,[cft,eft,aft,rft,ift,tft])))}function den(){den=O,nft=lhn((Bjn(),Pun(Gk(uft,1),$Vn,274,0,[Qht,Vht,Yht,Wht,Jht,Xht])))}function gen(){gen=O,rvt=lhn((TTn(),Pun(Gk(ovt,1),$Vn,313,0,[tvt,Zpt,Jpt,Ypt,evt,nvt])))}function pen(){pen=O,Hht=lhn((gSn(),Pun(Gk(zht,1),$Vn,276,0,[Dht,xht,Kht,Rht,Fht,_ht])))}function ven(){ven=O,Yyt=lhn((DPn(),Pun(Gk(_kt,1),$Vn,327,0,[Qyt,Uyt,Wyt,Xyt,Vyt,zyt])))}function men(){men=O,uIt=lhn((lIn(),Pun(Gk(IIt,1),$Vn,273,0,[rIt,eIt,iIt,tIt,nIt,cIt])))}function yen(){yen=O,sCt=lhn((nMn(),Pun(Gk(yCt,1),$Vn,312,0,[aCt,rCt,uCt,eCt,cCt,iCt])))}function ken(){return n$n(),Pun(Gk(GCt,1),$Vn,93,0,[ICt,CCt,ACt,DCt,xCt,NCt,$Ct,LCt,OCt])}function jen(n,t){var e;e=n.a,n.a=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new f4(n,0,e,n.a))}function Een(n,t){var e;e=n.b,n.b=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new f4(n,1,e,n.b))}function Ten(n,t){var e;e=n.b,n.b=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new f4(n,3,e,n.b))}function Men(n,t){var e;e=n.f,n.f=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new f4(n,3,e,n.f))}function Sen(n,t){var e;e=n.g,n.g=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new f4(n,4,e,n.g))}function Pen(n,t){var e;e=n.i,n.i=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new f4(n,5,e,n.i))}function Cen(n,t){var e;e=n.j,n.j=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new f4(n,6,e,n.j))}function Ien(n,t){var e;e=n.j,n.j=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new f4(n,1,e,n.j))}function Oen(n,t){var e;e=n.c,n.c=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new f4(n,4,e,n.c))}function Aen(n,t){var e;e=n.k,n.k=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new f4(n,2,e,n.k))}function $en(n,t){var e;e=n.d,n.d=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new l4(n,2,e,n.d))}function Len(n,t){var e;e=n.s,n.s=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new l4(n,4,e,n.s))}function Nen(n,t){var e;e=n.t,n.t=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new l4(n,5,e,n.t))}function xen(n,t){var e;e=n.F,n.F=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,5,e,t))}function Den(n,t){var e;return(e=BB(RX((nS(),mAt),n),55))?e.xj(t):x8(Ant,HWn,1,t,5,1)}function Ren(n,t){var e;return t in n.a&&(e=zY(n,t).he())?e.a:null}function Ken(n,t){var e,i;return tE(),i=new uo,!!t&&INn(i,t),xin(e=i,n),e}function _en(n,t,e){if(xsn(n,e),!n.Bk()&&null!=e&&!n.wj(e))throw Hp(new lv);return e}function Fen(n,t){return n.n=t,n.n?(n.f=new Np,n.e=new Np):(n.f=null,n.e=null),n}function Ben(n,t,e,i,r,c){var a;return Qen(e,a=mX(n,t)),a.i=r?8:0,a.f=i,a.e=r,a.g=c,a}function Hen(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=n,this.a=e}function qen(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=n,this.a=e}function Gen(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=n,this.a=e}function zen(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=n,this.a=e}function Uen(n,t,e,i,r){this.d=t,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=n,this.a=e}function Xen(n,t){var e,i,r,c;for(r=0,c=(i=t).length;r=0),rgn(n.d,n.c)<0&&(n.a=n.a-1&n.d.a.length-1,n.b=n.d.c),n.c=-1}function iin(n){return n.a<54?n.f<0?-1:n.f>0?1:0:(!n.c&&(n.c=yhn(n.f)),n.c).e}function rin(n){if(!(n>=0))throw Hp(new _y("tolerance ("+n+") must be >= 0"));return n}function cin(){return cMt||ksn(cMt=new ORn,Pun(Gk(_it,1),HWn,130,0,[new Nf])),cMt}function ain(){ain=O,Gvt=new zP(hYn,0),Hvt=new zP("INPUT",1),qvt=new zP("OUTPUT",2)}function uin(){uin=O,wht=new MP("ARD",0),ght=new MP("MSD",1),dht=new MP("MANUAL",2)}function oin(){oin=O,Omt=new JP("BARYCENTER",0),Amt=new JP(E1n,1),$mt=new JP(T1n,2)}function sin(n,t){var e;if(e=n.gc(),t<0||t>e)throw Hp(new tK(t,e));return new RK(n,t)}function hin(n,t){var e;return cL(t,42)?n.c.Mc(t):(e=rdn(n,t),Wdn(n,t),e)}function fin(n,t,e){return Ihn(n,t),Nrn(n,e),Len(n,0),Nen(n,1),nln(n,!0),Jfn(n,!0),n}function lin(n,t){if(n<0)throw Hp(new _y(t+" cannot be negative but was: "+n));return n}function bin(n,t){var e,i;for(e=0,i=n.gc();e0?BB(xq(e.a,i-1),10):null}function $in(n,t){var e;e=n.k,n.k=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,2,e,n.k))}function Lin(n,t){var e;e=n.f,n.f=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,8,e,n.f))}function Nin(n,t){var e;e=n.i,n.i=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,7,e,n.i))}function xin(n,t){var e;e=n.a,n.a=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,8,e,n.a))}function Din(n,t){var e;e=n.b,n.b=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,0,e,n.b))}function Rin(n,t){var e;e=n.b,n.b=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,0,e,n.b))}function Kin(n,t){var e;e=n.c,n.c=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,1,e,n.c))}function _in(n,t){var e;e=n.c,n.c=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,1,e,n.c))}function Fin(n,t){var e;e=n.c,n.c=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,4,e,n.c))}function Bin(n,t){var e;e=n.d,n.d=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,1,e,n.d))}function Hin(n,t){var e;e=n.D,n.D=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,2,e,n.D))}function qin(n,t){n.r>0&&n.c0&&0!=n.g&&qin(n.i,t/n.r*n.i.d))}function Gin(n,t,e){var i;n.b=t,n.a=e,i=512==(512&n.a)?new Fm:new Dh,n.c=MDn(i,n.b,n.a)}function zin(n,t){return $xn(n.e,t)?(ZM(),hnn(t)?new lq(t,n):new xI(t,n)):new KI(t,n)}function Uin(n,t){return Yj(Zrn(n.a,t,dG(cbn(SVn,rV(dG(cbn(null==t?0:nsn(t),PVn)),15)))))}function Xin(n,t,e){return x7(n,new fw(t),new un,new lw(e),Pun(Gk(nit,1),$Vn,132,0,[]))}function Win(n){return 0>n?new VT:new $D(null,new m5(n+1,n))}function Vin(n,t){var e;return SQ(),e=new XT(1),XI(n)?mZ(e,n,t):jCn(e.f,n,t),new Xb(e)}function Qin(n,t){var e,i;return(e=n.o+n.p)<(i=t.o+t.p)?-1:e==i?0:1}function Jin(n){var t;return cL(t=mMn(n,(hWn(),dlt)),160)?mwn(BB(t,160)):null}function Yin(n){var t;return(n=e.Math.max(n,2))>(t=kon(n))?(t<<=1)>0?t:OVn:t}function Zin(n){switch(uN(3!=n.e),n.e){case 2:return!1;case 0:return!0}return _5(n)}function nrn(n,t){var e;return!!cL(t,8)&&(e=BB(t,8),n.a==e.a&&n.b==e.b)}function trn(n,t,e){var i,r;return r=t>>5,i=31&t,e0(jz(n.n[e][r],dG(yz(i,1))),3)}function ern(n,t){var e,i;for(i=t.vc().Kc();i.Ob();)vjn(n,(e=BB(i.Pb(),42)).cd(),e.dd())}function irn(n,t){var e;e=new it,BB(t.b,65),BB(t.b,65),BB(t.b,65),Otn(t.a,new TB(n,e,t))}function rrn(n,t){var e;e=n.b,n.b=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,21,e,n.b))}function crn(n,t){var e;e=n.d,n.d=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,11,e,n.d))}function arn(n,t){var e;e=n.j,n.j=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,13,e,n.j))}function urn(n,t,e){var i,r,c;for(c=n.a.length-1,r=n.b,i=0;i>>31;0!=i&&(n[e]=i)}function tcn(n,t){var e,i;for(SQ(),i=new Np,e=0;e0&&(this.g=this.ri(this.i+(this.i/8|0)+1),n.Qc(this.g))}function Ecn(n,t){MH.call(this,W$t,n,t),this.b=this,this.a=axn(n.Tg(),itn(this.e.Tg(),this.c))}function Tcn(n,t){var e,i;for(kW(t),i=t.vc().Kc();i.Ob();)e=BB(i.Pb(),42),n.zc(e.cd(),e.dd())}function Mcn(n,t,e){var i;for(i=e.Kc();i.Ob();)if(!G3(n,t,i.Pb()))return!1;return!0}function Scn(n,t,e,i,r){var c;return e&&(c=Awn(t.Tg(),n.c),r=e.gh(t,-1-(-1==c?i:c),null,r)),r}function Pcn(n,t,e,i,r){var c;return e&&(c=Awn(t.Tg(),n.c),r=e.ih(t,-1-(-1==c?i:c),null,r)),r}function Ccn(n){var t;if(-2==n.b){if(0==n.e)t=-1;else for(t=0;0==n.a[t];t++);n.b=t}return n.b}function Icn(n){switch(n.g){case 2:return kUn(),CIt;case 4:return kUn(),oIt;default:return n}}function Ocn(n){switch(n.g){case 1:return kUn(),SIt;case 3:return kUn(),sIt;default:return n}}function Acn(n){var t,e,i;return n.j==(kUn(),sIt)&&(e=SN(t=UOn(n),oIt),(i=SN(t,CIt))||i&&e)}function $cn(n){var t;return new JK(t=BB(n.e&&n.e(),9),BB(VU(t,t.length),9),t.length)}function Lcn(n,t){OTn(t,k1n,1),twn(sM(new Pw((gM(),new HV(n,!1,!1,new Ft))))),HSn(t)}function Ncn(n,t){return hN(),XI(n)?f6(n,SD(t)):UI(n)?Tz(n,MD(t)):zI(n)?Ez(n,TD(t)):n.wd(t)}function xcn(n,t){t.q=n,n.d=e.Math.max(n.d,t.r),n.b+=t.d+(0==n.a.c.length?0:n.c),WB(n.a,t)}function Dcn(n,t){var e,i,r,c;return r=n.c,e=n.c+n.b,c=n.d,i=n.d+n.a,t.a>r&&t.ac&&t.b1||n.Ob())return++n.a,n.g=0,t=n.i,n.Ob(),t;throw Hp(new yv)}function San(n){var t;return a$(),uS(syt,n)||((t=new ua).a=n,wR(syt,n,t)),BB(oV(syt,n),635)}function Pan(n){var t,e,i;return e=0,(i=n)<0&&(i+=OQn,e=PQn),t=CY(i/IQn),M$(CY(i-t*IQn),t,e)}function Can(n){var t,e,i;for(i=0,e=new QT(n.a);e.a>22),r=n.h+t.h+(i>>22),M$(e&SQn,i&SQn,r&PQn)}function hun(n,t){var e,i,r;return e=n.l-t.l,i=n.m-t.m+(e>>22),r=n.h-t.h+(i>>22),M$(e&SQn,i&SQn,r&PQn)}function fun(n){var t;return n<128?(!(t=(Mq(),Mtt)[n])&&(t=Mtt[n]=new Lb(n)),t):new Lb(n)}function lun(n){var t;return cL(n,78)?n:((t=n&&n.__java$exception)||ov(t=new jhn(n)),t)}function bun(n){if(cL(n,186))return BB(n,118);if(n)return null;throw Hp(new Hy(e8n))}function wun(n,t){if(null==t)return!1;for(;n.a!=n.b;)if(Nfn(t,_hn(n)))return!0;return!1}function dun(n){return!!n.a.Ob()||n.a==n.d&&(n.a=new S2(n.e.f),n.a.Ob())}function gun(n,t){var e;return 0!=(e=t.Pc()).length&&(tH(n.c,n.c.length,e),!0)}function pun(n,t,e){var i,r;for(r=t.vc().Kc();r.Ob();)i=BB(r.Pb(),42),n.yc(i.cd(),i.dd(),e);return n}function vun(n,t){var e;for(e=new Wb(n.b);e.a=0,"Negative initial capacity"),vH(t>=0,"Non-positive load factor"),$U(this)}function ton(n,t,e){return!(n>=128)&&YI(n<64?e0(yz(1,n),e):e0(yz(1,n-64),t),0)}function eon(n,t){return!(!n||!t||n==t)&&Ibn(n.b.c,t.b.c+t.b.b)<0&&Ibn(t.b.c,n.b.c+n.b.b)<0}function ion(n){var t,e,i;return e=n.n,i=n.o,t=n.d,new UV(e.a-t.b,e.b-t.d,i.a+(t.b+t.c),i.b+(t.d+t.a))}function ron(n){var t,e,i,r;for(i=0,r=(e=n.a).length;i(i=n.gc()))throw Hp(new tK(t,i));return n.hi()&&(e=nZ(n,e)),n.Vh(t,e)}function son(n,t,e){return null==e?(!n.q&&(n.q=new xp),v6(n.q,t)):(!n.q&&(n.q=new xp),VW(n.q,t,e)),n}function hon(n,t,e){return null==e?(!n.q&&(n.q=new xp),v6(n.q,t)):(!n.q&&(n.q=new xp),VW(n.q,t,e)),n}function fon(n){var t,e;return qan(e=new y6,n),hon(e,(Mrn(),sat),n),eBn(n,e,t=new xp),Szn(n,e,t),e}function lon(n){var t,e,i;for(jDn(),e=x8(PMt,sVn,8,2,0,1),i=0,t=0;t<2;t++)i+=.5,e[t]=lmn(i,n);return e}function bon(n,t){var e,i,r;for(e=!1,i=n.a[t].length,r=0;r>=1);return t}function jon(n){var t,e;return 32==(e=ZIn(n.h))?32==(t=ZIn(n.m))?ZIn(n.l)+32:t+20-10:e-12}function Eon(n){var t;return null==(t=n.a[n.b])?null:($X(n.a,n.b,null),n.b=n.b+1&n.a.length-1,t)}function Ton(n){var t,e;return t=n.t-n.k[n.o.p]*n.d+n.j[n.o.p]>n.f,e=n.u+n.e[n.o.p]*n.d>n.f*n.s*n.d,t||e}function Mon(n,t,e){var i,r;return i=new H8(t,e),r=new q,n.b=Wxn(n,n.b,i,r),r.b||++n.c,n.b.b=!1,r.d}function Son(n,t,e){var i,r,c;for(c=0,r=Lfn(t,e).Kc();r.Ob();)i=BB(r.Pb(),11),VW(n.c,i,iln(c++))}function Pon(n){var t,e;for(e=new Wb(n.a.b);e.ae&&(e=n[t]);return e}function Non(n,t,e){var i;return jxn(n,t,i=new Np,(kUn(),oIt),!0,!1),jxn(n,e,i,CIt,!1,!1),i}function xon(n,t,e){var i,r;return r=N2(t,"labels"),XAn((i=new gI(n,e)).a,i.b,r),r}function Don(n,t,e,i){var r;return(r=m$n(n,t,e,i))||!(r=aln(n,e,i))||Fqn(n,t,r)?r:null}function Ron(n,t,e,i){var r;return(r=y$n(n,t,e,i))||!(r=uln(n,e,i))||Fqn(n,t,r)?r:null}function Kon(n,t){var e;for(e=0;e1||t>=0&&n.b<3)}function Yon(n){var t,e;for(t=new km,e=spn(n,0);e.b!=e.d.c;)Kx(t,0,new wA(BB(b3(e),8)));return t}function Zon(n){var t;for(t=new Wb(n.a.b);t.ai?1:0}function dsn(n,t){return!!bNn(n,t)&&(YIn(n.b,BB(mMn(t,(hWn(),Xft)),21),t),DH(n.a,t),!0)}function gsn(n){var t,e;(t=BB(mMn(n,(hWn(),Elt)),10))&&(y7((e=t.c).a,t),0==e.a.c.length&&y7(vW(t).b,e))}function psn(n){return Qet?x8(Get,dJn,572,0,0,1):BB(Qgn(n.a,x8(Get,dJn,572,n.a.c.length,0,1)),842)}function vsn(n,t,e,i){return nV(),new hy(Pun(Gk(Hnt,1),kVn,42,0,[(zvn(n,t),new vT(n,t)),(zvn(e,i),new vT(e,i))]))}function msn(n,t,e){var i;return fin(i=new $m,t,e),f9((!n.q&&(n.q=new eU(QAt,n,11,10)),n.q),i),i}function ysn(n){var t,e,i,r;for(e=(r=fS(AOt,n)).length,i=x8(Qtt,sVn,2,e,6,1),t=0;t=n.b.c.length||(Esn(n,2*t+1),(e=2*t+2)=0&&n[i]===t[i];i--);return i<0?0:sS(e0(n[i],UQn),e0(t[i],UQn))?-1:1}function Ssn(n,t){var e,i;for(i=spn(n,0);i.b!=i.d.c;)(e=BB(b3(i),214)).e.length>0&&(t.td(e),e.i&&pln(e))}function Psn(n,t){var e,i;return i=BB(yan(n.a,4),126),e=x8(dAt,i9n,415,t,0,1),null!=i&&aHn(i,0,e,0,i.length),e}function Csn(n,t){var e;return e=new rRn(0!=(256&n.f),n.i,n.a,n.d,0!=(16&n.f),n.j,n.g,t),null!=n.e||(e.c=n),e}function Isn(n,t){var e;for(e=n.Zb().Cc().Kc();e.Ob();)if(BB(e.Pb(),14).Hc(t))return!0;return!1}function Osn(n,t,e,i,r){var c,a;for(a=e;a<=r;a++)for(c=t;c<=i;c++)if(vmn(n,c,a))return!0;return!1}function Asn(n,t,e){var i,r,c,a;for(kW(e),a=!1,c=n.Zc(t),r=e.Kc();r.Ob();)i=r.Pb(),c.Rb(i),a=!0;return a}function $sn(n,t){var e;return n===t||!!cL(t,83)&&(e=BB(t,83),zSn(lz(n),e.vc()))}function Lsn(n,t,e){var i,r;for(r=e.Kc();r.Ob();)if(i=BB(r.Pb(),42),n.re(t,i.dd()))return!0;return!1}function Nsn(n,t,e){return n.d[t.p][e.p]||(ivn(n,t,e),n.d[t.p][e.p]=!0,n.d[e.p][t.p]=!0),n.a[t.p][e.p]}function xsn(n,t){if(!n.ai()&&null==t)throw Hp(new _y("The 'no null' constraint is violated"));return t}function Dsn(n,t){null==n.D&&null!=n.B&&(n.D=n.B,n.B=null),Hin(n,null==t?null:(kW(t),t)),n.C&&n.yk(null)}function Rsn(n,t){return!(!n||n==t||!Lx(t,(hWn(),rlt)))&&BB(mMn(t,(hWn(),rlt)),10)!=n}function Ksn(n){switch(n.i){case 2:return!0;case 1:return!1;case-1:++n.c;default:return n.pl()}}function _sn(n){switch(n.i){case-2:return!0;case-1:return!1;case 1:--n.c;default:return n.ql()}}function Fsn(n){_Y.call(this,"The given string does not match the expected format for individual spacings.",n)}function Bsn(){Bsn=O,uOt=new cI("ELK",0),oOt=new cI("JSON",1),aOt=new cI("DOT",2),sOt=new cI("SVG",3)}function Hsn(){Hsn=O,sjt=new vC(QZn,0),hjt=new vC("RADIAL_COMPACTION",1),fjt=new vC("WEDGE_COMPACTION",2)}function qsn(){qsn=O,zet=new pS("CONCURRENT",0),Uet=new pS("IDENTITY_FINISH",1),Xet=new pS("UNORDERED",2)}function Gsn(){Gsn=O,wM(),oct=new $O(BYn,sct=rct),uct=new up(HYn),hct=new up(qYn),fct=new up(GYn)}function zsn(){zsn=O,lst=new ji,bst=new Ei,fst=new Ti,hst=new Mi,kW(new Si),sst=new D}function Usn(){Usn=O,emt=new WP("CONSERVATIVE",0),imt=new WP("CONSERVATIVE_SOFT",1),rmt=new WP("SLOPPY",2)}function Xsn(){Xsn=O,dCt=new WA(15),wCt=new XA((sWn(),XSt),dCt),gCt=gPt,hCt=aSt,fCt=KSt,bCt=BSt,lCt=FSt}function Wsn(n,t,e){var i,r;for(i=new JT,r=spn(e,0);r.b!=r.d.c;)DH(i,new wA(BB(b3(r),8)));Asn(n,t,i)}function Vsn(n){var t,e,i;for(t=0,i=x8(PMt,sVn,8,n.b,0,1),e=spn(n,0);e.b!=e.d.c;)i[t++]=BB(b3(e),8);return i}function Qsn(n){var t;return!n.a&&(n.a=new eU(WAt,n,9,5)),0!=(t=n.a).i?HM(BB(Wtn(t,0),678)):null}function Jsn(n,t){var e;return e=rbn(n,t),sS(r0(n,t),0)|JI(r0(n,e),0)?e:rbn(bVn,r0(jz(e,63),1))}function Ysn(n,t){var e;e=null!=mpn((Rwn(),Vpt))&&null!=t.wg()?Gy(MD(t.wg()))/Gy(MD(mpn(Vpt))):1,VW(n.b,t,e)}function Zsn(n,t){var e,i;return(e=BB(n.d.Bc(t),14))?((i=n.e.hc()).Gc(e),n.e.d-=e.gc(),e.$b(),i):null}function nhn(n,t){var e,i;if(0!=(i=n.c[t]))for(n.c[t]=0,n.d-=i,e=t+1;e0)return Kz(t-1,n.a.c.length),s6(n.a,t-1);throw Hp(new mv)}function ehn(n,t,e){if(t<0)throw Hp(new Ay(n5n+t));tt)throw Hp(new _y(mJn+n+yJn+t));if(n<0||t>e)throw Hp(new Tk(mJn+n+kJn+t+hJn+e))}function rhn(n){if(!n.a||0==(8&n.a.i))throw Hp(new Fy("Enumeration class expected for layout option "+n.f))}function chn(n){var t;++n.j,0==n.i?n.g=null:n.i_3n?n-i>_3n:i-n>_3n)}function vhn(n,t){return n?t&&!n.j||cL(n,124)&&0==BB(n,124).a.b?0:n.Re():0}function mhn(n,t){return n?t&&!n.k||cL(n,124)&&0==BB(n,124).a.a?0:n.Se():0}function yhn(n){return ODn(),n<0?-1!=n?new Rpn(-1,-n):Jtt:n<=10?Ztt[CY(n)]:new Rpn(1,n)}function khn(n){throw Zun(),Hp(new gy("Unexpected typeof result '"+n+"'; please report this bug to the GWT team"))}function jhn(n){hk(),V$(this),jQ(this),this.e=n,Cxn(this,n),this.g=null==n?zWn:Bbn(n),this.a="",this.b=n,this.a=""}function Ehn(){this.a=new nu,this.f=new dg(this),this.b=new gg(this),this.i=new pg(this),this.e=new vg(this)}function Thn(){cy.call(this,new q8(etn(16))),lin(2,oVn),this.b=2,this.a=new HW(null,null,0,null),iv(this.a,this.a)}function Mhn(){Mhn=O,cvt=new KP("DUMMY_NODE_OVER",0),avt=new KP("DUMMY_NODE_UNDER",1),uvt=new KP("EQUAL",2)}function Shn(){Shn=O,Xat=HY(Pun(Gk(WPt,1),$Vn,103,0,[(Ffn(),_Pt),FPt])),Wat=HY(Pun(Gk(WPt,1),$Vn,103,0,[HPt,KPt]))}function Phn(n){return(kUn(),yIt).Hc(n.j)?Gy(MD(mMn(n,(hWn(),Llt)))):Aon(Pun(Gk(PMt,1),sVn,8,0,[n.i.n,n.n,n.a])).b}function Chn(n){var t,e;for(t=n.b.a.a.ec().Kc();t.Ob();)e=new Q$n(BB(t.Pb(),561),n.e,n.f),WB(n.g,e)}function Ihn(n,t){var e,i;e=n.nk(t,null),i=null,t&&(iE(),cen(i=new Kp,n.r)),(e=HTn(n,i,e))&&e.Fi()}function Ohn(n,t){var e,i;for(i=0!=H$n(n.d,1),e=!0;e;)e=!1,e=t.c.Tf(t.e,i),e|=DNn(n,t,i,!1),i=!i;$rn(n)}function Ahn(n,t){var e,i,r;return i=!1,e=t.q.d,t.dr&&(aEn(t.q,r),i=e!=t.q.d)),i}function $hn(n,t){var i,r,c,a,u;return a=t.i,u=t.j,r=a-(i=n.f).i,c=u-i.j,e.Math.sqrt(r*r+c*c)}function Lhn(n,t){var e;return(e=Jdn(n))||(!$Ot&&($Ot=new Oo),RHn(),f9((e=new Cp(JPn(t))).Vk(),n)),e}function Nhn(n,t){var e,i;return(e=BB(n.c.Bc(t),14))?((i=n.hc()).Gc(e),n.d-=e.gc(),e.$b(),n.mc(i)):n.jc()}function xhn(n,t){var e;for(e=0;e=n.c.b:n.a<=n.c.b))throw Hp(new yv);return t=n.a,n.a+=n.c.c,++n.b,iln(t)}function Bhn(n){var t;return t=new ftn(n),i2(n.a,sut,new Yy(Pun(Gk(Yat,1),HWn,369,0,[t]))),t.d&&WB(t.f,t.d),t.f}function Hhn(n){var t;return qan(t=new O$(n.a),n),hon(t,(hWn(),dlt),n),t.o.a=n.g,t.o.b=n.f,t.n.a=n.i,t.n.b=n.j,t}function qhn(n,t,e,i){var r,c;for(c=n.Kc();c.Ob();)(r=BB(c.Pb(),70)).n.a=t.a+(i.a-r.o.a)/2,r.n.b=t.b,t.b+=r.o.b+e}function Ghn(n,t,e){var i;for(i=t.a.a.ec().Kc();i.Ob();)if(cJ(n,BB(i.Pb(),57),e))return!0;return!1}function zhn(n){var t,e;for(e=new Wb(n.r);e.a=0?t:-t;i>0;)i%2==0?(e*=e,i=i/2|0):(r*=e,i-=1);return t<0?1/r:r}function ifn(n,t){var e,i,r;for(r=1,e=n,i=t>=0?t:-t;i>0;)i%2==0?(e*=e,i=i/2|0):(r*=e,i-=1);return t<0?1/r:r}function rfn(n){var t,e,i,r;if(null!=n)for(e=0;e0&&dsn(BB(xq(n.a,n.a.c.length-1),570),t)||WB(n.a,new p5(t))}function vfn(n){var t,e;G_(),t=n.d.c-n.e.c,Otn((e=BB(n.g,145)).b,new jd(t)),Otn(e.c,new Ed(t)),e5(e.i,new Td(t))}function mfn(n){var t;return(t=new Ck).a+="VerticalSegment ",uO(t,n.e),t.a+=" ",oO(t,YL(new mk,new Wb(n.k))),t.a}function yfn(n){var t;return(t=BB(lnn(n.c.c,""),229))||(t=new UZ(jj(kj(new pu,""),"Other")),Ygn(n.c.c,"",t)),t}function kfn(n){var t;return 0!=(64&n.Db)?P$n(n):((t=new fN(P$n(n))).a+=" (name: ",cO(t,n.zb),t.a+=")",t.a)}function jfn(n,t,e){var i,r;return r=n.sb,n.sb=t,0!=(4&n.Db)&&0==(1&n.Db)&&(i=new nU(n,1,4,r,t),e?e.Ei(i):e=i),e}function Efn(n,t){var e,i;for(e=0,i=abn(n,t).Kc();i.Ob();)e+=null!=mMn(BB(i.Pb(),11),(hWn(),Elt))?1:0;return e}function Tfn(n,t,e){var i,r,c;for(i=0,c=spn(n,0);c.b!=c.d.c&&!((r=Gy(MD(b3(c))))>e);)r>=t&&++i;return i}function Mfn(n,t,e){var i;return i=new N7(n.e,3,13,null,t.c||(gWn(),l$t),uvn(n,t),!1),e?e.Ei(i):e=i,e}function Sfn(n,t,e){var i;return i=new N7(n.e,4,13,t.c||(gWn(),l$t),null,uvn(n,t),!1),e?e.Ei(i):e=i,e}function Pfn(n,t,e){var i,r;return r=n.r,n.r=t,0!=(4&n.Db)&&0==(1&n.Db)&&(i=new nU(n,1,8,r,n.r),e?e.Ei(i):e=i),e}function Cfn(n,t){var e,i;return!(i=(e=BB(t,676)).vk())&&e.wk(i=cL(t,88)?new $I(n,BB(t,26)):new _0(n,BB(t,148))),i}function Ifn(n,t,e){var i;n.qi(n.i+1),i=n.oi(t,e),t!=n.i&&aHn(n.g,t,n.g,t+1,n.i-t),$X(n.g,t,i),++n.i,n.bi(t,e),n.ci()}function Ofn(n,t){var e;return t.a&&(e=t.a.a.length,n.a?oO(n.a,n.b):n.a=new lN(n.d),G0(n.a,t.a,t.d.length,e)),n}function Afn(n,t){var e,i,r;if(t.vi(n.a),null!=(r=BB(yan(n.a,8),1936)))for(e=0,i=r.length;ee)throw Hp(new Ay(mJn+n+kJn+t+", size: "+e));if(n>t)throw Hp(new _y(mJn+n+yJn+t))}function qfn(n,t,e){if(t<0)cIn(n,e);else{if(!e.Ij())throw Hp(new _y(r6n+e.ne()+c6n));BB(e,66).Nj().Vj(n,n.yh(),t)}}function Gfn(n,t,e,i,r,c,a,u){var o;for(o=e;c=i||t=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:n>=48&&n<=57?n-48:0}function Vfn(n){var t;return 0!=(64&n.Db)?P$n(n):((t=new fN(P$n(n))).a+=" (source: ",cO(t,n.d),t.a+=")",t.a)}function Qfn(n,t,e){var i,r;return r=n.a,n.a=t,0!=(4&n.Db)&&0==(1&n.Db)&&(i=new nU(n,1,5,r,n.a),e?KEn(e,i):e=i),e}function Jfn(n,t){var e;e=0!=(256&n.Bb),t?n.Bb|=256:n.Bb&=-257,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new t6(n,1,2,e,t))}function Yfn(n,t){var e;e=0!=(256&n.Bb),t?n.Bb|=256:n.Bb&=-257,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new t6(n,1,8,e,t))}function Zfn(n,t){var e;e=0!=(256&n.Bb),t?n.Bb|=256:n.Bb&=-257,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new t6(n,1,8,e,t))}function nln(n,t){var e;e=0!=(512&n.Bb),t?n.Bb|=512:n.Bb&=-513,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new t6(n,1,3,e,t))}function tln(n,t){var e;e=0!=(512&n.Bb),t?n.Bb|=512:n.Bb&=-513,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new t6(n,1,9,e,t))}function eln(n,t){var e;return-1==n.b&&n.a&&(e=n.a.Gj(),n.b=e?n.c.Xg(n.a.aj(),e):Awn(n.c.Tg(),n.a)),n.c.Og(n.b,t)}function iln(n){var t,e;return n>-129&&n<128?(t=n+128,!(e=(tq(),Itt)[t])&&(e=Itt[t]=new xb(n)),e):new xb(n)}function rln(n){var t,e;return n>-129&&n<128?(t=n+128,!(e=(Tq(),Ktt)[t])&&(e=Ktt[t]=new Rb(n)),e):new Rb(n)}function cln(n){var t;return n.k==(uSn(),Mut)&&((t=BB(mMn(n,(hWn(),Qft)),61))==(kUn(),sIt)||t==SIt)}function aln(n,t,e){var i,r;return(r=$$n(n.b,t))&&(i=BB(NHn(F7(n,r),""),26))?m$n(n,i,t,e):null}function uln(n,t,e){var i,r;return(r=$$n(n.b,t))&&(i=BB(NHn(F7(n,r),""),26))?y$n(n,i,t,e):null}function oln(n,t){var e,i;for(i=new AL(n);i.e!=i.i.gc();)if(e=BB(kpn(i),138),GI(t)===GI(e))return!0;return!1}function sln(n,t,e){var i;if(t>(i=n.gc()))throw Hp(new tK(t,i));if(n.hi()&&n.Hc(e))throw Hp(new _y(a8n));n.Xh(t,e)}function hln(n,t){var e;if(null==(e=sen(n.i,t)))throw Hp(new ek("Node did not exist in input."));return Kcn(t,e),null}function fln(n,t){var e;if(cL(e=NNn(n,t),322))return BB(e,34);throw Hp(new _y(r6n+t+"' is not a valid attribute"))}function lln(n,t,e){var i,r;for(r=cL(t,99)&&0!=(BB(t,18).Bb&BQn)?new xO(t,n):new Aan(t,n),i=0;it?1:n==t?0==n?Pln(1/n,1/t):0:isNaN(n)?isNaN(t)?0:1:-1}function Cln(n,t){OTn(t,"Sort end labels",1),YT(AV(wnn(new Rq(null,new w1(n.b,16)),new we),new de),new ge),HSn(t)}function Iln(n,t,e){var i,r;return n.ej()?(r=n.fj(),i=JIn(n,t,e),n.$i(n.Zi(7,iln(e),i,t,r)),i):JIn(n,t,e)}function Oln(n,t){var e,i,r;null==n.d?(++n.e,--n.f):(r=t.cd(),N6(n,i=((e=t.Sh())&DWn)%n.d.length,A$n(n,i,e,r)))}function Aln(n,t){var e;e=0!=(n.Bb&k6n),t?n.Bb|=k6n:n.Bb&=-1025,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new t6(n,1,10,e,t))}function $ln(n,t){var e;e=0!=(n.Bb&_Qn),t?n.Bb|=_Qn:n.Bb&=-4097,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new t6(n,1,12,e,t))}function Lln(n,t){var e;e=0!=(n.Bb&T9n),t?n.Bb|=T9n:n.Bb&=-8193,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new t6(n,1,15,e,t))}function Nln(n,t){var e;e=0!=(n.Bb&M9n),t?n.Bb|=M9n:n.Bb&=-2049,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new t6(n,1,11,e,t))}function xln(n,t){var e;return 0!=(e=Pln(n.b.c,t.b.c))||0!=(e=Pln(n.a.a,t.a.a))?e:Pln(n.a.b,t.a.b)}function Dln(n,t){var e;if(null==(e=RX(n.k,t)))throw Hp(new ek("Port did not exist in input."));return Kcn(t,e),null}function Rln(n){var t,e;for(e=G$n(Utn(n)).Kc();e.Ob();)if(N_n(n,t=SD(e.Pb())))return y4((UM(),RAt),t);return null}function Kln(n,t){var e,i,r,c,a;for(a=axn(n.e.Tg(),t),c=0,e=BB(n.g,119),r=0;r>10)+HQn&QVn,t[1]=56320+(1023&n)&QVn,Bdn(t,0,t.length)}function Wln(n){var t;return(t=BB(mMn(n,(HXn(),Udt)),103))==(Ffn(),BPt)?Gy(MD(mMn(n,Edt)))>=1?FPt:KPt:t}function Vln(n){switch(BB(mMn(n,(HXn(),Zdt)),218).g){case 1:return new ic;case 3:return new oc;default:return new ec}}function Qln(n){if(n.c)Qln(n.c);else if(n.d)throw Hp(new Fy("Stream already terminated, can't be modified or used"))}function Jln(n){var t;return 0!=(64&n.Db)?P$n(n):((t=new fN(P$n(n))).a+=" (identifier: ",cO(t,n.k),t.a+=")",t.a)}function Yln(n,t,e){var i;return tE(),jen(i=new ro,t),Een(i,e),n&&f9((!n.a&&(n.a=new $L(xOt,n,5)),n.a),i),i}function Zln(n,t,e,i){var r,c;return kW(i),kW(e),null==(c=null==(r=n.xc(t))?e:ZT(BB(r,15),BB(e,14)))?n.Bc(t):n.zc(t,c),c}function nbn(n){var t,e,i,r;return orn(e=new JK(t=BB(Vj((r=(i=n.gm).f)==Unt?i:r),9),BB(SR(t,t.length),9),0),n),e}function tbn(n,t,e){var i,r;for(r=n.a.ec().Kc();r.Ob();)if(i=BB(r.Pb(),10),oun(e,BB(xq(t,i.p),14)))return i;return null}function ebn(n,t,e){try{_on(n,t,e)}catch(i){throw cL(i=lun(i),597)?Hp(new g5(i)):Hp(i)}return t}function ibn(n,t){var e;return YO(n)&&YO(t)&&$Qn<(e=n-t)&&e>1,n.k=i-1>>1}function sbn(){var n,t,i;yTn(),i=Let+++Date.now(),n=CY(e.Math.floor(i*uJn))&sJn,t=CY(i-n*oJn),this.a=1502^n,this.b=t^aJn}function hbn(n){var t,e;for(t=new Np,e=new Wb(n.j);e.a34028234663852886e22?RQn:t<-34028234663852886e22?KQn:t}function pbn(n){return n=((n=((n-=n>>1&1431655765)>>2&858993459)+(858993459&n))>>4)+n&252645135,n+=n>>8,63&(n+=n>>16)}function vbn(n){var t,e,i;for(t=new hR(n.Hd().gc()),i=0,e=L9(n.Hd().Kc());e.Ob();)jZ(t,e.Pb(),iln(i++));return NSn(t.a)}function mbn(n,t){var e,i,r;for(r=new xp,i=t.vc().Kc();i.Ob();)VW(r,(e=BB(i.Pb(),42)).cd(),lan(n,BB(e.dd(),15)));return r}function ybn(n,t){0==n.n.c.length&&WB(n.n,new RY(n.s,n.t,n.i)),WB(n.b,t),smn(BB(xq(n.n,n.n.c.length-1),211),t),BFn(n,t)}function kbn(n){return n.c==n.b.b&&n.i==n.g.b||(n.a.c=x8(Ant,HWn,1,0,5,1),gun(n.a,n.b),gun(n.a,n.g),n.c=n.b.b,n.i=n.g.b),n.a}function jbn(n,t){var e,i;for(i=0,e=BB(t.Kb(n),20).Kc();e.Ob();)qy(TD(mMn(BB(e.Pb(),17),(hWn(),Clt))))||++i;return i}function Ebn(n,t){var i,r;r=Gy(MD(edn(f2(t),(HXn(),ypt)))),Fkn(t,i=e.Math.max(0,r/2-.5),1),WB(n,new lP(t,i))}function Tbn(){Tbn=O,qlt=new BP(QZn,0),_lt=new BP("FIRST",1),Flt=new BP(C1n,2),Blt=new BP("LAST",3),Hlt=new BP(I1n,4)}function Mbn(){Mbn=O,ZPt=new FC(hYn,0),JPt=new FC("POLYLINE",1),QPt=new FC("ORTHOGONAL",2),YPt=new FC("SPLINES",3)}function Sbn(){Sbn=O,Zjt=new kC("ASPECT_RATIO_DRIVEN",0),nEt=new kC("MAX_SCALE_DRIVEN",1),Yjt=new kC("AREA_DRIVEN",2)}function Pbn(){Pbn=O,HEt=new EC("P1_STRUCTURE",0),qEt=new EC("P2_PROCESSING_ORDER",1),GEt=new EC("P3_EXECUTION",2)}function Cbn(){Cbn=O,ejt=new gC("OVERLAP_REMOVAL",0),njt=new gC("COMPACTION",1),tjt=new gC("GRAPH_SIZE_CALCULATION",2)}function Ibn(n,t){return h$(),rin(KVn),e.Math.abs(n-t)<=KVn||n==t||isNaN(n)&&isNaN(t)?0:nt?1:zO(isNaN(n),isNaN(t))}function Obn(n,t){var e,i;for(e=spn(n,0);e.b!=e.d.c;){if((i=zy(MD(b3(e))))==t)return;if(i>t){U0(e);break}}nX(e,t)}function Abn(n,t){var e,i,r,c,a;if(e=t.f,Ygn(n.c.d,e,t),null!=t.g)for(c=0,a=(r=t.g).length;ct&&i.ue(n[c-1],n[c])>0;--c)a=n[c],$X(n,c,n[c-1]),$X(n,c-1,a)}function Lbn(n,t,e,i){if(t<0)TLn(n,e,i);else{if(!e.Ij())throw Hp(new _y(r6n+e.ne()+c6n));BB(e,66).Nj().Tj(n,n.yh(),t,i)}}function Nbn(n,t){if(t==n.d)return n.e;if(t==n.e)return n.d;throw Hp(new _y("Node "+t+" not part of edge "+n))}function xbn(n,t){switch(t.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function Dbn(n,t){switch(t.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function Rbn(n,t,e,i){switch(t){case 3:return n.f;case 4:return n.g;case 5:return n.i;case 6:return n.j}return _fn(n,t,e,i)}function Kbn(n){return n.k==(uSn(),Cut)&&o5(new Rq(null,new zU(new oz(ZL(lbn(n).a.Kc(),new h)))),new qr)}function _bn(n){return null==n.e?n:(!n.c&&(n.c=new rRn(0!=(256&n.f),n.i,n.a,n.d,0!=(16&n.f),n.j,n.g,null)),n.c)}function Fbn(n,t){return n.h==CQn&&0==n.m&&0==n.l?(t&&(ltt=M$(0,0,0)),WO((X7(),dtt))):(t&&(ltt=M$(n.l,n.m,n.h)),M$(0,0,0))}function Bbn(n){return Array.isArray(n)&&n.im===I?nE(tsn(n))+"@"+(nsn(n)>>>0).toString(16):n.toString()}function Hbn(n){var t;this.a=new JK(t=BB(n.e&&n.e(),9),BB(SR(t,t.length),9),0),this.b=x8(Ant,HWn,1,this.a.a.length,5,1)}function qbn(n){var t,e,i;for(this.a=new fA,i=new Wb(n);i.a0&&(b1(t-1,n.length),58==n.charCodeAt(t-1))&&!Xbn(n,LAt,NAt)}function Xbn(n,t,e){var i,r;for(i=0,r=n.length;i=r)return t.c+e;return t.c+t.b.gc()}function Qbn(n,t){var e,i,r,c;for(dD(),r=t,z9(i=H9(n),0,i.length,r),e=0;e0&&(i+=r,++e);return e>1&&(i+=n.d*(e-1)),i}function Ybn(n){var t,e,i;for((i=new Sk).a+="[",t=0,e=n.gc();t0&&this.b>0&&Jq(this.c,this.b,this.a)}function uwn(n){Rwn(),this.c=u6(Pun(Gk(rMt,1),HWn,831,0,[Wpt])),this.b=new xp,this.a=n,VW(this.b,Vpt,1),Otn(Qpt,new Pg(this))}function own(n,t){var e;return n.d?hU(n.b,t)?BB(RX(n.b,t),51):(e=t.Kf(),VW(n.b,t,e),e):t.Kf()}function swn(n,t){var e;return GI(n)===GI(t)||!!cL(t,91)&&(e=BB(t,91),n.e==e.e&&n.d==e.d&&E4(n,e.a))}function hwn(n){switch(kUn(),n.g){case 4:return sIt;case 1:return oIt;case 3:return SIt;case 2:return CIt;default:return PIt}}function fwn(n,t){switch(t){case 3:return 0!=n.f;case 4:return 0!=n.g;case 5:return 0!=n.i;case 6:return 0!=n.j}return Ean(n,t)}function lwn(n){switch(n.g){case 0:return new Ga;case 1:return new za;default:throw Hp(new _y(c4n+(null!=n.f?n.f:""+n.g)))}}function bwn(n){switch(n.g){case 0:return new qa;case 1:return new Ua;default:throw Hp(new _y(M1n+(null!=n.f?n.f:""+n.g)))}}function wwn(n){switch(n.g){case 0:return new Vm;case 1:return new ym;default:throw Hp(new _y(N4n+(null!=n.f?n.f:""+n.g)))}}function dwn(n){switch(n.g){case 1:return new Ra;case 2:return new gD;default:throw Hp(new _y(c4n+(null!=n.f?n.f:""+n.g)))}}function gwn(n){var t,e;if(n.b)return n.b;for(e=Qet?null:n.d;e;){if(t=Qet?null:e.b)return t;e=Qet?null:e.d}return lM(),Het}function pwn(n){var t,e;return 0==n.e?0:(t=n.d<<5,e=n.a[n.d-1],n.e<0&&Ccn(n)==n.d-1&&(--e,e|=0),t-=ZIn(e))}function vwn(n){var t,e,i;return n>5),15,1))[e]=1<3;)r*=10,--c;n=(n+(r>>1))/r|0}return i.i=n,!0}function Ewn(n){return Shn(),hN(),!!(Dbn(BB(n.a,81).j,BB(n.b,103))||0!=BB(n.a,81).d.e&&Dbn(BB(n.a,81).j,BB(n.b,103)))}function Twn(n){x9(),BB(n.We((sWn(),qSt)),174).Hc((n_n(),VIt))&&(BB(n.We(fPt),174).Fc((lIn(),cIt)),BB(n.We(qSt),174).Mc(VIt))}function Mwn(n,t){var e;if(t){for(e=0;e=0;--i)for(t=e[i],r=0;r>1,this.k=t-1>>1}function Gwn(n,t){OTn(t,"End label post-processing",1),YT(AV(wnn(new Rq(null,new w1(n.b,16)),new ae),new ue),new oe),HSn(t)}function zwn(n,t,e){var i;return i=Gy(n.p[t.i.p])+Gy(n.d[t.i.p])+t.n.b+t.a.b,Gy(n.p[e.i.p])+Gy(n.d[e.i.p])+e.n.b+e.a.b-i}function Uwn(n,t,e){var i,r;for(i=e0(e,UQn),r=0;0!=Vhn(i,0)&&r0&&(b1(0,t.length),43==t.charCodeAt(0))?t.substr(1):t)}function Vwn(n){var t;return null==n?null:new $A((t=FBn(n,!0)).length>0&&(b1(0,t.length),43==t.charCodeAt(0))?t.substr(1):t)}function Qwn(n,t){return n.i>0&&(t.lengthn.i&&$X(t,n.i,null),t}function Jwn(n,t,e){var i,r,c;return n.ej()?(i=n.i,c=n.fj(),Ifn(n,i,t),r=n.Zi(3,null,t,i,c),e?e.Ei(r):e=r):Ifn(n,n.i,t),e}function Ywn(n,t,e){var i,r;return i=new N7(n.e,4,10,cL(r=t.c,88)?BB(r,26):(gWn(),d$t),null,uvn(n,t),!1),e?e.Ei(i):e=i,e}function Zwn(n,t,e){var i,r;return i=new N7(n.e,3,10,null,cL(r=t.c,88)?BB(r,26):(gWn(),d$t),uvn(n,t),!1),e?e.Ei(i):e=i,e}function ndn(n){var t;return qD(),t=new wA(BB(n.e.We((sWn(),BSt)),8)),n.B.Hc((n_n(),GIt))&&(t.a<=0&&(t.a=20),t.b<=0&&(t.b=20)),t}function tdn(n){return bvn(),(n.q?n.q:(SQ(),SQ(),het))._b((HXn(),Rgt))?BB(mMn(n,Rgt),197):BB(mMn(vW(n),Kgt),197)}function edn(n,t){var e,i;return i=null,Lx(n,(HXn(),Mpt))&&(e=BB(mMn(n,Mpt),94)).Xe(t)&&(i=e.We(t)),null==i&&(i=mMn(vW(n),t)),i}function idn(n,t){var e,i,r;return!!cL(t,42)&&(i=(e=BB(t,42)).cd(),wW(r=lfn(n.Rc(),i),e.dd())&&(null!=r||n.Rc()._b(i)))}function rdn(n,t){var e;return n.f>0&&(n.qj(),-1!=A$n(n,((e=null==t?0:nsn(t))&DWn)%n.d.length,e,t))}function cdn(n,t){var e,i;return n.f>0&&(n.qj(),e=aOn(n,((i=null==t?0:nsn(t))&DWn)%n.d.length,i,t))?e.dd():null}function adn(n,t){var e,i,r,c;for(c=axn(n.e.Tg(),t),e=BB(n.g,119),r=0;r1?i0(yz(t.a[1],32),e0(t.a[0],UQn)):e0(t.a[0],UQn),j2(cbn(t.e,e))))}function ldn(n,t){var e;return YO(n)&&YO(t)&&$Qn<(e=n%t)&&e>5,t&=31,r=n.d+e+(0==t?0:1),xTn(i=x8(ANt,hQn,25,r,15,1),n.a,e,t),X0(c=new lU(n.e,r,i)),c}function Tdn(n,t,e){var i,r;i=BB(SY(iNt,t),117),r=BB(SY(rNt,t),117),e?(mZ(iNt,n,i),mZ(rNt,n,r)):(mZ(rNt,n,i),mZ(iNt,n,r))}function Mdn(n,t,e){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.ue(t,c.d),e&&0==i)return c;i>=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function Sdn(n,t,e){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.ue(t,c.d),e&&0==i)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function Pdn(n,t,e,i){var r,c,a;return r=!1,LGn(n.f,e,i)&&(xgn(n.f,n.a[t][e],n.a[t][i]),a=(c=n.a[t])[i],c[i]=c[e],c[e]=a,r=!0),r}function Cdn(n,t,e,i,r){var c,a,u;for(a=r;t.b!=t.c;)c=BB(dU(t),10),u=BB(abn(c,i).Xb(0),11),n.d[u.p]=a++,e.c[e.c.length]=u;return a}function Idn(n,t,i){var r,c,a,u,o;return u=n.k,o=t.k,c=MD(edn(n,r=i[u.g][o.g])),a=MD(edn(t,r)),e.Math.max((kW(c),c),(kW(a),a))}function Odn(n,t,e){var i,r,c,a;for(i=e/n.c.length,r=0,a=new Wb(n);a.a2e3&&(att=n,utt=e.setTimeout(QE,10)),0==ctt++&&(Onn((sk(),ttt)),!0)}function Ndn(n,t){var e;for(e=new oz(ZL(lbn(n).a.Kc(),new h));dAn(e);)if(BB(U5(e),17).d.i.c==t)return!1;return!0}function xdn(n,t){var e;if(cL(t,245)){e=BB(t,245);try{return 0==n.vd(e)}catch(i){if(!cL(i=lun(i),205))throw Hp(i)}}return!1}function Ddn(){return Error.stackTraceLimit>0?(e.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function Rdn(n,t){return h$(),h$(),rin(KVn),(e.Math.abs(n-t)<=KVn||n==t||isNaN(n)&&isNaN(t)?0:nt?1:zO(isNaN(n),isNaN(t)))>0}function Kdn(n,t){return h$(),h$(),rin(KVn),(e.Math.abs(n-t)<=KVn||n==t||isNaN(n)&&isNaN(t)?0:nt?1:zO(isNaN(n),isNaN(t)))<0}function _dn(n,t){return h$(),h$(),rin(KVn),(e.Math.abs(n-t)<=KVn||n==t||isNaN(n)&&isNaN(t)?0:nt?1:zO(isNaN(n),isNaN(t)))<=0}function Fdn(n,t){for(var e=0;!t[e]||""==t[e];)e++;for(var i=t[e++];eGQn)return e.fh();if((i=e.Zg())||e==n)break}return i}function Ydn(n){return hZ(),cL(n,156)?BB(RX(hAt,yet),288).vg(n):hU(hAt,tsn(n))?BB(RX(hAt,tsn(n)),288).vg(n):null}function Zdn(n){if(mgn(a5n,n))return hN(),vtt;if(mgn(u5n,n))return hN(),ptt;throw Hp(new _y("Expecting true or false"))}function ngn(n,t){if(t.c==n)return t.d;if(t.d==n)return t.c;throw Hp(new _y("Input edge is not connected to the input port."))}function tgn(n,t){return n.e>t.e?1:n.et.d?n.e:n.d=48&&n<48+e.Math.min(10,10)?n-48:n>=97&&n<97?n-97+10:n>=65&&n<65?n-65+10:-1}function ign(n,t){var e;return GI(t)===GI(n)||!!cL(t,21)&&(e=BB(t,21)).gc()==n.gc()&&n.Ic(e)}function rgn(n,t){var e,i,r;return i=n.a.length-1,e=t-n.b&i,r=n.c-t&i,Ex(e<(n.c-n.b&i)),e>=r?(ahn(n,t),-1):(uhn(n,t),1)}function cgn(n,t){var e,i;for(b1(t,n.length),e=n.charCodeAt(t),i=t+1;it.e?1:n.ft.f?1:nsn(n)-nsn(t)}function mgn(n,t){return kW(n),null!=t&&(!!mK(n,t)||n.length==t.length&&mK(n.toLowerCase(),t.toLowerCase()))}function ygn(n,t){var e,i,r,c;for(i=0,r=t.gc();i0&&Vhn(n,128)<0?(t=dG(n)+128,!(e=(Eq(),$tt)[t])&&(e=$tt[t]=new Db(n)),e):new Db(n)}function Egn(n,t){var e,i;return(e=t.Hh(n.a))&&null!=(i=SD(cdn((!e.b&&(e.b=new Yx((gWn(),k$t),X$t,e)),e.b),t8n)))?i:t.ne()}function Tgn(n,t){var e,i;return(e=t.Hh(n.a))&&null!=(i=SD(cdn((!e.b&&(e.b=new Yx((gWn(),k$t),X$t,e)),e.b),t8n)))?i:t.ne()}function Mgn(n,t){var e,i;for(qZ(),i=new oz(ZL(hbn(n).a.Kc(),new h));dAn(i);)if((e=BB(U5(i),17)).d.i==t||e.c.i==t)return e;return null}function Sgn(n,t,e){this.c=n,this.f=new Np,this.e=new Gj,this.j=new Sq,this.n=new Sq,this.b=t,this.g=new UV(t.c,t.d,t.b,t.a),this.a=e}function Pgn(n){var t,e,i,r;for(this.a=new fA,this.d=new Rv,this.e=0,i=0,r=(e=n).length;i0)}function Ngn(n){var t;GI(ZAn(n,(sWn(),ESt)))===GI((ufn(),vCt))&&(YY(n)?(t=BB(ZAn(YY(n),ESt),334),Jpn(n,ESt,t)):Jpn(n,ESt,mCt))}function xgn(n,t,e){var i,r;fMn(n.e,t,e,(kUn(),CIt)),fMn(n.i,t,e,oIt),n.a&&(r=BB(mMn(t,(hWn(),dlt)),11),i=BB(mMn(e,dlt),11),k0(n.g,r,i))}function Dgn(n,t,e){var i,r,c;i=t.c.p,c=t.p,n.b[i][c]=new DJ(n,t),e&&(n.a[i][c]=new Bd(t),(r=BB(mMn(t,(hWn(),rlt)),10))&&YIn(n.d,r,t))}function Rgn(n,t){var e,i,r;if(WB(Sct,n),t.Fc(n),e=BB(RX(Mct,n),21))for(r=e.Kc();r.Ob();)i=BB(r.Pb(),33),-1!=E7(Sct,i,0)||Rgn(i,t)}function Kgn(n,t,e){var i;(Wet?(gwn(n),1):Vet||Yet?(lM(),1):Jet&&(lM(),0))&&((i=new i_(t)).b=e,aSn(n,i))}function _gn(n,t){var e;e=!n.A.Hc((mdn(),_It))||n.q==(QEn(),XCt),n.u.Hc((lIn(),eIt))?e?NUn(n,t):aUn(n,t):n.u.Hc(rIt)&&(e?Azn(n,t):YUn(n,t))}function Fgn(n,t){var e,i;++n.j,null!=t&&oOn(t,e=cL(i=n.a.Cb,97)?BB(i,97).Jg():null)?hgn(n.a,4,e):hgn(n.a,4,BB(t,126))}function Bgn(n,t,i){return new UV(e.Math.min(n.a,t.a)-i/2,e.Math.min(n.b,t.b)-i/2,e.Math.abs(n.a-t.a)+i,e.Math.abs(n.b-t.b)+i)}function Hgn(n,t){var e,i;return 0!=(e=E$(n.a.c.p,t.a.c.p))?e:0!=(i=E$(n.a.d.i.p,t.a.d.i.p))?i:E$(t.a.d.p,n.a.d.p)}function qgn(n,t,e){var i,r,c,a;return(c=t.j)!=(a=e.j)?c.g-a.g:(i=n.f[t.p],r=n.f[e.p],0==i&&0==r?0:0==i?-1:0==r?1:Pln(i,r))}function Ggn(n,t,e){var i;if(!e[t.d])for(e[t.d]=!0,i=new Wb(kbn(t));i.a=(r=n.length))return r;for(t=t>0?t:0;ti&&$X(t,i,null),t}function Jgn(n,t){var e,i;for(i=n.a.length,t.lengthi&&$X(t,i,null),t}function Ygn(n,t,e){var i,r,c;return(r=BB(RX(n.e,t),387))?(c=pR(r,e),uL(n,r),c):(i=new nH(n,t,e),VW(n.e,t,i),kY(i),null)}function Zgn(n){var t;if(null==n)return null;if(null==(t=L$n(FBn(n,!0))))throw Hp(new ik("Invalid hexBinary value: '"+n+"'"));return t}function npn(n){return ODn(),Vhn(n,0)<0?0!=Vhn(n,-1)?new vEn(-1,j7(n)):Jtt:Vhn(n,10)<=0?Ztt[dG(n)]:new vEn(1,n)}function tpn(){return dWn(),Pun(Gk(Krt,1),$Vn,159,0,[Prt,Srt,Crt,vrt,prt,mrt,jrt,krt,yrt,Mrt,Trt,Ert,drt,wrt,grt,lrt,frt,brt,srt,ort,hrt,Irt])}function epn(n){var t;this.d=new Np,this.j=new Gj,this.g=new Gj,t=n.g.b,this.f=BB(mMn(vW(t),(HXn(),Udt)),103),this.e=Gy(MD(gpn(t,Spt)))}function ipn(n){this.b=new Np,this.e=new Np,this.d=n,this.a=!jE(AV(new Rq(null,new zU(new m6(n.b))),new aw(new Gr))).sd((dM(),tit))}function rpn(){rpn=O,hMt=new AC("PARENTS",0),sMt=new AC("NODES",1),uMt=new AC("EDGES",2),fMt=new AC("PORTS",3),oMt=new AC("LABELS",4)}function cpn(){cpn=O,BCt=new zC("DISTRIBUTED",0),qCt=new zC("JUSTIFIED",1),_Ct=new zC("BEGIN",2),FCt=new zC(eYn,3),HCt=new zC("END",4)}function apn(n){switch(n.yi(null)){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}function upn(n){switch(n.g){case 1:return Ffn(),HPt;case 4:return Ffn(),_Pt;case 2:return Ffn(),FPt;case 3:return Ffn(),KPt}return Ffn(),BPt}function opn(n,t,e){var i;switch((i=e.q.getFullYear()-sQn+sQn)<0&&(i=-i),t){case 1:n.a+=i;break;case 2:Enn(n,i%100,2);break;default:Enn(n,i,t)}}function spn(n,t){var e,i;if(LZ(t,n.b),t>=n.b>>1)for(i=n.c,e=n.b;e>t;--e)i=i.b;else for(i=n.a.a,e=0;e=64&&t<128&&(r=i0(r,yz(1,t-64)));return r}function gpn(n,t){var e,i;return i=null,Lx(n,(sWn(),CPt))&&(e=BB(mMn(n,CPt),94)).Xe(t)&&(i=e.We(t)),null==i&&vW(n)&&(i=mMn(vW(n),t)),i}function ppn(n,t){var e,i,r;(i=(r=t.d.i).k)!=(uSn(),Cut)&&i!=Tut&&dAn(e=new oz(ZL(lbn(r).a.Kc(),new h)))&&VW(n.k,t,BB(U5(e),17))}function vpn(n,t){var e,i,r;return i=itn(n.Tg(),t),(e=t-n.Ah())<0?(r=n.Yg(i))>=0?n.lh(r):qIn(n,i):e<0?qIn(n,i):BB(i,66).Nj().Sj(n,n.yh(),e)}function mpn(n){var t;if(cL(n.a,4)){if(null==(t=Ydn(n.a)))throw Hp(new Fy(o5n+n.b+"'. "+r5n+(ED(bAt),bAt.k)+c5n));return t}return n.a}function ypn(n){var t;if(null==n)return null;if(null==(t=UUn(FBn(n,!0))))throw Hp(new ik("Invalid base64Binary value: '"+n+"'"));return t}function kpn(n){var t;try{return t=n.i.Xb(n.e),n.mj(),n.g=n.e++,t}catch(e){throw cL(e=lun(e),73)?(n.mj(),Hp(new yv)):Hp(e)}}function jpn(n){var t;try{return t=n.c.ki(n.e),n.mj(),n.g=n.e++,t}catch(e){throw cL(e=lun(e),73)?(n.mj(),Hp(new yv)):Hp(e)}}function Epn(){Epn=O,sWn(),Ect=TPt,pct=ySt,lct=cSt,vct=XSt,_kn(),kct=Mit,yct=Eit,jct=Pit,mct=jit,Gsn(),wct=oct,bct=uct,dct=hct,gct=fct}function Tpn(n){switch(jM(),this.c=new Np,this.d=n,n.g){case 0:case 2:this.a=QW(hut),this.b=RQn;break;case 3:case 1:this.a=hut,this.b=KQn}}function Mpn(n,t,e){var i;if(n.c)Pen(n.c,n.c.i+t),Cen(n.c,n.c.j+e);else for(i=new Wb(n.b);i.a0&&(WB(n.b,new VB(t.a,e)),0<(i=t.a.length)?t.a=t.a.substr(0,0):0>i&&(t.a+=rL(x8(ONt,WVn,25,-i,15,1))))}function Cpn(n,t){var e,i,r;for(e=n.o,r=BB(BB(h6(n.r,t),21),84).Kc();r.Ob();)(i=BB(r.Pb(),111)).e.a=dyn(i,e.a),i.e.b=e.b*Gy(MD(i.b.We(Lrt)))}function Ipn(n,t){var e,i,r,c;return r=n.k,e=Gy(MD(mMn(n,(hWn(),Tlt)))),c=t.k,i=Gy(MD(mMn(t,Tlt))),c!=(uSn(),Mut)?-1:r!=Mut?1:e==i?0:e=0?n.hh(t,e,i):(n.eh()&&(i=(r=n.Vg())>=0?n.Qg(i):n.eh().ih(n,-1-r,null,i)),n.Sg(t,e,i))}function xpn(n,t){switch(t){case 7:return!n.e&&(n.e=new hK(_Ot,n,7,4)),void sqn(n.e);case 8:return!n.d&&(n.d=new hK(_Ot,n,8,5)),void sqn(n.d)}Dwn(n,t)}function Dpn(n,t){var e;e=n.Zc(t);try{return e.Pb()}catch(i){throw cL(i=lun(i),109)?Hp(new Ay("Can't get element "+t)):Hp(i)}}function Rpn(n,t){this.e=n,t=0&&(e.d=n.t);break;case 3:n.t>=0&&(e.a=n.t)}n.C&&(e.b=n.C.b,e.c=n.C.c)}function Hpn(){Hpn=O,Brt=new _S(mYn,0),Frt=new _S(yYn,1),Hrt=new _S(kYn,2),qrt=new _S(jYn,3),Brt.a=!1,Frt.a=!0,Hrt.a=!1,qrt.a=!0}function qpn(){qpn=O,Zrt=new KS(mYn,0),Yrt=new KS(yYn,1),nct=new KS(kYn,2),tct=new KS(jYn,3),Zrt.a=!1,Yrt.a=!0,nct.a=!1,tct.a=!0}function Gpn(n){var t;t=n.a;do{(t=BB(U5(new oz(ZL(fbn(t).a.Kc(),new h))),17).c.i).k==(uSn(),Put)&&n.b.Fc(t)}while(t.k==(uSn(),Put));n.b=ean(n.b)}function zpn(n){var t,e,i;for(i=n.c.a,n.p=(yX(i),new t_(i)),e=new Wb(i);e.ae.b)return!0}return!1}function Qpn(n,t){return XI(n)?!!OWn[t]:n.hm?!!n.hm[t]:UI(n)?!!IWn[t]:!!zI(n)&&!!CWn[t]}function Jpn(n,t,e){return null==e?(!n.o&&(n.o=new y9((CXn(),MOt),rAt,n,0)),Wdn(n.o,t)):(!n.o&&(n.o=new y9((CXn(),MOt),rAt,n,0)),vjn(n.o,t,e)),n}function Ypn(n,t,e,i){var r;(r=Xfn(t.Xe((sWn(),DSt))?BB(t.We(DSt),21):n.j))!=(dWn(),Irt)&&(e&&!agn(r)||USn(N$n(n,r,i),t))}function Zpn(n,t,e,i){var r,c,a;return c=itn(n.Tg(),t),(r=t-n.Ah())<0?(a=n.Yg(c))>=0?n._g(a,e,!0):cOn(n,c,e):BB(c,66).Nj().Pj(n,n.yh(),r,e,i)}function nvn(n,t,e,i){var r,c;e.mh(t)&&(ZM(),hnn(t)?ygn(n,BB(e.ah(t),153)):(r=(c=t)?BB(i,49).xh(c):null)&&_p(e.ah(t),r))}function tvn(n){switch(n.g){case 1:return Dan(),Rrt;case 3:return Dan(),Nrt;case 2:return Dan(),Drt;case 4:return Dan(),xrt;default:return null}}function evn(n){switch(typeof n){case NWn:return vvn(n);case LWn:return CY(n);case $Wn:return hN(),n?1231:1237;default:return null==n?0:PN(n)}}function ivn(n,t,e){if(n.e)switch(n.b){case 1:BQ(n.c,t,e);break;case 0:HQ(n.c,t,e)}else t4(n.c,t,e);n.a[t.p][e.p]=n.c.i,n.a[e.p][t.p]=n.c.e}function rvn(n){var t,e;if(null==n)return null;for(e=x8(Out,sVn,193,n.length,0,2),t=0;t=0)return i;if(n.Fk())for(e=0;e=(r=n.gc()))throw Hp(new tK(t,r));if(n.hi()&&(i=n.Xc(e))>=0&&i!=t)throw Hp(new _y(a8n));return n.mi(t,e)}function svn(n,t){if(this.a=BB(yX(n),245),this.b=BB(yX(t),245),n.vd(t)>0||n==(ey(),Knt)||t==(ty(),_nt))throw Hp(new _y("Invalid range: "+B3(n,t)))}function hvn(n){var t,e;for(this.b=new Np,this.c=n,this.a=!1,e=new Wb(n.a);e.a0),(t&-t)==t)return CY(t*H$n(n,31)*4.656612873077393e-10);do{i=(e=H$n(n,31))%t}while(e-i+(t-1)<0);return CY(i)}function vvn(n){var t,e,i;return r_(),null!=(i=rit[e=":"+n])?CY((kW(i),i)):(t=null==(i=iit[e])?YNn(n):CY((kW(i),i)),IQ(),rit[e]=t,t)}function mvn(n,t,e){OTn(e,"Compound graph preprocessor",1),n.a=new pY,Nzn(n,t,null),GHn(n,t),tNn(n),hon(t,(hWn(),Hft),n.a),n.a=null,$U(n.b),HSn(e)}function yvn(n,t,e){switch(e.g){case 1:n.a=t.a/2,n.b=0;break;case 2:n.a=t.a,n.b=t.b/2;break;case 3:n.a=t.a/2,n.b=t.b;break;case 4:n.a=0,n.b=t.b/2}}function kvn(n){var t,e,i;for(i=BB(h6(n.a,(LEn(),Pst)),15).Kc();i.Ob();)iX(n,e=BB(i.Pb(),101),(t=Hyn(e))[0],(Crn(),xst),0),iX(n,e,t[1],Rst,1)}function jvn(n){var t,e,i;for(i=BB(h6(n.a,(LEn(),Cst)),15).Kc();i.Ob();)iX(n,e=BB(i.Pb(),101),(t=Hyn(e))[0],(Crn(),xst),0),iX(n,e,t[1],Rst,1)}function Evn(n){switch(n.g){case 0:return null;case 1:return new Arn;case 2:return new Ym;default:throw Hp(new _y(c4n+(null!=n.f?n.f:""+n.g)))}}function Tvn(n,t,e){var i,r;for(mun(n,t-n.s,e-n.t),r=new Wb(n.n);r.a1&&(r=fvn(n,t)),r}function Svn(n){var t;return n.f&&n.f.kh()&&(t=BB(n.f,49),n.f=BB(tfn(n,t),82),n.f!=t&&0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,9,8,t,n.f))),n.f}function Pvn(n){var t;return n.i&&n.i.kh()&&(t=BB(n.i,49),n.i=BB(tfn(n,t),82),n.i!=t&&0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,9,7,t,n.i))),n.i}function Cvn(n){var t;return n.b&&0!=(64&n.b.Db)&&(t=n.b,n.b=BB(tfn(n,t),18),n.b!=t&&0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,9,21,t,n.b))),n.b}function Ivn(n,t){var e,i,r;null==n.d?(++n.e,++n.f):(i=t.Sh(),fNn(n,n.f+1),r=(i&DWn)%n.d.length,!(e=n.d[r])&&(e=n.d[r]=n.uj()),e.Fc(t),++n.f)}function Ovn(n,t,e){var i;return!t.Kj()&&(-2!=t.Zj()?null==(i=t.zj())?null==e:Nfn(i,e):t.Hj()==n.e.Tg()&&null==e)}function Avn(){var n;lin(16,IVn),n=Yin(16),this.b=x8(Gnt,CVn,317,n,0,1),this.c=x8(Gnt,CVn,317,n,0,1),this.a=null,this.e=null,this.i=0,this.f=n-1,this.g=0}function $vn(n){LR.call(this),this.k=(uSn(),Cut),this.j=(lin(6,AVn),new Y6(6)),this.b=(lin(2,AVn),new Y6(2)),this.d=new fm,this.f=new wm,this.a=n}function Lvn(n){var t,e;n.c.length<=1||(dPn(n,BB((t=EDn(n,(kUn(),SIt))).a,19).a,BB(t.b,19).a),dPn(n,BB((e=EDn(n,CIt)).a,19).a,BB(e.b,19).a))}function Nvn(){Nvn=O,yvt=new FP("SIMPLE",0),pvt=new FP(B1n,1),vvt=new FP("LINEAR_SEGMENTS",2),gvt=new FP("BRANDES_KOEPF",3),mvt=new FP(j3n,4)}function xvn(n,t,e){LK(BB(mMn(t,(HXn(),ept)),98))||(W7(n,t,DSn(t,e)),W7(n,t,DSn(t,(kUn(),SIt))),W7(n,t,DSn(t,sIt)),SQ(),m$(t.j,new _d(n)))}function Dvn(n,t,e,i){var r;for(r=BB(h6(i?n.a:n.b,t),21).Kc();r.Ob();)if(_Dn(n,e,BB(r.Pb(),33)))return!0;return!1}function Rvn(n){var t,e;for(e=new AL(n);e.e!=e.i.gc();)if((t=BB(kpn(e),87)).e||0!=(!t.d&&(t.d=new $L(VAt,t,1)),t.d).i)return!0;return!1}function Kvn(n){var t,e;for(e=new AL(n);e.e!=e.i.gc();)if((t=BB(kpn(e),87)).e||0!=(!t.d&&(t.d=new $L(VAt,t,1)),t.d).i)return!0;return!1}function _vn(n){var t,e;for(t=0,e=new Wb(n.c.a);e.a102?-1:n<=57?n-48:n<65?-1:n<=70?n-65+10:n<97?-1:n-97+10}function zvn(n,t){if(null==n)throw Hp(new Hy("null key in entry: null="+t));if(null==t)throw Hp(new Hy("null value in entry: "+n+"=null"))}function Uvn(n,t){for(var e,i;n.Ob();){if(!t.Ob())return!1;if(e=n.Pb(),i=t.Pb(),!(GI(e)===GI(i)||null!=e&&Nfn(e,i)))return!1}return!t.Ob()}function Xvn(n,t){var i;return i=Pun(Gk(xNt,1),qQn,25,15,[vhn(n.a[0],t),vhn(n.a[1],t),vhn(n.a[2],t)]),n.d&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function Wvn(n,t){var i;return i=Pun(Gk(xNt,1),qQn,25,15,[mhn(n.a[0],t),mhn(n.a[1],t),mhn(n.a[2],t)]),n.d&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function Vvn(){Vvn=O,yht=new SP("GREEDY",0),mht=new SP(H1n,1),jht=new SP(B1n,2),Eht=new SP("MODEL_ORDER",3),kht=new SP("GREEDY_MODEL_ORDER",4)}function Qvn(n,t){var e,i,r;for(n.b[t.g]=1,i=spn(t.d,0);i.b!=i.d.c;)r=(e=BB(b3(i),188)).c,1==n.b[r.g]?DH(n.a,e):2==n.b[r.g]?n.b[r.g]=1:Qvn(n,r)}function Jvn(n,t){var e,i,r;for(r=new Y6(t.gc()),i=t.Kc();i.Ob();)(e=BB(i.Pb(),286)).c==e.f?hPn(n,e,e.c):rPn(n,e)||(r.c[r.c.length]=e);return r}function Yvn(n,t,e){var i,r,c,a;for(a=n.r+t,n.r+=t,n.d+=e,i=e/n.n.c.length,r=0,c=new Wb(n.n);c.ac&&$X(t,c,null),t}function Tmn(n,t){var e,i;if(i=n.gc(),null==t){for(e=0;e0&&(o+=r),s[h]=a,a+=u*(o+i)}function Dmn(n){var t,e,i;for(i=n.f,n.n=x8(xNt,qQn,25,i,15,1),n.d=x8(xNt,qQn,25,i,15,1),t=0;t0?n.c:0),++c;n.b=r,n.d=a}function zmn(n,t){var i,r,c,a,u;for(r=0,c=0,i=0,u=new Wb(t);u.a0?n.g:0),++i;n.c=c,n.d=r}function Umn(n,t){var i;return i=Pun(Gk(xNt,1),qQn,25,15,[gvn(n,(Dtn(),Git),t),gvn(n,zit,t),gvn(n,Uit,t)]),n.f&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function Xmn(n,t,e){try{FRn(n,t+n.j,e+n.k,!1,!0)}catch(i){throw cL(i=lun(i),73)?Hp(new Ay(i.g+CYn+t+FWn+e+").")):Hp(i)}}function Wmn(n,t,e){try{FRn(n,t+n.j,e+n.k,!0,!1)}catch(i){throw cL(i=lun(i),73)?Hp(new Ay(i.g+CYn+t+FWn+e+").")):Hp(i)}}function Vmn(n){var t;Lx(n,(HXn(),$gt))&&((t=BB(mMn(n,$gt),21)).Hc((n$n(),ICt))?(t.Mc(ICt),t.Fc(ACt)):t.Hc(ACt)&&(t.Mc(ACt),t.Fc(ICt)))}function Qmn(n){var t;Lx(n,(HXn(),$gt))&&((t=BB(mMn(n,$gt),21)).Hc((n$n(),DCt))?(t.Mc(DCt),t.Fc(NCt)):t.Hc(NCt)&&(t.Mc(NCt),t.Fc(DCt)))}function Jmn(n,t,e){OTn(e,"Self-Loop ordering",1),YT($V(AV(AV(wnn(new Rq(null,new w1(t.b,16)),new Ii),new Oi),new Ai),new $i),new bd(n)),HSn(e)}function Ymn(n,t,e,i){var r,c;for(r=t;r0&&(c.b+=t),c}function uyn(n,t){var i,r,c;for(c=new Gj,r=n.Kc();r.Ob();)ZRn(i=BB(r.Pb(),37),0,c.b),c.b+=i.f.b+t,c.a=e.Math.max(c.a,i.f.a);return c.a>0&&(c.a+=t),c}function oyn(n){var t,i,r;for(r=DWn,i=new Wb(n.a);i.a>16==6?n.Cb.ih(n,5,GOt,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||n.zh(),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function lyn(n){PJ();var t=n.e;if(t&&t.stack){var e=t.stack,i=t+"\n";return e.substring(0,i.length)==i&&(e=e.substring(i.length)),e.split("\n")}return[]}function byn(n){var t;return Min(),(t=Ott)[n>>>28]|t[n>>24&15]<<4|t[n>>20&15]<<8|t[n>>16&15]<<12|t[n>>12&15]<<16|t[n>>8&15]<<20|t[n>>4&15]<<24|t[15&n]<<28}function wyn(n){var t,i,r;n.b==n.c&&(r=n.a.length,i=kon(e.Math.max(8,r))<<1,0!=n.b?(urn(n,t=SR(n.a,i),r),n.a=t,n.b=0):Pv(n.a,i),n.c=r)}function dyn(n,t){var e;return(e=n.b).Xe((sWn(),aPt))?e.Hf()==(kUn(),CIt)?-e.rf().a-Gy(MD(e.We(aPt))):t+Gy(MD(e.We(aPt))):e.Hf()==(kUn(),CIt)?-e.rf().a:t}function gyn(n){var t;return 0!=n.b.c.length&&BB(xq(n.b,0),70).a?BB(xq(n.b,0),70).a:null!=(t=eQ(n))?t:""+(n.c?E7(n.c.a,n,0):-1)}function pyn(n){var t;return 0!=n.f.c.length&&BB(xq(n.f,0),70).a?BB(xq(n.f,0),70).a:null!=(t=eQ(n))?t:""+(n.i?E7(n.i.j,n,0):-1)}function vyn(n,t){var e,i;if(t<0||t>=n.gc())return null;for(e=t;e0?n.c:0),c=e.Math.max(c,t.d),++r;n.e=a,n.b=c}function kyn(n){var t,e;if(!n.b)for(n.b=C2(BB(n.f,118).Ag().i),e=new AL(BB(n.f,118).Ag());e.e!=e.i.gc();)t=BB(kpn(e),137),WB(n.b,new Ry(t));return n.b}function jyn(n,t){var e,i,r;if(t.dc())return dD(),dD(),pAt;for(e=new aR(n,t.gc()),r=new AL(n);r.e!=r.i.gc();)i=kpn(r),t.Hc(i)&&f9(e,i);return e}function Eyn(n,t,e,i){return 0==t?i?(!n.o&&(n.o=new y9((CXn(),MOt),rAt,n,0)),n.o):(!n.o&&(n.o=new y9((CXn(),MOt),rAt,n,0)),A8(n.o)):Zpn(n,t,e,i)}function Tyn(n){var t,e;if(n.rb)for(t=0,e=n.rb.i;t>22))>>22)<0||(n.l=e&SQn,n.m=i&SQn,n.h=r&PQn,0)))}function Iyn(n,t,e,i,r,c,a){var u,o;return!(t.Ae()&&(o=n.a.ue(e,i),o<0||!r&&0==o)||t.Be()&&(u=n.a.ue(e,c),u>0||!a&&0==u))}function Oyn(n,t){if(zsn(),0!=n.j.g-t.j.g)return 0;switch(n.j.g){case 2:return jbn(t,bst)-jbn(n,bst);case 4:return jbn(n,lst)-jbn(t,lst)}return 0}function Ayn(n){switch(n.g){case 0:return xht;case 1:return Dht;case 2:return Rht;case 3:return Kht;case 4:return _ht;case 5:return Fht;default:return null}}function $yn(n,t,e){var i,r;return Ihn(r=new Lm,t),Nrn(r,e),f9((!n.c&&(n.c=new eU(JAt,n,12,10)),n.c),r),Len(i=r,0),Nen(i,1),nln(i,!0),Jfn(i,!0),i}function Lyn(n,t){var e,i;if(t>=n.i)throw Hp(new LO(t,n.i));return++n.j,e=n.g[t],(i=n.i-t-1)>0&&aHn(n.g,t+1,n.g,t,i),$X(n.g,--n.i,null),n.fi(t,e),n.ci(),e}function Nyn(n,t){var e;return n.Db>>16==17?n.Cb.ih(n,21,qAt,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||n.zh(),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function xyn(n){var t,e,i;for(SQ(),m$(n.c,n.a),i=new Wb(n.c);i.ae.a.c.length))throw Hp(new _y("index must be >= 0 and <= layer node count"));n.c&&y7(n.c.a,n),n.c=e,e&&kG(e.a,t,n)}function Jyn(n,t){var e,i,r;for(i=new oz(ZL(hbn(n).a.Kc(),new h));dAn(i);)return e=BB(U5(i),17),new qf(yX((r=BB(t.Kb(e),10)).n.b+r.o.b/2));return iy(),iy(),Ont}function Yyn(n,t){this.c=new xp,this.a=n,this.b=t,this.d=BB(mMn(n,(hWn(),Alt)),304),GI(mMn(n,(HXn(),Lgt)))===GI((g7(),qht))?this.e=new gm:this.e=new dm}function Zyn(n,t){var i,r,c;for(c=0,r=new Wb(n);r.a>16==6?n.Cb.ih(n,6,_Ot,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||(CXn(),yOt),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function hkn(n,t){var e;return n.Db>>16==7?n.Cb.ih(n,1,DOt,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||(CXn(),jOt),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function fkn(n,t){var e;return n.Db>>16==9?n.Cb.ih(n,9,UOt,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||(CXn(),TOt),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function lkn(n,t){var e;return n.Db>>16==5?n.Cb.ih(n,9,XAt,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||(gWn(),s$t),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function bkn(n,t){var e;return n.Db>>16==3?n.Cb.ih(n,0,BOt,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||(gWn(),e$t),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function wkn(n,t){var e;return n.Db>>16==7?n.Cb.ih(n,6,GOt,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||(gWn(),v$t),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function dkn(){this.a=new lo,this.g=new Avn,this.j=new Avn,this.b=new xp,this.d=new Avn,this.i=new Avn,this.k=new xp,this.c=new xp,this.e=new xp,this.f=new xp}function gkn(n,t,e){var i,r,c;for(e<0&&(e=0),c=n.i,r=e;rGQn)return vkn(n,i);if(i==n)return!0}}return!1}function mkn(n){switch(DN(),n.q.g){case 5:vIn(n,(kUn(),sIt)),vIn(n,SIt);break;case 4:z$n(n,(kUn(),sIt)),z$n(n,SIt);break;default:vUn(n,(kUn(),sIt)),vUn(n,SIt)}}function ykn(n){switch(DN(),n.q.g){case 5:SOn(n,(kUn(),oIt)),SOn(n,CIt);break;case 4:Cpn(n,(kUn(),oIt)),Cpn(n,CIt);break;default:mUn(n,(kUn(),oIt)),mUn(n,CIt)}}function kkn(n){var t,e;(t=BB(mMn(n,(fRn(),nat)),19))?(e=t.a,hon(n,(Mrn(),hat),0==e?new sbn:new C4(e))):hon(n,(Mrn(),hat),new C4(1))}function jkn(n,t){var e;switch(e=n.i,t.g){case 1:return-(n.n.b+n.o.b);case 2:return n.n.a-e.o.a;case 3:return n.n.b-e.o.b;case 4:return-(n.n.a+n.o.a)}return 0}function Ekn(n,t){switch(n.g){case 0:return t==(Tbn(),Flt)?rst:cst;case 1:return t==(Tbn(),Flt)?rst:ist;case 2:return t==(Tbn(),Flt)?ist:cst;default:return ist}}function Tkn(n,t){var i,r,c;for(y7(n.a,t),n.e-=t.r+(0==n.a.c.length?0:n.c),c=n4n,r=new Wb(n.a);r.a>16==3?n.Cb.ih(n,12,UOt,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||(CXn(),mOt),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function Skn(n,t){var e;return n.Db>>16==11?n.Cb.ih(n,10,UOt,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||(CXn(),EOt),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function Pkn(n,t){var e;return n.Db>>16==10?n.Cb.ih(n,11,qAt,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||(gWn(),g$t),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function Ckn(n,t){var e;return n.Db>>16==10?n.Cb.ih(n,12,QAt,t):(e=Cvn(BB(itn(BB(yan(n,16),26)||(gWn(),m$t),n.Db>>16),18)),n.Cb.ih(n,e.n,e.f,t))}function Ikn(n){var t;return 0==(1&n.Bb)&&n.r&&n.r.kh()&&(t=BB(n.r,49),n.r=BB(tfn(n,t),138),n.r!=t&&0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,9,8,t,n.r))),n.r}function Okn(n,t,i){var r;return r=Pun(Gk(xNt,1),qQn,25,15,[iMn(n,(Dtn(),Git),t,i),iMn(n,zit,t,i),iMn(n,Uit,t,i)]),n.f&&(r[0]=e.Math.max(r[0],r[2]),r[2]=r[0]),r}function Akn(n,t){var e,i,r;if(0!=(r=Jvn(n,t)).c.length)for(m$(r,new ti),e=r.c.length,i=0;i>19)!=(u=t.h>>19)?u-a:(i=n.h)!=(c=t.h)?i-c:(e=n.m)!=(r=t.m)?e-r:n.l-t.l}function _kn(){_kn=O,tRn(),Pit=new $O(UJn,Cit=xit),Rnn(),Mit=new $O(XJn,Sit=mit),hpn(),Eit=new $O(WJn,Tit=dit),jit=new $O(VJn,(hN(),!0))}function Fkn(n,t,e){var i,r;i=t*e,cL(n.g,145)?(r=f3(n)).f.d?r.f.a||(n.d.a+=i+fYn):(n.d.d-=i+fYn,n.d.a+=i+fYn):cL(n.g,10)&&(n.d.d-=i,n.d.a+=2*i)}function Bkn(n,t,i){var r,c,a,u,o;for(c=n[i.g],o=new Wb(t.d);o.a0?n.g:0),++i;t.b=r,t.e=c}function qkn(n){var t,e,i;if(i=n.b,qT(n.i,i.length)){for(e=2*i.length,n.b=x8(Gnt,CVn,317,e,0,1),n.c=x8(Gnt,CVn,317,e,0,1),n.f=e-1,n.i=0,t=n.a;t;t=t.c)JCn(n,t,t);++n.g}}function Gkn(n,t,e,i){var r,c,a,u;for(r=0;ru&&(o=u/r),(c=e.Math.abs(n.b))>a&&(s=a/c),kL(n,e.Math.min(o,s)),n}function Xkn(){var n,t;qBn();try{if(t=BB(Xjn((WM(),zAt),y6n),2014))return t}catch(e){if(!cL(e=lun(e),102))throw Hp(e);n=e,uz((u$(),n))}return new ao}function Wkn(){var n,t;d7();try{if(t=BB(Xjn((WM(),zAt),S7n),2024))return t}catch(e){if(!cL(e=lun(e),102))throw Hp(e);n=e,uz((u$(),n))}return new Ds}function Vkn(){var n,t;qBn();try{if(t=BB(Xjn((WM(),zAt),V9n),1941))return t}catch(e){if(!cL(e=lun(e),102))throw Hp(e);n=e,uz((u$(),n))}return new qo}function Qkn(n,t,e){var i,r;return r=n.e,n.e=t,0!=(4&n.Db)&&0==(1&n.Db)&&(i=new nU(n,1,4,r,t),e?e.Ei(i):e=i),r!=t&&(e=azn(n,t?kLn(n,t):n.a,e)),e}function Jkn(){AT.call(this),this.e=-1,this.a=!1,this.p=_Vn,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=_Vn}function Ykn(n,t){var e,i,r;if(i=n.b.d.d,n.a||(i+=n.b.d.a),r=t.b.d.d,t.a||(r+=t.b.d.a),0==(e=Pln(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function Zkn(n,t){var e,i,r;if(i=n.b.b.d,n.a||(i+=n.b.b.a),r=t.b.b.d,t.a||(r+=t.b.b.a),0==(e=Pln(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function njn(n,t){var e,i,r;if(i=n.b.g.d,n.a||(i+=n.b.g.a),r=t.b.g.d,t.a||(r+=t.b.g.a),0==(e=Pln(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function tjn(){tjn=O,Nat=WG(dq(dq(dq(new B2,(yMn(),Fat),(lWn(),yot)),Fat,Tot),Bat,Aot),Bat,oot),Dat=dq(dq(new B2,Fat,Yut),Fat,sot),xat=WG(new B2,Bat,fot)}function ejn(n){var t,e,i,r,c;for(t=BB(mMn(n,(hWn(),zft)),83),c=n.n,i=t.Cc().Kc();i.Ob();)(r=(e=BB(i.Pb(),306)).i).c+=c.a,r.d+=c.b,e.c?NDn(e):xDn(e);hon(n,zft,null)}function ijn(n,t,e){var i,r;switch(i=(r=n.b).d,t.g){case 1:return-i.d-e;case 2:return r.o.a+i.c+e;case 3:return r.o.b+i.a+e;case 4:return-i.b-e;default:return-1}}function rjn(n){var t,e,i,r,c;if(i=0,r=ZYn,n.b)for(t=0;t<360;t++)e=.017453292519943295*t,UKn(n,n.d,0,0,Z3n,e),(c=n.b.ig(n.d))0&&(r=aOn(n,(c&DWn)%n.d.length,c,t))?r.ed(e):(i=n.tj(c,t,e),n.c.Fc(i),null)}function mjn(n,t){var e,i,r,c;switch(Cfn(n,t)._k()){case 3:case 2:for(r=0,c=(e=JBn(t)).i;r=0;r--)if(mK(n[r].d,t)||mK(n[r].d,i)){n.length>=r+1&&n.splice(0,r+1);break}return n}function Ojn(n,t){var i;return YO(n)&&YO(t)&&$Qn<(i=n/t)&&i0&&(n.b+=2,n.a+=r):(n.b+=1,n.a+=e.Math.min(r,c))}function Kjn(n,t){var e;if(e=!1,XI(t)&&(e=!0,nW(n,new GX(SD(t)))),e||cL(t,236)&&(e=!0,nW(n,new Sl(XK(BB(t,236))))),!e)throw Hp(new Ly(H6n))}function _jn(n,t,e,i){var r,c,a;return r=new N7(n.e,1,10,cL(a=t.c,88)?BB(a,26):(gWn(),d$t),cL(c=e.c,88)?BB(c,26):(gWn(),d$t),uvn(n,t),!1),i?i.Ei(r):i=r,i}function Fjn(n){var t,e;switch(BB(mMn(vW(n),(HXn(),pgt)),420).g){case 0:return t=n.n,e=n.o,new xC(t.a+e.a/2,t.b+e.b/2);case 1:return new wA(n.n);default:return null}}function Bjn(){Bjn=O,Qht=new AP(QZn,0),Vht=new AP("LEFTUP",1),Yht=new AP("RIGHTUP",2),Wht=new AP("LEFTDOWN",3),Jht=new AP("RIGHTDOWN",4),Xht=new AP("BALANCED",5)}function Hjn(n,t,e){var i,r,c;if(0==(i=Pln(n.a[t.p],n.a[e.p]))){if(r=BB(mMn(t,(hWn(),clt)),15),c=BB(mMn(e,clt),15),r.Hc(e))return-1;if(c.Hc(t))return 1}return i}function qjn(n){switch(n.g){case 1:return new _a;case 2:return new Fa;case 3:return new Ka;case 0:return null;default:throw Hp(new _y(c4n+(null!=n.f?n.f:""+n.g)))}}function Gjn(n,t,e){switch(t){case 1:return!n.n&&(n.n=new eU(zOt,n,1,7)),sqn(n.n),!n.n&&(n.n=new eU(zOt,n,1,7)),void pX(n.n,BB(e,14));case 2:return void $in(n,SD(e))}rsn(n,t,e)}function zjn(n,t,e){switch(t){case 3:return void Men(n,Gy(MD(e)));case 4:return void Sen(n,Gy(MD(e)));case 5:return void Pen(n,Gy(MD(e)));case 6:return void Cen(n,Gy(MD(e)))}Gjn(n,t,e)}function Ujn(n,t,e){var i,r;(i=HTn(r=new Lm,t,null))&&i.Fi(),Nrn(r,e),f9((!n.c&&(n.c=new eU(JAt,n,12,10)),n.c),r),Len(r,0),Nen(r,1),nln(r,!0),Jfn(r,!0)}function Xjn(n,t){var e,i;return cL(e=hS(n.g,t),235)?((i=BB(e,235)).Qh(),i.Nh()):cL(e,498)?i=BB(e,1938).b:null}function Wjn(n,t,e,i){var r,c;return yX(t),yX(e),R7(!!(c=BB(UK(n.d,t),19)),"Row %s not in %s",t,n.e),R7(!!(r=BB(UK(n.b,e),19)),"Column %s not in %s",e,n.c),Sun(n,c.a,r.a,i)}function Vjn(n,t,e,i,r,c,a){var u,o,s,h,f;if(f=Bmn(u=(s=c==a-1)?i:0,h=r[c]),10!=i&&Pun(Gk(n,a-c),t[c],e[c],u,f),!s)for(++c,o=0;o1||-1==u?(c=BB(o,15),r.Wb(Xdn(n,c))):r.Wb(t_n(n,BB(o,56))))}function hEn(n,t,e,i){JE();var r=PWn;function c(){for(var n=0;nD3n)return e;i>-1e-6&&++e}return e}function kEn(n,t){var e;t!=n.b?(e=null,n.b&&(e=oY(n.b,n,-4,e)),t&&(e=Npn(t,n,-4,e)),(e=Zhn(n,t,e))&&e.Fi()):0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,3,t,t))}function jEn(n,t){var e;t!=n.f?(e=null,n.f&&(e=oY(n.f,n,-1,e)),t&&(e=Npn(t,n,-1,e)),(e=nfn(n,t,e))&&e.Fi()):0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,0,t,t))}function EEn(n){var t,e,i;if(null==n)return null;if((e=BB(n,15)).dc())return"";for(i=new Sk,t=e.Kc();t.Ob();)cO(i,(Uqn(),SD(t.Pb()))),i.a+=" ";return KO(i,i.a.length-1)}function TEn(n){var t,e,i;if(null==n)return null;if((e=BB(n,15)).dc())return"";for(i=new Sk,t=e.Kc();t.Ob();)cO(i,(Uqn(),SD(t.Pb()))),i.a+=" ";return KO(i,i.a.length-1)}function MEn(n,t,e){var i,r;return i=n.c[t.c.p][t.p],r=n.c[e.c.p][e.p],null!=i.a&&null!=r.a?Tz(i.a,r.a):null!=i.a?-1:null!=r.a?1:0}function SEn(n,t){var e,i,r;if(t)for(r=((e=new hz(t.a.length)).b-e.a)*e.c<0?(eS(),MNt):new XL(e);r.Ob();)i=x2(t,BB(r.Pb(),19).a),OV(new Bg(n).a,i)}function PEn(n,t){var e,i,r;if(t)for(r=((e=new hz(t.a.length)).b-e.a)*e.c<0?(eS(),MNt):new XL(e);r.Ob();)i=x2(t,BB(r.Pb(),19).a),IV(new $g(n).a,i)}function CEn(n){if(null!=n&&n.length>0&&33==fV(n,n.length-1))try{return null==JPn(fx(n,0,n.length-1)).e}catch(t){if(!cL(t=lun(t),32))throw Hp(t)}return!1}function IEn(n,t,e){var i,r,c;return i=t.ak(),c=t.dd(),r=i.$j()?LJ(n,3,i,null,c,pBn(n,i,c,cL(i,99)&&0!=(BB(i,18).Bb&BQn)),!0):LJ(n,1,i,i.zj(),c,-1,!0),e?e.Ei(r):e=r,e}function OEn(){var n,t,e;for(t=0,n=0;n<1;n++){if(0==(e=QOn((b1(n,1),"X".charCodeAt(n)))))throw Hp(new ak("Unknown Option: "+"X".substr(n)));t|=e}return t}function AEn(n,t,e){var i,r;switch(i=Wln(vW(t)),CZ(r=new CSn,t),e.g){case 1:qCn(r,Tln(hwn(i)));break;case 2:qCn(r,hwn(i))}return hon(r,(HXn(),tpt),MD(mMn(n,tpt))),r}function $En(n){var t,e;return t=BB(U5(new oz(ZL(fbn(n.a).a.Kc(),new h))),17),e=BB(U5(new oz(ZL(lbn(n.a).a.Kc(),new h))),17),qy(TD(mMn(t,(hWn(),Clt))))||qy(TD(mMn(e,Clt)))}function LEn(){LEn=O,Mst=new yP("ONE_SIDE",0),Pst=new yP("TWO_SIDES_CORNER",1),Cst=new yP("TWO_SIDES_OPPOSING",2),Sst=new yP("THREE_SIDES",3),Tst=new yP("FOUR_SIDES",4)}function NEn(n,t,e,i,r){var c,a;c=BB(P4(AV(t.Oc(),new Zr),m9(new H,new B,new rn,Pun(Gk(nit,1),$Vn,132,0,[(qsn(),Uet)]))),15),a=BB(gan(n.b,e,i),15),0==r?a.Wc(0,c):a.Gc(c)}function xEn(n,t){var e,i,r;for(i=new Wb(t.a);i.a0&&_yn(this,this.c-1,(kUn(),oIt)),this.c0&&n[0].length>0&&(this.c=qy(TD(mMn(vW(n[0][0]),(hWn(),alt))))),this.a=x8(Pmt,sVn,2018,n.length,0,2),this.b=x8(Lmt,sVn,2019,n.length,0,2),this.d=new Thn}function XEn(n){return 0!=n.c.length&&((l1(0,n.c.length),BB(n.c[0],17)).c.i.k==(uSn(),Put)||o5($V(new Rq(null,new w1(n,16)),new Kc),new _c))}function WEn(n,t,e){return OTn(e,"Tree layout",1),h2(n.b),CU(n.b,(zyn(),Ryt),Ryt),CU(n.b,Kyt,Kyt),CU(n.b,_yt,_yt),CU(n.b,Fyt,Fyt),n.a=$qn(n.b,t),lxn(n,t,mcn(e,1)),HSn(e),t}function VEn(n,t){var i,r,c,a,u,o;for(u=wDn(t),c=t.f,o=t.g,a=e.Math.sqrt(c*c+o*o),r=0,i=new Wb(u);i.a=0?(e=Ojn(n,AQn),i=ldn(n,AQn)):(e=Ojn(t=jz(n,1),5e8),i=rbn(yz(i=ldn(t,5e8),1),e0(n,1))),i0(yz(i,32),e0(e,UQn))}function lTn(n,t,e){var i;switch(Px(0!=t.b),i=BB(Atn(t,t.a.a),8),e.g){case 0:i.b=0;break;case 2:i.b=n.f;break;case 3:i.a=0;break;default:i.a=n.g}return nX(spn(t,0),i),t}function bTn(n,t,e,i){var r,c,a,u,o;switch(o=n.b,u=zgn(a=(c=t.d).j,o.d[a.g],e),r=UR(B$(c.n),c.a),c.j.g){case 1:case 3:u.a+=r.a;break;case 2:case 4:u.b+=r.b}r5(i,u,i.c.b,i.c)}function wTn(n,t,e){var i,r,c,a;for(a=E7(n.e,t,0),(c=new rm).b=e,i=new M2(n.e,a);i.b1;t>>=1)0!=(1&t)&&(i=Nnn(i,e)),e=1==e.d?Nnn(e,e):new Cgn(I_n(e.a,e.d,x8(ANt,hQn,25,e.d<<1,15,1)));return i=Nnn(i,e)}function yTn(){var n,t,e,i;for(yTn=O,Oet=x8(xNt,qQn,25,25,15,1),Aet=x8(xNt,qQn,25,33,15,1),i=152587890625e-16,t=32;t>=0;t--)Aet[t]=i,i*=.5;for(e=1,n=24;n>=0;n--)Oet[n]=e,e*=.5}function kTn(n){var t,e;if(qy(TD(ZAn(n,(HXn(),wgt)))))for(e=new oz(ZL(dLn(n).a.Kc(),new h));dAn(e);)if(QIn(t=BB(U5(e),79))&&qy(TD(ZAn(t,dgt))))return!0;return!1}function jTn(n,t){var e,i,r;TU(n.f,t)&&(t.b=n,i=t.c,-1!=E7(n.j,i,0)||WB(n.j,i),r=t.d,-1!=E7(n.j,r,0)||WB(n.j,r),0!=(e=t.a.b).c.length&&(!n.i&&(n.i=new epn(n)),van(n.i,e)))}function ETn(n){var t,e,i,r;return(e=(t=n.c.d).j)==(r=(i=n.d.d).j)?t.p=0&&mK(n.substr(t,3),"GMT")||t>=0&&mK(n.substr(t,3),"UTC")?(e[0]=t+3,y_n(n,e,i)):y_n(n,e,i)}function ITn(n,t){var e,i,r,c,a;for(c=n.g.a,a=n.g.b,i=new Wb(n.d);i.ae;c--)n[c]|=t[c-e-1]>>>a,n[c-1]=t[c-e-1]<=n.f)break;c.c[c.c.length]=e}return c}function _Tn(n){var t,e,i,r;for(t=null,r=new Wb(n.wf());r.a0&&aHn(n.g,t,n.g,t+i,u),a=e.Kc(),n.i+=i,r=0;rc&&sU(s,atn(e[u],Tet))&&(r=u,c=o);return r>=0&&(i[0]=t+c),r}function UTn(n,t){var e;if(0!=(e=JO(n.b.Hf(),t.b.Hf())))return e;switch(n.b.Hf().g){case 1:case 2:return E$(n.b.sf(),t.b.sf());case 3:case 4:return E$(t.b.sf(),n.b.sf())}return 0}function XTn(n){var t,e,i;for(i=n.e.c.length,n.a=kq(ANt,[sVn,hQn],[48,25],15,[i,i],2),e=new Wb(n.c);e.a>4&15,c=15&n[i],a[r++]=OOt[e],a[r++]=OOt[c];return Bdn(a,0,a.length)}function QTn(n,t,e){var i,r,c;return i=t.ak(),c=t.dd(),r=i.$j()?LJ(n,4,i,c,null,pBn(n,i,c,cL(i,99)&&0!=(BB(i,18).Bb&BQn)),!0):LJ(n,i.Kj()?2:1,i,c,i.zj(),-1,!0),e?e.Ei(r):e=r,e}function JTn(n){var t,e;return n>=BQn?(t=HQn+(n-BQn>>10&1023)&QVn,e=56320+(n-BQn&1023)&QVn,String.fromCharCode(t)+""+String.fromCharCode(e)):String.fromCharCode(n&QVn)}function YTn(n,t){var e,i,r,c;return qD(),(r=BB(BB(h6(n.r,t),21),84)).gc()>=2&&(i=BB(r.Kc().Pb(),111),e=n.u.Hc((lIn(),tIt)),c=n.u.Hc(cIt),!i.a&&!e&&(2==r.gc()||c))}function ZTn(n,t,e,i,r){var c,a,u;for(c=eDn(n,t,e,i,r),u=!1;!c;)E$n(n,r,!0),u=!0,c=eDn(n,t,e,i,r);u&&E$n(n,r,!1),0!=(a=Dun(r)).c.length&&(n.d&&n.d.lg(a),ZTn(n,r,e,i,a))}function nMn(){nMn=O,aCt=new BC(QZn,0),rCt=new BC("DIRECTED",1),uCt=new BC("UNDIRECTED",2),eCt=new BC("ASSOCIATION",3),cCt=new BC("GENERALIZATION",4),iCt=new BC("DEPENDENCY",5)}function tMn(n,t){var e;if(!WY(n))throw Hp(new Fy(F5n));switch(e=WY(n),t.g){case 1:return-(n.j+n.f);case 2:return n.i-e.g;case 3:return n.j-e.f;case 4:return-(n.i+n.g)}return 0}function eMn(n,t){var e,i;for(kW(t),i=n.b.c.length,WB(n.b,t);i>0;){if(e=i,i=(i-1)/2|0,n.a.ue(xq(n.b,i),t)<=0)return c5(n.b,e,t),!0;c5(n.b,e,xq(n.b,i))}return c5(n.b,i,t),!0}function iMn(n,t,i,r){var c,a;if(c=0,i)c=mhn(n.a[i.g][t.g],r);else for(a=0;a=a)}function cMn(n,t,e,i){var r;if(r=!1,XI(i)&&(r=!0,AH(t,e,SD(i))),r||zI(i)&&(r=!0,cMn(n,t,e,i)),r||cL(i,236)&&(r=!0,qQ(t,e,BB(i,236))),!r)throw Hp(new Ly(H6n))}function aMn(n,t){var e,i,r;if((e=t.Hh(n.a))&&null!=(r=cdn((!e.b&&(e.b=new Yx((gWn(),k$t),X$t,e)),e.b),F9n)))for(i=1;i<(IPn(),J$t).length;++i)if(mK(J$t[i],r))return i;return 0}function uMn(n,t){var e,i,r;if((e=t.Hh(n.a))&&null!=(r=cdn((!e.b&&(e.b=new Yx((gWn(),k$t),X$t,e)),e.b),F9n)))for(i=1;i<(IPn(),Y$t).length;++i)if(mK(Y$t[i],r))return i;return 0}function oMn(n,t){var e,i,r,c;if(kW(t),(c=n.a.gc())0?1:0;c.a[r]!=e;)c=c.a[r],r=n.a.ue(e.d,c.d)>0?1:0;c.a[r]=i,i.b=e.b,i.a[0]=e.a[0],i.a[1]=e.a[1],e.a[0]=null,e.a[1]=null}function wMn(n){return lIn(),!(Can(OY(EG(eIt,Pun(Gk(IIt,1),$Vn,273,0,[rIt])),n))>1||Can(OY(EG(tIt,Pun(Gk(IIt,1),$Vn,273,0,[nIt,cIt])),n))>1)}function dMn(n,t){cL(SY((WM(),zAt),n),498)?mZ(zAt,n,new OI(this,t)):mZ(zAt,n,this),iSn(this,t),t==(iE(),n$t)?(this.wb=BB(this,1939),BB(t,1941)):this.wb=(QX(),t$t)}function gMn(n){var t,e;if(null==n)return null;for(t=null,e=0;e=VVn?"error":i>=900?"warn":i>=800?"info":"log",n.a),n.b&&xNn(t,e,n.b,"Exception: ",!0))}function mMn(n,t){var e,i;return!n.q&&(n.q=new xp),null!=(i=RX(n.q,t))?i:(cL(e=t.wg(),4)&&(null==e?(!n.q&&(n.q=new xp),v6(n.q,t)):(!n.q&&(n.q=new xp),VW(n.q,t,e))),e)}function yMn(){yMn=O,Rat=new VS("P1_CYCLE_BREAKING",0),Kat=new VS("P2_LAYERING",1),_at=new VS("P3_NODE_ORDERING",2),Fat=new VS("P4_NODE_PLACEMENT",3),Bat=new VS("P5_EDGE_ROUTING",4)}function kMn(n,t){var e,i,r,c;for(i=(1==t?Wat:Xat).a.ec().Kc();i.Ob();)for(e=BB(i.Pb(),103),c=BB(h6(n.f.c,e),21).Kc();c.Ob();)r=BB(c.Pb(),46),y7(n.b.b,r.b),y7(n.b.a,BB(r.b,81).d)}function jMn(n,t){var e;if(Dnn(),n.c==t.c){if(n.b==t.b||hcn(n.b,t.b)){if(e=ZO(n.b)?1:-1,n.a&&!t.a)return e;if(!n.a&&t.a)return-e}return E$(n.b.g,t.b.g)}return Pln(n.c,t.c)}function EMn(n,t){var e;OTn(t,"Hierarchical port position processing",1),(e=n.b).c.length>0&&i_n((l1(0,e.c.length),BB(e.c[0],29)),n),e.c.length>1&&i_n(BB(xq(e,e.c.length-1),29),n),HSn(t)}function TMn(n,t){var e,i;if(NMn(n,t))return!0;for(i=new Wb(t);i.a=(r=n.Vi())||t<0)throw Hp(new Ay(u8n+t+o8n+r));if(e>=r||e<0)throw Hp(new Ay(s8n+e+o8n+r));return t!=e?(c=n.Ti(e),n.Hi(t,c),i=c):i=n.Oi(e),i}function $Mn(n){var t,e,i;if(i=n,n)for(t=0,e=n.Ug();e;e=e.Ug()){if(++t>GQn)return $Mn(e);if(i=e,e==n)throw Hp(new Fy("There is a cycle in the containment hierarchy of "+n))}return i}function LMn(n){var t,e,i;for(i=new $an(FWn,"[","]"),e=n.Kc();e.Ob();)b6(i,GI(t=e.Pb())===GI(n)?"(this Collection)":null==t?zWn:Bbn(t));return i.a?0==i.e.length?i.a.a:i.a.a+""+i.e:i.c}function NMn(n,t){var e,i;if(i=!1,t.gc()<2)return!1;for(e=0;ei&&(b1(t-1,n.length),n.charCodeAt(t-1)<=32);)--t;return i>0||t1&&(n.j.b+=n.e)):(n.j.a+=i.a,n.j.b=e.Math.max(n.j.b,i.b),n.d.c.length>1&&(n.j.a+=n.e))}function _Mn(){_Mn=O,$st=Pun(Gk(FIt,1),JZn,61,0,[(kUn(),sIt),oIt,SIt]),Ast=Pun(Gk(FIt,1),JZn,61,0,[oIt,SIt,CIt]),Lst=Pun(Gk(FIt,1),JZn,61,0,[SIt,CIt,sIt]),Nst=Pun(Gk(FIt,1),JZn,61,0,[CIt,sIt,oIt])}function FMn(n,t,e,i){var r,c,a,u,o;if(c=n.c.d,a=n.d.d,c.j!=a.j)for(o=n.b,r=c.j,u=null;r!=a.j;)u=0==t?Mln(r):Eln(r),DH(i,UR(zgn(r,o.d[r.g],e),zgn(u,o.d[u.g],e))),r=u}function BMn(n,t,e,i){var r,c,a,u,o;return u=BB((a=qyn(n.a,t,e)).a,19).a,c=BB(a.b,19).a,i&&(o=BB(mMn(t,(hWn(),Elt)),10),r=BB(mMn(e,Elt),10),o&&r&&(t4(n.b,o,r),u+=n.b.i,c+=n.b.e)),u>c}function HMn(n){var t,e,i,r,c,a,u,o;for(this.a=rvn(n),this.b=new Np,i=0,r=(e=n).length;iFD(n.d).c?(n.i+=n.g.c,gdn(n.d)):FD(n.d).c>FD(n.g).c?(n.e+=n.d.c,gdn(n.g)):(n.i+=qq(n.g),n.e+=qq(n.d),gdn(n.g),gdn(n.d))}function UMn(n,t,e){var i,r,c,a;for(c=t.q,a=t.r,new zZ((O6(),Tyt),t,c,1),new zZ(Tyt,c,a,1),r=new Wb(e);r.ao&&(s=o/r),(c=e.Math.abs(t.b-n.b))>a&&(h=a/c),u=e.Math.min(s,h),n.a+=u*(t.a-n.a),n.b+=u*(t.b-n.b)}function nSn(n,t,e,i,r){var c,a;for(a=!1,c=BB(xq(e.b,0),33);hBn(n,t,c,i,r)&&(a=!0,cEn(e,c),0!=e.b.c.length);)c=BB(xq(e.b,0),33);return 0==e.b.c.length&&Tkn(e.j,e),a&&Gmn(t.q),a}function tSn(n,t){var e,i,r,c;if(jDn(),t.b<2)return!1;for(i=e=BB(b3(c=spn(t,0)),8);c.b!=c.d.c;){if(cNn(n,i,r=BB(b3(c),8)))return!0;i=r}return!!cNn(n,i,e)}function eSn(n,t,e,i){return 0==e?(!n.o&&(n.o=new y9((CXn(),MOt),rAt,n,0)),BK(n.o,t,i)):BB(itn(BB(yan(n,16),26)||n.zh(),e),66).Nj().Rj(n,fgn(n),e-bX(n.zh()),t,i)}function iSn(n,t){var e;t!=n.sb?(e=null,n.sb&&(e=BB(n.sb,49).ih(n,1,HOt,e)),t&&(e=BB(t,49).gh(n,1,HOt,e)),(e=jfn(n,t,e))&&e.Fi()):0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,4,t,t))}function rSn(n,t){var e,i;if(!t)throw Hp(new ek("All edge sections need an end point."));e=Ren(t,"x"),Ten(new Kg(n).a,(kW(e),e)),i=Ren(t,"y"),Oen(new _g(n).a,(kW(i),i))}function cSn(n,t){var e,i;if(!t)throw Hp(new ek("All edge sections need a start point."));e=Ren(t,"x"),Ien(new xg(n).a,(kW(e),e)),i=Ren(t,"y"),Aen(new Dg(n).a,(kW(i),i))}function aSn(n,t){var e,i,r,c,a;for(i=0,c=psn(n).length;i>22-t,r=n.h<>22-t):t<44?(e=0,i=n.l<>44-t):(e=0,i=0,r=n.l<n)throw Hp(new _y("k must be smaller than n"));return 0==t||t==n?1:0==n?0:Mjn(n)/(Mjn(t)*Mjn(n-t))}function vSn(n,t){var e,i,r,c;for(e=new OA(n);null!=e.g||e.c?null==e.g||0!=e.i&&BB(e.g[e.i-1],47).Ob():tZ(e);)if(cL(c=BB(aLn(e),56),160))for(i=BB(c,160),r=0;r>4],t[2*e+1]=JLt[15&r];return Bdn(t,0,t.length)}function NSn(n){var t;switch(nV(),n.c.length){case 0:return Bnt;case 1:return IH((t=BB(YCn(new Wb(n)),42)).cd(),t.dd());default:return new hy(BB(Qgn(n,x8(Hnt,kVn,42,n.c.length,0,1)),165))}}function xSn(n){var t,e,i,r,c;for(t=new Lp,e=new Lp,d3(t,n),d3(e,n);e.b!=e.c;)for(c=new Wb(BB(dU(e),37).a);c.a0&&uKn(n,e,t),r):IOn(n,t,e)}function _Sn(n,t,e){var i,r,c,a;if(0!=t.b){for(i=new JT,a=spn(t,0);a.b!=a.d.c;)Frn(i,xun(c=BB(b3(a),86))),(r=c.e).a=BB(mMn(c,(qqn(),gkt)),19).a,r.b=BB(mMn(c,pkt),19).a;_Sn(n,i,mcn(e,i.b/n.a|0))}}function FSn(n,t){var e,i,r,c,a;if(n.e<=t)return n.g;if(z1(n,n.g,t))return n.g;for(c=n.r,i=n.g,a=n.r,r=(c-i)/2+i;i+11&&(n.e.b+=n.a)):(n.e.a+=i.a,n.e.b=e.Math.max(n.e.b,i.b),n.d.c.length>1&&(n.e.a+=n.a))}function XSn(n){var t,e,i,r;switch(t=(r=n.i).b,i=r.j,e=r.g,r.a.g){case 0:e.a=(n.g.b.o.a-i.a)/2;break;case 1:e.a=t.d.n.a+t.d.a.a;break;case 2:e.a=t.d.n.a+t.d.a.a-i.a;break;case 3:e.b=t.d.n.b+t.d.a.b}}function WSn(n,t,e,i,r){if(ii&&(n.a=i),n.br&&(n.b=r),n}function VSn(n){if(cL(n,149))return MNn(BB(n,149));if(cL(n,229))return Zbn(BB(n,229));if(cL(n,23))return hSn(BB(n,23));throw Hp(new _y(z6n+LMn(new Yy(Pun(Gk(Ant,1),HWn,1,5,[n])))))}function QSn(n,t,e,i,r){var c,a,u;for(c=!0,a=0;a>>r|e[a+i+1]<>>r,++a}return c}function JSn(n,t,e,i){var r,c;if(t.k==(uSn(),Put))for(c=new oz(ZL(fbn(t).a.Kc(),new h));dAn(c);)if((r=BB(U5(c),17)).c.i.k==Put&&n.c.a[r.c.i.c.p]==i&&n.c.a[t.c.p]==e)return!0;return!1}function YSn(n,t){var e,i,r,c;return t&=63,e=n.h&PQn,t<22?(c=e>>>t,r=n.m>>t|e<<22-t,i=n.l>>t|n.m<<22-t):t<44?(c=0,r=e>>>t-22,i=n.m>>t-22|n.h<<44-t):(c=0,r=0,i=e>>>t-44),M$(i&SQn,r&SQn,c&PQn)}function ZSn(n,t,e,i){var r;this.b=i,this.e=n==(oin(),Amt),r=t[e],this.d=kq($Nt,[sVn,ZJn],[177,25],16,[r.length,r.length],2),this.a=kq(ANt,[sVn,hQn],[48,25],15,[r.length,r.length],2),this.c=new zEn(t,e)}function nPn(n){var t,e,i;for(n.k=new o1((kUn(),Pun(Gk(FIt,1),JZn,61,0,[PIt,sIt,oIt,SIt,CIt])).length,n.j.c.length),i=new Wb(n.j);i.a=e)return hPn(n,t,i.p),!0;return!1}function cPn(n){var t;return 0!=(64&n.Db)?mSn(n):(t=new lN(Z5n),!n.a||oO(oO((t.a+=' "',t),n.a),'"'),oO(kE(oO(kE(oO(kE(oO(kE((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function aPn(n,t,e){var i,r,c,a,u;for(u=axn(n.e.Tg(),t),r=BB(n.g,119),i=0,a=0;ae?dCn(n,e,"start index"):t<0||t>e?dCn(t,e,"end index"):$Rn("end index (%s) must not be less than start index (%s)",Pun(Gk(Ant,1),HWn,1,5,[iln(t),iln(n)]))}function sPn(n,t){var e,i,r,c;for(i=0,r=n.length;i0&&lPn(n,c,e));t.p=0}function bPn(n){var t;this.c=new JT,this.f=n.e,this.e=n.d,this.i=n.g,this.d=n.c,this.b=n.b,this.k=n.j,this.a=n.a,n.i?this.j=n.i:this.j=new JK(t=BB(Vj(jMt),9),BB(SR(t,t.length),9),0),this.g=n.f}function wPn(n){var t,e,i,r;for(t=xX(oO(new lN("Predicates."),"and"),40),e=!0,r=new Sb(n);r.b0?u[a-1]:x8(Out,a1n,10,0,0,1),r=u[a],s=a=0?n.Bh(r):cIn(n,i)}else qfn(n,e,i)}function yPn(n){var t,e;if(e=null,t=!1,cL(n,204)&&(t=!0,e=BB(n,204).a),t||cL(n,258)&&(t=!0,e=""+BB(n,258).a),t||cL(n,483)&&(t=!0,e=""+BB(n,483).a),!t)throw Hp(new Ly(H6n));return e}function kPn(n,t){var e,i;if(n.f){for(;t.Ob();)if(cL(i=(e=BB(t.Pb(),72)).ak(),99)&&0!=(BB(i,18).Bb&h6n)&&(!n.e||i.Gj()!=NOt||0!=i.aj())&&null!=e.dd())return t.Ub(),!0;return!1}return t.Ob()}function jPn(n,t){var e,i;if(n.f){for(;t.Sb();)if(cL(i=(e=BB(t.Ub(),72)).ak(),99)&&0!=(BB(i,18).Bb&h6n)&&(!n.e||i.Gj()!=NOt||0!=i.aj())&&null!=e.dd())return t.Pb(),!0;return!1}return t.Sb()}function EPn(n,t,e){var i,r,c,a,u,o;for(o=axn(n.e.Tg(),t),i=0,u=n.i,r=BB(n.g,119),a=0;a1&&(t.c[t.c.length]=c)}function SPn(n){var t,e,i;for(Frn(e=new JT,n.o),i=new om;0!=e.b;)WUn(n,t=BB(0==e.b?null:(Px(0!=e.b),Atn(e,e.a.a)),508),!0)&&WB(i.a,t);for(;0!=i.a.c.length;)WUn(n,t=BB(thn(i),508),!1)}function PPn(){PPn=O,kMt=new $C(hYn,0),wMt=new $C("BOOLEAN",1),vMt=new $C("INT",2),yMt=new $C("STRING",3),dMt=new $C("DOUBLE",4),gMt=new $C("ENUM",5),pMt=new $C("ENUMSET",6),mMt=new $C("OBJECT",7)}function CPn(n,t){var i,r,c,a,u;r=e.Math.min(n.c,t.c),a=e.Math.min(n.d,t.d),(c=e.Math.max(n.c+n.b,t.c+t.b))=(r/2|0))for(this.e=i?i.c:null,this.d=r;e++0;)EZ(this);this.b=t,this.a=null}function _Pn(n,t){var e,i;t.a?zNn(n,t):(!!(e=BB(kK(n.b,t.b),57))&&e==n.a[t.b.f]&&!!e.a&&e.a!=t.b.a&&e.c.Fc(t.b),!!(i=BB(yK(n.b,t.b),57))&&n.a[i.f]==t.b&&!!i.a&&i.a!=t.b.a&&t.b.c.Fc(i),MN(n.b,t.b))}function FPn(n,t){var e,i;if(e=BB(oV(n.b,t),124),BB(BB(h6(n.r,t),21),84).dc())return e.n.b=0,void(e.n.c=0);e.n.b=n.C.b,e.n.c=n.C.c,n.A.Hc((mdn(),_It))&&yRn(n,t),i=Xpn(n,t),PDn(n,t)==(cpn(),BCt)&&(i+=2*n.w),e.a.a=i}function BPn(n,t){var e,i;if(e=BB(oV(n.b,t),124),BB(BB(h6(n.r,t),21),84).dc())return e.n.d=0,void(e.n.a=0);e.n.d=n.C.d,e.n.a=n.C.a,n.A.Hc((mdn(),_It))&&kRn(n,t),i=Wpn(n,t),PDn(n,t)==(cpn(),BCt)&&(i+=2*n.w),e.a.b=i}function HPn(n,t){var e,i,r,c;for(c=new Np,i=new Wb(t);i.ae.a&&(i.Hc((wEn(),WMt))?r=(t.a-e.a)/2:i.Hc(QMt)&&(r=t.a-e.a)),t.b>e.b&&(i.Hc((wEn(),YMt))?c=(t.b-e.b)/2:i.Hc(JMt)&&(c=t.b-e.b)),lMn(n,r,c)}function bCn(n,t,e,i,r,c,a,u,o,s,h,f,l){cL(n.Cb,88)&&ACn(P5(BB(n.Cb,88)),4),Nrn(n,e),n.f=a,$ln(n,u),Nln(n,o),Aln(n,s),Lln(n,h),nln(n,f),qln(n,l),Jfn(n,!0),Len(n,r),n.ok(c),Ihn(n,t),null!=i&&(n.i=null,arn(n,i))}function wCn(n){var t,e;if(n.f){for(;n.n>0;){if(cL(e=(t=BB(n.k.Xb(n.n-1),72)).ak(),99)&&0!=(BB(e,18).Bb&h6n)&&(!n.e||e.Gj()!=NOt||0!=e.aj())&&null!=t.dd())return!0;--n.n}return!1}return n.n>0}function dCn(n,t,e){if(n<0)return $Rn(BWn,Pun(Gk(Ant,1),HWn,1,5,[e,iln(n)]));if(t<0)throw Hp(new _y(qWn+t));return $Rn("%s (%s) must not be greater than size (%s)",Pun(Gk(Ant,1),HWn,1,5,[e,iln(n),iln(t)]))}function gCn(n,t,e,i,r,c){var a,u,o;if(i-e<7)$bn(t,e,i,c);else if(gCn(t,n,u=e+r,o=u+((a=i+r)-u>>1),-r,c),gCn(t,n,o,a,-r,c),c.ue(n[o-1],n[o])<=0)for(;e=0?n.sh(c,e):TLn(n,r,e)}else Lbn(n,i,r,e)}function kCn(n){var t,e,i,r;if(e=BB(n,49).qh())try{if(i=null,(t=$$n((WM(),zAt),M_n(_bn(e))))&&(r=t.rh())&&(i=r.Wk(Xy(e.e))),i&&i!=n)return kCn(i)}catch(c){if(!cL(c=lun(c),60))throw Hp(c)}return n}function jCn(n,t,e){var i,r,c,a;if(a=null==t?0:n.b.se(t),0==(r=null==(i=n.a.get(a))?new Array:i).length)n.a.set(a,r);else if(c=hhn(n,t,r))return c.ed(e);return $X(r,r.length,new PS(t,e)),++n.c,oJ(n.b),null}function ECn(n,t){var e;return h2(n.a),CU(n.a,(Prn(),Qkt),Qkt),CU(n.a,Jkt,Jkt),dq(e=new B2,Jkt,(Cbn(),ejt)),GI(ZAn(t,(Uyn(),Sjt)))!==GI((Hsn(),sjt))&&dq(e,Jkt,njt),dq(e,Jkt,tjt),aA(n.a,e),$qn(n.a,t)}function TCn(n){if(!n)return lk(),htt;var t=n.valueOf?n.valueOf():n;if(t!==n){var i=ftt[typeof t];return i?i(t):khn(typeof t)}return n instanceof Array||n instanceof e.Array?new Tl(n):new Pl(n)}function MCn(n,t,i){var r,c,a;switch(a=n.o,(c=(r=BB(oV(n.p,i),244)).i).b=SIn(r),c.a=MIn(r),c.b=e.Math.max(c.b,a.a),c.b>a.a&&!t&&(c.b=a.a),c.c=-(c.b-a.a)/2,i.g){case 1:c.d=-c.a;break;case 3:c.d=a.b}_Fn(r),GFn(r)}function SCn(n,t,i){var r,c,a;switch(a=n.o,(c=(r=BB(oV(n.p,i),244)).i).b=SIn(r),c.a=MIn(r),c.a=e.Math.max(c.a,a.b),c.a>a.b&&!t&&(c.a=a.b),c.d=-(c.a-a.b)/2,i.g){case 4:c.c=-c.b;break;case 2:c.c=a.a}_Fn(r),GFn(r)}function PCn(n,t){var e,i,r,c,a;if(!t.dc())if(r=BB(t.Xb(0),128),1!=t.gc())for(e=1;e0)try{i=l_n(t,_Vn,DWn)}catch(r){throw cL(r=lun(r),127)?Hp(new L7(r)):Hp(r)}return!n.a&&(n.a=new Sp(n)),i<(e=n.a).i&&i>=0?BB(Wtn(e,i),56):null}function LCn(n,t){if(n<0)return $Rn(BWn,Pun(Gk(Ant,1),HWn,1,5,["index",iln(n)]));if(t<0)throw Hp(new _y(qWn+t));return $Rn("%s (%s) must be less than size (%s)",Pun(Gk(Ant,1),HWn,1,5,["index",iln(n),iln(t)]))}function NCn(n){var t,e,i,r,c;if(null==n)return zWn;for(c=new $an(FWn,"[","]"),i=0,r=(e=n).length;i0)for(a=n.c.d,r=kL(XR(new xC((u=n.d.d).a,u.b),a),1/(i+1)),c=new xC(a.a,a.b),e=new Wb(n.a);e.a=0?n._g(e,!0,!0):cOn(n,r,!0),153),BB(i,215).ol(t)}function aIn(n){var t,i;return n>-0x800000000000&&n<0x800000000000?0==n?0:((t=n<0)&&(n=-n),i=CY(e.Math.floor(e.Math.log(n)/.6931471805599453)),(!t||n!=e.Math.pow(2,i))&&++i,i):Van(fan(n))}function uIn(n){var t,e,i,r,c,a,u;for(c=new fA,e=new Wb(n);e.a2&&u.e.b+u.j.b<=2&&(r=u,i=a),c.a.zc(r,c),r.q=i);return c}function oIn(n,t){var e,i,r;return qan(i=new $vn(n),t),hon(i,(hWn(),Vft),t),hon(i,(HXn(),ept),(QEn(),XCt)),hon(i,kdt,(wvn(),OMt)),Bl(i,(uSn(),Mut)),CZ(e=new CSn,i),qCn(e,(kUn(),CIt)),CZ(r=new CSn,i),qCn(r,oIt),i}function sIn(n){switch(n.g){case 0:return new Ny((oin(),Omt));case 1:return new df;case 2:return new jf;default:throw Hp(new _y("No implementation is available for the crossing minimizer "+(null!=n.f?n.f:""+n.g)))}}function hIn(n,t){var e,i,r,c;for(n.c[t.p]=!0,WB(n.a,t),c=new Wb(t.j);c.a=(c=a.gc()))a.$b();else for(r=a.Kc(),i=0;i0?wk():c<0&&EIn(n,t,-c),!0)}function MIn(n){var t,e,i,r,c,a;if(a=0,0==n.b){for(t=0,r=0,c=(i=Xvn(n,!0)).length;r0&&(a+=e,++t);t>1&&(a+=n.c*(t-1))}else a=Kk(ecn(LV(AV(LU(n.a),new Mn),new Sn)));return a>0?a+n.n.d+n.n.a:0}function SIn(n){var t,e,i,r,c,a;if(a=0,0==n.b)a=Kk(ecn(LV(AV(LU(n.a),new En),new Tn)));else{for(t=0,r=0,c=(i=Wvn(n,!0)).length;r0&&(a+=e,++t);t>1&&(a+=n.c*(t-1))}return a>0?a+n.n.b+n.n.c:0}function PIn(n,t){var i,r,c,a;for(i=(a=BB(oV(n.b,t),124)).a,c=BB(BB(h6(n.r,t),21),84).Kc();c.Ob();)(r=BB(c.Pb(),111)).c&&(i.a=e.Math.max(i.a,VH(r.c)));if(i.a>0)switch(t.g){case 2:a.n.c=n.s;break;case 4:a.n.b=n.s}}function CIn(n,t){var e,i,r;return 0==(e=BB(mMn(t,(fRn(),Zct)),19).a-BB(mMn(n,Zct),19).a)?(i=XR(B$(BB(mMn(n,(Mrn(),uat)),8)),BB(mMn(n,oat),8)),r=XR(B$(BB(mMn(t,uat),8)),BB(mMn(t,oat),8)),Pln(i.a*i.b,r.a*r.b)):e}function IIn(n,t){var e,i,r;return 0==(e=BB(mMn(t,(CAn(),$kt)),19).a-BB(mMn(n,$kt),19).a)?(i=XR(B$(BB(mMn(n,(qqn(),Zyt)),8)),BB(mMn(n,nkt),8)),r=XR(B$(BB(mMn(t,Zyt),8)),BB(mMn(t,nkt),8)),Pln(i.a*i.b,r.a*r.b)):e}function OIn(n){var t,e;return(e=new Ck).a+="e_",null!=(t=Xan(n))&&(e.a+=""+t),n.c&&n.d&&(oO((e.a+=" ",e),pyn(n.c)),oO(uO((e.a+="[",e),n.c.i),"]"),oO((e.a+=e1n,e),pyn(n.d)),oO(uO((e.a+="[",e),n.d.i),"]")),e.a}function AIn(n){switch(n.g){case 0:return new pf;case 1:return new vf;case 2:return new gf;case 3:return new mf;default:throw Hp(new _y("No implementation is available for the layout phase "+(null!=n.f?n.f:""+n.g)))}}function $In(n,t,i,r,c){var a;switch(a=0,c.g){case 1:a=e.Math.max(0,t.b+n.b-(i.b+r));break;case 3:a=e.Math.max(0,-n.b-r);break;case 2:a=e.Math.max(0,-n.a-r);break;case 4:a=e.Math.max(0,t.a+n.a-(i.a+r))}return a}function LIn(n,t,e){var i,r,c;if(e)for(c=((i=new hz(e.a.length)).b-i.a)*i.c<0?(eS(),MNt):new XL(i);c.Ob();)r=x2(e,BB(c.Pb(),19).a),L6n in r.a||N6n in r.a?sKn(n,r,t):EXn(n,r,t),PL(BB(RX(n.b,Qdn(r)),79))}function NIn(n){var t,e;switch(n.b){case-1:return!0;case 0:return(e=n.t)>1||-1==e||(t=Ikn(n))&&(ZM(),t.Cj()==E9n)?(n.b=-1,!0):(n.b=1,!1);default:return!1}}function xIn(n,t){var e,i,r,c,a;for(!t.s&&(t.s=new eU(FAt,t,21,17)),c=null,r=0,a=(i=t.s).i;r=0&&i=0?n._g(e,!0,!0):cOn(n,r,!0),153),BB(i,215).ll(t);throw Hp(new _y(r6n+t.ne()+u6n))}function GIn(){var n;return tS(),Q$t?BB($$n((WM(),zAt),V9n),1939):(RO(Hnt,new Cs),nzn(),n=BB(cL(SY((WM(),zAt),V9n),547)?SY(zAt,V9n):new UW,547),Q$t=!0,oWn(n),TWn(n),VW((VM(),ZAt),n,new Go),mZ(zAt,V9n,n),n)}function zIn(n,t){var e,i,r,c;n.j=-1,mA(n.e)?(e=n.i,c=0!=n.i,c6(n,t),i=new N7(n.e,3,n.c,null,t,e,c),r=t.Qk(n.e,n.c,null),(r=IEn(n,t,r))?(r.Ei(i),r.Fi()):ban(n.e,i)):(c6(n,t),(r=t.Qk(n.e,n.c,null))&&r.Fi())}function UIn(n,t){var e,i,r;if(r=0,(i=t[0])>=n.length)return-1;for(b1(i,n.length),e=n.charCodeAt(i);e>=48&&e<=57&&(r=10*r+(e-48),!(++i>=n.length));)b1(i,n.length),e=n.charCodeAt(i);return i>t[0]?t[0]=i:r=-1,r}function XIn(n){var t,i,r,c,a;return i=c=BB(n.a,19).a,r=a=BB(n.b,19).a,t=e.Math.max(e.Math.abs(c),e.Math.abs(a)),c<=0&&c==a?(i=0,r=a-1):c==-t&&a!=t?(i=a,r=c,a>=0&&++i):(i=-a,r=c),new rI(iln(i),iln(r))}function WIn(n,t,e,i){var r,c,a,u,o,s;for(r=0;r=0&&s>=0&&o=n.i)throw Hp(new Ay(u8n+t+o8n+n.i));if(e>=n.i)throw Hp(new Ay(s8n+e+o8n+n.i));return i=n.g[e],t!=e&&(t>16))>>16&16),e+=t=(i=(n>>=t)-256)>>16&8,e+=t=(i=(n<<=t)-_Qn)>>16&4,(e+=t=(i=(n<<=t)-hVn)>>16&2)+2-(t=(i=(n<<=t)>>14)&~(i>>1)))}function nOn(n){var t,e,i,r;for(MQ(),Sct=new Np,Mct=new xp,Tct=new Np,!n.a&&(n.a=new eU(UOt,n,10,11)),xUn(t=n.a),r=new AL(t);r.e!=r.i.gc();)i=BB(kpn(r),33),-1==E7(Sct,i,0)&&(e=new Np,WB(Tct,e),Rgn(i,e));return Tct}function tOn(n,t,e){var i,r,c,a;n.a=e.b.d,cL(t,352)?(e5(c=qSn(r=cDn(BB(t,79),!1,!1)),i=new Nw(n)),VFn(c,r),null!=t.We((sWn(),OSt))&&e5(BB(t.We(OSt),74),i)):((a=BB(t,470)).Hg(a.Dg()+n.a.a),a.Ig(a.Eg()+n.a.b))}function eOn(n,t){var i,r,c,a,u,o,s,h;for(h=Gy(MD(mMn(t,(HXn(),Npt)))),s=n[0].n.a+n[0].o.a+n[0].d.c+h,o=1;o=0?e:(u=lW(XR(new xC(a.c+a.b/2,a.d+a.a/2),new xC(c.c+c.b/2,c.d+c.a/2))),-(J_n(c,a)-1)*u)}function rOn(n,t,e){var i;YT(new Rq(null,(!e.a&&(e.a=new eU(FOt,e,6,6)),new w1(e.a,16))),new eI(n,t)),YT(new Rq(null,(!e.n&&(e.n=new eU(zOt,e,1,7)),new w1(e.n,16))),new iI(n,t)),(i=BB(ZAn(e,(sWn(),OSt)),74))&&Jrn(i,n,t)}function cOn(n,t,e){var i,r,c;if(c=Fqn((IPn(),Z$t),n.Tg(),t))return ZM(),BB(c,66).Oj()||(c=Z1(B7(Z$t,c))),r=BB((i=n.Yg(c))>=0?n._g(i,!0,!0):cOn(n,c,!0),153),BB(r,215).hl(t,e);throw Hp(new _y(r6n+t.ne()+u6n))}function aOn(n,t,e,i){var r,c,a,u,o;if(r=n.d[t])if(c=r.g,o=r.i,null!=i){for(u=0;u=e&&(i=t,c=(o=(u.c+u.a)/2)-e,u.c<=o-e&&kG(n,i++,new kB(u.c,c)),(a=o+e)<=u.a&&(r=new kB(a,u.a),LZ(i,n.c.length),MS(n.c,i,r)))}function bOn(n){var t;if(n.c||null!=n.g){if(null==n.g)return!0;if(0==n.i)return!1;t=BB(n.g[n.i-1],47)}else n.d=n.si(n.f),f9(n,n.d),t=n.d;return t==n.b&&null.km>=null.jm()?(aLn(n),bOn(n)):t.Ob()}function wOn(n,t,e){var i,r,c,a;if(!(a=e)&&(a=LH(new Xm,0)),OTn(a,qZn,1),$Gn(n.c,t),1==(c=RGn(n.a,t)).gc())VHn(BB(c.Xb(0),37),a);else for(r=1/c.gc(),i=c.Kc();i.Ob();)VHn(BB(i.Pb(),37),mcn(a,r));Ek(n.a,c,t),FDn(t),HSn(a)}function dOn(n){if(this.a=n,n.c.i.k==(uSn(),Mut))this.c=n.c,this.d=BB(mMn(n.c.i,(hWn(),Qft)),61);else{if(n.d.i.k!=Mut)throw Hp(new _y("Edge "+n+" is not an external edge."));this.c=n.d,this.d=BB(mMn(n.d.i,(hWn(),Qft)),61)}}function gOn(n,t){var e,i,r;r=n.b,n.b=t,0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,3,r,n.b)),t?t!=n&&(Nrn(n,t.zb),$en(n,t.d),Fin(n,null==(e=null==(i=t.c)?t.zb:i)||mK(e,t.zb)?null:e)):(Nrn(n,null),$en(n,0),Fin(n,null))}function pOn(n){var t,e;if(n.f){for(;n.n=(a=null==(e=BB(yan(n.a,4),126))?0:e.length))throw Hp(new tK(t,a));return r=e[t],1==a?i=null:(aHn(e,0,i=x8(dAt,i9n,415,a-1,0,1),0,t),(c=a-t-1)>0&&aHn(e,t+1,i,t,c)),Fgn(n,i),eCn(n,t,r),r}function TOn(){TOn=O,lLt=BB(Wtn(QQ((cE(),gLt).qb),6),34),sLt=BB(Wtn(QQ(gLt.qb),3),34),hLt=BB(Wtn(QQ(gLt.qb),4),34),fLt=BB(Wtn(QQ(gLt.qb),5),18),oEn(lLt),oEn(sLt),oEn(hLt),oEn(fLt),bLt=new Yy(Pun(Gk(FAt,1),N9n,170,0,[lLt,sLt]))}function MOn(n,t){var e;this.d=new lm,this.b=t,this.e=new wA(t.qf()),e=n.u.Hc((lIn(),iIt)),n.u.Hc(eIt)?n.D?this.a=e&&!t.If():this.a=!0:n.u.Hc(rIt)?this.a=!!e&&!(t.zf().Kc().Ob()||t.Bf().Kc().Ob()):this.a=!1}function SOn(n,t){var e,i,r,c;for(e=n.o.a,c=BB(BB(h6(n.r,t),21),84).Kc();c.Ob();)(r=BB(c.Pb(),111)).e.a=(i=r.b).Xe((sWn(),aPt))?i.Hf()==(kUn(),CIt)?-i.rf().a-Gy(MD(i.We(aPt))):e+Gy(MD(i.We(aPt))):i.Hf()==(kUn(),CIt)?-i.rf().a:e}function POn(n,t){var e,i,r;e=BB(mMn(n,(HXn(),Udt)),103),r=BB(ZAn(t,upt),61),(i=BB(mMn(n,ept),98))!=(QEn(),QCt)&&i!=JCt?r==(kUn(),PIt)&&(r=OFn(t,e))==PIt&&(r=hwn(e)):r=XHn(t)>0?hwn(e):Tln(hwn(e)),Jpn(t,upt,r)}function COn(n,t){var e,i,r,c,a;for(a=n.j,t.a!=t.b&&m$(a,new Ur),r=a.c.length/2|0,i=0;i0&&uKn(n,e,t),c):null!=i.a?(uKn(n,t,e),-1):null!=r.a?(uKn(n,e,t),1):0}function OOn(n,t){var e,i,r,c;n.ej()?(e=n.Vi(),c=n.fj(),++n.j,n.Hi(e,n.oi(e,t)),i=n.Zi(3,null,t,e,c),n.bj()&&(r=n.cj(t,null))?(r.Ei(i),r.Fi()):n.$i(i)):(eW(n,t),n.bj()&&(r=n.cj(t,null))&&r.Fi())}function AOn(n,t){var e,i,r,c,a;for(a=axn(n.e.Tg(),t),r=new go,e=BB(n.g,119),c=n.i;--c>=0;)i=e[c],a.rl(i.ak())&&f9(r,i);!aXn(n,r)&&mA(n.e)&&Lv(n,t.$j()?LJ(n,6,t,(SQ(),set),null,-1,!1):LJ(n,t.Kj()?2:1,t,null,null,-1,!1))}function $On(){var n,t;for($On=O,aet=x8(oet,sVn,91,32,0,1),uet=x8(oet,sVn,91,32,0,1),n=1,t=0;t<=18;t++)aet[t]=npn(n),uet[t]=npn(yz(n,t)),n=cbn(n,5);for(;tc)||t.q&&(c=(i=t.C).c.c.a-i.o.a/2,i.n.a-e>c)))}function NOn(n,t){OTn(t,"Partition preprocessing",1),YT(BB(P4(AV(wnn(AV(new Rq(null,new w1(n.a,16)),new vi),new mi),new yi),m9(new H,new B,new rn,Pun(Gk(nit,1),$Vn,132,0,[(qsn(),Uet)]))),15).Oc(),new ki),HSn(t)}function xOn(n){var t,e,i,r,c,a;for(qZ(),e=new v4,i=new Wb(n.e.b);i.a1?n.e*=Gy(n.a):n.f/=Gy(n.a),Chn(n),ggn(n),TRn(n),hon(n.b,(Epn(),gct),n.g)}function HOn(n,t,e){var i,r,c,a,u;for(i=0,u=e,t||(i=e*(n.c.length-1),u*=-1),c=new Wb(n);c.a=0?(t||(t=new Pk,i>0&&cO(t,n.substr(0,i))),t.a+="\\",NX(t,e&QVn)):t&&NX(t,e&QVn);return t?t.a:n}function rAn(n){var t;if(!n.a)throw Hp(new Fy("IDataType class expected for layout option "+n.f));if(null==(t=I3(n.a)))throw Hp(new Fy("Couldn't create new instance of property '"+n.f+"'. "+r5n+(ED(bAt),bAt.k)+c5n));return BB(t,414)}function cAn(n){var t,e,i,r,c;return(c=n.eh())&&c.kh()&&(r=tfn(n,c))!=c?(e=n.Vg(),i=(t=n.Vg())>=0?n.Qg(null):n.eh().ih(n,-1-t,null,null),n.Rg(BB(r,49),e),i&&i.Fi(),n.Lg()&&n.Mg()&&e>-1&&ban(n,new nU(n,9,e,c,r)),r):c}function aAn(n){var t,e,i,r,c,a,u;for(c=0,r=n.f.e,e=0;e>5)>=n.d)return n.e<0;if(e=n.a[r],t=1<<(31&t),n.e<0){if(r<(i=Ccn(n)))return!1;e=i==r?-e:~e}return 0!=(e&t)}function lAn(n,t,e,i){var r;BB(e.b,65),BB(e.b,65),BB(i.b,65),BB(i.b,65),NH(r=XR(B$(BB(e.b,65).c),BB(i.b,65).c),HCn(BB(e.b,65),BB(i.b,65),r)),BB(i.b,65),BB(i.b,65),BB(i.b,65).c.a,r.a,BB(i.b,65).c.b,r.b,BB(i.b,65),Otn(i.a,new TB(n,t,i))}function bAn(n,t){var e,i,r,c,a,u,o;if(c=t.e)for(e=cAn(c),i=BB(n.g,674),a=0;a>16)),15).Xc(c))0&&((!dA(n.a.c)||!t.n.d)&&(!gA(n.a.c)||!t.n.b)&&(t.g.d+=e.Math.max(0,r/2-.5)),(!dA(n.a.c)||!t.n.a)&&(!gA(n.a.c)||!t.n.c)&&(t.g.a-=r-1))}function mAn(n){var t,i,r,c,a;if(a=K_n(n,c=new Np),t=BB(mMn(n,(hWn(),Elt)),10))for(r=new Wb(t.j);r.a>t,c=n.m>>t|e<<22-t,r=n.l>>t|n.m<<22-t):t<44?(a=i?PQn:0,c=e>>t-22,r=n.m>>t-22|e<<44-t):(a=i?PQn:0,c=i?SQn:0,r=e>>t-44),M$(r&SQn,c&SQn,a&PQn)}function EAn(n){var t,i,r,c,a,u;for(this.c=new Np,this.d=n,r=RQn,c=RQn,t=KQn,i=KQn,u=spn(n,0);u.b!=u.d.c;)a=BB(b3(u),8),r=e.Math.min(r,a.a),c=e.Math.min(c,a.b),t=e.Math.max(t,a.a),i=e.Math.max(i,a.b);this.a=new UV(r,c,t-r,i-c)}function TAn(n,t){var e,i,r,c;for(i=new Wb(n.b);i.a0&&cL(t,42)&&(n.a.qj(),c=null==(o=(s=BB(t,42)).cd())?0:nsn(o),a=eR(n.a,c),e=n.a.d[a]))for(i=BB(e.g,367),h=e.i,u=0;u=2)for(t=MD((i=c.Kc()).Pb());i.Ob();)a=t,t=MD(i.Pb()),r=e.Math.min(r,(kW(t),t-(kW(a),a)));return r}function HAn(n,t){var e,i,r,c,a;r5(i=new JT,t,i.c.b,i.c);do{for(Px(0!=i.b),e=BB(Atn(i,i.a.a),86),n.b[e.g]=1,c=spn(e.d,0);c.b!=c.d.c;)a=(r=BB(b3(c),188)).c,1==n.b[a.g]?DH(n.a,r):2==n.b[a.g]?n.b[a.g]=1:r5(i,a,i.c.b,i.c)}while(0!=i.b)}function qAn(n,t){var e,i,r;if(GI(t)===GI(yX(n)))return!0;if(!cL(t,15))return!1;if(i=BB(t,15),(r=n.gc())!=i.gc())return!1;if(cL(i,54)){for(e=0;e0&&(r=e),a=new Wb(n.f.e);a.a0?(t-=1,e-=1):i>=0&&r<0?(t+=1,e+=1):i>0&&r>=0?(t-=1,e+=1):(t+=1,e-=1),new rI(iln(t),iln(e))}function l$n(n,t){return n.ct.c?1:n.bt.b?1:n.a!=t.a?nsn(n.a)-nsn(t.a):n.d==(Q4(),Hmt)&&t.d==Bmt?-1:n.d==Bmt&&t.d==Hmt?1:0}function b$n(n,t){var e,i,r,c,a;return a=(c=t.a).c.i==t.b?c.d:c.c,i=c.c.i==t.b?c.c:c.d,(r=zwn(n.a,a,i))>0&&r0):r<0&&-r0)}function w$n(n,t,e,i){var r,c,a,u,o,s;for(r=(t-n.d)/n.c.c.length,c=0,n.a+=e,n.d=t,s=new Wb(n.c);s.a>24;return a}function g$n(n){if(n.pe()){var t=n.c;return t.qe()?n.o="["+t.n:t.pe()?n.o="["+t.ne():n.o="[L"+t.ne()+";",n.b=t.me()+"[]",void(n.k=t.oe()+"[]")}var e=n.j,i=n.d;i=i.split("/"),n.o=Fdn(".",[e,Fdn("$",i)]),n.b=Fdn(".",[e,Fdn(".",i)]),n.k=i[i.length-1]}function p$n(n,t){var e,i,r,c,a;for(a=null,c=new Wb(n.e.a);c.a=0;t-=2)for(e=0;e<=t;e+=2)(n.b[e]>n.b[e+2]||n.b[e]===n.b[e+2]&&n.b[e+1]>n.b[e+3])&&(i=n.b[e+2],n.b[e+2]=n.b[e],n.b[e]=i,i=n.b[e+3],n.b[e+3]=n.b[e+1],n.b[e+1]=i);n.c=!0}}function M$n(n,t){var e,i,r,c,a,u;for(c=(1==t?Wat:Xat).a.ec().Kc();c.Ob();)for(r=BB(c.Pb(),103),u=BB(h6(n.f.c,r),21).Kc();u.Ob();)switch(a=BB(u.Pb(),46),i=BB(a.b,81),e=BB(a.a,189).c,r.g){case 2:case 1:i.g.d+=e;break;case 4:case 3:i.g.c+=e}}function S$n(n,t){var e,i,r,c,a,u,o,s,h;for(s=-1,h=0,u=0,o=(a=n).length;u0&&++h;++s}return h}function P$n(n){var t;return(t=new lN(nE(n.gm))).a+="@",oO(t,(nsn(n)>>>0).toString(16)),n.kh()?(t.a+=" (eProxyURI: ",uO(t,n.qh()),n.$g()&&(t.a+=" eClass: ",uO(t,n.$g())),t.a+=")"):n.$g()&&(t.a+=" (eClass: ",uO(t,n.$g()),t.a+=")"),t.a}function C$n(n){var t,e,i;if(n.e)throw Hp(new Fy((ED(git),AJn+git.k+$Jn)));for(n.d==(Ffn(),BPt)&&Tzn(n,_Pt),e=new Wb(n.a.a);e.a>24}return e}function N$n(n,t,e){var i,r,c;if(!(r=BB(oV(n.i,t),306)))if(r=new wtn(n.d,t,e),mG(n.i,t,r),agn(t))EL(n.a,t.c,t.b,r);else switch(c=LPn(t),i=BB(oV(n.p,c),244),c.g){case 1:case 3:r.j=!0,jy(i,t.b,r);break;case 4:case 2:r.k=!0,jy(i,t.c,r)}return r}function x$n(n,t,e,i){var r,c,a,u,o,s;if(u=new go,o=axn(n.e.Tg(),t),r=BB(n.g,119),ZM(),BB(t,66).Oj())for(a=0;a=0)return r;for(c=1,a=new Wb(t.j);a.a0&&t.ue((l1(r-1,n.c.length),BB(n.c[r-1],10)),c)>0;)c5(n,r,(l1(r-1,n.c.length),BB(n.c[r-1],10))),--r;l1(r,n.c.length),n.c[r]=c}e.a=new xp,e.b=new xp}function K$n(n,t,e){var i,r,c,a,u,o,s;for(s=new JK(i=BB(t.e&&t.e(),9),BB(SR(i,i.length),9),0),a=0,u=(c=kKn(e,"[\\[\\]\\s,]+")).length;a0&&((!dA(n.a.c)||!t.n.d)&&(!gA(n.a.c)||!t.n.b)&&(t.g.d-=e.Math.max(0,r/2-.5)),(!dA(n.a.c)||!t.n.a)&&(!gA(n.a.c)||!t.n.c)&&(t.g.a+=e.Math.max(0,r-1)))}function F$n(n,t,e){var i;if(2==(n.c-n.b&n.a.length-1))t==(kUn(),sIt)||t==oIt?(jtn(BB(Eon(n),15),(Xyn(),jCt)),jtn(BB(Eon(n),15),ECt)):(jtn(BB(Eon(n),15),(Xyn(),ECt)),jtn(BB(Eon(n),15),jCt));else for(i=new bV(n);i.a!=i.b;)jtn(BB(_hn(i),15),e)}function B$n(n,t){var e,i,r,c,a,u;for(a=new M2(i=HB(new sp(n)),i.c.length),u=new M2(r=HB(new sp(t)),r.c.length),c=null;a.b>0&&u.b>0&&(Px(a.b>0),e=BB(a.a.Xb(a.c=--a.b),33),Px(u.b>0),e==BB(u.a.Xb(u.c=--u.b),33));)c=e;return c}function H$n(n,t){var i,r,c,a;return c=n.a*aJn+1502*n.b,a=n.b*aJn+11,c+=i=e.Math.floor(a*uJn),a-=i*oJn,c%=oJn,n.a=c,n.b=a,t<=24?e.Math.floor(n.a*Oet[t]):((r=n.a*(1<=2147483648&&(r-=XQn),r)}function q$n(n,t,e){var i,r,c,a;w0(n,t)>w0(n,e)?(i=abn(e,(kUn(),oIt)),n.d=i.dc()?0:uq(BB(i.Xb(0),11)),a=abn(t,CIt),n.b=a.dc()?0:uq(BB(a.Xb(0),11))):(r=abn(e,(kUn(),CIt)),n.d=r.dc()?0:uq(BB(r.Xb(0),11)),c=abn(t,oIt),n.b=c.dc()?0:uq(BB(c.Xb(0),11)))}function G$n(n){var t,e,i,r,c,a,u;if(n&&(t=n.Hh(V9n))&&null!=(a=SD(cdn((!t.b&&(t.b=new Yx((gWn(),k$t),X$t,t)),t.b),"conversionDelegates")))){for(u=new Np,r=0,c=(i=kKn(a,"\\w+")).length;rn.c));a++)r.a>=n.s&&(c<0&&(c=a),u=a);return o=(n.s+n.c)/2,c>=0&&(o=qM((l1(i=JRn(n,t,c,u),t.c.length),BB(t.c[i],329))),lOn(t,i,e)),o}function W$n(){W$n=O,lEt=new XA((sWn(),cSt),1.3),gEt=jSt,IEt=new WA(15),CEt=new XA(XSt,IEt),$Et=new XA(LPt,15),bEt=hSt,jEt=KSt,EEt=BSt,TEt=qSt,kEt=DSt,MEt=USt,OEt=fPt,$An(),PEt=oEt,yEt=aEt,SEt=uEt,AEt=hEt,pEt=cEt,vEt=CSt,mEt=ISt,dEt=rEt,wEt=iEt,LEt=fEt}function V$n(n,t,e){var i,r,c,a,u;for(Bin(r=new jo,(kW(t),t)),!r.b&&(r.b=new Yx((gWn(),k$t),X$t,r)),u=r.b,a=1;a0&&xqn(this,r)}function J$n(n,t,e,i,r,c){var a,u,o;if(!r[t.b]){for(r[t.b]=!0,!(a=i)&&(a=new y6),WB(a.e,t),o=c[t.b].Kc();o.Ob();)(u=BB(o.Pb(),282)).d!=e&&u.c!=e&&(u.c!=t&&J$n(n,u.c,t,a,r,c),u.d!=t&&J$n(n,u.d,t,a,r,c),WB(a.c,u),gun(a.d,u.b));return a}return null}function Y$n(n){var t,e,i;for(t=0,e=new Wb(n.e);e.a=2}function Z$n(n,t){var e,i,r,c;for(OTn(t,"Self-Loop pre-processing",1),i=new Wb(n.a);i.a1||Can(OY(EG(ICt,Pun(Gk(GCt,1),$Vn,93,0,[CCt,ACt])),n))>1||Can(OY(EG(DCt,Pun(Gk(GCt,1),$Vn,93,0,[xCt,NCt])),n))>1)}function eLn(n,t){var e,i,r;return(e=t.Hh(n.a))&&null!=(r=SD(cdn((!e.b&&(e.b=new Yx((gWn(),k$t),X$t,e)),e.b),"affiliation")))?-1==(i=mN(r,JTn(35)))?uln(n,az(n,Utn(t.Hj())),r):0==i?uln(n,null,r.substr(1)):uln(n,r.substr(0,i),r.substr(i+1)):null}function iLn(n){var t,e;try{return null==n?zWn:Bbn(n)}catch(i){if(cL(i=lun(i),102))return t=i,e=nE(tsn(n))+"@"+($T(),(evn(n)>>>0).toString(16)),Kgn(jun(),(lM(),"Exception during lenientFormat for "+e),t),"<"+e+" threw "+nE(t.gm)+">";throw Hp(i)}}function rLn(n){switch(n.g){case 0:return new of;case 1:return new ef;case 2:return new $M;case 3:return new Ic;case 4:return new RR;case 5:return new sf;default:throw Hp(new _y("No implementation is available for the layerer "+(null!=n.f?n.f:""+n.g)))}}function cLn(n,t,e){var i,r,c;for(c=new Wb(n.t);c.a0&&(i.b.n-=i.c,i.b.n<=0&&i.b.u>0&&DH(t,i.b));for(r=new Wb(n.i);r.a0&&(i.a.u-=i.c,i.a.u<=0&&i.a.n>0&&DH(e,i.a))}function aLn(n){var t,e,i;if(null==n.g&&(n.d=n.si(n.f),f9(n,n.d),n.c))return n.f;if(i=(t=BB(n.g[n.i-1],47)).Pb(),n.e=t,(e=n.si(i)).Ob())n.d=e,f9(n,e);else for(n.d=null;!t.Ob()&&($X(n.g,--n.i,null),0!=n.i);)t=BB(n.g[n.i-1],47);return i}function uLn(n,t){var e,i,r,c,a,u;if(r=(i=t).ak(),$xn(n.e,r)){if(r.hi()&&G3(n,r,i.dd()))return!1}else for(u=axn(n.e.Tg(),r),e=BB(n.g,119),c=0;c1||e>1)return 2;return t+e==1?2:0}function vLn(n,t,e){var i,r,c,a;for(OTn(e,"ELK Force",1),qy(TD(ZAn(t,(fRn(),Wct))))||jY(new Tw((GM(),new Dy(t)))),kkn(a=fon(t)),zon(n,BB(mMn(a,Gct),424)),r=(c=HFn(n.a,a)).Kc();r.Ob();)i=BB(r.Pb(),231),PKn(n.b,i,mcn(e,1/c.gc()));SUn(a=GUn(c)),HSn(e)}function mLn(n,t){var e,i,r;if(OTn(t,"Breaking Point Processor",1),Ozn(n),qy(TD(mMn(n,(HXn(),Gpt))))){for(i=new Wb(n.b);i.a=0?n._g(i,!0,!0):cOn(n,c,!0),153),BB(r,215).ml(t,e)}function MLn(n,t){var e,i,r,c,a;for(e=new Np,r=wnn(new Rq(null,new w1(n,16)),new Ea),c=wnn(new Rq(null,new w1(n,16)),new Ta),a=M7(H6(LV(SNn(Pun(Gk(eit,1),HWn,833,0,[r,c])),new Ma))),i=1;i=2*t&&WB(e,new kB(a[i-1]+t,a[i]-t));return e}function SLn(n,t,e){OTn(e,"Eades radial",1),e.n&&t&&y0(e,o2(t),(Bsn(),uOt)),n.d=BB(ZAn(t,(wD(),Vkt)),33),n.c=Gy(MD(ZAn(t,(Uyn(),Djt)))),n.e=Evn(BB(ZAn(t,Rjt),293)),n.a=lwn(BB(ZAn(t,_jt),426)),n.b=qjn(BB(ZAn(t,$jt),340)),rjn(n),e.n&&t&&y0(e,o2(t),(Bsn(),uOt))}function PLn(n,t,e){var i,r,c,a,u;if(e)for(c=((i=new hz(e.a.length)).b-i.a)*i.c<0?(eS(),MNt):new XL(i);c.Ob();)(r=x2(e,BB(c.Pb(),19).a))&&($in(a=$3(n,(tE(),u=new Em,!!t&&BLn(u,t),u),r),R2(r,q6n)),STn(r,a),OCn(r,a),xon(n,r,a))}function CLn(n){var t,e,i,r;if(!n.j){if(r=new Io,null==(t=P$t).a.zc(n,t)){for(i=new AL(kJ(n));i.e!=i.i.gc();)pX(r,CLn(e=BB(kpn(i),26))),f9(r,e);t.a.Bc(n)}chn(r),n.j=new NO((BB(Wtn(QQ((QX(),t$t).o),11),18),r.i),r.g),P5(n).b&=-33}return n.j}function ILn(n){var t,e,i,r;if(null==n)return null;if(i=FBn(n,!0),r=x7n.length,mK(i.substr(i.length-r,r),x7n))if(4==(e=i.length)){if(b1(0,i.length),43==(t=i.charCodeAt(0)))return GLt;if(45==t)return qLt}else if(3==e)return GLt;return new Dv(i)}function OLn(n){var t,e,i;return 0!=((e=n.l)&e-1)||0!=((i=n.m)&i-1)||0!=((t=n.h)&t-1)||0==t&&0==i&&0==e?-1:0==t&&0==i&&0!=e?gin(e):0==t&&0!=i&&0==e?gin(i)+22:0!=t&&0==i&&0==e?gin(t)+44:-1}function ALn(n,t){var e,i,r,c;for(OTn(t,"Edge joining",1),e=qy(TD(mMn(n,(HXn(),Dpt)))),i=new Wb(n.b);i.a1)for(i=new Wb(n.a);i.a0),c.a.Xb(c.c=--c.b),yR(c,r),Px(c.b3&&Enn(n,0,t-3))}function KLn(n){var t,e,i,r;return GI(mMn(n,(HXn(),sgt)))===GI((ufn(),pCt))?!n.e&&GI(mMn(n,Rdt))!==GI((Kan(),kft)):(i=BB(mMn(n,Kdt),292),r=qy(TD(mMn(n,Hdt)))||GI(mMn(n,qdt))===GI((Oin(),sht)),t=BB(mMn(n,Ddt),19).a,e=n.a.c.length,!r&&i!=(Kan(),kft)&&(0==t||t>e))}function _Ln(n){var t,e;for(e=0;e0);e++);if(e>0&&e0);t++);return t>0&&e>16!=6&&t){if(vkn(n,t))throw Hp(new _y(w6n+ROn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?skn(n,i):n.Cb.ih(n,-1-e,null,i)),t&&(i=Npn(t,n,6,i)),(i=QD(n,t,i))&&i.Fi()}else 0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,6,t,t))}function BLn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=9&&t){if(vkn(n,t))throw Hp(new _y(w6n+URn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?fkn(n,i):n.Cb.ih(n,-1-e,null,i)),t&&(i=Npn(t,n,9,i)),(i=JD(n,t,i))&&i.Fi()}else 0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,9,t,t))}function HLn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=3&&t){if(vkn(n,t))throw Hp(new _y(w6n+lHn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?Mkn(n,i):n.Cb.ih(n,-1-e,null,i)),t&&(i=Npn(t,n,12,i)),(i=VD(n,t,i))&&i.Fi()}else 0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,3,t,t))}function qLn(n){var t,e,i,r,c;if(i=Ikn(n),null==(c=n.j)&&i)return n.$j()?null:i.zj();if(cL(i,148)){if((e=i.Aj())&&(r=e.Nh())!=n.i){if((t=BB(i,148)).Ej())try{n.g=r.Kh(t,c)}catch(a){if(!cL(a=lun(a),78))throw Hp(a);n.g=null}n.i=r}return n.g}return null}function GLn(n){var t;return WB(t=new Np,new xS(new xC(n.c,n.d),new xC(n.c+n.b,n.d))),WB(t,new xS(new xC(n.c,n.d),new xC(n.c,n.d+n.a))),WB(t,new xS(new xC(n.c+n.b,n.d+n.a),new xC(n.c+n.b,n.d))),WB(t,new xS(new xC(n.c+n.b,n.d+n.a),new xC(n.c,n.d+n.a))),t}function zLn(n,t,e,i){var r,c,a;if(a=Ajn(t,e),i.c[i.c.length]=t,-1==n.j[a.p]||2==n.j[a.p]||n.a[t.p])return i;for(n.j[a.p]=-1,c=new oz(ZL(hbn(a).a.Kc(),new h));dAn(c);)if(!b5(r=BB(U5(c),17))&&(b5(r)||r.c.i.c!=r.d.i.c)&&r!=t)return zLn(n,r,a,i);return i}function ULn(n,t,e){var i,r;for(r=t.a.ec().Kc();r.Ob();)i=BB(r.Pb(),79),!BB(RX(n.b,i),266)&&(YY(PMn(i))==YY(OMn(i))?tDn(n,i,e):PMn(i)==YY(OMn(i))?null==RX(n.c,i)&&null!=RX(n.b,OMn(i))&&rzn(n,i,e,!1):null==RX(n.d,i)&&null!=RX(n.b,PMn(i))&&rzn(n,i,e,!0))}function XLn(n,t){var e,i,r,c,a,u,o;for(r=n.Kc();r.Ob();)for(i=BB(r.Pb(),10),CZ(u=new CSn,i),qCn(u,(kUn(),oIt)),hon(u,(hWn(),jlt),(hN(),!0)),a=t.Kc();a.Ob();)c=BB(a.Pb(),10),CZ(o=new CSn,c),qCn(o,CIt),hon(o,jlt,!0),hon(e=new wJ,jlt,!0),SZ(e,u),MZ(e,o)}function WLn(n,t,e,i){var r,c,a,u;r=Adn(n,t,e),c=Adn(n,e,t),a=BB(RX(n.c,t),112),u=BB(RX(n.c,e),112),ri.b.g&&(c.c[c.c.length]=i);return c}function JLn(){JLn=O,DEt=new jC("CANDIDATE_POSITION_LAST_PLACED_RIGHT",0),xEt=new jC("CANDIDATE_POSITION_LAST_PLACED_BELOW",1),KEt=new jC("CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT",2),REt=new jC("CANDIDATE_POSITION_WHOLE_DRAWING_BELOW",3),_Et=new jC("WHOLE_DRAWING",4)}function YLn(n,t){if(cL(t,239))return hln(n,BB(t,33));if(cL(t,186))return Dln(n,BB(t,118));if(cL(t,354))return tQ(n,BB(t,137));if(cL(t,352))return YFn(n,BB(t,79));if(t)return null;throw Hp(new _y(z6n+LMn(new Yy(Pun(Gk(Ant,1),HWn,1,5,[t])))))}function ZLn(n){var t,e,i,r,c,a,u;for(c=new JT,r=new Wb(n.d.a);r.a1)for(t=AN((e=new qv,++n.b,e),n.d),u=spn(c,0);u.b!=u.d.c;)a=BB(b3(u),121),UNn(aM(cM(uM(rM(new Hv,1),0),t),a))}function nNn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=11&&t){if(vkn(n,t))throw Hp(new _y(w6n+zRn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?Skn(n,i):n.Cb.ih(n,-1-e,null,i)),t&&(i=Npn(t,n,10,i)),(i=zR(n,t,i))&&i.Fi()}else 0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,11,t,t))}function tNn(n){var t,e,i,r;for(i=new usn(new Pb(n.b).a);i.b;)r=BB((e=ten(i)).cd(),11),hon(t=BB(e.dd(),10),(hWn(),dlt),r),hon(r,Elt,t),hon(r,elt,(hN(),!0)),qCn(r,BB(mMn(t,Qft),61)),mMn(t,Qft),hon(r.i,(HXn(),ept),(QEn(),VCt)),BB(mMn(vW(r.i),Zft),21).Fc((bDn(),dft))}function eNn(n,t,e){var i,r,c;if(i=0,r=0,n.c)for(c=new Wb(n.d.i.j);c.ac.a)return-1;if(r.a(o=null==n.d?0:n.d.length)){for(h=n.d,n.d=x8(oAt,c9n,63,2*o+4,0,1),c=0;c=0x8000000000000000?(X7(),btt):(i=!1,n<0&&(i=!0,n=-n),e=0,n>=OQn&&(n-=(e=CY(n/OQn))*OQn),t=0,n>=IQn&&(n-=(t=CY(n/IQn))*IQn),r=M$(CY(n),t,e),i&&Oon(r),r)}function pNn(n,t){var e,i,r,c;for(e=!t||!n.u.Hc((lIn(),eIt)),c=0,r=new Wb(n.e.Cf());r.a=-t&&r==t?new rI(iln(i-1),iln(r)):new rI(iln(i),iln(r-1))}function ENn(){return lWn(),Pun(Gk(ust,1),$Vn,77,0,[rot,tot,cot,kot,Fot,Mot,Uot,Oot,Kot,got,Not,Iot,_ot,lot,Wot,Vut,Lot,Hot,jot,Bot,Qot,Dot,Qut,Rot,Jot,Got,Vot,Eot,sot,Tot,yot,Xot,Zut,uot,Pot,Yut,Cot,vot,bot,Aot,dot,eot,not,mot,wot,$ot,zot,Jut,xot,pot,Sot,hot,oot,qot,aot,fot,iot])}function TNn(n,t,e){n.d=0,n.b=0,t.k==(uSn(),Iut)&&e.k==Iut&&BB(mMn(t,(hWn(),dlt)),10)==BB(mMn(e,dlt),10)&&(S7(t).j==(kUn(),sIt)?q$n(n,t,e):q$n(n,e,t)),t.k==Iut&&e.k==Put?S7(t).j==(kUn(),sIt)?n.d=1:n.b=1:e.k==Iut&&t.k==Put&&(S7(e).j==(kUn(),sIt)?n.b=1:n.d=1),umn(n,t,e)}function MNn(n){var t,e,i,r,c;return c=ATn(n),null!=n.a&&AH(c,"category",n.a),!WE(new Cb(n.d))&&(rtn(c,"knownOptions",i=new Cl),t=new ep(i),e5(new Cb(n.d),t)),!WE(n.g)&&(rtn(c,"supportedFeatures",r=new Cl),e=new ip(r),e5(n.g,e)),c}function SNn(n){var t,e,i,r,c,a,u,o;for(t=336,e=0,r=new sR(n.length),u=0,o=(a=n).length;u>16!=7&&t){if(vkn(n,t))throw Hp(new _y(w6n+cPn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?hkn(n,i):n.Cb.ih(n,-1-e,null,i)),t&&(i=BB(t,49).gh(n,1,DOt,i)),(i=VG(n,t,i))&&i.Fi()}else 0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,7,t,t))}function ONn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=3&&t){if(vkn(n,t))throw Hp(new _y(w6n+Vfn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?bkn(n,i):n.Cb.ih(n,-1-e,null,i)),t&&(i=BB(t,49).gh(n,0,BOt,i)),(i=QG(n,t,i))&&i.Fi()}else 0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,3,t,t))}function ANn(n,t){var e,i,r,c,a,u,o,s,h;return $On(),t.d>n.d&&(u=n,n=t,t=u),t.d<63?Xxn(n,t):(s=z5(n,a=(-2&n.d)<<4),h=z5(t,a),i=uBn(n,G5(s,a)),r=uBn(t,G5(h,a)),o=ANn(s,h),e=ANn(i,r),c=G5(c=$Hn($Hn(c=ANn(uBn(s,i),uBn(r,h)),o),e),a),$Hn($Hn(o=G5(o,a<<1),c),e))}function $Nn(n,t,e){var i,r,c,a,u;for(a=Lfn(n,e),u=x8(Out,a1n,10,t.length,0,1),i=0,c=a.Kc();c.Ob();)qy(TD(mMn(r=BB(c.Pb(),11),(hWn(),elt))))&&(u[i++]=BB(mMn(r,Elt),10));if(i=0;r+=e?1:-1)c|=t.c.Sf(u,r,e,i&&!qy(TD(mMn(t.j,(hWn(),Yft))))&&!qy(TD(mMn(t.j,(hWn(),Ilt))))),c|=t.q._f(u,r,e),c|=gRn(n,u[r],e,i);return TU(n.c,t),c}function RNn(n,t,e){var i,r,c,a,u,o,s,h;for(s=0,h=(o=I2(n.j)).length;s1&&(n.a=!0),NG(BB(e.b,65),UR(B$(BB(t.b,65).c),kL(XR(B$(BB(e.b,65).a),BB(t.b,65).a),r))),QZ(n,t),FNn(n,e)}function BNn(n){var t,e,i,r,c,a;for(r=new Wb(n.a.a);r.a0&&c>0?t++:i>0?e++:c>0?r++:e++}SQ(),m$(n.j,new bi)}function qNn(n){var t,e;e=null,t=BB(xq(n.g,0),17);do{if(Lx(e=t.d.i,(hWn(),flt)))return BB(mMn(e,flt),11).i;if(e.k!=(uSn(),Cut)&&dAn(new oz(ZL(lbn(e).a.Kc(),new h))))t=BB(U5(new oz(ZL(lbn(e).a.Kc(),new h))),17);else if(e.k!=Cut)return null}while(e&&e.k!=(uSn(),Cut));return e}function GNn(n,t){var e,i,r,c,a,u,o,s,h;for(u=t.j,a=t.g,o=BB(xq(u,u.c.length-1),113),l1(0,u.c.length),s=Zmn(n,a,o,h=BB(u.c[0],113)),c=1;cs&&(o=e,h=r,s=i);t.a=h,t.c=o}function zNn(n,t){var e;if(!ZU(n.b,t.b))throw Hp(new Fy("Invalid hitboxes for scanline constraint calculation."));(kun(t.b,BB(MR(n.b,t.b),57))||kun(t.b,BB(TR(n.b,t.b),57)))&&($T(),t.b),n.a[t.b.f]=BB(kK(n.b,t.b),57),(e=BB(yK(n.b,t.b),57))&&(n.a[e.f]=t.b)}function UNn(n){if(!n.a.d||!n.a.e)throw Hp(new Fy((ED(Hit),Hit.k+" must have a source and target "+(ED(qit),qit.k+" specified."))));if(n.a.d==n.a.e)throw Hp(new Fy("Network simplex does not support self-loops: "+n.a+" "+n.a.d+" "+n.a.e));return RN(n.a.d.g,n.a),RN(n.a.e.b,n.a),n.a}function XNn(n,t,e){var i,r,c,a,u,o,s;for(s=new dE(new Yd(n)),u=0,o=(a=Pun(Gk(Gut,1),u1n,11,0,[t,e])).length;uo-n.b&&uo-n.a&&u0&&++l;++f}return l}function cxn(n,t){var e,i,r,c,a;for(a=BB(mMn(t,(CAn(),Lkt)),425),c=spn(t.b,0);c.b!=c.d.c;)if(r=BB(b3(c),86),0==n.b[r.g]){switch(a.g){case 0:Qvn(n,r);break;case 1:HAn(n,r)}n.b[r.g]=2}for(i=spn(n.a,0);i.b!=i.d.c;)ywn((e=BB(b3(i),188)).b.d,e,!0),ywn(e.c.b,e,!0);hon(t,(qqn(),lkt),n.a)}function axn(n,t){var e,i,r,c;return ZM(),t?t==(Uqn(),KLt)||(t==yLt||t==vLt||t==mLt)&&n!=pLt?new cUn(n,t):((e=(i=BB(t,677)).pk())||(kV(B7((IPn(),Z$t),t)),e=i.pk()),!e.i&&(e.i=new xp),!(r=BB(qI(AJ((c=e.i).f,n)),1942))&&VW(c,n,r=new cUn(n,t)),r):aLt}function uxn(n,t){var e,i,r,c,a,u,o,s;for(u=BB(mMn(n,(hWn(),dlt)),11),o=Aon(Pun(Gk(PMt,1),sVn,8,0,[u.i.n,u.n,u.a])).a,s=n.i.n.b,r=0,c=(i=Z0(n.e)).length;r0?c.a?e>(u=c.b.rf().a)&&(r=(e-u)/2,c.d.b=r,c.d.c=r):c.d.c=n.s+e:Hz(n.u)&&((i=_Tn(c.b)).c<0&&(c.d.b=-i.c),i.c+i.b>c.b.rf().a&&(c.d.c=i.c+i.b-c.b.rf().a))}function fxn(n,t){var e,i;for(OTn(t,"Semi-Interactive Crossing Minimization Processor",1),e=!1,i=new Wb(n.b);i.a=0){if(t==i)return new rI(iln(-t-1),iln(-t-1));if(t==-i)return new rI(iln(-t),iln(i+1))}return e.Math.abs(t)>e.Math.abs(i)?new rI(iln(-t),iln(t<0?i:i+1)):new rI(iln(t+1),iln(i))}function wxn(n){var t,e;e=BB(mMn(n,(HXn(),kgt)),163),t=BB(mMn(n,(hWn(),ilt)),303),e==(Tbn(),Flt)?(hon(n,kgt,qlt),hon(n,ilt,(z7(),Cft))):e==Hlt?(hon(n,kgt,qlt),hon(n,ilt,(z7(),Sft))):t==(z7(),Cft)?(hon(n,kgt,Flt),hon(n,ilt,Pft)):t==Sft&&(hon(n,kgt,Hlt),hon(n,ilt,Pft))}function dxn(){dxn=O,jyt=new oa,vyt=dq(new B2,(yMn(),_at),(lWn(),jot)),kyt=WG(dq(new B2,_at,Dot),Bat,xot),Eyt=ogn(ogn(FM(WG(dq(new B2,Rat,Uot),Bat,zot),Fat),Got),Xot),myt=WG(dq(dq(dq(new B2,Kat,Mot),Fat,Pot),Fat,Cot),Bat,Sot),yyt=WG(dq(dq(new B2,Fat,Cot),Fat,uot),Bat,aot)}function gxn(){gxn=O,Cyt=dq(WG(new B2,(yMn(),Bat),(lWn(),hot)),_at,jot),$yt=ogn(ogn(FM(WG(dq(new B2,Rat,Uot),Bat,zot),Fat),Got),Xot),Iyt=WG(dq(dq(dq(new B2,Kat,Mot),Fat,Pot),Fat,Cot),Bat,Sot),Ayt=dq(dq(new B2,_at,Dot),Bat,xot),Oyt=WG(dq(dq(new B2,Fat,Cot),Fat,uot),Bat,aot)}function pxn(n,t,e,i,r){var c,a;(b5(t)||t.c.i.c!=t.d.i.c)&&nrn(Aon(Pun(Gk(PMt,1),sVn,8,0,[r.i.n,r.n,r.a])),e)||b5(t)||(t.c==r?Kx(t.a,0,new wA(e)):DH(t.a,new wA(e)),i&&!FT(n.a,e)&&((a=BB(mMn(t,(HXn(),vgt)),74))||(a=new km,hon(t,vgt,a)),r5(a,c=new wA(e),a.c.b,a.c),TU(n.a,c)))}function vxn(n){var t;for(t=new oz(ZL(fbn(n).a.Kc(),new h));dAn(t);)if(BB(U5(t),17).c.i.k!=(uSn(),Sut))throw Hp(new rk(P1n+gyn(n)+"' has its layer constraint set to FIRST, but has at least one incoming edge that does not come from a FIRST_SEPARATE node. That must not happen."))}function mxn(n,t,e){var i,r,c,a,u,o;if(0==(r=pbn(254&n.Db)))n.Eb=e;else{if(1==r)a=x8(Ant,HWn,1,2,5,1),0==Rmn(n,t)?(a[0]=e,a[1]=n.Eb):(a[0]=n.Eb,a[1]=e);else for(a=x8(Ant,HWn,1,r+1,5,1),c=een(n.Eb),i=2,u=0,o=0;i<=128;i<<=1)i==t?a[o++]=e:0!=(n.Db&i)&&(a[o++]=c[u++]);n.Eb=a}n.Db|=t}function yxn(n,t,i){var r,c,a,u;for(this.b=new Np,c=0,r=0,u=new Wb(n);u.a0&&(c+=(a=BB(xq(this.b,0),167)).o,r+=a.p),c*=2,r*=2,t>1?c=CY(e.Math.ceil(c*t)):r=CY(e.Math.ceil(r/t)),this.a=new qwn(c,r)}function kxn(n,t,i,r,c,a){var u,o,s,h,f,l,b,w,d,g;for(h=r,t.j&&t.o?(d=(b=BB(RX(n.f,t.A),57)).d.c+b.d.b,--h):d=t.a.c+t.a.b,f=c,i.q&&i.o?(s=(b=BB(RX(n.f,i.C),57)).d.c,++f):s=i.a.c,w=d+(o=(s-d)/e.Math.max(2,f-h)),l=h;l=0;a+=r?1:-1){for(u=t[a],o=i==(kUn(),oIt)?r?abn(u,i):ean(abn(u,i)):r?ean(abn(u,i)):abn(u,i),c&&(n.c[u.p]=o.gc()),f=o.Kc();f.Ob();)h=BB(f.Pb(),11),n.d[h.p]=s++;gun(e,o)}}function Exn(n,t,e){var i,r,c,a,u,o,s,h;for(c=Gy(MD(n.b.Kc().Pb())),s=Gy(MD(Wan(t.b))),i=kL(B$(n.a),s-e),r=kL(B$(t.a),e-c),kL(h=UR(i,r),1/(s-c)),this.a=h,this.b=new Np,u=!0,(a=n.b.Kc()).Pb();a.Ob();)o=Gy(MD(a.Pb())),u&&o-e>D3n&&(this.b.Fc(e),u=!1),this.b.Fc(o);u&&this.b.Fc(e)}function Txn(n){var t,e,i,r;if(hKn(n,n.n),n.d.c.length>0){for(nk(n.c);pAn(n,BB(n0(new Wb(n.e.a)),121))>5,t&=31,i>=n.d)return n.e<0?(ODn(),Jtt):(ODn(),eet);if(c=n.d-i,QSn(r=x8(ANt,hQn,25,c+1,15,1),c,n.a,i,t),n.e<0){for(e=0;e0&&n.a[e]<<32-t!=0){for(e=0;e=0)&&(!(e=Fqn((IPn(),Z$t),r,t))||((i=e.Zj())>1||-1==i)&&3!=DW(B7(Z$t,e))))}function Lxn(n,t,e,i){var r,c,a,u,o;return u=PTn(BB(Wtn((!t.b&&(t.b=new hK(KOt,t,4,7)),t.b),0),82)),o=PTn(BB(Wtn((!t.c&&(t.c=new hK(KOt,t,5,8)),t.c),0),82)),YY(u)==YY(o)||Ctn(o,u)?null:(a=XY(t))==e?i:(c=BB(RX(n.a,a),10))&&(r=c.e)?r:null}function Nxn(n,t){var e;switch(OTn(t,"Label side selection ("+(e=BB(mMn(n,(HXn(),Ydt)),276))+")",1),e.g){case 0:TAn(n,(Xyn(),jCt));break;case 1:TAn(n,(Xyn(),ECt));break;case 2:sBn(n,(Xyn(),jCt));break;case 3:sBn(n,(Xyn(),ECt));break;case 4:uDn(n,(Xyn(),jCt));break;case 5:uDn(n,(Xyn(),ECt))}HSn(t)}function xxn(n,t,e){var i,r,c,a,u;if((c=n[lj(e,n.length)])[0].k==(uSn(),Mut))for(r=fj(e,c.length),u=t.j,i=0;i0&&(i[0]+=n.d,u-=i[0]),i[2]>0&&(i[2]+=n.d,u-=i[2]),a=e.Math.max(0,u),i[1]=e.Math.max(i[1],u),J5(n,zit,c.c+r.b+i[0]-(i[1]-u)/2,i),t==zit&&(n.c.b=a,n.c.c=c.c+r.b+(a-u)/2)}function Qxn(){this.c=x8(xNt,qQn,25,(kUn(),Pun(Gk(FIt,1),JZn,61,0,[PIt,sIt,oIt,SIt,CIt])).length,15,1),this.b=x8(xNt,qQn,25,Pun(Gk(FIt,1),JZn,61,0,[PIt,sIt,oIt,SIt,CIt]).length,15,1),this.a=x8(xNt,qQn,25,Pun(Gk(FIt,1),JZn,61,0,[PIt,sIt,oIt,SIt,CIt]).length,15,1),mS(this.c,RQn),mS(this.b,KQn),mS(this.a,KQn)}function Jxn(n,t,e){var i,r,c,a;if(t<=e?(r=t,c=e):(r=e,c=t),i=0,null==n.b)n.b=x8(ANt,hQn,25,2,15,1),n.b[0]=r,n.b[1]=c,n.c=!0;else{if(i=n.b.length,n.b[i-1]+1==r)return void(n.b[i-1]=c);a=x8(ANt,hQn,25,i+2,15,1),aHn(n.b,0,a,0,i),n.b=a,n.b[i-1]>=r&&(n.c=!1,n.a=!1),n.b[i++]=r,n.b[i]=c,n.c||T$n(n)}}function Yxn(n,t,e){var i,r,c,a,u,o,s;for(s=t.d,n.a=new Y6(s.c.length),n.c=new xp,u=new Wb(s);u.a=0?n._g(s,!1,!0):cOn(n,e,!1),58).Kc();c.Ob();){for(r=BB(c.Pb(),56),h=0;h1;)fDn(r,r.i-1);return i}function aDn(n,t){var e,i,r,c,a,u,o;for(OTn(t,"Comment post-processing",1),c=new Wb(n.b);c.an.d[a.p]&&(e+=n5(n.b,c),d3(n.a,iln(c)));for(;!Wy(n.a);)Mnn(n.b,BB(dU(n.a),19).a)}return e}function hDn(n,t,e){var i,r,c,a;for(c=(!t.a&&(t.a=new eU(UOt,t,10,11)),t.a).i,r=new AL((!t.a&&(t.a=new eU(UOt,t,10,11)),t.a));r.e!=r.i.gc();)0==(!(i=BB(kpn(r),33)).a&&(i.a=new eU(UOt,i,10,11)),i.a).i||(c+=hDn(n,i,!1));if(e)for(a=YY(t);a;)c+=(!a.a&&(a.a=new eU(UOt,a,10,11)),a.a).i,a=YY(a);return c}function fDn(n,t){var e,i,r,c;return n.ej()?(i=null,r=n.fj(),n.ij()&&(i=n.kj(n.pi(t),null)),e=n.Zi(4,c=Lyn(n,t),null,t,r),n.bj()&&null!=c?(i=n.dj(c,i))?(i.Ei(e),i.Fi()):n.$i(e):i?(i.Ei(e),i.Fi()):n.$i(e),c):(c=Lyn(n,t),n.bj()&&null!=c&&(i=n.dj(c,null))&&i.Fi(),c)}function lDn(n){var t,i,r,c,a,u,o,s,h,f;for(h=n.a,t=new Rv,s=0,r=new Wb(n.d);r.ao.d&&(f=o.d+o.a+h));i.c.d=f,t.a.zc(i,t),s=e.Math.max(s,i.c.d+i.c.a)}return s}function bDn(){bDn=O,hft=new LP("COMMENTS",0),lft=new LP("EXTERNAL_PORTS",1),bft=new LP("HYPEREDGES",2),wft=new LP("HYPERNODES",3),dft=new LP("NON_FREE_PORTS",4),gft=new LP("NORTH_SOUTH_PORTS",5),vft=new LP(G1n,6),sft=new LP("CENTER_LABELS",7),fft=new LP("END_LABELS",8),pft=new LP("PARTITIONS",9)}function wDn(n){var t,e,i,r,c;for(r=new Np,t=new $q((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a)),i=new oz(ZL(dLn(n).a.Kc(),new h));dAn(i);)cL(Wtn((!(e=BB(U5(i),79)).b&&(e.b=new hK(KOt,e,4,7)),e.b),0),186)||(c=PTn(BB(Wtn((!e.c&&(e.c=new hK(KOt,e,5,8)),e.c),0),82)),t.a._b(c)||(r.c[r.c.length]=c));return r}function dDn(n){var t,e,i,r,c;for(r=new Rv,t=new $q((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a)),i=new oz(ZL(dLn(n).a.Kc(),new h));dAn(i);)cL(Wtn((!(e=BB(U5(i),79)).b&&(e.b=new hK(KOt,e,4,7)),e.b),0),186)||(c=PTn(BB(Wtn((!e.c&&(e.c=new hK(KOt,e,5,8)),e.c),0),82)),t.a._b(c)||r.a.zc(c,r));return r}function gDn(n,t,e,i,r){return i<0?((i=zTn(n,r,Pun(Gk(Qtt,1),sVn,2,6,[JVn,YVn,ZVn,nQn,tQn,eQn,iQn,rQn,cQn,aQn,uQn,oQn]),t))<0&&(i=zTn(n,r,Pun(Gk(Qtt,1),sVn,2,6,["Jan","Feb","Mar","Apr",tQn,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),t)),!(i<0||(e.k=i,0))):i>0&&(e.k=i-1,!0)}function pDn(n,t,e,i,r){return i<0?((i=zTn(n,r,Pun(Gk(Qtt,1),sVn,2,6,[JVn,YVn,ZVn,nQn,tQn,eQn,iQn,rQn,cQn,aQn,uQn,oQn]),t))<0&&(i=zTn(n,r,Pun(Gk(Qtt,1),sVn,2,6,["Jan","Feb","Mar","Apr",tQn,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),t)),!(i<0||(e.k=i,0))):i>0&&(e.k=i-1,!0)}function vDn(n,t,e,i,r,c){var a,u,o;if(u=32,i<0){if(t[0]>=n.length)return!1;if(43!=(u=fV(n,t[0]))&&45!=u)return!1;if(++t[0],(i=UIn(n,t))<0)return!1;45==u&&(i=-i)}return 32==u&&t[0]-e==2&&2==r.b&&(a=(o=(new AT).q.getFullYear()-sQn+sQn-80)%100,c.a=i==a,i+=100*(o/100|0)+(i=h&&(s=r);s&&(f=e.Math.max(f,s.a.o.a)),f>b&&(l=h,b=f)}return l}function MDn(n,t,e){var i,r,c;if(n.e=e,n.d=0,n.b=0,n.f=1,n.i=t,16==(16&n.e)&&(n.i=pKn(n.i)),n.j=n.i.length,QXn(n),c=Vdn(n),n.d!=n.j)throw Hp(new ak(kWn((u$(),w8n))));if(n.g){for(i=0;ip4n?m$(s,n.b):r<=p4n&&r>v4n?m$(s,n.d):r<=v4n&&r>m4n?m$(s,n.c):r<=m4n&&m$(s,n.a),a=IDn(n,s,a);return c}function ODn(){var n;for(ODn=O,Ytt=new X6(1,1),net=new X6(1,10),eet=new X6(0,0),Jtt=new X6(-1,1),Ztt=Pun(Gk(oet,1),sVn,91,0,[eet,Ytt,new X6(1,2),new X6(1,3),new X6(1,4),new X6(1,5),new X6(1,6),new X6(1,7),new X6(1,8),new X6(1,9),net]),tet=x8(oet,sVn,91,32,0,1),n=0;n1&&(i=new xC(r,e.b),DH(t.a,i)),nin(t.a,Pun(Gk(PMt,1),sVn,8,0,[f,h]))}function RDn(n){NM(n,new MTn(vj(wj(pj(gj(new du,_5n),"ELK Randomizer"),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new Qu))),u2(n,_5n,QYn,LIt),u2(n,_5n,vZn,15),u2(n,_5n,yZn,iln(0)),u2(n,_5n,VYn,dZn)}function KDn(){var n,t,e,i,r,c;for(KDn=O,QLt=x8(NNt,v6n,25,255,15,1),JLt=x8(ONt,WVn,25,16,15,1),t=0;t<255;t++)QLt[t]=-1;for(e=57;e>=48;e--)QLt[e]=e-48<<24>>24;for(i=70;i>=65;i--)QLt[i]=i-65+10<<24>>24;for(r=102;r>=97;r--)QLt[r]=r-97+10<<24>>24;for(c=0;c<10;c++)JLt[c]=48+c&QVn;for(n=10;n<=15;n++)JLt[n]=65+n-10&QVn}function _Dn(n,t,e){var i,r,c,a,u,o,s,h;return u=t.i-n.g/2,o=e.i-n.g/2,s=t.j-n.g/2,h=e.j-n.g/2,c=t.g+n.g/2,a=e.g+n.g/2,i=t.f+n.g/2,r=e.f+n.g/2,u>19!=0)return"-"+GDn(aon(n));for(e=n,i="";0!=e.l||0!=e.m||0!=e.h;){if(e=Aqn(e,F5(AQn),!0),t=""+TE(ltt),0!=e.l||0!=e.m||0!=e.h)for(r=9-t.length;r>0;r--)t="0"+t;i=t+i}return i}function zDn(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var n="__proto__",t=Object.create(null);return void 0===t[n]&&0==Object.getOwnPropertyNames(t).length&&(t[n]=42,42===t[n]&&0!=Object.getOwnPropertyNames(t).length)}function UDn(n){var t,e,i,r,c,a,u;for(t=!1,e=0,r=new Wb(n.d.b);r.a=n.a)return-1;if(!eTn(t,i))return-1;if(h3(BB(r.Kb(t),20)))return 1;for(c=0,u=BB(r.Kb(t),20).Kc();u.Ob();){if(-1==(o=VDn(n,(a=BB(u.Pb(),17)).c.i==t?a.d.i:a.c.i,i,r)))return-1;if((c=e.Math.max(c,o))>n.c-1)return-1}return c+1}function QDn(n,t){var e,i,r,c,a,u;if(GI(t)===GI(n))return!0;if(!cL(t,15))return!1;if(i=BB(t,15),u=n.gc(),i.gc()!=u)return!1;if(a=i.Kc(),n.ni()){for(e=0;e0)if(n.qj(),null!=t){for(c=0;c>24;case 97:case 98:case 99:case 100:case 101:case 102:return n-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return n-65+10<<24>>24;default:throw Hp(new Mk("Invalid hexadecimal"))}}function nRn(n,t,e){var i,r,c,a;for(OTn(e,"Processor order nodes",2),n.a=Gy(MD(mMn(t,(CAn(),xkt)))),r=new JT,a=spn(t.b,0);a.b!=a.d.c;)qy(TD(mMn(c=BB(b3(a),86),(qqn(),dkt))))&&r5(r,c,r.c.b,r.c);Px(0!=r.b),KHn(n,i=BB(r.a.a.c,86)),!e.b&&qin(e,1),BRn(n,i,0-Gy(MD(mMn(i,(qqn(),ukt))))/2,0),!e.b&&qin(e,1),HSn(e)}function tRn(){tRn=O,Rit=new HS("SPIRAL",0),$it=new HS("LINE_BY_LINE",1),Lit=new HS("MANHATTAN",2),Ait=new HS("JITTER",3),xit=new HS("QUADRANTS_LINE_BY_LINE",4),Dit=new HS("QUADRANTS_MANHATTAN",5),Nit=new HS("QUADRANTS_JITTER",6),Oit=new HS("COMBINE_LINE_BY_LINE_MANHATTAN",7),Iit=new HS("COMBINE_JITTER_MANHATTAN",8)}function eRn(n,t,e,i){var r,c,a,u,o,s;for(o=Njn(n,e),s=Njn(t,e),r=!1;o&&s&&(i||myn(o,s,e));)a=Njn(o,e),u=Njn(s,e),A7(t),A7(n),c=o.c,rGn(o,!1),rGn(s,!1),e?(Qyn(t,s.p,c),t.p=s.p,Qyn(n,o.p+1,c),n.p=o.p):(Qyn(n,o.p,c),n.p=o.p,Qyn(t,s.p+1,c),t.p=s.p),PZ(o,null),PZ(s,null),o=a,s=u,r=!0;return r}function iRn(n,t,e,i){var r,c,a,u,o;for(r=!1,c=!1,u=new Wb(i.j);u.a=t.length)throw Hp(new Ay("Greedy SwitchDecider: Free layer not in graph."));this.c=t[n],this.e=new QK(i),yrn(this.e,this.c,(kUn(),CIt)),this.i=new QK(i),yrn(this.i,this.c,oIt),this.f=new lG(this.c),this.a=!c&&r.i&&!r.s&&this.c[0].k==(uSn(),Mut),this.a&&gPn(this,n,t.length)}function oRn(n,t){var e,i,r,c,a,u;c=!n.B.Hc((n_n(),HIt)),a=n.B.Hc(zIt),n.a=new Hwn(a,c,n.c),n.n&&kQ(n.a.n,n.n),jy(n.g,(Dtn(),zit),n.a),t||((i=new Ign(1,c,n.c)).n.a=n.k,mG(n.p,(kUn(),sIt),i),(r=new Ign(1,c,n.c)).n.d=n.k,mG(n.p,SIt,r),(u=new Ign(0,c,n.c)).n.c=n.k,mG(n.p,CIt,u),(e=new Ign(0,c,n.c)).n.b=n.k,mG(n.p,oIt,e))}function sRn(n){var t,e,i;switch((t=BB(mMn(n.d,(HXn(),Zdt)),218)).g){case 2:e=MXn(n);break;case 3:i=new Np,YT(AV($V(wnn(wnn(new Rq(null,new w1(n.d.b,16)),new Or),new Ar),new $r),new pr),new Cd(i)),e=i;break;default:throw Hp(new Fy("Compaction not supported for "+t+" edges."))}gqn(n,e),e5(new Cb(n.g),new Sd(n))}function hRn(n,t){var e;return e=new Zn,t&&qan(e,BB(RX(n.a,DOt),94)),cL(t,470)&&qan(e,BB(RX(n.a,ROt),94)),cL(t,354)?(qan(e,BB(RX(n.a,zOt),94)),e):(cL(t,82)&&qan(e,BB(RX(n.a,KOt),94)),cL(t,239)?(qan(e,BB(RX(n.a,UOt),94)),e):cL(t,186)?(qan(e,BB(RX(n.a,XOt),94)),e):(cL(t,352)&&qan(e,BB(RX(n.a,_Ot),94)),e))}function fRn(){fRn=O,Zct=new XA((sWn(),pPt),iln(1)),cat=new XA(LPt,80),rat=new XA(SPt,5),Fct=new XA(cSt,dZn),nat=new XA(vPt,iln(1)),iat=new XA(kPt,(hN(),!0)),Qct=new WA(50),Vct=new XA(XSt,Qct),Hct=CSt,Jct=uPt,Bct=new XA(dSt,!1),Wct=USt,Xct=qSt,Uct=KSt,zct=DSt,Yct=fPt,jSn(),Gct=Ict,aat=Nct,qct=Cct,tat=Act,eat=Lct}function lRn(n){var t,e,i,r,c,a,u;for(u=new v5,a=new Wb(n.a);a.a0&&t=0)return!1;if(t.p=e.b,WB(e.e,t),i==(uSn(),Put)||i==Iut)for(r=new Wb(t.j);r.a1||-1==a)&&(c|=16),0!=(r.Bb&h6n)&&(c|=64)),0!=(e.Bb&BQn)&&(c|=M9n),c|=k6n):cL(t,457)?c|=512:(i=t.Bj())&&0!=(1&i.i)&&(c|=256),0!=(512&n.Bb)&&(c|=128),c}function $Rn(n,t){var e,i,r,c,a;for(n=null==n?zWn:(kW(n),n),r=0;rn.d[u.p]&&(e+=n5(n.b,c),d3(n.a,iln(c))):++a;for(e+=n.b.d*a;!Wy(n.a);)Mnn(n.b,BB(dU(n.a),19).a)}return e}function xRn(n,t){var e;return n.f==uLt?(e=DW(B7((IPn(),Z$t),t)),n.e?4==e&&t!=(TOn(),lLt)&&t!=(TOn(),sLt)&&t!=(TOn(),hLt)&&t!=(TOn(),fLt):2==e):!(!n.d||!(n.d.Hc(t)||n.d.Hc(Z1(B7((IPn(),Z$t),t)))||n.d.Hc(Fqn((IPn(),Z$t),n.b,t))))||!(!n.f||!aNn((IPn(),n.f),jV(B7(Z$t,t))))&&(e=DW(B7(Z$t,t)),n.e?4==e:2==e)}function DRn(n,t,i,r){var c,a,u,o,s,h,f,l;return s=(u=BB(ZAn(i,(sWn(),gPt)),8)).a,f=u.b+n,(c=e.Math.atan2(f,s))<0&&(c+=Z3n),(c+=t)>Z3n&&(c-=Z3n),h=(o=BB(ZAn(r,gPt),8)).a,l=o.b+n,(a=e.Math.atan2(l,h))<0&&(a+=Z3n),(a+=t)>Z3n&&(a-=Z3n),h$(),rin(1e-10),e.Math.abs(c-a)<=1e-10||c==a||isNaN(c)&&isNaN(a)?0:ca?1:zO(isNaN(c),isNaN(a))}function RRn(n){var t,e,i,r,c,a,u;for(u=new xp,i=new Wb(n.a.b);i.a=n.o)throw Hp(new Sv);a=t>>5,c=yz(1,dG(yz(31&t,1))),n.n[e][a]=r?i0(n.n[e][a],c):e0(n.n[e][a],uH(c)),c=yz(c,1),n.n[e][a]=i?i0(n.n[e][a],c):e0(n.n[e][a],uH(c))}catch(u){throw cL(u=lun(u),320)?Hp(new Ay(MYn+n.o+"*"+n.p+SYn+t+FWn+e+PYn)):Hp(u)}}function BRn(n,t,i,r){var c,a;t&&(c=Gy(MD(mMn(t,(qqn(),fkt))))+r,a=i+Gy(MD(mMn(t,ukt)))/2,hon(t,gkt,iln(dG(fan(e.Math.round(c))))),hon(t,pkt,iln(dG(fan(e.Math.round(a))))),0==t.d.b||BRn(n,BB(iL(new wg(spn(new bg(t).a.d,0))),86),i+Gy(MD(mMn(t,ukt)))+n.a,r+Gy(MD(mMn(t,okt)))),null!=mMn(t,wkt)&&BRn(n,BB(mMn(t,wkt),86),i,r))}function HRn(n,t){var i,r,c,a,u,o,s,h,f,l,b;for(c=2*Gy(MD(mMn(s=vW(t.a),(HXn(),Tpt)))),f=Gy(MD(mMn(s,Apt))),h=e.Math.max(c,f),a=x8(xNt,qQn,25,t.f-t.c+1,15,1),r=-h,i=0,o=t.b.Kc();o.Ob();)u=BB(o.Pb(),10),r+=n.a[u.c.p]+h,a[i++]=r;for(r+=n.a[t.a.c.p]+h,a[i++]=r,b=new Wb(t.e);b.a0&&(!(i=(!n.n&&(n.n=new eU(zOt,n,1,7)),BB(Wtn(n.n,0),137)).a)||oO(oO((t.a+=' "',t),i),'"'))),oO(kE(oO(kE(oO(kE(oO(kE((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function URn(n){var t,e,i;return 0!=(64&n.Db)?mSn(n):(t=new lN(t6n),(e=n.k)?oO(oO((t.a+=' "',t),e),'"'):(!n.n&&(n.n=new eU(zOt,n,1,7)),n.n.i>0&&(!(i=(!n.n&&(n.n=new eU(zOt,n,1,7)),BB(Wtn(n.n,0),137)).a)||oO(oO((t.a+=' "',t),i),'"'))),oO(kE(oO(kE(oO(kE(oO(kE((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function XRn(n,t){var e,i,r,c,a,u;if(null==t||0==t.length)return null;if(!(r=BB(SY(n.a,t),149))){for(i=new Kb(new Ob(n.b).a.vc().Kc());i.a.Ob();)if(c=BB(i.a.Pb(),42),a=(e=BB(c.dd(),149)).c,u=t.length,mK(a.substr(a.length-u,u),t)&&(t.length==a.length||46==fV(a,a.length-t.length-1))){if(r)return null;r=e}r&&mZ(n.a,t,r)}return r}function WRn(n,t){var e,i,r;return e=new xn,(i=BB(P4($V(new Rq(null,new w1(n.f,16)),e),x7(new Q,new J,new cn,new an,Pun(Gk(nit,1),$Vn,132,0,[(qsn(),Xet),Uet]))),21).gc())<(r=BB(P4($V(new Rq(null,new w1(t.f,16)),e),x7(new Q,new J,new cn,new an,Pun(Gk(nit,1),$Vn,132,0,[Xet,Uet]))),21).gc())?-1:i==r?0:1}function VRn(n){var t,e,i;Lx(n,(HXn(),$gt))&&((i=BB(mMn(n,$gt),21)).dc()||(e=new JK(t=BB(Vj(GCt),9),BB(SR(t,t.length),9),0),i.Hc((n$n(),$Ct))?orn(e,$Ct):orn(e,LCt),i.Hc(OCt)||orn(e,OCt),i.Hc(ICt)?orn(e,DCt):i.Hc(CCt)?orn(e,xCt):i.Hc(ACt)&&orn(e,NCt),i.Hc(DCt)?orn(e,ICt):i.Hc(xCt)?orn(e,CCt):i.Hc(NCt)&&orn(e,ACt),hon(n,$gt,e)))}function QRn(n){var t,e,i,r,c,a,u;for(r=BB(mMn(n,(hWn(),rlt)),10),l1(0,(i=n.j).c.length),e=BB(i.c[0],11),a=new Wb(r.j);a.ar.p?(qCn(c,SIt),c.d&&(u=c.o.b,t=c.a.b,c.a.b=u-t)):c.j==SIt&&r.p>n.p&&(qCn(c,sIt),c.d&&(u=c.o.b,t=c.a.b,c.a.b=-(u-t)));break}return r}function JRn(n,t,e,i){var r,c,a,u,o,s,h,f,l,b,w;if(c=e,e1&&(i=new xC(r,e.b),DH(t.a,i)),nin(t.a,Pun(Gk(PMt,1),sVn,8,0,[f,h]))}function gKn(n,t,e){var i,r,c,a,u,o;if(t){if(e<=-1){if(cL(i=itn(t.Tg(),-1-e),99))return BB(i,18);for(u=0,o=(a=BB(t.ah(i),153)).gc();u0){for(r=o.length;r>0&&""==o[r-1];)--r;r=40)&&EFn(n),BHn(n),Txn(n),e=yln(n),i=0;e&&i0&&DH(n.f,c)):(n.c[a]-=s+1,n.c[a]<=0&&n.a[a]>0&&DH(n.e,c))))}function JKn(n){var t,e,i,r,c,a,u;for(c=new dE(BB(yX(new Rn),62)),u=KQn,e=new Wb(n.d);e.a=0&&oe?t:e;s<=f;++s)s==e?u=i++:(c=r[s],h=w.rl(c.ak()),s==t&&(o=s!=f||h?i:i-1),h&&++i);return l=BB(Iln(n,t,e),72),u!=o&&Lv(n,new j9(n.e,7,a,iln(u),b.dd(),o)),l}return BB(Iln(n,t,e),72)}function u_n(n,t){var e,i,r,c,a,u;for(OTn(t,"Port order processing",1),u=BB(mMn(n,(HXn(),opt)),421),e=new Wb(n.b);e.a=0&&(!Cyn(n,a)||(o<22?u.l|=1<>>1,a.m=s>>>1|(1&h)<<21,a.l=f>>>1|(1&s)<<21,--o;return e&&Oon(u),c&&(i?(ltt=aon(n),r&&(ltt=hun(ltt,(X7(),dtt)))):ltt=M$(n.l,n.m,n.h)),u}function f_n(n,t){var e,i,r,c,a,u,o,s,h,f;for(s=n.e[t.c.p][t.p]+1,o=t.c.a.c.length+1,u=new Wb(n.a);u.a0&&(b1(0,n.length),45==n.charCodeAt(0)||(b1(0,n.length),43==n.charCodeAt(0)))?1:0;ie)throw Hp(new Mk(DQn+n+'"'));return a}function b_n(n){var t,i,r,c,a,u;for(a=new JT,c=new Wb(n.a);c.a1)&&1==t&&BB(n.a[n.b],10).k==(uSn(),Sut)?hFn(BB(n.a[n.b],10),(Xyn(),jCt)):i&&(!e||(n.c-n.b&n.a.length-1)>1)&&1==t&&BB(n.a[n.c-1&n.a.length-1],10).k==(uSn(),Sut)?hFn(BB(n.a[n.c-1&n.a.length-1],10),(Xyn(),ECt)):2==(n.c-n.b&n.a.length-1)?(hFn(BB(Eon(n),10),(Xyn(),jCt)),hFn(BB(Eon(n),10),ECt)):sLn(n,r),o4(n)}function v_n(n,t,i){var r,c,a,u,o;for(a=0,c=new AL((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a));c.e!=c.i.gc();)u="",0==(!(r=BB(kpn(c),33)).n&&(r.n=new eU(zOt,r,1,7)),r.n).i||(u=BB(Wtn((!r.n&&(r.n=new eU(zOt,r,1,7)),r.n),0),137).a),qan(o=new csn(a++,t,u),r),hon(o,(qqn(),skt),r),o.e.b=r.j+r.f/2,o.f.a=e.Math.max(r.g,1),o.e.a=r.i+r.g/2,o.f.b=e.Math.max(r.f,1),DH(t.b,o),jCn(i.f,r,o)}function m_n(n){var t,e,i,r,c;i=BB(mMn(n,(hWn(),dlt)),33),c=BB(ZAn(i,(HXn(),Fgt)),174).Hc((mdn(),_It)),n.e||(r=BB(mMn(n,Zft),21),t=new xC(n.f.a+n.d.b+n.d.c,n.f.b+n.d.d+n.d.a),r.Hc((bDn(),lft))?(Jpn(i,ept,(QEn(),XCt)),KUn(i,t.a,t.b,!1,!0)):qy(TD(ZAn(i,Bgt)))||KUn(i,t.a,t.b,!0,!0)),Jpn(i,Fgt,c?nbn(_It):new JK(e=BB(Vj(JIt),9),BB(SR(e,e.length),9),0))}function y_n(n,t,e){var i,r,c,a;if(t[0]>=n.length)return e.o=0,!0;switch(fV(n,t[0])){case 43:r=1;break;case 45:r=-1;break;default:return e.o=0,!0}if(++t[0],c=t[0],0==(a=UIn(n,t))&&t[0]==c)return!1;if(t[0]=0&&u!=e&&(c=new nU(n,1,u,a,null),i?i.Ei(c):i=c),e>=0&&(c=new nU(n,1,e,u==e?a:null,t),i?i.Ei(c):i=c)),i}function M_n(n){var t,e,i;if(null==n.b){if(i=new Sk,null!=n.i&&(cO(i,n.i),i.a+=":"),0!=(256&n.f)){for(0!=(256&n.f)&&null!=n.a&&(rQ(n.i)||(i.a+="//"),cO(i,n.a)),null!=n.d&&(i.a+="/",cO(i,n.d)),0!=(16&n.f)&&(i.a+="/"),t=0,e=n.j.length;ts)&&(o+u+cHn(i,s,!1).a<=t.b&&(p9(e,c-e.s),e.c=!0,p9(i,c-e.s),Tvn(i,e.s,e.t+e.d+u),i.k=!0,xcn(e.q,i),h=!0,r&&(tin(t,i),i.j=t,n.c.length>a&&(Tkn((l1(a,n.c.length),BB(n.c[a],200)),i),0==(l1(a,n.c.length),BB(n.c[a],200)).a.c.length&&s6(n,a)))),h)}function $_n(n,t){var e,i,r,c,a;if(OTn(t,"Partition midprocessing",1),r=new pY,YT(AV(new Rq(null,new w1(n.a,16)),new di),new ld(r)),0!=r.d){for(a=BB(P4(a1(new Rq(null,(r.i||(r.i=new HL(r,r.c))).Nc())),m9(new H,new B,new rn,Pun(Gk(nit,1),$Vn,132,0,[(qsn(),Uet)]))),15),e=BB((i=a.Kc()).Pb(),19);i.Ob();)c=BB(i.Pb(),19),XLn(BB(h6(r,e),21),BB(h6(r,c),21)),e=c;HSn(t)}}function L_n(n,t,e){var i,r,c,a,u;if(0==t.p){for(t.p=1,(r=e)||(r=new rI(new Np,new JK(i=BB(Vj(FIt),9),BB(SR(i,i.length),9),0))),BB(r.a,15).Fc(t),t.k==(uSn(),Mut)&&BB(r.b,21).Fc(BB(mMn(t,(hWn(),Qft)),61)),a=new Wb(t.j);a.a0)if(r=BB(n.Ab.g,1934),null==t){for(c=0;c1)for(i=new Wb(r);i.ai.s&&oa&&(a=r,s.c=x8(Ant,HWn,1,0,5,1)),r==a&&WB(s,new rI(e.c.i,e)));SQ(),m$(s,n.c),kG(n.b,u.p,s)}}function q_n(n,t){var e,i,r,c,a,u,o,s;for(c=new Wb(t.b);c.aa&&(a=r,s.c=x8(Ant,HWn,1,0,5,1)),r==a&&WB(s,new rI(e.d.i,e)));SQ(),m$(s,n.c),kG(n.f,u.p,s)}}function G_n(n){NM(n,new MTn(vj(wj(pj(gj(new du,l5n),"ELK Box"),"Algorithm for packing of unconnected boxes, i.e. graphs without edges."),new xu))),u2(n,l5n,QYn,zMt),u2(n,l5n,vZn,15),u2(n,l5n,pZn,iln(0)),u2(n,l5n,A4n,mpn(_Mt)),u2(n,l5n,PZn,mpn(BMt)),u2(n,l5n,SZn,mpn(qMt)),u2(n,l5n,VYn,f5n),u2(n,l5n,jZn,mpn(FMt)),u2(n,l5n,BZn,mpn(HMt)),u2(n,l5n,b5n,mpn(RMt)),u2(n,l5n,u3n,mpn(KMt))}function z_n(n,t){var e,i,r,c,a,u,o,s,h;if(a=(r=n.i).o.a,c=r.o.b,a<=0&&c<=0)return kUn(),PIt;switch(s=n.n.a,h=n.n.b,u=n.o.a,e=n.o.b,t.g){case 2:case 1:if(s<0)return kUn(),CIt;if(s+u>a)return kUn(),oIt;break;case 4:case 3:if(h<0)return kUn(),sIt;if(h+e>c)return kUn(),SIt}return(o=(s+u/2)/a)+(i=(h+e/2)/c)<=1&&o-i<=0?(kUn(),CIt):o+i>=1&&o-i>=0?(kUn(),oIt):i<.5?(kUn(),sIt):(kUn(),SIt)}function U_n(n,t){var e,i,r,c,a,u,o,s,h,f,l,b;for(e=!1,o=Gy(MD(mMn(t,(HXn(),Opt)))),l=KVn*o,r=new Wb(t.b);r.aa.n.b-a.d.d+h.a+l&&(b=s.g+h.g,h.a=(h.g*h.a+s.g*s.a)/b,h.g=b,s.f=h,e=!0)),c=a,s=h;return e}function X_n(n,t,e,i,r,c,a){var u,o,s,h,f;for(f=new bA,o=t.Kc();o.Ob();)for(h=new Wb(BB(o.Pb(),839).wf());h.a0?u.a?r>(s=u.b.rf().b)&&(n.v||1==u.c.d.c.length?(a=(r-s)/2,u.d.d=a,u.d.a=a):(i=(BB(xq(u.c.d,0),181).rf().b-s)/2,u.d.d=e.Math.max(0,i),u.d.a=r-i-s)):u.d.a=n.t+r:Hz(n.u)&&((c=_Tn(u.b)).d<0&&(u.d.d=-c.d),c.d+c.a>u.b.rf().b&&(u.d.a=c.d+c.a-u.b.rf().b))}function Q_n(n,t){var e;switch(vnn(n)){case 6:return XI(t);case 7:return UI(t);case 8:return zI(t);case 3:return Array.isArray(t)&&!((e=vnn(t))>=14&&e<=16);case 11:return null!=t&&typeof t===xWn;case 12:return null!=t&&(typeof t===AWn||typeof t==xWn);case 0:return Qpn(t,n.__elementTypeId$);case 2:return DU(t)&&!(t.im===I);case 1:return DU(t)&&!(t.im===I)||Qpn(t,n.__elementTypeId$);default:return!0}}function J_n(n,t){var i,r,c,a;return r=e.Math.min(e.Math.abs(n.c-(t.c+t.b)),e.Math.abs(n.c+n.b-t.c)),a=e.Math.min(e.Math.abs(n.d-(t.d+t.a)),e.Math.abs(n.d+n.a-t.d)),(i=e.Math.abs(n.c+n.b/2-(t.c+t.b/2)))>n.b/2+t.b/2||(c=e.Math.abs(n.d+n.a/2-(t.d+t.a/2)))>n.a/2+t.a/2?1:0==i&&0==c?0:0==i?a/c+1:0==c?r/i+1:e.Math.min(r/i,a/c)+1}function Y_n(n,t){var i,r,c,a,u,o;return(c=iin(n))==(o=iin(t))?n.e==t.e&&n.a<54&&t.a<54?n.ft.f?1:0:(r=n.e-t.e,(i=(n.d>0?n.d:e.Math.floor((n.a-1)*zQn)+1)-(t.d>0?t.d:e.Math.floor((t.a-1)*zQn)+1))>r+1?c:i0&&(u=Nnn(u,kBn(r))),tgn(a,u))):c0&&n.d!=(q7(),Aat)&&(u+=a*(i.d.a+n.a[t.b][i.b]*(t.d.a-i.d.a)/e)),e>0&&n.d!=(q7(),Iat)&&(o+=a*(i.d.b+n.a[t.b][i.b]*(t.d.b-i.d.b)/e)));switch(n.d.g){case 1:return new xC(u/c,t.d.b);case 2:return new xC(t.d.a,o/c);default:return new xC(u/c,o/c)}}function nFn(n,t){var e,i,r,c;if(zsn(),c=BB(mMn(n.i,(HXn(),ept)),98),0!=n.j.g-t.j.g||c!=(QEn(),UCt)&&c!=WCt&&c!=XCt)return 0;if(c==(QEn(),UCt)&&(e=BB(mMn(n,ipt),19),i=BB(mMn(t,ipt),19),e&&i&&0!=(r=e.a-i.a)))return r;switch(n.j.g){case 1:return Pln(n.n.a,t.n.a);case 2:return Pln(n.n.b,t.n.b);case 3:return Pln(t.n.a,n.n.a);case 4:return Pln(t.n.b,n.n.b);default:throw Hp(new Fy(r1n))}}function tFn(n){var t,e,i,r,c;for(WB(c=new Y6((!n.a&&(n.a=new $L(xOt,n,5)),n.a).i+2),new xC(n.j,n.k)),YT(new Rq(null,(!n.a&&(n.a=new $L(xOt,n,5)),new w1(n.a,16))),new Ig(c)),WB(c,new xC(n.b,n.c)),t=1;t0&&(Uun(o,!1,(Ffn(),_Pt)),Uun(o,!0,FPt)),Otn(t.g,new sP(n,e)),VW(n.g,t,e)}function iFn(){var n;for(iFn=O,Ltt=Pun(Gk(ANt,1),hQn,25,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]),Ntt=x8(ANt,hQn,25,37,15,1),xtt=Pun(Gk(ANt,1),hQn,25,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]),Dtt=x8(LNt,FQn,25,37,14,1),n=2;n<=36;n++)Ntt[n]=CY(e.Math.pow(n,Ltt[n])),Dtt[n]=Ojn(bVn,Ntt[n])}function rFn(n){var t;if(1!=(!n.a&&(n.a=new eU(FOt,n,6,6)),n.a).i)throw Hp(new _y(B5n+(!n.a&&(n.a=new eU(FOt,n,6,6)),n.a).i));return t=new km,bun(BB(Wtn((!n.b&&(n.b=new hK(KOt,n,4,7)),n.b),0),82))&&Frn(t,zXn(n,bun(BB(Wtn((!n.b&&(n.b=new hK(KOt,n,4,7)),n.b),0),82)),!1)),bun(BB(Wtn((!n.c&&(n.c=new hK(KOt,n,5,8)),n.c),0),82))&&Frn(t,zXn(n,bun(BB(Wtn((!n.c&&(n.c=new hK(KOt,n,5,8)),n.c),0),82)),!0)),t}function cFn(n,t){var e,i,r;for(r=!1,i=new oz(ZL((t.d?n.a.c==(gY(),tyt)?fbn(t.b):lbn(t.b):n.a.c==(gY(),nyt)?fbn(t.b):lbn(t.b)).a.Kc(),new h));dAn(i);)if(e=BB(U5(i),17),(qy(n.a.f[n.a.g[t.b.p].p])||b5(e)||e.c.i.c!=e.d.i.c)&&!qy(n.a.n[n.a.g[t.b.p].p])&&!qy(n.a.n[n.a.g[t.b.p].p])&&(r=!0,FT(n.b,n.a.g[Lmn(e,t.b).p])))return t.c=!0,t.a=e,t;return t.c=r,t.a=null,t}function aFn(n,t,e,i,r){var c,a,u,o,s,h,f;for(SQ(),m$(n,new Xu),u=new M2(n,0),f=new Np,c=0;u.b2*c?(h=new Gtn(f),s=iG(a)/eG(a),o=yXn(h,t,new bm,e,i,r,s),UR(kO(h.e),o),f.c=x8(Ant,HWn,1,0,5,1),c=0,f.c[f.c.length]=h,f.c[f.c.length]=a,c=iG(h)*eG(h)+iG(a)*eG(a)):(f.c[f.c.length]=a,c+=iG(a)*eG(a));return f}function uFn(n,t,e){var i,r,c,a,u,o,s;if(0==(i=e.gc()))return!1;if(n.ej())if(o=n.fj(),kwn(n,t,e),a=1==i?n.Zi(3,null,e.Kc().Pb(),t,o):n.Zi(5,null,e,t,o),n.bj()){for(u=i<100?null:new Fj(i),c=t+i,r=t;r0){for(u=0;u>16==-15&&n.Cb.nh()&&$7(new k9(n.Cb,9,13,e,n.c,uvn(H7(BB(n.Cb,59)),n))):cL(n.Cb,88)&&n.Db>>16==-23&&n.Cb.nh()&&(cL(t=n.c,88)||(gWn(),t=d$t),cL(e,88)||(gWn(),e=d$t),$7(new k9(n.Cb,9,10,e,t,uvn(a4(BB(n.Cb,26)),n)))))),n.c}function bFn(n,t){var e,i,r,c,a,u,o,s;for(OTn(t,"Hypernodes processing",1),i=new Wb(n.b);i.ae);return r}function pFn(n,t){var e,i,r;i=0!=H$n(n.d,1),!qy(TD(mMn(t.j,(hWn(),Yft))))&&!qy(TD(mMn(t.j,Ilt)))||GI(mMn(t.j,(HXn(),Ldt)))===GI((mon(),Nvt))?t.c.Tf(t.e,i):i=qy(TD(mMn(t.j,Yft))),DNn(n,t,i,!0),qy(TD(mMn(t.j,Ilt)))&&hon(t.j,Ilt,(hN(),!1)),qy(TD(mMn(t.j,Yft)))&&(hon(t.j,Yft,(hN(),!1)),hon(t.j,Ilt,!0)),e=nCn(n,t);do{if($rn(n),0==e)return 0;r=e,DNn(n,t,i=!i,!1),e=nCn(n,t)}while(r>e);return r}function vFn(n,t,e){var i,r,c,a,u,o,s;if(t==e)return!0;if(t=bAn(n,t),e=bAn(n,e),i=qvn(t)){if((o=qvn(e))!=i)return!!o&&(a=i.Dj())==o.Dj()&&null!=a;if(!t.d&&(t.d=new $L(VAt,t,1)),r=(c=t.d).i,!e.d&&(e.d=new $L(VAt,e,1)),r==(s=e.d).i)for(u=0;u0,u=Nbn(t,c),KN(e?u.b:u.g,t),1==kbn(u).c.length&&r5(i,u,i.c.b,i.c),r=new rI(c,t),d3(n.o,r),y7(n.e.a,c))}function TFn(n,t){var i,r,c,a;return r=e.Math.abs(qz(n.b).a-qz(t.b).a),a=e.Math.abs(qz(n.b).b-qz(t.b).b),i=1,c=1,r>n.b.b/2+t.b.b/2&&(i=1-e.Math.min(e.Math.abs(n.b.c-(t.b.c+t.b.b)),e.Math.abs(n.b.c+n.b.b-t.b.c))/r),a>n.b.a/2+t.b.a/2&&(c=1-e.Math.min(e.Math.abs(n.b.d-(t.b.d+t.b.a)),e.Math.abs(n.b.d+n.b.a-t.b.d))/a),(1-e.Math.min(i,c))*e.Math.sqrt(r*r+a*a)}function MFn(n){var t,e,i;for(nUn(n,n.e,n.f,(dY(),Lyt),!0,n.c,n.i),nUn(n,n.e,n.f,Lyt,!1,n.c,n.i),nUn(n,n.e,n.f,Nyt,!0,n.c,n.i),nUn(n,n.e,n.f,Nyt,!1,n.c,n.i),IFn(n,n.c,n.e,n.f,n.i),e=new M2(n.i,0);e.b=65;e--)WLt[e]=e-65<<24>>24;for(i=122;i>=97;i--)WLt[i]=i-97+26<<24>>24;for(r=57;r>=48;r--)WLt[r]=r-48+52<<24>>24;for(WLt[43]=62,WLt[47]=63,c=0;c<=25;c++)VLt[c]=65+c&QVn;for(a=26,o=0;a<=51;++a,o++)VLt[a]=97+o&QVn;for(n=52,u=0;n<=61;++n,u++)VLt[n]=48+u&QVn;VLt[62]=43,VLt[63]=47}function CFn(n,t){var i,r,c,a,u,o,s,h,f,l,b;if(n.dc())return new Gj;for(s=0,f=0,r=n.Kc();r.Ob();)c=BB(r.Pb(),37).f,s=e.Math.max(s,c.a),f+=c.a*c.b;for(s=e.Math.max(s,e.Math.sqrt(f)*Gy(MD(mMn(BB(n.Kc().Pb(),37),(HXn(),Edt))))),l=0,b=0,o=0,i=t,u=n.Kc();u.Ob();)l+(h=(a=BB(u.Pb(),37)).f).a>s&&(l=0,b+=o+t,o=0),ZRn(a,l,b),i=e.Math.max(i,l+h.a),o=e.Math.max(o,h.b),l+=h.a+t;return new xC(i+t,b+o+t)}function IFn(n,t,e,i,r){var c,a,u,o,s,h,f;for(a=new Wb(t);a.ac)return kUn(),oIt;break;case 4:case 3:if(o<0)return kUn(),sIt;if(o+n.f>r)return kUn(),SIt}return(a=(u+n.g/2)/c)+(e=(o+n.f/2)/r)<=1&&a-e<=0?(kUn(),CIt):a+e>=1&&a-e>=0?(kUn(),oIt):e<.5?(kUn(),sIt):(kUn(),SIt)}function AFn(n,t,e,i,r){var c,a;if(c=rbn(e0(t[0],UQn),e0(i[0],UQn)),n[0]=dG(c),c=kz(c,32),e>=r){for(a=1;a0&&(r.b[a++]=0,r.b[a++]=c.b[0]-1),t=1;t0&&(Vl(o,o.d-r.d),r.c==(O6(),Tyt)&&Xl(o,o.a-r.d),o.d<=0&&o.i>0&&r5(t,o,t.c.b,t.c));for(c=new Wb(n.f);c.a0&&(Ql(u,u.i-r.d),r.c==(O6(),Tyt)&&Wl(u,u.b-r.d),u.i<=0&&u.d>0&&r5(e,u,e.c.b,e.c))}function xFn(n,t,e){var i,r,c,a,u,o,s,h;for(OTn(e,"Processor compute fanout",1),$U(n.b),$U(n.a),u=null,c=spn(t.b,0);!u&&c.b!=c.d.c;)qy(TD(mMn(s=BB(b3(c),86),(qqn(),dkt))))&&(u=s);for(r5(o=new JT,u,o.c.b,o.c),jUn(n,o),h=spn(t.b,0);h.b!=h.d.c;)a=SD(mMn(s=BB(b3(h),86),(qqn(),rkt))),r=null!=SY(n.b,a)?BB(SY(n.b,a),19).a:0,hon(s,ikt,iln(r)),i=1+(null!=SY(n.a,a)?BB(SY(n.a,a),19).a:0),hon(s,tkt,iln(i));HSn(e)}function DFn(n,t,e,i,r){var c,a,u,o,s,h,f,l,b;for(f=yEn(n,e),u=0;u0),i.a.Xb(i.c=--i.b),h>f+u&&fW(i);for(c=new Wb(l);c.a0),i.a.Xb(i.c=--i.b)}}function RFn(){var n,t,e,i,r,c;if(wWn(),CNt)return CNt;for(sHn(n=new M0(4),ZUn(pnt,!0)),WGn(n,ZUn("M",!0)),WGn(n,ZUn("C",!0)),c=new M0(4),i=0;i<11;i++)Jxn(c,i,i);return sHn(t=new M0(4),ZUn("M",!0)),Jxn(t,4448,4607),Jxn(t,65438,65439),tqn(r=new r$(2),n),tqn(r,sNt),(e=new r$(2)).$l(gG(c,ZUn("L",!0))),e.$l(t),e=new h4(3,e),e=new UU(r,e),CNt=e}function KFn(n){var t,e;if(!Jcn(t=SD(ZAn(n,(sWn(),eSt))),n)&&!P8(n,mPt)&&(0!=(!n.a&&(n.a=new eU(UOt,n,10,11)),n.a).i||qy(TD(ZAn(n,SSt))))){if(null!=t&&0!=RMn(t).length)throw gzn(n,e=oO(oO(new lN("Layout algorithm '"),t),"' not found for ")),Hp(new rk(e.a));if(!Jcn(w1n,n))throw gzn(n,e=oO(oO(new lN("Unable to load default layout algorithm "),w1n)," for unconfigured node ")),Hp(new rk(e.a))}}function _Fn(n){var t,i,r,c,a,u,o,s,h,f,l,b,w;if(i=n.i,t=n.n,0==n.b)for(w=i.c+t.b,b=i.b-t.b-t.c,s=0,f=(u=n.a).length;s0&&(l-=r[0]+n.c,r[0]+=n.c),r[2]>0&&(l-=r[2]+n.c),r[1]=e.Math.max(r[1],l),UG(n.a[1],i.c+t.b+r[0]-(r[1]-l)/2,r[1]);for(o=0,h=(a=n.a).length;o0?(n.n.c.length-1)*n.i:0,i=new Wb(n.n);i.a1)for(i=spn(r,0);i.b!=i.d.c;)for(c=0,u=new Wb((e=BB(b3(i),231)).e);u.a0&&(t[0]+=n.c,l-=t[0]),t[2]>0&&(l-=t[2]+n.c),t[1]=e.Math.max(t[1],l),XG(n.a[1],r.d+i.d+t[0]-(t[1]-l)/2,t[1]);else for(w=r.d+i.d,b=r.a-i.d-i.a,s=0,f=(u=n.a).length;s=0&&c!=e)throw Hp(new _y(a8n));for(r=0,o=0;o0||0==Ibn(c.b.d,n.b.d+n.b.a)&&r.b<0||0==Ibn(c.b.d+c.b.a,n.b.d)&&r.b>0){o=0;break}}else o=e.Math.min(o,HCn(n,c,r));o=e.Math.min(o,WFn(n,a,o,r))}return o}function VFn(n,t){var e,i,r,c,a,u;if(n.b<2)throw Hp(new _y("The vector chain must contain at least a source and a target point."));for(Px(0!=n.b),CA(t,(i=BB(n.a.a.c,8)).a,i.b),u=new cx((!t.a&&(t.a=new $L(xOt,t,5)),t.a)),c=spn(n,1);c.aGy(lL(a.g,a.d[0]).a)?(Px(o.b>0),o.a.Xb(o.c=--o.b),yR(o,a),r=!0):u.e&&u.e.gc()>0&&(c=(!u.e&&(u.e=new Np),u.e).Mc(t),s=(!u.e&&(u.e=new Np),u.e).Mc(e),(c||s)&&((!u.e&&(u.e=new Np),u.e).Fc(a),++a.c));r||(i.c[i.c.length]=a)}function cBn(n){var t,e,i;if(vA(BB(mMn(n,(HXn(),ept)),98)))for(e=new Wb(n.j);e.a>>0).toString(16),t.length-2,t.length):n>=BQn?"\\v"+fx(t="0"+(n>>>0).toString(16),t.length-6,t.length):""+String.fromCharCode(n&QVn)}return e}function uBn(n,t){var e,i,r,c,a,u,o,s,h,f;if(a=n.e,0==(o=t.e))return n;if(0==a)return 0==t.e?t:new lU(-t.e,t.d,t.a);if((c=n.d)+(u=t.d)==2)return e=e0(n.a[0],UQn),i=e0(t.a[0],UQn),a<0&&(e=j7(e)),o<0&&(i=j7(i)),npn(ibn(e,i));if(-1==(r=c!=u?c>u?1:-1:Msn(n.a,t.a,c)))f=-o,h=a==o?d6(t.a,u,n.a,c):N8(t.a,u,n.a,c);else if(f=a,a==o){if(0==r)return ODn(),eet;h=d6(n.a,c,t.a,u)}else h=N8(n.a,c,t.a,u);return X0(s=new lU(f,h.length,h)),s}function oBn(n){var t,e,i,r,c,a;for(this.e=new Np,this.a=new Np,e=n.b-1;e<3;e++)Kx(n,0,BB(Dpn(n,0),8));if(n.b<4)throw Hp(new _y("At (least dimension + 1) control points are necessary!"));for(this.b=3,this.d=!0,this.c=!1,I$n(this,n.b+this.b-1),a=new Np,c=new Wb(this.e),t=0;t=t.o&&e.f<=t.f||.5*t.a<=e.f&&1.5*t.a>=e.f){if((c=BB(xq(t.n,t.n.c.length-1),211)).e+c.d+e.g+r<=i&&(BB(xq(t.n,t.n.c.length-1),211).f-n.f+e.f<=n.b||1==n.a.c.length))return ybn(t,e),!0;if(t.s+e.g<=i&&(t.t+t.d+e.f+r<=n.b||1==n.a.c.length))return WB(t.b,e),a=BB(xq(t.n,t.n.c.length-1),211),WB(t.n,new RY(t.s,a.f+a.a+t.i,t.i)),smn(BB(xq(t.n,t.n.c.length-1),211),e),BFn(t,e),!0}return!1}function fBn(n,t,e){var i,r,c,a;return n.ej()?(r=null,c=n.fj(),i=n.Zi(1,a=onn(n,t,e),e,t,c),n.bj()&&!(n.ni()&&null!=a?Nfn(a,e):GI(a)===GI(e))?(null!=a&&(r=n.dj(a,r)),r=n.cj(e,r),n.ij()&&(r=n.lj(a,e,r)),r?(r.Ei(i),r.Fi()):n.$i(i)):(n.ij()&&(r=n.lj(a,e,r)),r?(r.Ei(i),r.Fi()):n.$i(i)),a):(a=onn(n,t,e),n.bj()&&!(n.ni()&&null!=a?Nfn(a,e):GI(a)===GI(e))&&(r=null,null!=a&&(r=n.dj(a,null)),(r=n.cj(e,r))&&r.Fi()),a)}function lBn(n,t){var i,r,c,a,u,o,s;t%=24,n.q.getHours()!=t&&((i=new e.Date(n.q.getTime())).setDate(i.getDate()+1),(u=n.q.getTimezoneOffset()-i.getTimezoneOffset())>0&&(o=u/60|0,s=u%60,r=n.q.getDate(),n.q.getHours()+o>=24&&++r,c=new e.Date(n.q.getFullYear(),n.q.getMonth(),r,t+o,n.q.getMinutes()+s,n.q.getSeconds(),n.q.getMilliseconds()),n.q.setTime(c.getTime()))),a=n.q.getTime(),n.q.setTime(a+36e5),n.q.getHours()!=t&&n.q.setTime(a)}function bBn(n,t){var e,i,r,c;if(OTn(t,"Path-Like Graph Wrapping",1),0!=n.b.c.length)if(null==(r=new MAn(n)).i&&(r.i=Wrn(r,new kc)),e=Gy(r.i)*r.f/(null==r.i&&(r.i=Wrn(r,new kc)),Gy(r.i)),r.b>e)HSn(t);else{switch(BB(mMn(n,(HXn(),Bpt)),337).g){case 2:c=new Tc;break;case 0:c=new wc;break;default:c=new Mc}if(i=c.Vf(n,r),!c.Wf())switch(BB(mMn(n,Xpt),338).g){case 2:i=XCn(r,i);break;case 1:i=KTn(r,i)}iqn(n,r,i),HSn(t)}else HSn(t)}function wBn(n,t){var e,i,r,c;if(f1(n.d,n.e),n.c.a.$b(),0!=Gy(MD(mMn(t.j,(HXn(),Idt))))||0!=Gy(MD(mMn(t.j,Idt))))for(e=ZYn,GI(mMn(t.j,Ldt))!==GI((mon(),Nvt))&&hon(t.j,(hWn(),Yft),(hN(),!0)),c=BB(mMn(t.j,xpt),19).a,r=0;r(l1(c+1,t.c.length),BB(t.c[c+1],19)).a-i&&++u,WB(r,(l1(c+u,t.c.length),BB(t.c[c+u],19))),a+=(l1(c+u,t.c.length),BB(t.c[c+u],19)).a-i,++e;e1&&(o>iG(u)*eG(u)/2||0==a.b)&&(f=new Gtn(l),h=iG(u)/eG(u),s=yXn(f,t,new bm,e,i,r,h),UR(kO(f.e),s),u=f,b.c[b.c.length]=f,o=0,l.c=x8(Ant,HWn,1,0,5,1)));return gun(b,l),b}function mBn(n,t,e,i){var r,c,a,u,o,s,h,f,l,b,w,d;if(e.mh(t)&&(h=(b=t)?BB(i,49).xh(b):null))if(d=e.bh(t,n.a),(w=t.t)>1||-1==w)if(f=BB(d,69),l=BB(h,69),f.dc())l.$b();else for(a=!!Cvn(t),c=0,u=n.a?f.Kc():f.Zh();u.Ob();)s=BB(u.Pb(),56),(r=BB(lnn(n,s),56))?(a?-1==(o=l.Xc(r))?l.Xh(c,r):c!=o&&l.ji(c,r):l.Xh(c,r),++c):n.b&&!a&&(l.Xh(c,s),++c);else null==d?h.Wb(null):null==(r=lnn(n,d))?n.b&&!Cvn(t)&&h.Wb(d):h.Wb(r)}function yBn(n,t){var i,r,c,a,u,o,s,f;for(i=new Le,c=new oz(ZL(fbn(t).a.Kc(),new h));dAn(c);)if(!b5(r=BB(U5(c),17))&&eTn(o=r.c.i,Xut)){if(-1==(f=VDn(n,o,Xut,Uut)))continue;i.b=e.Math.max(i.b,f),!i.a&&(i.a=new Np),WB(i.a,o)}for(u=new oz(ZL(lbn(t).a.Kc(),new h));dAn(u);)if(!b5(a=BB(U5(u),17))&&eTn(s=a.d.i,Uut)){if(-1==(f=VDn(n,s,Uut,Xut)))continue;i.d=e.Math.max(i.d,f),!i.c&&(i.c=new Np),WB(i.c,s)}return i}function kBn(n){var t,e,i,r;if($On(),t=CY(n),n1e6)throw Hp(new Oy("power of ten too big"));if(n<=DWn)return G5(uOn(aet[1],t),t);for(r=i=uOn(aet[1],DWn),e=fan(n-DWn),t=CY(n%DWn);Vhn(e,DWn)>0;)r=Nnn(r,i),e=ibn(e,DWn);for(r=G5(r=Nnn(r,uOn(aet[1],t)),DWn),e=fan(n-DWn);Vhn(e,DWn)>0;)r=G5(r,DWn),e=ibn(e,DWn);return r=G5(r,t)}function jBn(n,t){var e,i,r,c,a,u,o,s;for(OTn(t,"Hierarchical port dummy size processing",1),u=new Np,s=new Np,e=2*Gy(MD(mMn(n,(HXn(),kpt)))),r=new Wb(n.b);r.as&&i>s)){r=!1,e.n&&OH(e,"bk node placement breaks on "+u+" which should have been after "+h);break}h=u,s=Gy(t.p[u.p])+Gy(t.d[u.p])+u.o.b+u.d.a}if(!r)break}return e.n&&OH(e,t+" is feasible: "+r),r}function OBn(n,t,e,i){var r,c,a,u,o,s,h;for(u=-1,h=new Wb(n);h.a=g&&n.e[s.p]>w*n.b||m>=i*g)&&(l.c[l.c.length]=o,o=new Np,Frn(u,a),a.a.$b(),h-=f,b=e.Math.max(b,h*n.b+d),h+=m,v=m,m=0,f=0,d=0);return new rI(b,l)}function NBn(n){var t,e,i,r,c,a,u,o,s,h,f,l;for(e=new Kb(new Ob(n.c.b).a.vc().Kc());e.a.Ob();)u=BB(e.a.Pb(),42),null==(r=(t=BB(u.dd(),149)).a)&&(r=""),!(i=_D(n.c,r))&&0==r.length&&(i=yfn(n)),i&&!ywn(i.c,t,!1)&&DH(i.c,t);for(a=spn(n.a,0);a.b!=a.d.c;)c=BB(b3(a),478),s=T5(n.c,c.a),l=T5(n.c,c.b),s&&l&&DH(s.c,new rI(l,c.c));for(yQ(n.a),f=spn(n.b,0);f.b!=f.d.c;)h=BB(b3(f),478),t=KD(n.c,h.a),o=T5(n.c,h.b),t&&o&&DM(t,o,h.c);yQ(n.b)}function xBn(n,t,e){var i,r,c,a,u,o,s,h,f,l,b;c=new Pl(n),d5((a=new dkn).g),d5(a.j),$U(a.b),d5(a.d),d5(a.i),$U(a.k),$U(a.c),$U(a.e),b=bIn(a,c,null),O$n(a,c),r=b,t&&(u=eHn(s=new Pl(t)),vSn(r,Pun(Gk(nMt,1),HWn,527,0,[u]))),l=!1,f=!1,e&&(s=new Pl(e),l8n in s.a&&(l=zY(s,l8n).ge().a),b8n in s.a&&(f=zY(s,b8n).ge().a)),h=$j(Fen(new Xm,l),f),BSn(new su,r,h),l8n in c.a&&rtn(c,l8n,null),(l||f)&&(nBn(h,o=new py,l,f),rtn(c,l8n,o)),i=new Xg(a),Uon(new OA(r),i)}function DBn(n,t,e){var i,r,c,a,u,o,s,h,f;for(a=new Jkn,s=Pun(Gk(ANt,1),hQn,25,15,[0]),r=-1,c=0,i=0,o=0;o0)){if(r=-1,32==fV(h.c,0)){if(f=s[0],ynn(t,s),s[0]>f)continue}else if($J(t,h.c,s[0])){s[0]+=h.c.length;continue}return 0}if(r<0&&h.a&&(r=o,c=s[0],i=0),r>=0){if(u=h.b,o==r&&0==(u-=i++))return 0;if(!LUn(t,s,h,u,a)){o=r-1,s[0]=c;continue}}else if(r=-1,!LUn(t,s,h,0,a))return 0}return dUn(a,e)?s[0]:0}function RBn(n){var t,e,i,r,c,a;if(!n.f){if(a=new Mo,c=new Mo,null==(t=P$t).a.zc(n,t)){for(r=new AL(kJ(n));r.e!=r.i.gc();)pX(a,RBn(BB(kpn(r),26)));t.a.Bc(n),t.a.gc()}for(!n.s&&(n.s=new eU(FAt,n,21,17)),i=new AL(n.s);i.e!=i.i.gc();)cL(e=BB(kpn(i),170),99)&&f9(c,BB(e,18));chn(c),n.r=new TH(n,(BB(Wtn(QQ((QX(),t$t).o),6),18),c.i),c.g),pX(a,n.r),chn(a),n.f=new NO((BB(Wtn(QQ(t$t.o),5),18),a.i),a.g),P5(n).b&=-3}return n.f}function KBn(n){var t,e,i,r,c,a,u,o,s,h,f,l,b,w;for(a=n.o,i=x8(ANt,hQn,25,a,15,1),r=x8(ANt,hQn,25,a,15,1),e=n.p,t=x8(ANt,hQn,25,e,15,1),c=x8(ANt,hQn,25,e,15,1),s=0;s=0&&!vmn(n,h,f);)--f;r[h]=f}for(b=0;b=0&&!vmn(n,u,w);)--u;c[w]=u}for(o=0;ot[l]&&li[o]&&FRn(n,o,l,!1,!0)}function _Bn(n){var t,e,i,r,c,a,u,o;e=qy(TD(mMn(n,(fRn(),Bct)))),c=n.a.c.d,u=n.a.d.d,e?(a=kL(XR(new xC(u.a,u.b),c),.5),o=kL(B$(n.e),.5),t=XR(UR(new xC(c.a,c.b),a),o),Hx(n.d,t)):(r=Gy(MD(mMn(n.a,rat))),i=n.d,c.a>=u.a?c.b>=u.b?(i.a=u.a+(c.a-u.a)/2+r,i.b=u.b+(c.b-u.b)/2-r-n.e.b):(i.a=u.a+(c.a-u.a)/2+r,i.b=c.b+(u.b-c.b)/2+r):c.b>=u.b?(i.a=c.a+(u.a-c.a)/2+r,i.b=u.b+(c.b-u.b)/2+r):(i.a=c.a+(u.a-c.a)/2+r,i.b=c.b+(u.b-c.b)/2-r-n.e.b))}function FBn(n,t){var e,i,r,c,a,u,o;if(null==n)return null;if(0==(c=n.length))return"";for(o=x8(ONt,WVn,25,c,15,1),_8(0,c,n.length),_8(0,c,o.length),JU(n,0,c,o,0),e=null,u=t,r=0,a=0;r0?fx(e.a,0,c-1):"":n.substr(0,c-1):e?e.a:n}function BBn(n){NM(n,new MTn(vj(wj(pj(gj(new du,UYn),"ELK DisCo"),"Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."),new at))),u2(n,UYn,XYn,mpn(Ect)),u2(n,UYn,WYn,mpn(pct)),u2(n,UYn,VYn,mpn(lct)),u2(n,UYn,QYn,mpn(vct)),u2(n,UYn,XJn,mpn(kct)),u2(n,UYn,WJn,mpn(yct)),u2(n,UYn,UJn,mpn(jct)),u2(n,UYn,VJn,mpn(mct)),u2(n,UYn,BYn,mpn(wct)),u2(n,UYn,HYn,mpn(bct)),u2(n,UYn,qYn,mpn(dct)),u2(n,UYn,GYn,mpn(gct))}function HBn(n,t,e,i){var r,c,a,u,o,s,h;if(Bl(c=new $vn(n),(uSn(),Iut)),hon(c,(HXn(),ept),(QEn(),XCt)),r=0,t){for(hon(a=new CSn,(hWn(),dlt),t),hon(c,dlt,t.i),qCn(a,(kUn(),CIt)),CZ(a,c),s=0,h=(o=Z0(t.e)).length;s0)if((i-=r.length-t)>=0){for(c.a+="0.";i>qtt.length;i-=qtt.length)Nq(c,qtt);gR(c,qtt,CY(i)),oO(c,r.substr(t))}else oO(c,fx(r,t,CY(i=t-i))),c.a+=".",oO(c,nO(r,CY(i)));else{for(oO(c,r.substr(t));i<-qtt.length;i+=qtt.length)Nq(c,qtt);gR(c,qtt,CY(-i))}return c.a}function zBn(n,t,i,r){var c,a,u,o,s,h,f,l,b;return h=(s=XR(new xC(i.a,i.b),n)).a*t.b-s.b*t.a,f=t.a*r.b-t.b*r.a,l=(s.a*r.b-s.b*r.a)/f,b=h/f,0==f?0==h?(a=W8(n,c=UR(new xC(i.a,i.b),kL(new xC(r.a,r.b),.5))),u=W8(UR(new xC(n.a,n.b),t),c),o=.5*e.Math.sqrt(r.a*r.a+r.b*r.b),a=0&&l<=1&&b>=0&&b<=1?UR(new xC(n.a,n.b),kL(new xC(t.a,t.b),l)):null}function UBn(n,t,e){var i,r,c,a,u;if(i=BB(mMn(n,(HXn(),Ndt)),21),e.a>t.a&&(i.Hc((wEn(),WMt))?n.c.a+=(e.a-t.a)/2:i.Hc(QMt)&&(n.c.a+=e.a-t.a)),e.b>t.b&&(i.Hc((wEn(),YMt))?n.c.b+=(e.b-t.b)/2:i.Hc(JMt)&&(n.c.b+=e.b-t.b)),BB(mMn(n,(hWn(),Zft)),21).Hc((bDn(),lft))&&(e.a>t.a||e.b>t.b))for(u=new Wb(n.a);u.at.a&&(i.Hc((wEn(),WMt))?n.c.a+=(e.a-t.a)/2:i.Hc(QMt)&&(n.c.a+=e.a-t.a)),e.b>t.b&&(i.Hc((wEn(),YMt))?n.c.b+=(e.b-t.b)/2:i.Hc(JMt)&&(n.c.b+=e.b-t.b)),BB(mMn(n,(hWn(),Zft)),21).Hc((bDn(),lft))&&(e.a>t.a||e.b>t.b))for(a=new Wb(n.a);a.at&&(r=0,c+=s.b+e,h.c[h.c.length]=s,tin(s=new x0(c,e),i=new asn(0,s.f,s,e)),r=0),0==i.b.c.length||u.f>=i.o&&u.f<=i.f||.5*i.a<=u.f&&1.5*i.a>=u.f?ybn(i,u):(tin(s,a=new asn(i.s+i.r+e,s.f,s,e)),ybn(a,u)),r=u.i+u.g;return h.c[h.c.length]=s,h}function JBn(n){var t,e,i,r,c,a;if(!n.a){if(n.o=null,a=new gp(n),t=new So,null==(e=P$t).a.zc(n,e)){for(c=new AL(kJ(n));c.e!=c.i.gc();)pX(a,JBn(BB(kpn(c),26)));e.a.Bc(n),e.a.gc()}for(!n.s&&(n.s=new eU(FAt,n,21,17)),r=new AL(n.s);r.e!=r.i.gc();)cL(i=BB(kpn(r),170),322)&&f9(t,BB(i,34));chn(t),n.k=new EH(n,(BB(Wtn(QQ((QX(),t$t).o),7),18),t.i),t.g),pX(a,n.k),chn(a),n.a=new NO((BB(Wtn(QQ(t$t.o),4),18),a.i),a.g),P5(n).b&=-2}return n.a}function YBn(n,t,e,i,r,c,a){var u,o,s,h,f;return h=!1,u=dNn(e.q,t.f+t.b-e.q.f),!((f=r-(e.q.e+u-a))=(l1(c,n.c.length),BB(n.c[c],200)).e,!((s=cHn(i,f,!1).a)>t.b&&!o)&&((o||s<=t.b)&&(o&&s>t.b?(e.d=s,p9(e,FSn(e,s))):(aEn(e.q,u),e.c=!0),p9(i,r-(e.s+e.r)),Tvn(i,e.q.e+e.q.d,t.f),tin(t,i),n.c.length>c&&(Tkn((l1(c,n.c.length),BB(n.c[c],200)),i),0==(l1(c,n.c.length),BB(n.c[c],200)).a.c.length&&s6(n,c)),h=!0),h))}function ZBn(n,t,e,i){var r,c,a,u,o,s,h;if(h=axn(n.e.Tg(),t),r=0,c=BB(n.g,119),o=null,ZM(),BB(t,66).Oj()){for(u=0;un.o.a&&(f=(s-n.o.a)/2,o.b=e.Math.max(o.b,f),o.c=e.Math.max(o.c,f))}}function eHn(n){var t,e,i,r,c,a;for(cA(r=new R0,(Nun(),YTt)),i=new Sb(new Yy(new TT(n,jrn(n,x8(Qtt,sVn,2,0,6,1))).b));i.b0?n.i:0)>t&&s>0&&(a=0,u+=s+n.i,c=e.Math.max(c,b),r+=s+n.i,s=0,b=0,i&&(++l,WB(n.n,new RY(n.s,u,n.i))),o=0),b+=h.g+(o>0?n.i:0),s=e.Math.max(s,h.f),i&&smn(BB(xq(n.n,l),211),h),a+=h.g+(o>0?n.i:0),++o;return c=e.Math.max(c,b),r+=s,i&&(n.r=c,n.d=r,yyn(n.j)),new UV(n.s,n.t,c,r)}function aHn(n,t,e,i,r){var c,a,u,o,s,h,f,l,b;if($T(),SU(n,"src"),SU(e,"dest"),l=tsn(n),o=tsn(e),pH(0!=(4&l.i),"srcType is not an array"),pH(0!=(4&o.i),"destType is not an array"),f=l.c,a=o.c,pH(0!=(1&f.i)?f==a:0==(1&a.i),"Array types don't match"),b=n.length,s=e.length,t<0||i<0||r<0||t+r>b||i+r>s)throw Hp(new fv);if(0==(1&f.i)&&l!=o)if(h=een(n),c=een(e),GI(n)===GI(e)&&ti;)$X(c,u,h[--t]);else for(u=i+r;i0&&_Cn(n,t,e,i,r,!0)}function uHn(){uHn=O,ret=Pun(Gk(ANt,1),hQn,25,15,[_Vn,1162261467,OVn,1220703125,362797056,1977326743,OVn,387420489,AQn,214358881,429981696,815730721,1475789056,170859375,268435456,410338673,612220032,893871739,128e7,1801088541,113379904,148035889,191102976,244140625,308915776,387420489,481890304,594823321,729e6,887503681,OVn,1291467969,1544804416,1838265625,60466176]),cet=Pun(Gk(ANt,1),hQn,25,15,[-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5])}function oHn(n){var t,e,i,r,c,a,u;for(i=new Wb(n.b);i.a=n.b.length?(c[r++]=a.b[i++],c[r++]=a.b[i++]):i>=a.b.length?(c[r++]=n.b[e++],c[r++]=n.b[e++]):a.b[i]0?n.i:0)),++t;for(nwn(n.n,s),n.d=i,n.r=r,n.g=0,n.f=0,n.e=0,n.o=RQn,n.p=RQn,a=new Wb(n.b);a.a0&&(!(r=(!n.n&&(n.n=new eU(zOt,n,1,7)),BB(Wtn(n.n,0),137)).a)||oO(oO((t.a+=' "',t),r),'"'))),!n.b&&(n.b=new hK(KOt,n,4,7)),e=!(n.b.i<=1&&(!n.c&&(n.c=new hK(KOt,n,5,8)),n.c.i<=1)),t.a+=e?" [":" ",oO(t,YL(new mk,new AL(n.b))),e&&(t.a+="]"),t.a+=e1n,e&&(t.a+="["),oO(t,YL(new mk,new AL(n.c))),e&&(t.a+="]"),t.a)}function bHn(n,t){var e,i,r,c,a,u,o;if(n.a){if(o=null,null!=(u=n.a.ne())?t.a+=""+u:null!=(a=n.a.Dj())&&(-1!=(c=GO(a,JTn(91)))?(o=a.substr(c),t.a+=""+fx(null==a?zWn:(kW(a),a),0,c)):t.a+=""+a),n.d&&0!=n.d.i){for(r=!0,t.a+="<",i=new AL(n.d);i.e!=i.i.gc();)e=BB(kpn(i),87),r?r=!1:t.a+=FWn,bHn(e,t);t.a+=">"}null!=o&&(t.a+=""+o)}else n.e?null!=(u=n.e.zb)&&(t.a+=""+u):(t.a+="?",n.b?(t.a+=" super ",bHn(n.b,t)):n.f&&(t.a+=" extends ",bHn(n.f,t)))}function wHn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E,T,M;for(y=n.c,k=t.c,e=E7(y.a,n,0),i=E7(k.a,t,0),v=BB(xwn(n,(ain(),Hvt)).Kc().Pb(),11),T=BB(xwn(n,qvt).Kc().Pb(),11),m=BB(xwn(t,Hvt).Kc().Pb(),11),M=BB(xwn(t,qvt).Kc().Pb(),11),g=Z0(v.e),j=Z0(T.g),p=Z0(m.e),E=Z0(M.g),Qyn(n,i,k),s=0,b=(c=p).length;sh?new zZ((O6(),Myt),i,t,s-h):s>0&&h>0&&(new zZ((O6(),Myt),t,i,0),new zZ(Myt,i,t,0))),a)}function pHn(n,t){var i,r,c,a,u;for(u=new usn(new Pb(n.f.b).a);u.b;){if(c=BB((a=ten(u)).cd(),594),1==t){if(c.gf()!=(Ffn(),HPt)&&c.gf()!=KPt)continue}else if(c.gf()!=(Ffn(),_Pt)&&c.gf()!=FPt)continue;switch(r=BB(BB(a.dd(),46).b,81),i=BB(BB(a.dd(),46).a,189).c,c.gf().g){case 2:r.g.c=n.e.a,r.g.b=e.Math.max(1,r.g.b+i);break;case 1:r.g.c=r.g.c+i,r.g.b=e.Math.max(1,r.g.b-i);break;case 4:r.g.d=n.e.b,r.g.a=e.Math.max(1,r.g.a+i);break;case 3:r.g.d=r.g.d+i,r.g.a=e.Math.max(1,r.g.a-i)}}}function vHn(n,t){var i,r,c,a,u,o,s,h,f,l,b,w,d,g;for(o=x8(ANt,hQn,25,t.b.c.length,15,1),h=x8($ut,$Vn,267,t.b.c.length,0,1),s=x8(Out,a1n,10,t.b.c.length,0,1),b=0,w=(l=n.a).length;b0&&s[r]&&(d=K$(n.b,s[r],c)),g=e.Math.max(g,c.c.c.b+d);for(a=new Wb(f.e);a.a1)throw Hp(new _y(I7n));o||(c=Z3(t,i.Kc().Pb()),a.Fc(c))}return oon(n,EPn(n,t,e),a)}function EHn(n,t){var e,i,r,c;for(Qtn(t.b.j),YT($V(new Rq(null,new w1(t.d,16)),new cc),new ac),c=new Wb(t.d);c.an.o.b)return!1;if(e=abn(n,oIt),t.d+t.a+(e.gc()-1)*r>n.o.b)return!1}return!0}function $Hn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w;if(a=n.e,o=t.e,0==a)return t;if(0==o)return n;if((c=n.d)+(u=t.d)==2)return e=e0(n.a[0],UQn),i=e0(t.a[0],UQn),a==o?(w=dG(h=rbn(e,i)),0==(b=dG(jz(h,32)))?new X6(a,w):new lU(a,2,Pun(Gk(ANt,1),hQn,25,15,[w,b]))):npn(a<0?ibn(i,e):ibn(e,i));if(a==o)l=a,f=c>=u?N8(n.a,c,t.a,u):N8(t.a,u,n.a,c);else{if(0==(r=c!=u?c>u?1:-1:Msn(n.a,t.a,c)))return ODn(),eet;1==r?(l=a,f=d6(n.a,c,t.a,u)):(l=o,f=d6(t.a,u,n.a,c))}return X0(s=new lU(l,f.length,f)),s}function LHn(n,t,i,r,c,a,u){var o,s,h,f,l,b,w;return l=qy(TD(mMn(t,(HXn(),Ogt)))),b=null,a==(ain(),Hvt)&&r.c.i==i?b=r.c:a==qvt&&r.d.i==i&&(b=r.d),(h=u)&&l&&!b?(WB(h.e,r),w=e.Math.max(Gy(MD(mMn(h.d,agt))),Gy(MD(mMn(r,agt)))),hon(h.d,agt,w)):(kUn(),f=PIt,b?f=b.j:vA(BB(mMn(i,ept),98))&&(f=a==Hvt?CIt:oIt),s=xHn(n,t,i,a,f,r),o=W5((vW(i),r)),a==Hvt?(SZ(o,BB(xq(s.j,0),11)),MZ(o,c)):(SZ(o,c),MZ(o,BB(xq(s.j,0),11))),h=new zfn(r,o,s,BB(mMn(s,(hWn(),dlt)),11),a,!b)),YIn(n.a,r,new L_(h.d,t,a)),h}function NHn(n,t){var e,i,r,c,a,u,o,s,h,f;if(h=null,n.d&&(h=BB(SY(n.d,t),138)),!h){if(f=(c=n.a.Mh()).i,!n.d||NT(n.d)!=f){for(o=new xp,n.d&&Tcn(o,n.d),u=s=o.f.c+o.g.c;u0?(b=(w-1)*e,u&&(b+=i),h&&(b+=i),b=n.b[r+1])r+=2;else{if(!(e0)for(i=new t_(BB(h6(n.a,c),21)),SQ(),m$(i,new _w(t)),r=new M2(c.b,0);r.bk)?(s=2,u=DWn):0==s?(s=1,u=E):(s=0,u=E):(b=E>=u||u-E0?1:zO(isNaN(r),isNaN(0)))>=0^(rin(A3n),(e.Math.abs(o)<=A3n||0==o||isNaN(o)&&isNaN(0)?0:o<0?-1:o>0?1:zO(isNaN(o),isNaN(0)))>=0)?e.Math.max(o,r):(rin(A3n),(e.Math.abs(r)<=A3n||0==r||isNaN(r)&&isNaN(0)?0:r<0?-1:r>0?1:zO(isNaN(r),isNaN(0)))>0?e.Math.sqrt(o*o+r*r):-e.Math.sqrt(o*o+r*r))}function tqn(n,t){var e,i,r,c,a;if(t)if(!n.a&&(n.a=new _v),2!=n.e)if(1!=t.e)0!=(a=n.a.a.c.length)?0!=(c=BB(bW(n.a,a-1),117)).e&&10!=c.e||0!=t.e&&10!=t.e?Cv(n.a,t):(0==t.e||t.bm().length,0==c.e?(e=new Pk,(i=c._l())>=BQn?cO(e,Xln(i)):NX(e,i&QVn),c=new vY(10,null,0),kU(n.a,c,a-1)):(c.bm().length,cO(e=new Pk,c.bm())),0==t.e?(i=t._l())>=BQn?cO(e,Xln(i)):NX(e,i&QVn):cO(e,t.bm()),BB(c,521).b=e.a):Cv(n.a,t);else for(r=0;r0&&i>=-6?i>=0?kZ(c,e-CY(n.e),String.fromCharCode(46)):(c.a=fx(c.a,0,t-1)+"0."+nO(c.a,t-1),kZ(c,t+1,Bdn(qtt,0,-CY(i)-1))):(e-t>=1&&(kZ(c,t,String.fromCharCode(46)),++e),kZ(c,e,String.fromCharCode(69)),i>0&&kZ(c,++e,String.fromCharCode(43)),kZ(c,++e,""+vz(fan(i)))),n.g=c.a,n.g))}function iqn(n,t,e){var i,r,c,a,u,o,s,h,f,l,b;if(!e.dc()){for(a=0,h=0,l=BB((i=e.Kc()).Pb(),19).a;a1&&(o=s.mg(o,n.a,u));return 1==o.c.length?BB(xq(o,o.c.length-1),220):2==o.c.length?FHn((l1(0,o.c.length),BB(o.c[0],220)),(l1(1,o.c.length),BB(o.c[1],220)),a,c):null}function uqn(n){var t,i,r,c,a,u;for(Otn(n.a,new nt),i=new Wb(n.a);i.a=e.Math.abs(r.b)?(r.b=0,a.d+a.a>u.d&&a.du.c&&a.c0){if(t=new DI(n.i,n.g),c=(e=n.i)<100?null:new Fj(e),n.ij())for(i=0;i0){for(u=n.g,s=n.i,a6(n),c=s<100?null:new Fj(s),i=0;i>13|(15&n.m)<<9,r=n.m>>4&8191,c=n.m>>17|(255&n.h)<<5,a=(1048320&n.h)>>8,g=i*(u=8191&t.l),p=r*u,v=c*u,m=a*u,0!=(o=t.l>>13|(15&t.m)<<9)&&(g+=e*o,p+=i*o,v+=r*o,m+=c*o),0!=(s=t.m>>4&8191)&&(p+=e*s,v+=i*s,m+=r*s),0!=(h=t.m>>17|(255&t.h)<<5)&&(v+=e*h,m+=i*h),0!=(f=(1048320&t.h)>>8)&&(m+=e*f),b=((d=e*u)>>22)+(g>>9)+((262143&p)<<4)+((31&v)<<17),w=(p>>18)+(v>>5)+((4095&m)<<8),w+=(b+=(l=(d&SQn)+((511&g)<<13))>>22)>>22,M$(l&=SQn,b&=SQn,w&=PQn)}function lqn(n){var t,i,r,c,a,u,o;if(0!=(o=BB(xq(n.j,0),11)).g.c.length&&0!=o.e.c.length)throw Hp(new Fy("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges."));if(0!=o.g.c.length){for(a=RQn,i=new Wb(o.g);i.a4){if(!n.wj(t))return!1;if(n.rk()){if(u=(e=(i=BB(t,49)).Ug())==n.e&&(n.Dk()?i.Og(i.Vg(),n.zk())==n.Ak():-1-i.Vg()==n.aj()),n.Ek()&&!u&&!e&&i.Zg())for(r=0;r0&&(s=n.n.a/c);break;case 2:case 4:(r=n.i.o.b)>0&&(s=n.n.b/r)}hon(n,(hWn(),Tlt),s)}if(o=n.o,a=n.a,i)a.a=i.a,a.b=i.b,n.d=!0;else if(t!=QCt&&t!=JCt&&u!=PIt)switch(u.g){case 1:a.a=o.a/2;break;case 2:a.a=o.a,a.b=o.b/2;break;case 3:a.a=o.a/2,a.b=o.b;break;case 4:a.b=o.b/2}else a.a=o.a/2,a.b=o.b/2}function vqn(n){var t,e,i,r,c,a,u,o,s,h;if(n.ej())if(h=n.Vi(),o=n.fj(),h>0)if(t=new jcn(n.Gi()),c=(e=h)<100?null:new Fj(e),YD(n,e,t.g),r=1==e?n.Zi(4,Wtn(t,0),null,0,o):n.Zi(6,t,null,-1,o),n.bj()){for(i=new AL(t);i.e!=i.i.gc();)c=n.dj(kpn(i),c);c?(c.Ei(r),c.Fi()):n.$i(r)}else c?(c.Ei(r),c.Fi()):n.$i(r);else YD(n,n.Vi(),n.Wi()),n.$i(n.Zi(6,(SQ(),set),null,-1,o));else if(n.bj())if((h=n.Vi())>0){for(u=n.Wi(),s=h,YD(n,h,u),c=s<100?null:new Fj(s),i=0;in.d[r.p]&&(e+=n5(n.b,i)*BB(a.b,19).a,d3(n.a,iln(i)));for(;!Wy(n.a);)Mnn(n.b,BB(dU(n.a),19).a)}return e}function kqn(n,t,i,r){var c,a,u,o,s,h,f,l,b,w;for((f=new wA(BB(ZAn(n,(SMn(),HMt)),8))).a=e.Math.max(f.a-i.b-i.c,0),f.b=e.Math.max(f.b-i.d-i.a,0),(null==(c=MD(ZAn(n,DMt)))||(kW(c),c<=0))&&(c=1.3),u=new Np,l=new AL((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a));l.e!=l.i.gc();)a=new zx(BB(kpn(l),33)),u.c[u.c.length]=a;switch(BB(ZAn(n,RMt),311).g){case 3:w=aFn(u,t,f.a,f.b,(s=r,kW(c),s));break;case 1:w=vBn(u,t,f.a,f.b,(h=r,kW(c),h));break;default:w=Mqn(u,t,f.a,f.b,(o=r,kW(c),o))}KUn(n,(b=yXn(new Gtn(w),t,i,f.a,f.b,r,(kW(c),c))).a,b.b,!1,!0)}function jqn(n,t){var e,i,r,c;c=new t_((e=t.b).j),r=0,(i=e.j).c=x8(Ant,HWn,1,0,5,1),eX(BB(gan(n.b,(kUn(),sIt),(Crn(),Rst)),15),e),r=Ymn(c,r,new xr,i),eX(BB(gan(n.b,sIt,Dst),15),e),r=Ymn(c,r,new Nr,i),eX(BB(gan(n.b,sIt,xst),15),e),eX(BB(gan(n.b,oIt,Rst),15),e),eX(BB(gan(n.b,oIt,Dst),15),e),r=Ymn(c,r,new Dr,i),eX(BB(gan(n.b,oIt,xst),15),e),eX(BB(gan(n.b,SIt,Rst),15),e),r=Ymn(c,r,new Rr,i),eX(BB(gan(n.b,SIt,Dst),15),e),r=Ymn(c,r,new Kr,i),eX(BB(gan(n.b,SIt,xst),15),e),eX(BB(gan(n.b,CIt,Rst),15),e),r=Ymn(c,r,new Qr,i),eX(BB(gan(n.b,CIt,Dst),15),e),eX(BB(gan(n.b,CIt,xst),15),e)}function Eqn(n,t){var i,r,c,a,u,o,s,h,f,l,b,w,d,g;for(OTn(t,"Layer size calculation",1),f=RQn,h=KQn,c=!1,o=new Wb(n.b);o.a.5?p-=2*a*(w-.5):w<.5&&(p+=2*c*(.5-w)),p<(r=u.d.b)&&(p=r),d=u.d.c,p>g.a-d-h&&(p=g.a-d-h),u.n.a=t+p}}function Mqn(n,t,e,i,r){var c,a,u,o,s,h,f,l,b;for(u=x8(xNt,qQn,25,n.c.length,15,1),ikn(l=new Xz(new Uu),n),s=0,b=new Np;0!=l.b.c.length;)if(a=BB(0==l.b.c.length?null:xq(l.b,0),157),s>1&&iG(a)*eG(a)/2>u[0]){for(c=0;cu[c];)++c;f=new Gtn(new s1(b,0,c+1)),h=iG(a)/eG(a),o=yXn(f,t,new bm,e,i,r,h),UR(kO(f.e),o),F8(eMn(l,f)),ikn(l,new s1(b,c+1,b.c.length)),b.c=x8(Ant,HWn,1,0,5,1),s=0,jG(u,u.length,0)}else null!=(0==l.b.c.length?null:xq(l.b,0))&&hrn(l,0),s>0&&(u[s]=u[s-1]),u[s]+=iG(a)*eG(a),++s,b.c[b.c.length]=a;return b}function Sqn(n){var t,e,i;if((e=BB(mMn(n,(HXn(),kgt)),163))==(Tbn(),Flt)){for(t=new oz(ZL(fbn(n).a.Kc(),new h));dAn(t);)if(!X5(BB(U5(t),17)))throw Hp(new rk(P1n+gyn(n)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. FIRST_SEPARATE nodes must not have incoming edges."))}else if(e==Hlt)for(i=new oz(ZL(lbn(n).a.Kc(),new h));dAn(i);)if(!X5(BB(U5(i),17)))throw Hp(new rk(P1n+gyn(n)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. LAST_SEPARATE nodes must not have outgoing edges."))}function Pqn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b;for(OTn(t,"Label dummy removal",1),i=Gy(MD(mMn(n,(HXn(),jpt)))),r=Gy(MD(mMn(n,Spt))),o=BB(mMn(n,Udt),103),u=new Wb(n.b);u.a0&&lPn(n,u,h);for(r=new Wb(h);r.a>19!=0&&(t=aon(t),o=!o),a=OLn(t),c=!1,r=!1,i=!1,n.h==CQn&&0==n.m&&0==n.l){if(r=!0,c=!0,-1!=a)return u=jAn(n,a),o&&Oon(u),e&&(ltt=M$(0,0,0)),u;n=WO((X7(),btt)),i=!0,o=!o}else n.h>>19!=0&&(c=!0,n=aon(n),i=!0,o=!o);return-1!=a?Bon(n,a,o,c,e):Kkn(n,t)<0?(e&&(ltt=c?aon(n):M$(n.l,n.m,n.h)),M$(0,0,0)):h_n(i?n:M$(n.l,n.m,n.h),t,o,c,r,e)}function $qn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w;if(n.e&&n.c.ct.f||t.g>n.f)){for(e=0,i=0,a=n.w.a.ec().Kc();a.Ob();)r=BB(a.Pb(),11),phn(Aon(Pun(Gk(PMt,1),sVn,8,0,[r.i.n,r.n,r.a])).b,t.g,t.f)&&++e;for(u=n.r.a.ec().Kc();u.Ob();)r=BB(u.Pb(),11),phn(Aon(Pun(Gk(PMt,1),sVn,8,0,[r.i.n,r.n,r.a])).b,t.g,t.f)&&--e;for(o=t.w.a.ec().Kc();o.Ob();)r=BB(o.Pb(),11),phn(Aon(Pun(Gk(PMt,1),sVn,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&++i;for(c=t.r.a.ec().Kc();c.Ob();)r=BB(c.Pb(),11),phn(Aon(Pun(Gk(PMt,1),sVn,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&--i;e=0)return r=dbn(n,t.substr(1,c-1)),JUn(n,t.substr(c+1,u-(c+1)),r)}else{if(e=-1,null==Ett&&(Ett=new RegExp("\\d")),Ett.test(String.fromCharCode(a))&&(e=MK(t,JTn(46),u-1))>=0){i=BB(V5(n,Ptn(n,t.substr(1,e-1)),!1),58),o=0;try{o=l_n(t.substr(e+1),_Vn,DWn)}catch(h){throw cL(h=lun(h),127)?Hp(new L7(h)):Hp(h)}if(o=0)return e;switch(DW(B7(n,e))){case 2:if(mK("",Cfn(n,e.Hj()).ne())){if(o=m$n(n,t,u=jV(B7(n,e)),kV(B7(n,e))))return o;for(a=0,s=(r=jKn(n,t)).gc();a1)throw Hp(new _y(I7n));for(h=axn(n.e.Tg(),t),i=BB(n.g,119),a=0;a1,h=new m6(b.b);y$(h.a)||y$(h.b);)l=(s=BB(y$(h.a)?n0(h.a):n0(h.b),17)).c==b?s.d:s.c,e.Math.abs(Aon(Pun(Gk(PMt,1),sVn,8,0,[l.i.n,l.n,l.a])).b-u.b)>1&&pxn(n,s,u,a,b)}}function zqn(n){var t,i,r,c,a,u;if(c=new M2(n.e,0),r=new M2(n.a,0),n.d)for(i=0;iD3n;){for(a=t,u=0;e.Math.abs(t-a)0),c.a.Xb(c.c=--c.b),DFn(n,n.b-u,a,r,c),Px(c.b0),r.a.Xb(r.c=--r.b)}if(!n.d)for(i=0;i0?(n.f[s.p]=l/(s.e.c.length+s.g.c.length),n.c=e.Math.min(n.c,n.f[s.p]),n.b=e.Math.max(n.b,n.f[s.p])):u&&(n.f[s.p]=l)}}function Wqn(n){n.b=null,n.bb=null,n.fb=null,n.qb=null,n.a=null,n.c=null,n.d=null,n.e=null,n.f=null,n.n=null,n.M=null,n.L=null,n.Q=null,n.R=null,n.K=null,n.db=null,n.eb=null,n.g=null,n.i=null,n.j=null,n.k=null,n.gb=null,n.o=null,n.p=null,n.q=null,n.r=null,n.$=null,n.ib=null,n.S=null,n.T=null,n.t=null,n.s=null,n.u=null,n.v=null,n.w=null,n.B=null,n.A=null,n.C=null,n.D=null,n.F=null,n.G=null,n.H=null,n.I=null,n.J=null,n.P=null,n.Z=null,n.U=null,n.V=null,n.W=null,n.X=null,n.Y=null,n._=null,n.ab=null,n.cb=null,n.hb=null,n.nb=null,n.lb=null,n.mb=null,n.ob=null,n.pb=null,n.jb=null,n.kb=null,n.N=!1,n.O=!1}function Vqn(n,t,e){var i,r;for(OTn(e,"Graph transformation ("+n.a+")",1),r=a0(t.a),i=new Wb(t.b);i.a0&&(n.a=u+(l-1)*r,t.c.b+=n.a,t.f.b+=n.a),0!=b.a.gc()&&(l=AGn(new fX(1,r),t,b,w,t.f.b+u-t.c.b))>0&&(t.f.b+=u+(l-1)*r)}function Jqn(n,t){var e,i,r,c;c=n.F,null==t?(n.F=null,Dsn(n,null)):(n.F=(kW(t),t),-1!=(i=GO(t,JTn(60)))?(r=t.substr(0,i),-1==GO(t,JTn(46))&&!mK(r,$Wn)&&!mK(r,S9n)&&!mK(r,P9n)&&!mK(r,C9n)&&!mK(r,I9n)&&!mK(r,O9n)&&!mK(r,A9n)&&!mK(r,$9n)&&(r=L9n),-1!=(e=mN(t,JTn(62)))&&(r+=""+t.substr(e+1)),Dsn(n,r)):(r=t,-1==GO(t,JTn(46))&&(-1!=(i=GO(t,JTn(91)))&&(r=t.substr(0,i)),mK(r,$Wn)||mK(r,S9n)||mK(r,P9n)||mK(r,C9n)||mK(r,I9n)||mK(r,O9n)||mK(r,A9n)||mK(r,$9n)?r=t:(r=L9n,-1!=i&&(r+=""+t.substr(i)))),Dsn(n,r),r==t&&(n.F=n.D))),0!=(4&n.Db)&&0==(1&n.Db)&&ban(n,new nU(n,1,5,c,t))}function Yqn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m;if(!((d=t.b.c.length)<3)){for(b=x8(ANt,hQn,25,d,15,1),f=0,h=new Wb(t.b);h.aa)&&TU(n.b,BB(g.b,17));++u}c=a}}}function Zqn(n,t){var e;if(null==t||mK(t,zWn))return null;if(0==t.length&&n.k!=(PPn(),pMt))return null;switch(n.k.g){case 1:return mgn(t,a5n)?(hN(),vtt):mgn(t,u5n)?(hN(),ptt):null;case 2:try{return iln(l_n(t,_Vn,DWn))}catch(i){if(cL(i=lun(i),127))return null;throw Hp(i)}case 4:try{return bSn(t)}catch(i){if(cL(i=lun(i),127))return null;throw Hp(i)}case 3:return t;case 5:return rhn(n),HIn(n,t);case 6:return rhn(n),K$n(n,n.a,t);case 7:try{return(e=rAn(n)).Jf(t),e}catch(i){if(cL(i=lun(i),32))return null;throw Hp(i)}default:throw Hp(new Fy("Invalid type set for this layout option."))}}function nGn(n){var t,e,i,r,c,a,u;for(Dnn(),u=new Vv,e=new Wb(n);e.a=u.b.c)&&(u.b=t),(!u.c||t.c<=u.c.c)&&(u.d=u.c,u.c=t),(!u.e||t.d>=u.e.d)&&(u.e=t),(!u.f||t.d<=u.f.d)&&(u.f=t);return i=new Tpn((Aun(),Zat)),i2(n,out,new Yy(Pun(Gk(Yat,1),HWn,369,0,[i]))),a=new Tpn(eut),i2(n,uut,new Yy(Pun(Gk(Yat,1),HWn,369,0,[a]))),r=new Tpn(nut),i2(n,aut,new Yy(Pun(Gk(Yat,1),HWn,369,0,[r]))),c=new Tpn(tut),i2(n,cut,new Yy(Pun(Gk(Yat,1),HWn,369,0,[c]))),xLn(i.c,Zat),xLn(r.c,nut),xLn(c.c,tut),xLn(a.c,eut),u.a.c=x8(Ant,HWn,1,0,5,1),gun(u.a,i.c),gun(u.a,ean(r.c)),gun(u.a,c.c),gun(u.a,ean(a.c)),u}function tGn(n){var t;switch(n.d){case 1:if(n.hj())return-2!=n.o;break;case 2:if(n.hj())return-2==n.o;break;case 3:case 5:case 4:case 6:case 7:return n.o>-2;default:return!1}switch(t=n.gj(),n.p){case 0:return null!=t&&qy(TD(t))!=YI(n.k,0);case 1:return null!=t&&BB(t,217).a!=dG(n.k)<<24>>24;case 2:return null!=t&&BB(t,172).a!=(dG(n.k)&QVn);case 6:return null!=t&&YI(BB(t,162).a,n.k);case 5:return null!=t&&BB(t,19).a!=dG(n.k);case 7:return null!=t&&BB(t,184).a!=dG(n.k)<<16>>16;case 3:return null!=t&&Gy(MD(t))!=n.j;case 4:return null!=t&&BB(t,155).a!=n.j;default:return null==t?null!=n.n:!Nfn(t,n.n)}}function eGn(n,t,e){var i,r,c,a;return n.Fk()&&n.Ek()&&GI(a=Gz(n,BB(e,56)))!==GI(e)?(n.Oi(t),n.Ui(t,B9(n,t,a)),n.rk()&&(r=BB(e,49),c=n.Dk()?n.Bk()?r.ih(n.b,Cvn(BB(itn(jJ(n.b),n.aj()),18)).n,BB(itn(jJ(n.b),n.aj()).Yj(),26).Bj(),null):r.ih(n.b,Awn(r.Tg(),Cvn(BB(itn(jJ(n.b),n.aj()),18))),null,null):r.ih(n.b,-1-n.aj(),null,null),!BB(a,49).eh()&&(i=BB(a,49),c=n.Dk()?n.Bk()?i.gh(n.b,Cvn(BB(itn(jJ(n.b),n.aj()),18)).n,BB(itn(jJ(n.b),n.aj()).Yj(),26).Bj(),c):i.gh(n.b,Awn(i.Tg(),Cvn(BB(itn(jJ(n.b),n.aj()),18))),null,c):i.gh(n.b,-1-n.aj(),null,c)),c&&c.Fi()),mA(n.b)&&n.$i(n.Zi(9,e,a,t,!1)),a):e}function iGn(n,t,i){var r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k;for(f=Gy(MD(mMn(n,(HXn(),Ept)))),r=Gy(MD(mMn(n,Rpt))),hon(b=new Ju,Ept,f+r),v=(h=t).d,g=h.c.i,m=h.d.i,p=tA(g.c),y=tA(m.c),c=new Np,l=p;l<=y;l++)Bl(o=new $vn(n),(uSn(),Put)),hon(o,(hWn(),dlt),h),hon(o,ept,(QEn(),XCt)),hon(o,Mpt,b),w=BB(xq(n.b,l),29),l==p?Qyn(o,w.a.c.length-i,w):PZ(o,w),(k=Gy(MD(mMn(h,agt))))<0&&hon(h,agt,k=0),o.o.b=k,d=e.Math.floor(k/2),qCn(u=new CSn,(kUn(),CIt)),CZ(u,o),u.n.b=d,qCn(s=new CSn,oIt),CZ(s,o),s.n.b=d,MZ(h,u),qan(a=new wJ,h),hon(a,vgt,null),SZ(a,s),MZ(a,v),zkn(o,h,a),c.c[c.c.length]=a,h=a;return c}function rGn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g;for(u=BB(DSn(n,(kUn(),CIt)).Kc().Pb(),11).e,f=BB(DSn(n,oIt).Kc().Pb(),11).g,a=u.c.length,g=g1(BB(xq(n.j,0),11));a-- >0;){for(l1(0,u.c.length),b=BB(u.c[0],17),l1(0,f.c.length),r=E7((i=BB(f.c[0],17)).d.e,i,0),A2(b,i.d,r),SZ(i,null),MZ(i,null),l=b.a,t&&DH(l,new wA(g)),e=spn(i.a,0);e.b!=e.d.c;)DH(l,new wA(BB(b3(e),8)));for(d=b.b,h=new Wb(i.b);h.a0&&(u=e.Math.max(u,lcn(n.C.b+r.d.b,c))),f=r,l=c,b=a;n.C&&n.C.c>0&&(w=b+n.C.c,h&&(w+=f.d.c),u=e.Math.max(u,(h$(),rin(fYn),e.Math.abs(l-1)<=fYn||1==l||isNaN(l)&&isNaN(1)?0:w/(1-l)))),i.n.b=0,i.a.a=u}function aGn(n,t){var i,r,c,a,u,o,s,h,f,l,b,w;if(i=BB(oV(n.b,t),124),(s=BB(BB(h6(n.r,t),21),84)).dc())return i.n.d=0,void(i.n.a=0);for(h=n.u.Hc((lIn(),eIt)),u=0,n.A.Hc((mdn(),_It))&&kRn(n,t),o=s.Kc(),f=null,b=0,l=0;o.Ob();)a=Gy(MD((r=BB(o.Pb(),111)).b.We((DN(),Lrt)))),c=r.b.rf().b,f?(w=l+f.d.a+n.w+r.d.d,u=e.Math.max(u,(h$(),rin(fYn),e.Math.abs(b-a)<=fYn||b==a||isNaN(b)&&isNaN(a)?0:w/(a-b)))):n.C&&n.C.d>0&&(u=e.Math.max(u,lcn(n.C.d+r.d.d,a))),f=r,b=a,l=c;n.C&&n.C.a>0&&(w=l+n.C.a,h&&(w+=f.d.a),u=e.Math.max(u,(h$(),rin(fYn),e.Math.abs(b-1)<=fYn||1==b||isNaN(b)&&isNaN(1)?0:w/(1-b)))),i.n.d=0,i.a.b=u}function uGn(n,t,e){var i,r,c,a,u,o;for(this.g=n,u=t.d.length,o=e.d.length,this.d=x8(Out,a1n,10,u+o,0,1),a=0;a0?Ytn(this,this.f/this.a):null!=lL(t.g,t.d[0]).a&&null!=lL(e.g,e.d[0]).a?Ytn(this,(Gy(lL(t.g,t.d[0]).a)+Gy(lL(e.g,e.d[0]).a))/2):null!=lL(t.g,t.d[0]).a?Ytn(this,lL(t.g,t.d[0]).a):null!=lL(e.g,e.d[0]).a&&Ytn(this,lL(e.g,e.d[0]).a)}function oGn(n,t){var e,i,r,c,a,u,o,s,h;for(n.a=new BX($cn(WPt)),i=new Wb(t.a);i.a=1&&(g-a>0&&f>=0?(o.n.a+=d,o.n.b+=c*a):g-a<0&&h>=0&&(o.n.a+=d*g,o.n.b+=c));n.o.a=t.a,n.o.b=t.b,hon(n,(HXn(),Fgt),(mdn(),new JK(i=BB(Vj(JIt),9),BB(SR(i,i.length),9),0)))}function wGn(n,t,e,i,r,c){if(null!=t&&Xbn(t,AAt,$At))throw Hp(new _y("invalid scheme: "+t));if(!(n||null!=e&&-1==GO(e,JTn(35))&&e.length>0&&(b1(0,e.length),47!=e.charCodeAt(0))))throw Hp(new _y("invalid opaquePart: "+e));if(n&&(null==t||!xT(jAt,t.toLowerCase()))&&null!=e&&Xbn(e,LAt,NAt))throw Hp(new _y(o9n+e));if(n&&null!=t&&xT(jAt,t.toLowerCase())&&!CEn(e))throw Hp(new _y(o9n+e));if(!Ubn(i))throw Hp(new _y("invalid device: "+i));if(!Rhn(r))throw Hp(new _y(null==r?"invalid segments: null":"invalid segment: "+shn(r)));if(null!=c&&-1!=GO(c,JTn(35)))throw Hp(new _y("invalid query: "+c))}function dGn(n,t){var i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v;for(OTn(t,"Calculate Graph Size",1),t.n&&n&&y0(t,o2(n),(Bsn(),uOt)),o=ZYn,s=ZYn,a=n4n,u=n4n,l=new AL((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a));l.e!=l.i.gc();)d=(h=BB(kpn(l),33)).i,g=h.j,v=h.g,r=h.f,c=BB(ZAn(h,(sWn(),$St)),142),o=e.Math.min(o,d-c.b),s=e.Math.min(s,g-c.d),a=e.Math.max(a,d+v+c.c),u=e.Math.max(u,g+r+c.a);for(b=new xC(o-(w=BB(ZAn(n,(sWn(),XSt)),116)).b,s-w.d),f=new AL((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a));f.e!=f.i.gc();)Pen(h=BB(kpn(f),33),h.i-b.a),Cen(h,h.j-b.b);p=a-o+(w.b+w.c),i=u-s+(w.d+w.a),Sen(n,p),Men(n,i),t.n&&n&&y0(t,o2(n),(Bsn(),uOt))}function gGn(n){var t,e,i,r,c,a,u,o,s,h;for(i=new Np,a=new Wb(n.e.a);a.a0?(Ppn(n,e,0),e.a+=String.fromCharCode(i),Ppn(n,e,r=cgn(t,c)),c+=r-1):39==i?c+11)for(d=x8(ANt,hQn,25,n.b.b.c.length,15,1),f=0,h=new Wb(n.b.b);h.a=u&&r<=o)u<=r&&c<=o?(e[h++]=r,e[h++]=c,i+=2):u<=r?(e[h++]=r,e[h++]=o,n.b[i]=o+1,a+=2):c<=o?(e[h++]=u,e[h++]=c,i+=2):(e[h++]=u,e[h++]=o,n.b[i]=o+1);else{if(!(oKVn)&&o<10);tj(n.c,new Et),yGn(n),IU(n.c),fGn(n.f)}function EGn(n,t,e){var i,r,c,a,u,o,s,h,f,l;if(qy(TD(mMn(e,(HXn(),wgt)))))for(r=new Wb(e.j);r.a=2){for(a=BB(b3(o=spn(e,0)),8),u=BB(b3(o),8);u.a0&&Uun(o,!0,(Ffn(),FPt)),a.k==(uSn(),Mut)&&wV(o),VW(n.f,a,t)):((s=(i=BB(iJ(hbn(a)),17)).c.i)==a&&(s=i.d.i),f=new rI(s,XR(B$(a.n),s.n)),VW(n.b,a,f))}function PGn(n,t,i){var r,c,a,u,o,s,h,f;switch(OTn(i,"Node promotion heuristic",1),n.g=t,yUn(n),n.q=BB(mMn(t,(HXn(),Sgt)),260),f=BB(mMn(n.g,Mgt),19).a,a=new hi,n.q.g){case 2:case 1:default:_Hn(n,a);break;case 3:for(n.q=(sNn(),Ovt),_Hn(n,a),s=0,o=new Wb(n.a);o.an.j&&(n.q=Tvt,_Hn(n,a));break;case 4:for(n.q=(sNn(),Ovt),_Hn(n,a),h=0,c=new Wb(n.b);c.an.k&&(n.q=Pvt,_Hn(n,a));break;case 6:_Hn(n,new od(CY(e.Math.ceil(n.f.length*f/100))));break;case 5:_Hn(n,new sd(CY(e.Math.ceil(n.d*f/100))))}oDn(n,t),HSn(i)}function CGn(n,t,e){var i,r,c,a;this.j=n,this.e=qEn(n),this.o=this.j.e,this.i=!!this.o,this.p=this.i?BB(xq(e,vW(this.o).p),214):null,r=BB(mMn(n,(hWn(),Zft)),21),this.g=r.Hc((bDn(),lft)),this.b=new Np,this.d=new wdn(this.e),a=BB(mMn(this.j,Slt),230),this.q=Han(t,a,this.e),this.k=new aZ(this),c=u6(Pun(Gk(jst,1),HWn,225,0,[this,this.d,this.k,this.q])),t!=(oin(),Omt)||qy(TD(mMn(n,(HXn(),xdt))))?t==Omt&&qy(TD(mMn(n,(HXn(),xdt))))?(i=new UEn(this.e),c.c[c.c.length]=i,this.c=new prn(i,a,BB(this.q,402))):this.c=new vP(t,this):(i=new UEn(this.e),c.c[c.c.length]=i,this.c=new G2(i,a,BB(this.q,402))),WB(c,this.c),CHn(c,this.e),this.s=wXn(this.k)}function IGn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v;for(l=(s=BB(iL(new wg(spn(new bg(t).a.d,0))),86))?BB(mMn(s,(qqn(),ckt)),86):null,r=1;s&&l;){for(a=0,v=0,e=s,i=l,c=0;c=n.i?(++n.i,WB(n.a,iln(1)),WB(n.b,s)):(i=n.c[t.p][1],c5(n.a,o,iln(BB(xq(n.a,o),19).a+1-i)),c5(n.b,o,Gy(MD(xq(n.b,o)))+s-i*n.e)),(n.q==(sNn(),Tvt)&&(BB(xq(n.a,o),19).a>n.j||BB(xq(n.a,o-1),19).a>n.j)||n.q==Pvt&&(Gy(MD(xq(n.b,o)))>n.k||Gy(MD(xq(n.b,o-1)))>n.k))&&(u=!1),c=new oz(ZL(fbn(t).a.Kc(),new h));dAn(c);)a=BB(U5(c),17).c.i,n.f[a.p]==o&&(r+=BB((f=OGn(n,a)).a,19).a,u=u&&qy(TD(f.b)));return n.f[t.p]=o,new rI(iln(r+=n.c[t.p][0]),(hN(),!!u))}function AGn(n,t,i,r,c){var a,u,o,s,h,f,l,b,w,d,g,p,v;for(l=new xp,u=new Np,rIn(n,i,n.d.fg(),u,l),rIn(n,r,n.d.gg(),u,l),n.b=.2*(g=BAn(wnn(new Rq(null,new w1(u,16)),new Sa)),p=BAn(wnn(new Rq(null,new w1(u,16)),new Pa)),e.Math.min(g,p)),a=0,o=0;o=2&&(v=QLn(u,!0,b),!n.e&&(n.e=new lg(n)),sgn(n.e,v,u,n.b)),iTn(u,b),czn(u),w=-1,f=new Wb(u);f.au)}function NGn(n,t){var i,r,c,a,u,o,s,h,f,l,b,w,d,g;for(i=BB(mMn(n,(HXn(),ept)),98),u=n.f,a=n.d,o=u.a+a.b+a.c,s=0-a.d-n.c.b,f=u.b+a.d+a.a-n.c.b,h=new Np,l=new Np,c=new Wb(t);c.a0),c=BB(s.a.Xb(s.c=--s.b),17);c!=i&&s.b>0;)n.a[c.p]=!0,n.a[i.p]=!0,Px(s.b>0),c=BB(s.a.Xb(s.c=--s.b),17);s.b>0&&fW(s)}}function qGn(n,t,e){var i,r,c,a,u,o,s,h,f;if(n.a!=t.Aj())throw Hp(new _y(d6n+t.ne()+g6n));if(i=Cfn((IPn(),Z$t),t).$k())return i.Aj().Nh().Ih(i,e);if(a=Cfn(Z$t,t).al()){if(null==e)return null;if((u=BB(e,15)).dc())return"";for(f=new Sk,c=u.Kc();c.Ob();)r=c.Pb(),cO(f,a.Aj().Nh().Ih(a,r)),f.a+=" ";return KO(f,f.a.length-1)}if(!(h=Cfn(Z$t,t).bl()).dc()){for(s=h.Kc();s.Ob();)if((o=BB(s.Pb(),148)).wj(e))try{if(null!=(f=o.Aj().Nh().Ih(o,e)))return f}catch(l){if(!cL(l=lun(l),102))throw Hp(l)}throw Hp(new _y("Invalid value: '"+e+"' for datatype :"+t.ne()))}return BB(t,834).Fj(),null==e?null:cL(e,172)?""+BB(e,172).a:tsn(e)==mtt?H$(IOt[0],BB(e,199)):Bbn(e)}function GGn(n){var t,i,r,c,a,u,o,s,h;for(s=new JT,u=new JT,c=new Wb(n);c.a-1){for(r=spn(u,0);r.b!=r.d.c;)(i=BB(b3(r),128)).v=a;for(;0!=u.b;)for(t=new Wb((i=BB(tkn(u,0),128)).i);t.a0&&(e+=o.n.a+o.o.a/2,++f),b=new Wb(o.j);b.a0&&(e/=f),g=x8(xNt,qQn,25,i.a.c.length,15,1),u=0,s=new Wb(i.a);s.a=u&&r<=o)u<=r&&c<=o?i+=2:u<=r?(n.b[i]=o+1,a+=2):c<=o?(e[h++]=r,e[h++]=u-1,i+=2):(e[h++]=r,e[h++]=u-1,n.b[i]=o+1,a+=2);else{if(!(o0?r-=864e5:r+=864e5,o=new PD(rbn(fan(t.q.getTime()),r))),h=new Ik,s=n.a.length,c=0;c=97&&i<=122||i>=65&&i<=90){for(a=c+1;a=s)throw Hp(new _y("Missing trailing '"));a+10&&0==e.c&&(!t&&(t=new Np),t.c[t.c.length]=e);if(t)for(;0!=t.c.length;){if((e=BB(s6(t,0),233)).b&&e.b.c.length>0)for(!e.b&&(e.b=new Np),c=new Wb(e.b);c.aE7(n,e,0))return new rI(r,e)}else if(Gy(lL(r.g,r.d[0]).a)>Gy(lL(e.g,e.d[0]).a))return new rI(r,e);for(u=(!e.e&&(e.e=new Np),e.e).Kc();u.Ob();)!(a=BB(u.Pb(),233)).b&&(a.b=new Np),LZ(0,(o=a.b).c.length),MS(o.c,0,e),a.c==o.c.length&&(t.c[t.c.length]=a)}return null}function izn(n,t){var e,i,r,c,a,u;if(null==n)return zWn;if(null!=t.a.zc(n,t))return"[...]";for(e=new $an(FWn,"[","]"),c=0,a=(r=n).length;c=14&&u<=16?cL(i,177)?b6(e,RCn(BB(i,177))):cL(i,190)?b6(e,YEn(BB(i,190))):cL(i,195)?b6(e,kSn(BB(i,195))):cL(i,2012)?b6(e,ZEn(BB(i,2012))):cL(i,48)?b6(e,DCn(BB(i,48))):cL(i,364)?b6(e,gIn(BB(i,364))):cL(i,832)?b6(e,xCn(BB(i,832))):cL(i,104)&&b6(e,NCn(BB(i,104))):t.a._b(i)?(e.a?oO(e.a,e.b):e.a=new lN(e.d),aO(e.a,"[...]")):b6(e,izn(een(i),new $q(t))):b6(e,null==i?zWn:Bbn(i));return e.a?0==e.e.length?e.a.a:e.a.a+""+e.e:e.c}function rzn(n,t,i,r){var c,a,u,o,s,h,f,l,b,w,d,g;for(w=qSn(cDn(t,!1,!1)),r&&(w=Yon(w)),g=Gy(MD(ZAn(t,(Epn(),pct)))),Px(0!=w.b),b=BB(w.a.a.c,8),h=BB(Dpn(w,1),8),w.b>2?(gun(s=new Np,new s1(w,1,w.b)),qan(d=new EAn(XXn(s,g+n.a)),t),i.c[i.c.length]=d):d=BB(RX(n.b,r?PMn(t):OMn(t)),266),u=PMn(t),r&&(u=OMn(t)),a=iPn(b,u),o=g+n.a,a.a?(o+=e.Math.abs(b.b-h.b),l=new xC(h.a,(h.b+b.b)/2)):(o+=e.Math.abs(b.a-h.a),l=new xC((h.a+b.a)/2,h.b)),VW(r?n.d:n.c,t,new Imn(d,a,l,o)),VW(n.b,t,d),!t.n&&(t.n=new eU(zOt,t,1,7)),f=new AL(t.n);f.e!=f.i.gc();)c=YRn(n,BB(kpn(f),137),!0,0,0),i.c[i.c.length]=c}function czn(n){var t,i,r,c,a,u,o,s,h;for(s=new Np,u=new Np,a=new Wb(n);a.a-1){for(c=new Wb(u);c.a0||(Jl(o,e.Math.min(o.o,r.o-1)),Ql(o,o.i-1),0==o.i&&(u.c[u.c.length]=o))}}function azn(n,t,e){var i,r,c,a,u;if(u=n.c,!t&&(t=L$t),n.c=t,0!=(4&n.Db)&&0==(1&n.Db)&&(a=new nU(n,1,2,u,n.c),e?e.Ei(a):e=a),u!=t)if(cL(n.Cb,284))n.Db>>16==-10?e=BB(n.Cb,284).nk(t,e):n.Db>>16==-15&&(!t&&(gWn(),t=l$t),!u&&(gWn(),u=l$t),n.Cb.nh()&&(a=new N7(n.Cb,1,13,u,t,uvn(H7(BB(n.Cb,59)),n),!1),e?e.Ei(a):e=a));else if(cL(n.Cb,88))n.Db>>16==-23&&(cL(t,88)||(gWn(),t=d$t),cL(u,88)||(gWn(),u=d$t),n.Cb.nh()&&(a=new N7(n.Cb,1,10,u,t,uvn(a4(BB(n.Cb,26)),n),!1),e?e.Ei(a):e=a));else if(cL(n.Cb,444))for(!(c=BB(n.Cb,836)).b&&(c.b=new Tp(new xm)),r=new Mp(new usn(new Pb(c.b.a).a));r.a.b;)e=azn(i=BB(ten(r.a).cd(),87),kLn(i,c),e);return e}function uzn(n,t){var e,i,r,c,a,u,o,s,h,f,l;for(a=qy(TD(ZAn(n,(HXn(),wgt)))),l=BB(ZAn(n,cpt),21),o=!1,s=!1,f=new AL((!n.c&&(n.c=new eU(XOt,n,9,9)),n.c));!(f.e==f.i.gc()||o&&s);){for(c=BB(kpn(f),118),u=0,r=NU(Wen(Pun(Gk(xnt,1),HWn,20,0,[(!c.d&&(c.d=new hK(_Ot,c,8,5)),c.d),(!c.e&&(c.e=new hK(_Ot,c,7,4)),c.e)])));dAn(r)&&(i=BB(U5(r),79),h=a&&QIn(i)&&qy(TD(ZAn(i,dgt))),e=bqn((!i.b&&(i.b=new hK(KOt,i,4,7)),i.b),c)?n==YY(PTn(BB(Wtn((!i.c&&(i.c=new hK(KOt,i,5,8)),i.c),0),82))):n==YY(PTn(BB(Wtn((!i.b&&(i.b=new hK(KOt,i,4,7)),i.b),0),82))),!((h||e)&&++u>1)););(u>0||l.Hc((lIn(),eIt))&&(!c.n&&(c.n=new eU(zOt,c,1,7)),c.n).i>0)&&(o=!0),u>1&&(s=!0)}o&&t.Fc((bDn(),lft)),s&&t.Fc((bDn(),bft))}function ozn(n){var t,i,r,c,a,u,o,s,h,f,l,b;if((b=BB(ZAn(n,(sWn(),KSt)),21)).dc())return null;if(o=0,u=0,b.Hc((mdn(),KIt))){for(f=BB(ZAn(n,uPt),98),r=2,i=2,c=2,a=2,t=YY(n)?BB(ZAn(YY(n),bSt),103):BB(ZAn(n,bSt),103),h=new AL((!n.c&&(n.c=new eU(XOt,n,9,9)),n.c));h.e!=h.i.gc();)if(s=BB(kpn(h),118),(l=BB(ZAn(s,wPt),61))==(kUn(),PIt)&&(l=OFn(s,t),Jpn(s,wPt,l)),f==(QEn(),XCt))switch(l.g){case 1:r=e.Math.max(r,s.i+s.g);break;case 2:i=e.Math.max(i,s.j+s.f);break;case 3:c=e.Math.max(c,s.i+s.g);break;case 4:a=e.Math.max(a,s.j+s.f)}else switch(l.g){case 1:r+=s.g+2;break;case 2:i+=s.f+2;break;case 3:c+=s.g+2;break;case 4:a+=s.f+2}o=e.Math.max(r,c),u=e.Math.max(i,a)}return KUn(n,o,u,!0,!0)}function szn(n,t,i,r,c){var a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k;for(m=BB(P4(ytn(AV(new Rq(null,new w1(t.d,16)),new $d(i)),new Ld(i)),m9(new H,new B,new rn,Pun(Gk(nit,1),$Vn,132,0,[(qsn(),Uet)]))),15),l=DWn,f=_Vn,s=new Wb(t.b.j);s.a0)?s&&(h=d.p,a?++h:--h,f=!(cNn(i=ion(BB(xq(d.c.a,h),10)),y,e[0])||Bz(i,y,e[0]))):f=!0),l=!1,(m=t.D.i)&&m.c&&u.e&&(a&&m.p>0||!a&&m.p0&&(t.a+=FWn),gzn(BB(kpn(a),160),t);for(t.a+=e1n,u=new cx((!i.c&&(i.c=new hK(KOt,i,5,8)),i.c));u.e!=u.i.gc();)u.e>0&&(t.a+=FWn),gzn(BB(kpn(u),160),t);t.a+=")"}}}function pzn(n,t,e){var i,r,c,a,u,o,s,h,f,l,b;if(c=BB(mMn(n,(hWn(),dlt)),79)){for(i=n.a,UR(r=new wA(e),$jn(n)),wan(n.d.i,n.c.i)?(l=n.c,XR(f=Aon(Pun(Gk(PMt,1),sVn,8,0,[l.n,l.a])),e)):f=g1(n.c),r5(i,f,i.a,i.a.a),b=g1(n.d),null!=mMn(n,Rlt)&&UR(b,BB(mMn(n,Rlt),8)),r5(i,b,i.c.b,i.c),Ztn(i,r),Lin(a=cDn(c,!0,!0),BB(Wtn((!c.b&&(c.b=new hK(KOt,c,4,7)),c.b),0),82)),Nin(a,BB(Wtn((!c.c&&(c.c=new hK(KOt,c,5,8)),c.c),0),82)),VFn(i,a),h=new Wb(n.b);h.a=0){for(o=null,u=new M2(h.a,s+1);u.ba?1:zO(isNaN(0),isNaN(a)))<0&&(rin(A3n),(e.Math.abs(a-1)<=A3n||1==a||isNaN(a)&&isNaN(1)?0:a<1?-1:a>1?1:zO(isNaN(a),isNaN(1)))<0)&&(rin(A3n),(e.Math.abs(0-u)<=A3n||0==u||isNaN(0)&&isNaN(u)?0:0u?1:zO(isNaN(0),isNaN(u)))<0)&&(rin(A3n),(e.Math.abs(u-1)<=A3n||1==u||isNaN(u)&&isNaN(1)?0:u<1?-1:u>1?1:zO(isNaN(u),isNaN(1)))<0))}function yzn(n){var t,e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j;for(f=new hW(new iw(n));f.b!=f.c.a.d;)for(u=BB((h=s9(f)).d,56),t=BB(h.e,56),d=0,y=(null==(a=u.Tg()).i&&qFn(a),a.i).length;d=0&&d=s.c.c.length?X3((uSn(),Cut),Put):X3((uSn(),Put),Put),h*=2,c=i.a.g,i.a.g=e.Math.max(c,c+(h-c)),a=i.b.g,i.b.g=e.Math.max(a,a+(h-a)),r=t}else zAn(u),AHn((l1(0,u.c.length),BB(u.c[0],17)).d.i)||WB(n.o,u)}function Ezn(n,t,e,i,r){var c,a,u,o,s,h,f,l,b,w,d,g,p,v,m;for(m=GB(n),o=new Np,s=(c=n.c.length)-1,h=c+1;0!=m.a.c;){for(;0!=e.b;)Px(0!=e.b),p=BB(Atn(e,e.a.a),112),$Y(m.a,p),p.g=s--,NFn(p,t,e,i);for(;0!=t.b;)Px(0!=t.b),v=BB(Atn(t,t.a.a),112),$Y(m.a,v),v.g=h++,NFn(v,t,e,i);for(u=_Vn,d=new Fb(new BR(new xN(new _b(m.a).a).b));aS(d.a.a);){if(w=BB(mx(d.a).cd(),112),!i&&w.b>0&&w.a<=0){o.c=x8(Ant,HWn,1,0,5,1),o.c[o.c.length]=w;break}(b=w.i-w.d)>=u&&(b>u&&(o.c=x8(Ant,HWn,1,0,5,1),u=b),o.c[o.c.length]=w)}0!=o.c.length&&(a=BB(xq(o,pvn(r,o.c.length)),112),$Y(m.a,a),a.g=h++,NFn(a,t,e,i),o.c=x8(Ant,HWn,1,0,5,1))}for(g=n.c.length+1,l=new Wb(n);l.a0&&(b.d+=f.n.d,b.d+=f.d),b.a>0&&(b.a+=f.n.a,b.a+=f.d),b.b>0&&(b.b+=f.n.b,b.b+=f.d),b.c>0&&(b.c+=f.n.c,b.c+=f.d),b}function Czn(n,t,i){var r,c,a,u,o,s,h,f,l,b,w,d;for(b=i.d,l=i.c,u=(a=new xC(i.f.a+i.d.b+i.d.c,i.f.b+i.d.d+i.d.a)).b,h=new Wb(n.a);h.a0&&(n.c[t.c.p][t.p].d+=H$n(n.i,24)*uJn*.07000000029802322-.03500000014901161,n.c[t.c.p][t.p].a=n.c[t.c.p][t.p].d/n.c[t.c.p][t.p].b)}}function Dzn(n){var t,e,i,r,c,a,u,o,s,h,f,l,b,w;for(l=new Wb(n);l.ar.d,r.d=e.Math.max(r.d,t),o&&i&&(r.d=e.Math.max(r.d,r.a),r.a=r.d+c);break;case 3:i=t>r.a,r.a=e.Math.max(r.a,t),o&&i&&(r.a=e.Math.max(r.a,r.d),r.d=r.a+c);break;case 2:i=t>r.c,r.c=e.Math.max(r.c,t),o&&i&&(r.c=e.Math.max(r.b,r.c),r.b=r.c+c);break;case 4:i=t>r.b,r.b=e.Math.max(r.b,t),o&&i&&(r.b=e.Math.max(r.b,r.c),r.c=r.b+c)}}}function Fzn(n){var t,e,i,r,c,a,u,o,s,h,f;for(s=new Wb(n);s.a0||h.j==CIt&&h.e.c.length-h.g.c.length<0)){t=!1;break}for(r=new Wb(h.g);r.a=h&&j>=p&&(b+=d.n.b+g.n.b+g.a.b-k,++o));if(i)for(u=new Wb(m.e);u.a=h&&j>=p&&(b+=d.n.b+g.n.b+g.a.b-k,++o))}o>0&&(E+=b/o,++w)}w>0?(t.a=c*E/w,t.g=w):(t.a=0,t.g=0)}function Hzn(n,t){var e,i,r,c,a,u,o,s,h,f;for(i=new Wb(n.a.b);i.aKQn||t.o==ryt&&s0&&Pen(p,y*j),k>0&&Cen(p,k*E);for(nan(n.b,new lt),t=new Np,u=new usn(new Pb(n.c).a);u.b;)i=BB((a=ten(u)).cd(),79),e=BB(a.dd(),395).a,r=cDn(i,!1,!1),VFn(f=lTn(PMn(i),qSn(r),e),r),(m=CMn(i))&&-1==E7(t,m,0)&&(t.c[t.c.length]=m,sQ(m,(Px(0!=f.b),BB(f.a.a.c,8)),e));for(g=new usn(new Pb(n.d).a);g.b;)i=BB((d=ten(g)).cd(),79),e=BB(d.dd(),395).a,r=cDn(i,!1,!1),f=lTn(OMn(i),Yon(qSn(r)),e),VFn(f=Yon(f),r),(m=IMn(i))&&-1==E7(t,m,0)&&(t.c[t.c.length]=m,sQ(m,(Px(0!=f.b),BB(f.c.b.c,8)),e))}function Xzn(n,t,i,r){var c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E;if(0!=i.c.length){for(w=new Np,b=new Wb(i);b.a1)for(e5(m,new sC(n,b=new hqn(w,m,r))),u.c[u.c.length]=b,f=m.a.ec().Kc();f.Ob();)y7(a,BB(f.Pb(),46).b);if(o.a.gc()>1)for(e5(o,new hC(n,b=new hqn(w,o,r))),u.c[u.c.length]=b,f=o.a.ec().Kc();f.Ob();)y7(a,BB(f.Pb(),46).b)}}function tUn(n){NM(n,new MTn(dj(vj(wj(pj(gj(new du,w4n),"ELK Radial"),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new Ha),w4n))),u2(n,w4n,g3n,mpn(xjt)),u2(n,w4n,vZn,mpn(Kjt)),u2(n,w4n,PZn,mpn(Cjt)),u2(n,w4n,BZn,mpn(Ijt)),u2(n,w4n,SZn,mpn(Ojt)),u2(n,w4n,CZn,mpn(Pjt)),u2(n,w4n,MZn,mpn(Ajt)),u2(n,w4n,IZn,mpn(Njt)),u2(n,w4n,h4n,mpn(Mjt)),u2(n,w4n,s4n,mpn(Sjt)),u2(n,w4n,b4n,mpn($jt)),u2(n,w4n,u4n,mpn(Ljt)),u2(n,w4n,o4n,mpn(Djt)),u2(n,w4n,f4n,mpn(Rjt)),u2(n,w4n,l4n,mpn(_jt))}function eUn(n){var t;if(this.r=xV(new Pn,new Cn),this.b=new Hbn(BB(yX(FIt),290)),this.p=new Hbn(BB(yX(FIt),290)),this.i=new Hbn(BB(yX(Krt),290)),this.e=n,this.o=new wA(n.rf()),this.D=n.Df()||qy(TD(n.We((sWn(),SSt)))),this.A=BB(n.We((sWn(),KSt)),21),this.B=BB(n.We(qSt),21),this.q=BB(n.We(uPt),98),this.u=BB(n.We(fPt),21),!wMn(this.u))throw Hp(new rk("Invalid port label placement: "+this.u));if(this.v=qy(TD(n.We(bPt))),this.j=BB(n.We(DSt),21),!tLn(this.j))throw Hp(new rk("Invalid node label placement: "+this.j));this.n=BB(nkn(n,NSt),116),this.k=Gy(MD(nkn(n,OPt))),this.d=Gy(MD(nkn(n,IPt))),this.w=Gy(MD(nkn(n,RPt))),this.s=Gy(MD(nkn(n,APt))),this.t=Gy(MD(nkn(n,$Pt))),this.C=BB(nkn(n,xPt),142),this.c=2*this.d,t=!this.B.Hc((n_n(),HIt)),this.f=new Ign(0,t,0),this.g=new Ign(1,t,0),jy(this.f,(Dtn(),zit),this.g)}function iUn(n,t,i,r,c){var a,u,o,s,f,l,b,w,d,g,p,v,m,y,k,j,E,T,M,S;for(y=0,g=0,d=0,w=1,m=new AL((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a));m.e!=m.i.gc();)w+=F3(new oz(ZL(dLn(p=BB(kpn(m),33)).a.Kc(),new h))),T=p.g,g=e.Math.max(g,T),b=p.f,d=e.Math.max(d,b),y+=T*b;for(u=y+2*r*r*w*(!n.a&&(n.a=new eU(UOt,n,10,11)),n.a).i,a=e.Math.sqrt(u),s=e.Math.max(a*i,g),o=e.Math.max(a/i,d),v=new AL((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a));v.e!=v.i.gc();)p=BB(kpn(v),33),M=c.b+(H$n(t,26)*rJn+H$n(t,27)*cJn)*(s-p.g),S=c.b+(H$n(t,26)*rJn+H$n(t,27)*cJn)*(o-p.f),Pen(p,M),Cen(p,S);for(E=s+(c.b+c.c),j=o+(c.d+c.a),k=new AL((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a));k.e!=k.i.gc();)for(l=new oz(ZL(dLn(BB(kpn(k),33)).a.Kc(),new h));dAn(l);)nAn(f=BB(U5(l),79))||BXn(f,t,E,j);KUn(n,E+=c.b+c.c,j+=c.d+c.a,!1,!0)}function rUn(n){var t,e,i,r,c,a,u,o,s,h,f;if(null==n)throw Hp(new Mk(zWn));if(s=n,o=!1,(c=n.length)>0&&(b1(0,n.length),45!=(t=n.charCodeAt(0))&&43!=t||(n=n.substr(1),--c,o=45==t)),0==c)throw Hp(new Mk(DQn+s+'"'));for(;n.length>0&&(b1(0,n.length),48==n.charCodeAt(0));)n=n.substr(1),--c;if(c>(iFn(),xtt)[10])throw Hp(new Mk(DQn+s+'"'));for(r=0;r0&&(f=-parseInt(n.substr(0,i),10),n=n.substr(i),c-=i,e=!1);c>=a;){if(i=parseInt(n.substr(0,a),10),n=n.substr(a),c-=a,e)e=!1;else{if(Vhn(f,u)<0)throw Hp(new Mk(DQn+s+'"'));f=cbn(f,h)}f=ibn(f,i)}if(Vhn(f,0)>0)throw Hp(new Mk(DQn+s+'"'));if(!o&&Vhn(f=j7(f),0)<0)throw Hp(new Mk(DQn+s+'"'));return f}function cUn(n,t){var e,i,r,c,a,u,o;if(ZH(),this.a=new X$(this),this.b=n,this.c=t,this.f=OU(B7((IPn(),Z$t),t)),this.f.dc())if((u=mjn(Z$t,n))==t)for(this.e=!0,this.d=new Np,this.f=new fo,this.f.Fc(S7n),BB(NHn(F7(Z$t,Utn(n)),""),26)==n&&this.f.Fc(az(Z$t,Utn(n))),r=EKn(Z$t,n).Kc();r.Ob();)switch(i=BB(r.Pb(),170),DW(B7(Z$t,i))){case 4:this.d.Fc(i);break;case 5:this.f.Gc(OU(B7(Z$t,i)))}else if(ZM(),BB(t,66).Oj())for(this.e=!0,this.f=null,this.d=new Np,a=0,o=(null==n.i&&qFn(n),n.i).length;a=0&&a0&&(BB(oV(n.b,t),124).a.b=i)}function uUn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g;for(OTn(t,"Comment pre-processing",1),e=0,o=new Wb(n.a);o.a0&&(b1(0,t.length),64!=(u=t.charCodeAt(0)))){if(37==u&&(o=!1,0!=(h=t.lastIndexOf("%"))&&(h==f-1||(b1(h+1,t.length),o=46==t.charCodeAt(h+1))))){if(v=mK("%",a=t.substr(1,h-1))?null:$Un(a),i=0,o)try{i=l_n(t.substr(h+2),_Vn,DWn)}catch(m){throw cL(m=lun(m),127)?Hp(new L7(m)):Hp(m)}for(d=Ern(n.Wg());d.Ob();)if(cL(b=Man(d),510)&&(p=(r=BB(b,590)).d,(null==v?null==p:mK(v,p))&&0==i--))return r;return null}if(l=-1==(s=t.lastIndexOf("."))?t:t.substr(0,s),e=0,-1!=s)try{e=l_n(t.substr(s+1),_Vn,DWn)}catch(m){if(!cL(m=lun(m),127))throw Hp(m);l=t}for(l=mK("%",l)?null:$Un(l),w=Ern(n.Wg());w.Ob();)if(cL(b=Man(w),191)&&(g=(c=BB(b,191)).ne(),(null==l?null==g:mK(l,g))&&0==e--))return c;return null}return _qn(n,t)}function fUn(n){var t,e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E,T;for(m=new Np,f=new Wb(n.b);f.a=n.length)return{done:!0};var i=n[e++];return{value:[i,t.get(i)],done:!1}}}},zDn()||(n.prototype.createObject=function(){return{}},n.prototype.get=function(n){return this.obj[":"+n]},n.prototype.set=function(n,t){this.obj[":"+n]=t},n.prototype[iJn]=function(n){delete this.obj[":"+n]},n.prototype.keys=function(){var n=[];for(var t in this.obj)58==t.charCodeAt(0)&&n.push(t.substring(1));return n}),n}function wUn(n){var t,e,i,r,c,a,u,o,s,h,f,l,b,w,d;if(PFn(),null==n)return null;if(0==(f=8*n.length))return"";for(l=f/24|0,c=null,c=x8(ONt,WVn,25,4*(0!=(u=f%24)?l+1:l),15,1),s=0,h=0,t=0,e=0,i=0,a=0,r=0,o=0;o>24,s=(3&t)<<24>>24,b=0==(-128&t)?t>>2<<24>>24:(t>>2^192)<<24>>24,w=0==(-128&e)?e>>4<<24>>24:(e>>4^240)<<24>>24,d=0==(-128&(i=n[r++]))?i>>6<<24>>24:(i>>6^252)<<24>>24,c[a++]=VLt[b],c[a++]=VLt[w|s<<4],c[a++]=VLt[h<<2|d],c[a++]=VLt[63&i];return 8==u?(s=(3&(t=n[r]))<<24>>24,b=0==(-128&t)?t>>2<<24>>24:(t>>2^192)<<24>>24,c[a++]=VLt[b],c[a++]=VLt[s<<4],c[a++]=61,c[a++]=61):16==u&&(t=n[r],h=(15&(e=n[r+1]))<<24>>24,s=(3&t)<<24>>24,b=0==(-128&t)?t>>2<<24>>24:(t>>2^192)<<24>>24,w=0==(-128&e)?e>>4<<24>>24:(e>>4^240)<<24>>24,c[a++]=VLt[b],c[a++]=VLt[w|s<<4],c[a++]=VLt[h<<2],c[a++]=61),Bdn(c,0,c.length)}function dUn(n,t){var i,r,c,a,u,o;if(0==n.e&&n.p>0&&(n.p=-(n.p-1)),n.p>_Vn&&e4(t,n.p-sQn),u=t.q.getDate(),FY(t,1),n.k>=0&&vZ(t,n.k),n.c>=0?FY(t,n.c):n.k>=0?(r=35-new von(t.q.getFullYear()-sQn,t.q.getMonth(),35).q.getDate(),FY(t,e.Math.min(r,u))):FY(t,u),n.f<0&&(n.f=t.q.getHours()),n.b>0&&n.f<12&&(n.f+=12),aL(t,24==n.f&&n.g?0:n.f),n.j>=0&&g6(t,n.j),n.n>=0&&U8(t,n.n),n.i>=0&&dO(t,rbn(cbn(Ojn(fan(t.q.getTime()),VVn),VVn),n.i)),n.a&&(e4(c=new AT,c.q.getFullYear()-sQn-80),sS(fan(t.q.getTime()),fan(c.q.getTime()))&&e4(t,c.q.getFullYear()-sQn+100)),n.d>=0)if(-1==n.c)(i=(7+n.d-t.q.getDay())%7)>3&&(i-=7),o=t.q.getMonth(),FY(t,t.q.getDate()+i),t.q.getMonth()!=o&&FY(t,t.q.getDate()+(i>0?-7:7));else if(t.q.getDay()!=n.d)return!1;return n.o>_Vn&&(a=t.q.getTimezoneOffset(),dO(t,rbn(fan(t.q.getTime()),60*(n.o-a)*VVn))),!0}function gUn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p;if(cL(r=mMn(t,(hWn(),dlt)),239)){for(b=BB(r,33),w=t.e,f=new wA(t.c),c=t.d,f.a+=c.b,f.b+=c.d,SN(BB(ZAn(b,(HXn(),qgt)),174),(n_n(),qIt))&&(Ol(l=BB(ZAn(b,zgt),116),c.a),_l(l,c.d),Al(l,c.b),Fl(l,c.c)),e=new Np,s=new Wb(t.a);s.a0&&WB(n.p,l),WB(n.o,l);d=s+(t-=r),f+=t*n.e,c5(n.a,o,iln(d)),c5(n.b,o,f),n.j=e.Math.max(n.j,d),n.k=e.Math.max(n.k,f),n.d+=t,t+=p}}function kUn(){var n;kUn=O,PIt=new WC(hYn,0),sIt=new WC(mYn,1),oIt=new WC(yYn,2),SIt=new WC(kYn,3),CIt=new WC(jYn,4),SQ(),wIt=new Ak(new JK(n=BB(Vj(FIt),9),BB(SR(n,n.length),9),0)),dIt=ffn(EG(sIt,Pun(Gk(FIt,1),JZn,61,0,[]))),hIt=ffn(EG(oIt,Pun(Gk(FIt,1),JZn,61,0,[]))),EIt=ffn(EG(SIt,Pun(Gk(FIt,1),JZn,61,0,[]))),MIt=ffn(EG(CIt,Pun(Gk(FIt,1),JZn,61,0,[]))),yIt=ffn(EG(sIt,Pun(Gk(FIt,1),JZn,61,0,[SIt]))),bIt=ffn(EG(oIt,Pun(Gk(FIt,1),JZn,61,0,[CIt]))),jIt=ffn(EG(sIt,Pun(Gk(FIt,1),JZn,61,0,[CIt]))),gIt=ffn(EG(sIt,Pun(Gk(FIt,1),JZn,61,0,[oIt]))),TIt=ffn(EG(SIt,Pun(Gk(FIt,1),JZn,61,0,[CIt]))),fIt=ffn(EG(oIt,Pun(Gk(FIt,1),JZn,61,0,[SIt]))),mIt=ffn(EG(sIt,Pun(Gk(FIt,1),JZn,61,0,[oIt,CIt]))),lIt=ffn(EG(oIt,Pun(Gk(FIt,1),JZn,61,0,[SIt,CIt]))),kIt=ffn(EG(sIt,Pun(Gk(FIt,1),JZn,61,0,[SIt,CIt]))),pIt=ffn(EG(sIt,Pun(Gk(FIt,1),JZn,61,0,[oIt,SIt]))),vIt=ffn(EG(sIt,Pun(Gk(FIt,1),JZn,61,0,[oIt,SIt,CIt])))}function jUn(n,t){var i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v;if(0!=t.b){for(l=new JT,a=null,b=null,i=CY(e.Math.floor(e.Math.log(t.b)*e.Math.LOG10E)+1),u=0,v=spn(t,0);v.b!=v.d.c;)for(g=BB(b3(v),86),GI(b)!==GI(mMn(g,(qqn(),rkt)))&&(b=SD(mMn(g,rkt)),u=0),a=null!=b?b+d0(u++,i):d0(u++,i),hon(g,rkt,a),d=new wg(spn(new bg(g).a.d,0));EE(d.a);)r5(l,w=BB(b3(d.a),188).c,l.c.b,l.c),hon(w,rkt,a);for(f=new xp,c=0;c=s){Px(v.b>0),v.a.Xb(v.c=--v.b);break}g.a>h&&(c?(gun(c.b,g.b),c.a=e.Math.max(c.a,g.a),fW(v)):(WB(g.b,l),g.c=e.Math.min(g.c,h),g.a=e.Math.max(g.a,s),c=g))}c||((c=new im).c=h,c.a=s,yR(v,c),WB(c.b,l))}for(o=t.b,f=0,p=new Wb(r);p.au?1:0:(n.b&&(n.b._b(c)&&(r=BB(n.b.xc(c),19).a),n.b._b(o)&&(u=BB(n.b.xc(o),19).a)),ru?1:0)):0!=t.e.c.length&&0!=e.g.c.length?1:-1}function MUn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k;for(OTn(t,O1n,1),w=new Np,y=new Np,s=new Wb(n.b);s.a0&&(k-=d),Tqn(u,k),l=0,w=new Wb(u.a);w.a0),o.a.Xb(o.c=--o.b)),s=.4*r*l,!a&&o.bt.d.c){if((b=n.c[t.a.d])==(g=n.c[f.a.d]))continue;UNn(aM(cM(uM(rM(new Hv,1),100),b),g))}}}function $Un(n){var t,e,i,r,c,a,u,o;if(RHn(),null==n)return null;if((r=GO(n,JTn(37)))<0)return n;for(o=new lN(n.substr(0,r)),t=x8(NNt,v6n,25,4,15,1),u=0,i=0,a=n.length;rr+2&&ton((b1(r+1,n.length),n.charCodeAt(r+1)),IAt,OAt)&&ton((b1(r+2,n.length),n.charCodeAt(r+2)),IAt,OAt))if(e=CH((b1(r+1,n.length),n.charCodeAt(r+1)),(b1(r+2,n.length),n.charCodeAt(r+2))),r+=2,i>0?128==(192&e)?t[u++]=e<<24>>24:i=0:e>=128&&(192==(224&e)?(t[u++]=e<<24>>24,i=2):224==(240&e)?(t[u++]=e<<24>>24,i=3):240==(248&e)&&(t[u++]=e<<24>>24,i=4)),i>0){if(u==i){switch(u){case 2:xX(o,((31&t[0])<<6|63&t[1])&QVn);break;case 3:xX(o,((15&t[0])<<12|(63&t[1])<<6|63&t[2])&QVn)}u=0,i=0}}else{for(c=0;c0){if(a+i>n.length)return!1;u=UIn(n.substr(0,a+i),t)}else u=UIn(n,t);switch(c){case 71:return u=zTn(n,a,Pun(Gk(Qtt,1),sVn,2,6,[fQn,lQn]),t),r.e=u,!0;case 77:return gDn(n,t,r,u,a);case 76:return pDn(n,t,r,u,a);case 69:return rCn(n,t,a,r);case 99:return cCn(n,t,a,r);case 97:return u=zTn(n,a,Pun(Gk(Qtt,1),sVn,2,6,["AM","PM"]),t),r.b=u,!0;case 121:return vDn(n,t,a,u,e,r);case 100:return!(u<=0||(r.c=u,0));case 83:return!(u<0)&&jwn(u,a,t[0],r);case 104:12==u&&(u=0);case 75:case 72:return!(u<0||(r.f=u,r.g=!1,0));case 107:return!(u<0||(r.f=u,r.g=!0,0));case 109:return!(u<0||(r.j=u,0));case 115:return!(u<0||(r.n=u,0));case 90:if(aE&&(d.c=E-d.b),WB(u.d,new xG(d,kln(u,d))),m=t==sIt?e.Math.max(m,g.b+h.b.rf().b):e.Math.min(m,g.b));for(m+=t==sIt?n.t:-n.t,(y=Pwn((u.e=m,u)))>0&&(BB(oV(n.b,t),124).a.b=y),f=b.Kc();f.Ob();)!(h=BB(f.Pb(),111)).c||h.c.d.c.length<=0||((d=h.c.i).c-=h.e.a,d.d-=h.e.b)}else aUn(n,t)}function xUn(n){var t,e,i,r,c,a,u,o,s,f;for(t=new xp,a=new AL(n);a.e!=a.i.gc();){for(c=BB(kpn(a),33),e=new Rv,VW(Mct,c,e),f=new ut,i=BB(P4(new Rq(null,new zU(new oz(ZL(wLn(c).a.Kc(),new h)))),SG(f,m9(new H,new B,new rn,Pun(Gk(nit,1),$Vn,132,0,[(qsn(),Uet)])))),83),Yen(e,BB(i.xc((hN(),!0)),14),new ot),r=BB(P4(AV(BB(i.xc(!1),15).Lc(),new st),m9(new H,new B,new rn,Pun(Gk(nit,1),$Vn,132,0,[Uet]))),15).Kc();r.Ob();)(s=CMn(BB(r.Pb(),79)))&&((u=BB(qI(AJ(t.f,s)),21))||(u=Oxn(s),jCn(t.f,s,u)),Frn(e,u));for(i=BB(P4(new Rq(null,new zU(new oz(ZL(dLn(c).a.Kc(),new h)))),SG(f,m9(new H,new B,new rn,Pun(Gk(nit,1),$Vn,132,0,[Uet])))),83),Yen(e,BB(i.xc(!0),14),new ht),o=BB(P4(AV(BB(i.xc(!1),15).Lc(),new ft),m9(new H,new B,new rn,Pun(Gk(nit,1),$Vn,132,0,[Uet]))),15).Kc();o.Ob();)(s=IMn(BB(o.Pb(),79)))&&((u=BB(qI(AJ(t.f,s)),21))||(u=Oxn(s),jCn(t.f,s,u)),Frn(e,u))}}function DUn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d;if(uHn(),(o=Vhn(n,0)<0)&&(n=j7(n)),0==Vhn(n,0))switch(t){case 0:return"0";case 1:return WQn;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return(b=new Ck).a+=t<0?"0E+":"0E",b.a+=t==_Vn?"2147483648":""+-t,b.a}f=x8(ONt,WVn,25,1+(h=18),15,1),e=h,d=n;do{s=d,d=Ojn(d,10),f[--e]=dG(rbn(48,ibn(s,cbn(d,10))))&QVn}while(0!=Vhn(d,0));if(r=ibn(ibn(ibn(h,e),t),1),0==t)return o&&(f[--e]=45),Bdn(f,e,h-e);if(t>0&&Vhn(r,-6)>=0){if(Vhn(r,0)>=0){for(c=e+dG(r),u=h-1;u>=c;u--)f[u+1]=f[u];return f[++c]=46,o&&(f[--e]=45),Bdn(f,e,h-e+1)}for(a=2;sS(a,rbn(j7(r),1));a++)f[--e]=48;return f[--e]=46,f[--e]=48,o&&(f[--e]=45),Bdn(f,e,h-e)}return w=e+1,i=h,l=new Ik,o&&(l.a+="-"),i-w>=1?(xX(l,f[e]),l.a+=".",l.a+=Bdn(f,e+1,h-e-1)):l.a+=Bdn(f,e,h-e),l.a+="E",Vhn(r,0)>0&&(l.a+="+"),l.a+=""+vz(r),l.a}function RUn(n,t,e){var i,r,c,a,u,o,s,h,f,l;if(n.e.a.$b(),n.f.a.$b(),n.c.c=x8(Ant,HWn,1,0,5,1),n.i.c=x8(Ant,HWn,1,0,5,1),n.g.a.$b(),t)for(a=new Wb(t.a);a.a=1&&(j-h>0&&d>=0?(Pen(l,l.i+k),Cen(l,l.j+s*h)):j-h<0&&w>=0&&(Pen(l,l.i+k*j),Cen(l,l.j+s)));return Jpn(n,(sWn(),KSt),(mdn(),new JK(a=BB(Vj(JIt),9),BB(SR(a,a.length),9),0))),new xC(E,f)}function _Un(n){var t,i,r,c,a,u,o,s,h,f,l;if(f=YY(PTn(BB(Wtn((!n.b&&(n.b=new hK(KOt,n,4,7)),n.b),0),82)))==YY(PTn(BB(Wtn((!n.c&&(n.c=new hK(KOt,n,5,8)),n.c),0),82))),u=new Gj,(t=BB(ZAn(n,(Xsn(),hCt)),74))&&t.b>=2){if(0==(!n.a&&(n.a=new eU(FOt,n,6,6)),n.a).i)tE(),i=new co,f9((!n.a&&(n.a=new eU(FOt,n,6,6)),n.a),i);else if((!n.a&&(n.a=new eU(FOt,n,6,6)),n.a).i>1)for(l=new cx((!n.a&&(n.a=new eU(FOt,n,6,6)),n.a));l.e!=l.i.gc();)Qjn(l);VFn(t,BB(Wtn((!n.a&&(n.a=new eU(FOt,n,6,6)),n.a),0),202))}if(f)for(r=new AL((!n.a&&(n.a=new eU(FOt,n,6,6)),n.a));r.e!=r.i.gc();)for(s=new AL((!(i=BB(kpn(r),202)).a&&(i.a=new $L(xOt,i,5)),i.a));s.e!=s.i.gc();)o=BB(kpn(s),469),u.a=e.Math.max(u.a,o.a),u.b=e.Math.max(u.b,o.b);for(a=new AL((!n.n&&(n.n=new eU(zOt,n,1,7)),n.n));a.e!=a.i.gc();)c=BB(kpn(a),137),(h=BB(ZAn(c,gCt),8))&&SA(c,h.a,h.b),f&&(u.a=e.Math.max(u.a,c.i+c.g),u.b=e.Math.max(u.b,c.j+c.f));return u}function FUn(n,t,i){var r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E;for(v=t.c.length,c=new qKn(n.a,i,null,null),E=x8(xNt,qQn,25,v,15,1),w=x8(xNt,qQn,25,v,15,1),b=x8(xNt,qQn,25,v,15,1),d=0,o=0;oE[s]&&(d=s),f=new Wb(n.a.b);f.aw&&(a&&(fO(j,b),fO(T,iln(h.b-1))),I=i.b,O+=b+t,b=0,f=e.Math.max(f,i.b+i.c+C)),Pen(o,I),Cen(o,O),f=e.Math.max(f,I+C+i.c),b=e.Math.max(b,l),I+=C+t;if(f=e.Math.max(f,r),(P=O+b+i.a)lZn,S=e.Math.abs(b.b-d.b)>lZn,(!i&&M&&S||i&&(M||S))&&DH(p.a,k)),Frn(p.a,r),0==r.b?b=k:(Px(0!=r.b),b=BB(r.c.b.c,8)),Jan(w,l,g),acn(c)==T&&(vW(T.i)!=c.a&&OPn(g=new Gj,vW(T.i),m),hon(p,Rlt,g)),MSn(w,p,m),f.a.zc(w,f);SZ(p,j),MZ(p,T)}for(h=f.a.ec().Kc();h.Ob();)SZ(s=BB(h.Pb(),17),null),MZ(s,null);HSn(t)}function GUn(n){var t,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k;if(1==n.gc())return BB(n.Xb(0),231);if(n.gc()<=0)return new y6;for(c=n.Kc();c.Ob();){for(i=BB(c.Pb(),231),d=0,f=DWn,l=DWn,s=_Vn,h=_Vn,w=new Wb(i.e);w.ao&&(y=0,k+=u+v,u=0),VKn(g,i,y,k),t=e.Math.max(t,y+p.a),u=e.Math.max(u,p.b),y+=p.a+v;return g}function zUn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w;switch(h=new km,n.a.g){case 3:l=BB(mMn(t.e,(hWn(),Nlt)),15),b=BB(mMn(t.j,Nlt),15),w=BB(mMn(t.f,Nlt),15),e=BB(mMn(t.e,$lt),15),i=BB(mMn(t.j,$lt),15),r=BB(mMn(t.f,$lt),15),gun(a=new Np,l),b.Jc(new yc),gun(a,cL(b,152)?o6(BB(b,152)):cL(b,131)?BB(b,131).a:cL(b,54)?new fy(b):new CT(b)),gun(a,w),gun(c=new Np,e),gun(c,cL(i,152)?o6(BB(i,152)):cL(i,131)?BB(i,131).a:cL(i,54)?new fy(i):new CT(i)),gun(c,r),hon(t.f,Nlt,a),hon(t.f,$lt,c),hon(t.f,xlt,t.f),hon(t.e,Nlt,null),hon(t.e,$lt,null),hon(t.j,Nlt,null),hon(t.j,$lt,null);break;case 1:Frn(h,t.e.a),DH(h,t.i.n),Frn(h,ean(t.j.a)),DH(h,t.a.n),Frn(h,t.f.a);break;default:Frn(h,t.e.a),Frn(h,ean(t.j.a)),Frn(h,t.f.a)}yQ(t.f.a),Frn(t.f.a,h),SZ(t.f,t.e.c),u=BB(mMn(t.e,(HXn(),vgt)),74),s=BB(mMn(t.j,vgt),74),o=BB(mMn(t.f,vgt),74),(u||s||o)&&(PU(f=new km,o),PU(f,s),PU(f,u),hon(t.f,vgt,f)),SZ(t.j,null),MZ(t.j,null),SZ(t.e,null),MZ(t.e,null),PZ(t.a,null),PZ(t.i,null),t.g&&zUn(n,t.g)}function UUn(n){var t,e,i,r,c,a,u,o,s,h,f,l,b,w,d,g;if(PFn(),null==n)return null;if((w=bln(c=V7(n)))%4!=0)return null;if(0==(d=w/4|0))return x8(NNt,v6n,25,0,15,1);for(f=null,t=0,e=0,i=0,r=0,a=0,u=0,o=0,s=0,b=0,l=0,h=0,f=x8(NNt,v6n,25,3*d,15,1);b>4)<<24>>24,f[l++]=((15&e)<<4|i>>2&15)<<24>>24,f[l++]=(i<<6|r)<<24>>24}return VE(a=c[h++])&&VE(u=c[h++])?(t=WLt[a],e=WLt[u],o=c[h++],s=c[h++],-1==WLt[o]||-1==WLt[s]?61==o&&61==s?0!=(15&e)?null:(aHn(f,0,g=x8(NNt,v6n,25,3*b+1,15,1),0,3*b),g[l]=(t<<2|e>>4)<<24>>24,g):61!=o&&61==s?0!=(3&(i=WLt[o]))?null:(aHn(f,0,g=x8(NNt,v6n,25,3*b+2,15,1),0,3*b),g[l++]=(t<<2|e>>4)<<24>>24,g[l]=((15&e)<<4|i>>2&15)<<24>>24,g):null:(i=WLt[o],r=WLt[s],f[l++]=(t<<2|e>>4)<<24>>24,f[l++]=((15&e)<<4|i>>2&15)<<24>>24,f[l++]=(i<<6|r)<<24>>24,f)):null}function XUn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m;for(OTn(t,O1n,1),l=BB(mMn(n,(HXn(),Zdt)),218),i=new Wb(n.b);i.a=2){for(b=!0,e=BB(n0(h=new Wb(r.j)),11),f=null;h.a0&&(c=BB(xq(p.c.a,E-1),10),u=n.i[c.p],M=e.Math.ceil(K$(n.n,c,p)),a=j.a.e-p.d.d-(u.a.e+c.o.b+c.d.a)-M),h=RQn,E0&&T.a.e.e-T.a.a-(T.b.e.e-T.b.a)<0,d=y.a.e.e-y.a.a-(y.b.e.e-y.b.a)<0&&T.a.e.e-T.a.a-(T.b.e.e-T.b.a)>0,w=y.a.e.e+y.b.aT.b.e.e+T.a.a,k=0,!g&&!d&&(b?a+l>0?k=l:h-r>0&&(k=r):w&&(a+o>0?k=o:h-m>0&&(k=m))),j.a.e+=k,j.b&&(j.d.e+=k),1)))}function VUn(n,t,i){var r,c,a,u,o,s,h,f,l,b;if(r=new UV(t.qf().a,t.qf().b,t.rf().a,t.rf().b),c=new bA,n.c)for(u=new Wb(t.wf());u.as&&(i.a+=rL(x8(ONt,WVn,25,-s,15,1))),i.a+="Is",GO(o,JTn(32))>=0)for(r=0;r=i.o.b/2}p?(g=BB(mMn(i,(hWn(),Klt)),15))?l?c=g:(r=BB(mMn(i,Dft),15))?c=g.gc()<=r.gc()?g:r:(c=new Np,hon(i,Dft,c)):(c=new Np,hon(i,Klt,c)):(r=BB(mMn(i,(hWn(),Dft)),15))?f?c=r:(g=BB(mMn(i,Klt),15))?c=r.gc()<=g.gc()?r:g:(c=new Np,hon(i,Klt,c)):(c=new Np,hon(i,Dft,c)),c.Fc(n),hon(n,(hWn(),Kft),e),t.d==e?(MZ(t,null),e.e.c.length+e.g.c.length==0&&CZ(e,null),gsn(e)):(SZ(t,null),e.e.c.length+e.g.c.length==0&&CZ(e,null)),yQ(t.a)}function tXn(n,t){var e,i,r,c,a,u,o,s,f,l,b,w,d,g,p,v,m,y,k,j,E,T,M,S,P,C,I;for(v=new M2(n.b,0),d=0,s=BB((f=t.Kc()).Pb(),19).a,k=0,e=new Rv,E=new fA;v.b=n.a&&(r=yBn(n,v),l=e.Math.max(l,r.b),y=e.Math.max(y,r.d),WB(o,new rI(v,r)));for(E=new Np,f=0;f0),g.a.Xb(g.c=--g.b),yR(g,T=new HX(n.b)),Px(g.b0?(h=0,p&&(h+=o),h+=(M-1)*u,m&&(h+=o),T&&m&&(h=e.Math.max(h,nxn(m,u,v,E))),h0){for(l=h<100?null:new Fj(h),w=(s=new jcn(t)).g,g=x8(ANt,hQn,25,h,15,1),i=0,m=new gtn(h),r=0;r=0;)if(null!=b?Nfn(b,w[o]):GI(b)===GI(w[o])){g.length<=i&&aHn(g,0,g=x8(ANt,hQn,25,2*g.length,15,1),0,i),g[i++]=r,f9(m,w[o]);break n}if(GI(b)===GI(u))break}}if(s=m,w=m.g,h=i,i>g.length&&aHn(g,0,g=x8(ANt,hQn,25,i,15,1),0,i),i>0){for(v=!0,c=0;c=0;)Lyn(n,g[a]);if(i!=h){for(r=h;--r>=i;)Lyn(s,r);aHn(g,0,g=x8(ANt,hQn,25,i,15,1),0,i)}t=s}}}else for(t=jyn(n,t),r=n.i;--r>=0;)t.Hc(n.g[r])&&(Lyn(n,r),v=!0);if(v){if(null!=g){for(f=1==(e=t.gc())?yZ(n,4,t.Kc().Pb(),null,g[0],d):yZ(n,6,t,g,g[0],d),l=e<100?null:new Fj(e),r=t.Kc();r.Ob();)l=qK(n,BB(b=r.Pb(),72),l);l?(l.Ei(f),l.Fi()):ban(n.e,f)}else{for(l=$K(t.gc()),r=t.Kc();r.Ob();)l=qK(n,BB(b=r.Pb(),72),l);l&&l.Fi()}return!0}return!1}function uXn(n,t){var e,i,r,c,a,u,o,s,f,l,b,w,d,g,p,v,m;for((e=new hvn(t)).a||g_n(t),s=lRn(t),o=new pY,g=new Qxn,d=new Wb(t.a);d.a0||i.o==cyt&&c0?(f=BB(xq(l.c.a,a-1),10),T=K$(n.b,l,f),g=l.n.b-l.d.d-(f.n.b+f.o.b+f.d.a+T)):g=l.n.b-l.d.d,s=e.Math.min(g,s),a(a=iEn(n,e))?aKn(n,t,e):aKn(n,e,t),ra?1:0}return(i=BB(mMn(t,(hWn(),wlt)),19).a)>(c=BB(mMn(e,wlt),19).a)?aKn(n,t,e):aKn(n,e,t),ic?1:0}function lXn(n,t,e,i){var r,c,a,u,o,s,h,f,l,b,w,d;if(qy(TD(ZAn(t,(sWn(),zSt)))))return SQ(),SQ(),set;if(o=0!=(!t.a&&(t.a=new eU(UOt,t,10,11)),t.a).i,s=!(h=yIn(t)).dc(),o||s){if(!(r=BB(ZAn(t,mPt),149)))throw Hp(new rk("Resolved algorithm is not set; apply a LayoutAlgorithmResolver before computing layout."));if(d=OC(r,(hAn(),nAt)),Ngn(t),!o&&s&&!d)return SQ(),SQ(),set;if(u=new Np,GI(ZAn(t,ESt))===GI((ufn(),pCt))&&(OC(r,JOt)||OC(r,QOt)))for(l=pRn(n,t),Frn(b=new JT,(!t.a&&(t.a=new eU(UOt,t,10,11)),t.a));0!=b.b;)Ngn(f=BB(0==b.b?null:(Px(0!=b.b),Atn(b,b.a.a)),33)),GI(ZAn(f,ESt))===GI(mCt)||P8(f,eSt)&&!j5(r,ZAn(f,mPt))?(gun(u,lXn(n,f,e,i)),Jpn(f,ESt,mCt),KKn(f)):Frn(b,(!f.a&&(f.a=new eU(UOt,f,10,11)),f.a));else for(l=(!t.a&&(t.a=new eU(UOt,t,10,11)),t.a).i,a=new AL((!t.a&&(t.a=new eU(UOt,t,10,11)),t.a));a.e!=a.i.gc();)gun(u,lXn(n,c=BB(kpn(a),33),e,i)),KKn(c);for(w=new Wb(u);w.a=0?hwn(u):Tln(hwn(u)),n.Ye(upt,b)),s=new Gj,l=!1,n.Xe(npt)?(Hx(s,BB(n.We(npt),8)),l=!0):yL(s,a.a/2,a.b/2),b.g){case 4:hon(h,kgt,(Tbn(),Flt)),hon(h,Gft,(Yun(),$ht)),h.o.b=a.b,d<0&&(h.o.a=-d),qCn(f,(kUn(),oIt)),l||(s.a=a.a),s.a-=a.a;break;case 2:hon(h,kgt,(Tbn(),Hlt)),hon(h,Gft,(Yun(),Oht)),h.o.b=a.b,d<0&&(h.o.a=-d),qCn(f,(kUn(),CIt)),l||(s.a=0);break;case 1:hon(h,ilt,(z7(),Cft)),h.o.a=a.a,d<0&&(h.o.b=-d),qCn(f,(kUn(),SIt)),l||(s.b=a.b),s.b-=a.b;break;case 3:hon(h,ilt,(z7(),Sft)),h.o.a=a.a,d<0&&(h.o.b=-d),qCn(f,(kUn(),sIt)),l||(s.b=0)}if(Hx(f.n,s),hon(h,npt,s),t==UCt||t==WCt||t==XCt){if(w=0,t==UCt&&n.Xe(ipt))switch(b.g){case 1:case 2:w=BB(n.We(ipt),19).a;break;case 3:case 4:w=-BB(n.We(ipt),19).a}else switch(b.g){case 4:case 2:w=c.b,t==WCt&&(w/=r.b);break;case 1:case 3:w=c.a,t==WCt&&(w/=r.a)}hon(h,Tlt,w)}return hon(h,Qft,b),h}function wXn(n){var t,e,i,r,c,a,u,o,s,f,l,b,w,d,g,p,v,m,y,k,j,E;if((e=Gy(MD(mMn(n.a.j,(HXn(),_dt)))))<-1||!n.a.i||LK(BB(mMn(n.a.o,ept),98))||abn(n.a.o,(kUn(),oIt)).gc()<2&&abn(n.a.o,CIt).gc()<2)return!0;if(n.a.c.Rf())return!1;for(y=0,m=0,v=new Np,o=0,s=(u=n.a.e).length;o=e}function dXn(){function n(n){var t=this;this.dispatch=function(t){var e=t.data;switch(e.cmd){case"algorithms":var i=Swn((SQ(),new Hb(new Ob(lAt.b))));n.postMessage({id:e.id,data:i});break;case"categories":var r=Swn((SQ(),new Hb(new Ob(lAt.c))));n.postMessage({id:e.id,data:r});break;case"options":var c=Swn((SQ(),new Hb(new Ob(lAt.d))));n.postMessage({id:e.id,data:c});break;case"register":lGn(e.algorithms),n.postMessage({id:e.id});break;case"layout":xBn(e.graph,e.layoutOptions||{},e.options||{}),n.postMessage({id:e.id,data:e.graph})}},this.saveDispatch=function(e){try{t.dispatch(e)}catch(i){n.postMessage({id:e.data.id,error:i})}}}function e(t){var e=this;this.dispatcher=new n({postMessage:function(n){e.onmessage({data:n})}}),this.postMessage=function(n){setTimeout((function(){e.dispatcher.saveDispatch({data:n})}),0)}}if(aE(),typeof document===gJn&&typeof self!==gJn){var r=new n(self);self.onmessage=r.saveDispatch}else typeof t!==gJn&&t.exports&&(Object.defineProperty(i,"__esModule",{value:!0}),t.exports={default:e,Worker:e})}function gXn(n){n.N||(n.N=!0,n.b=kan(n,0),Rrn(n.b,0),Rrn(n.b,1),Rrn(n.b,2),n.bb=kan(n,1),Rrn(n.bb,0),Rrn(n.bb,1),n.fb=kan(n,2),Rrn(n.fb,3),Rrn(n.fb,4),Krn(n.fb,5),n.qb=kan(n,3),Rrn(n.qb,0),Krn(n.qb,1),Krn(n.qb,2),Rrn(n.qb,3),Rrn(n.qb,4),Krn(n.qb,5),Rrn(n.qb,6),n.a=jan(n,4),n.c=jan(n,5),n.d=jan(n,6),n.e=jan(n,7),n.f=jan(n,8),n.g=jan(n,9),n.i=jan(n,10),n.j=jan(n,11),n.k=jan(n,12),n.n=jan(n,13),n.o=jan(n,14),n.p=jan(n,15),n.q=jan(n,16),n.s=jan(n,17),n.r=jan(n,18),n.t=jan(n,19),n.u=jan(n,20),n.v=jan(n,21),n.w=jan(n,22),n.B=jan(n,23),n.A=jan(n,24),n.C=jan(n,25),n.D=jan(n,26),n.F=jan(n,27),n.G=jan(n,28),n.H=jan(n,29),n.J=jan(n,30),n.I=jan(n,31),n.K=jan(n,32),n.M=jan(n,33),n.L=jan(n,34),n.P=jan(n,35),n.Q=jan(n,36),n.R=jan(n,37),n.S=jan(n,38),n.T=jan(n,39),n.U=jan(n,40),n.V=jan(n,41),n.X=jan(n,42),n.W=jan(n,43),n.Y=jan(n,44),n.Z=jan(n,45),n.$=jan(n,46),n._=jan(n,47),n.ab=jan(n,48),n.cb=jan(n,49),n.db=jan(n,50),n.eb=jan(n,51),n.gb=jan(n,52),n.hb=jan(n,53),n.ib=jan(n,54),n.jb=jan(n,55),n.kb=jan(n,56),n.lb=jan(n,57),n.mb=jan(n,58),n.nb=jan(n,59),n.ob=jan(n,60),n.pb=jan(n,61))}function pXn(n,t){var i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k;if(m=0,0==t.f.a)for(p=new Wb(n);p.as&&0==(l1(s,t.c.length),BB(t.c[s],200)).a.c.length;)y7(t,(l1(s,t.c.length),t.c[s]));if(!o){--c;continue}if(A_n(t,h,r,o,l,e,s,i)){f=!0;continue}if(l){if(YBn(t,h,r,o,e,s,i)){f=!0;continue}if(Ahn(h,r)){r.c=!0,f=!0;continue}}else if(Ahn(h,r)){r.c=!0,f=!0;continue}if(f)continue}Ahn(h,r)?(r.c=!0,f=!0,o&&(o.k=!1)):Gmn(r.q)}else $T(),Tkn(h,r),--c,f=!0;return f}function yXn(n,t,i,r,c,a,u){var o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E,T,M,S,P,C,I,O,A;for(g=0,P=0,h=new Wb(n.b);h.ag&&(a&&(fO(E,w),fO(M,iln(f.b-1)),WB(n.d,d),o.c=x8(Ant,HWn,1,0,5,1)),O=i.b,A+=w+t,w=0,l=e.Math.max(l,i.b+i.c+I)),o.c[o.c.length]=s,Mpn(s,O,A),l=e.Math.max(l,O+I+i.c),w=e.Math.max(w,b),O+=I+t,d=s;if(gun(n.a,o),WB(n.d,BB(xq(o,o.c.length-1),157)),l=e.Math.max(l,r),(C=A+w+i.a)1&&(u=e.Math.min(u,e.Math.abs(BB(Dpn(o.a,1),8).b-f.b)))));else for(d=new Wb(t.j);d.ac&&(a=b.a-c,u=DWn,r.c=x8(Ant,HWn,1,0,5,1),c=b.a),b.a>=c&&(r.c[r.c.length]=o,o.a.b>1&&(u=e.Math.min(u,e.Math.abs(BB(Dpn(o.a,o.a.b-2),8).b-b.b)))));if(0!=r.c.length&&a>t.o.a/2&&u>t.o.b/2){for(CZ(w=new CSn,t),qCn(w,(kUn(),sIt)),w.n.a=t.o.a/2,CZ(g=new CSn,t),qCn(g,SIt),g.n.a=t.o.a/2,g.n.b=t.o.b,s=new Wb(r);s.a=h.b?SZ(o,g):SZ(o,w)):(h=BB(gH(o.a),8),(0==o.a.b?g1(o.c):BB(px(o.a),8)).b>=h.b?MZ(o,g):MZ(o,w)),(l=BB(mMn(o,(HXn(),vgt)),74))&&ywn(l,h,!0);t.n.a=c-t.o.a/2}}function EXn(n,t,e){var i,r,c,a,u,o,s,h,f,l,b;if(s=t,$in(o=Q3(n,L3(e),s),R2(s,q6n)),h=BB(sen(n.g,kIn(zY(s,T6n))),33),i=null,(a=zY(s,"sourcePort"))&&(i=kIn(a)),f=BB(sen(n.j,i),118),!h)throw Hp(new ek("An edge must have a source node (edge id: '"+Qdn(s)+W6n));if(f&&!wW(WY(f),h))throw Hp(new ek("The source port of an edge must be a port of the edge's source node (edge id: '"+R2(s,q6n)+W6n));if(!o.b&&(o.b=new hK(KOt,o,4,7)),f9(o.b,f||h),l=BB(sen(n.g,kIn(zY(s,J6n))),33),r=null,(u=zY(s,"targetPort"))&&(r=kIn(u)),b=BB(sen(n.j,r),118),!l)throw Hp(new ek("An edge must have a target node (edge id: '"+Qdn(s)+W6n));if(b&&!wW(WY(b),l))throw Hp(new ek("The target port of an edge must be a port of the edge's target node (edge id: '"+R2(s,q6n)+W6n));if(!o.c&&(o.c=new hK(KOt,o,5,8)),f9(o.c,b||l),0==(!o.b&&(o.b=new hK(KOt,o,4,7)),o.b).i||0==(!o.c&&(o.c=new hK(KOt,o,5,8)),o.c).i)throw c=R2(s,q6n),Hp(new ek(X6n+c+W6n));return STn(s,o),s$n(s,o),xon(n,s,o)}function TXn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E,T,M,S;return f=CFn(HN(n,(kUn(),wIt)),t),w=ayn(HN(n,dIt),t),y=ayn(HN(n,EIt),t),T=uyn(HN(n,MIt),t),l=uyn(HN(n,hIt),t),v=ayn(HN(n,jIt),t),d=ayn(HN(n,gIt),t),j=ayn(HN(n,TIt),t),k=ayn(HN(n,fIt),t),M=uyn(HN(n,bIt),t),p=ayn(HN(n,yIt),t),m=ayn(HN(n,mIt),t),E=ayn(HN(n,lIt),t),S=uyn(HN(n,kIt),t),b=uyn(HN(n,pIt),t),g=ayn(HN(n,vIt),t),e=Lon(Pun(Gk(xNt,1),qQn,25,15,[v.a,T.a,j.a,S.a])),i=Lon(Pun(Gk(xNt,1),qQn,25,15,[w.a,f.a,y.a,g.a])),r=p.a,c=Lon(Pun(Gk(xNt,1),qQn,25,15,[d.a,l.a,k.a,b.a])),s=Lon(Pun(Gk(xNt,1),qQn,25,15,[v.b,w.b,d.b,m.b])),o=Lon(Pun(Gk(xNt,1),qQn,25,15,[T.b,f.b,l.b,g.b])),h=M.b,u=Lon(Pun(Gk(xNt,1),qQn,25,15,[j.b,y.b,k.b,E.b])),w9(HN(n,wIt),e+r,s+h),w9(HN(n,vIt),e+r,s+h),w9(HN(n,dIt),e+r,0),w9(HN(n,EIt),e+r,s+h+o),w9(HN(n,MIt),0,s+h),w9(HN(n,hIt),e+r+i,s+h),w9(HN(n,gIt),e+r+i,0),w9(HN(n,TIt),0,s+h+o),w9(HN(n,fIt),e+r+i,s+h+o),w9(HN(n,bIt),0,s),w9(HN(n,yIt),e,0),w9(HN(n,lIt),0,s+h+o),w9(HN(n,pIt),e+r+i,0),(a=new Gj).a=Lon(Pun(Gk(xNt,1),qQn,25,15,[e+i+r+c,M.a,m.a,E.a])),a.b=Lon(Pun(Gk(xNt,1),qQn,25,15,[s+o+h+u,p.b,S.b,b.b])),a}function MXn(n){var t,e,i,r,c,a,u,o,s,f,l,b,w,d,g;for(d=new Np,l=new Wb(n.d.b);l.ar.d.d+r.d.a?f.f.d=!0:(f.f.d=!0,f.f.a=!0))),i.b!=i.d.c&&(t=e);f&&(c=BB(RX(n.f,a.d.i),57),t.bc.d.d+c.d.a?f.f.d=!0:(f.f.d=!0,f.f.a=!0))}for(u=new oz(ZL(fbn(b).a.Kc(),new h));dAn(u);)0!=(a=BB(U5(u),17)).a.b&&(t=BB(px(a.a),8),a.d.j==(kUn(),sIt)&&((g=new PBn(t,new xC(t.a,r.d.d),r,a)).f.a=!0,g.a=a.d,d.c[d.c.length]=g),a.d.j==SIt&&((g=new PBn(t,new xC(t.a,r.d.d+r.d.a),r,a)).f.d=!0,g.a=a.d,d.c[d.c.length]=g))}return d}function SXn(n,t,e){var i,r,c,a,u,o,s;if(OTn(e,"Network simplex node placement",1),n.e=t,n.n=BB(mMn(t,(hWn(),Alt)),304),oqn(n),REn(n),YT(wnn(new Rq(null,new w1(n.e.b,16)),new Hc),new cg(n)),YT(AV(wnn(AV(wnn(new Rq(null,new w1(n.e.b,16)),new ta),new ea),new ia),new ra),new rg(n)),qy(TD(mMn(n.e,(HXn(),xgt))))&&(OTn(c=mcn(e,1),"Straight Edges Pre-Processing",1),jzn(n),HSn(c)),Mvn(n.f),r=BB(mMn(t,xpt),19).a*n.f.a.c.length,WKn(Qk(Jk(B_(n.f),r),!1),mcn(e,1)),0!=n.d.a.gc()){for(OTn(c=mcn(e,1),"Flexible Where Space Processing",1),a=BB($N(Oz($V(new Rq(null,new w1(n.f.a,16)),new qc),new Dc)),19).a,u=BB($N(Iz($V(new Rq(null,new w1(n.f.a,16)),new Gc),new Rc)),19).a-a,o=AN(new qv,n.f),s=AN(new qv,n.f),UNn(aM(cM(rM(uM(new Hv,2e4),u),o),s)),YT(AV(AV(LU(n.i),new zc),new Uc),new zV(a,o,u,s)),i=n.d.a.ec().Kc();i.Ob();)BB(i.Pb(),213).g=1;WKn(Qk(Jk(B_(n.f),r),!1),mcn(c,1)),HSn(c)}qy(TD(mMn(t,xgt)))&&(OTn(c=mcn(e,1),"Straight Edges Post-Processing",1),SPn(n),HSn(c)),QGn(n),n.e=null,n.f=null,n.i=null,n.c=null,$U(n.k),n.j=null,n.a=null,n.o=null,n.d.a.$b(),HSn(e)}function PXn(n,t,i){var r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k;for(u=new Wb(n.a.b);u.a0)if(r=f.gc(),s=CY(e.Math.floor((r+1)/2))-1,c=CY(e.Math.ceil((r+1)/2))-1,t.o==cyt)for(h=c;h>=s;h--)t.a[y.p]==y&&(d=BB(f.Xb(h),46),w=BB(d.a,10),!FT(i,d.b)&&b>n.b.e[w.p]&&(t.a[w.p]=y,t.g[y.p]=t.g[w.p],t.a[y.p]=t.g[y.p],t.f[t.g[y.p].p]=(hN(),!!(qy(t.f[t.g[y.p].p])&y.k==(uSn(),Put))),b=n.b.e[w.p]));else for(h=s;h<=c;h++)t.a[y.p]==y&&(p=BB(f.Xb(h),46),g=BB(p.a,10),!FT(i,p.b)&&b=w&&(v>w&&(b.c=x8(Ant,HWn,1,0,5,1),w=v),b.c[b.c.length]=a);0!=b.c.length&&(l=BB(xq(b,pvn(t,b.c.length)),128),P.a.Bc(l),l.s=d++,cLn(l,M,j),b.c=x8(Ant,HWn,1,0,5,1))}for(y=n.c.length+1,u=new Wb(n);u.aS.s&&(fW(e),y7(S.i,i),i.c>0&&(i.a=S,WB(S.t,i),i.b=E,WB(E.i,i)))}function OXn(n){var t,e,i,r,c;switch(t=n.c){case 11:return n.Ml();case 12:return n.Ol();case 14:return n.Ql();case 15:return n.Tl();case 16:return n.Rl();case 17:return n.Ul();case 21:return QXn(n),wWn(),wWn(),sNt;case 10:switch(n.a){case 65:return n.yl();case 90:return n.Dl();case 122:return n.Kl();case 98:return n.El();case 66:return n.zl();case 60:return n.Jl();case 62:return n.Hl()}}switch(c=kXn(n),t=n.c){case 3:return n.Zl(c);case 4:return n.Xl(c);case 5:return n.Yl(c);case 0:if(123==n.a&&n.d=48&&t<=57))throw Hp(new ak(kWn((u$(),X8n))));for(i=t-48;r=48&&t<=57;)if((i=10*i+t-48)<0)throw Hp(new ak(kWn((u$(),J8n))));if(e=i,44==t){if(r>=n.j)throw Hp(new ak(kWn((u$(),V8n))));if((t=fV(n.i,r++))>=48&&t<=57){for(e=t-48;r=48&&t<=57;)if((e=10*e+t-48)<0)throw Hp(new ak(kWn((u$(),J8n))));if(i>e)throw Hp(new ak(kWn((u$(),Q8n))))}else e=-1}if(125!=t)throw Hp(new ak(kWn((u$(),W8n))));n.sl(r)?(wWn(),wWn(),c=new h4(9,c),n.d=r+1):(wWn(),wWn(),c=new h4(3,c),n.d=r),c.dm(i),c.cm(e),QXn(n)}}return c}function AXn(n,t,e,i,r){var c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E,T,M;for(w=new Y6(t.b),v=new Y6(t.b),l=new Y6(t.b),j=new Y6(t.b),d=new Y6(t.b),k=spn(t,0);k.b!=k.d.c;)for(u=new Wb((m=BB(b3(k),11)).g);u.a0,g=m.g.c.length>0,s&&g?l.c[l.c.length]=m:s?w.c[w.c.length]=m:g&&(v.c[v.c.length]=m);for(b=new Wb(w);b.a1)for(b=new cx((!n.a&&(n.a=new eU(FOt,n,6,6)),n.a));b.e!=b.i.gc();)Qjn(b);for(d=C,C>y+m?d=y+m:Ck+w?g=k+w:Iy-m&&dk-w&&gC+P?E=C+P:yI+j?T=I+j:kC-P&&EI-j&&Ti&&(f=i-1),(l=L+H$n(t,24)*uJn*h-h/2)<0?l=1:l>r&&(l=r-1),tE(),jen(c=new ro,f),Een(c,l),f9((!u.a&&(u.a=new $L(xOt,u,5)),u.a),c)}function HXn(){HXn=O,sWn(),ppt=jPt,vpt=EPt,mpt=TPt,ypt=MPt,jpt=SPt,Ept=PPt,Spt=IPt,Cpt=APt,Ipt=$Pt,Ppt=OPt,Opt=LPt,$pt=NPt,Npt=RPt,Mpt=CPt,fWn(),gpt=_wt,kpt=Fwt,Tpt=Bwt,Apt=Hwt,hpt=new XA(pPt,iln(0)),fpt=Dwt,lpt=Rwt,bpt=Kwt,zpt=ldt,Rpt=zwt,Kpt=Wwt,Bpt=edt,_pt=Jwt,Fpt=Zwt,Xpt=pdt,Upt=wdt,qpt=odt,Hpt=adt,Gpt=hdt,Rgt=Pwt,Kgt=Cwt,rgt=Kbt,cgt=Bbt,Ugt=new WA(12),zgt=new XA(XSt,Ugt),Mbn(),Zdt=new XA(vSt,ngt=QPt),tpt=new XA(aPt,0),wpt=new XA(vPt,iln(1)),Edt=new XA(cSt,dZn),Ggt=zSt,ept=uPt,upt=wPt,zdt=lSt,kdt=iSt,sgt=ESt,dpt=new XA(kPt,(hN(),!0)),wgt=SSt,dgt=PSt,Fgt=KSt,qgt=qSt,Bgt=FSt,Ffn(),Udt=new XA(bSt,Wdt=BPt),$gt=DSt,Agt=NSt,cpt=fPt,rpt=hPt,apt=bPt,cpn(),new XA(ZSt,Vgt=qCt),Jgt=ePt,Ygt=iPt,Zgt=rPt,Qgt=tPt,Dpt=Gwt,Pgt=lwt,Sgt=hwt,xpt=qwt,kgt=ewt,Gdt=Tbt,qdt=jbt,xdt=ubt,Ddt=obt,Kdt=bbt,Rdt=sbt,Hdt=ybt,Igt=wwt,Ogt=dwt,pgt=Vbt,_gt=$wt,Ngt=mwt,ugt=Gbt,Dgt=Mwt,egt=Nbt,igt=Dbt,Ndt=hSt,Lgt=gwt,Pdt=Qlt,Sdt=Wlt,Mdt=Xlt,fgt=Xbt,hgt=Ubt,lgt=Wbt,Hgt=BSt,vgt=OSt,agt=ySt,Jdt=gSt,Qdt=dSt,_dt=gbt,ipt=sPt,Tdt=sSt,bgt=MSt,npt=cPt,Xgt=VSt,Wgt=JSt,Egt=cwt,Tgt=uwt,spt=gPt,jdt=Ult,Mgt=swt,Ydt=Obt,Vdt=Cbt,Cgt=$St,mgt=Zbt,xgt=jwt,Lpt=xPt,Xdt=Sbt,opt=Nwt,tgt=$bt,ygt=twt,Fdt=vbt,ggt=ISt,jgt=rwt,Bdt=mbt,Ldt=cbt,Adt=ebt,Idt=nbt,Odt=tbt,$dt=rbt,Cdt=Ylt,ogt=zbt}function qXn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E,T,M,S,P,C;if(uHn(),T=n.e,w=n.d,r=n.a,0==T)switch(t){case 0:return"0";case 1:return WQn;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return(j=new Ck).a+=t<0?"0E+":"0E",j.a+=-t,j.a}if(y=x8(ONt,WVn,25,1+(m=10*w+1+7),15,1),e=m,1==w)if((u=r[0])<0){C=e0(u,UQn);do{d=C,C=Ojn(C,10),y[--e]=48+dG(ibn(d,cbn(C,10)))&QVn}while(0!=Vhn(C,0))}else{C=u;do{d=C,C=C/10|0,y[--e]=d-10*C+48&QVn}while(0!=C)}else{aHn(r,0,S=x8(ANt,hQn,25,w,15,1),0,P=w);n:for(;;){for(E=0,s=P-1;s>=0;s--)p=fTn(rbn(yz(E,32),e0(S[s],UQn))),S[s]=dG(p),E=dG(kz(p,32));v=dG(E),g=e;do{y[--e]=48+v%10&QVn}while(0!=(v=v/10|0)&&0!=e);for(i=9-g+e,o=0;o0;o++)y[--e]=48;for(f=P-1;0==S[f];f--)if(0==f)break n;P=f+1}for(;48==y[e];)++e}if(b=T<0,a=m-e-t-1,0==t)return b&&(y[--e]=45),Bdn(y,e,m-e);if(t>0&&a>=-6){if(a>=0){for(h=e+a,l=m-1;l>=h;l--)y[l+1]=y[l];return y[++h]=46,b&&(y[--e]=45),Bdn(y,e,m-e+1)}for(f=2;f<1-a;f++)y[--e]=48;return y[--e]=46,y[--e]=48,b&&(y[--e]=45),Bdn(y,e,m-e)}return M=e+1,c=m,k=new Ik,b&&(k.a+="-"),c-M>=1?(xX(k,y[e]),k.a+=".",k.a+=Bdn(y,e+1,m-e-1)):k.a+=Bdn(y,e,m-e),k.a+="E",a>0&&(k.a+="+"),k.a+=""+a,k.a}function GXn(n,t){var i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k;switch(n.c=t,n.g=new xp,GM(),twn(new Pw(new Dy(n.c))),v=SD(ZAn(n.c,(MMn(),dTt))),u=BB(ZAn(n.c,pTt),316),y=BB(ZAn(n.c,vTt),429),c=BB(ZAn(n.c,hTt),482),m=BB(ZAn(n.c,gTt),430),n.j=Gy(MD(ZAn(n.c,mTt))),a=n.a,u.g){case 0:a=n.a;break;case 1:a=n.b;break;case 2:a=n.i;break;case 3:a=n.e;break;case 4:a=n.f;break;default:throw Hp(new _y(N4n+(null!=u.f?u.f:""+u.g)))}if(n.d=new DY(a,y,c),hon(n.d,(Xcn(),Qrt),TD(ZAn(n.c,lTt))),n.d.c=qy(TD(ZAn(n.c,fTt))),0==JQ(n.c).i)return n.d;for(h=new AL(JQ(n.c));h.e!=h.i.gc();){for(l=(s=BB(kpn(h),33)).g/2,f=s.f/2,k=new xC(s.i+l,s.j+f);hU(n.g,k);)_x(k,(e.Math.random()-.5)*lZn,(e.Math.random()-.5)*lZn);w=BB(ZAn(s,(sWn(),$St)),142),d=new AZ(k,new UV(k.a-l-n.j/2-w.b,k.b-f-n.j/2-w.d,s.g+n.j+(w.b+w.c),s.f+n.j+(w.d+w.a))),WB(n.d.i,d),VW(n.g,k,new rI(d,s))}switch(m.g){case 0:if(null==v)n.d.d=BB(xq(n.d.i,0),65);else for(p=new Wb(n.d.i);p.a1&&r5(f,v,f.c.b,f.c),mtn(c)));v=m}return f}function UXn(n,t,e){var i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E,T,M,S,P,C,I,O,A;for(OTn(e,"Greedy cycle removal",1),A=(m=t.a).c.length,n.a=x8(ANt,hQn,25,A,15,1),n.c=x8(ANt,hQn,25,A,15,1),n.b=x8(ANt,hQn,25,A,15,1),s=0,p=new Wb(m);p.a0?S+1:1);for(a=new Wb(k.g);a.a0?S+1:1)}0==n.c[s]?DH(n.e,d):0==n.a[s]&&DH(n.f,d),++s}for(w=-1,b=1,f=new Np,n.d=BB(mMn(t,(hWn(),Slt)),230);A>0;){for(;0!=n.e.b;)C=BB(dH(n.e),10),n.b[C.p]=w--,QKn(n,C),--A;for(;0!=n.f.b;)I=BB(dH(n.f),10),n.b[I.p]=b++,QKn(n,I),--A;if(A>0){for(l=_Vn,v=new Wb(m);v.a=l&&(y>l&&(f.c=x8(Ant,HWn,1,0,5,1),l=y),f.c[f.c.length]=d);h=n.Zf(f),n.b[h.p]=b++,QKn(n,h),--A}}for(P=m.c.length+1,s=0;sn.b[O]&&(tBn(i,!0),hon(t,qft,(hN(),!0)));n.a=null,n.c=null,n.b=null,yQ(n.f),yQ(n.e),HSn(e)}function XXn(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p;for(i=new Np,u=new Np,g=t/2,b=n.gc(),r=BB(n.Xb(0),8),p=BB(n.Xb(1),8),WB(i,(l1(0,(w=QAn(r.a,r.b,p.a,p.b,g)).c.length),BB(w.c[0],8))),WB(u,(l1(1,w.c.length),BB(w.c[1],8))),s=2;s=0;o--)DH(e,(l1(o,a.c.length),BB(a.c[o],8)));return e}function WXn(n){var t,e,i,r,c,a,u,o,s,h,f,l,b;if(a=!0,f=null,i=null,r=null,t=!1,b=kAt,s=null,c=null,(o=Vgn(n,u=0,AAt,$At))=0&&mK(n.substr(u,2),"//")?(o=Vgn(n,u+=2,LAt,NAt),i=n.substr(u,o-u),u=o):null==f||u!=n.length&&(b1(u,n.length),47==n.charCodeAt(u))||(a=!1,-1==(o=yN(n,JTn(35),u))&&(o=n.length),i=n.substr(u,o-u),u=o);if(!e&&u0&&58==fV(h,h.length-1)&&(r=h,u=o)),u=n.j)return n.a=-1,void(n.c=1);if(t=fV(n.i,n.d++),n.a=t,1!=n.b){switch(t){case 124:i=2;break;case 42:i=3;break;case 43:i=4;break;case 63:i=5;break;case 41:i=7;break;case 46:i=8;break;case 91:i=9;break;case 94:i=11;break;case 36:i=12;break;case 40:if(i=6,n.d>=n.j)break;if(63!=fV(n.i,n.d))break;if(++n.d>=n.j)throw Hp(new ak(kWn((u$(),p8n))));switch(t=fV(n.i,n.d++)){case 58:i=13;break;case 61:i=14;break;case 33:i=15;break;case 91:i=19;break;case 62:i=18;break;case 60:if(n.d>=n.j)throw Hp(new ak(kWn((u$(),p8n))));if(61==(t=fV(n.i,n.d++)))i=16;else{if(33!=t)throw Hp(new ak(kWn((u$(),v8n))));i=17}break;case 35:for(;n.d=n.j)throw Hp(new ak(kWn((u$(),g8n))));n.a=fV(n.i,n.d++);break;default:i=0}n.c=i}else{switch(t){case 92:if(i=10,n.d>=n.j)throw Hp(new ak(kWn((u$(),g8n))));n.a=fV(n.i,n.d++);break;case 45:512==(512&n.e)&&n.d=j||!Ndn(v,i))&&(i=r1(t,f)),PZ(v,i),c=new oz(ZL(fbn(v).a.Kc(),new h));dAn(c);)r=BB(U5(c),17),n.a[r.p]||(g=r.c.i,--n.e[g.p],0==n.e[g.p]&&F8(eMn(w,g)));for(s=f.c.length-1;s>=0;--s)WB(t.b,(l1(s,f.c.length),BB(f.c[s],29)));t.a.c=x8(Ant,HWn,1,0,5,1),HSn(e)}else HSn(e)}function ZXn(n){var t,e,i,r,c,a,u,o;for(n.b=1,QXn(n),t=null,0==n.c&&94==n.a?(QXn(n),wWn(),wWn(),Jxn(t=new M0(4),0,unt),a=new M0(4)):(wWn(),wWn(),a=new M0(4)),r=!0;1!=(o=n.c);){if(0==o&&93==n.a&&!r){t&&(WGn(t,a),a=t);break}if(e=n.a,i=!1,10==o)switch(e){case 100:case 68:case 119:case 87:case 115:case 83:sHn(a,d_n(e)),i=!0;break;case 105:case 73:case 99:case 67:sHn(a,d_n(e)),(e=-1)<0&&(i=!0);break;case 112:case 80:if(!(u=DIn(n,e)))throw Hp(new ak(kWn((u$(),O8n))));sHn(a,u),i=!0;break;default:e=qDn(n)}else if(24==o&&!r){if(t&&(WGn(t,a),a=t),WGn(a,ZXn(n)),0!=n.c||93!=n.a)throw Hp(new ak(kWn((u$(),N8n))));break}if(QXn(n),!i){if(0==o){if(91==e)throw Hp(new ak(kWn((u$(),x8n))));if(93==e)throw Hp(new ak(kWn((u$(),D8n))));if(45==e&&!r&&93!=n.a)throw Hp(new ak(kWn((u$(),R8n))))}if(0!=n.c||45!=n.a||45==e&&r)Jxn(a,e,e);else{if(QXn(n),1==(o=n.c))throw Hp(new ak(kWn((u$(),$8n))));if(0==o&&93==n.a)Jxn(a,e,e),Jxn(a,45,45);else{if(0==o&&93==n.a||24==o)throw Hp(new ak(kWn((u$(),R8n))));if(c=n.a,0==o){if(91==c)throw Hp(new ak(kWn((u$(),x8n))));if(93==c)throw Hp(new ak(kWn((u$(),D8n))));if(45==c)throw Hp(new ak(kWn((u$(),R8n))))}else 10==o&&(c=qDn(n));if(QXn(n),e>c)throw Hp(new ak(kWn((u$(),F8n))));Jxn(a,e,c)}}}r=!1}if(1==n.c)throw Hp(new ak(kWn((u$(),$8n))));return T$n(a),qHn(a),n.b=0,QXn(n),a}function nWn(n){V$n(n.c,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"http://www.w3.org/2001/XMLSchema#decimal"])),V$n(n.d,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"http://www.w3.org/2001/XMLSchema#integer"])),V$n(n.e,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"http://www.w3.org/2001/XMLSchema#boolean"])),V$n(n.f,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"EBoolean",t8n,"EBoolean:Object"])),V$n(n.i,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"http://www.w3.org/2001/XMLSchema#byte"])),V$n(n.g,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"http://www.w3.org/2001/XMLSchema#hexBinary"])),V$n(n.j,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"EByte",t8n,"EByte:Object"])),V$n(n.n,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"EChar",t8n,"EChar:Object"])),V$n(n.t,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"http://www.w3.org/2001/XMLSchema#double"])),V$n(n.u,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"EDouble",t8n,"EDouble:Object"])),V$n(n.F,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"http://www.w3.org/2001/XMLSchema#float"])),V$n(n.G,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"EFloat",t8n,"EFloat:Object"])),V$n(n.I,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"http://www.w3.org/2001/XMLSchema#int"])),V$n(n.J,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"EInt",t8n,"EInt:Object"])),V$n(n.N,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"http://www.w3.org/2001/XMLSchema#long"])),V$n(n.O,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"ELong",t8n,"ELong:Object"])),V$n(n.Z,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"http://www.w3.org/2001/XMLSchema#short"])),V$n(n.$,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"EShort",t8n,"EShort:Object"])),V$n(n._,_9n,Pun(Gk(Qtt,1),sVn,2,6,[Y9n,"http://www.w3.org/2001/XMLSchema#string"]))}function tWn(n){var t,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E,T,M,S,P,C;if(1==n.c.length)return l1(0,n.c.length),BB(n.c[0],135);if(n.c.length<=0)return new P6;for(s=new Wb(n);s.al&&(P=0,C+=f+E,f=0),ELn(k,u,P,C),t=e.Math.max(t,P+j.a),f=e.Math.max(f,j.b),P+=j.a+E;for(y=new xp,i=new xp,M=new Wb(n);M.av$n(c))&&(f=c);for(!f&&(l1(0,d.c.length),f=BB(d.c[0],180)),w=new Wb(t.b);w.a=-1900?1:0,oO(n,e>=4?Pun(Gk(Qtt,1),sVn,2,6,[fQn,lQn])[a]:Pun(Gk(Qtt,1),sVn,2,6,["BC","AD"])[a]);break;case 121:opn(n,e,i);break;case 77:XKn(n,e,i);break;case 107:Enn(n,0==(u=r.q.getHours())?24:u,e);break;case 83:RLn(n,e,r);break;case 69:o=i.q.getDay(),oO(n,5==e?Pun(Gk(Qtt,1),sVn,2,6,["S","M","T","W","T","F","S"])[o]:4==e?Pun(Gk(Qtt,1),sVn,2,6,[bQn,wQn,dQn,gQn,pQn,vQn,mQn])[o]:Pun(Gk(Qtt,1),sVn,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[o]);break;case 97:r.q.getHours()>=12&&r.q.getHours()<24?oO(n,Pun(Gk(Qtt,1),sVn,2,6,["AM","PM"])[1]):oO(n,Pun(Gk(Qtt,1),sVn,2,6,["AM","PM"])[0]);break;case 104:Enn(n,0==(s=r.q.getHours()%12)?12:s,e);break;case 75:Enn(n,r.q.getHours()%12,e);break;case 72:Enn(n,r.q.getHours(),e);break;case 99:h=i.q.getDay(),5==e?oO(n,Pun(Gk(Qtt,1),sVn,2,6,["S","M","T","W","T","F","S"])[h]):4==e?oO(n,Pun(Gk(Qtt,1),sVn,2,6,[bQn,wQn,dQn,gQn,pQn,vQn,mQn])[h]):3==e?oO(n,Pun(Gk(Qtt,1),sVn,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[h]):Enn(n,h,1);break;case 76:f=i.q.getMonth(),5==e?oO(n,Pun(Gk(Qtt,1),sVn,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[f]):4==e?oO(n,Pun(Gk(Qtt,1),sVn,2,6,[JVn,YVn,ZVn,nQn,tQn,eQn,iQn,rQn,cQn,aQn,uQn,oQn])[f]):3==e?oO(n,Pun(Gk(Qtt,1),sVn,2,6,["Jan","Feb","Mar","Apr",tQn,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[f]):Enn(n,f+1,e);break;case 81:l=i.q.getMonth()/3|0,oO(n,e<4?Pun(Gk(Qtt,1),sVn,2,6,["Q1","Q2","Q3","Q4"])[l]:Pun(Gk(Qtt,1),sVn,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[l]);break;case 100:Enn(n,i.q.getDate(),e);break;case 109:Enn(n,r.q.getMinutes(),e);break;case 115:Enn(n,r.q.getSeconds(),e);break;case 122:oO(n,e<4?c.c[0]:c.c[1]);break;case 118:oO(n,c.b);break;case 90:oO(n,e<3?nIn(c):3==e?wIn(c):dIn(c.a));break;default:return!1}return!0}function uWn(n,t,e,i){var r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E,T,M,S,P,C;if(tKn(t),o=BB(Wtn((!t.b&&(t.b=new hK(KOt,t,4,7)),t.b),0),82),h=BB(Wtn((!t.c&&(t.c=new hK(KOt,t,5,8)),t.c),0),82),u=PTn(o),s=PTn(h),a=0==(!t.a&&(t.a=new eU(FOt,t,6,6)),t.a).i?null:BB(Wtn((!t.a&&(t.a=new eU(FOt,t,6,6)),t.a),0),202),j=BB(RX(n.a,u),10),S=BB(RX(n.a,s),10),E=null,P=null,cL(o,186)&&(cL(k=BB(RX(n.a,o),299),11)?E=BB(k,11):cL(k,10)&&(j=BB(k,10),E=BB(xq(j.j,0),11))),cL(h,186)&&(cL(M=BB(RX(n.a,h),299),11)?P=BB(M,11):cL(M,10)&&(S=BB(M,10),P=BB(xq(S.j,0),11))),!j||!S)throw Hp(new ck("The source or the target of edge "+t+" could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN."));for(qan(d=new wJ,t),hon(d,(hWn(),dlt),t),hon(d,(HXn(),vgt),null),b=BB(mMn(i,Zft),21),j==S&&b.Fc((bDn(),vft)),E||(ain(),y=qvt,T=null,a&&vA(BB(mMn(j,ept),98))&&(J3(T=new xC(a.j,a.k),XY(t)),t5(T,e),Ctn(s,u)&&(y=Hvt,UR(T,j.n))),E=dHn(j,T,y,i)),P||(ain(),y=Hvt,C=null,a&&vA(BB(mMn(S,ept),98))&&(J3(C=new xC(a.b,a.c),XY(t)),t5(C,e)),P=dHn(S,C,y,vW(S))),SZ(d,E),MZ(d,P),(E.e.c.length>1||E.g.c.length>1||P.e.c.length>1||P.g.c.length>1)&&b.Fc((bDn(),bft)),l=new AL((!t.n&&(t.n=new eU(zOt,t,1,7)),t.n));l.e!=l.i.gc();)if(!qy(TD(ZAn(f=BB(kpn(l),137),Ggt)))&&f.a)switch(g=Hhn(f),WB(d.b,g),BB(mMn(g,Jdt),272).g){case 1:case 2:b.Fc((bDn(),fft));break;case 0:b.Fc((bDn(),sft)),hon(g,Jdt,(Rtn(),zPt))}if(c=BB(mMn(i,qdt),314),p=BB(mMn(i,_gt),315),r=c==(Oin(),sht)||p==(Nvn(),pvt),a&&0!=(!a.a&&(a.a=new $L(xOt,a,5)),a.a).i&&r){for(v=qSn(a),w=new km,m=spn(v,0);m.b!=m.d.c;)DH(w,new wA(BB(b3(m),8)));hon(d,glt,w)}return d}function oWn(n){n.gb||(n.gb=!0,n.b=kan(n,0),Rrn(n.b,18),Krn(n.b,19),n.a=kan(n,1),Rrn(n.a,1),Krn(n.a,2),Krn(n.a,3),Krn(n.a,4),Krn(n.a,5),n.o=kan(n,2),Rrn(n.o,8),Rrn(n.o,9),Krn(n.o,10),Krn(n.o,11),Krn(n.o,12),Krn(n.o,13),Krn(n.o,14),Krn(n.o,15),Krn(n.o,16),Krn(n.o,17),Krn(n.o,18),Krn(n.o,19),Krn(n.o,20),Krn(n.o,21),Krn(n.o,22),Krn(n.o,23),otn(n.o),otn(n.o),otn(n.o),otn(n.o),otn(n.o),otn(n.o),otn(n.o),otn(n.o),otn(n.o),otn(n.o),n.p=kan(n,3),Rrn(n.p,2),Rrn(n.p,3),Rrn(n.p,4),Rrn(n.p,5),Krn(n.p,6),Krn(n.p,7),otn(n.p),otn(n.p),n.q=kan(n,4),Rrn(n.q,8),n.v=kan(n,5),Krn(n.v,9),otn(n.v),otn(n.v),otn(n.v),n.w=kan(n,6),Rrn(n.w,2),Rrn(n.w,3),Rrn(n.w,4),Krn(n.w,5),n.B=kan(n,7),Krn(n.B,1),otn(n.B),otn(n.B),otn(n.B),n.Q=kan(n,8),Krn(n.Q,0),otn(n.Q),n.R=kan(n,9),Rrn(n.R,1),n.S=kan(n,10),otn(n.S),otn(n.S),otn(n.S),otn(n.S),otn(n.S),otn(n.S),otn(n.S),otn(n.S),otn(n.S),otn(n.S),otn(n.S),otn(n.S),otn(n.S),otn(n.S),otn(n.S),n.T=kan(n,11),Krn(n.T,10),Krn(n.T,11),Krn(n.T,12),Krn(n.T,13),Krn(n.T,14),otn(n.T),otn(n.T),n.U=kan(n,12),Rrn(n.U,2),Rrn(n.U,3),Krn(n.U,4),Krn(n.U,5),Krn(n.U,6),Krn(n.U,7),otn(n.U),n.V=kan(n,13),Krn(n.V,10),n.W=kan(n,14),Rrn(n.W,18),Rrn(n.W,19),Rrn(n.W,20),Krn(n.W,21),Krn(n.W,22),Krn(n.W,23),n.bb=kan(n,15),Rrn(n.bb,10),Rrn(n.bb,11),Rrn(n.bb,12),Rrn(n.bb,13),Rrn(n.bb,14),Rrn(n.bb,15),Rrn(n.bb,16),Krn(n.bb,17),otn(n.bb),otn(n.bb),n.eb=kan(n,16),Rrn(n.eb,2),Rrn(n.eb,3),Rrn(n.eb,4),Rrn(n.eb,5),Rrn(n.eb,6),Rrn(n.eb,7),Krn(n.eb,8),Krn(n.eb,9),n.ab=kan(n,17),Rrn(n.ab,0),Rrn(n.ab,1),n.H=kan(n,18),Krn(n.H,0),Krn(n.H,1),Krn(n.H,2),Krn(n.H,3),Krn(n.H,4),Krn(n.H,5),otn(n.H),n.db=kan(n,19),Krn(n.db,2),n.c=jan(n,20),n.d=jan(n,21),n.e=jan(n,22),n.f=jan(n,23),n.i=jan(n,24),n.g=jan(n,25),n.j=jan(n,26),n.k=jan(n,27),n.n=jan(n,28),n.r=jan(n,29),n.s=jan(n,30),n.t=jan(n,31),n.u=jan(n,32),n.fb=jan(n,33),n.A=jan(n,34),n.C=jan(n,35),n.D=jan(n,36),n.F=jan(n,37),n.G=jan(n,38),n.I=jan(n,39),n.J=jan(n,40),n.L=jan(n,41),n.M=jan(n,42),n.N=jan(n,43),n.O=jan(n,44),n.P=jan(n,45),n.X=jan(n,46),n.Y=jan(n,47),n.Z=jan(n,48),n.$=jan(n,49),n._=jan(n,50),n.cb=jan(n,51),n.K=jan(n,52))}function sWn(){var n,t;sWn=O,eSt=new up(w5n),mPt=new up(d5n),wvn(),iSt=new $O(W2n,rSt=CMt),new $p,cSt=new $O(VYn,null),aSt=new up(g5n),wEn(),fSt=EG(ZMt,Pun(Gk(qPt,1),$Vn,291,0,[VMt])),hSt=new $O(u3n,fSt),lSt=new $O(X2n,(hN(),!1)),Ffn(),bSt=new $O(Y2n,wSt=BPt),Mbn(),vSt=new $O(y2n,mSt=ZPt),jSt=new $O(A4n,!1),ufn(),ESt=new $O(d2n,TSt=vCt),WSt=new WA(12),XSt=new $O(QYn,WSt),CSt=new $O(jZn,!1),ISt=new $O(m3n,!1),USt=new $O(MZn,!1),QEn(),uPt=new $O(EZn,oPt=JCt),gPt=new up(g3n),pPt=new up(pZn),vPt=new up(yZn),kPt=new up(kZn),ASt=new km,OSt=new $O(o3n,ASt),sSt=new $O(f3n,!1),MSt=new $O(l3n,!1),new up(p5n),LSt=new lm,$St=new $O(p3n,LSt),zSt=new $O(z2n,!1),new $p,yPt=new $O(v5n,1),new $O(m5n,!0),iln(0),new $O(y5n,iln(100)),new $O(k5n,!1),iln(0),new $O(j5n,iln(4e3)),iln(0),new $O(E5n,iln(400)),new $O(T5n,!1),new $O(M5n,!1),new $O(S5n,!0),new $O(P5n,!1),Fwn(),uSt=new $O(b5n,oSt=eOt),jPt=new $O(L2n,10),EPt=new $O(N2n,10),TPt=new $O(XYn,20),MPt=new $O(x2n,10),SPt=new $O(mZn,2),PPt=new $O(D2n,10),IPt=new $O(R2n,0),OPt=new $O(F2n,5),APt=new $O(K2n,1),$Pt=new $O(_2n,1),LPt=new $O(vZn,20),NPt=new $O(B2n,10),RPt=new $O(H2n,10),CPt=new up(q2n),DPt=new lA,xPt=new $O(v3n,DPt),JSt=new up(d3n),VSt=new $O(w3n,QSt=!1),xSt=new WA(5),NSt=new $O(Z2n,xSt),n$n(),t=BB(Vj(GCt),9),RSt=new JK(t,BB(SR(t,t.length),9),0),DSt=new $O(CZn,RSt),cpn(),ZSt=new $O(e3n,nPt=BCt),ePt=new up(i3n),iPt=new up(r3n),rPt=new up(c3n),tPt=new up(a3n),n=BB(Vj(JIt),9),_St=new JK(n,BB(SR(n,n.length),9),0),KSt=new $O(PZn,_St),GSt=nbn((n_n(),GIt)),qSt=new $O(SZn,GSt),HSt=new xC(0,0),BSt=new $O(BZn,HSt),FSt=new $O(J2n,!1),Rtn(),gSt=new $O(s3n,pSt=zPt),dSt=new $O(TZn,!1),new up(C5n),iln(1),new $O(I5n,null),cPt=new up(b3n),sPt=new up(h3n),kUn(),wPt=new $O(U2n,dPt=PIt),aPt=new up(G2n),lIn(),lPt=nbn(rIt),fPt=new $O(IZn,lPt),hPt=new $O(n3n,!1),bPt=new $O(t3n,!0),SSt=new $O(V2n,!1),PSt=new $O(Q2n,!1),ySt=new $O(WYn,1),nMn(),new $O(O5n,kSt=aCt),YSt=!0}function hWn(){var n,t;hWn=O,dlt=new up(OZn),Fft=new up("coordinateOrigin"),Mlt=new up("processors"),_ft=new iR("compoundNode",(hN(),!1)),elt=new iR("insideConnections",!1),glt=new up("originalBendpoints"),plt=new up("originalDummyNodePosition"),vlt=new up("originalLabelEdge"),Plt=new up("representedLabels"),zft=new up("endLabels"),Uft=new up("endLabel.origin"),ult=new iR("labelSide",(Xyn(),MCt)),blt=new iR("maxEdgeThickness",0),Clt=new iR("reversed",!1),Slt=new up(AZn),hlt=new iR("longEdgeSource",null),flt=new iR("longEdgeTarget",null),slt=new iR("longEdgeHasLabelDummies",!1),olt=new iR("longEdgeBeforeLabelDummy",!1),Gft=new iR("edgeConstraint",(Yun(),Aht)),rlt=new up("inLayerLayoutUnit"),ilt=new iR("inLayerConstraint",(z7(),Pft)),clt=new iR("inLayerSuccessorConstraint",new Np),alt=new iR("inLayerSuccessorConstraintBetweenNonDummies",!1),Elt=new up("portDummy"),Bft=new iR("crossingHint",iln(0)),Zft=new iR("graphProperties",new JK(t=BB(Vj(Tft),9),BB(SR(t,t.length),9),0)),Qft=new iR("externalPortSide",(kUn(),PIt)),Jft=new iR("externalPortSize",new Gj),Wft=new up("externalPortReplacedDummies"),Vft=new up("externalPortReplacedDummy"),Xft=new iR("externalPortConnections",new JK(n=BB(Vj(FIt),9),BB(SR(n,n.length),9),0)),Tlt=new iR(dYn,0),xft=new up("barycenterAssociates"),Klt=new up("TopSideComments"),Dft=new up("BottomSideComments"),Kft=new up("CommentConnectionPort"),tlt=new iR("inputCollect",!1),klt=new iR("outputCollect",!1),qft=new iR("cyclic",!1),Hft=new up("crossHierarchyMap"),Rlt=new up("targetOffset"),new iR("splineLabelSize",new Gj),Alt=new up("spacings"),jlt=new iR("partitionConstraint",!1),Rft=new up("breakingPoint.info"),xlt=new up("splines.survivingEdge"),Nlt=new up("splines.route.start"),$lt=new up("splines.edgeChain"),ylt=new up("originalPortConstraints"),Olt=new up("selfLoopHolder"),Llt=new up("splines.nsPortY"),wlt=new up("modelOrder"),llt=new up("longEdgeTargetNode"),Yft=new iR(z1n,!1),Ilt=new iR(z1n,!1),nlt=new up("layerConstraints.hiddenNodes"),mlt=new up("layerConstraints.opposidePort"),Dlt=new up("targetNode.modelOrder")}function fWn(){fWn=O,_nn(),Sbt=new $O(U1n,Pbt=Sht),Gbt=new $O(X1n,(hN(),!1)),z2(),Vbt=new $O(W1n,Qbt=Aft),wwt=new $O(V1n,!1),dwt=new $O(Q1n,!0),Ult=new $O(J1n,!1),U7(),Nwt=new $O(Y1n,xwt=Kvt),iln(1),qwt=new $O(Z1n,iln(7)),Gwt=new $O(n0n,!1),zbt=new $O(t0n,!1),Vvn(),Tbt=new $O(e0n,Mbt=yht),TTn(),lwt=new $O(i0n,bwt=tvt),Tbn(),ewt=new $O(r0n,iwt=qlt),iln(-1),twt=new $O(c0n,iln(-1)),iln(-1),rwt=new $O(a0n,iln(-1)),iln(-1),cwt=new $O(u0n,iln(4)),iln(-1),uwt=new $O(o0n,iln(2)),sNn(),hwt=new $O(s0n,fwt=Ivt),iln(0),swt=new $O(h0n,iln(0)),Zbt=new $O(f0n,iln(DWn)),Oin(),jbt=new $O(l0n,Ebt=hht),ubt=new $O(b0n,!1),gbt=new $O(w0n,.1),ybt=new $O(d0n,!1),iln(-1),vbt=new $O(g0n,iln(-1)),iln(-1),mbt=new $O(p0n,iln(-1)),iln(0),obt=new $O(v0n,iln(40)),Kan(),bbt=new $O(m0n,wbt=Eft),sbt=new $O(y0n,hbt=kft),Nvn(),$wt=new $O(k0n,Lwt=gvt),jwt=new up(j0n),g7(),gwt=new $O(E0n,pwt=qht),Bjn(),mwt=new $O(T0n,ywt=Qht),new $p,Mwt=new $O(M0n,.3),Pwt=new up(S0n),bvn(),Cwt=new $O(P0n,Iwt=lvt),Hcn(),Nbt=new $O(C0n,xbt=Wvt),A6(),Dbt=new $O(I0n,Rbt=Zvt),Usn(),Kbt=new $O(O0n,_bt=rmt),Bbt=new $O(A0n,.2),$bt=new $O($0n,2),_wt=new $O(L0n,null),Bwt=new $O(N0n,10),Fwt=new $O(x0n,10),Hwt=new $O(D0n,20),iln(0),Dwt=new $O(R0n,iln(0)),iln(0),Rwt=new $O(K0n,iln(0)),iln(0),Kwt=new $O(_0n,iln(0)),Xlt=new $O(F0n,!1),YMn(),Qlt=new $O(B0n,Jlt=cft),V8(),Wlt=new $O(H0n,Vlt=aht),Xbt=new $O(q0n,!1),iln(0),Ubt=new $O(G0n,iln(16)),iln(0),Wbt=new $O(z0n,iln(5)),$un(),ldt=new $O(U0n,bdt=bmt),zwt=new $O(X0n,10),Wwt=new $O(W0n,1),uin(),edt=new $O(V0n,idt=ght),Jwt=new up(Q0n),ndt=iln(1),iln(0),Zwt=new $O(J0n,ndt),dcn(),pdt=new $O(Y0n,vdt=umt),wdt=new up(Z0n),odt=new $O(n2n,!0),adt=new $O(t2n,2),hdt=new $O(e2n,!0),gSn(),Obt=new $O(i2n,Abt=_ht),$Pn(),Cbt=new $O(r2n,Ibt=Zst),mon(),cbt=new $O(c2n,abt=Nvt),rbt=new $O(a2n,!1),Bfn(),Ylt=new $O(u2n,Zlt=wut),Mhn(),ebt=new $O(o2n,ibt=cvt),nbt=new $O(s2n,0),tbt=new $O(h2n,0),Ybt=jht,Jbt=sht,awt=nvt,owt=nvt,nwt=Jpt,ufn(),pbt=pCt,kbt=hht,dbt=hht,fbt=hht,lbt=pCt,Ewt=mvt,Twt=gvt,vwt=gvt,kwt=gvt,Swt=vvt,Awt=mvt,Owt=mvt,Mbn(),Fbt=YPt,Hbt=YPt,qbt=rmt,Lbt=JPt,Uwt=wmt,Xwt=lmt,Vwt=wmt,Qwt=lmt,rdt=wmt,cdt=lmt,Ywt=dht,tdt=ght,mdt=wmt,ydt=lmt,ddt=wmt,gdt=lmt,sdt=lmt,udt=lmt,fdt=lmt}function lWn(){lWn=O,rot=new nP("DIRECTION_PREPROCESSOR",0),tot=new nP("COMMENT_PREPROCESSOR",1),cot=new nP("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",2),kot=new nP("INTERACTIVE_EXTERNAL_PORT_POSITIONER",3),Fot=new nP("PARTITION_PREPROCESSOR",4),Mot=new nP("LABEL_DUMMY_INSERTER",5),Uot=new nP("SELF_LOOP_PREPROCESSOR",6),Oot=new nP("LAYER_CONSTRAINT_PREPROCESSOR",7),Kot=new nP("PARTITION_MIDPROCESSOR",8),got=new nP("HIGH_DEGREE_NODE_LAYER_PROCESSOR",9),Not=new nP("NODE_PROMOTION",10),Iot=new nP("LAYER_CONSTRAINT_POSTPROCESSOR",11),_ot=new nP("PARTITION_POSTPROCESSOR",12),lot=new nP("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),Wot=new nP("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",14),Vut=new nP("BREAKING_POINT_INSERTER",15),Lot=new nP("LONG_EDGE_SPLITTER",16),Hot=new nP("PORT_SIDE_PROCESSOR",17),jot=new nP("INVERTED_PORT_PROCESSOR",18),Bot=new nP("PORT_LIST_SORTER",19),Qot=new nP("SORT_BY_INPUT_ORDER_OF_MODEL",20),Dot=new nP("NORTH_SOUTH_PORT_PREPROCESSOR",21),Qut=new nP("BREAKING_POINT_PROCESSOR",22),Rot=new nP(E1n,23),Jot=new nP(T1n,24),Got=new nP("SELF_LOOP_PORT_RESTORER",25),Vot=new nP("SINGLE_EDGE_GRAPH_WRAPPER",26),Eot=new nP("IN_LAYER_CONSTRAINT_PROCESSOR",27),sot=new nP("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",28),Tot=new nP("LABEL_AND_NODE_SIZE_PROCESSOR",29),yot=new nP("INNERMOST_NODE_MARGIN_CALCULATOR",30),Xot=new nP("SELF_LOOP_ROUTER",31),Zut=new nP("COMMENT_NODE_MARGIN_CALCULATOR",32),uot=new nP("END_LABEL_PREPROCESSOR",33),Pot=new nP("LABEL_DUMMY_SWITCHER",34),Yut=new nP("CENTER_LABEL_MANAGEMENT_PROCESSOR",35),Cot=new nP("LABEL_SIDE_SELECTOR",36),vot=new nP("HYPEREDGE_DUMMY_MERGER",37),bot=new nP("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",38),Aot=new nP("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",39),dot=new nP("HIERARCHICAL_PORT_POSITION_PROCESSOR",40),eot=new nP("CONSTRAINTS_POSTPROCESSOR",41),not=new nP("COMMENT_POSTPROCESSOR",42),mot=new nP("HYPERNODE_PROCESSOR",43),wot=new nP("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",44),$ot=new nP("LONG_EDGE_JOINER",45),zot=new nP("SELF_LOOP_POSTPROCESSOR",46),Jut=new nP("BREAKING_POINT_REMOVER",47),xot=new nP("NORTH_SOUTH_PORT_POSTPROCESSOR",48),pot=new nP("HORIZONTAL_COMPACTOR",49),Sot=new nP("LABEL_DUMMY_REMOVER",50),hot=new nP("FINAL_SPLINE_BENDPOINTS_CALCULATOR",51),oot=new nP("END_LABEL_SORTER",52),qot=new nP("REVERSED_EDGE_RESTORER",53),aot=new nP("END_LABEL_POSTPROCESSOR",54),fot=new nP("HIERARCHICAL_NODE_RESIZER",55),iot=new nP("DIRECTION_POSTPROCESSOR",56)}function bWn(n,t,i){var r,c,a,u,o,s,h,f,l,b,w,d,g,p,v,m,y,k,j,E,T,M,S,P,C,I,O,A,$,L,N,x,D,R,K,_,F,B,H,q,G,z,U,X,W,V,Q,J,Y,Z,nn,tn,en,rn,cn,an,un,on;for(Y=0,L=0,D=(O=t).length;L0&&(n.a[q.p]=Y++)}for(rn=0,N=0,R=(A=i).length;N0;){for(Px(X.b>0),U=0,o=new Wb((q=BB(X.a.Xb(X.c=--X.b),11)).e);o.a0&&(q.j==(kUn(),sIt)?(n.a[q.p]=rn,++rn):(n.a[q.p]=rn+K+F,++F))}rn+=F}for(z=new xp,d=new fA,$=0,x=(I=t).length;$h.b&&(h.b=W)):q.i.c==J&&(Wh.c&&(h.c=W));for(z9(g,0,g.length,null),en=x8(ANt,hQn,25,g.length,15,1),r=x8(ANt,hQn,25,rn+1,15,1),v=0;v0;)T%2>0&&(c+=un[T+1]),++un[T=(T-1)/2|0];for(S=x8(qmt,HWn,362,2*g.length,0,1),k=0;k'?":mK(v8n,n)?"'(?<' or '(? toIndex: ",kJn=", toIndex: ",jJn="Index: ",EJn=", Size: ",TJn="org.eclipse.elk.alg.common",MJn={62:1},SJn="org.eclipse.elk.alg.common.compaction",PJn="Scanline/EventHandler",CJn="org.eclipse.elk.alg.common.compaction.oned",IJn="CNode belongs to another CGroup.",OJn="ISpacingsHandler/1",AJn="The ",$Jn=" instance has been finished already.",LJn="The direction ",NJn=" is not supported by the CGraph instance.",xJn="OneDimensionalCompactor",DJn="OneDimensionalCompactor/lambda$0$Type",RJn="Quadruplet",KJn="ScanlineConstraintCalculator",_Jn="ScanlineConstraintCalculator/ConstraintsScanlineHandler",FJn="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",BJn="ScanlineConstraintCalculator/Timestamp",HJn="ScanlineConstraintCalculator/lambda$0$Type",qJn={169:1,45:1},GJn="org.eclipse.elk.alg.common.compaction.options",zJn="org.eclipse.elk.core.data",UJn="org.eclipse.elk.polyomino.traversalStrategy",XJn="org.eclipse.elk.polyomino.lowLevelSort",WJn="org.eclipse.elk.polyomino.highLevelSort",VJn="org.eclipse.elk.polyomino.fill",QJn={130:1},JJn="polyomino",YJn="org.eclipse.elk.alg.common.networksimplex",ZJn={177:1,3:1,4:1},nYn="org.eclipse.elk.alg.common.nodespacing",tYn="org.eclipse.elk.alg.common.nodespacing.cellsystem",eYn="CENTER",iYn={212:1,326:1},rYn={3:1,4:1,5:1,595:1},cYn="LEFT",aYn="RIGHT",uYn="Vertical alignment cannot be null",oYn="BOTTOM",sYn="org.eclipse.elk.alg.common.nodespacing.internal",hYn="UNDEFINED",fYn=.01,lYn="org.eclipse.elk.alg.common.nodespacing.internal.algorithm",bYn="LabelPlacer/lambda$0$Type",wYn="LabelPlacer/lambda$1$Type",dYn="portRatioOrPosition",gYn="org.eclipse.elk.alg.common.overlaps",pYn="DOWN",vYn="org.eclipse.elk.alg.common.polyomino",mYn="NORTH",yYn="EAST",kYn="SOUTH",jYn="WEST",EYn="org.eclipse.elk.alg.common.polyomino.structures",TYn="Direction",MYn="Grid is only of size ",SYn=". Requested point (",PYn=") is out of bounds.",CYn=" Given center based coordinates were (",IYn="org.eclipse.elk.graph.properties",OYn="IPropertyHolder",AYn={3:1,94:1,134:1},$Yn="org.eclipse.elk.alg.common.spore",LYn="org.eclipse.elk.alg.common.utils",NYn={209:1},xYn="org.eclipse.elk.core",DYn="Connected Components Compaction",RYn="org.eclipse.elk.alg.disco",KYn="org.eclipse.elk.alg.disco.graph",_Yn="org.eclipse.elk.alg.disco.options",FYn="CompactionStrategy",BYn="org.eclipse.elk.disco.componentCompaction.strategy",HYn="org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm",qYn="org.eclipse.elk.disco.debug.discoGraph",GYn="org.eclipse.elk.disco.debug.discoPolys",zYn="componentCompaction",UYn="org.eclipse.elk.disco",XYn="org.eclipse.elk.spacing.componentComponent",WYn="org.eclipse.elk.edge.thickness",VYn="org.eclipse.elk.aspectRatio",QYn="org.eclipse.elk.padding",JYn="org.eclipse.elk.alg.disco.transform",YYn=1.5707963267948966,ZYn=17976931348623157e292,nZn={3:1,4:1,5:1,192:1},tZn={3:1,6:1,4:1,5:1,106:1,120:1},eZn="org.eclipse.elk.alg.force",iZn="ComponentsProcessor",rZn="ComponentsProcessor/1",cZn="org.eclipse.elk.alg.force.graph",aZn="Component Layout",uZn="org.eclipse.elk.alg.force.model",oZn="org.eclipse.elk.force.model",sZn="org.eclipse.elk.force.iterations",hZn="org.eclipse.elk.force.repulsivePower",fZn="org.eclipse.elk.force.temperature",lZn=.001,bZn="org.eclipse.elk.force.repulsion",wZn="org.eclipse.elk.alg.force.options",dZn=1.600000023841858,gZn="org.eclipse.elk.force",pZn="org.eclipse.elk.priority",vZn="org.eclipse.elk.spacing.nodeNode",mZn="org.eclipse.elk.spacing.edgeLabel",yZn="org.eclipse.elk.randomSeed",kZn="org.eclipse.elk.separateConnectedComponents",jZn="org.eclipse.elk.interactive",EZn="org.eclipse.elk.portConstraints",TZn="org.eclipse.elk.edgeLabels.inline",MZn="org.eclipse.elk.omitNodeMicroLayout",SZn="org.eclipse.elk.nodeSize.options",PZn="org.eclipse.elk.nodeSize.constraints",CZn="org.eclipse.elk.nodeLabels.placement",IZn="org.eclipse.elk.portLabels.placement",OZn="origin",AZn="random",$Zn="boundingBox.upLeft",LZn="boundingBox.lowRight",NZn="org.eclipse.elk.stress.fixed",xZn="org.eclipse.elk.stress.desiredEdgeLength",DZn="org.eclipse.elk.stress.dimension",RZn="org.eclipse.elk.stress.epsilon",KZn="org.eclipse.elk.stress.iterationLimit",_Zn="org.eclipse.elk.stress",FZn="ELK Stress",BZn="org.eclipse.elk.nodeSize.minimum",HZn="org.eclipse.elk.alg.force.stress",qZn="Layered layout",GZn="org.eclipse.elk.alg.layered",zZn="org.eclipse.elk.alg.layered.compaction.components",UZn="org.eclipse.elk.alg.layered.compaction.oned",XZn="org.eclipse.elk.alg.layered.compaction.oned.algs",WZn="org.eclipse.elk.alg.layered.compaction.recthull",VZn="org.eclipse.elk.alg.layered.components",QZn="NONE",JZn={3:1,6:1,4:1,9:1,5:1,122:1},YZn={3:1,6:1,4:1,5:1,141:1,106:1,120:1},ZZn="org.eclipse.elk.alg.layered.compound",n1n={51:1},t1n="org.eclipse.elk.alg.layered.graph",e1n=" -> ",i1n="Not supported by LGraph",r1n="Port side is undefined",c1n={3:1,6:1,4:1,5:1,474:1,141:1,106:1,120:1},a1n={3:1,6:1,4:1,5:1,141:1,193:1,203:1,106:1,120:1},u1n={3:1,6:1,4:1,5:1,141:1,1943:1,203:1,106:1,120:1},o1n="([{\"' \t\r\n",s1n=")]}\"' \t\r\n",h1n="The given string contains parts that cannot be parsed as numbers.",f1n="org.eclipse.elk.core.math",l1n={3:1,4:1,142:1,207:1,414:1},b1n={3:1,4:1,116:1,207:1,414:1},w1n="org.eclipse.elk.layered",d1n="org.eclipse.elk.alg.layered.graph.transform",g1n="ElkGraphImporter",p1n="ElkGraphImporter/lambda$0$Type",v1n="ElkGraphImporter/lambda$1$Type",m1n="ElkGraphImporter/lambda$2$Type",y1n="ElkGraphImporter/lambda$4$Type",k1n="Node margin calculation",j1n="org.eclipse.elk.alg.layered.intermediate",E1n="ONE_SIDED_GREEDY_SWITCH",T1n="TWO_SIDED_GREEDY_SWITCH",M1n="No implementation is available for the layout processor ",S1n="IntermediateProcessorStrategy",P1n="Node '",C1n="FIRST_SEPARATE",I1n="LAST_SEPARATE",O1n="Odd port side processing",A1n="org.eclipse.elk.alg.layered.intermediate.compaction",$1n="org.eclipse.elk.alg.layered.intermediate.greedyswitch",L1n="org.eclipse.elk.alg.layered.p3order.counting",N1n={225:1},x1n="org.eclipse.elk.alg.layered.intermediate.loops",D1n="org.eclipse.elk.alg.layered.intermediate.loops.ordering",R1n="org.eclipse.elk.alg.layered.intermediate.loops.routing",K1n="org.eclipse.elk.alg.layered.intermediate.preserveorder",_1n="org.eclipse.elk.alg.layered.intermediate.wrapping",F1n="org.eclipse.elk.alg.layered.options",B1n="INTERACTIVE",H1n="DEPTH_FIRST",q1n="EDGE_LENGTH",G1n="SELF_LOOPS",z1n="firstTryWithInitialOrder",U1n="org.eclipse.elk.layered.directionCongruency",X1n="org.eclipse.elk.layered.feedbackEdges",W1n="org.eclipse.elk.layered.interactiveReferencePoint",V1n="org.eclipse.elk.layered.mergeEdges",Q1n="org.eclipse.elk.layered.mergeHierarchyEdges",J1n="org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides",Y1n="org.eclipse.elk.layered.portSortingStrategy",Z1n="org.eclipse.elk.layered.thoroughness",n0n="org.eclipse.elk.layered.unnecessaryBendpoints",t0n="org.eclipse.elk.layered.generatePositionAndLayerIds",e0n="org.eclipse.elk.layered.cycleBreaking.strategy",i0n="org.eclipse.elk.layered.layering.strategy",r0n="org.eclipse.elk.layered.layering.layerConstraint",c0n="org.eclipse.elk.layered.layering.layerChoiceConstraint",a0n="org.eclipse.elk.layered.layering.layerId",u0n="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",o0n="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",s0n="org.eclipse.elk.layered.layering.nodePromotion.strategy",h0n="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",f0n="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",l0n="org.eclipse.elk.layered.crossingMinimization.strategy",b0n="org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder",w0n="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",d0n="org.eclipse.elk.layered.crossingMinimization.semiInteractive",g0n="org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint",p0n="org.eclipse.elk.layered.crossingMinimization.positionId",v0n="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",m0n="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",y0n="org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type",k0n="org.eclipse.elk.layered.nodePlacement.strategy",j0n="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",E0n="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",T0n="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",M0n="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",S0n="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",P0n="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",C0n="org.eclipse.elk.layered.edgeRouting.selfLoopDistribution",I0n="org.eclipse.elk.layered.edgeRouting.selfLoopOrdering",O0n="org.eclipse.elk.layered.edgeRouting.splines.mode",A0n="org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor",$0n="org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth",L0n="org.eclipse.elk.layered.spacing.baseValue",N0n="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",x0n="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",D0n="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",R0n="org.eclipse.elk.layered.priority.direction",K0n="org.eclipse.elk.layered.priority.shortness",_0n="org.eclipse.elk.layered.priority.straightness",F0n="org.eclipse.elk.layered.compaction.connectedComponents",B0n="org.eclipse.elk.layered.compaction.postCompaction.strategy",H0n="org.eclipse.elk.layered.compaction.postCompaction.constraints",q0n="org.eclipse.elk.layered.highDegreeNodes.treatment",G0n="org.eclipse.elk.layered.highDegreeNodes.threshold",z0n="org.eclipse.elk.layered.highDegreeNodes.treeHeight",U0n="org.eclipse.elk.layered.wrapping.strategy",X0n="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",W0n="org.eclipse.elk.layered.wrapping.correctionFactor",V0n="org.eclipse.elk.layered.wrapping.cutting.strategy",Q0n="org.eclipse.elk.layered.wrapping.cutting.cuts",J0n="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",Y0n="org.eclipse.elk.layered.wrapping.validify.strategy",Z0n="org.eclipse.elk.layered.wrapping.validify.forbiddenIndices",n2n="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",t2n="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",e2n="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",i2n="org.eclipse.elk.layered.edgeLabels.sideSelection",r2n="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",c2n="org.eclipse.elk.layered.considerModelOrder.strategy",a2n="org.eclipse.elk.layered.considerModelOrder.noModelOrder",u2n="org.eclipse.elk.layered.considerModelOrder.components",o2n="org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy",s2n="org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence",h2n="org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence",f2n="layering",l2n="layering.minWidth",b2n="layering.nodePromotion",w2n="crossingMinimization",d2n="org.eclipse.elk.hierarchyHandling",g2n="crossingMinimization.greedySwitch",p2n="nodePlacement",v2n="nodePlacement.bk",m2n="edgeRouting",y2n="org.eclipse.elk.edgeRouting",k2n="spacing",j2n="priority",E2n="compaction",T2n="compaction.postCompaction",M2n="Specifies whether and how post-process compaction is applied.",S2n="highDegreeNodes",P2n="wrapping",C2n="wrapping.cutting",I2n="wrapping.validify",O2n="wrapping.multiEdge",A2n="edgeLabels",$2n="considerModelOrder",L2n="org.eclipse.elk.spacing.commentComment",N2n="org.eclipse.elk.spacing.commentNode",x2n="org.eclipse.elk.spacing.edgeEdge",D2n="org.eclipse.elk.spacing.edgeNode",R2n="org.eclipse.elk.spacing.labelLabel",K2n="org.eclipse.elk.spacing.labelPortHorizontal",_2n="org.eclipse.elk.spacing.labelPortVertical",F2n="org.eclipse.elk.spacing.labelNode",B2n="org.eclipse.elk.spacing.nodeSelfLoop",H2n="org.eclipse.elk.spacing.portPort",q2n="org.eclipse.elk.spacing.individual",G2n="org.eclipse.elk.port.borderOffset",z2n="org.eclipse.elk.noLayout",U2n="org.eclipse.elk.port.side",X2n="org.eclipse.elk.debugMode",W2n="org.eclipse.elk.alignment",V2n="org.eclipse.elk.insideSelfLoops.activate",Q2n="org.eclipse.elk.insideSelfLoops.yo",J2n="org.eclipse.elk.nodeSize.fixedGraphSize",Y2n="org.eclipse.elk.direction",Z2n="org.eclipse.elk.nodeLabels.padding",n3n="org.eclipse.elk.portLabels.nextToPortIfPossible",t3n="org.eclipse.elk.portLabels.treatAsGroup",e3n="org.eclipse.elk.portAlignment.default",i3n="org.eclipse.elk.portAlignment.north",r3n="org.eclipse.elk.portAlignment.south",c3n="org.eclipse.elk.portAlignment.west",a3n="org.eclipse.elk.portAlignment.east",u3n="org.eclipse.elk.contentAlignment",o3n="org.eclipse.elk.junctionPoints",s3n="org.eclipse.elk.edgeLabels.placement",h3n="org.eclipse.elk.port.index",f3n="org.eclipse.elk.commentBox",l3n="org.eclipse.elk.hypernode",b3n="org.eclipse.elk.port.anchor",w3n="org.eclipse.elk.partitioning.activate",d3n="org.eclipse.elk.partitioning.partition",g3n="org.eclipse.elk.position",p3n="org.eclipse.elk.margins",v3n="org.eclipse.elk.spacing.portsSurrounding",m3n="org.eclipse.elk.interactiveLayout",y3n="org.eclipse.elk.core.util",k3n={3:1,4:1,5:1,593:1},j3n="NETWORK_SIMPLEX",E3n={123:1,51:1},T3n="org.eclipse.elk.alg.layered.p1cycles",M3n="org.eclipse.elk.alg.layered.p2layers",S3n={402:1,225:1},P3n={832:1,3:1,4:1},C3n="org.eclipse.elk.alg.layered.p3order",I3n="org.eclipse.elk.alg.layered.p4nodes",O3n={3:1,4:1,5:1,840:1},A3n=1e-5,$3n="org.eclipse.elk.alg.layered.p4nodes.bk",L3n="org.eclipse.elk.alg.layered.p5edges",N3n="org.eclipse.elk.alg.layered.p5edges.orthogonal",x3n="org.eclipse.elk.alg.layered.p5edges.orthogonal.direction",D3n=1e-6,R3n="org.eclipse.elk.alg.layered.p5edges.splines",K3n=.09999999999999998,_3n=1e-8,F3n=4.71238898038469,B3n=3.141592653589793,H3n="org.eclipse.elk.alg.mrtree",q3n="org.eclipse.elk.alg.mrtree.graph",G3n="org.eclipse.elk.alg.mrtree.intermediate",z3n="Set neighbors in level",U3n="DESCENDANTS",X3n="org.eclipse.elk.mrtree.weighting",W3n="org.eclipse.elk.mrtree.searchOrder",V3n="org.eclipse.elk.alg.mrtree.options",Q3n="org.eclipse.elk.mrtree",J3n="org.eclipse.elk.tree",Y3n="org.eclipse.elk.alg.radial",Z3n=6.283185307179586,n4n=5e-324,t4n="org.eclipse.elk.alg.radial.intermediate",e4n="org.eclipse.elk.alg.radial.intermediate.compaction",i4n={3:1,4:1,5:1,106:1},r4n="org.eclipse.elk.alg.radial.intermediate.optimization",c4n="No implementation is available for the layout option ",a4n="org.eclipse.elk.alg.radial.options",u4n="org.eclipse.elk.radial.orderId",o4n="org.eclipse.elk.radial.radius",s4n="org.eclipse.elk.radial.compactor",h4n="org.eclipse.elk.radial.compactionStepSize",f4n="org.eclipse.elk.radial.sorter",l4n="org.eclipse.elk.radial.wedgeCriteria",b4n="org.eclipse.elk.radial.optimizationCriteria",w4n="org.eclipse.elk.radial",d4n="org.eclipse.elk.alg.radial.p1position.wedge",g4n="org.eclipse.elk.alg.radial.sorting",p4n=5.497787143782138,v4n=3.9269908169872414,m4n=2.356194490192345,y4n="org.eclipse.elk.alg.rectpacking",k4n="org.eclipse.elk.alg.rectpacking.firstiteration",j4n="org.eclipse.elk.alg.rectpacking.options",E4n="org.eclipse.elk.rectpacking.optimizationGoal",T4n="org.eclipse.elk.rectpacking.lastPlaceShift",M4n="org.eclipse.elk.rectpacking.currentPosition",S4n="org.eclipse.elk.rectpacking.desiredPosition",P4n="org.eclipse.elk.rectpacking.onlyFirstIteration",C4n="org.eclipse.elk.rectpacking.rowCompaction",I4n="org.eclipse.elk.rectpacking.expandToAspectRatio",O4n="org.eclipse.elk.rectpacking.targetWidth",A4n="org.eclipse.elk.expandNodes",$4n="org.eclipse.elk.rectpacking",L4n="org.eclipse.elk.alg.rectpacking.util",N4n="No implementation available for ",x4n="org.eclipse.elk.alg.spore",D4n="org.eclipse.elk.alg.spore.options",R4n="org.eclipse.elk.sporeCompaction",K4n="org.eclipse.elk.underlyingLayoutAlgorithm",_4n="org.eclipse.elk.processingOrder.treeConstruction",F4n="org.eclipse.elk.processingOrder.spanningTreeCostFunction",B4n="org.eclipse.elk.processingOrder.preferredRoot",H4n="org.eclipse.elk.processingOrder.rootSelection",q4n="org.eclipse.elk.structure.structureExtractionStrategy",G4n="org.eclipse.elk.compaction.compactionStrategy",z4n="org.eclipse.elk.compaction.orthogonal",U4n="org.eclipse.elk.overlapRemoval.maxIterations",X4n="org.eclipse.elk.overlapRemoval.runScanline",W4n="processingOrder",V4n="overlapRemoval",Q4n="org.eclipse.elk.sporeOverlap",J4n="org.eclipse.elk.alg.spore.p1structure",Y4n="org.eclipse.elk.alg.spore.p2processingorder",Z4n="org.eclipse.elk.alg.spore.p3execution",n5n="Invalid index: ",t5n="org.eclipse.elk.core.alg",e5n={331:1},i5n={288:1},r5n="Make sure its type is registered with the ",c5n=" utility class.",a5n="true",u5n="false",o5n="Couldn't clone property '",s5n=.05,h5n="org.eclipse.elk.core.options",f5n=1.2999999523162842,l5n="org.eclipse.elk.box",b5n="org.eclipse.elk.box.packingMode",w5n="org.eclipse.elk.algorithm",d5n="org.eclipse.elk.resolvedAlgorithm",g5n="org.eclipse.elk.bendPoints",p5n="org.eclipse.elk.labelManager",v5n="org.eclipse.elk.scaleFactor",m5n="org.eclipse.elk.animate",y5n="org.eclipse.elk.animTimeFactor",k5n="org.eclipse.elk.layoutAncestors",j5n="org.eclipse.elk.maxAnimTime",E5n="org.eclipse.elk.minAnimTime",T5n="org.eclipse.elk.progressBar",M5n="org.eclipse.elk.validateGraph",S5n="org.eclipse.elk.validateOptions",P5n="org.eclipse.elk.zoomToFit",C5n="org.eclipse.elk.font.name",I5n="org.eclipse.elk.font.size",O5n="org.eclipse.elk.edge.type",A5n="partitioning",$5n="nodeLabels",L5n="portAlignment",N5n="nodeSize",x5n="port",D5n="portLabels",R5n="insideSelfLoops",K5n="org.eclipse.elk.fixed",_5n="org.eclipse.elk.random",F5n="port must have a parent node to calculate the port side",B5n="The edge needs to have exactly one edge section. Found: ",H5n="org.eclipse.elk.core.util.adapters",q5n="org.eclipse.emf.ecore",G5n="org.eclipse.elk.graph",z5n="EMapPropertyHolder",U5n="ElkBendPoint",X5n="ElkGraphElement",W5n="ElkConnectableShape",V5n="ElkEdge",Q5n="ElkEdgeSection",J5n="EModelElement",Y5n="ENamedElement",Z5n="ElkLabel",n6n="ElkNode",t6n="ElkPort",e6n={92:1,90:1},i6n="org.eclipse.emf.common.notify.impl",r6n="The feature '",c6n="' is not a valid changeable feature",a6n="Expecting null",u6n="' is not a valid feature",o6n="The feature ID",s6n=" is not a valid feature ID",h6n=32768,f6n={105:1,92:1,90:1,56:1,49:1,97:1},l6n="org.eclipse.emf.ecore.impl",b6n="org.eclipse.elk.graph.impl",w6n="Recursive containment not allowed for ",d6n="The datatype '",g6n="' is not a valid classifier",p6n="The value '",v6n={190:1,3:1,4:1},m6n="The class '",y6n="http://www.eclipse.org/elk/ElkGraph",k6n=1024,j6n="property",E6n="value",T6n="source",M6n="properties",S6n="identifier",P6n="height",C6n="width",I6n="parent",O6n="text",A6n="children",$6n="hierarchical",L6n="sources",N6n="targets",x6n="sections",D6n="bendPoints",R6n="outgoingShape",K6n="incomingShape",_6n="outgoingSections",F6n="incomingSections",B6n="org.eclipse.emf.common.util",H6n="Severe implementation error in the Json to ElkGraph importer.",q6n="id",G6n="org.eclipse.elk.graph.json",z6n="Unhandled parameter types: ",U6n="startPoint",X6n="An edge must have at least one source and one target (edge id: '",W6n="').",V6n="Referenced edge section does not exist: ",Q6n=" (edge id: '",J6n="target",Y6n="sourcePoint",Z6n="targetPoint",n8n="group",t8n="name",e8n="connectableShape cannot be null",i8n="edge cannot be null",r8n="Passed edge is not 'simple'.",c8n="org.eclipse.elk.graph.util",a8n="The 'no duplicates' constraint is violated",u8n="targetIndex=",o8n=", size=",s8n="sourceIndex=",h8n={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1},f8n={3:1,4:1,20:1,28:1,52:1,14:1,47:1,15:1,54:1,67:1,63:1,58:1,588:1},l8n="logging",b8n="measureExecutionTime",w8n="parser.parse.1",d8n="parser.parse.2",g8n="parser.next.1",p8n="parser.next.2",v8n="parser.next.3",m8n="parser.next.4",y8n="parser.factor.1",k8n="parser.factor.2",j8n="parser.factor.3",E8n="parser.factor.4",T8n="parser.factor.5",M8n="parser.factor.6",S8n="parser.atom.1",P8n="parser.atom.2",C8n="parser.atom.3",I8n="parser.atom.4",O8n="parser.atom.5",A8n="parser.cc.1",$8n="parser.cc.2",L8n="parser.cc.3",N8n="parser.cc.5",x8n="parser.cc.6",D8n="parser.cc.7",R8n="parser.cc.8",K8n="parser.ope.1",_8n="parser.ope.2",F8n="parser.ope.3",B8n="parser.descape.1",H8n="parser.descape.2",q8n="parser.descape.3",G8n="parser.descape.4",z8n="parser.descape.5",U8n="parser.process.1",X8n="parser.quantifier.1",W8n="parser.quantifier.2",V8n="parser.quantifier.3",Q8n="parser.quantifier.4",J8n="parser.quantifier.5",Y8n="org.eclipse.emf.common.notify",Z8n={415:1,672:1},n9n={3:1,4:1,20:1,28:1,52:1,14:1,15:1,67:1,58:1},t9n={366:1,143:1},e9n="index=",i9n={3:1,4:1,5:1,126:1},r9n={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,58:1},c9n={3:1,6:1,4:1,5:1,192:1},a9n={3:1,4:1,5:1,165:1,367:1},u9n=";/?:@&=+$,",o9n="invalid authority: ",s9n="EAnnotation",h9n="ETypedElement",f9n="EStructuralFeature",l9n="EAttribute",b9n="EClassifier",w9n="EEnumLiteral",d9n="EGenericType",g9n="EOperation",p9n="EParameter",v9n="EReference",m9n="ETypeParameter",y9n="org.eclipse.emf.ecore.util",k9n={76:1},j9n={3:1,20:1,14:1,15:1,58:1,589:1,76:1,69:1,95:1},E9n="org.eclipse.emf.ecore.util.FeatureMap$Entry",T9n=8192,M9n=2048,S9n="byte",P9n="char",C9n="double",I9n="float",O9n="int",A9n="long",$9n="short",L9n="java.lang.Object",N9n={3:1,4:1,5:1,247:1},x9n={3:1,4:1,5:1,673:1},D9n={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,69:1},R9n={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,76:1,69:1,95:1},K9n="mixed",_9n="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",F9n="kind",B9n={3:1,4:1,5:1,674:1},H9n={3:1,4:1,20:1,28:1,52:1,14:1,15:1,67:1,58:1,76:1,69:1,95:1},q9n={20:1,28:1,52:1,14:1,15:1,58:1,69:1},G9n={47:1,125:1,279:1},z9n={72:1,332:1},U9n="The value of type '",X9n="' must be of type '",W9n=1316,V9n="http://www.eclipse.org/emf/2002/Ecore",Q9n=-32768,J9n="constraints",Y9n="baseType",Z9n="getEStructuralFeature",n7n="getFeatureID",t7n="feature",e7n="getOperationID",i7n="operation",r7n="defaultValue",c7n="eTypeParameters",a7n="isInstance",u7n="getEEnumLiteral",o7n="eContainingClass",s7n={55:1},h7n={3:1,4:1,5:1,119:1},f7n="org.eclipse.emf.ecore.resource",l7n={92:1,90:1,591:1,1935:1},b7n="org.eclipse.emf.ecore.resource.impl",w7n="unspecified",d7n="simple",g7n="attribute",p7n="attributeWildcard",v7n="element",m7n="elementWildcard",y7n="collapse",k7n="itemType",j7n="namespace",E7n="##targetNamespace",T7n="whiteSpace",M7n="wildcards",S7n="http://www.eclipse.org/emf/2003/XMLType",P7n="##any",C7n="uninitialized",I7n="The multiplicity constraint is violated",O7n="org.eclipse.emf.ecore.xml.type",A7n="ProcessingInstruction",$7n="SimpleAnyType",L7n="XMLTypeDocumentRoot",N7n="org.eclipse.emf.ecore.xml.type.impl",x7n="INF",D7n="processing",R7n="ENTITIES_._base",K7n="minLength",_7n="ENTITY",F7n="NCName",B7n="IDREFS_._base",H7n="integer",q7n="token",G7n="pattern",z7n="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",U7n="\\i\\c*",X7n="[\\i-[:]][\\c-[:]]*",W7n="nonPositiveInteger",V7n="maxInclusive",Q7n="NMTOKEN",J7n="NMTOKENS_._base",Y7n="nonNegativeInteger",Z7n="minInclusive",nnt="normalizedString",tnt="unsignedByte",ent="unsignedInt",int="18446744073709551615",rnt="unsignedShort",cnt="processingInstruction",ant="org.eclipse.emf.ecore.xml.type.internal",unt=1114111,ont="Internal Error: shorthands: \\u",snt="xml:isDigit",hnt="xml:isWord",fnt="xml:isSpace",lnt="xml:isNameChar",bnt="xml:isInitialNameChar",wnt="09\u0660\u0669\u06f0\u06f9\u0966\u096f\u09e6\u09ef\u0a66\u0a6f\u0ae6\u0aef\u0b66\u0b6f\u0be7\u0bef\u0c66\u0c6f\u0ce6\u0cef\u0d66\u0d6f\u0e50\u0e59\u0ed0\u0ed9\u0f20\u0f29",dnt="AZaz\xc0\xd6\xd8\xf6\xf8\u0131\u0134\u013e\u0141\u0148\u014a\u017e\u0180\u01c3\u01cd\u01f0\u01f4\u01f5\u01fa\u0217\u0250\u02a8\u02bb\u02c1\u0386\u0386\u0388\u038a\u038c\u038c\u038e\u03a1\u03a3\u03ce\u03d0\u03d6\u03da\u03da\u03dc\u03dc\u03de\u03de\u03e0\u03e0\u03e2\u03f3\u0401\u040c\u040e\u044f\u0451\u045c\u045e\u0481\u0490\u04c4\u04c7\u04c8\u04cb\u04cc\u04d0\u04eb\u04ee\u04f5\u04f8\u04f9\u0531\u0556\u0559\u0559\u0561\u0586\u05d0\u05ea\u05f0\u05f2\u0621\u063a\u0641\u064a\u0671\u06b7\u06ba\u06be\u06c0\u06ce\u06d0\u06d3\u06d5\u06d5\u06e5\u06e6\u0905\u0939\u093d\u093d\u0958\u0961\u0985\u098c\u098f\u0990\u0993\u09a8\u09aa\u09b0\u09b2\u09b2\u09b6\u09b9\u09dc\u09dd\u09df\u09e1\u09f0\u09f1\u0a05\u0a0a\u0a0f\u0a10\u0a13\u0a28\u0a2a\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59\u0a5c\u0a5e\u0a5e\u0a72\u0a74\u0a85\u0a8b\u0a8d\u0a8d\u0a8f\u0a91\u0a93\u0aa8\u0aaa\u0ab0\u0ab2\u0ab3\u0ab5\u0ab9\u0abd\u0abd\u0ae0\u0ae0\u0b05\u0b0c\u0b0f\u0b10\u0b13\u0b28\u0b2a\u0b30\u0b32\u0b33\u0b36\u0b39\u0b3d\u0b3d\u0b5c\u0b5d\u0b5f\u0b61\u0b85\u0b8a\u0b8e\u0b90\u0b92\u0b95\u0b99\u0b9a\u0b9c\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8\u0baa\u0bae\u0bb5\u0bb7\u0bb9\u0c05\u0c0c\u0c0e\u0c10\u0c12\u0c28\u0c2a\u0c33\u0c35\u0c39\u0c60\u0c61\u0c85\u0c8c\u0c8e\u0c90\u0c92\u0ca8\u0caa\u0cb3\u0cb5\u0cb9\u0cde\u0cde\u0ce0\u0ce1\u0d05\u0d0c\u0d0e\u0d10\u0d12\u0d28\u0d2a\u0d39\u0d60\u0d61\u0e01\u0e2e\u0e30\u0e30\u0e32\u0e33\u0e40\u0e45\u0e81\u0e82\u0e84\u0e84\u0e87\u0e88\u0e8a\u0e8a\u0e8d\u0e8d\u0e94\u0e97\u0e99\u0e9f\u0ea1\u0ea3\u0ea5\u0ea5\u0ea7\u0ea7\u0eaa\u0eab\u0ead\u0eae\u0eb0\u0eb0\u0eb2\u0eb3\u0ebd\u0ebd\u0ec0\u0ec4\u0f40\u0f47\u0f49\u0f69\u10a0\u10c5\u10d0\u10f6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110b\u110c\u110e\u1112\u113c\u113c\u113e\u113e\u1140\u1140\u114c\u114c\u114e\u114e\u1150\u1150\u1154\u1155\u1159\u1159\u115f\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116d\u116e\u1172\u1173\u1175\u1175\u119e\u119e\u11a8\u11a8\u11ab\u11ab\u11ae\u11af\u11b7\u11b8\u11ba\u11ba\u11bc\u11c2\u11eb\u11eb\u11f0\u11f0\u11f9\u11f9\u1e00\u1e9b\u1ea0\u1ef9\u1f00\u1f15\u1f18\u1f1d\u1f20\u1f45\u1f48\u1f4d\u1f50\u1f57\u1f59\u1f59\u1f5b\u1f5b\u1f5d\u1f5d\u1f5f\u1f7d\u1f80\u1fb4\u1fb6\u1fbc\u1fbe\u1fbe\u1fc2\u1fc4\u1fc6\u1fcc\u1fd0\u1fd3\u1fd6\u1fdb\u1fe0\u1fec\u1ff2\u1ff4\u1ff6\u1ffc\u2126\u2126\u212a\u212b\u212e\u212e\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30a1\u30fa\u3105\u312c\u4e00\u9fa5\uac00\ud7a3",gnt="Private Use",pnt="ASSIGNED",vnt="\0\x7f\x80\xff\u0100\u017f\u0180\u024f\u0250\u02af\u02b0\u02ff\u0300\u036f\u0370\u03ff\u0400\u04ff\u0530\u058f\u0590\u05ff\u0600\u06ff\u0700\u074f\u0780\u07bf\u0900\u097f\u0980\u09ff\u0a00\u0a7f\u0a80\u0aff\u0b00\u0b7f\u0b80\u0bff\u0c00\u0c7f\u0c80\u0cff\u0d00\u0d7f\u0d80\u0dff\u0e00\u0e7f\u0e80\u0eff\u0f00\u0fff\u1000\u109f\u10a0\u10ff\u1100\u11ff\u1200\u137f\u13a0\u13ff\u1400\u167f\u1680\u169f\u16a0\u16ff\u1780\u17ff\u1800\u18af\u1e00\u1eff\u1f00\u1fff\u2000\u206f\u2070\u209f\u20a0\u20cf\u20d0\u20ff\u2100\u214f\u2150\u218f\u2190\u21ff\u2200\u22ff\u2300\u23ff\u2400\u243f\u2440\u245f\u2460\u24ff\u2500\u257f\u2580\u259f\u25a0\u25ff\u2600\u26ff\u2700\u27bf\u2800\u28ff\u2e80\u2eff\u2f00\u2fdf\u2ff0\u2fff\u3000\u303f\u3040\u309f\u30a0\u30ff\u3100\u312f\u3130\u318f\u3190\u319f\u31a0\u31bf\u3200\u32ff\u3300\u33ff\u3400\u4db5\u4e00\u9fff\ua000\ua48f\ua490\ua4cf\uac00\ud7a3\ue000\uf8ff\uf900\ufaff\ufb00\ufb4f\ufb50\ufdff\ufe20\ufe2f\ufe30\ufe4f\ufe50\ufe6f\ufe70\ufefe\ufeff\ufeff\uff00\uffef",mnt="UNASSIGNED",ynt={3:1,117:1},knt="org.eclipse.emf.ecore.xml.type.util",jnt={3:1,4:1,5:1,368:1},Ent="org.eclipse.xtext.xbase.lib",Tnt="Cannot add elements to a Range",Mnt="Cannot set elements in a Range",Snt="Cannot remove elements from a Range",Pnt="locale",Cnt="default",Int="user.agent";e.goog=e.goog||{},e.goog.global=e.goog.global||e,WMn(),wAn(1,null,{},r),MWn.Fb=function(n){return FO(this,n)},MWn.Gb=function(){return this.gm},MWn.Hb=function(){return PN(this)},MWn.Ib=function(){return nE(tsn(this))+"@"+(nsn(this)>>>0).toString(16)},MWn.equals=function(n){return this.Fb(n)},MWn.hashCode=function(){return this.Hb()},MWn.toString=function(){return this.Ib()},wAn(290,1,{290:1,2026:1},pon),MWn.le=function(n){var t;return(t=new pon).i=4,t.c=n>1?gZ(this,n-1):this,t},MWn.me=function(){return ED(this),this.b},MWn.ne=function(){return nE(this)},MWn.oe=function(){return ED(this),this.k},MWn.pe=function(){return 0!=(4&this.i)},MWn.qe=function(){return 0!=(1&this.i)},MWn.Ib=function(){return utn(this)},MWn.i=0;var Ont,Ant=vX(RWn,"Object",1),$nt=vX(RWn,"Class",290);wAn(1998,1,KWn),vX(_Wn,"Optional",1998),wAn(1170,1998,KWn,c),MWn.Fb=function(n){return n===this},MWn.Hb=function(){return 2040732332},MWn.Ib=function(){return"Optional.absent()"},MWn.Jb=function(n){return yX(n),iy(),Ont},vX(_Wn,"Absent",1170),wAn(628,1,{},mk),vX(_Wn,"Joiner",628);var Lnt=bq(_Wn,"Predicate");wAn(582,1,{169:1,582:1,3:1,45:1},Hf),MWn.Mb=function(n){return Kon(this,n)},MWn.Lb=function(n){return Kon(this,n)},MWn.Fb=function(n){var t;return!!cL(n,582)&&(t=BB(n,582),NAn(this.a,t.a))},MWn.Hb=function(){return Fon(this.a)+306654252},MWn.Ib=function(){return wPn(this.a)},vX(_Wn,"Predicates/AndPredicate",582),wAn(408,1998,{408:1,3:1},qf),MWn.Fb=function(n){var t;return!!cL(n,408)&&(t=BB(n,408),Nfn(this.a,t.a))},MWn.Hb=function(){return 1502476572+nsn(this.a)},MWn.Ib=function(){return GWn+this.a+")"},MWn.Jb=function(n){return new qf(WQ(n.Kb(this.a),"the Function passed to Optional.transform() must not return null."))},vX(_Wn,"Present",408),wAn(198,1,UWn),MWn.Nb=function(n){fU(this,n)},MWn.Qb=function(){bk()},vX(XWn,"UnmodifiableIterator",198),wAn(1978,198,WWn),MWn.Qb=function(){bk()},MWn.Rb=function(n){throw Hp(new pv)},MWn.Wb=function(n){throw Hp(new pv)},vX(XWn,"UnmodifiableListIterator",1978),wAn(386,1978,WWn),MWn.Ob=function(){return this.c0},MWn.Pb=function(){if(this.c>=this.d)throw Hp(new yv);return this.Xb(this.c++)},MWn.Tb=function(){return this.c},MWn.Ub=function(){if(this.c<=0)throw Hp(new yv);return this.Xb(--this.c)},MWn.Vb=function(){return this.c-1},MWn.c=0,MWn.d=0,vX(XWn,"AbstractIndexedListIterator",386),wAn(699,198,UWn),MWn.Ob=function(){return Zin(this)},MWn.Pb=function(){return P7(this)},MWn.e=1,vX(XWn,"AbstractIterator",699),wAn(1986,1,{224:1}),MWn.Zb=function(){return this.f||(this.f=this.ac())},MWn.Fb=function(n){return jsn(this,n)},MWn.Hb=function(){return nsn(this.Zb())},MWn.dc=function(){return 0==this.gc()},MWn.ec=function(){return gz(this)},MWn.Ib=function(){return Bbn(this.Zb())},vX(XWn,"AbstractMultimap",1986),wAn(726,1986,VWn),MWn.$b=function(){win(this)},MWn._b=function(n){return Wj(this,n)},MWn.ac=function(){return new pT(this,this.c)},MWn.ic=function(n){return this.hc()},MWn.bc=function(){return new HL(this,this.c)},MWn.jc=function(){return this.mc(this.hc())},MWn.kc=function(){return new Hm(this)},MWn.lc=function(){return qTn(this.c.vc().Nc(),new u,64,this.d)},MWn.cc=function(n){return h6(this,n)},MWn.fc=function(n){return Nhn(this,n)},MWn.gc=function(){return this.d},MWn.mc=function(n){return SQ(),new Hb(n)},MWn.nc=function(){return new Bm(this)},MWn.oc=function(){return qTn(this.c.Cc().Nc(),new a,64,this.d)},MWn.pc=function(n,t){return new W6(this,n,t,null)},MWn.d=0,vX(XWn,"AbstractMapBasedMultimap",726),wAn(1631,726,VWn),MWn.hc=function(){return new Y6(this.a)},MWn.jc=function(){return SQ(),SQ(),set},MWn.cc=function(n){return BB(h6(this,n),15)},MWn.fc=function(n){return BB(Nhn(this,n),15)},MWn.Zb=function(){return OQ(this)},MWn.Fb=function(n){return jsn(this,n)},MWn.qc=function(n){return BB(h6(this,n),15)},MWn.rc=function(n){return BB(Nhn(this,n),15)},MWn.mc=function(n){return rJ(BB(n,15))},MWn.pc=function(n,t){return i3(this,n,BB(t,15),null)},vX(XWn,"AbstractListMultimap",1631),wAn(732,1,QWn),MWn.Nb=function(n){fU(this,n)},MWn.Ob=function(){return this.c.Ob()||this.e.Ob()},MWn.Pb=function(){var n;return this.e.Ob()||(n=BB(this.c.Pb(),42),this.b=n.cd(),this.a=BB(n.dd(),14),this.e=this.a.Kc()),this.sc(this.b,this.e.Pb())},MWn.Qb=function(){this.e.Qb(),this.a.dc()&&this.c.Qb(),--this.d.d},vX(XWn,"AbstractMapBasedMultimap/Itr",732),wAn(1099,732,QWn,Bm),MWn.sc=function(n,t){return t},vX(XWn,"AbstractMapBasedMultimap/1",1099),wAn(1100,1,{},a),MWn.Kb=function(n){return BB(n,14).Nc()},vX(XWn,"AbstractMapBasedMultimap/1methodref$spliterator$Type",1100),wAn(1101,732,QWn,Hm),MWn.sc=function(n,t){return new vT(n,t)},vX(XWn,"AbstractMapBasedMultimap/2",1101);var Nnt=bq(JWn,"Map");wAn(1967,1,YWn),MWn.wc=function(n){nan(this,n)},MWn.yc=function(n,t,e){return Zln(this,n,t,e)},MWn.$b=function(){this.vc().$b()},MWn.tc=function(n){return Mmn(this,n)},MWn._b=function(n){return!!FEn(this,n,!1)},MWn.uc=function(n){var t,e;for(t=this.vc().Kc();t.Ob();)if(e=BB(t.Pb(),42).dd(),GI(n)===GI(e)||null!=n&&Nfn(n,e))return!0;return!1},MWn.Fb=function(n){var t,e,i;if(n===this)return!0;if(!cL(n,83))return!1;if(i=BB(n,83),this.gc()!=i.gc())return!1;for(e=i.vc().Kc();e.Ob();)if(t=BB(e.Pb(),42),!this.tc(t))return!1;return!0},MWn.xc=function(n){return qI(FEn(this,n,!1))},MWn.Hb=function(){return Hun(this.vc())},MWn.dc=function(){return 0==this.gc()},MWn.ec=function(){return new Cb(this)},MWn.zc=function(n,t){throw Hp(new tk("Put not supported on this map"))},MWn.Ac=function(n){Tcn(this,n)},MWn.Bc=function(n){return qI(FEn(this,n,!0))},MWn.gc=function(){return this.vc().gc()},MWn.Ib=function(){return nTn(this)},MWn.Cc=function(){return new Ob(this)},vX(JWn,"AbstractMap",1967),wAn(1987,1967,YWn),MWn.bc=function(){return new ST(this)},MWn.vc=function(){return dz(this)},MWn.ec=function(){return this.g||(this.g=this.bc())},MWn.Cc=function(){return this.i||(this.i=new PT(this))},vX(XWn,"Maps/ViewCachingAbstractMap",1987),wAn(389,1987,YWn,pT),MWn.xc=function(n){return ktn(this,n)},MWn.Bc=function(n){return Zsn(this,n)},MWn.$b=function(){this.d==this.e.c?this.e.$b():Cq(new Oq(this))},MWn._b=function(n){return gfn(this.d,n)},MWn.Ec=function(){return new Xf(this)},MWn.Dc=function(){return this.Ec()},MWn.Fb=function(n){return this===n||Nfn(this.d,n)},MWn.Hb=function(){return nsn(this.d)},MWn.ec=function(){return this.e.ec()},MWn.gc=function(){return this.d.gc()},MWn.Ib=function(){return Bbn(this.d)},vX(XWn,"AbstractMapBasedMultimap/AsMap",389);var xnt=bq(RWn,"Iterable");wAn(28,1,ZWn),MWn.Jc=function(n){e5(this,n)},MWn.Lc=function(){return this.Oc()},MWn.Nc=function(){return new w1(this,0)},MWn.Oc=function(){return new Rq(null,this.Nc())},MWn.Fc=function(n){throw Hp(new tk("Add not supported on this collection"))},MWn.Gc=function(n){return Frn(this,n)},MWn.$b=function(){TV(this)},MWn.Hc=function(n){return ywn(this,n,!1)},MWn.Ic=function(n){return oun(this,n)},MWn.dc=function(){return 0==this.gc()},MWn.Mc=function(n){return ywn(this,n,!0)},MWn.Pc=function(){return cz(this)},MWn.Qc=function(n){return Emn(this,n)},MWn.Ib=function(){return LMn(this)},vX(JWn,"AbstractCollection",28);var Dnt=bq(JWn,"Set");wAn(nVn,28,tVn),MWn.Nc=function(){return new w1(this,1)},MWn.Fb=function(n){return ign(this,n)},MWn.Hb=function(){return Hun(this)},vX(JWn,"AbstractSet",nVn),wAn(1970,nVn,tVn),vX(XWn,"Sets/ImprovedAbstractSet",1970),wAn(1971,1970,tVn),MWn.$b=function(){this.Rc().$b()},MWn.Hc=function(n){return idn(this,n)},MWn.dc=function(){return this.Rc().dc()},MWn.Mc=function(n){var t;return!!this.Hc(n)&&(t=BB(n,42),this.Rc().ec().Mc(t.cd()))},MWn.gc=function(){return this.Rc().gc()},vX(XWn,"Maps/EntrySet",1971),wAn(1097,1971,tVn,Xf),MWn.Hc=function(n){return wfn(this.a.d.vc(),n)},MWn.Kc=function(){return new Oq(this.a)},MWn.Rc=function(){return this.a},MWn.Mc=function(n){var t;return!!wfn(this.a.d.vc(),n)&&(t=BB(n,42),H5(this.a.e,t.cd()),!0)},MWn.Nc=function(){return RB(this.a.d.vc().Nc(),new Wf(this.a))},vX(XWn,"AbstractMapBasedMultimap/AsMap/AsMapEntries",1097),wAn(1098,1,{},Wf),MWn.Kb=function(n){return i5(this.a,BB(n,42))},vX(XWn,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",1098),wAn(730,1,QWn,Oq),MWn.Nb=function(n){fU(this,n)},MWn.Pb=function(){var n;return n=BB(this.b.Pb(),42),this.a=BB(n.dd(),14),i5(this.c,n)},MWn.Ob=function(){return this.b.Ob()},MWn.Qb=function(){han(!!this.a),this.b.Qb(),this.c.e.d-=this.a.gc(),this.a.$b(),this.a=null},vX(XWn,"AbstractMapBasedMultimap/AsMap/AsMapIterator",730),wAn(532,1970,tVn,ST),MWn.$b=function(){this.b.$b()},MWn.Hc=function(n){return this.b._b(n)},MWn.Jc=function(n){yX(n),this.b.wc(new vl(n))},MWn.dc=function(){return this.b.dc()},MWn.Kc=function(){return new ly(this.b.vc().Kc())},MWn.Mc=function(n){return!!this.b._b(n)&&(this.b.Bc(n),!0)},MWn.gc=function(){return this.b.gc()},vX(XWn,"Maps/KeySet",532),wAn(318,532,tVn,HL),MWn.$b=function(){Cq(new eT(this,this.b.vc().Kc()))},MWn.Ic=function(n){return this.b.ec().Ic(n)},MWn.Fb=function(n){return this===n||Nfn(this.b.ec(),n)},MWn.Hb=function(){return nsn(this.b.ec())},MWn.Kc=function(){return new eT(this,this.b.vc().Kc())},MWn.Mc=function(n){var t,e;return e=0,(t=BB(this.b.Bc(n),14))&&(e=t.gc(),t.$b(),this.a.d-=e),e>0},MWn.Nc=function(){return this.b.ec().Nc()},vX(XWn,"AbstractMapBasedMultimap/KeySet",318),wAn(731,1,QWn,eT),MWn.Nb=function(n){fU(this,n)},MWn.Ob=function(){return this.c.Ob()},MWn.Pb=function(){return this.a=BB(this.c.Pb(),42),this.a.cd()},MWn.Qb=function(){var n;han(!!this.a),n=BB(this.a.dd(),14),this.c.Qb(),this.b.a.d-=n.gc(),n.$b(),this.a=null},vX(XWn,"AbstractMapBasedMultimap/KeySet/1",731),wAn(491,389,{83:1,161:1},CD),MWn.bc=function(){return this.Sc()},MWn.ec=function(){return this.Tc()},MWn.Sc=function(){return new nT(this.c,this.Uc())},MWn.Tc=function(){return this.b||(this.b=this.Sc())},MWn.Uc=function(){return BB(this.d,161)},vX(XWn,"AbstractMapBasedMultimap/SortedAsMap",491),wAn(542,491,eVn,ID),MWn.bc=function(){return new tT(this.a,BB(BB(this.d,161),171))},MWn.Sc=function(){return new tT(this.a,BB(BB(this.d,161),171))},MWn.ec=function(){return BB(this.b||(this.b=new tT(this.a,BB(BB(this.d,161),171))),271)},MWn.Tc=function(){return BB(this.b||(this.b=new tT(this.a,BB(BB(this.d,161),171))),271)},MWn.Uc=function(){return BB(BB(this.d,161),171)},vX(XWn,"AbstractMapBasedMultimap/NavigableAsMap",542),wAn(490,318,iVn,nT),MWn.Nc=function(){return this.b.ec().Nc()},vX(XWn,"AbstractMapBasedMultimap/SortedKeySet",490),wAn(388,490,rVn,tT),vX(XWn,"AbstractMapBasedMultimap/NavigableKeySet",388),wAn(541,28,ZWn,W6),MWn.Fc=function(n){var t,e;return zbn(this),e=this.d.dc(),(t=this.d.Fc(n))&&(++this.f.d,e&&jR(this)),t},MWn.Gc=function(n){var t,e,i;return!n.dc()&&(zbn(this),i=this.d.gc(),(t=this.d.Gc(n))&&(e=this.d.gc(),this.f.d+=e-i,0==i&&jR(this)),t)},MWn.$b=function(){var n;zbn(this),0!=(n=this.d.gc())&&(this.d.$b(),this.f.d-=n,$G(this))},MWn.Hc=function(n){return zbn(this),this.d.Hc(n)},MWn.Ic=function(n){return zbn(this),this.d.Ic(n)},MWn.Fb=function(n){return n===this||(zbn(this),Nfn(this.d,n))},MWn.Hb=function(){return zbn(this),nsn(this.d)},MWn.Kc=function(){return zbn(this),new QB(this)},MWn.Mc=function(n){var t;return zbn(this),(t=this.d.Mc(n))&&(--this.f.d,$G(this)),t},MWn.gc=function(){return tO(this)},MWn.Nc=function(){return zbn(this),this.d.Nc()},MWn.Ib=function(){return zbn(this),Bbn(this.d)},vX(XWn,"AbstractMapBasedMultimap/WrappedCollection",541);var Rnt=bq(JWn,"List");wAn(728,541,{20:1,28:1,14:1,15:1},sz),MWn.ad=function(n){_rn(this,n)},MWn.Nc=function(){return zbn(this),this.d.Nc()},MWn.Vc=function(n,t){var e;zbn(this),e=this.d.dc(),BB(this.d,15).Vc(n,t),++this.a.d,e&&jR(this)},MWn.Wc=function(n,t){var e,i,r;return!t.dc()&&(zbn(this),r=this.d.gc(),(e=BB(this.d,15).Wc(n,t))&&(i=this.d.gc(),this.a.d+=i-r,0==r&&jR(this)),e)},MWn.Xb=function(n){return zbn(this),BB(this.d,15).Xb(n)},MWn.Xc=function(n){return zbn(this),BB(this.d,15).Xc(n)},MWn.Yc=function(){return zbn(this),new g$(this)},MWn.Zc=function(n){return zbn(this),new gQ(this,n)},MWn.$c=function(n){var t;return zbn(this),t=BB(this.d,15).$c(n),--this.a.d,$G(this),t},MWn._c=function(n,t){return zbn(this),BB(this.d,15)._c(n,t)},MWn.bd=function(n,t){return zbn(this),i3(this.a,this.e,BB(this.d,15).bd(n,t),this.b?this.b:this)},vX(XWn,"AbstractMapBasedMultimap/WrappedList",728),wAn(1096,728,{20:1,28:1,14:1,15:1,54:1},Ox),vX(XWn,"AbstractMapBasedMultimap/RandomAccessWrappedList",1096),wAn(620,1,QWn,QB),MWn.Nb=function(n){fU(this,n)},MWn.Ob=function(){return MV(this),this.b.Ob()},MWn.Pb=function(){return MV(this),this.b.Pb()},MWn.Qb=function(){eN(this)},vX(XWn,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",620),wAn(729,620,cVn,g$,gQ),MWn.Qb=function(){eN(this)},MWn.Rb=function(n){var t;t=0==tO(this.a),(MV(this),BB(this.b,125)).Rb(n),++this.a.a.d,t&&jR(this.a)},MWn.Sb=function(){return(MV(this),BB(this.b,125)).Sb()},MWn.Tb=function(){return(MV(this),BB(this.b,125)).Tb()},MWn.Ub=function(){return(MV(this),BB(this.b,125)).Ub()},MWn.Vb=function(){return(MV(this),BB(this.b,125)).Vb()},MWn.Wb=function(n){(MV(this),BB(this.b,125)).Wb(n)},vX(XWn,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",729),wAn(727,541,iVn,ND),MWn.Nc=function(){return zbn(this),this.d.Nc()},vX(XWn,"AbstractMapBasedMultimap/WrappedSortedSet",727),wAn(1095,727,rVn,AA),vX(XWn,"AbstractMapBasedMultimap/WrappedNavigableSet",1095),wAn(1094,541,tVn,xD),MWn.Nc=function(){return zbn(this),this.d.Nc()},vX(XWn,"AbstractMapBasedMultimap/WrappedSet",1094),wAn(1103,1,{},u),MWn.Kb=function(n){return F6(BB(n,42))},vX(XWn,"AbstractMapBasedMultimap/lambda$1$Type",1103),wAn(1102,1,{},Vf),MWn.Kb=function(n){return new vT(this.a,n)},vX(XWn,"AbstractMapBasedMultimap/lambda$2$Type",1102);var Knt,_nt,Fnt,Bnt,Hnt=bq(JWn,"Map/Entry");wAn(345,1,aVn),MWn.Fb=function(n){var t;return!!cL(n,42)&&(t=BB(n,42),wW(this.cd(),t.cd())&&wW(this.dd(),t.dd()))},MWn.Hb=function(){var n,t;return n=this.cd(),t=this.dd(),(null==n?0:nsn(n))^(null==t?0:nsn(t))},MWn.ed=function(n){throw Hp(new pv)},MWn.Ib=function(){return this.cd()+"="+this.dd()},vX(XWn,uVn,345),wAn(1988,28,ZWn),MWn.$b=function(){this.fd().$b()},MWn.Hc=function(n){var t;return!!cL(n,42)&&(t=BB(n,42),H0(this.fd(),t.cd(),t.dd()))},MWn.Mc=function(n){var t;return!!cL(n,42)&&(t=BB(n,42),q0(this.fd(),t.cd(),t.dd()))},MWn.gc=function(){return this.fd().d},vX(XWn,"Multimaps/Entries",1988),wAn(733,1988,ZWn,Qf),MWn.Kc=function(){return this.a.kc()},MWn.fd=function(){return this.a},MWn.Nc=function(){return this.a.lc()},vX(XWn,"AbstractMultimap/Entries",733),wAn(734,733,tVn,qm),MWn.Nc=function(){return this.a.lc()},MWn.Fb=function(n){return zSn(this,n)},MWn.Hb=function(){return Brn(this)},vX(XWn,"AbstractMultimap/EntrySet",734),wAn(735,28,ZWn,Jf),MWn.$b=function(){this.a.$b()},MWn.Hc=function(n){return Isn(this.a,n)},MWn.Kc=function(){return this.a.nc()},MWn.gc=function(){return this.a.d},MWn.Nc=function(){return this.a.oc()},vX(XWn,"AbstractMultimap/Values",735),wAn(1989,28,{835:1,20:1,28:1,14:1}),MWn.Jc=function(n){yX(n),EV(this).Jc(new pl(n))},MWn.Nc=function(){var n;return qTn(n=EV(this).Nc(),new y,64|1296&n.qd(),this.a.d)},MWn.Fc=function(n){return wk(),!0},MWn.Gc=function(n){return yX(this),yX(n),cL(n,543)?l2(BB(n,835)):!n.dc()&&fnn(this,n.Kc())},MWn.Hc=function(n){var t;return((t=BB(lfn(OQ(this.a),n),14))?t.gc():0)>0},MWn.Fb=function(n){return h$n(this,n)},MWn.Hb=function(){return nsn(EV(this))},MWn.dc=function(){return EV(this).dc()},MWn.Mc=function(n){return EIn(this,n,1)>0},MWn.Ib=function(){return Bbn(EV(this))},vX(XWn,"AbstractMultiset",1989),wAn(1991,1970,tVn),MWn.$b=function(){win(this.a.a)},MWn.Hc=function(n){var t;return!(!cL(n,492)||(t=BB(n,416),BB(t.a.dd(),14).gc()<=0||c1(this.a,t.a.cd())!=BB(t.a.dd(),14).gc()))},MWn.Mc=function(n){var t,e,i;return!(!cL(n,492)||(t=(e=BB(n,416)).a.cd(),0==(i=BB(e.a.dd(),14).gc())))&&TIn(this.a,t,i)},vX(XWn,"Multisets/EntrySet",1991),wAn(1109,1991,tVn,Yf),MWn.Kc=function(){return new wy(dz(OQ(this.a.a)).Kc())},MWn.gc=function(){return OQ(this.a.a).gc()},vX(XWn,"AbstractMultiset/EntrySet",1109),wAn(619,726,VWn),MWn.hc=function(){return this.gd()},MWn.jc=function(){return this.hd()},MWn.cc=function(n){return this.jd(n)},MWn.fc=function(n){return this.kd(n)},MWn.Zb=function(){return this.f||(this.f=this.ac())},MWn.hd=function(){return SQ(),SQ(),fet},MWn.Fb=function(n){return jsn(this,n)},MWn.jd=function(n){return BB(h6(this,n),21)},MWn.kd=function(n){return BB(Nhn(this,n),21)},MWn.mc=function(n){return SQ(),new Ak(BB(n,21))},MWn.pc=function(n,t){return new xD(this,n,BB(t,21))},vX(XWn,"AbstractSetMultimap",619),wAn(1657,619,VWn),MWn.hc=function(){return new dE(this.b)},MWn.gd=function(){return new dE(this.b)},MWn.jc=function(){return IX(new dE(this.b))},MWn.hd=function(){return IX(new dE(this.b))},MWn.cc=function(n){return BB(BB(h6(this,n),21),84)},MWn.jd=function(n){return BB(BB(h6(this,n),21),84)},MWn.fc=function(n){return BB(BB(Nhn(this,n),21),84)},MWn.kd=function(n){return BB(BB(Nhn(this,n),21),84)},MWn.mc=function(n){return cL(n,271)?IX(BB(n,271)):(SQ(),new dN(BB(n,84)))},MWn.Zb=function(){return this.f||(this.f=cL(this.c,171)?new ID(this,BB(this.c,171)):cL(this.c,161)?new CD(this,BB(this.c,161)):new pT(this,this.c))},MWn.pc=function(n,t){return cL(t,271)?new AA(this,n,BB(t,271)):new ND(this,n,BB(t,84))},vX(XWn,"AbstractSortedSetMultimap",1657),wAn(1658,1657,VWn),MWn.Zb=function(){return BB(BB(this.f||(this.f=cL(this.c,171)?new ID(this,BB(this.c,171)):cL(this.c,161)?new CD(this,BB(this.c,161)):new pT(this,this.c)),161),171)},MWn.ec=function(){return BB(BB(this.i||(this.i=cL(this.c,171)?new tT(this,BB(this.c,171)):cL(this.c,161)?new nT(this,BB(this.c,161)):new HL(this,this.c)),84),271)},MWn.bc=function(){return cL(this.c,171)?new tT(this,BB(this.c,171)):cL(this.c,161)?new nT(this,BB(this.c,161)):new HL(this,this.c)},vX(XWn,"AbstractSortedKeySortedSetMultimap",1658),wAn(2010,1,{1947:1}),MWn.Fb=function(n){return Cjn(this,n)},MWn.Hb=function(){return Hun(this.g||(this.g=new Zf(this)))},MWn.Ib=function(){return nTn(this.f||(this.f=new UL(this)))},vX(XWn,"AbstractTable",2010),wAn(665,nVn,tVn,Zf),MWn.$b=function(){dk()},MWn.Hc=function(n){var t,e;return!!cL(n,468)&&(t=BB(n,682),!!(e=BB(lfn(jX(this.a),WI(t.c.e,t.b)),83))&&wfn(e.vc(),new vT(WI(t.c.c,t.a),U6(t.c,t.b,t.a))))},MWn.Kc=function(){return ZQ(this.a)},MWn.Mc=function(n){var t,e;return!!cL(n,468)&&(t=BB(n,682),!!(e=BB(lfn(jX(this.a),WI(t.c.e,t.b)),83))&&dfn(e.vc(),new vT(WI(t.c.c,t.a),U6(t.c,t.b,t.a))))},MWn.gc=function(){return zq(this.a)},MWn.Nc=function(){return P2(this.a)},vX(XWn,"AbstractTable/CellSet",665),wAn(1928,28,ZWn,nl),MWn.$b=function(){dk()},MWn.Hc=function(n){return hTn(this.a,n)},MWn.Kc=function(){return nJ(this.a)},MWn.gc=function(){return zq(this.a)},MWn.Nc=function(){return J0(this.a)},vX(XWn,"AbstractTable/Values",1928),wAn(1632,1631,VWn),vX(XWn,"ArrayListMultimapGwtSerializationDependencies",1632),wAn(513,1632,VWn,ok,o1),MWn.hc=function(){return new Y6(this.a)},MWn.a=0,vX(XWn,"ArrayListMultimap",513),wAn(664,2010,{664:1,1947:1,3:1},vOn),vX(XWn,"ArrayTable",664),wAn(1924,386,WWn,qL),MWn.Xb=function(n){return new gon(this.a,n)},vX(XWn,"ArrayTable/1",1924),wAn(1925,1,{},Gf),MWn.ld=function(n){return new gon(this.a,n)},vX(XWn,"ArrayTable/1methodref$getCell$Type",1925),wAn(2011,1,{682:1}),MWn.Fb=function(n){var t;return n===this||!!cL(n,468)&&(t=BB(n,682),wW(WI(this.c.e,this.b),WI(t.c.e,t.b))&&wW(WI(this.c.c,this.a),WI(t.c.c,t.a))&&wW(U6(this.c,this.b,this.a),U6(t.c,t.b,t.a)))},MWn.Hb=function(){return fhn(Pun(Gk(Ant,1),HWn,1,5,[WI(this.c.e,this.b),WI(this.c.c,this.a),U6(this.c,this.b,this.a)]))},MWn.Ib=function(){return"("+WI(this.c.e,this.b)+","+WI(this.c.c,this.a)+")="+U6(this.c,this.b,this.a)},vX(XWn,"Tables/AbstractCell",2011),wAn(468,2011,{468:1,682:1},gon),MWn.a=0,MWn.b=0,MWn.d=0,vX(XWn,"ArrayTable/2",468),wAn(1927,1,{},zf),MWn.ld=function(n){return J9(this.a,n)},vX(XWn,"ArrayTable/2methodref$getValue$Type",1927),wAn(1926,386,WWn,GL),MWn.Xb=function(n){return J9(this.a,n)},vX(XWn,"ArrayTable/3",1926),wAn(1979,1967,YWn),MWn.$b=function(){Cq(this.kc())},MWn.vc=function(){return new ml(this)},MWn.lc=function(){return new CV(this.kc(),this.gc())},vX(XWn,"Maps/IteratorBasedAbstractMap",1979),wAn(828,1979,YWn),MWn.$b=function(){throw Hp(new pv)},MWn._b=function(n){return Jj(this.c,n)},MWn.kc=function(){return new zL(this,this.c.b.c.gc())},MWn.lc=function(){return yq(this.c.b.c.gc(),16,new Uf(this))},MWn.xc=function(n){var t;return(t=BB(UK(this.c,n),19))?this.nd(t.a):null},MWn.dc=function(){return this.c.b.c.dc()},MWn.ec=function(){return bz(this.c)},MWn.zc=function(n,t){var e;if(!(e=BB(UK(this.c,n),19)))throw Hp(new _y(this.md()+" "+n+" not in "+bz(this.c)));return this.od(e.a,t)},MWn.Bc=function(n){throw Hp(new pv)},MWn.gc=function(){return this.c.b.c.gc()},vX(XWn,"ArrayTable/ArrayMap",828),wAn(1923,1,{},Uf),MWn.ld=function(n){return OX(this.a,n)},vX(XWn,"ArrayTable/ArrayMap/0methodref$getEntry$Type",1923),wAn(1921,345,aVn,sT),MWn.cd=function(){return JL(this.a,this.b)},MWn.dd=function(){return this.a.nd(this.b)},MWn.ed=function(n){return this.a.od(this.b,n)},MWn.b=0,vX(XWn,"ArrayTable/ArrayMap/1",1921),wAn(1922,386,WWn,zL),MWn.Xb=function(n){return OX(this.a,n)},vX(XWn,"ArrayTable/ArrayMap/2",1922),wAn(1920,828,YWn,cU),MWn.md=function(){return"Column"},MWn.nd=function(n){return U6(this.b,this.a,n)},MWn.od=function(n,t){return Sun(this.b,this.a,n,t)},MWn.a=0,vX(XWn,"ArrayTable/Row",1920),wAn(829,828,YWn,UL),MWn.nd=function(n){return new cU(this.a,n)},MWn.zc=function(n,t){return BB(t,83),gk()},MWn.od=function(n,t){return BB(t,83),pk()},MWn.md=function(){return"Row"},vX(XWn,"ArrayTable/RowMap",829),wAn(1120,1,fVn,hT),MWn.qd=function(){return-262&this.a.qd()},MWn.rd=function(){return this.a.rd()},MWn.Nb=function(n){this.a.Nb(new cT(n,this.b))},MWn.sd=function(n){return this.a.sd(new rT(n,this.b))},vX(XWn,"CollectSpliterators/1",1120),wAn(1121,1,lVn,rT),MWn.td=function(n){this.a.td(this.b.Kb(n))},vX(XWn,"CollectSpliterators/1/lambda$0$Type",1121),wAn(1122,1,lVn,cT),MWn.td=function(n){this.a.td(this.b.Kb(n))},vX(XWn,"CollectSpliterators/1/lambda$1$Type",1122),wAn(1123,1,fVn,q2),MWn.qd=function(){return this.a},MWn.rd=function(){return this.d&&(this.b=T$(this.b,this.d.rd())),T$(this.b,0)},MWn.Nb=function(n){this.d&&(this.d.Nb(n),this.d=null),this.c.Nb(new iT(this.e,n)),this.b=0},MWn.sd=function(n){for(;;){if(this.d&&this.d.sd(n))return YI(this.b,bVn)&&(this.b=ibn(this.b,1)),!0;if(this.d=null,!this.c.sd(new aT(this,this.e)))return!1}},MWn.a=0,MWn.b=0,vX(XWn,"CollectSpliterators/1FlatMapSpliterator",1123),wAn(1124,1,lVn,aT),MWn.td=function(n){dK(this.a,this.b,n)},vX(XWn,"CollectSpliterators/1FlatMapSpliterator/lambda$0$Type",1124),wAn(1125,1,lVn,iT),MWn.td=function(n){oL(this.b,this.a,n)},vX(XWn,"CollectSpliterators/1FlatMapSpliterator/lambda$1$Type",1125),wAn(1117,1,fVn,wK),MWn.qd=function(){return 16464|this.b},MWn.rd=function(){return this.a.rd()},MWn.Nb=function(n){this.a.xe(new oT(n,this.c))},MWn.sd=function(n){return this.a.ye(new uT(n,this.c))},MWn.b=0,vX(XWn,"CollectSpliterators/1WithCharacteristics",1117),wAn(1118,1,wVn,uT),MWn.ud=function(n){this.a.td(this.b.ld(n))},vX(XWn,"CollectSpliterators/1WithCharacteristics/lambda$0$Type",1118),wAn(1119,1,wVn,oT),MWn.ud=function(n){this.a.td(this.b.ld(n))},vX(XWn,"CollectSpliterators/1WithCharacteristics/lambda$1$Type",1119),wAn(245,1,dVn),MWn.wd=function(n){return this.vd(BB(n,245))},MWn.vd=function(n){var t;return n==(ty(),_nt)?1:n==(ey(),Knt)?-1:(nq(),0!=(t=Ncn(this.a,n.a))?t:cL(this,519)==cL(n,519)?0:cL(this,519)?1:-1)},MWn.zd=function(){return this.a},MWn.Fb=function(n){return xdn(this,n)},vX(XWn,"Cut",245),wAn(1761,245,dVn,Nk),MWn.vd=function(n){return n==this?0:1},MWn.xd=function(n){throw Hp(new hv)},MWn.yd=function(n){n.a+="+\u221e)"},MWn.zd=function(){throw Hp(new Fy(gVn))},MWn.Hb=function(){return $T(),evn(this)},MWn.Ad=function(n){return!1},MWn.Ib=function(){return"+\u221e"},vX(XWn,"Cut/AboveAll",1761),wAn(519,245,{245:1,519:1,3:1,35:1},iN),MWn.xd=function(n){uO((n.a+="(",n),this.a)},MWn.yd=function(n){xX(uO(n,this.a),93)},MWn.Hb=function(){return~nsn(this.a)},MWn.Ad=function(n){return nq(),Ncn(this.a,n)<0},MWn.Ib=function(){return"/"+this.a+"\\"},vX(XWn,"Cut/AboveValue",519),wAn(1760,245,dVn,xk),MWn.vd=function(n){return n==this?0:-1},MWn.xd=function(n){n.a+="(-\u221e"},MWn.yd=function(n){throw Hp(new hv)},MWn.zd=function(){throw Hp(new Fy(gVn))},MWn.Hb=function(){return $T(),evn(this)},MWn.Ad=function(n){return!0},MWn.Ib=function(){return"-\u221e"},vX(XWn,"Cut/BelowAll",1760),wAn(1762,245,dVn,rN),MWn.xd=function(n){uO((n.a+="[",n),this.a)},MWn.yd=function(n){xX(uO(n,this.a),41)},MWn.Hb=function(){return nsn(this.a)},MWn.Ad=function(n){return nq(),Ncn(this.a,n)<=0},MWn.Ib=function(){return"\\"+this.a+"/"},vX(XWn,"Cut/BelowValue",1762),wAn(537,1,pVn),MWn.Jc=function(n){e5(this,n)},MWn.Ib=function(){return Hln(BB(WQ(this,"use Optional.orNull() instead of Optional.or(null)"),20).Kc())},vX(XWn,"FluentIterable",537),wAn(433,537,pVn,OO),MWn.Kc=function(){return new oz(ZL(this.a.Kc(),new h))},vX(XWn,"FluentIterable/2",433),wAn(1046,537,pVn,AO),MWn.Kc=function(){return NU(this)},vX(XWn,"FluentIterable/3",1046),wAn(708,386,WWn,WL),MWn.Xb=function(n){return this.a[n].Kc()},vX(XWn,"FluentIterable/3/1",708),wAn(1972,1,{}),MWn.Ib=function(){return Bbn(this.Bd().b)},vX(XWn,"ForwardingObject",1972),wAn(1973,1972,vVn),MWn.Bd=function(){return this.Cd()},MWn.Jc=function(n){e5(this,n)},MWn.Lc=function(){return this.Oc()},MWn.Nc=function(){return new w1(this,0)},MWn.Oc=function(){return new Rq(null,this.Nc())},MWn.Fc=function(n){return this.Cd(),oE()},MWn.Gc=function(n){return this.Cd(),sE()},MWn.$b=function(){this.Cd(),hE()},MWn.Hc=function(n){return this.Cd().Hc(n)},MWn.Ic=function(n){return this.Cd().Ic(n)},MWn.dc=function(){return this.Cd().b.dc()},MWn.Kc=function(){return this.Cd().Kc()},MWn.Mc=function(n){return this.Cd(),fE()},MWn.gc=function(){return this.Cd().b.gc()},MWn.Pc=function(){return this.Cd().Pc()},MWn.Qc=function(n){return this.Cd().Qc(n)},vX(XWn,"ForwardingCollection",1973),wAn(1980,28,mVn),MWn.Kc=function(){return this.Ed()},MWn.Fc=function(n){throw Hp(new pv)},MWn.Gc=function(n){throw Hp(new pv)},MWn.$b=function(){throw Hp(new pv)},MWn.Hc=function(n){return null!=n&&ywn(this,n,!1)},MWn.Dd=function(){switch(this.gc()){case 0:return WX(),WX(),Fnt;case 1:return WX(),new Pq(yX(this.Ed().Pb()));default:return new aU(this,this.Pc())}},MWn.Mc=function(n){throw Hp(new pv)},vX(XWn,"ImmutableCollection",1980),wAn(712,1980,mVn,rv),MWn.Kc=function(){return L9(this.a.Kc())},MWn.Hc=function(n){return null!=n&&this.a.Hc(n)},MWn.Ic=function(n){return this.a.Ic(n)},MWn.dc=function(){return this.a.dc()},MWn.Ed=function(){return L9(this.a.Kc())},MWn.gc=function(){return this.a.gc()},MWn.Pc=function(){return this.a.Pc()},MWn.Qc=function(n){return this.a.Qc(n)},MWn.Ib=function(){return Bbn(this.a)},vX(XWn,"ForwardingImmutableCollection",712),wAn(152,1980,yVn),MWn.Kc=function(){return this.Ed()},MWn.Yc=function(){return this.Fd(0)},MWn.Zc=function(n){return this.Fd(n)},MWn.ad=function(n){_rn(this,n)},MWn.Nc=function(){return new w1(this,16)},MWn.bd=function(n,t){return this.Gd(n,t)},MWn.Vc=function(n,t){throw Hp(new pv)},MWn.Wc=function(n,t){throw Hp(new pv)},MWn.Fb=function(n){return qAn(this,n)},MWn.Hb=function(){return Ian(this)},MWn.Xc=function(n){return null==n?-1:Tmn(this,n)},MWn.Ed=function(){return this.Fd(0)},MWn.Fd=function(n){return ix(this,n)},MWn.$c=function(n){throw Hp(new pv)},MWn._c=function(n,t){throw Hp(new pv)},MWn.Gd=function(n,t){return sfn(new s1(new IT(this),n,t))},vX(XWn,"ImmutableList",152),wAn(2006,152,yVn),MWn.Kc=function(){return L9(this.Hd().Kc())},MWn.bd=function(n,t){return sfn(this.Hd().bd(n,t))},MWn.Hc=function(n){return null!=n&&this.Hd().Hc(n)},MWn.Ic=function(n){return this.Hd().Ic(n)},MWn.Fb=function(n){return Nfn(this.Hd(),n)},MWn.Xb=function(n){return WI(this,n)},MWn.Hb=function(){return nsn(this.Hd())},MWn.Xc=function(n){return this.Hd().Xc(n)},MWn.dc=function(){return this.Hd().dc()},MWn.Ed=function(){return L9(this.Hd().Kc())},MWn.gc=function(){return this.Hd().gc()},MWn.Gd=function(n,t){return sfn(this.Hd().bd(n,t))},MWn.Pc=function(){return this.Hd().Qc(x8(Ant,HWn,1,this.Hd().gc(),5,1))},MWn.Qc=function(n){return this.Hd().Qc(n)},MWn.Ib=function(){return Bbn(this.Hd())},vX(XWn,"ForwardingImmutableList",2006),wAn(714,1,jVn),MWn.vc=function(){return lz(this)},MWn.wc=function(n){nan(this,n)},MWn.ec=function(){return bz(this)},MWn.yc=function(n,t,e){return Zln(this,n,t,e)},MWn.Cc=function(){return this.Ld()},MWn.$b=function(){throw Hp(new pv)},MWn._b=function(n){return null!=this.xc(n)},MWn.uc=function(n){return this.Ld().Hc(n)},MWn.Jd=function(){return new cv(this)},MWn.Kd=function(){return new av(this)},MWn.Fb=function(n){return $sn(this,n)},MWn.Hb=function(){return lz(this).Hb()},MWn.dc=function(){return 0==this.gc()},MWn.zc=function(n,t){return vk()},MWn.Bc=function(n){throw Hp(new pv)},MWn.Ib=function(){return fSn(this)},MWn.Ld=function(){return this.e?this.e:this.e=this.Kd()},MWn.c=null,MWn.d=null,MWn.e=null,vX(XWn,"ImmutableMap",714),wAn(715,714,jVn),MWn._b=function(n){return Jj(this,n)},MWn.uc=function(n){return _T(this.b,n)},MWn.Id=function(){return hfn(new el(this))},MWn.Jd=function(){return hfn(iV(this.b))},MWn.Kd=function(){return s_(),new rv(tV(this.b))},MWn.Fb=function(n){return BT(this.b,n)},MWn.xc=function(n){return UK(this,n)},MWn.Hb=function(){return nsn(this.b.c)},MWn.dc=function(){return this.b.c.dc()},MWn.gc=function(){return this.b.c.gc()},MWn.Ib=function(){return Bbn(this.b.c)},vX(XWn,"ForwardingImmutableMap",715),wAn(1974,1973,EVn),MWn.Bd=function(){return this.Md()},MWn.Cd=function(){return this.Md()},MWn.Nc=function(){return new w1(this,1)},MWn.Fb=function(n){return n===this||this.Md().Fb(n)},MWn.Hb=function(){return this.Md().Hb()},vX(XWn,"ForwardingSet",1974),wAn(1069,1974,EVn,el),MWn.Bd=function(){return eV(this.a.b)},MWn.Cd=function(){return eV(this.a.b)},MWn.Hc=function(n){if(cL(n,42)&&null==BB(n,42).cd())return!1;try{return KT(eV(this.a.b),n)}catch(t){if(cL(t=lun(t),205))return!1;throw Hp(t)}},MWn.Md=function(){return eV(this.a.b)},MWn.Qc=function(n){var t;return t=IJ(eV(this.a.b),n),eV(this.a.b).b.gc()=0?"+":"")+(i/60|0),t=UO(e.Math.abs(i)%60),(pMn(),pet)[this.q.getDay()]+" "+vet[this.q.getMonth()]+" "+UO(this.q.getDate())+" "+UO(this.q.getHours())+":"+UO(this.q.getMinutes())+":"+UO(this.q.getSeconds())+" GMT"+n+t+" "+this.q.getFullYear()};var ott,stt,htt,ftt,ltt,btt,wtt,dtt,gtt,ptt,vtt,mtt=vX(JWn,"Date",199);wAn(1915,199,TQn,Jkn),MWn.a=!1,MWn.b=0,MWn.c=0,MWn.d=0,MWn.e=0,MWn.f=0,MWn.g=!1,MWn.i=0,MWn.j=0,MWn.k=0,MWn.n=0,MWn.o=0,MWn.p=0,vX("com.google.gwt.i18n.shared.impl","DateRecord",1915),wAn(1966,1,{}),MWn.fe=function(){return null},MWn.ge=function(){return null},MWn.he=function(){return null},MWn.ie=function(){return null},MWn.je=function(){return null},vX(MQn,"JSONValue",1966),wAn(216,1966,{216:1},Cl,Tl),MWn.Fb=function(n){return!!cL(n,216)&&v0(this.a,BB(n,216).a)},MWn.ee=function(){return qp},MWn.Hb=function(){return tJ(this.a)},MWn.fe=function(){return this},MWn.Ib=function(){var n,t,e;for(e=new lN("["),t=0,n=this.a.length;t0&&(e.a+=","),uO(e,dnn(this,t));return e.a+="]",e.a},vX(MQn,"JSONArray",216),wAn(483,1966,{483:1},Ml),MWn.ee=function(){return Gp},MWn.ge=function(){return this},MWn.Ib=function(){return hN(),""+this.a},MWn.a=!1,vX(MQn,"JSONBoolean",483),wAn(985,60,BVn,gy),vX(MQn,"JSONException",985),wAn(1023,1966,{},v),MWn.ee=function(){return Vp},MWn.Ib=function(){return zWn},vX(MQn,"JSONNull",1023),wAn(258,1966,{258:1},Sl),MWn.Fb=function(n){return!!cL(n,258)&&this.a==BB(n,258).a},MWn.ee=function(){return zp},MWn.Hb=function(){return VO(this.a)},MWn.he=function(){return this},MWn.Ib=function(){return this.a+""},MWn.a=0,vX(MQn,"JSONNumber",258),wAn(183,1966,{183:1},py,Pl),MWn.Fb=function(n){return!!cL(n,183)&&v0(this.a,BB(n,183).a)},MWn.ee=function(){return Up},MWn.Hb=function(){return tJ(this.a)},MWn.ie=function(){return this},MWn.Ib=function(){var n,t,e,i,r,c;for(c=new lN("{"),n=!0,i=0,r=(e=jrn(this,x8(Qtt,sVn,2,0,6,1))).length;i=0?":"+this.c:"")+")"},MWn.c=0;var Ftt=vX(RWn,"StackTraceElement",310);OWn={3:1,475:1,35:1,2:1};var Btt,Htt,qtt,Gtt,ztt,Utt,Xtt,Wtt,Vtt,Qtt=vX(RWn,qVn,2);wAn(107,418,{475:1},Sk,Pk,fN),vX(RWn,"StringBuffer",107),wAn(100,418,{475:1},Ck,Ik,lN),vX(RWn,"StringBuilder",100),wAn(687,73,NQn,Ok),vX(RWn,"StringIndexOutOfBoundsException",687),wAn(2043,1,{}),wAn(844,1,{},x),MWn.Kb=function(n){return BB(n,78).e},vX(RWn,"Throwable/lambda$0$Type",844),wAn(41,60,{3:1,102:1,60:1,78:1,41:1},pv,tk),vX(RWn,"UnsupportedOperationException",41),wAn(240,236,{3:1,35:1,236:1,240:1},knn,wE),MWn.wd=function(n){return Y_n(this,BB(n,240))},MWn.ke=function(){return bSn(eqn(this))},MWn.Fb=function(n){var t;return this===n||!!cL(n,240)&&(t=BB(n,240),this.e==t.e&&0==Y_n(this,t))},MWn.Hb=function(){var n;return 0!=this.b?this.b:this.a<54?(n=fan(this.f),this.b=dG(e0(n,-1)),this.b=33*this.b+dG(e0(kz(n,32),-1)),this.b=17*this.b+CY(this.e),this.b):(this.b=17*Khn(this.c)+CY(this.e),this.b)},MWn.Ib=function(){return eqn(this)},MWn.a=0,MWn.b=0,MWn.d=0,MWn.e=0,MWn.f=0;var Jtt,Ytt,Ztt,net,tet,eet,iet=vX("java.math","BigDecimal",240);wAn(91,236,{3:1,35:1,236:1,91:1},Rpn,X6,lU,vEn,Cgn,$A),MWn.wd=function(n){return tgn(this,BB(n,91))},MWn.ke=function(){return bSn(qXn(this,0))},MWn.Fb=function(n){return swn(this,n)},MWn.Hb=function(){return Khn(this)},MWn.Ib=function(){return qXn(this,0)},MWn.b=-2,MWn.c=0,MWn.d=0,MWn.e=0;var ret,cet,aet,uet,oet=vX("java.math","BigInteger",91);wAn(488,1967,YWn),MWn.$b=function(){$U(this)},MWn._b=function(n){return hU(this,n)},MWn.uc=function(n){return Lsn(this,n,this.g)||Lsn(this,n,this.f)},MWn.vc=function(){return new Pb(this)},MWn.xc=function(n){return RX(this,n)},MWn.zc=function(n,t){return VW(this,n,t)},MWn.Bc=function(n){return v6(this,n)},MWn.gc=function(){return NT(this)},vX(JWn,"AbstractHashMap",488),wAn(261,nVn,tVn,Pb),MWn.$b=function(){this.a.$b()},MWn.Hc=function(n){return m2(this,n)},MWn.Kc=function(){return new usn(this.a)},MWn.Mc=function(n){var t;return!!m2(this,n)&&(t=BB(n,42).cd(),this.a.Bc(t),!0)},MWn.gc=function(){return this.a.gc()},vX(JWn,"AbstractHashMap/EntrySet",261),wAn(262,1,QWn,usn),MWn.Nb=function(n){fU(this,n)},MWn.Pb=function(){return ten(this)},MWn.Ob=function(){return this.b},MWn.Qb=function(){o9(this)},MWn.b=!1,vX(JWn,"AbstractHashMap/EntrySetIterator",262),wAn(417,1,QWn,Sb),MWn.Nb=function(n){fU(this,n)},MWn.Ob=function(){return aS(this)},MWn.Pb=function(){return mQ(this)},MWn.Qb=function(){fW(this)},MWn.b=0,MWn.c=-1,vX(JWn,"AbstractList/IteratorImpl",417),wAn(96,417,cVn,M2),MWn.Qb=function(){fW(this)},MWn.Rb=function(n){yR(this,n)},MWn.Sb=function(){return this.b>0},MWn.Tb=function(){return this.b},MWn.Ub=function(){return Px(this.b>0),this.a.Xb(this.c=--this.b)},MWn.Vb=function(){return this.b-1},MWn.Wb=function(n){Mx(-1!=this.c),this.a._c(this.c,n)},vX(JWn,"AbstractList/ListIteratorImpl",96),wAn(219,52,LVn,s1),MWn.Vc=function(n,t){LZ(n,this.b),this.c.Vc(this.a+n,t),++this.b},MWn.Xb=function(n){return l1(n,this.b),this.c.Xb(this.a+n)},MWn.$c=function(n){var t;return l1(n,this.b),t=this.c.$c(this.a+n),--this.b,t},MWn._c=function(n,t){return l1(n,this.b),this.c._c(this.a+n,t)},MWn.gc=function(){return this.b},MWn.a=0,MWn.b=0,vX(JWn,"AbstractList/SubList",219),wAn(384,nVn,tVn,Cb),MWn.$b=function(){this.a.$b()},MWn.Hc=function(n){return this.a._b(n)},MWn.Kc=function(){return new Ib(this.a.vc().Kc())},MWn.Mc=function(n){return!!this.a._b(n)&&(this.a.Bc(n),!0)},MWn.gc=function(){return this.a.gc()},vX(JWn,"AbstractMap/1",384),wAn(691,1,QWn,Ib),MWn.Nb=function(n){fU(this,n)},MWn.Ob=function(){return this.a.Ob()},MWn.Pb=function(){return BB(this.a.Pb(),42).cd()},MWn.Qb=function(){this.a.Qb()},vX(JWn,"AbstractMap/1/1",691),wAn(226,28,ZWn,Ob),MWn.$b=function(){this.a.$b()},MWn.Hc=function(n){return this.a.uc(n)},MWn.Kc=function(){return new Kb(this.a.vc().Kc())},MWn.gc=function(){return this.a.gc()},vX(JWn,"AbstractMap/2",226),wAn(294,1,QWn,Kb),MWn.Nb=function(n){fU(this,n)},MWn.Ob=function(){return this.a.Ob()},MWn.Pb=function(){return BB(this.a.Pb(),42).dd()},MWn.Qb=function(){this.a.Qb()},vX(JWn,"AbstractMap/2/1",294),wAn(484,1,{484:1,42:1}),MWn.Fb=function(n){var t;return!!cL(n,42)&&(t=BB(n,42),cV(this.d,t.cd())&&cV(this.e,t.dd()))},MWn.cd=function(){return this.d},MWn.dd=function(){return this.e},MWn.Hb=function(){return KA(this.d)^KA(this.e)},MWn.ed=function(n){return pR(this,n)},MWn.Ib=function(){return this.d+"="+this.e},vX(JWn,"AbstractMap/AbstractEntry",484),wAn(383,484,{484:1,383:1,42:1},PS),vX(JWn,"AbstractMap/SimpleEntry",383),wAn(1984,1,VQn),MWn.Fb=function(n){var t;return!!cL(n,42)&&(t=BB(n,42),cV(this.cd(),t.cd())&&cV(this.dd(),t.dd()))},MWn.Hb=function(){return KA(this.cd())^KA(this.dd())},MWn.Ib=function(){return this.cd()+"="+this.dd()},vX(JWn,uVn,1984),wAn(1992,1967,eVn),MWn.tc=function(n){return q5(this,n)},MWn._b=function(n){return DK(this,n)},MWn.vc=function(){return new Bb(this)},MWn.xc=function(n){return qI(lsn(this,n))},MWn.ec=function(){return new _b(this)},vX(JWn,"AbstractNavigableMap",1992),wAn(739,nVn,tVn,Bb),MWn.Hc=function(n){return cL(n,42)&&q5(this.b,BB(n,42))},MWn.Kc=function(){return new BR(this.b)},MWn.Mc=function(n){var t;return!!cL(n,42)&&(t=BB(n,42),z8(this.b,t))},MWn.gc=function(){return this.b.c},vX(JWn,"AbstractNavigableMap/EntrySet",739),wAn(493,nVn,rVn,_b),MWn.Nc=function(){return new wS(this)},MWn.$b=function(){my(this.a)},MWn.Hc=function(n){return DK(this.a,n)},MWn.Kc=function(){return new Fb(new BR(new xN(this.a).b))},MWn.Mc=function(n){return!!DK(this.a,n)&&($Y(this.a,n),!0)},MWn.gc=function(){return this.a.c},vX(JWn,"AbstractNavigableMap/NavigableKeySet",493),wAn(494,1,QWn,Fb),MWn.Nb=function(n){fU(this,n)},MWn.Ob=function(){return aS(this.a.a)},MWn.Pb=function(){return mx(this.a).cd()},MWn.Qb=function(){e_(this.a)},vX(JWn,"AbstractNavigableMap/NavigableKeySet/1",494),wAn(2004,28,ZWn),MWn.Fc=function(n){return F8(eMn(this,n)),!0},MWn.Gc=function(n){return kW(n),vH(n!=this,"Can't add a queue to itself"),Frn(this,n)},MWn.$b=function(){for(;null!=mnn(this););},vX(JWn,"AbstractQueue",2004),wAn(302,28,{4:1,20:1,28:1,14:1},Lp,d1),MWn.Fc=function(n){return w3(this,n),!0},MWn.$b=function(){o4(this)},MWn.Hc=function(n){return wun(new bV(this),n)},MWn.dc=function(){return Wy(this)},MWn.Kc=function(){return new bV(this)},MWn.Mc=function(n){return GY(new bV(this),n)},MWn.gc=function(){return this.c-this.b&this.a.length-1},MWn.Nc=function(){return new w1(this,272)},MWn.Qc=function(n){var t;return t=this.c-this.b&this.a.length-1,n.lengtht&&$X(n,t,null),n},MWn.b=0,MWn.c=0,vX(JWn,"ArrayDeque",302),wAn(446,1,QWn,bV),MWn.Nb=function(n){fU(this,n)},MWn.Ob=function(){return this.a!=this.b},MWn.Pb=function(){return _hn(this)},MWn.Qb=function(){ein(this)},MWn.a=0,MWn.b=0,MWn.c=-1,vX(JWn,"ArrayDeque/IteratorImpl",446),wAn(12,52,QQn,Np,Y6,t_),MWn.Vc=function(n,t){kG(this,n,t)},MWn.Fc=function(n){return WB(this,n)},MWn.Wc=function(n,t){return ohn(this,n,t)},MWn.Gc=function(n){return gun(this,n)},MWn.$b=function(){this.c=x8(Ant,HWn,1,0,5,1)},MWn.Hc=function(n){return-1!=E7(this,n,0)},MWn.Jc=function(n){Otn(this,n)},MWn.Xb=function(n){return xq(this,n)},MWn.Xc=function(n){return E7(this,n,0)},MWn.dc=function(){return 0==this.c.length},MWn.Kc=function(){return new Wb(this)},MWn.$c=function(n){return s6(this,n)},MWn.Mc=function(n){return y7(this,n)},MWn.Ud=function(n,t){h1(this,n,t)},MWn._c=function(n,t){return c5(this,n,t)},MWn.gc=function(){return this.c.length},MWn.ad=function(n){m$(this,n)},MWn.Pc=function(){return bx(this)},MWn.Qc=function(n){return Qgn(this,n)};var set,het,fet,bet,wet,det,get,pet,vet,met=vX(JWn,"ArrayList",12);wAn(7,1,QWn,Wb),MWn.Nb=function(n){fU(this,n)},MWn.Ob=function(){return y$(this)},MWn.Pb=function(){return n0(this)},MWn.Qb=function(){AU(this)},MWn.a=0,MWn.b=-1,vX(JWn,"ArrayList/1",7),wAn(2013,e.Function,{},T),MWn.te=function(n,t){return Pln(n,t)},wAn(154,52,JQn,Yy),MWn.Hc=function(n){return-1!=bin(this,n)},MWn.Jc=function(n){var t,e,i,r;for(kW(n),i=0,r=(e=this.a).length;i>>0).toString(16))},MWn.f=0,MWn.i=KQn;var sit,hit,fit,lit,bit=vX(CJn,"CNode",57);wAn(814,1,{},Wv),vX(CJn,"CNode/CNodeBuilder",814),wAn(1525,1,{},dn),MWn.Oe=function(n,t){return 0},MWn.Pe=function(n,t){return 0},vX(CJn,OJn,1525),wAn(1790,1,{},gn),MWn.Le=function(n){var t,i,r,c,a,u,o,s,h,f,l,b,w,d,g;for(h=RQn,r=new Wb(n.a.b);r.ae.d.c||e.d.c==r.d.c&&e.d.b0?n+this.n.d+this.n.a:0},MWn.Se=function(){var n,t,i,r,c;if(c=0,this.e)this.b?c=this.b.a:this.a[1][1]&&(c=this.a[1][1].Se());else if(this.g)c=Jbn(this,Okn(this,null,!0));else for(Dtn(),i=0,r=(t=Pun(Gk(Vit,1),$Vn,232,0,[Git,zit,Uit])).length;i0?c+this.n.b+this.n.c:0},MWn.Te=function(){var n,t,e,i,r;if(this.g)for(n=Okn(this,null,!1),Dtn(),i=0,r=(e=Pun(Gk(Vit,1),$Vn,232,0,[Git,zit,Uit])).length;i0&&(r[0]+=this.d,i-=r[0]),r[2]>0&&(r[2]+=this.d,i-=r[2]),this.c.a=e.Math.max(0,i),this.c.d=t.d+n.d+(this.c.a-i)/2,r[1]=e.Math.max(r[1],i),Q5(this,zit,t.d+n.d+r[0]-(r[1]-i)/2,r)},MWn.b=null,MWn.d=0,MWn.e=!1,MWn.f=!1,MWn.g=!1;var Qit,Jit,Yit,Zit=0,nrt=0;vX(tYn,"GridContainerCell",1473),wAn(461,22,{3:1,35:1,22:1,461:1},GS);var trt,ert=Ben(tYn,"HorizontalLabelAlignment",461,Unt,m1,g_);wAn(306,212,{212:1,306:1},yY,wtn,KJ),MWn.Re=function(){return WH(this)},MWn.Se=function(){return VH(this)},MWn.a=0,MWn.c=!1;var irt,rrt,crt,art=vX(tYn,"LabelCell",306);wAn(244,326,{212:1,326:1,244:1},Ign),MWn.Re=function(){return MIn(this)},MWn.Se=function(){return SIn(this)},MWn.Te=function(){_Fn(this)},MWn.Ue=function(){GFn(this)},MWn.b=0,MWn.c=0,MWn.d=!1,vX(tYn,"StripContainerCell",244),wAn(1626,1,DVn,En),MWn.Mb=function(n){return Qy(BB(n,212))},vX(tYn,"StripContainerCell/lambda$0$Type",1626),wAn(1627,1,{},Tn),MWn.Fe=function(n){return BB(n,212).Se()},vX(tYn,"StripContainerCell/lambda$1$Type",1627),wAn(1628,1,DVn,Mn),MWn.Mb=function(n){return Jy(BB(n,212))},vX(tYn,"StripContainerCell/lambda$2$Type",1628),wAn(1629,1,{},Sn),MWn.Fe=function(n){return BB(n,212).Re()},vX(tYn,"StripContainerCell/lambda$3$Type",1629),wAn(462,22,{3:1,35:1,22:1,462:1},zS);var urt,ort,srt,hrt,frt,lrt,brt,wrt,drt,grt,prt,vrt,mrt,yrt,krt,jrt,Ert,Trt,Mrt,Srt,Prt,Crt,Irt,Ort=Ben(tYn,"VerticalLabelAlignment",462,Unt,y1,p_);wAn(789,1,{},eUn),MWn.c=0,MWn.d=0,MWn.k=0,MWn.s=0,MWn.t=0,MWn.v=!1,MWn.w=0,MWn.D=!1,vX(sYn,"NodeContext",789),wAn(1471,1,MJn,Pn),MWn.ue=function(n,t){return JO(BB(n,61),BB(t,61))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(sYn,"NodeContext/0methodref$comparePortSides$Type",1471),wAn(1472,1,MJn,Cn),MWn.ue=function(n,t){return UTn(BB(n,111),BB(t,111))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(sYn,"NodeContext/1methodref$comparePortContexts$Type",1472),wAn(159,22,{3:1,35:1,22:1,159:1},ocn);var Art,$rt,Lrt,Nrt,xrt,Drt,Rrt,Krt=Ben(sYn,"NodeLabelLocation",159,Unt,tpn,v_);wAn(111,1,{111:1},MOn),MWn.a=!1,vX(sYn,"PortContext",111),wAn(1476,1,lVn,In),MWn.td=function(n){CE(BB(n,306))},vX(lYn,bYn,1476),wAn(1477,1,DVn,On),MWn.Mb=function(n){return!!BB(n,111).c},vX(lYn,wYn,1477),wAn(1478,1,lVn,An),MWn.td=function(n){CE(BB(n,111).c)},vX(lYn,"LabelPlacer/lambda$2$Type",1478),wAn(1475,1,lVn,Ln),MWn.td=function(n){qD(),Jp(BB(n,111))},vX(lYn,"NodeLabelAndSizeUtilities/lambda$0$Type",1475),wAn(790,1,lVn,$_),MWn.td=function(n){RM(this.b,this.c,this.a,BB(n,181))},MWn.a=!1,MWn.c=!1,vX(lYn,"NodeLabelCellCreator/lambda$0$Type",790),wAn(1474,1,lVn,Cw),MWn.td=function(n){Iv(this.a,BB(n,181))},vX(lYn,"PortContextCreator/lambda$0$Type",1474),wAn(1829,1,{},Nn),vX(gYn,"GreedyRectangleStripOverlapRemover",1829),wAn(1830,1,MJn,$n),MWn.ue=function(n,t){return FN(BB(n,222),BB(t,222))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(gYn,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1830),wAn(1786,1,{},Zv),MWn.a=5,MWn.e=0,vX(gYn,"RectangleStripOverlapRemover",1786),wAn(1787,1,MJn,Dn),MWn.ue=function(n,t){return BN(BB(n,222),BB(t,222))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(gYn,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1787),wAn(1789,1,MJn,Rn),MWn.ue=function(n,t){return YU(BB(n,222),BB(t,222))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(gYn,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1789),wAn(406,22,{3:1,35:1,22:1,406:1},US);var _rt,Frt,Brt,Hrt,qrt,Grt=Ben(gYn,"RectangleStripOverlapRemover/OverlapRemovalDirection",406,Unt,J2,m_);wAn(222,1,{222:1},xG),vX(gYn,"RectangleStripOverlapRemover/RectangleNode",222),wAn(1788,1,lVn,Iw),MWn.td=function(n){Cmn(this.a,BB(n,222))},vX(gYn,"RectangleStripOverlapRemover/lambda$1$Type",1788),wAn(1304,1,MJn,Kn),MWn.ue=function(n,t){return zHn(BB(n,167),BB(t,167))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(vYn,"PolyominoCompactor/CornerCasesGreaterThanRestComparator",1304),wAn(1307,1,{},_n),MWn.Kb=function(n){return BB(n,324).a},vX(vYn,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type",1307),wAn(1308,1,DVn,Fn),MWn.Mb=function(n){return BB(n,323).a},vX(vYn,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type",1308),wAn(1309,1,DVn,Bn),MWn.Mb=function(n){return BB(n,323).a},vX(vYn,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type",1309),wAn(1302,1,MJn,Hn),MWn.ue=function(n,t){return WRn(BB(n,167),BB(t,167))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(vYn,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator",1302),wAn(1305,1,{},xn),MWn.Kb=function(n){return BB(n,324).a},vX(vYn,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type",1305),wAn(767,1,MJn,qn),MWn.ue=function(n,t){return Uan(BB(n,167),BB(t,167))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(vYn,"PolyominoCompactor/MinNumOfExtensionsComparator",767),wAn(1300,1,MJn,Gn),MWn.ue=function(n,t){return Qin(BB(n,321),BB(t,321))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(vYn,"PolyominoCompactor/MinPerimeterComparator",1300),wAn(1301,1,MJn,zn),MWn.ue=function(n,t){return avn(BB(n,321),BB(t,321))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(vYn,"PolyominoCompactor/MinPerimeterComparatorWithShape",1301),wAn(1303,1,MJn,Un),MWn.ue=function(n,t){return BKn(BB(n,167),BB(t,167))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(vYn,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator",1303),wAn(1306,1,{},Xn),MWn.Kb=function(n){return BB(n,324).a},vX(vYn,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type",1306),wAn(777,1,{},DS),MWn.Ce=function(n,t){return O2(this,BB(n,46),BB(t,167))},vX(vYn,"SuccessorCombination",777),wAn(644,1,{},Wn),MWn.Ce=function(n,t){var e;return XIn((e=BB(n,46),BB(t,167),e))},vX(vYn,"SuccessorJitter",644),wAn(643,1,{},Vn),MWn.Ce=function(n,t){var e;return bxn((e=BB(n,46),BB(t,167),e))},vX(vYn,"SuccessorLineByLine",643),wAn(568,1,{},Qn),MWn.Ce=function(n,t){var e;return f$n((e=BB(n,46),BB(t,167),e))},vX(vYn,"SuccessorManhattan",568),wAn(1356,1,{},Jn),MWn.Ce=function(n,t){var e;return jNn((e=BB(n,46),BB(t,167),e))},vX(vYn,"SuccessorMaxNormWindingInMathPosSense",1356),wAn(400,1,{},Ow),MWn.Ce=function(n,t){return BU(this,n,t)},MWn.c=!1,MWn.d=!1,MWn.e=!1,MWn.f=!1,vX(vYn,"SuccessorQuadrantsGeneric",400),wAn(1357,1,{},Yn),MWn.Kb=function(n){return BB(n,324).a},vX(vYn,"SuccessorQuadrantsGeneric/lambda$0$Type",1357),wAn(323,22,{3:1,35:1,22:1,323:1},_S),MWn.a=!1;var zrt,Urt=Ben(EYn,TYn,323,Unt,n3,y_);wAn(1298,1,{}),MWn.Ib=function(){var n,t,e,i,r,c;for(e=" ",n=iln(0),r=0;r=0?"b"+n+"["+u5(this.a)+"]":"b["+u5(this.a)+"]":"b_"+PN(this)},vX(cZn,"FBendpoint",559),wAn(282,134,{3:1,282:1,94:1,134:1},IR),MWn.Ib=function(){return u5(this)},vX(cZn,"FEdge",282),wAn(231,134,{3:1,231:1,94:1,134:1},y6);var Cct,Ict,Oct,Act,$ct,Lct,Nct,xct,Dct,Rct,Kct=vX(cZn,"FGraph",231);wAn(447,357,{3:1,447:1,357:1,94:1,134:1},m4),MWn.Ib=function(){return null==this.b||0==this.b.length?"l["+u5(this.a)+"]":"l_"+this.b},vX(cZn,"FLabel",447),wAn(144,357,{3:1,144:1,357:1,94:1,134:1},qX),MWn.Ib=function(){return p0(this)},MWn.b=0,vX(cZn,"FNode",144),wAn(2003,1,{}),MWn.bf=function(n){sFn(this,n)},MWn.cf=function(){qmn(this)},MWn.d=0,vX(uZn,"AbstractForceModel",2003),wAn(631,2003,{631:1},Lan),MWn.af=function(n,t){var i,r,c,a;return tIn(this.f,n,t),c=XR(B$(t.d),n.d),a=e.Math.sqrt(c.a*c.a+c.b*c.b),r=e.Math.max(0,a-lW(n.e)/2-lW(t.e)/2),kL(c,((i=qon(this.e,n,t))>0?-_U(r,this.c)*i:xx(r,this.b)*BB(mMn(n,(fRn(),Zct)),19).a)/a),c},MWn.bf=function(n){sFn(this,n),this.a=BB(mMn(n,(fRn(),qct)),19).a,this.c=Gy(MD(mMn(n,cat))),this.b=Gy(MD(mMn(n,tat)))},MWn.df=function(n){return n0&&(a-=Sy(r,this.a)*i),kL(c,a*this.b/u),c},MWn.bf=function(n){var t,i,r,c,a,u,o;for(sFn(this,n),this.b=Gy(MD(mMn(n,(fRn(),aat)))),this.c=this.b/BB(mMn(n,qct),19).a,r=n.e.c.length,a=0,c=0,o=new Wb(n.e);o.a0},MWn.a=0,MWn.b=0,MWn.c=0,vX(uZn,"FruchtermanReingoldModel",632),wAn(849,1,QJn,zh),MWn.Qe=function(n){Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,oZn),""),"Force Model"),"Determines the model for force calculation."),Oct),(PPn(),gMt)),$at),nbn((rpn(),hMt))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,sZn),""),"Iterations"),"The number of iterations on the force model."),iln(300)),vMt),Att),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,hZn),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),iln(0)),vMt),Att),nbn(uMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,fZn),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),lZn),dMt),Ptt),nbn(hMt)))),a2(n,fZn,oZn,xct),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,bZn),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),dMt),Ptt),nbn(hMt)))),a2(n,bZn,oZn,$ct),pUn((new Uh,n))},vX(wZn,"ForceMetaDataProvider",849),wAn(424,22,{3:1,35:1,22:1,424:1},XS);var _ct,Fct,Bct,Hct,qct,Gct,zct,Uct,Xct,Wct,Vct,Qct,Jct,Yct,Zct,nat,tat,eat,iat,rat,cat,aat,uat,oat,sat,hat,fat,lat,bat,wat,dat,gat,pat,vat,mat,yat,kat,jat,Eat,Tat,Mat,Sat,Pat,Cat,Iat,Oat,Aat,$at=Ben(wZn,"ForceModelStrategy",424,Unt,aY,E_);wAn(988,1,QJn,Uh),MWn.Qe=function(n){pUn(n)},vX(wZn,"ForceOptions",988),wAn(989,1,{},dt),MWn.$e=function(){return new Gv},MWn._e=function(n){},vX(wZn,"ForceOptions/ForceFactory",989),wAn(850,1,QJn,Xh),MWn.Qe=function(n){Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,NZn),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),(hN(),!1)),(PPn(),wMt)),ktt),nbn((rpn(),sMt))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,xZn),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),dMt),Ptt),EG(hMt,Pun(Gk(jMt,1),$Vn,175,0,[uMt]))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,DZn),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),bat),gMt),Hat),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,RZn),""),"Stress Epsilon"),"Termination criterion for the iterative process."),lZn),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,KZn),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),iln(DWn)),vMt),Att),nbn(hMt)))),UGn((new Wh,n))},vX(wZn,"StressMetaDataProvider",850),wAn(992,1,QJn,Wh),MWn.Qe=function(n){UGn(n)},vX(wZn,"StressOptions",992),wAn(993,1,{},gt),MWn.$e=function(){return new OR},MWn._e=function(n){},vX(wZn,"StressOptions/StressFactory",993),wAn(1128,209,NYn,OR),MWn.Ze=function(n,t){var e,i,r,c;for(OTn(t,FZn,1),qy(TD(ZAn(n,(rkn(),kat))))?qy(TD(ZAn(n,Pat)))||jY(new Tw((GM(),new Dy(n)))):vLn(new Gv,n,mcn(t,1)),i=fon(n),c=(e=HFn(this.a,i)).Kc();c.Ob();)(r=BB(c.Pb(),231)).e.c.length<=1||(HHn(this.b,r),i$n(this.b),Otn(r.d,new pt));SUn(i=GUn(e)),HSn(t)},vX(HZn,"StressLayoutProvider",1128),wAn(1129,1,lVn,pt),MWn.td=function(n){_Bn(BB(n,447))},vX(HZn,"StressLayoutProvider/lambda$0$Type",1129),wAn(990,1,{},Tv),MWn.c=0,MWn.e=0,MWn.g=0,vX(HZn,"StressMajorization",990),wAn(379,22,{3:1,35:1,22:1,379:1},WS);var Lat,Nat,xat,Dat,Rat,Kat,_at,Fat,Bat,Hat=Ben(HZn,"StressMajorization/Dimension",379,Unt,j1,T_);wAn(991,1,MJn,xw),MWn.ue=function(n,t){return SK(this.a,BB(n,144),BB(t,144))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(HZn,"StressMajorization/lambda$0$Type",991),wAn(1229,1,{},D0),vX(GZn,"ElkLayered",1229),wAn(1230,1,lVn,vt),MWn.td=function(n){RIn(BB(n,37))},vX(GZn,"ElkLayered/lambda$0$Type",1230),wAn(1231,1,lVn,Dw),MWn.td=function(n){PK(this.a,BB(n,37))},vX(GZn,"ElkLayered/lambda$1$Type",1231),wAn(1263,1,{},$$),vX(GZn,"GraphConfigurator",1263),wAn(759,1,lVn,Rw),MWn.td=function(n){VMn(this.a,BB(n,10))},vX(GZn,"GraphConfigurator/lambda$0$Type",759),wAn(760,1,{},mt),MWn.Kb=function(n){return tjn(),new Rq(null,new w1(BB(n,29).a,16))},vX(GZn,"GraphConfigurator/lambda$1$Type",760),wAn(761,1,lVn,Kw),MWn.td=function(n){VMn(this.a,BB(n,10))},vX(GZn,"GraphConfigurator/lambda$2$Type",761),wAn(1127,209,NYn,Uv),MWn.Ze=function(n,t){var e;e=SBn(new tm,n),GI(ZAn(n,(HXn(),sgt)))===GI((ufn(),pCt))?rwn(this.a,e,t):wOn(this.a,e,t),gUn(new Qh,e)},vX(GZn,"LayeredLayoutProvider",1127),wAn(356,22,{3:1,35:1,22:1,356:1},VS);var qat,Gat,zat,Uat=Ben(GZn,"LayeredPhases",356,Unt,s5,M_);wAn(1651,1,{},vin),MWn.i=0,vX(zZn,"ComponentsToCGraphTransformer",1651),wAn(1652,1,{},yt),MWn.ef=function(n,t){return e.Math.min(null!=n.a?Gy(n.a):n.c.i,null!=t.a?Gy(t.a):t.c.i)},MWn.ff=function(n,t){return e.Math.min(null!=n.a?Gy(n.a):n.c.i,null!=t.a?Gy(t.a):t.c.i)},vX(zZn,"ComponentsToCGraphTransformer/1",1652),wAn(81,1,{81:1}),MWn.i=0,MWn.k=!0,MWn.o=KQn;var Xat,Wat,Vat,Qat=vX(UZn,"CNode",81);wAn(460,81,{460:1,81:1},NN,Sgn),MWn.Ib=function(){return""},vX(zZn,"ComponentsToCGraphTransformer/CRectNode",460),wAn(1623,1,{},kt),vX(zZn,"OneDimensionalComponentsCompaction",1623),wAn(1624,1,{},jt),MWn.Kb=function(n){return xZ(BB(n,46))},MWn.Fb=function(n){return this===n},vX(zZn,"OneDimensionalComponentsCompaction/lambda$0$Type",1624),wAn(1625,1,{},Et),MWn.Kb=function(n){return Ewn(BB(n,46))},MWn.Fb=function(n){return this===n},vX(zZn,"OneDimensionalComponentsCompaction/lambda$1$Type",1625),wAn(1654,1,{},BX),vX(UZn,"CGraph",1654),wAn(189,1,{189:1},Pgn),MWn.b=0,MWn.c=0,MWn.e=0,MWn.g=!0,MWn.i=KQn,vX(UZn,"CGroup",189),wAn(1653,1,{},Pt),MWn.ef=function(n,t){return e.Math.max(null!=n.a?Gy(n.a):n.c.i,null!=t.a?Gy(t.a):t.c.i)},MWn.ff=function(n,t){return e.Math.max(null!=n.a?Gy(n.a):n.c.i,null!=t.a?Gy(t.a):t.c.i)},vX(UZn,OJn,1653),wAn(1655,1,{},sOn),MWn.d=!1;var Jat=vX(UZn,xJn,1655);wAn(1656,1,{},Ct),MWn.Kb=function(n){return kM(),hN(),0!=BB(BB(n,46).a,81).d.e},MWn.Fb=function(n){return this===n},vX(UZn,DJn,1656),wAn(823,1,{},Sq),MWn.a=!1,MWn.b=!1,MWn.c=!1,MWn.d=!1,vX(UZn,RJn,823),wAn(1825,1,{},DG),vX(XZn,KJn,1825);var Yat=bq(WZn,PJn);wAn(1826,1,{369:1},lJ),MWn.Ke=function(n){Gxn(this,BB(n,466))},vX(XZn,_Jn,1826),wAn(1827,1,MJn,It),MWn.ue=function(n,t){return oQ(BB(n,81),BB(t,81))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(XZn,FJn,1827),wAn(466,1,{466:1},fP),MWn.a=!1,vX(XZn,BJn,466),wAn(1828,1,MJn,Ot),MWn.ue=function(n,t){return njn(BB(n,466),BB(t,466))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(XZn,HJn,1828),wAn(140,1,{140:1},dP,mH),MWn.Fb=function(n){var t;return null!=n&&iut==tsn(n)&&(t=BB(n,140),cV(this.c,t.c)&&cV(this.d,t.d))},MWn.Hb=function(){return fhn(Pun(Gk(Ant,1),HWn,1,5,[this.c,this.d]))},MWn.Ib=function(){return"("+this.c+FWn+this.d+(this.a?"cx":"")+this.b+")"},MWn.a=!0,MWn.c=0,MWn.d=0;var Zat,nut,tut,eut,iut=vX(WZn,"Point",140);wAn(405,22,{3:1,35:1,22:1,405:1},QS);var rut,cut,aut,uut,out,sut,hut,fut,lut,but,wut,dut=Ben(WZn,"Point/Quadrant",405,Unt,t3,S_);wAn(1642,1,{},Vv),MWn.b=null,MWn.c=null,MWn.d=null,MWn.e=null,MWn.f=null,vX(WZn,"RectilinearConvexHull",1642),wAn(574,1,{369:1},Tpn),MWn.Ke=function(n){_9(this,BB(n,140))},MWn.b=0,vX(WZn,"RectilinearConvexHull/MaximalElementsEventHandler",574),wAn(1644,1,MJn,Mt),MWn.ue=function(n,t){return DV(MD(n),MD(t))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(WZn,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1644),wAn(1643,1,{369:1},ftn),MWn.Ke=function(n){PNn(this,BB(n,140))},MWn.a=0,MWn.b=null,MWn.c=null,MWn.d=null,MWn.e=null,vX(WZn,"RectilinearConvexHull/RectangleEventHandler",1643),wAn(1645,1,MJn,St),MWn.ue=function(n,t){return u0(BB(n,140),BB(t,140))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(WZn,"RectilinearConvexHull/lambda$0$Type",1645),wAn(1646,1,MJn,Tt),MWn.ue=function(n,t){return o0(BB(n,140),BB(t,140))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(WZn,"RectilinearConvexHull/lambda$1$Type",1646),wAn(1647,1,MJn,At),MWn.ue=function(n,t){return h0(BB(n,140),BB(t,140))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(WZn,"RectilinearConvexHull/lambda$2$Type",1647),wAn(1648,1,MJn,$t),MWn.ue=function(n,t){return s0(BB(n,140),BB(t,140))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(WZn,"RectilinearConvexHull/lambda$3$Type",1648),wAn(1649,1,MJn,Lt),MWn.ue=function(n,t){return jMn(BB(n,140),BB(t,140))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(WZn,"RectilinearConvexHull/lambda$4$Type",1649),wAn(1650,1,{},OZ),vX(WZn,"Scanline",1650),wAn(2005,1,{}),vX(VZn,"AbstractGraphPlacer",2005),wAn(325,1,{325:1},Xx),MWn.mf=function(n){return!!this.nf(n)&&(YIn(this.b,BB(mMn(n,(hWn(),Xft)),21),n),!0)},MWn.nf=function(n){var t,e,i;for(t=BB(mMn(n,(hWn(),Xft)),21),i=BB(h6(fut,t),21).Kc();i.Ob();)if(e=BB(i.Pb(),21),!BB(h6(this.b,e),15).dc())return!1;return!0},vX(VZn,"ComponentGroup",325),wAn(765,2005,{},Qv),MWn.of=function(n){var t;for(t=new Wb(this.a);t.ab&&(k=0,j+=l+c,l=0),ZRn(u,k+(g=u.c).a,j+g.b),kO(g),i=e.Math.max(i,k+v.a),l=e.Math.max(l,v.b),k+=v.a+c;if(t.f.a=i,t.f.b=j+l,qy(TD(mMn(a,Mdt)))){for(KXn(r=new Nt,n,c),f=n.Kc();f.Ob();)UR(kO(BB(f.Pb(),37).c),r.e);UR(kO(t.f),r.a)}d9(t,n)}else(m=BB(n.Xb(0),37))!=t&&(t.a.c=x8(Ant,HWn,1,0,5,1),$Kn(t,m,0,0),qan(t,m),kQ(t.d,m.d),t.f.a=m.f.a,t.f.b=m.f.b)},vX(VZn,"SimpleRowGraphPlacer",1291),wAn(1292,1,MJn,Rt),MWn.ue=function(n,t){return zan(BB(n,37),BB(t,37))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(VZn,"SimpleRowGraphPlacer/1",1292),wAn(1262,1,qJn,Kt),MWn.Lb=function(n){var t;return!!(t=BB(mMn(BB(n,243).b,(HXn(),vgt)),74))&&0!=t.b},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){var t;return!!(t=BB(mMn(BB(n,243).b,(HXn(),vgt)),74))&&0!=t.b},vX(ZZn,"CompoundGraphPostprocessor/1",1262),wAn(1261,1,n1n,em),MWn.pf=function(n,t){mvn(this,BB(n,37),t)},vX(ZZn,"CompoundGraphPreprocessor",1261),wAn(441,1,{441:1},zfn),MWn.c=!1,vX(ZZn,"CompoundGraphPreprocessor/ExternalPort",441),wAn(243,1,{243:1},L_),MWn.Ib=function(){return dx(this.c)+":"+OIn(this.b)},vX(ZZn,"CrossHierarchyEdge",243),wAn(763,1,MJn,_w),MWn.ue=function(n,t){return Vyn(this,BB(n,243),BB(t,243))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(ZZn,"CrossHierarchyEdgeComparator",763),wAn(299,134,{3:1,299:1,94:1,134:1}),MWn.p=0,vX(t1n,"LGraphElement",299),wAn(17,299,{3:1,17:1,299:1,94:1,134:1},wJ),MWn.Ib=function(){return OIn(this)};var yut=vX(t1n,"LEdge",17);wAn(37,299,{3:1,20:1,37:1,299:1,94:1,134:1},min),MWn.Jc=function(n){e5(this,n)},MWn.Kc=function(){return new Wb(this.b)},MWn.Ib=function(){return 0==this.b.c.length?"G-unlayered"+LMn(this.a):0==this.a.c.length?"G-layered"+LMn(this.b):"G[layerless"+LMn(this.a)+", layers"+LMn(this.b)+"]"};var kut,jut=vX(t1n,"LGraph",37);wAn(657,1,{}),MWn.qf=function(){return this.e.n},MWn.We=function(n){return mMn(this.e,n)},MWn.rf=function(){return this.e.o},MWn.sf=function(){return this.e.p},MWn.Xe=function(n){return Lx(this.e,n)},MWn.tf=function(n){this.e.n.a=n.a,this.e.n.b=n.b},MWn.uf=function(n){this.e.o.a=n.a,this.e.o.b=n.b},MWn.vf=function(n){this.e.p=n},vX(t1n,"LGraphAdapters/AbstractLShapeAdapter",657),wAn(577,1,{839:1},Fw),MWn.wf=function(){var n,t;if(!this.b)for(this.b=sx(this.a.b.c.length),t=new Wb(this.a.b);t.a0&&Dhn((b1(t-1,n.length),n.charCodeAt(t-1)),s1n);)--t;if(r> ",n),pyn(e)),oO(uO((n.a+="[",n),e.i),"]")),n.a},MWn.c=!0,MWn.d=!1;var Fut,But,Hut,qut,Gut=vX(t1n,"LPort",11);wAn(397,1,pVn,Hw),MWn.Jc=function(n){e5(this,n)},MWn.Kc=function(){return new qw(new Wb(this.a.e))},vX(t1n,"LPort/1",397),wAn(1290,1,QWn,qw),MWn.Nb=function(n){fU(this,n)},MWn.Pb=function(){return BB(n0(this.a),17).c},MWn.Ob=function(){return y$(this.a)},MWn.Qb=function(){AU(this.a)},vX(t1n,"LPort/1/1",1290),wAn(359,1,pVn,Gw),MWn.Jc=function(n){e5(this,n)},MWn.Kc=function(){return new zw(new Wb(this.a.g))},vX(t1n,"LPort/2",359),wAn(762,1,QWn,zw),MWn.Nb=function(n){fU(this,n)},MWn.Pb=function(){return BB(n0(this.a),17).d},MWn.Ob=function(){return y$(this.a)},MWn.Qb=function(){AU(this.a)},vX(t1n,"LPort/2/1",762),wAn(1283,1,pVn,hP),MWn.Jc=function(n){e5(this,n)},MWn.Kc=function(){return new m6(this)},vX(t1n,"LPort/CombineIter",1283),wAn(201,1,QWn,m6),MWn.Nb=function(n){fU(this,n)},MWn.Qb=function(){uE()},MWn.Ob=function(){return zN(this)},MWn.Pb=function(){return y$(this.a)?n0(this.a):n0(this.b)},vX(t1n,"LPort/CombineIter/1",201),wAn(1285,1,qJn,Bt),MWn.Lb=function(n){return Az(n)},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return gcn(),0!=BB(n,11).e.c.length},vX(t1n,"LPort/lambda$0$Type",1285),wAn(1284,1,qJn,Ht),MWn.Lb=function(n){return $z(n)},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return gcn(),0!=BB(n,11).g.c.length},vX(t1n,"LPort/lambda$1$Type",1284),wAn(1286,1,qJn,qt),MWn.Lb=function(n){return gcn(),BB(n,11).j==(kUn(),sIt)},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return gcn(),BB(n,11).j==(kUn(),sIt)},vX(t1n,"LPort/lambda$2$Type",1286),wAn(1287,1,qJn,Gt),MWn.Lb=function(n){return gcn(),BB(n,11).j==(kUn(),oIt)},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return gcn(),BB(n,11).j==(kUn(),oIt)},vX(t1n,"LPort/lambda$3$Type",1287),wAn(1288,1,qJn,zt),MWn.Lb=function(n){return gcn(),BB(n,11).j==(kUn(),SIt)},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return gcn(),BB(n,11).j==(kUn(),SIt)},vX(t1n,"LPort/lambda$4$Type",1288),wAn(1289,1,qJn,Ut),MWn.Lb=function(n){return gcn(),BB(n,11).j==(kUn(),CIt)},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return gcn(),BB(n,11).j==(kUn(),CIt)},vX(t1n,"LPort/lambda$5$Type",1289),wAn(29,299,{3:1,20:1,299:1,29:1,94:1,134:1},HX),MWn.Jc=function(n){e5(this,n)},MWn.Kc=function(){return new Wb(this.a)},MWn.Ib=function(){return"L_"+E7(this.b.b,this,0)+LMn(this.a)},vX(t1n,"Layer",29),wAn(1342,1,{},tm),vX(d1n,g1n,1342),wAn(1346,1,{},Xt),MWn.Kb=function(n){return PTn(BB(n,82))},vX(d1n,"ElkGraphImporter/0methodref$connectableShapeToNode$Type",1346),wAn(1349,1,{},Wt),MWn.Kb=function(n){return PTn(BB(n,82))},vX(d1n,"ElkGraphImporter/1methodref$connectableShapeToNode$Type",1349),wAn(1343,1,lVn,Uw),MWn.td=function(n){POn(this.a,BB(n,118))},vX(d1n,p1n,1343),wAn(1344,1,lVn,Xw),MWn.td=function(n){POn(this.a,BB(n,118))},vX(d1n,v1n,1344),wAn(1345,1,{},Vt),MWn.Kb=function(n){return new Rq(null,new w1(pV(BB(n,79)),16))},vX(d1n,m1n,1345),wAn(1347,1,DVn,Ww),MWn.Mb=function(n){return _A(this.a,BB(n,33))},vX(d1n,y1n,1347),wAn(1348,1,{},Qt),MWn.Kb=function(n){return new Rq(null,new w1(vV(BB(n,79)),16))},vX(d1n,"ElkGraphImporter/lambda$5$Type",1348),wAn(1350,1,DVn,Vw),MWn.Mb=function(n){return FA(this.a,BB(n,33))},vX(d1n,"ElkGraphImporter/lambda$7$Type",1350),wAn(1351,1,DVn,Jt),MWn.Mb=function(n){return AQ(BB(n,79))},vX(d1n,"ElkGraphImporter/lambda$8$Type",1351),wAn(1278,1,{},Qh),vX(d1n,"ElkGraphLayoutTransferrer",1278),wAn(1279,1,DVn,Qw),MWn.Mb=function(n){return YR(this.a,BB(n,17))},vX(d1n,"ElkGraphLayoutTransferrer/lambda$0$Type",1279),wAn(1280,1,lVn,Jw),MWn.td=function(n){mM(),WB(this.a,BB(n,17))},vX(d1n,"ElkGraphLayoutTransferrer/lambda$1$Type",1280),wAn(1281,1,DVn,Yw),MWn.Mb=function(n){return UD(this.a,BB(n,17))},vX(d1n,"ElkGraphLayoutTransferrer/lambda$2$Type",1281),wAn(1282,1,lVn,Zw),MWn.td=function(n){mM(),WB(this.a,BB(n,17))},vX(d1n,"ElkGraphLayoutTransferrer/lambda$3$Type",1282),wAn(1485,1,n1n,Yt),MWn.pf=function(n,t){Vrn(BB(n,37),t)},vX(j1n,"CommentNodeMarginCalculator",1485),wAn(1486,1,{},Zt),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,29).a,16))},vX(j1n,"CommentNodeMarginCalculator/lambda$0$Type",1486),wAn(1487,1,lVn,ne),MWn.td=function(n){tHn(BB(n,10))},vX(j1n,"CommentNodeMarginCalculator/lambda$1$Type",1487),wAn(1488,1,n1n,te),MWn.pf=function(n,t){aDn(BB(n,37),t)},vX(j1n,"CommentPostprocessor",1488),wAn(1489,1,n1n,ee),MWn.pf=function(n,t){uUn(BB(n,37),t)},vX(j1n,"CommentPreprocessor",1489),wAn(1490,1,n1n,ie),MWn.pf=function(n,t){jLn(BB(n,37),t)},vX(j1n,"ConstraintsPostprocessor",1490),wAn(1491,1,n1n,re),MWn.pf=function(n,t){can(BB(n,37),t)},vX(j1n,"EdgeAndLayerConstraintEdgeReverser",1491),wAn(1492,1,n1n,ce),MWn.pf=function(n,t){Gwn(BB(n,37),t)},vX(j1n,"EndLabelPostprocessor",1492),wAn(1493,1,{},ae),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,29).a,16))},vX(j1n,"EndLabelPostprocessor/lambda$0$Type",1493),wAn(1494,1,DVn,ue),MWn.Mb=function(n){return MJ(BB(n,10))},vX(j1n,"EndLabelPostprocessor/lambda$1$Type",1494),wAn(1495,1,lVn,oe),MWn.td=function(n){ejn(BB(n,10))},vX(j1n,"EndLabelPostprocessor/lambda$2$Type",1495),wAn(1496,1,n1n,se),MWn.pf=function(n,t){ZPn(BB(n,37),t)},vX(j1n,"EndLabelPreprocessor",1496),wAn(1497,1,{},he),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,29).a,16))},vX(j1n,"EndLabelPreprocessor/lambda$0$Type",1497),wAn(1498,1,lVn,D_),MWn.td=function(n){KM(this.a,this.b,this.c,BB(n,10))},MWn.a=0,MWn.b=0,MWn.c=!1,vX(j1n,"EndLabelPreprocessor/lambda$1$Type",1498),wAn(1499,1,DVn,fe),MWn.Mb=function(n){return GI(mMn(BB(n,70),(HXn(),Jdt)))===GI((Rtn(),XPt))},vX(j1n,"EndLabelPreprocessor/lambda$2$Type",1499),wAn(1500,1,lVn,nd),MWn.td=function(n){DH(this.a,BB(n,70))},vX(j1n,"EndLabelPreprocessor/lambda$3$Type",1500),wAn(1501,1,DVn,le),MWn.Mb=function(n){return GI(mMn(BB(n,70),(HXn(),Jdt)))===GI((Rtn(),UPt))},vX(j1n,"EndLabelPreprocessor/lambda$4$Type",1501),wAn(1502,1,lVn,td),MWn.td=function(n){DH(this.a,BB(n,70))},vX(j1n,"EndLabelPreprocessor/lambda$5$Type",1502),wAn(1551,1,n1n,Vh),MWn.pf=function(n,t){Cln(BB(n,37),t)},vX(j1n,"EndLabelSorter",1551),wAn(1552,1,MJn,be),MWn.ue=function(n,t){return Hgn(BB(n,456),BB(t,456))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(j1n,"EndLabelSorter/1",1552),wAn(456,1,{456:1},TQ),vX(j1n,"EndLabelSorter/LabelGroup",456),wAn(1553,1,{},we),MWn.Kb=function(n){return EM(),new Rq(null,new w1(BB(n,29).a,16))},vX(j1n,"EndLabelSorter/lambda$0$Type",1553),wAn(1554,1,DVn,de),MWn.Mb=function(n){return EM(),BB(n,10).k==(uSn(),Cut)},vX(j1n,"EndLabelSorter/lambda$1$Type",1554),wAn(1555,1,lVn,ge),MWn.td=function(n){oSn(BB(n,10))},vX(j1n,"EndLabelSorter/lambda$2$Type",1555),wAn(1556,1,DVn,pe),MWn.Mb=function(n){return EM(),GI(mMn(BB(n,70),(HXn(),Jdt)))===GI((Rtn(),UPt))},vX(j1n,"EndLabelSorter/lambda$3$Type",1556),wAn(1557,1,DVn,ve),MWn.Mb=function(n){return EM(),GI(mMn(BB(n,70),(HXn(),Jdt)))===GI((Rtn(),XPt))},vX(j1n,"EndLabelSorter/lambda$4$Type",1557),wAn(1503,1,n1n,me),MWn.pf=function(n,t){IHn(this,BB(n,37))},MWn.b=0,MWn.c=0,vX(j1n,"FinalSplineBendpointsCalculator",1503),wAn(1504,1,{},ye),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,29).a,16))},vX(j1n,"FinalSplineBendpointsCalculator/lambda$0$Type",1504),wAn(1505,1,{},ke),MWn.Kb=function(n){return new Rq(null,new zU(new oz(ZL(lbn(BB(n,10)).a.Kc(),new h))))},vX(j1n,"FinalSplineBendpointsCalculator/lambda$1$Type",1505),wAn(1506,1,DVn,je),MWn.Mb=function(n){return!b5(BB(n,17))},vX(j1n,"FinalSplineBendpointsCalculator/lambda$2$Type",1506),wAn(1507,1,DVn,Ee),MWn.Mb=function(n){return Lx(BB(n,17),(hWn(),Nlt))},vX(j1n,"FinalSplineBendpointsCalculator/lambda$3$Type",1507),wAn(1508,1,lVn,ed),MWn.td=function(n){zKn(this.a,BB(n,128))},vX(j1n,"FinalSplineBendpointsCalculator/lambda$4$Type",1508),wAn(1509,1,lVn,Te),MWn.td=function(n){YPn(BB(n,17).a)},vX(j1n,"FinalSplineBendpointsCalculator/lambda$5$Type",1509),wAn(792,1,n1n,id),MWn.pf=function(n,t){Vqn(this,BB(n,37),t)},vX(j1n,"GraphTransformer",792),wAn(511,22,{3:1,35:1,22:1,511:1},ZS);var zut,Uut,Xut,Wut=Ben(j1n,"GraphTransformer/Mode",511,Unt,uY,tB);wAn(1510,1,n1n,Me),MWn.pf=function(n,t){exn(BB(n,37),t)},vX(j1n,"HierarchicalNodeResizingProcessor",1510),wAn(1511,1,n1n,Se),MWn.pf=function(n,t){lrn(BB(n,37),t)},vX(j1n,"HierarchicalPortConstraintProcessor",1511),wAn(1512,1,MJn,Pe),MWn.ue=function(n,t){return Ipn(BB(n,10),BB(t,10))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(j1n,"HierarchicalPortConstraintProcessor/NodeComparator",1512),wAn(1513,1,n1n,Ce),MWn.pf=function(n,t){jBn(BB(n,37),t)},vX(j1n,"HierarchicalPortDummySizeProcessor",1513),wAn(1514,1,n1n,Ie),MWn.pf=function(n,t){YDn(this,BB(n,37),t)},MWn.a=0,vX(j1n,"HierarchicalPortOrthogonalEdgeRouter",1514),wAn(1515,1,MJn,Oe),MWn.ue=function(n,t){return _N(BB(n,10),BB(t,10))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(j1n,"HierarchicalPortOrthogonalEdgeRouter/1",1515),wAn(1516,1,MJn,Ae),MWn.ue=function(n,t){return P9(BB(n,10),BB(t,10))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(j1n,"HierarchicalPortOrthogonalEdgeRouter/2",1516),wAn(1517,1,n1n,$e),MWn.pf=function(n,t){EMn(BB(n,37),t)},vX(j1n,"HierarchicalPortPositionProcessor",1517),wAn(1518,1,n1n,Jh),MWn.pf=function(n,t){rXn(this,BB(n,37))},MWn.a=0,MWn.c=0,vX(j1n,"HighDegreeNodeLayeringProcessor",1518),wAn(571,1,{571:1},Le),MWn.b=-1,MWn.d=-1,vX(j1n,"HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation",571),wAn(1519,1,{},Ne),MWn.Kb=function(n){return q_(),fbn(BB(n,10))},MWn.Fb=function(n){return this===n},vX(j1n,"HighDegreeNodeLayeringProcessor/lambda$0$Type",1519),wAn(1520,1,{},xe),MWn.Kb=function(n){return q_(),lbn(BB(n,10))},MWn.Fb=function(n){return this===n},vX(j1n,"HighDegreeNodeLayeringProcessor/lambda$1$Type",1520),wAn(1526,1,n1n,De),MWn.pf=function(n,t){dFn(this,BB(n,37),t)},vX(j1n,"HyperedgeDummyMerger",1526),wAn(793,1,{},R_),MWn.a=!1,MWn.b=!1,MWn.c=!1,vX(j1n,"HyperedgeDummyMerger/MergeState",793),wAn(1527,1,{},Re),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,29).a,16))},vX(j1n,"HyperedgeDummyMerger/lambda$0$Type",1527),wAn(1528,1,{},Ke),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,10).j,16))},vX(j1n,"HyperedgeDummyMerger/lambda$1$Type",1528),wAn(1529,1,lVn,_e),MWn.td=function(n){BB(n,11).p=-1},vX(j1n,"HyperedgeDummyMerger/lambda$2$Type",1529),wAn(1530,1,n1n,Fe),MWn.pf=function(n,t){bFn(BB(n,37),t)},vX(j1n,"HypernodesProcessor",1530),wAn(1531,1,n1n,Be),MWn.pf=function(n,t){wFn(BB(n,37),t)},vX(j1n,"InLayerConstraintProcessor",1531),wAn(1532,1,n1n,He),MWn.pf=function(n,t){Lcn(BB(n,37),t)},vX(j1n,"InnermostNodeMarginCalculator",1532),wAn(1533,1,n1n,qe),MWn.pf=function(n,t){Vzn(this,BB(n,37))},MWn.a=KQn,MWn.b=KQn,MWn.c=RQn,MWn.d=RQn;var Vut,Qut,Jut,Yut,Zut,not,tot,eot,iot,rot,cot,aot,uot,oot,sot,hot,fot,lot,bot,wot,dot,got,pot,vot,mot,yot,kot,jot,Eot,Tot,Mot,Sot,Pot,Cot,Iot,Oot,Aot,$ot,Lot,Not,xot,Dot,Rot,Kot,_ot,Fot,Bot,Hot,qot,Got,zot,Uot,Xot,Wot,Vot,Qot,Jot,Yot=vX(j1n,"InteractiveExternalPortPositioner",1533);wAn(1534,1,{},Ge),MWn.Kb=function(n){return BB(n,17).d.i},MWn.Fb=function(n){return this===n},vX(j1n,"InteractiveExternalPortPositioner/lambda$0$Type",1534),wAn(1535,1,{},rd),MWn.Kb=function(n){return qN(this.a,MD(n))},MWn.Fb=function(n){return this===n},vX(j1n,"InteractiveExternalPortPositioner/lambda$1$Type",1535),wAn(1536,1,{},ze),MWn.Kb=function(n){return BB(n,17).c.i},MWn.Fb=function(n){return this===n},vX(j1n,"InteractiveExternalPortPositioner/lambda$2$Type",1536),wAn(1537,1,{},cd),MWn.Kb=function(n){return GN(this.a,MD(n))},MWn.Fb=function(n){return this===n},vX(j1n,"InteractiveExternalPortPositioner/lambda$3$Type",1537),wAn(1538,1,{},ad),MWn.Kb=function(n){return WR(this.a,MD(n))},MWn.Fb=function(n){return this===n},vX(j1n,"InteractiveExternalPortPositioner/lambda$4$Type",1538),wAn(1539,1,{},ud),MWn.Kb=function(n){return VR(this.a,MD(n))},MWn.Fb=function(n){return this===n},vX(j1n,"InteractiveExternalPortPositioner/lambda$5$Type",1539),wAn(77,22,{3:1,35:1,22:1,77:1,234:1},nP),MWn.Kf=function(){switch(this.g){case 15:return new dc;case 22:return new gc;case 47:return new mc;case 28:case 35:return new ei;case 32:return new Yt;case 42:return new te;case 1:return new ee;case 41:return new ie;case 56:return new id((Srn(),qut));case 0:return new id((Srn(),Hut));case 2:return new re;case 54:return new ce;case 33:return new se;case 51:return new me;case 55:return new Me;case 13:return new Se;case 38:return new Ce;case 44:return new Ie;case 40:return new $e;case 9:return new Jh;case 49:return new ox;case 37:return new De;case 43:return new Fe;case 27:return new Be;case 30:return new He;case 3:return new qe;case 18:return new Xe;case 29:return new We;case 5:return new Yh;case 50:return new Ue;case 34:return new Zh;case 36:return new ii;case 52:return new Vh;case 11:return new ci;case 7:return new tf;case 39:return new ai;case 45:return new ui;case 16:return new oi;case 10:return new si;case 48:return new fi;case 21:return new li;case 23:return new Ny((oin(),Amt));case 8:return new wi;case 12:return new gi;case 4:return new pi;case 19:return new af;case 17:return new Pi;case 53:return new Ci;case 6:return new Bi;case 25:return new am;case 46:return new Ni;case 31:return new xR;case 14:return new Vi;case 26:return new Sc;case 20:return new nr;case 24:return new Ny((oin(),$mt));default:throw Hp(new _y(M1n+(null!=this.f?this.f:""+this.g)))}};var Zot,nst,tst,est,ist,rst,cst,ast,ust=Ben(j1n,S1n,77,Unt,ENn,nB);wAn(1540,1,n1n,Xe),MWn.pf=function(n,t){Yzn(BB(n,37),t)},vX(j1n,"InvertedPortProcessor",1540),wAn(1541,1,n1n,We),MWn.pf=function(n,t){LKn(BB(n,37),t)},vX(j1n,"LabelAndNodeSizeProcessor",1541),wAn(1542,1,DVn,Ve),MWn.Mb=function(n){return BB(n,10).k==(uSn(),Cut)},vX(j1n,"LabelAndNodeSizeProcessor/lambda$0$Type",1542),wAn(1543,1,DVn,Qe),MWn.Mb=function(n){return BB(n,10).k==(uSn(),Mut)},vX(j1n,"LabelAndNodeSizeProcessor/lambda$1$Type",1543),wAn(1544,1,lVn,K_),MWn.td=function(n){_M(this.b,this.a,this.c,BB(n,10))},MWn.a=!1,MWn.c=!1,vX(j1n,"LabelAndNodeSizeProcessor/lambda$2$Type",1544),wAn(1545,1,n1n,Yh),MWn.pf=function(n,t){fzn(BB(n,37),t)},vX(j1n,"LabelDummyInserter",1545),wAn(1546,1,qJn,Je),MWn.Lb=function(n){return GI(mMn(BB(n,70),(HXn(),Jdt)))===GI((Rtn(),zPt))},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return GI(mMn(BB(n,70),(HXn(),Jdt)))===GI((Rtn(),zPt))},vX(j1n,"LabelDummyInserter/1",1546),wAn(1547,1,n1n,Ue),MWn.pf=function(n,t){Pqn(BB(n,37),t)},vX(j1n,"LabelDummyRemover",1547),wAn(1548,1,DVn,Ye),MWn.Mb=function(n){return qy(TD(mMn(BB(n,70),(HXn(),Qdt))))},vX(j1n,"LabelDummyRemover/lambda$0$Type",1548),wAn(1359,1,n1n,Zh),MWn.pf=function(n,t){TGn(this,BB(n,37),t)},MWn.a=null,vX(j1n,"LabelDummySwitcher",1359),wAn(286,1,{286:1},cKn),MWn.c=0,MWn.d=null,MWn.f=0,vX(j1n,"LabelDummySwitcher/LabelDummyInfo",286),wAn(1360,1,{},Ze),MWn.Kb=function(n){return Irn(),new Rq(null,new w1(BB(n,29).a,16))},vX(j1n,"LabelDummySwitcher/lambda$0$Type",1360),wAn(1361,1,DVn,ni),MWn.Mb=function(n){return Irn(),BB(n,10).k==(uSn(),Sut)},vX(j1n,"LabelDummySwitcher/lambda$1$Type",1361),wAn(1362,1,{},hd),MWn.Kb=function(n){return XD(this.a,BB(n,10))},vX(j1n,"LabelDummySwitcher/lambda$2$Type",1362),wAn(1363,1,lVn,fd),MWn.td=function(n){JX(this.a,BB(n,286))},vX(j1n,"LabelDummySwitcher/lambda$3$Type",1363),wAn(1364,1,MJn,ti),MWn.ue=function(n,t){return Lz(BB(n,286),BB(t,286))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(j1n,"LabelDummySwitcher/lambda$4$Type",1364),wAn(791,1,n1n,ei),MWn.pf=function(n,t){J6(BB(n,37),t)},vX(j1n,"LabelManagementProcessor",791),wAn(1549,1,n1n,ii),MWn.pf=function(n,t){Nxn(BB(n,37),t)},vX(j1n,"LabelSideSelector",1549),wAn(1550,1,DVn,ri),MWn.Mb=function(n){return qy(TD(mMn(BB(n,70),(HXn(),Qdt))))},vX(j1n,"LabelSideSelector/lambda$0$Type",1550),wAn(1558,1,n1n,ci),MWn.pf=function(n,t){EBn(BB(n,37),t)},vX(j1n,"LayerConstraintPostprocessor",1558),wAn(1559,1,n1n,tf),MWn.pf=function(n,t){r$n(BB(n,37),t)},vX(j1n,"LayerConstraintPreprocessor",1559),wAn(360,22,{3:1,35:1,22:1,360:1},tP);var ost,sst,hst,fst,lst,bst,wst,dst,gst,pst=Ben(j1n,"LayerConstraintPreprocessor/HiddenNodeConnections",360,Unt,e3,z_);wAn(1560,1,n1n,ai),MWn.pf=function(n,t){Eqn(BB(n,37),t)},vX(j1n,"LayerSizeAndGraphHeightCalculator",1560),wAn(1561,1,n1n,ui),MWn.pf=function(n,t){ALn(BB(n,37),t)},vX(j1n,"LongEdgeJoiner",1561),wAn(1562,1,n1n,oi),MWn.pf=function(n,t){WHn(BB(n,37),t)},vX(j1n,"LongEdgeSplitter",1562),wAn(1563,1,n1n,si),MWn.pf=function(n,t){PGn(this,BB(n,37),t)},MWn.d=0,MWn.e=0,MWn.i=0,MWn.j=0,MWn.k=0,MWn.n=0,vX(j1n,"NodePromotion",1563),wAn(1564,1,{},hi),MWn.Kb=function(n){return BB(n,46),hN(),!0},MWn.Fb=function(n){return this===n},vX(j1n,"NodePromotion/lambda$0$Type",1564),wAn(1565,1,{},od),MWn.Kb=function(n){return aV(this.a,BB(n,46))},MWn.Fb=function(n){return this===n},MWn.a=0,vX(j1n,"NodePromotion/lambda$1$Type",1565),wAn(1566,1,{},sd),MWn.Kb=function(n){return uV(this.a,BB(n,46))},MWn.Fb=function(n){return this===n},MWn.a=0,vX(j1n,"NodePromotion/lambda$2$Type",1566),wAn(1567,1,n1n,fi),MWn.pf=function(n,t){XUn(BB(n,37),t)},vX(j1n,"NorthSouthPortPostprocessor",1567),wAn(1568,1,n1n,li),MWn.pf=function(n,t){MUn(BB(n,37),t)},vX(j1n,"NorthSouthPortPreprocessor",1568),wAn(1569,1,MJn,bi),MWn.ue=function(n,t){return Zan(BB(n,11),BB(t,11))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(j1n,"NorthSouthPortPreprocessor/lambda$0$Type",1569),wAn(1570,1,n1n,wi),MWn.pf=function(n,t){$_n(BB(n,37),t)},vX(j1n,"PartitionMidprocessor",1570),wAn(1571,1,DVn,di),MWn.Mb=function(n){return Lx(BB(n,10),(HXn(),Wgt))},vX(j1n,"PartitionMidprocessor/lambda$0$Type",1571),wAn(1572,1,lVn,ld),MWn.td=function(n){$Q(this.a,BB(n,10))},vX(j1n,"PartitionMidprocessor/lambda$1$Type",1572),wAn(1573,1,n1n,gi),MWn.pf=function(n,t){wNn(BB(n,37),t)},vX(j1n,"PartitionPostprocessor",1573),wAn(1574,1,n1n,pi),MWn.pf=function(n,t){NOn(BB(n,37),t)},vX(j1n,"PartitionPreprocessor",1574),wAn(1575,1,DVn,vi),MWn.Mb=function(n){return Lx(BB(n,10),(HXn(),Wgt))},vX(j1n,"PartitionPreprocessor/lambda$0$Type",1575),wAn(1576,1,{},mi),MWn.Kb=function(n){return new Rq(null,new zU(new oz(ZL(lbn(BB(n,10)).a.Kc(),new h))))},vX(j1n,"PartitionPreprocessor/lambda$1$Type",1576),wAn(1577,1,DVn,yi),MWn.Mb=function(n){return Lgn(BB(n,17))},vX(j1n,"PartitionPreprocessor/lambda$2$Type",1577),wAn(1578,1,lVn,ki),MWn.td=function(n){Run(BB(n,17))},vX(j1n,"PartitionPreprocessor/lambda$3$Type",1578),wAn(1579,1,n1n,af),MWn.pf=function(n,t){u_n(BB(n,37),t)},vX(j1n,"PortListSorter",1579),wAn(1580,1,{},ji),MWn.Kb=function(n){return zsn(),BB(n,11).e},vX(j1n,"PortListSorter/lambda$0$Type",1580),wAn(1581,1,{},Ei),MWn.Kb=function(n){return zsn(),BB(n,11).g},vX(j1n,"PortListSorter/lambda$1$Type",1581),wAn(1582,1,MJn,Ti),MWn.ue=function(n,t){return T4(BB(n,11),BB(t,11))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(j1n,"PortListSorter/lambda$2$Type",1582),wAn(1583,1,MJn,Mi),MWn.ue=function(n,t){return Oyn(BB(n,11),BB(t,11))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(j1n,"PortListSorter/lambda$3$Type",1583),wAn(1584,1,MJn,Si),MWn.ue=function(n,t){return nFn(BB(n,11),BB(t,11))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(j1n,"PortListSorter/lambda$4$Type",1584),wAn(1585,1,n1n,Pi),MWn.pf=function(n,t){WAn(BB(n,37),t)},vX(j1n,"PortSideProcessor",1585),wAn(1586,1,n1n,Ci),MWn.pf=function(n,t){IRn(BB(n,37),t)},vX(j1n,"ReversedEdgeRestorer",1586),wAn(1591,1,n1n,am),MWn.pf=function(n,t){Jmn(this,BB(n,37),t)},vX(j1n,"SelfLoopPortRestorer",1591),wAn(1592,1,{},Ii),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,29).a,16))},vX(j1n,"SelfLoopPortRestorer/lambda$0$Type",1592),wAn(1593,1,DVn,Oi),MWn.Mb=function(n){return BB(n,10).k==(uSn(),Cut)},vX(j1n,"SelfLoopPortRestorer/lambda$1$Type",1593),wAn(1594,1,DVn,Ai),MWn.Mb=function(n){return Lx(BB(n,10),(hWn(),Olt))},vX(j1n,"SelfLoopPortRestorer/lambda$2$Type",1594),wAn(1595,1,{},$i),MWn.Kb=function(n){return BB(mMn(BB(n,10),(hWn(),Olt)),403)},vX(j1n,"SelfLoopPortRestorer/lambda$3$Type",1595),wAn(1596,1,lVn,bd),MWn.td=function(n){SSn(this.a,BB(n,403))},vX(j1n,"SelfLoopPortRestorer/lambda$4$Type",1596),wAn(794,1,lVn,Li),MWn.td=function(n){nPn(BB(n,101))},vX(j1n,"SelfLoopPortRestorer/lambda$5$Type",794),wAn(1597,1,n1n,Ni),MWn.pf=function(n,t){Lpn(BB(n,37),t)},vX(j1n,"SelfLoopPostProcessor",1597),wAn(1598,1,{},xi),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,29).a,16))},vX(j1n,"SelfLoopPostProcessor/lambda$0$Type",1598),wAn(1599,1,DVn,Di),MWn.Mb=function(n){return BB(n,10).k==(uSn(),Cut)},vX(j1n,"SelfLoopPostProcessor/lambda$1$Type",1599),wAn(1600,1,DVn,Ri),MWn.Mb=function(n){return Lx(BB(n,10),(hWn(),Olt))},vX(j1n,"SelfLoopPostProcessor/lambda$2$Type",1600),wAn(1601,1,lVn,Ki),MWn.td=function(n){Ljn(BB(n,10))},vX(j1n,"SelfLoopPostProcessor/lambda$3$Type",1601),wAn(1602,1,{},_i),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,101).f,1))},vX(j1n,"SelfLoopPostProcessor/lambda$4$Type",1602),wAn(1603,1,lVn,wd),MWn.td=function(n){a3(this.a,BB(n,409))},vX(j1n,"SelfLoopPostProcessor/lambda$5$Type",1603),wAn(1604,1,DVn,Fi),MWn.Mb=function(n){return!!BB(n,101).i},vX(j1n,"SelfLoopPostProcessor/lambda$6$Type",1604),wAn(1605,1,lVn,dd),MWn.td=function(n){Ty(this.a,BB(n,101))},vX(j1n,"SelfLoopPostProcessor/lambda$7$Type",1605),wAn(1587,1,n1n,Bi),MWn.pf=function(n,t){Z$n(BB(n,37),t)},vX(j1n,"SelfLoopPreProcessor",1587),wAn(1588,1,{},Hi),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,101).f,1))},vX(j1n,"SelfLoopPreProcessor/lambda$0$Type",1588),wAn(1589,1,{},qi),MWn.Kb=function(n){return BB(n,409).a},vX(j1n,"SelfLoopPreProcessor/lambda$1$Type",1589),wAn(1590,1,lVn,Gi),MWn.td=function(n){q$(BB(n,17))},vX(j1n,"SelfLoopPreProcessor/lambda$2$Type",1590),wAn(1606,1,n1n,xR),MWn.pf=function(n,t){sSn(this,BB(n,37),t)},vX(j1n,"SelfLoopRouter",1606),wAn(1607,1,{},zi),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,29).a,16))},vX(j1n,"SelfLoopRouter/lambda$0$Type",1607),wAn(1608,1,DVn,Ui),MWn.Mb=function(n){return BB(n,10).k==(uSn(),Cut)},vX(j1n,"SelfLoopRouter/lambda$1$Type",1608),wAn(1609,1,DVn,Xi),MWn.Mb=function(n){return Lx(BB(n,10),(hWn(),Olt))},vX(j1n,"SelfLoopRouter/lambda$2$Type",1609),wAn(1610,1,{},Wi),MWn.Kb=function(n){return BB(mMn(BB(n,10),(hWn(),Olt)),403)},vX(j1n,"SelfLoopRouter/lambda$3$Type",1610),wAn(1611,1,lVn,eP),MWn.td=function(n){QV(this.a,this.b,BB(n,403))},vX(j1n,"SelfLoopRouter/lambda$4$Type",1611),wAn(1612,1,n1n,Vi),MWn.pf=function(n,t){fxn(BB(n,37),t)},vX(j1n,"SemiInteractiveCrossMinProcessor",1612),wAn(1613,1,DVn,Qi),MWn.Mb=function(n){return BB(n,10).k==(uSn(),Cut)},vX(j1n,"SemiInteractiveCrossMinProcessor/lambda$0$Type",1613),wAn(1614,1,DVn,Ji),MWn.Mb=function(n){return Gq(BB(n,10))._b((HXn(),spt))},vX(j1n,"SemiInteractiveCrossMinProcessor/lambda$1$Type",1614),wAn(1615,1,MJn,Yi),MWn.ue=function(n,t){return drn(BB(n,10),BB(t,10))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(j1n,"SemiInteractiveCrossMinProcessor/lambda$2$Type",1615),wAn(1616,1,{},Zi),MWn.Ce=function(n,t){return XQ(BB(n,10),BB(t,10))},vX(j1n,"SemiInteractiveCrossMinProcessor/lambda$3$Type",1616),wAn(1618,1,n1n,nr),MWn.pf=function(n,t){MBn(BB(n,37),t)},vX(j1n,"SortByInputModelProcessor",1618),wAn(1619,1,DVn,tr),MWn.Mb=function(n){return 0!=BB(n,11).g.c.length},vX(j1n,"SortByInputModelProcessor/lambda$0$Type",1619),wAn(1620,1,lVn,gd),MWn.td=function(n){fPn(this.a,BB(n,11))},vX(j1n,"SortByInputModelProcessor/lambda$1$Type",1620),wAn(1693,803,{},grn),MWn.Me=function(n){var t,e,i,r;switch(this.c=n,this.a.g){case 2:t=new Np,YT(AV(new Rq(null,new w1(this.c.a.b,16)),new dr),new uP(this,t)),pCn(this,new rr),Otn(t,new cr),t.c=x8(Ant,HWn,1,0,5,1),YT(AV(new Rq(null,new w1(this.c.a.b,16)),new ar),new vd(t)),pCn(this,new ur),Otn(t,new or),t.c=x8(Ant,HWn,1,0,5,1),e=j$(icn(LV(new Rq(null,new w1(this.c.a.b,16)),new md(this))),new sr),YT(new Rq(null,new w1(this.c.a.a,16)),new rP(e,t)),pCn(this,new fr),Otn(t,new er),t.c=x8(Ant,HWn,1,0,5,1);break;case 3:i=new Np,pCn(this,new ir),r=j$(icn(LV(new Rq(null,new w1(this.c.a.b,16)),new pd(this))),new hr),YT(AV(new Rq(null,new w1(this.c.a.b,16)),new lr),new aP(r,i)),pCn(this,new br),Otn(i,new wr),i.c=x8(Ant,HWn,1,0,5,1);break;default:throw Hp(new kv)}},MWn.b=0,vX(A1n,"EdgeAwareScanlineConstraintCalculation",1693),wAn(1694,1,qJn,ir),MWn.Lb=function(n){return cL(BB(n,57).g,145)},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return cL(BB(n,57).g,145)},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1694),wAn(1695,1,{},pd),MWn.Fe=function(n){return GCn(this.a,BB(n,57))},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1695),wAn(1703,1,RVn,iP),MWn.Vd=function(){Fkn(this.a,this.b,-1)},MWn.b=0,vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1703),wAn(1705,1,qJn,rr),MWn.Lb=function(n){return cL(BB(n,57).g,145)},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return cL(BB(n,57).g,145)},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1705),wAn(1706,1,lVn,cr),MWn.td=function(n){BB(n,365).Vd()},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1706),wAn(1707,1,DVn,ar),MWn.Mb=function(n){return cL(BB(n,57).g,10)},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1707),wAn(1709,1,lVn,vd),MWn.td=function(n){Ebn(this.a,BB(n,57))},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1709),wAn(1708,1,RVn,lP),MWn.Vd=function(){Fkn(this.b,this.a,-1)},MWn.a=0,vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1708),wAn(1710,1,qJn,ur),MWn.Lb=function(n){return cL(BB(n,57).g,10)},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return cL(BB(n,57).g,10)},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1710),wAn(1711,1,lVn,or),MWn.td=function(n){BB(n,365).Vd()},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1711),wAn(1712,1,{},md),MWn.Fe=function(n){return zCn(this.a,BB(n,57))},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1712),wAn(1713,1,{},sr),MWn.De=function(){return 0},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1713),wAn(1696,1,{},hr),MWn.De=function(){return 0},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1696),wAn(1715,1,lVn,rP),MWn.td=function(n){HG(this.a,this.b,BB(n,307))},MWn.a=0,vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1715),wAn(1714,1,RVn,cP),MWn.Vd=function(){VAn(this.a,this.b,-1)},MWn.b=0,vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1714),wAn(1716,1,qJn,fr),MWn.Lb=function(n){return BB(n,57),!0},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return BB(n,57),!0},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1716),wAn(1717,1,lVn,er),MWn.td=function(n){BB(n,365).Vd()},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1717),wAn(1697,1,DVn,lr),MWn.Mb=function(n){return cL(BB(n,57).g,10)},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1697),wAn(1699,1,lVn,aP),MWn.td=function(n){qG(this.a,this.b,BB(n,57))},MWn.a=0,vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1699),wAn(1698,1,RVn,bP),MWn.Vd=function(){Fkn(this.b,this.a,-1)},MWn.a=0,vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1698),wAn(1700,1,qJn,br),MWn.Lb=function(n){return BB(n,57),!0},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return BB(n,57),!0},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1700),wAn(1701,1,lVn,wr),MWn.td=function(n){BB(n,365).Vd()},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1701),wAn(1702,1,DVn,dr),MWn.Mb=function(n){return cL(BB(n,57).g,145)},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1702),wAn(1704,1,lVn,uP),MWn.td=function(n){Ttn(this.a,this.b,BB(n,57))},vX(A1n,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1704),wAn(1521,1,n1n,ox),MWn.pf=function(n,t){cqn(this,BB(n,37),t)},vX(A1n,"HorizontalGraphCompactor",1521),wAn(1522,1,{},yd),MWn.Oe=function(n,t){var e,i;return Z7(n,t)?0:(e=f2(n),i=f2(t),e&&e.k==(uSn(),Mut)||i&&i.k==(uSn(),Mut)?0:UN(BB(mMn(this.a.a,(hWn(),Alt)),304),e?e.k:(uSn(),Put),i?i.k:(uSn(),Put)))},MWn.Pe=function(n,t){var e,i;return Z7(n,t)?1:(e=f2(n),i=f2(t),XN(BB(mMn(this.a.a,(hWn(),Alt)),304),e?e.k:(uSn(),Put),i?i.k:(uSn(),Put)))},vX(A1n,"HorizontalGraphCompactor/1",1522),wAn(1523,1,{},gr),MWn.Ne=function(n,t){return MM(),0==n.a.i},vX(A1n,"HorizontalGraphCompactor/lambda$0$Type",1523),wAn(1524,1,{},kd),MWn.Ne=function(n,t){return _Q(this.a,n,t)},vX(A1n,"HorizontalGraphCompactor/lambda$1$Type",1524),wAn(1664,1,{},I7),vX(A1n,"LGraphToCGraphTransformer",1664),wAn(1672,1,DVn,pr),MWn.Mb=function(n){return null!=n},vX(A1n,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1672),wAn(1665,1,{},vr),MWn.Kb=function(n){return G_(),Bbn(mMn(BB(BB(n,57).g,10),(hWn(),dlt)))},vX(A1n,"LGraphToCGraphTransformer/lambda$0$Type",1665),wAn(1666,1,{},mr),MWn.Kb=function(n){return G_(),mfn(BB(BB(n,57).g,145))},vX(A1n,"LGraphToCGraphTransformer/lambda$1$Type",1666),wAn(1675,1,DVn,yr),MWn.Mb=function(n){return G_(),cL(BB(n,57).g,10)},vX(A1n,"LGraphToCGraphTransformer/lambda$10$Type",1675),wAn(1676,1,lVn,kr),MWn.td=function(n){KQ(BB(n,57))},vX(A1n,"LGraphToCGraphTransformer/lambda$11$Type",1676),wAn(1677,1,DVn,jr),MWn.Mb=function(n){return G_(),cL(BB(n,57).g,145)},vX(A1n,"LGraphToCGraphTransformer/lambda$12$Type",1677),wAn(1681,1,lVn,Er),MWn.td=function(n){vfn(BB(n,57))},vX(A1n,"LGraphToCGraphTransformer/lambda$13$Type",1681),wAn(1678,1,lVn,jd),MWn.td=function(n){uA(this.a,BB(n,8))},MWn.a=0,vX(A1n,"LGraphToCGraphTransformer/lambda$14$Type",1678),wAn(1679,1,lVn,Ed),MWn.td=function(n){sA(this.a,BB(n,110))},MWn.a=0,vX(A1n,"LGraphToCGraphTransformer/lambda$15$Type",1679),wAn(1680,1,lVn,Td),MWn.td=function(n){oA(this.a,BB(n,8))},MWn.a=0,vX(A1n,"LGraphToCGraphTransformer/lambda$16$Type",1680),wAn(1682,1,{},Tr),MWn.Kb=function(n){return G_(),new Rq(null,new zU(new oz(ZL(lbn(BB(n,10)).a.Kc(),new h))))},vX(A1n,"LGraphToCGraphTransformer/lambda$17$Type",1682),wAn(1683,1,DVn,Mr),MWn.Mb=function(n){return G_(),b5(BB(n,17))},vX(A1n,"LGraphToCGraphTransformer/lambda$18$Type",1683),wAn(1684,1,lVn,Md),MWn.td=function(n){Snn(this.a,BB(n,17))},vX(A1n,"LGraphToCGraphTransformer/lambda$19$Type",1684),wAn(1668,1,lVn,Sd),MWn.td=function(n){l0(this.a,BB(n,145))},vX(A1n,"LGraphToCGraphTransformer/lambda$2$Type",1668),wAn(1685,1,{},Sr),MWn.Kb=function(n){return G_(),new Rq(null,new w1(BB(n,29).a,16))},vX(A1n,"LGraphToCGraphTransformer/lambda$20$Type",1685),wAn(1686,1,{},Pr),MWn.Kb=function(n){return G_(),new Rq(null,new zU(new oz(ZL(lbn(BB(n,10)).a.Kc(),new h))))},vX(A1n,"LGraphToCGraphTransformer/lambda$21$Type",1686),wAn(1687,1,{},Cr),MWn.Kb=function(n){return G_(),BB(mMn(BB(n,17),(hWn(),Nlt)),15)},vX(A1n,"LGraphToCGraphTransformer/lambda$22$Type",1687),wAn(1688,1,DVn,Ir),MWn.Mb=function(n){return tx(BB(n,15))},vX(A1n,"LGraphToCGraphTransformer/lambda$23$Type",1688),wAn(1689,1,lVn,Pd),MWn.td=function(n){PCn(this.a,BB(n,15))},vX(A1n,"LGraphToCGraphTransformer/lambda$24$Type",1689),wAn(1667,1,lVn,oP),MWn.td=function(n){H3(this.a,this.b,BB(n,145))},vX(A1n,"LGraphToCGraphTransformer/lambda$3$Type",1667),wAn(1669,1,{},Or),MWn.Kb=function(n){return G_(),new Rq(null,new w1(BB(n,29).a,16))},vX(A1n,"LGraphToCGraphTransformer/lambda$4$Type",1669),wAn(1670,1,{},Ar),MWn.Kb=function(n){return G_(),new Rq(null,new zU(new oz(ZL(lbn(BB(n,10)).a.Kc(),new h))))},vX(A1n,"LGraphToCGraphTransformer/lambda$5$Type",1670),wAn(1671,1,{},$r),MWn.Kb=function(n){return G_(),BB(mMn(BB(n,17),(hWn(),Nlt)),15)},vX(A1n,"LGraphToCGraphTransformer/lambda$6$Type",1671),wAn(1673,1,lVn,Cd),MWn.td=function(n){KIn(this.a,BB(n,15))},vX(A1n,"LGraphToCGraphTransformer/lambda$8$Type",1673),wAn(1674,1,lVn,sP),MWn.td=function(n){x$(this.a,this.b,BB(n,145))},vX(A1n,"LGraphToCGraphTransformer/lambda$9$Type",1674),wAn(1663,1,{},Lr),MWn.Le=function(n){var t,e,i,r,c;for(this.a=n,this.d=new Fv,this.c=x8(qit,HWn,121,this.a.a.a.c.length,0,1),this.b=0,e=new Wb(this.a.a.a);e.a=g&&(WB(a,iln(f)),m=e.Math.max(m,y[f-1]-l),o+=d,p+=y[f-1]-p,l=y[f-1],d=s[f]),d=e.Math.max(d,s[f]),++f;o+=d}(w=e.Math.min(1/m,1/t.b/o))>r&&(r=w,i=a)}return i},MWn.Wf=function(){return!1},vX(_1n,"MSDCutIndexHeuristic",802),wAn(1617,1,n1n,Sc),MWn.pf=function(n,t){bBn(BB(n,37),t)},vX(_1n,"SingleEdgeGraphWrapper",1617),wAn(227,22,{3:1,35:1,22:1,227:1},jP);var rht,cht,aht,uht=Ben(F1n,"CenterEdgeLabelPlacementStrategy",227,Unt,Z8,W_);wAn(422,22,{3:1,35:1,22:1,422:1},EP);var oht,sht,hht,fht,lht=Ben(F1n,"ConstraintCalculationStrategy",422,Unt,GJ,V_);wAn(314,22,{3:1,35:1,22:1,314:1,246:1,234:1},TP),MWn.Kf=function(){return sIn(this)},MWn.Xf=function(){return sIn(this)};var bht,wht,dht,ght,pht=Ben(F1n,"CrossingMinimizationStrategy",314,Unt,T1,Q_);wAn(337,22,{3:1,35:1,22:1,337:1},MP);var vht,mht,yht,kht,jht,Eht,Tht=Ben(F1n,"CuttingStrategy",337,Unt,M1,Z_);wAn(335,22,{3:1,35:1,22:1,335:1,246:1,234:1},SP),MWn.Kf=function(){return RAn(this)},MWn.Xf=function(){return RAn(this)};var Mht,Sht,Pht,Cht=Ben(F1n,"CycleBreakingStrategy",335,Unt,L5,nF);wAn(419,22,{3:1,35:1,22:1,419:1},PP);var Iht,Oht,Aht,$ht,Lht=Ben(F1n,"DirectionCongruency",419,Unt,qJ,tF);wAn(450,22,{3:1,35:1,22:1,450:1},CP);var Nht,xht,Dht,Rht,Kht,_ht,Fht,Bht=Ben(F1n,"EdgeConstraint",450,Unt,S1,eF);wAn(276,22,{3:1,35:1,22:1,276:1},IP);var Hht,qht,Ght,zht=Ben(F1n,"EdgeLabelSideSelection",276,Unt,i9,iF);wAn(479,22,{3:1,35:1,22:1,479:1},OP);var Uht,Xht,Wht,Vht,Qht,Jht,Yht,Zht=Ben(F1n,"EdgeStraighteningStrategy",479,Unt,HJ,rF);wAn(274,22,{3:1,35:1,22:1,274:1},AP);var nft,tft,eft,ift,rft,cft,aft,uft=Ben(F1n,"FixedAlignment",274,Unt,t9,cF);wAn(275,22,{3:1,35:1,22:1,275:1},$P);var oft,sft,hft,fft,lft,bft,wft,dft,gft,pft,vft,mft=Ben(F1n,"GraphCompactionStrategy",275,Unt,n9,aF);wAn(256,22,{3:1,35:1,22:1,256:1},LP);var yft,kft,jft,Eft,Tft=Ben(F1n,"GraphProperties",256,Unt,bcn,uF);wAn(292,22,{3:1,35:1,22:1,292:1},NP);var Mft,Sft,Pft,Cft,Ift=Ben(F1n,"GreedySwitchType",292,Unt,I1,oF);wAn(303,22,{3:1,35:1,22:1,303:1},xP);var Oft,Aft,$ft,Lft=Ben(F1n,"InLayerConstraint",303,Unt,C1,sF);wAn(420,22,{3:1,35:1,22:1,420:1},DP);var Nft,xft,Dft,Rft,Kft,_ft,Fft,Bft,Hft,qft,Gft,zft,Uft,Xft,Wft,Vft,Qft,Jft,Yft,Zft,nlt,tlt,elt,ilt,rlt,clt,alt,ult,olt,slt,hlt,flt,llt,blt,wlt,dlt,glt,plt,vlt,mlt,ylt,klt,jlt,Elt,Tlt,Mlt,Slt,Plt,Clt,Ilt,Olt,Alt,$lt,Llt,Nlt,xlt,Dlt,Rlt,Klt,_lt,Flt,Blt,Hlt,qlt,Glt=Ben(F1n,"InteractiveReferencePoint",420,Unt,zJ,hF);wAn(163,22,{3:1,35:1,22:1,163:1},BP);var zlt,Ult,Xlt,Wlt,Vlt,Qlt,Jlt,Ylt,Zlt,nbt,tbt,ebt,ibt,rbt,cbt,abt,ubt,obt,sbt,hbt,fbt,lbt,bbt,wbt,dbt,gbt,pbt,vbt,mbt,ybt,kbt,jbt,Ebt,Tbt,Mbt,Sbt,Pbt,Cbt,Ibt,Obt,Abt,$bt,Lbt,Nbt,xbt,Dbt,Rbt,Kbt,_bt,Fbt,Bbt,Hbt,qbt,Gbt,zbt,Ubt,Xbt,Wbt,Vbt,Qbt,Jbt,Ybt,Zbt,nwt,twt,ewt,iwt,rwt,cwt,awt,uwt,owt,swt,hwt,fwt,lwt,bwt,wwt,dwt,gwt,pwt,vwt,mwt,ywt,kwt,jwt,Ewt,Twt,Mwt,Swt,Pwt,Cwt,Iwt,Owt,Awt,$wt,Lwt,Nwt,xwt,Dwt,Rwt,Kwt,_wt,Fwt,Bwt,Hwt,qwt,Gwt,zwt,Uwt,Xwt,Wwt,Vwt,Qwt,Jwt,Ywt,Zwt,ndt,tdt,edt,idt,rdt,cdt,adt,udt,odt,sdt,hdt,fdt,ldt,bdt,wdt,ddt,gdt,pdt,vdt,mdt,ydt,kdt,jdt,Edt,Tdt,Mdt,Sdt,Pdt,Cdt,Idt,Odt,Adt,$dt,Ldt,Ndt,xdt,Ddt,Rdt,Kdt,_dt,Fdt,Bdt,Hdt,qdt,Gdt,zdt,Udt,Xdt,Wdt,Vdt,Qdt,Jdt,Ydt,Zdt,ngt,tgt,egt,igt,rgt,cgt,agt,ugt,ogt,sgt,hgt,fgt,lgt,bgt,wgt,dgt,ggt,pgt,vgt,mgt,ygt,kgt,jgt,Egt,Tgt,Mgt,Sgt,Pgt,Cgt,Igt,Ogt,Agt,$gt,Lgt,Ngt,xgt,Dgt,Rgt,Kgt,_gt,Fgt,Bgt,Hgt,qgt,Ggt,zgt,Ugt,Xgt,Wgt,Vgt,Qgt,Jgt,Ygt,Zgt,npt,tpt,ept,ipt,rpt,cpt,apt,upt,opt,spt,hpt,fpt,lpt,bpt,wpt,dpt,gpt,ppt,vpt,mpt,ypt,kpt,jpt,Ept,Tpt,Mpt,Spt,Ppt,Cpt,Ipt,Opt,Apt,$pt,Lpt,Npt,xpt,Dpt,Rpt,Kpt,_pt,Fpt,Bpt,Hpt,qpt,Gpt,zpt,Upt,Xpt,Wpt,Vpt,Qpt,Jpt,Ypt,Zpt,nvt,tvt,evt,ivt=Ben(F1n,"LayerConstraint",163,Unt,D5,fF);wAn(848,1,QJn,hf),MWn.Qe=function(n){Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,U1n),""),"Direction Congruency"),"Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."),Pbt),(PPn(),gMt)),Lht),nbn((rpn(),hMt))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,X1n),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),(hN(),!1)),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,W1n),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),Qbt),gMt),Glt),nbn(hMt)))),a2(n,W1n,e0n,Ybt),a2(n,W1n,l0n,Jbt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,V1n),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,Q1n),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Pj(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,J1n),""),"Allow Non-Flow Ports To Switch Sides"),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),!1),wMt),ktt),nbn(fMt)),Pun(Gk(Qtt,1),sVn,2,6,["org.eclipse.elk.layered.northOrSouthPort"])))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,Y1n),""),"Port Sorting Strategy"),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),xwt),gMt),zvt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,Z1n),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),iln(7)),vMt),Att),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,n0n),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,t0n),""),"Generate Position and Layer IDs"),"If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,e0n),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),Mbt),gMt),Cht),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,i0n),f2n),"Node Layering Strategy"),"Strategy for node layering."),bwt),gMt),ovt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,r0n),f2n),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),iwt),gMt),ivt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,c0n),f2n),"Layer Choice Constraint"),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),iln(-1)),vMt),Att),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,a0n),f2n),"Layer ID"),"Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),iln(-1)),vMt),Att),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,u0n),l2n),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),iln(4)),vMt),Att),nbn(hMt)))),a2(n,u0n,i0n,awt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,o0n),l2n),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),iln(2)),vMt),Att),nbn(hMt)))),a2(n,o0n,i0n,owt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,s0n),b2n),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),fwt),gMt),Dvt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,h0n),b2n),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),iln(0)),vMt),Att),nbn(hMt)))),a2(n,h0n,s0n,null),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,f0n),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),iln(DWn)),vMt),Att),nbn(hMt)))),a2(n,f0n,i0n,nwt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,l0n),w2n),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),Ebt),gMt),pht),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,b0n),w2n),"Force Node Model Order"),"The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,w0n),w2n),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),dMt),Ptt),nbn(hMt)))),a2(n,w0n,d2n,pbt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,d0n),w2n),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),wMt),ktt),nbn(hMt)))),a2(n,d0n,l0n,kbt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,g0n),w2n),"Position Choice Constraint"),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),iln(-1)),vMt),Att),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,p0n),w2n),"Position ID"),"Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),iln(-1)),vMt),Att),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,v0n),g2n),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),iln(40)),vMt),Att),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,m0n),g2n),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),wbt),gMt),Ift),nbn(hMt)))),a2(n,m0n,l0n,dbt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,y0n),"crossingMinimization.greedySwitchHierarchical"),"Greedy Switch Crossing Minimization (hierarchical)"),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),hbt),gMt),Ift),nbn(hMt)))),a2(n,y0n,l0n,fbt),a2(n,y0n,d2n,lbt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,k0n),p2n),"Node Placement Strategy"),"Strategy for node placement."),Lwt),gMt),Avt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,j0n),p2n),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),wMt),ktt),nbn(hMt)))),a2(n,j0n,k0n,Ewt),a2(n,j0n,k0n,Twt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,E0n),v2n),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),pwt),gMt),Zht),nbn(hMt)))),a2(n,E0n,k0n,vwt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,T0n),v2n),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),ywt),gMt),uft),nbn(hMt)))),a2(n,T0n,k0n,kwt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,M0n),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),dMt),Ptt),nbn(hMt)))),a2(n,M0n,k0n,Swt),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,S0n),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),gMt),kvt),nbn(sMt)))),a2(n,S0n,k0n,Awt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,P0n),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),Iwt),gMt),kvt),nbn(hMt)))),a2(n,P0n,k0n,Owt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,C0n),m2n),"Self-Loop Distribution"),"Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."),xbt),gMt),nmt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,I0n),m2n),"Self-Loop Ordering"),"Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."),Rbt),gMt),cmt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,O0n),"edgeRouting.splines"),"Spline Routing Mode"),"Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."),_bt),gMt),hmt),nbn(hMt)))),a2(n,O0n,y2n,Fbt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,A0n),"edgeRouting.splines.sloppy"),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.2),dMt),Ptt),nbn(hMt)))),a2(n,A0n,y2n,Hbt),a2(n,A0n,O0n,qbt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,$0n),"edgeRouting.polyline"),"Sloped Edge Zone Width"),"Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."),2),dMt),Ptt),nbn(hMt)))),a2(n,$0n,y2n,Lbt),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,L0n),k2n),"Spacing Base Value"),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,N0n),k2n),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,x0n),k2n),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,D0n),k2n),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,R0n),j2n),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),iln(0)),vMt),Att),nbn(uMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,K0n),j2n),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),iln(0)),vMt),Att),nbn(uMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,_0n),j2n),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),iln(0)),vMt),Att),nbn(uMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,F0n),E2n),DYn),"Tries to further compact components (disconnected sub-graphs)."),!1),wMt),ktt),nbn(hMt)))),a2(n,F0n,kZn,!0),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,B0n),T2n),"Post Compaction Strategy"),M2n),Jlt),gMt),mft),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,H0n),T2n),"Post Compaction Constraint Calculation"),M2n),Vlt),gMt),lht),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,q0n),S2n),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,G0n),S2n),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),iln(16)),vMt),Att),nbn(hMt)))),a2(n,G0n,q0n,!0),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,z0n),S2n),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),iln(5)),vMt),Att),nbn(hMt)))),a2(n,z0n,q0n,!0),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,U0n),P2n),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),bdt),gMt),Smt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,X0n),P2n),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),dMt),Ptt),nbn(hMt)))),a2(n,X0n,U0n,Uwt),a2(n,X0n,U0n,Xwt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,W0n),P2n),"Correction Factor for Wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),dMt),Ptt),nbn(hMt)))),a2(n,W0n,U0n,Vwt),a2(n,W0n,U0n,Qwt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,V0n),C2n),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),idt),gMt),Tht),nbn(hMt)))),a2(n,V0n,U0n,rdt),a2(n,V0n,U0n,cdt),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,Q0n),C2n),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),mMt),Rnt),nbn(hMt)))),a2(n,Q0n,V0n,Ywt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,J0n),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),ndt),vMt),Att),nbn(hMt)))),a2(n,J0n,V0n,tdt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,Y0n),I2n),"Validification Strategy"),"When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."),vdt),gMt),dmt),nbn(hMt)))),a2(n,Y0n,U0n,mdt),a2(n,Y0n,U0n,ydt),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,Z0n),I2n),"Valid Indices for Wrapping"),null),mMt),Rnt),nbn(hMt)))),a2(n,Z0n,U0n,ddt),a2(n,Z0n,U0n,gdt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,n2n),O2n),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),wMt),ktt),nbn(hMt)))),a2(n,n2n,U0n,sdt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,t2n),O2n),"Distance Penalty When Improving Cuts"),null),2),dMt),Ptt),nbn(hMt)))),a2(n,t2n,U0n,udt),a2(n,t2n,n2n,!0),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,e2n),O2n),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),wMt),ktt),nbn(hMt)))),a2(n,e2n,U0n,fdt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,i2n),A2n),"Edge Label Side Selection"),"Method to decide on edge label sides."),Abt),gMt),zht),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,r2n),A2n),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),Ibt),gMt),uht),EG(hMt,Pun(Gk(jMt,1),$Vn,175,0,[oMt]))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,c2n),$2n),"Consider Model Order"),"Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting."),abt),gMt),Fvt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,a2n),$2n),"No Model Order"),"Set on a node to not set a model order for this node even though it is a real node."),!1),wMt),ktt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,u2n),$2n),"Consider Model Order for Components"),"If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected."),Zlt),gMt),mut),nbn(hMt)))),a2(n,u2n,kZn,null),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,o2n),$2n),"Long Edge Ordering Strategy"),"Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout."),ibt),gMt),wvt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,s2n),$2n),"Crossing Counter Node Order Influence"),"Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0)."),0),dMt),Ptt),nbn(hMt)))),a2(n,s2n,c2n,null),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,h2n),$2n),"Crossing Counter Port Order Influence"),"Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0)."),0),dMt),Ptt),nbn(hMt)))),a2(n,h2n,c2n,null),vWn((new bf,n))},vX(F1n,"LayeredMetaDataProvider",848),wAn(986,1,QJn,bf),MWn.Qe=function(n){vWn(n)},vX(F1n,"LayeredOptions",986),wAn(987,1,{},Cc),MWn.$e=function(){return new Uv},MWn._e=function(n){},vX(F1n,"LayeredOptions/LayeredFactory",987),wAn(1372,1,{}),MWn.a=0,vX(y3n,"ElkSpacings/AbstractSpacingsBuilder",1372),wAn(779,1372,{},uwn),vX(F1n,"LayeredSpacings/LayeredSpacingsBuilder",779),wAn(313,22,{3:1,35:1,22:1,313:1,246:1,234:1},RP),MWn.Kf=function(){return rLn(this)},MWn.Xf=function(){return rLn(this)};var rvt,cvt,avt,uvt,ovt=Ben(F1n,"LayeringStrategy",313,Unt,e9,lF);wAn(378,22,{3:1,35:1,22:1,378:1},KP);var svt,hvt,fvt,lvt,bvt,wvt=Ben(F1n,"LongEdgeOrderingStrategy",378,Unt,E1,bF);wAn(197,22,{3:1,35:1,22:1,197:1},_P);var dvt,gvt,pvt,vvt,mvt,yvt,kvt=Ben(F1n,"NodeFlexibility",197,Unt,k3,wF);wAn(315,22,{3:1,35:1,22:1,315:1,246:1,234:1},FP),MWn.Kf=function(){return DAn(this)},MWn.Xf=function(){return DAn(this)};var jvt,Evt,Tvt,Mvt,Svt,Pvt,Cvt,Ivt,Ovt,Avt=Ben(F1n,"NodePlacementStrategy",315,Unt,$5,yF);wAn(260,22,{3:1,35:1,22:1,260:1},HP);var $vt,Lvt,Nvt,xvt,Dvt=Ben(F1n,"NodePromotionStrategy",260,Unt,Btn,gF);wAn(339,22,{3:1,35:1,22:1,339:1},qP);var Rvt,Kvt,_vt,Fvt=Ben(F1n,"OrderingStrategy",339,Unt,A1,pF);wAn(421,22,{3:1,35:1,22:1,421:1},GP);var Bvt,Hvt,qvt,Gvt,zvt=Ben(F1n,"PortSortingStrategy",421,Unt,UJ,vF);wAn(452,22,{3:1,35:1,22:1,452:1},zP);var Uvt,Xvt,Wvt,Vvt,Qvt=Ben(F1n,"PortType",452,Unt,O1,dF);wAn(375,22,{3:1,35:1,22:1,375:1},UP);var Jvt,Yvt,Zvt,nmt=Ben(F1n,"SelfLoopDistributionStrategy",375,Unt,$1,mF);wAn(376,22,{3:1,35:1,22:1,376:1},XP);var tmt,emt,imt,rmt,cmt=Ben(F1n,"SelfLoopOrderingStrategy",376,Unt,BJ,kF);wAn(304,1,{304:1},sGn),vX(F1n,"Spacings",304),wAn(336,22,{3:1,35:1,22:1,336:1},WP);var amt,umt,omt,smt,hmt=Ben(F1n,"SplineRoutingMode",336,Unt,N1,jF);wAn(338,22,{3:1,35:1,22:1,338:1},VP);var fmt,lmt,bmt,wmt,dmt=Ben(F1n,"ValidifyStrategy",338,Unt,x1,EF);wAn(377,22,{3:1,35:1,22:1,377:1},QP);var gmt,pmt,vmt,mmt,ymt,kmt,jmt,Emt,Tmt,Mmt,Smt=Ben(F1n,"WrappingStrategy",377,Unt,L1,TF);wAn(1383,1,E3n,wf),MWn.Yf=function(n){return BB(n,37),pmt},MWn.pf=function(n,t){YHn(this,BB(n,37),t)},vX(T3n,"DepthFirstCycleBreaker",1383),wAn(782,1,E3n,KG),MWn.Yf=function(n){return BB(n,37),vmt},MWn.pf=function(n,t){UXn(this,BB(n,37),t)},MWn.Zf=function(n){return BB(xq(n,pvn(this.d,n.c.length)),10)},vX(T3n,"GreedyCycleBreaker",782),wAn(1386,782,E3n,TI),MWn.Zf=function(n){var t,e,i,r;for(r=null,t=DWn,i=new Wb(n);i.a1&&(qy(TD(mMn(vW((l1(0,n.c.length),BB(n.c[0],10))),(HXn(),xdt))))?R$n(n,this.d,BB(this,660)):(SQ(),m$(n,this.d)),Ban(this.e,n))},MWn.Sf=function(n,t,e,i){var r,c,a,u,o,s,h;for(t!=Yq(e,n.length)&&(c=n[t-(e?1:-1)],G6(this.f,c,e?(ain(),qvt):(ain(),Hvt))),r=n[t][0],h=!i||r.k==(uSn(),Mut),s=u6(n[t]),this.ag(s,h,!1,e),a=0,o=new Wb(s);o.a"),n0?uZ(this.a,n[t-1],n[t]):!e&&t1&&(qy(TD(mMn(vW((l1(0,n.c.length),BB(n.c[0],10))),(HXn(),xdt))))?R$n(n,this.d,this):(SQ(),m$(n,this.d)),qy(TD(mMn(vW((l1(0,n.c.length),BB(n.c[0],10))),xdt)))||Ban(this.e,n))},vX(C3n,"ModelOrderBarycenterHeuristic",660),wAn(1803,1,MJn,Wd),MWn.ue=function(n,t){return KSn(this.a,BB(n,10),BB(t,10))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(C3n,"ModelOrderBarycenterHeuristic/lambda$0$Type",1803),wAn(1403,1,E3n,jf),MWn.Yf=function(n){var t;return BB(n,37),dq(t=kA(Dmt),(yMn(),_at),(lWn(),Bot)),t},MWn.pf=function(n,t){mJ((BB(n,37),t))},vX(C3n,"NoCrossingMinimizer",1403),wAn(796,402,S3n,Rj),MWn.$f=function(n,t,e){var i,r,c,a,u,o,s,h,f,l,b;switch(f=this.g,e.g){case 1:for(r=0,c=0,h=new Wb(n.j);h.a1&&(r.j==(kUn(),oIt)?this.b[n]=!0:r.j==CIt&&n>0&&(this.b[n-1]=!0))},MWn.f=0,vX(L1n,"AllCrossingsCounter",1798),wAn(587,1,{},mrn),MWn.b=0,MWn.d=0,vX(L1n,"BinaryIndexedTree",587),wAn(524,1,{},QK),vX(L1n,"CrossingsCounter",524),wAn(1906,1,MJn,Vd),MWn.ue=function(n,t){return Xq(this.a,BB(n,11),BB(t,11))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(L1n,"CrossingsCounter/lambda$0$Type",1906),wAn(1907,1,MJn,Qd),MWn.ue=function(n,t){return Wq(this.a,BB(n,11),BB(t,11))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(L1n,"CrossingsCounter/lambda$1$Type",1907),wAn(1908,1,MJn,Jd),MWn.ue=function(n,t){return Vq(this.a,BB(n,11),BB(t,11))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(L1n,"CrossingsCounter/lambda$2$Type",1908),wAn(1909,1,MJn,Yd),MWn.ue=function(n,t){return Qq(this.a,BB(n,11),BB(t,11))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(L1n,"CrossingsCounter/lambda$3$Type",1909),wAn(1910,1,lVn,Zd),MWn.td=function(n){p7(this.a,BB(n,11))},vX(L1n,"CrossingsCounter/lambda$4$Type",1910),wAn(1911,1,DVn,ng),MWn.Mb=function(n){return yI(this.a,BB(n,11))},vX(L1n,"CrossingsCounter/lambda$5$Type",1911),wAn(1912,1,lVn,tg),MWn.td=function(n){mI(this,n)},vX(L1n,"CrossingsCounter/lambda$6$Type",1912),wAn(1913,1,lVn,ZP),MWn.td=function(n){var t;hH(),d3(this.b,(t=this.a,BB(n,11),t))},vX(L1n,"CrossingsCounter/lambda$7$Type",1913),wAn(826,1,qJn,xc),MWn.Lb=function(n){return hH(),Lx(BB(n,11),(hWn(),Elt))},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return hH(),Lx(BB(n,11),(hWn(),Elt))},vX(L1n,"CrossingsCounter/lambda$8$Type",826),wAn(1905,1,{},eg),vX(L1n,"HyperedgeCrossingsCounter",1905),wAn(467,1,{35:1,467:1},DR),MWn.wd=function(n){return vgn(this,BB(n,467))},MWn.b=0,MWn.c=0,MWn.e=0,MWn.f=0;var Fmt=vX(L1n,"HyperedgeCrossingsCounter/Hyperedge",467);wAn(362,1,{35:1,362:1},qV),MWn.wd=function(n){return l$n(this,BB(n,362))},MWn.b=0,MWn.c=0;var Bmt,Hmt,qmt=vX(L1n,"HyperedgeCrossingsCounter/HyperedgeCorner",362);wAn(523,22,{3:1,35:1,22:1,523:1},YP);var Gmt,zmt,Umt,Xmt,Wmt,Vmt=Ben(L1n,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",523,Unt,XJ,SF);wAn(1405,1,E3n,lf),MWn.Yf=function(n){return BB(mMn(BB(n,37),(hWn(),Zft)),21).Hc((bDn(),lft))?zmt:null},MWn.pf=function(n,t){ljn(this,BB(n,37),t)},vX(I3n,"InteractiveNodePlacer",1405),wAn(1406,1,E3n,ff),MWn.Yf=function(n){return BB(mMn(BB(n,37),(hWn(),Zft)),21).Hc((bDn(),lft))?Umt:null},MWn.pf=function(n,t){jmn(this,BB(n,37),t)},vX(I3n,"LinearSegmentsNodePlacer",1406),wAn(257,1,{35:1,257:1},rm),MWn.wd=function(n){return uj(this,BB(n,257))},MWn.Fb=function(n){var t;return!!cL(n,257)&&(t=BB(n,257),this.b==t.b)},MWn.Hb=function(){return this.b},MWn.Ib=function(){return"ls"+LMn(this.e)},MWn.a=0,MWn.b=0,MWn.c=-1,MWn.d=-1,MWn.g=0;var Qmt,Jmt=vX(I3n,"LinearSegmentsNodePlacer/LinearSegment",257);wAn(1408,1,E3n,_G),MWn.Yf=function(n){return BB(mMn(BB(n,37),(hWn(),Zft)),21).Hc((bDn(),lft))?Qmt:null},MWn.pf=function(n,t){SXn(this,BB(n,37),t)},MWn.b=0,MWn.g=0,vX(I3n,"NetworkSimplexPlacer",1408),wAn(1427,1,MJn,Dc),MWn.ue=function(n,t){return E$(BB(n,19).a,BB(t,19).a)},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(I3n,"NetworkSimplexPlacer/0methodref$compare$Type",1427),wAn(1429,1,MJn,Rc),MWn.ue=function(n,t){return E$(BB(n,19).a,BB(t,19).a)},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(I3n,"NetworkSimplexPlacer/1methodref$compare$Type",1429),wAn(649,1,{649:1},nC);var Ymt=vX(I3n,"NetworkSimplexPlacer/EdgeRep",649);wAn(401,1,{401:1},GV),MWn.b=!1;var Zmt,nyt,tyt,eyt=vX(I3n,"NetworkSimplexPlacer/NodeRep",401);wAn(508,12,{3:1,4:1,20:1,28:1,52:1,12:1,14:1,15:1,54:1,508:1},um),vX(I3n,"NetworkSimplexPlacer/Path",508),wAn(1409,1,{},Kc),MWn.Kb=function(n){return BB(n,17).d.i.k},vX(I3n,"NetworkSimplexPlacer/Path/lambda$0$Type",1409),wAn(1410,1,DVn,_c),MWn.Mb=function(n){return BB(n,267)==(uSn(),Put)},vX(I3n,"NetworkSimplexPlacer/Path/lambda$1$Type",1410),wAn(1411,1,{},Fc),MWn.Kb=function(n){return BB(n,17).d.i},vX(I3n,"NetworkSimplexPlacer/Path/lambda$2$Type",1411),wAn(1412,1,DVn,ig),MWn.Mb=function(n){return HD(tdn(BB(n,10)))},vX(I3n,"NetworkSimplexPlacer/Path/lambda$3$Type",1412),wAn(1413,1,DVn,Bc),MWn.Mb=function(n){return hq(BB(n,11))},vX(I3n,"NetworkSimplexPlacer/lambda$0$Type",1413),wAn(1414,1,lVn,tC),MWn.td=function(n){D$(this.a,this.b,BB(n,11))},vX(I3n,"NetworkSimplexPlacer/lambda$1$Type",1414),wAn(1423,1,lVn,rg),MWn.td=function(n){WCn(this.a,BB(n,17))},vX(I3n,"NetworkSimplexPlacer/lambda$10$Type",1423),wAn(1424,1,{},Hc),MWn.Kb=function(n){return BZ(),new Rq(null,new w1(BB(n,29).a,16))},vX(I3n,"NetworkSimplexPlacer/lambda$11$Type",1424),wAn(1425,1,lVn,cg),MWn.td=function(n){BDn(this.a,BB(n,10))},vX(I3n,"NetworkSimplexPlacer/lambda$12$Type",1425),wAn(1426,1,{},qc),MWn.Kb=function(n){return BZ(),iln(BB(n,121).e)},vX(I3n,"NetworkSimplexPlacer/lambda$13$Type",1426),wAn(1428,1,{},Gc),MWn.Kb=function(n){return BZ(),iln(BB(n,121).e)},vX(I3n,"NetworkSimplexPlacer/lambda$15$Type",1428),wAn(1430,1,DVn,zc),MWn.Mb=function(n){return BZ(),BB(n,401).c.k==(uSn(),Cut)},vX(I3n,"NetworkSimplexPlacer/lambda$17$Type",1430),wAn(1431,1,DVn,Uc),MWn.Mb=function(n){return BZ(),BB(n,401).c.j.c.length>1},vX(I3n,"NetworkSimplexPlacer/lambda$18$Type",1431),wAn(1432,1,lVn,zV),MWn.td=function(n){cwn(this.c,this.b,this.d,this.a,BB(n,401))},MWn.c=0,MWn.d=0,vX(I3n,"NetworkSimplexPlacer/lambda$19$Type",1432),wAn(1415,1,{},Xc),MWn.Kb=function(n){return BZ(),new Rq(null,new w1(BB(n,29).a,16))},vX(I3n,"NetworkSimplexPlacer/lambda$2$Type",1415),wAn(1433,1,lVn,ag),MWn.td=function(n){N$(this.a,BB(n,11))},MWn.a=0,vX(I3n,"NetworkSimplexPlacer/lambda$20$Type",1433),wAn(1434,1,{},Wc),MWn.Kb=function(n){return BZ(),new Rq(null,new w1(BB(n,29).a,16))},vX(I3n,"NetworkSimplexPlacer/lambda$21$Type",1434),wAn(1435,1,lVn,ug),MWn.td=function(n){dL(this.a,BB(n,10))},vX(I3n,"NetworkSimplexPlacer/lambda$22$Type",1435),wAn(1436,1,DVn,Vc),MWn.Mb=function(n){return HD(n)},vX(I3n,"NetworkSimplexPlacer/lambda$23$Type",1436),wAn(1437,1,{},Qc),MWn.Kb=function(n){return BZ(),new Rq(null,new w1(BB(n,29).a,16))},vX(I3n,"NetworkSimplexPlacer/lambda$24$Type",1437),wAn(1438,1,DVn,og),MWn.Mb=function(n){return EO(this.a,BB(n,10))},vX(I3n,"NetworkSimplexPlacer/lambda$25$Type",1438),wAn(1439,1,lVn,eC),MWn.td=function(n){MPn(this.a,this.b,BB(n,10))},vX(I3n,"NetworkSimplexPlacer/lambda$26$Type",1439),wAn(1440,1,DVn,Jc),MWn.Mb=function(n){return BZ(),!b5(BB(n,17))},vX(I3n,"NetworkSimplexPlacer/lambda$27$Type",1440),wAn(1441,1,DVn,Yc),MWn.Mb=function(n){return BZ(),!b5(BB(n,17))},vX(I3n,"NetworkSimplexPlacer/lambda$28$Type",1441),wAn(1442,1,{},sg),MWn.Ce=function(n,t){return sL(this.a,BB(n,29),BB(t,29))},vX(I3n,"NetworkSimplexPlacer/lambda$29$Type",1442),wAn(1416,1,{},Zc),MWn.Kb=function(n){return BZ(),new Rq(null,new zU(new oz(ZL(lbn(BB(n,10)).a.Kc(),new h))))},vX(I3n,"NetworkSimplexPlacer/lambda$3$Type",1416),wAn(1417,1,DVn,na),MWn.Mb=function(n){return BZ(),t2(BB(n,17))},vX(I3n,"NetworkSimplexPlacer/lambda$4$Type",1417),wAn(1418,1,lVn,hg),MWn.td=function(n){iBn(this.a,BB(n,17))},vX(I3n,"NetworkSimplexPlacer/lambda$5$Type",1418),wAn(1419,1,{},ta),MWn.Kb=function(n){return BZ(),new Rq(null,new w1(BB(n,29).a,16))},vX(I3n,"NetworkSimplexPlacer/lambda$6$Type",1419),wAn(1420,1,DVn,ea),MWn.Mb=function(n){return BZ(),BB(n,10).k==(uSn(),Cut)},vX(I3n,"NetworkSimplexPlacer/lambda$7$Type",1420),wAn(1421,1,{},ia),MWn.Kb=function(n){return BZ(),new Rq(null,new zU(new oz(ZL(hbn(BB(n,10)).a.Kc(),new h))))},vX(I3n,"NetworkSimplexPlacer/lambda$8$Type",1421),wAn(1422,1,DVn,ra),MWn.Mb=function(n){return BZ(),UH(BB(n,17))},vX(I3n,"NetworkSimplexPlacer/lambda$9$Type",1422),wAn(1404,1,E3n,Cf),MWn.Yf=function(n){return BB(mMn(BB(n,37),(hWn(),Zft)),21).Hc((bDn(),lft))?Zmt:null},MWn.pf=function(n,t){kHn(BB(n,37),t)},vX(I3n,"SimpleNodePlacer",1404),wAn(180,1,{180:1},qKn),MWn.Ib=function(){var n;return n="",this.c==(gY(),tyt)?n+=aYn:this.c==nyt&&(n+=cYn),this.o==(oZ(),ryt)?n+=pYn:this.o==cyt?n+="UP":n+="BALANCED",n},vX($3n,"BKAlignedLayout",180),wAn(516,22,{3:1,35:1,22:1,516:1},cC);var iyt,ryt,cyt,ayt=Ben($3n,"BKAlignedLayout/HDirection",516,Unt,VJ,PF);wAn(515,22,{3:1,35:1,22:1,515:1},rC);var uyt,oyt,syt,hyt,fyt,lyt,byt,wyt,dyt,gyt,pyt,vyt,myt,yyt,kyt,jyt,Eyt,Tyt,Myt,Syt=Ben($3n,"BKAlignedLayout/VDirection",515,Unt,QJ,CF);wAn(1634,1,{},iC),vX($3n,"BKAligner",1634),wAn(1637,1,{},Yyn),vX($3n,"BKCompactor",1637),wAn(654,1,{654:1},ca),MWn.a=0,vX($3n,"BKCompactor/ClassEdge",654),wAn(458,1,{458:1},cm),MWn.a=null,MWn.b=0,vX($3n,"BKCompactor/ClassNode",458),wAn(1407,1,E3n,jI),MWn.Yf=function(n){return BB(mMn(BB(n,37),(hWn(),Zft)),21).Hc((bDn(),lft))?oyt:null},MWn.pf=function(n,t){rWn(this,BB(n,37),t)},MWn.d=!1,vX($3n,"BKNodePlacer",1407),wAn(1635,1,{},aa),MWn.d=0,vX($3n,"NeighborhoodInformation",1635),wAn(1636,1,MJn,fg),MWn.ue=function(n,t){return Mtn(this,BB(n,46),BB(t,46))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX($3n,"NeighborhoodInformation/NeighborComparator",1636),wAn(808,1,{}),vX($3n,"ThresholdStrategy",808),wAn(1763,808,{},dm),MWn.bg=function(n,t,e){return this.a.o==(oZ(),cyt)?RQn:KQn},MWn.cg=function(){},vX($3n,"ThresholdStrategy/NullThresholdStrategy",1763),wAn(579,1,{579:1},aC),MWn.c=!1,MWn.d=!1,vX($3n,"ThresholdStrategy/Postprocessable",579),wAn(1764,808,{},gm),MWn.bg=function(n,t,e){var i,r,c;return r=t==e,i=this.a.a[e.p]==t,r||i?(c=n,this.a.c,gY(),r&&(c=THn(this,t,!0)),!isNaN(c)&&!isFinite(c)&&i&&(c=THn(this,e,!1)),c):n},MWn.cg=function(){for(var n,t,e;0!=this.d.b;)(t=cFn(this,e=BB(PY(this.d),579))).a&&(n=t.a,(qy(this.a.f[this.a.g[e.b.p].p])||b5(n)||n.c.i.c!=n.d.i.c)&&(b$n(this,e)||rA(this.e,e)));for(;0!=this.e.a.c.length;)b$n(this,BB(thn(this.e),579))},vX($3n,"ThresholdStrategy/SimpleThresholdStrategy",1764),wAn(635,1,{635:1,246:1,234:1},ua),MWn.Kf=function(){return Tan(this)},MWn.Xf=function(){return Tan(this)},vX(L3n,"EdgeRouterFactory",635),wAn(1458,1,E3n,If),MWn.Yf=function(n){return Uxn(BB(n,37))},MWn.pf=function(n,t){DHn(BB(n,37),t)},vX(L3n,"OrthogonalEdgeRouter",1458),wAn(1451,1,E3n,EI),MWn.Yf=function(n){return Ejn(BB(n,37))},MWn.pf=function(n,t){OUn(this,BB(n,37),t)},vX(L3n,"PolylineEdgeRouter",1451),wAn(1452,1,qJn,oa),MWn.Lb=function(n){return Qan(BB(n,10))},MWn.Fb=function(n){return this===n},MWn.Mb=function(n){return Qan(BB(n,10))},vX(L3n,"PolylineEdgeRouter/1",1452),wAn(1809,1,DVn,sa),MWn.Mb=function(n){return BB(n,129).c==(O6(),Tyt)},vX(N3n,"HyperEdgeCycleDetector/lambda$0$Type",1809),wAn(1810,1,{},ha),MWn.Ge=function(n){return BB(n,129).d},vX(N3n,"HyperEdgeCycleDetector/lambda$1$Type",1810),wAn(1811,1,DVn,fa),MWn.Mb=function(n){return BB(n,129).c==(O6(),Tyt)},vX(N3n,"HyperEdgeCycleDetector/lambda$2$Type",1811),wAn(1812,1,{},la),MWn.Ge=function(n){return BB(n,129).d},vX(N3n,"HyperEdgeCycleDetector/lambda$3$Type",1812),wAn(1813,1,{},ba),MWn.Ge=function(n){return BB(n,129).d},vX(N3n,"HyperEdgeCycleDetector/lambda$4$Type",1813),wAn(1814,1,{},wa),MWn.Ge=function(n){return BB(n,129).d},vX(N3n,"HyperEdgeCycleDetector/lambda$5$Type",1814),wAn(112,1,{35:1,112:1},Fan),MWn.wd=function(n){return oj(this,BB(n,112))},MWn.Fb=function(n){var t;return!!cL(n,112)&&(t=BB(n,112),this.g==t.g)},MWn.Hb=function(){return this.g},MWn.Ib=function(){var n,t,e,i;for(n=new lN("{"),i=new Wb(this.n);i.a"+this.b+" ("+wx(this.c)+")"},MWn.d=0,vX(N3n,"HyperEdgeSegmentDependency",129),wAn(520,22,{3:1,35:1,22:1,520:1},uC);var Pyt,Cyt,Iyt,Oyt,Ayt,$yt,Lyt,Nyt,xyt=Ben(N3n,"HyperEdgeSegmentDependency/DependencyType",520,Unt,WJ,IF);wAn(1815,1,{},lg),vX(N3n,"HyperEdgeSegmentSplitter",1815),wAn(1816,1,{},zj),MWn.a=0,MWn.b=0,vX(N3n,"HyperEdgeSegmentSplitter/AreaRating",1816),wAn(329,1,{329:1},kB),MWn.a=0,MWn.b=0,MWn.c=0,vX(N3n,"HyperEdgeSegmentSplitter/FreeArea",329),wAn(1817,1,MJn,ja),MWn.ue=function(n,t){return OK(BB(n,112),BB(t,112))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(N3n,"HyperEdgeSegmentSplitter/lambda$0$Type",1817),wAn(1818,1,lVn,XV),MWn.td=function(n){n4(this.a,this.d,this.c,this.b,BB(n,112))},MWn.b=0,vX(N3n,"HyperEdgeSegmentSplitter/lambda$1$Type",1818),wAn(1819,1,{},Ea),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,112).e,16))},vX(N3n,"HyperEdgeSegmentSplitter/lambda$2$Type",1819),wAn(1820,1,{},Ta),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,112).j,16))},vX(N3n,"HyperEdgeSegmentSplitter/lambda$3$Type",1820),wAn(1821,1,{},Ma),MWn.Fe=function(n){return Gy(MD(n))},vX(N3n,"HyperEdgeSegmentSplitter/lambda$4$Type",1821),wAn(655,1,{},fX),MWn.a=0,MWn.b=0,MWn.c=0,vX(N3n,"OrthogonalRoutingGenerator",655),wAn(1638,1,{},Sa),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,112).e,16))},vX(N3n,"OrthogonalRoutingGenerator/lambda$0$Type",1638),wAn(1639,1,{},Pa),MWn.Kb=function(n){return new Rq(null,new w1(BB(n,112).j,16))},vX(N3n,"OrthogonalRoutingGenerator/lambda$1$Type",1639),wAn(661,1,{}),vX(x3n,"BaseRoutingDirectionStrategy",661),wAn(1807,661,{},pm),MWn.dg=function(n,t,i){var r,c,a,u,o,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t+n.o*i,h=new Wb(n.n);h.alZn&&(c=n,r=new xC(l,a=f),DH(u.a,r),F_n(this,u,c,r,!1),(b=n.r)&&(r=new xC(w=Gy(MD(Dpn(b.e,0))),a),DH(u.a,r),F_n(this,u,c,r,!1),c=b,r=new xC(w,a=t+b.o*i),DH(u.a,r),F_n(this,u,c,r,!1)),r=new xC(g,a),DH(u.a,r),F_n(this,u,c,r,!1)))},MWn.eg=function(n){return n.i.n.a+n.n.a+n.a.a},MWn.fg=function(){return kUn(),SIt},MWn.gg=function(){return kUn(),sIt},vX(x3n,"NorthToSouthRoutingStrategy",1807),wAn(1808,661,{},vm),MWn.dg=function(n,t,i){var r,c,a,u,o,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t-n.o*i,h=new Wb(n.n);h.alZn&&(c=n,r=new xC(l,a=f),DH(u.a,r),F_n(this,u,c,r,!1),(b=n.r)&&(r=new xC(w=Gy(MD(Dpn(b.e,0))),a),DH(u.a,r),F_n(this,u,c,r,!1),c=b,r=new xC(w,a=t-b.o*i),DH(u.a,r),F_n(this,u,c,r,!1)),r=new xC(g,a),DH(u.a,r),F_n(this,u,c,r,!1)))},MWn.eg=function(n){return n.i.n.a+n.n.a+n.a.a},MWn.fg=function(){return kUn(),sIt},MWn.gg=function(){return kUn(),SIt},vX(x3n,"SouthToNorthRoutingStrategy",1808),wAn(1806,661,{},mm),MWn.dg=function(n,t,i){var r,c,a,u,o,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t+n.o*i,h=new Wb(n.n);h.alZn&&(c=n,r=new xC(a=f,l),DH(u.a,r),F_n(this,u,c,r,!0),(b=n.r)&&(r=new xC(a,w=Gy(MD(Dpn(b.e,0)))),DH(u.a,r),F_n(this,u,c,r,!0),c=b,r=new xC(a=t+b.o*i,w),DH(u.a,r),F_n(this,u,c,r,!0)),r=new xC(a,g),DH(u.a,r),F_n(this,u,c,r,!0)))},MWn.eg=function(n){return n.i.n.b+n.n.b+n.a.b},MWn.fg=function(){return kUn(),oIt},MWn.gg=function(){return kUn(),CIt},vX(x3n,"WestToEastRoutingStrategy",1806),wAn(813,1,{},oBn),MWn.Ib=function(){return LMn(this.a)},MWn.b=0,MWn.c=!1,MWn.d=!1,MWn.f=0,vX(R3n,"NubSpline",813),wAn(407,1,{407:1},Exn,wY),vX(R3n,"NubSpline/PolarCP",407),wAn(1453,1,E3n,hyn),MWn.Yf=function(n){return rTn(BB(n,37))},MWn.pf=function(n,t){cXn(this,BB(n,37),t)},vX(R3n,"SplineEdgeRouter",1453),wAn(268,1,{268:1},S6),MWn.Ib=function(){return this.a+" ->("+this.c+") "+this.b},MWn.c=0,vX(R3n,"SplineEdgeRouter/Dependency",268),wAn(455,22,{3:1,35:1,22:1,455:1},oC);var Dyt,Ryt,Kyt,_yt,Fyt,Byt=Ben(R3n,"SplineEdgeRouter/SideToProcess",455,Unt,JJ,OF);wAn(1454,1,DVn,ya),MWn.Mb=function(n){return gxn(),!BB(n,128).o},vX(R3n,"SplineEdgeRouter/lambda$0$Type",1454),wAn(1455,1,{},ma),MWn.Ge=function(n){return gxn(),BB(n,128).v+1},vX(R3n,"SplineEdgeRouter/lambda$1$Type",1455),wAn(1456,1,lVn,sC),MWn.td=function(n){iq(this.a,this.b,BB(n,46))},vX(R3n,"SplineEdgeRouter/lambda$2$Type",1456),wAn(1457,1,lVn,hC),MWn.td=function(n){rq(this.a,this.b,BB(n,46))},vX(R3n,"SplineEdgeRouter/lambda$3$Type",1457),wAn(128,1,{35:1,128:1},tCn,hqn),MWn.wd=function(n){return sj(this,BB(n,128))},MWn.b=0,MWn.e=!1,MWn.f=0,MWn.g=0,MWn.j=!1,MWn.k=!1,MWn.n=0,MWn.o=!1,MWn.p=!1,MWn.q=!1,MWn.s=0,MWn.u=0,MWn.v=0,MWn.F=0,vX(R3n,"SplineSegment",128),wAn(459,1,{459:1},ka),MWn.a=0,MWn.b=!1,MWn.c=!1,MWn.d=!1,MWn.e=!1,MWn.f=0,vX(R3n,"SplineSegment/EdgeInformation",459),wAn(1234,1,{},da),vX(H3n,iZn,1234),wAn(1235,1,MJn,ga),MWn.ue=function(n,t){return IIn(BB(n,135),BB(t,135))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(H3n,rZn,1235),wAn(1233,1,{},AE),vX(H3n,"MrTree",1233),wAn(393,22,{3:1,35:1,22:1,393:1,246:1,234:1},fC),MWn.Kf=function(){return AIn(this)},MWn.Xf=function(){return AIn(this)};var Hyt,qyt=Ben(H3n,"TreeLayoutPhases",393,Unt,j3,AF);wAn(1130,209,NYn,_R),MWn.Ze=function(n,t){var e,i,r,c,a,u;for(qy(TD(ZAn(n,(CAn(),Ckt))))||jY(new Tw((GM(),new Dy(n)))),qan(a=new P6,n),hon(a,(qqn(),skt),n),v_n(n,a,u=new xp),W_n(n,a,u),c=a,i=new Wb(r=x_n(this.a,c));i.a"+g0(this.c):"e_"+nsn(this)},vX(q3n,"TEdge",188),wAn(135,134,{3:1,135:1,94:1,134:1},P6),MWn.Ib=function(){var n,t,e,i,r;for(r=null,i=spn(this.b,0);i.b!=i.d.c;)r+=(null==(e=BB(b3(i),86)).c||0==e.c.length?"n_"+e.g:"n_"+e.c)+"\n";for(t=spn(this.a,0);t.b!=t.d.c;)r+=((n=BB(b3(t),188)).b&&n.c?g0(n.b)+"->"+g0(n.c):"e_"+nsn(n))+"\n";return r};var Gyt=vX(q3n,"TGraph",135);wAn(633,502,{3:1,502:1,633:1,94:1,134:1}),vX(q3n,"TShape",633),wAn(86,633,{3:1,502:1,86:1,633:1,94:1,134:1},csn),MWn.Ib=function(){return g0(this)};var zyt,Uyt,Xyt,Wyt,Vyt,Qyt,Jyt=vX(q3n,"TNode",86);wAn(255,1,pVn,bg),MWn.Jc=function(n){e5(this,n)},MWn.Kc=function(){return new wg(spn(this.a.d,0))},vX(q3n,"TNode/2",255),wAn(358,1,QWn,wg),MWn.Nb=function(n){fU(this,n)},MWn.Pb=function(){return BB(b3(this.a),188).c},MWn.Ob=function(){return EE(this.a)},MWn.Qb=function(){mtn(this.a)},vX(q3n,"TNode/2/1",358),wAn(1840,1,n1n,KR),MWn.pf=function(n,t){xFn(this,BB(n,135),t)},vX(G3n,"FanProcessor",1840),wAn(327,22,{3:1,35:1,22:1,327:1,234:1},lC),MWn.Kf=function(){switch(this.g){case 0:return new Qm;case 1:return new KR;case 2:return new Oa;case 3:return new Ca;case 4:return new $a;case 5:return new La;default:throw Hp(new _y(M1n+(null!=this.f?this.f:""+this.g)))}};var Yyt,Zyt,nkt,tkt,ekt,ikt,rkt,ckt,akt,ukt,okt,skt,hkt,fkt,lkt,bkt,wkt,dkt,gkt,pkt,vkt,mkt,ykt,kkt,jkt,Ekt,Tkt,Mkt,Skt,Pkt,Ckt,Ikt,Okt,Akt,$kt,Lkt,Nkt,xkt,Dkt,Rkt,Kkt,_kt=Ben(G3n,S1n,327,Unt,r9,$F);wAn(1843,1,n1n,Ca),MWn.pf=function(n,t){u$n(this,BB(n,135),t)},MWn.a=0,vX(G3n,"LevelHeightProcessor",1843),wAn(1844,1,pVn,Ia),MWn.Jc=function(n){e5(this,n)},MWn.Kc=function(){return SQ(),LT(),bet},vX(G3n,"LevelHeightProcessor/1",1844),wAn(1841,1,n1n,Oa),MWn.pf=function(n,t){QPn(this,BB(n,135),t)},MWn.a=0,vX(G3n,"NeighborsProcessor",1841),wAn(1842,1,pVn,Aa),MWn.Jc=function(n){e5(this,n)},MWn.Kc=function(){return SQ(),LT(),bet},vX(G3n,"NeighborsProcessor/1",1842),wAn(1845,1,n1n,$a),MWn.pf=function(n,t){a$n(this,BB(n,135),t)},MWn.a=0,vX(G3n,"NodePositionProcessor",1845),wAn(1839,1,n1n,Qm),MWn.pf=function(n,t){ZHn(this,BB(n,135))},vX(G3n,"RootProcessor",1839),wAn(1846,1,n1n,La),MWn.pf=function(n,t){dln(BB(n,135))},vX(G3n,"Untreeifyer",1846),wAn(851,1,QJn,Pf),MWn.Qe=function(n){Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,X3n),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),kkt),(PPn(),gMt)),qkt),nbn((rpn(),hMt))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,W3n),""),"Search Order"),"Which search order to use when computing a spanning tree."),mkt),gMt),Ykt),nbn(hMt)))),KGn((new Sf,n))},vX(V3n,"MrTreeMetaDataProvider",851),wAn(994,1,QJn,Sf),MWn.Qe=function(n){KGn(n)},vX(V3n,"MrTreeOptions",994),wAn(995,1,{},Na),MWn.$e=function(){return new _R},MWn._e=function(n){},vX(V3n,"MrTreeOptions/MrtreeFactory",995),wAn(480,22,{3:1,35:1,22:1,480:1},bC);var Fkt,Bkt,Hkt,qkt=Ben(V3n,"OrderWeighting",480,Unt,ZJ,LF);wAn(425,22,{3:1,35:1,22:1,425:1},wC);var Gkt,zkt,Ukt,Xkt,Wkt,Vkt,Qkt,Jkt,Ykt=Ben(V3n,"TreeifyingOrder",425,Unt,YJ,xF);wAn(1459,1,E3n,pf),MWn.Yf=function(n){return BB(n,135),zkt},MWn.pf=function(n,t){ycn(this,BB(n,135),t)},vX("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1459),wAn(1460,1,E3n,vf),MWn.Yf=function(n){return BB(n,135),Ukt},MWn.pf=function(n,t){fCn(this,BB(n,135),t)},vX("org.eclipse.elk.alg.mrtree.p2order","NodeOrderer",1460),wAn(1461,1,E3n,gf),MWn.Yf=function(n){return BB(n,135),Xkt},MWn.pf=function(n,t){nRn(this,BB(n,135),t)},MWn.a=0,vX("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1461),wAn(1462,1,E3n,mf),MWn.Yf=function(n){return BB(n,135),Wkt},MWn.pf=function(n,t){xkn(BB(n,135),t)},vX("org.eclipse.elk.alg.mrtree.p4route","EdgeRouter",1462),wAn(495,22,{3:1,35:1,22:1,495:1,246:1,234:1},dC),MWn.Kf=function(){return bwn(this)},MWn.Xf=function(){return bwn(this)};var Zkt,njt,tjt,ejt,ijt=Ben(Y3n,"RadialLayoutPhases",495,Unt,nY,NF);wAn(1131,209,NYn,OE),MWn.Ze=function(n,t){var e,i,r;if(OTn(t,"Radial layout",ECn(this,n).c.length),qy(TD(ZAn(n,(Uyn(),Ajt))))||jY(new Tw((GM(),new Dy(n)))),r=uTn(n),Jpn(n,(wD(),Vkt),r),!r)throw Hp(new _y("The given graph is not a tree!"));for(0==(e=Gy(MD(ZAn(n,Djt))))&&(e=fIn(n)),Jpn(n,Djt,e),i=new Wb(ECn(this,n));i.a0&&xhn((b1(t-1,n.length),n.charCodeAt(t-1)),s1n);)--t;if(e>=t)throw Hp(new _y("The given string does not contain any numbers."));if(2!=(i=kKn(n.substr(e,t-e),",|;|\r|\n")).length)throw Hp(new _y("Exactly two numbers are expected, "+i.length+" were found."));try{this.a=bSn(RMn(i[0])),this.b=bSn(RMn(i[1]))}catch(r){throw cL(r=lun(r),127)?Hp(new _y(h1n+r)):Hp(r)}},MWn.Ib=function(){return"("+this.a+","+this.b+")"},MWn.a=0,MWn.b=0;var PMt=vX(f1n,"KVector",8);wAn(74,68,{3:1,4:1,20:1,28:1,52:1,14:1,68:1,15:1,74:1,414:1},km,Kj,Ux),MWn.Pc=function(){return Vsn(this)},MWn.Jf=function(n){var t,e,i,r,c;e=kKn(n,",|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n"),yQ(this);try{for(t=0,r=0,i=0,c=0;t0&&(r%2==0?i=bSn(e[t]):c=bSn(e[t]),r>0&&r%2!=0&&DH(this,new xC(i,c)),++r),++t}catch(a){throw cL(a=lun(a),127)?Hp(new _y("The given string does not match the expected format for vectors."+a)):Hp(a)}},MWn.Ib=function(){var n,t,e;for(n=new lN("("),t=spn(this,0);t.b!=t.d.c;)oO(n,(e=BB(b3(t),8)).a+","+e.b),t.b!=t.d.c&&(n.a+="; ");return(n.a+=")",n).a};var CMt,IMt,OMt,AMt,$Mt,LMt,NMt=vX(f1n,"KVectorChain",74);wAn(248,22,{3:1,35:1,22:1,248:1},DC);var xMt,DMt,RMt,KMt,_Mt,FMt,BMt,HMt,qMt,GMt,zMt,UMt,XMt,WMt,VMt,QMt,JMt,YMt,ZMt,nSt=Ben(h5n,"Alignment",248,Unt,Y8,YF);wAn(979,1,QJn,Lf),MWn.Qe=function(n){G_n(n)},vX(h5n,"BoxLayouterOptions",979),wAn(980,1,{},xu),MWn.$e=function(){return new Gu},MWn._e=function(n){},vX(h5n,"BoxLayouterOptions/BoxFactory",980),wAn(291,22,{3:1,35:1,22:1,291:1},RC);var tSt,eSt,iSt,rSt,cSt,aSt,uSt,oSt,sSt,hSt,fSt,lSt,bSt,wSt,dSt,gSt,pSt,vSt,mSt,ySt,kSt,jSt,ESt,TSt,MSt,SSt,PSt,CSt,ISt,OSt,ASt,$St,LSt,NSt,xSt,DSt,RSt,KSt,_St,FSt,BSt,HSt,qSt,GSt,zSt,USt,XSt,WSt,VSt,QSt,JSt,YSt,ZSt,nPt,tPt,ePt,iPt,rPt,cPt,aPt,uPt,oPt,sPt,hPt,fPt,lPt,bPt,wPt,dPt,gPt,pPt,vPt,mPt,yPt,kPt,jPt,EPt,TPt,MPt,SPt,PPt,CPt,IPt,OPt,APt,$Pt,LPt,NPt,xPt,DPt,RPt,KPt,_Pt,FPt,BPt,HPt,qPt=Ben(h5n,"ContentAlignment",291,Unt,J8,ZF);wAn(684,1,QJn,Nf),MWn.Qe=function(n){Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,w5n),""),"Layout Algorithm"),"Select a specific layout algorithm."),(PPn(),yMt)),Qtt),nbn((rpn(),hMt))))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,d5n),""),"Resolved Layout Algorithm"),"Meta data associated with the selected algorithm."),mMt),aMt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,W2n),""),"Alignment"),"Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."),rSt),gMt),nSt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,VYn),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,g5n),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),mMt),NMt),nbn(uMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,u3n),""),"Content Alignment"),"Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."),fSt),pMt),qPt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,X2n),""),"Debug Mode"),"Whether additional debug information shall be generated."),(hN(),!1)),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,Y2n),""),TYn),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),wSt),gMt),WPt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,y2n),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),mSt),gMt),oCt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,A4n),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,d2n),""),"Hierarchy Handling"),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),TSt),gMt),SCt),EG(hMt,Pun(Gk(jMt,1),$Vn,175,0,[sMt]))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,QYn),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),WSt),mMt),_ut),EG(hMt,Pun(Gk(jMt,1),$Vn,175,0,[sMt]))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,jZn),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,m3n),""),"interactive Layout"),"Whether the graph should be changeable interactively and by setting constraints"),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,MZn),""),"Omit Node Micro Layout"),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,EZn),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),oPt),gMt),aIt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,g3n),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),mMt),PMt),EG(sMt,Pun(Gk(jMt,1),$Vn,175,0,[fMt,oMt]))))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,pZn),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),vMt),Att),EG(sMt,Pun(Gk(jMt,1),$Vn,175,0,[uMt]))))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,yZn),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),vMt),Att),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,kZn),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,o3n),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),ASt),mMt),NMt),nbn(uMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,f3n),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),wMt),ktt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,l3n),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),wMt),ktt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,p5n),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),mMt),KNt),EG(hMt,Pun(Gk(jMt,1),$Vn,175,0,[oMt]))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,p3n),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),LSt),mMt),Eut),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,z2n),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),wMt),ktt),EG(sMt,Pun(Gk(jMt,1),$Vn,175,0,[uMt,fMt,oMt]))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,v5n),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),dMt),Ptt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,m5n),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,y5n),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),iln(100)),vMt),Att),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,k5n),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,j5n),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),iln(4e3)),vMt),Att),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,E5n),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),iln(400)),vMt),Att),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,T5n),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,M5n),""),"Validate Graph"),"Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,S5n),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,P5n),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,b5n),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),oSt),gMt),cOt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,L2n),k2n),"Comment Comment Spacing"),"Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."),10),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,N2n),k2n),"Comment Node Spacing"),"Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."),10),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,XYn),k2n),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,x2n),k2n),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,mZn),k2n),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,D2n),k2n),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,R2n),k2n),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,F2n),k2n),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,K2n),k2n),"Horizontal spacing between Label and Port"),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,_2n),k2n),"Vertical spacing between Label and Port"),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,vZn),k2n),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,B2n),k2n),"Node Self Loop Spacing"),"Spacing to be preserved between a node and its self loops."),10),dMt),Ptt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,H2n),k2n),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),dMt),Ptt),EG(hMt,Pun(Gk(jMt,1),$Vn,175,0,[sMt]))))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,q2n),k2n),"Individual Spacing"),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),mMt),hOt),EG(sMt,Pun(Gk(jMt,1),$Vn,175,0,[uMt,fMt,oMt]))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,v3n),k2n),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),DPt),mMt),Eut),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,d3n),A5n),"Layout Partition"),"Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."),vMt),Att),EG(hMt,Pun(Gk(jMt,1),$Vn,175,0,[sMt]))))),a2(n,d3n,w3n,YSt),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,w3n),A5n),"Layout Partitioning"),"Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."),QSt),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,Z2n),$5n),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),xSt),mMt),_ut),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,CZn),$5n),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),RSt),pMt),GCt),EG(sMt,Pun(Gk(jMt,1),$Vn,175,0,[oMt]))))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,e3n),L5n),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),nPt),gMt),YCt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,i3n),L5n),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),gMt),YCt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,r3n),L5n),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),gMt),YCt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,c3n),L5n),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),gMt),YCt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,a3n),L5n),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),gMt),YCt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,PZn),N5n),"Node Size Constraints"),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),_St),pMt),JIt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,SZn),N5n),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),GSt),pMt),iOt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,BZn),N5n),"Node Size Minimum"),"The minimal size to which a node can be reduced."),HSt),mMt),PMt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,J2n),N5n),"Fixed Graph Size"),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),!1),wMt),ktt),nbn(hMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,s3n),A2n),"Edge Label Placement"),"Gives a hint on where to put edge labels."),pSt),gMt),nCt),nbn(oMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,TZn),A2n),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),wMt),ktt),nbn(oMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,C5n),"font"),"Font Name"),"Font name used for a label."),yMt),Qtt),nbn(oMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,I5n),"font"),"Font Size"),"Font size used for a label."),vMt),Att),nbn(oMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,b3n),x5n),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),mMt),PMt),nbn(fMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,h3n),x5n),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),vMt),Att),nbn(fMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,U2n),x5n),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),dPt),gMt),FIt),nbn(fMt)))),Abn(n,new bPn(Oj(Ij(Aj(Ej(Cj(Mj(Sj(new Fu,G2n),x5n),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),dMt),Ptt),nbn(fMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,IZn),D5n),"Port Label Placement"),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),lPt),pMt),IIt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,n3n),D5n),"Port Labels Next to Port"),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),!1),wMt),ktt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,t3n),D5n),"Treat Port Labels as Group"),"If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."),!0),wMt),ktt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,V2n),R5n),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),wMt),ktt),nbn(sMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,Q2n),R5n),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),wMt),ktt),nbn(uMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,WYn),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),dMt),Ptt),nbn(uMt)))),Abn(n,new bPn(Oj(Ij(Aj(Tj(Ej(Cj(Mj(Sj(new Fu,O5n),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),kSt),gMt),yCt),nbn(uMt)))),xM(n,new UZ(yj(jj(kj(new pu,w1n),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),xM(n,new UZ(yj(jj(kj(new pu,"org.eclipse.elk.orthogonal"),"Orthogonal"),'Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia \'86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.'))),xM(n,new UZ(yj(jj(kj(new pu,gZn),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),xM(n,new UZ(yj(jj(kj(new pu,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),xM(n,new UZ(yj(jj(kj(new pu,J3n),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),xM(n,new UZ(yj(jj(kj(new pu,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),xM(n,new UZ(yj(jj(kj(new pu,w4n),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),bKn((new xf,n)),G_n((new Lf,n)),RDn((new Df,n))},vX(h5n,"CoreOptions",684),wAn(103,22,{3:1,35:1,22:1,103:1},KC);var GPt,zPt,UPt,XPt,WPt=Ben(h5n,TYn,103,Unt,C5,eB);wAn(272,22,{3:1,35:1,22:1,272:1},_C);var VPt,QPt,JPt,YPt,ZPt,nCt=Ben(h5n,"EdgeLabelPlacement",272,Unt,q1,iB);wAn(218,22,{3:1,35:1,22:1,218:1},FC);var tCt,eCt,iCt,rCt,cCt,aCt,uCt,oCt=Ben(h5n,"EdgeRouting",218,Unt,S3,rB);wAn(312,22,{3:1,35:1,22:1,312:1},BC);var sCt,hCt,fCt,lCt,bCt,wCt,dCt,gCt,pCt,vCt,mCt,yCt=Ben(h5n,"EdgeType",312,Unt,a9,cB);wAn(977,1,QJn,xf),MWn.Qe=function(n){bKn(n)},vX(h5n,"FixedLayouterOptions",977),wAn(978,1,{},Vu),MWn.$e=function(){return new Hu},MWn._e=function(n){},vX(h5n,"FixedLayouterOptions/FixedFactory",978),wAn(334,22,{3:1,35:1,22:1,334:1},HC);var kCt,jCt,ECt,TCt,MCt,SCt=Ben(h5n,"HierarchyHandling",334,Unt,H1,aB);wAn(285,22,{3:1,35:1,22:1,285:1},qC);var PCt,CCt,ICt,OCt,ACt,$Ct,LCt,NCt,xCt,DCt,RCt=Ben(h5n,"LabelSide",285,Unt,M3,uB);wAn(93,22,{3:1,35:1,22:1,93:1},GC);var KCt,_Ct,FCt,BCt,HCt,qCt,GCt=Ben(h5n,"NodeLabelPlacement",93,Unt,ken,oB);wAn(249,22,{3:1,35:1,22:1,249:1},zC);var zCt,UCt,XCt,WCt,VCt,QCt,JCt,YCt=Ben(h5n,"PortAlignment",249,Unt,I5,sB);wAn(98,22,{3:1,35:1,22:1,98:1},UC);var ZCt,nIt,tIt,eIt,iIt,rIt,cIt,aIt=Ben(h5n,"PortConstraints",98,Unt,S8,hB);wAn(273,22,{3:1,35:1,22:1,273:1},XC);var uIt,oIt,sIt,hIt,fIt,lIt,bIt,wIt,dIt,gIt,pIt,vIt,mIt,yIt,kIt,jIt,EIt,TIt,MIt,SIt,PIt,CIt,IIt=Ben(h5n,"PortLabelPlacement",273,Unt,c9,fB);wAn(61,22,{3:1,35:1,22:1,61:1},WC);var OIt,AIt,$It,LIt,NIt,xIt,DIt,RIt,KIt,_It,FIt=Ben(h5n,"PortSide",61,Unt,h5,wB);wAn(981,1,QJn,Df),MWn.Qe=function(n){RDn(n)},vX(h5n,"RandomLayouterOptions",981),wAn(982,1,{},Qu),MWn.$e=function(){return new no},MWn._e=function(n){},vX(h5n,"RandomLayouterOptions/RandomFactory",982),wAn(374,22,{3:1,35:1,22:1,374:1},VC);var BIt,HIt,qIt,GIt,zIt,UIt,XIt,WIt,VIt,QIt,JIt=Ben(h5n,"SizeConstraint",374,Unt,T3,lB);wAn(259,22,{3:1,35:1,22:1,259:1},QC);var YIt,ZIt,nOt,tOt,eOt,iOt=Ben(h5n,"SizeOptions",259,Unt,Ein,bB);wAn(370,1,{1949:1},Xm),MWn.b=!1,MWn.c=0,MWn.d=-1,MWn.e=null,MWn.f=null,MWn.g=-1,MWn.j=!1,MWn.k=!1,MWn.n=!1,MWn.o=0,MWn.q=0,MWn.r=0,vX(y3n,"BasicProgressMonitor",370),wAn(972,209,NYn,Gu),MWn.Ze=function(n,t){var e,i,r,c,a,u,o,s,h;OTn(t,"Box layout",2),r=zy(MD(ZAn(n,(SMn(),XMt)))),c=BB(ZAn(n,GMt),116),e=qy(TD(ZAn(n,_Mt))),i=qy(TD(ZAn(n,FMt))),0===BB(ZAn(n,RMt),311).g?(u=new t_((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a)),SQ(),m$(u,new Sg(i)),a=u,o=XPn(n),(null==(s=MD(ZAn(n,DMt)))||(kW(s),s<=0))&&(s=1.3),KUn(n,(h=HUn(a,r,c,o.a,o.b,e,(kW(s),s))).a,h.b,!1,!0)):kqn(n,r,c,e),HSn(t)},vX(y3n,"BoxLayoutProvider",972),wAn(973,1,MJn,Sg),MWn.ue=function(n,t){return hNn(this,BB(n,33),BB(t,33))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},MWn.a=!1,vX(y3n,"BoxLayoutProvider/1",973),wAn(157,1,{157:1},Gtn,zx),MWn.Ib=function(){return this.c?zRn(this.c):LMn(this.b)},vX(y3n,"BoxLayoutProvider/Group",157),wAn(311,22,{3:1,35:1,22:1,311:1},JC);var rOt,cOt=Ben(y3n,"BoxLayoutProvider/PackingMode",311,Unt,P3,dB);wAn(974,1,MJn,zu),MWn.ue=function(n,t){return DQ(BB(n,157),BB(t,157))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(y3n,"BoxLayoutProvider/lambda$0$Type",974),wAn(975,1,MJn,Uu),MWn.ue=function(n,t){return cQ(BB(n,157),BB(t,157))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(y3n,"BoxLayoutProvider/lambda$1$Type",975),wAn(976,1,MJn,Xu),MWn.ue=function(n,t){return aQ(BB(n,157),BB(t,157))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(y3n,"BoxLayoutProvider/lambda$2$Type",976),wAn(1365,1,{831:1},Wu),MWn.qg=function(n,t){return AM(),!cL(t,160)||SE((Nun(),BB(n,160)),t)},vX(y3n,"ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type",1365),wAn(1366,1,lVn,Pg),MWn.td=function(n){Ysn(this.a,BB(n,146))},vX(y3n,"ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type",1366),wAn(1367,1,lVn,qu),MWn.td=function(n){BB(n,94),AM()},vX(y3n,"ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type",1367),wAn(1371,1,lVn,Cg),MWn.td=function(n){Orn(this.a,BB(n,94))},vX(y3n,"ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type",1371),wAn(1369,1,DVn,YC),MWn.Mb=function(n){return Von(this.a,this.b,BB(n,146))},vX(y3n,"ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type",1369),wAn(1368,1,DVn,ZC),MWn.Mb=function(n){return $x(this.a,this.b,BB(n,831))},vX(y3n,"ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type",1368),wAn(1370,1,lVn,nI),MWn.td=function(n){Fz(this.a,this.b,BB(n,146))},vX(y3n,"ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type",1370),wAn(935,1,{},Bu),MWn.Kb=function(n){return yA(n)},MWn.Fb=function(n){return this===n},vX(y3n,"ElkUtil/lambda$0$Type",935),wAn(936,1,lVn,tI),MWn.td=function(n){rOn(this.a,this.b,BB(n,79))},MWn.a=0,MWn.b=0,vX(y3n,"ElkUtil/lambda$1$Type",936),wAn(937,1,lVn,eI),MWn.td=function(n){Ey(this.a,this.b,BB(n,202))},MWn.a=0,MWn.b=0,vX(y3n,"ElkUtil/lambda$2$Type",937),wAn(938,1,lVn,iI),MWn.td=function(n){t$(this.a,this.b,BB(n,137))},MWn.a=0,MWn.b=0,vX(y3n,"ElkUtil/lambda$3$Type",938),wAn(939,1,lVn,Ig),MWn.td=function(n){cq(this.a,BB(n,469))},vX(y3n,"ElkUtil/lambda$4$Type",939),wAn(342,1,{35:1,342:1},$p),MWn.wd=function(n){return vL(this,BB(n,236))},MWn.Fb=function(n){var t;return!!cL(n,342)&&(t=BB(n,342),this.a==t.a)},MWn.Hb=function(){return CY(this.a)},MWn.Ib=function(){return this.a+" (exclusive)"},MWn.a=0,vX(y3n,"ExclusiveBounds/ExclusiveLowerBound",342),wAn(1138,209,NYn,Hu),MWn.Ze=function(n,t){var i,r,c,a,u,o,s,f,l,b,w,d,g,p,v,m,y,k,j,E,T;for(OTn(t,"Fixed Layout",1),a=BB(ZAn(n,(sWn(),vSt)),218),b=0,w=0,v=new AL((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a));v.e!=v.i.gc();){for(g=BB(kpn(v),33),(T=BB(ZAn(g,(Xsn(),gCt)),8))&&(SA(g,T.a,T.b),BB(ZAn(g,fCt),174).Hc((mdn(),DIt))&&(d=BB(ZAn(g,bCt),8)).a>0&&d.b>0&&KUn(g,d.a,d.b,!0,!0)),b=e.Math.max(b,g.i+g.g),w=e.Math.max(w,g.j+g.f),f=new AL((!g.n&&(g.n=new eU(zOt,g,1,7)),g.n));f.e!=f.i.gc();)o=BB(kpn(f),137),(T=BB(ZAn(o,gCt),8))&&SA(o,T.a,T.b),b=e.Math.max(b,g.i+o.i+o.g),w=e.Math.max(w,g.j+o.j+o.f);for(k=new AL((!g.c&&(g.c=new eU(XOt,g,9,9)),g.c));k.e!=k.i.gc();)for(y=BB(kpn(k),118),(T=BB(ZAn(y,gCt),8))&&SA(y,T.a,T.b),j=g.i+y.i,E=g.j+y.j,b=e.Math.max(b,j+y.g),w=e.Math.max(w,E+y.f),s=new AL((!y.n&&(y.n=new eU(zOt,y,1,7)),y.n));s.e!=s.i.gc();)o=BB(kpn(s),137),(T=BB(ZAn(o,gCt),8))&&SA(o,T.a,T.b),b=e.Math.max(b,j+o.i+o.g),w=e.Math.max(w,E+o.j+o.f);for(c=new oz(ZL(dLn(g).a.Kc(),new h));dAn(c);)l=_Un(i=BB(U5(c),79)),b=e.Math.max(b,l.a),w=e.Math.max(w,l.b);for(r=new oz(ZL(wLn(g).a.Kc(),new h));dAn(r);)YY(PMn(i=BB(U5(r),79)))!=n&&(l=_Un(i),b=e.Math.max(b,l.a),w=e.Math.max(w,l.b))}if(a==(Mbn(),QPt))for(p=new AL((!n.a&&(n.a=new eU(UOt,n,10,11)),n.a));p.e!=p.i.gc();)for(r=new oz(ZL(dLn(g=BB(kpn(p),33)).a.Kc(),new h));dAn(r);)0==(u=rFn(i=BB(U5(r),79))).b?Jpn(i,OSt,null):Jpn(i,OSt,u);qy(TD(ZAn(n,(Xsn(),lCt))))||KUn(n,b+(m=BB(ZAn(n,wCt),116)).b+m.c,w+m.d+m.a,!0,!0),HSn(t)},vX(y3n,"FixedLayoutProvider",1138),wAn(373,134,{3:1,414:1,373:1,94:1,134:1},Ju,rnn),MWn.Jf=function(n){var t,e,i,r,c,a,u;if(n)try{for(a=kKn(n,";,;"),r=0,c=(i=a).length;r>16&QVn|n^(e&QVn)<<16},MWn.Kc=function(){return new Og(this)},MWn.Ib=function(){return null==this.a&&null==this.b?"pair(null,null)":null==this.a?"pair(null,"+Bbn(this.b)+")":null==this.b?"pair("+Bbn(this.a)+",null)":"pair("+Bbn(this.a)+","+Bbn(this.b)+")"},vX(y3n,"Pair",46),wAn(983,1,QWn,Og),MWn.Nb=function(n){fU(this,n)},MWn.Ob=function(){return!this.c&&(!this.b&&null!=this.a.a||null!=this.a.b)},MWn.Pb=function(){if(!this.c&&!this.b&&null!=this.a.a)return this.b=!0,this.a.a;if(!this.c&&null!=this.a.b)return this.c=!0,this.a.b;throw Hp(new yv)},MWn.Qb=function(){throw this.c&&null!=this.a.b?this.a.b=null:this.b&&null!=this.a.a&&(this.a.a=null),Hp(new dv)},MWn.b=!1,MWn.c=!1,vX(y3n,"Pair/1",983),wAn(448,1,{448:1},VV),MWn.Fb=function(n){return cV(this.a,BB(n,448).a)&&cV(this.c,BB(n,448).c)&&cV(this.d,BB(n,448).d)&&cV(this.b,BB(n,448).b)},MWn.Hb=function(){return fhn(Pun(Gk(Ant,1),HWn,1,5,[this.a,this.c,this.d,this.b]))},MWn.Ib=function(){return"("+this.a+FWn+this.c+FWn+this.d+FWn+this.b+")"},vX(y3n,"Quadruple",448),wAn(1126,209,NYn,no),MWn.Ze=function(n,t){var e;OTn(t,"Random Layout",1),0!=(!n.a&&(n.a=new eU(UOt,n,10,11)),n.a).i?(iUn(n,(e=BB(ZAn(n,(vdn(),NIt)),19))&&0!=e.a?new C4(e.a):new sbn,zy(MD(ZAn(n,AIt))),zy(MD(ZAn(n,xIt))),BB(ZAn(n,$It),116)),HSn(t)):HSn(t)},vX(y3n,"RandomLayoutProvider",1126),wAn(553,1,{}),MWn.qf=function(){return new xC(this.f.i,this.f.j)},MWn.We=function(n){return EJ(n,(sWn(),aPt))?ZAn(this.f,bOt):ZAn(this.f,n)},MWn.rf=function(){return new xC(this.f.g,this.f.f)},MWn.sf=function(){return this.g},MWn.Xe=function(n){return P8(this.f,n)},MWn.tf=function(n){Pen(this.f,n.a),Cen(this.f,n.b)},MWn.uf=function(n){Sen(this.f,n.a),Men(this.f,n.b)},MWn.vf=function(n){this.g=n},MWn.g=0,vX(H5n,"ElkGraphAdapters/AbstractElkGraphElementAdapter",553),wAn(554,1,{839:1},Ag),MWn.wf=function(){var n,t;if(!this.b)for(this.b=C2(mV(this.a).i),t=new AL(mV(this.a));t.e!=t.i.gc();)n=BB(kpn(t),137),WB(this.b,new Ry(n));return this.b},MWn.b=null,vX(H5n,"ElkGraphAdapters/ElkEdgeAdapter",554),wAn(301,553,{},Dy),MWn.xf=function(){return eyn(this)},MWn.a=null,vX(H5n,"ElkGraphAdapters/ElkGraphAdapter",301),wAn(630,553,{181:1},Ry),vX(H5n,"ElkGraphAdapters/ElkLabelAdapter",630),wAn(629,553,{680:1},YN),MWn.wf=function(){return nyn(this)},MWn.Af=function(){var n;return!(n=BB(ZAn(this.f,(sWn(),$St)),142))&&(n=new lm),n},MWn.Cf=function(){return tyn(this)},MWn.Ef=function(n){var t;t=new A_(n),Jpn(this.f,(sWn(),$St),t)},MWn.Ff=function(n){Jpn(this.f,(sWn(),XSt),new O_(n))},MWn.yf=function(){return this.d},MWn.zf=function(){var n,t;if(!this.a)for(this.a=new Np,t=new oz(ZL(wLn(BB(this.f,33)).a.Kc(),new h));dAn(t);)n=BB(U5(t),79),WB(this.a,new Ag(n));return this.a},MWn.Bf=function(){var n,t;if(!this.c)for(this.c=new Np,t=new oz(ZL(dLn(BB(this.f,33)).a.Kc(),new h));dAn(t);)n=BB(U5(t),79),WB(this.c,new Ag(n));return this.c},MWn.Df=function(){return 0!=JQ(BB(this.f,33)).i||qy(TD(BB(this.f,33).We((sWn(),SSt))))},MWn.Gf=function(){_7(this,(GM(),lOt))},MWn.a=null,MWn.b=null,MWn.c=null,MWn.d=null,MWn.e=null,vX(H5n,"ElkGraphAdapters/ElkNodeAdapter",629),wAn(1266,553,{838:1},op),MWn.wf=function(){return kyn(this)},MWn.zf=function(){var n,t;if(!this.a)for(this.a=sx(BB(this.f,118).xg().i),t=new AL(BB(this.f,118).xg());t.e!=t.i.gc();)n=BB(kpn(t),79),WB(this.a,new Ag(n));return this.a},MWn.Bf=function(){var n,t;if(!this.c)for(this.c=sx(BB(this.f,118).yg().i),t=new AL(BB(this.f,118).yg());t.e!=t.i.gc();)n=BB(kpn(t),79),WB(this.c,new Ag(n));return this.c},MWn.Hf=function(){return BB(BB(this.f,118).We((sWn(),wPt)),61)},MWn.If=function(){var n,t,e,i,r,c,a;for(i=WY(BB(this.f,118)),e=new AL(BB(this.f,118).yg());e.e!=e.i.gc();)for(a=new AL((!(n=BB(kpn(e),79)).c&&(n.c=new hK(KOt,n,5,8)),n.c));a.e!=a.i.gc();){if(Ctn(PTn(c=BB(kpn(a),82)),i))return!0;if(PTn(c)==i&&qy(TD(ZAn(n,(sWn(),PSt)))))return!0}for(t=new AL(BB(this.f,118).xg());t.e!=t.i.gc();)for(r=new AL((!(n=BB(kpn(t),79)).b&&(n.b=new hK(KOt,n,4,7)),n.b));r.e!=r.i.gc();)if(Ctn(PTn(BB(kpn(r),82)),i))return!0;return!1},MWn.a=null,MWn.b=null,MWn.c=null,vX(H5n,"ElkGraphAdapters/ElkPortAdapter",1266),wAn(1267,1,MJn,to),MWn.ue=function(n,t){return GRn(BB(n,118),BB(t,118))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(H5n,"ElkGraphAdapters/PortComparator",1267);var dOt,gOt,pOt,vOt,mOt,yOt,kOt,jOt,EOt,TOt,MOt,SOt,POt,COt,IOt,OOt,AOt,$Ot,LOt=bq(q5n,"EObject"),NOt=bq(G5n,z5n),xOt=bq(G5n,U5n),DOt=bq(G5n,X5n),ROt=bq(G5n,"ElkShape"),KOt=bq(G5n,W5n),_Ot=bq(G5n,V5n),FOt=bq(G5n,Q5n),BOt=bq(q5n,J5n),HOt=bq(q5n,"EFactory"),qOt=bq(q5n,Y5n),GOt=bq(q5n,"EPackage"),zOt=bq(G5n,Z5n),UOt=bq(G5n,n6n),XOt=bq(G5n,t6n);wAn(90,1,e6n),MWn.Jg=function(){return this.Kg(),null},MWn.Kg=function(){return null},MWn.Lg=function(){return this.Kg(),!1},MWn.Mg=function(){return!1},MWn.Ng=function(n){ban(this,n)},vX(i6n,"BasicNotifierImpl",90),wAn(97,90,f6n),MWn.nh=function(){return mA(this)},MWn.Og=function(n,t){return n},MWn.Pg=function(){throw Hp(new pv)},MWn.Qg=function(n){var t;return t=Cvn(BB(itn(this.Tg(),this.Vg()),18)),this.eh().ih(this,t.n,t.f,n)},MWn.Rg=function(n,t){throw Hp(new pv)},MWn.Sg=function(n,t,e){return T_n(this,n,t,e)},MWn.Tg=function(){var n;return this.Pg()&&(n=this.Pg().ck())?n:this.zh()},MWn.Ug=function(){return cAn(this)},MWn.Vg=function(){throw Hp(new pv)},MWn.Wg=function(){var n,t;return!(t=this.ph().dk())&&this.Pg().ik((QM(),t=null==(n=lY(qFn(this.Tg())))?N$t:new QN(this,n))),t},MWn.Xg=function(n,t){return n},MWn.Yg=function(n){return n.Gj()?n.aj():Awn(this.Tg(),n)},MWn.Zg=function(){var n;return(n=this.Pg())?n.fk():null},MWn.$g=function(){return this.Pg()?this.Pg().ck():null},MWn._g=function(n,t,e){return Zpn(this,n,t,e)},MWn.ah=function(n){return S9(this,n)},MWn.bh=function(n,t){return V5(this,n,t)},MWn.dh=function(){var n;return!!(n=this.Pg())&&n.gk()},MWn.eh=function(){throw Hp(new pv)},MWn.fh=function(){return Jdn(this)},MWn.gh=function(n,t,e,i){return Npn(this,n,t,i)},MWn.hh=function(n,t,e){return BB(itn(this.Tg(),t),66).Nj().Qj(this,this.yh(),t-this.Ah(),n,e)},MWn.ih=function(n,t,e,i){return oY(this,n,t,i)},MWn.jh=function(n,t,e){return BB(itn(this.Tg(),t),66).Nj().Rj(this,this.yh(),t-this.Ah(),n,e)},MWn.kh=function(){return!!this.Pg()&&!!this.Pg().ek()},MWn.lh=function(n){return vpn(this,n)},MWn.mh=function(n){return ZY(this,n)},MWn.oh=function(n){return _qn(this,n)},MWn.ph=function(){throw Hp(new pv)},MWn.qh=function(){return this.Pg()?this.Pg().ek():null},MWn.rh=function(){return Jdn(this)},MWn.sh=function(n,t){yCn(this,n,t)},MWn.th=function(n){this.ph().hk(n)},MWn.uh=function(n){this.ph().kk(n)},MWn.vh=function(n){this.ph().jk(n)},MWn.wh=function(n,t){var e,i,r,c;return(c=this.Zg())&&n&&(t=_pn(c.Vk(),this,t),c.Zk(this)),(i=this.eh())&&(0!=(gKn(this,this.eh(),this.Vg()).Bb&BQn)?(r=i.fh())&&(n?!c&&r.Zk(this):r.Yk(this)):(t=(e=this.Vg())>=0?this.Qg(t):this.eh().ih(this,-1-e,null,t),t=this.Sg(null,-1,t))),this.uh(n),t},MWn.xh=function(n){var t,e,i,r,c,a,u;if((c=Awn(e=this.Tg(),n))>=(t=this.Ah()))return BB(n,66).Nj().Uj(this,this.yh(),c-t);if(c<=-1){if(!(a=Fqn((IPn(),Z$t),e,n)))throw Hp(new _y(r6n+n.ne()+u6n));if(ZM(),BB(a,66).Oj()||(a=Z1(B7(Z$t,a))),r=BB((i=this.Yg(a))>=0?this._g(i,!0,!0):cOn(this,a,!0),153),(u=a.Zj())>1||-1==u)return BB(BB(r,215).hl(n,!1),76)}else if(n.$j())return BB((i=this.Yg(n))>=0?this._g(i,!1,!0):cOn(this,n,!1),76);return new II(this,n)},MWn.yh=function(){return Q7(this)},MWn.zh=function(){return(QX(),t$t).S},MWn.Ah=function(){return bX(this.zh())},MWn.Bh=function(n){mPn(this,n)},MWn.Ib=function(){return P$n(this)},vX(l6n,"BasicEObjectImpl",97),wAn(114,97,{105:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1}),MWn.Ch=function(n){return J7(this)[n]},MWn.Dh=function(n,t){$X(J7(this),n,t)},MWn.Eh=function(n){$X(J7(this),n,null)},MWn.Jg=function(){return BB(yan(this,4),126)},MWn.Kg=function(){throw Hp(new pv)},MWn.Lg=function(){return 0!=(4&this.Db)},MWn.Pg=function(){throw Hp(new pv)},MWn.Fh=function(n){hgn(this,2,n)},MWn.Rg=function(n,t){this.Db=t<<16|255&this.Db,this.Fh(n)},MWn.Tg=function(){return jJ(this)},MWn.Vg=function(){return this.Db>>16},MWn.Wg=function(){var n;return QM(),null==(n=lY(qFn(BB(yan(this,16),26)||this.zh())))?N$t:new QN(this,n)},MWn.Mg=function(){return 0==(1&this.Db)},MWn.Zg=function(){return BB(yan(this,128),1935)},MWn.$g=function(){return BB(yan(this,16),26)},MWn.dh=function(){return 0!=(32&this.Db)},MWn.eh=function(){return BB(yan(this,2),49)},MWn.kh=function(){return 0!=(64&this.Db)},MWn.ph=function(){throw Hp(new pv)},MWn.qh=function(){return BB(yan(this,64),281)},MWn.th=function(n){hgn(this,16,n)},MWn.uh=function(n){hgn(this,128,n)},MWn.vh=function(n){hgn(this,64,n)},MWn.yh=function(){return fgn(this)},MWn.Db=0,vX(l6n,"MinimalEObjectImpl",114),wAn(115,114,{105:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),MWn.Fh=function(n){this.Cb=n},MWn.eh=function(){return this.Cb},vX(l6n,"MinimalEObjectImpl/Container",115),wAn(1985,115,{105:1,413:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),MWn._g=function(n,t,e){return Eyn(this,n,t,e)},MWn.jh=function(n,t,e){return eSn(this,n,t,e)},MWn.lh=function(n){return m0(this,n)},MWn.sh=function(n,t){rsn(this,n,t)},MWn.zh=function(){return CXn(),POt},MWn.Bh=function(n){zun(this,n)},MWn.Ve=function(){return lpn(this)},MWn.We=function(n){return ZAn(this,n)},MWn.Xe=function(n){return P8(this,n)},MWn.Ye=function(n,t){return Jpn(this,n,t)},vX(b6n,"EMapPropertyHolderImpl",1985),wAn(567,115,{105:1,469:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},ro),MWn._g=function(n,t,e){switch(n){case 0:return this.a;case 1:return this.b}return Zpn(this,n,t,e)},MWn.lh=function(n){switch(n){case 0:return 0!=this.a;case 1:return 0!=this.b}return vpn(this,n)},MWn.sh=function(n,t){switch(n){case 0:return void jen(this,Gy(MD(t)));case 1:return void Een(this,Gy(MD(t)))}yCn(this,n,t)},MWn.zh=function(){return CXn(),pOt},MWn.Bh=function(n){switch(n){case 0:return void jen(this,0);case 1:return void Een(this,0)}mPn(this,n)},MWn.Ib=function(){var n;return 0!=(64&this.Db)?P$n(this):((n=new fN(P$n(this))).a+=" (x: ",vE(n,this.a),n.a+=", y: ",vE(n,this.b),n.a+=")",n.a)},MWn.a=0,MWn.b=0,vX(b6n,"ElkBendPointImpl",567),wAn(723,1985,{105:1,413:1,160:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),MWn._g=function(n,t,e){return _fn(this,n,t,e)},MWn.hh=function(n,t,e){return FTn(this,n,t,e)},MWn.jh=function(n,t,e){return run(this,n,t,e)},MWn.lh=function(n){return Ean(this,n)},MWn.sh=function(n,t){Gjn(this,n,t)},MWn.zh=function(){return CXn(),kOt},MWn.Bh=function(n){ofn(this,n)},MWn.zg=function(){return this.k},MWn.Ag=function(){return mV(this)},MWn.Ib=function(){return Jln(this)},MWn.k=null,vX(b6n,"ElkGraphElementImpl",723),wAn(724,723,{105:1,413:1,160:1,470:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),MWn._g=function(n,t,e){return Rbn(this,n,t,e)},MWn.lh=function(n){return fwn(this,n)},MWn.sh=function(n,t){zjn(this,n,t)},MWn.zh=function(){return CXn(),SOt},MWn.Bh=function(n){Dwn(this,n)},MWn.Bg=function(){return this.f},MWn.Cg=function(){return this.g},MWn.Dg=function(){return this.i},MWn.Eg=function(){return this.j},MWn.Fg=function(n,t){MA(this,n,t)},MWn.Gg=function(n,t){SA(this,n,t)},MWn.Hg=function(n){Pen(this,n)},MWn.Ig=function(n){Cen(this,n)},MWn.Ib=function(){return mSn(this)},MWn.f=0,MWn.g=0,MWn.i=0,MWn.j=0,vX(b6n,"ElkShapeImpl",724),wAn(725,724,{105:1,413:1,82:1,160:1,470:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1}),MWn._g=function(n,t,e){return Hvn(this,n,t,e)},MWn.hh=function(n,t,e){return djn(this,n,t,e)},MWn.jh=function(n,t,e){return gjn(this,n,t,e)},MWn.lh=function(n){return Gon(this,n)},MWn.sh=function(n,t){LAn(this,n,t)},MWn.zh=function(){return CXn(),vOt},MWn.Bh=function(n){xpn(this,n)},MWn.xg=function(){return!this.d&&(this.d=new hK(_Ot,this,8,5)),this.d},MWn.yg=function(){return!this.e&&(this.e=new hK(_Ot,this,7,4)),this.e},vX(b6n,"ElkConnectableShapeImpl",725),wAn(352,723,{105:1,413:1,79:1,160:1,352:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},io),MWn.Qg=function(n){return Mkn(this,n)},MWn._g=function(n,t,e){switch(n){case 3:return XY(this);case 4:return!this.b&&(this.b=new hK(KOt,this,4,7)),this.b;case 5:return!this.c&&(this.c=new hK(KOt,this,5,8)),this.c;case 6:return!this.a&&(this.a=new eU(FOt,this,6,6)),this.a;case 7:return hN(),!this.b&&(this.b=new hK(KOt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new hK(KOt,this,5,8)),this.c.i<=1));case 8:return hN(),!!nAn(this);case 9:return hN(),!!QIn(this);case 10:return hN(),!this.b&&(this.b=new hK(KOt,this,4,7)),0!=this.b.i&&(!this.c&&(this.c=new hK(KOt,this,5,8)),0!=this.c.i)}return _fn(this,n,t,e)},MWn.hh=function(n,t,e){var i;switch(t){case 3:return this.Cb&&(e=(i=this.Db>>16)>=0?Mkn(this,e):this.Cb.ih(this,-1-i,null,e)),VD(this,BB(n,33),e);case 4:return!this.b&&(this.b=new hK(KOt,this,4,7)),Jwn(this.b,n,e);case 5:return!this.c&&(this.c=new hK(KOt,this,5,8)),Jwn(this.c,n,e);case 6:return!this.a&&(this.a=new eU(FOt,this,6,6)),Jwn(this.a,n,e)}return FTn(this,n,t,e)},MWn.jh=function(n,t,e){switch(t){case 3:return VD(this,null,e);case 4:return!this.b&&(this.b=new hK(KOt,this,4,7)),_pn(this.b,n,e);case 5:return!this.c&&(this.c=new hK(KOt,this,5,8)),_pn(this.c,n,e);case 6:return!this.a&&(this.a=new eU(FOt,this,6,6)),_pn(this.a,n,e)}return run(this,n,t,e)},MWn.lh=function(n){switch(n){case 3:return!!XY(this);case 4:return!!this.b&&0!=this.b.i;case 5:return!!this.c&&0!=this.c.i;case 6:return!!this.a&&0!=this.a.i;case 7:return!this.b&&(this.b=new hK(KOt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new hK(KOt,this,5,8)),this.c.i<=1));case 8:return nAn(this);case 9:return QIn(this);case 10:return!this.b&&(this.b=new hK(KOt,this,4,7)),0!=this.b.i&&(!this.c&&(this.c=new hK(KOt,this,5,8)),0!=this.c.i)}return Ean(this,n)},MWn.sh=function(n,t){switch(n){case 3:return void HLn(this,BB(t,33));case 4:return!this.b&&(this.b=new hK(KOt,this,4,7)),sqn(this.b),!this.b&&(this.b=new hK(KOt,this,4,7)),void pX(this.b,BB(t,14));case 5:return!this.c&&(this.c=new hK(KOt,this,5,8)),sqn(this.c),!this.c&&(this.c=new hK(KOt,this,5,8)),void pX(this.c,BB(t,14));case 6:return!this.a&&(this.a=new eU(FOt,this,6,6)),sqn(this.a),!this.a&&(this.a=new eU(FOt,this,6,6)),void pX(this.a,BB(t,14))}Gjn(this,n,t)},MWn.zh=function(){return CXn(),mOt},MWn.Bh=function(n){switch(n){case 3:return void HLn(this,null);case 4:return!this.b&&(this.b=new hK(KOt,this,4,7)),void sqn(this.b);case 5:return!this.c&&(this.c=new hK(KOt,this,5,8)),void sqn(this.c);case 6:return!this.a&&(this.a=new eU(FOt,this,6,6)),void sqn(this.a)}ofn(this,n)},MWn.Ib=function(){return lHn(this)},vX(b6n,"ElkEdgeImpl",352),wAn(439,1985,{105:1,413:1,202:1,439:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},co),MWn.Qg=function(n){return skn(this,n)},MWn._g=function(n,t,e){switch(n){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new $L(xOt,this,5)),this.a;case 6:return VY(this);case 7:return t?Pvn(this):this.i;case 8:return t?Svn(this):this.f;case 9:return!this.g&&(this.g=new hK(FOt,this,9,10)),this.g;case 10:return!this.e&&(this.e=new hK(FOt,this,10,9)),this.e;case 11:return this.d}return Eyn(this,n,t,e)},MWn.hh=function(n,t,e){var i;switch(t){case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?skn(this,e):this.Cb.ih(this,-1-i,null,e)),QD(this,BB(n,79),e);case 9:return!this.g&&(this.g=new hK(FOt,this,9,10)),Jwn(this.g,n,e);case 10:return!this.e&&(this.e=new hK(FOt,this,10,9)),Jwn(this.e,n,e)}return BB(itn(BB(yan(this,16),26)||(CXn(),yOt),t),66).Nj().Qj(this,fgn(this),t-bX((CXn(),yOt)),n,e)},MWn.jh=function(n,t,e){switch(t){case 5:return!this.a&&(this.a=new $L(xOt,this,5)),_pn(this.a,n,e);case 6:return QD(this,null,e);case 9:return!this.g&&(this.g=new hK(FOt,this,9,10)),_pn(this.g,n,e);case 10:return!this.e&&(this.e=new hK(FOt,this,10,9)),_pn(this.e,n,e)}return eSn(this,n,t,e)},MWn.lh=function(n){switch(n){case 1:return 0!=this.j;case 2:return 0!=this.k;case 3:return 0!=this.b;case 4:return 0!=this.c;case 5:return!!this.a&&0!=this.a.i;case 6:return!!VY(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&0!=this.g.i;case 10:return!!this.e&&0!=this.e.i;case 11:return null!=this.d}return m0(this,n)},MWn.sh=function(n,t){switch(n){case 1:return void Ien(this,Gy(MD(t)));case 2:return void Aen(this,Gy(MD(t)));case 3:return void Ten(this,Gy(MD(t)));case 4:return void Oen(this,Gy(MD(t)));case 5:return!this.a&&(this.a=new $L(xOt,this,5)),sqn(this.a),!this.a&&(this.a=new $L(xOt,this,5)),void pX(this.a,BB(t,14));case 6:return void FLn(this,BB(t,79));case 7:return void Nin(this,BB(t,82));case 8:return void Lin(this,BB(t,82));case 9:return!this.g&&(this.g=new hK(FOt,this,9,10)),sqn(this.g),!this.g&&(this.g=new hK(FOt,this,9,10)),void pX(this.g,BB(t,14));case 10:return!this.e&&(this.e=new hK(FOt,this,10,9)),sqn(this.e),!this.e&&(this.e=new hK(FOt,this,10,9)),void pX(this.e,BB(t,14));case 11:return void crn(this,SD(t))}rsn(this,n,t)},MWn.zh=function(){return CXn(),yOt},MWn.Bh=function(n){switch(n){case 1:return void Ien(this,0);case 2:return void Aen(this,0);case 3:return void Ten(this,0);case 4:return void Oen(this,0);case 5:return!this.a&&(this.a=new $L(xOt,this,5)),void sqn(this.a);case 6:return void FLn(this,null);case 7:return void Nin(this,null);case 8:return void Lin(this,null);case 9:return!this.g&&(this.g=new hK(FOt,this,9,10)),void sqn(this.g);case 10:return!this.e&&(this.e=new hK(FOt,this,10,9)),void sqn(this.e);case 11:return void crn(this,null)}zun(this,n)},MWn.Ib=function(){return ROn(this)},MWn.b=0,MWn.c=0,MWn.d=null,MWn.j=0,MWn.k=0,vX(b6n,"ElkEdgeSectionImpl",439),wAn(150,115,{105:1,92:1,90:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1}),MWn._g=function(n,t,e){return 0==n?(!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab):U9(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n),t,e)},MWn.hh=function(n,t,e){return 0==t?(!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),Jwn(this.Ab,n,e)):BB(itn(BB(yan(this,16),26)||this.zh(),t),66).Nj().Qj(this,fgn(this),t-bX(this.zh()),n,e)},MWn.jh=function(n,t,e){return 0==t?(!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e)):BB(itn(BB(yan(this,16),26)||this.zh(),t),66).Nj().Rj(this,fgn(this),t-bX(this.zh()),n,e)},MWn.lh=function(n){return 0==n?!!this.Ab&&0!=this.Ab.i:O3(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n))},MWn.oh=function(n){return hUn(this,n)},MWn.sh=function(n,t){if(0===n)return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));Lbn(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n),t)},MWn.uh=function(n){hgn(this,128,n)},MWn.zh=function(){return gWn(),b$t},MWn.Bh=function(n){if(0===n)return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);qfn(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n))},MWn.Gh=function(){this.Bb|=1},MWn.Hh=function(n){return N_n(this,n)},MWn.Bb=0,vX(l6n,"EModelElementImpl",150),wAn(704,150,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1},Rf),MWn.Ih=function(n,t){return qGn(this,n,t)},MWn.Jh=function(n){var t,e,i,r;if(this.a!=Utn(n)||0!=(256&n.Bb))throw Hp(new _y(m6n+n.zb+g6n));for(e=kJ(n);0!=a4(e.a).i;){if(iyn(t=BB(eGn(e,0,cL(r=BB(Wtn(a4(e.a),0),87).c,88)?BB(r,26):(gWn(),d$t)),26)))return BB(i=Utn(t).Nh().Jh(t),49).th(n),i;e=kJ(t)}return"java.util.Map$Entry"==(null!=n.D?n.D:n.B)?new fq(n):new jH(n)},MWn.Kh=function(n,t){return xXn(this,n,t)},MWn._g=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.a}return U9(this,n-bX((gWn(),h$t)),itn(BB(yan(this,16),26)||h$t,n),t,e)},MWn.hh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),Jwn(this.Ab,n,e);case 1:return this.a&&(e=BB(this.a,49).ih(this,4,GOt,e)),Yhn(this,BB(n,235),e)}return BB(itn(BB(yan(this,16),26)||(gWn(),h$t),t),66).Nj().Qj(this,fgn(this),t-bX((gWn(),h$t)),n,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 1:return Yhn(this,null,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),h$t),t),66).Nj().Rj(this,fgn(this),t-bX((gWn(),h$t)),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return!!this.a}return O3(this,n-bX((gWn(),h$t)),itn(BB(yan(this,16),26)||h$t,n))},MWn.sh=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void xMn(this,BB(t,235))}Lbn(this,n-bX((gWn(),h$t)),itn(BB(yan(this,16),26)||h$t,n),t)},MWn.zh=function(){return gWn(),h$t},MWn.Bh=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return void xMn(this,null)}qfn(this,n-bX((gWn(),h$t)),itn(BB(yan(this,16),26)||h$t,n))},vX(l6n,"EFactoryImpl",704),wAn(k6n,704,{105:1,2014:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1},ao),MWn.Ih=function(n,t){switch(n.yj()){case 12:return BB(t,146).tg();case 13:return Bbn(t);default:throw Hp(new _y(d6n+n.ne()+g6n))}},MWn.Jh=function(n){var t;switch(-1==n.G&&(n.G=(t=Utn(n))?uvn(t.Mh(),n):-1),n.G){case 4:return new uo;case 6:return new jm;case 7:return new Em;case 8:return new io;case 9:return new ro;case 10:return new co;case 11:return new so;default:throw Hp(new _y(m6n+n.zb+g6n))}},MWn.Kh=function(n,t){switch(n.yj()){case 13:case 12:return null;default:throw Hp(new _y(d6n+n.ne()+g6n))}},vX(b6n,"ElkGraphFactoryImpl",k6n),wAn(438,150,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1}),MWn.Wg=function(){var n;return null==(n=lY(qFn(BB(yan(this,16),26)||this.zh())))?(QM(),QM(),N$t):new Wx(this,n)},MWn._g=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.ne()}return U9(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n),t,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb}return O3(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n))},MWn.sh=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void this.Lh(SD(t))}Lbn(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n),t)},MWn.zh=function(){return gWn(),w$t},MWn.Bh=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return void this.Lh(null)}qfn(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n))},MWn.ne=function(){return this.zb},MWn.Lh=function(n){Nrn(this,n)},MWn.Ib=function(){return kfn(this)},MWn.zb=null,vX(l6n,"ENamedElementImpl",438),wAn(179,438,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1},vJ),MWn.Qg=function(n){return wkn(this,n)},MWn._g=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new Yz(this,HAt,this)),this.rb;case 6:return!this.vb&&(this.vb=new eK(GOt,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?BB(this.Cb,235):null:QY(this)}return U9(this,n-bX((gWn(),v$t)),itn(BB(yan(this,16),26)||v$t,n),t,e)},MWn.hh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),Jwn(this.Ab,n,e);case 4:return this.sb&&(e=BB(this.sb,49).ih(this,1,HOt,e)),jfn(this,BB(n,471),e);case 5:return!this.rb&&(this.rb=new Yz(this,HAt,this)),Jwn(this.rb,n,e);case 6:return!this.vb&&(this.vb=new eK(GOt,this,6,7)),Jwn(this.vb,n,e);case 7:return this.Cb&&(e=(i=this.Db>>16)>=0?wkn(this,e):this.Cb.ih(this,-1-i,null,e)),T_n(this,n,7,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),v$t),t),66).Nj().Qj(this,fgn(this),t-bX((gWn(),v$t)),n,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 4:return jfn(this,null,e);case 5:return!this.rb&&(this.rb=new Yz(this,HAt,this)),_pn(this.rb,n,e);case 6:return!this.vb&&(this.vb=new eK(GOt,this,6,7)),_pn(this.vb,n,e);case 7:return T_n(this,null,7,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),v$t),t),66).Nj().Rj(this,fgn(this),t-bX((gWn(),v$t)),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.yb;case 3:return null!=this.xb;case 4:return!!this.sb;case 5:return!!this.rb&&0!=this.rb.i;case 6:return!!this.vb&&0!=this.vb.i;case 7:return!!QY(this)}return O3(this,n-bX((gWn(),v$t)),itn(BB(yan(this,16),26)||v$t,n))},MWn.oh=function(n){return LNn(this,n)||hUn(this,n)},MWn.sh=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void Nrn(this,SD(t));case 2:return void Drn(this,SD(t));case 3:return void xrn(this,SD(t));case 4:return void iSn(this,BB(t,471));case 5:return!this.rb&&(this.rb=new Yz(this,HAt,this)),sqn(this.rb),!this.rb&&(this.rb=new Yz(this,HAt,this)),void pX(this.rb,BB(t,14));case 6:return!this.vb&&(this.vb=new eK(GOt,this,6,7)),sqn(this.vb),!this.vb&&(this.vb=new eK(GOt,this,6,7)),void pX(this.vb,BB(t,14))}Lbn(this,n-bX((gWn(),v$t)),itn(BB(yan(this,16),26)||v$t,n),t)},MWn.vh=function(n){var t,e;if(n&&this.rb)for(e=new AL(this.rb);e.e!=e.i.gc();)cL(t=kpn(e),351)&&(BB(t,351).w=null);hgn(this,64,n)},MWn.zh=function(){return gWn(),v$t},MWn.Bh=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return void Nrn(this,null);case 2:return void Drn(this,null);case 3:return void xrn(this,null);case 4:return void iSn(this,null);case 5:return!this.rb&&(this.rb=new Yz(this,HAt,this)),void sqn(this.rb);case 6:return!this.vb&&(this.vb=new eK(GOt,this,6,7)),void sqn(this.vb)}qfn(this,n-bX((gWn(),v$t)),itn(BB(yan(this,16),26)||v$t,n))},MWn.Gh=function(){Tyn(this)},MWn.Mh=function(){return!this.rb&&(this.rb=new Yz(this,HAt,this)),this.rb},MWn.Nh=function(){return this.sb},MWn.Oh=function(){return this.ub},MWn.Ph=function(){return this.xb},MWn.Qh=function(){return this.yb},MWn.Rh=function(n){this.ub=n},MWn.Ib=function(){var n;return 0!=(64&this.Db)?kfn(this):((n=new fN(kfn(this))).a+=" (nsURI: ",cO(n,this.yb),n.a+=", nsPrefix: ",cO(n,this.xb),n.a+=")",n.a)},MWn.xb=null,MWn.yb=null,vX(l6n,"EPackageImpl",179),wAn(555,179,{105:1,2016:1,555:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1},sAn),MWn.q=!1,MWn.r=!1;var WOt=!1;vX(b6n,"ElkGraphPackageImpl",555),wAn(354,724,{105:1,413:1,160:1,137:1,470:1,354:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},uo),MWn.Qg=function(n){return hkn(this,n)},MWn._g=function(n,t,e){switch(n){case 7:return JY(this);case 8:return this.a}return Rbn(this,n,t,e)},MWn.hh=function(n,t,e){var i;return 7===t?(this.Cb&&(e=(i=this.Db>>16)>=0?hkn(this,e):this.Cb.ih(this,-1-i,null,e)),VG(this,BB(n,160),e)):FTn(this,n,t,e)},MWn.jh=function(n,t,e){return 7==t?VG(this,null,e):run(this,n,t,e)},MWn.lh=function(n){switch(n){case 7:return!!JY(this);case 8:return!mK("",this.a)}return fwn(this,n)},MWn.sh=function(n,t){switch(n){case 7:return void INn(this,BB(t,160));case 8:return void xin(this,SD(t))}zjn(this,n,t)},MWn.zh=function(){return CXn(),jOt},MWn.Bh=function(n){switch(n){case 7:return void INn(this,null);case 8:return void xin(this,"")}Dwn(this,n)},MWn.Ib=function(){return cPn(this)},MWn.a="",vX(b6n,"ElkLabelImpl",354),wAn(239,725,{105:1,413:1,82:1,160:1,33:1,470:1,239:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},jm),MWn.Qg=function(n){return Skn(this,n)},MWn._g=function(n,t,e){switch(n){case 9:return!this.c&&(this.c=new eU(XOt,this,9,9)),this.c;case 10:return!this.a&&(this.a=new eU(UOt,this,10,11)),this.a;case 11:return YY(this);case 12:return!this.b&&(this.b=new eU(_Ot,this,12,3)),this.b;case 13:return hN(),!this.a&&(this.a=new eU(UOt,this,10,11)),this.a.i>0}return Hvn(this,n,t,e)},MWn.hh=function(n,t,e){var i;switch(t){case 9:return!this.c&&(this.c=new eU(XOt,this,9,9)),Jwn(this.c,n,e);case 10:return!this.a&&(this.a=new eU(UOt,this,10,11)),Jwn(this.a,n,e);case 11:return this.Cb&&(e=(i=this.Db>>16)>=0?Skn(this,e):this.Cb.ih(this,-1-i,null,e)),zR(this,BB(n,33),e);case 12:return!this.b&&(this.b=new eU(_Ot,this,12,3)),Jwn(this.b,n,e)}return djn(this,n,t,e)},MWn.jh=function(n,t,e){switch(t){case 9:return!this.c&&(this.c=new eU(XOt,this,9,9)),_pn(this.c,n,e);case 10:return!this.a&&(this.a=new eU(UOt,this,10,11)),_pn(this.a,n,e);case 11:return zR(this,null,e);case 12:return!this.b&&(this.b=new eU(_Ot,this,12,3)),_pn(this.b,n,e)}return gjn(this,n,t,e)},MWn.lh=function(n){switch(n){case 9:return!!this.c&&0!=this.c.i;case 10:return!!this.a&&0!=this.a.i;case 11:return!!YY(this);case 12:return!!this.b&&0!=this.b.i;case 13:return!this.a&&(this.a=new eU(UOt,this,10,11)),this.a.i>0}return Gon(this,n)},MWn.sh=function(n,t){switch(n){case 9:return!this.c&&(this.c=new eU(XOt,this,9,9)),sqn(this.c),!this.c&&(this.c=new eU(XOt,this,9,9)),void pX(this.c,BB(t,14));case 10:return!this.a&&(this.a=new eU(UOt,this,10,11)),sqn(this.a),!this.a&&(this.a=new eU(UOt,this,10,11)),void pX(this.a,BB(t,14));case 11:return void nNn(this,BB(t,33));case 12:return!this.b&&(this.b=new eU(_Ot,this,12,3)),sqn(this.b),!this.b&&(this.b=new eU(_Ot,this,12,3)),void pX(this.b,BB(t,14))}LAn(this,n,t)},MWn.zh=function(){return CXn(),EOt},MWn.Bh=function(n){switch(n){case 9:return!this.c&&(this.c=new eU(XOt,this,9,9)),void sqn(this.c);case 10:return!this.a&&(this.a=new eU(UOt,this,10,11)),void sqn(this.a);case 11:return void nNn(this,null);case 12:return!this.b&&(this.b=new eU(_Ot,this,12,3)),void sqn(this.b)}xpn(this,n)},MWn.Ib=function(){return zRn(this)},vX(b6n,"ElkNodeImpl",239),wAn(186,725,{105:1,413:1,82:1,160:1,118:1,470:1,186:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},Em),MWn.Qg=function(n){return fkn(this,n)},MWn._g=function(n,t,e){return 9==n?WY(this):Hvn(this,n,t,e)},MWn.hh=function(n,t,e){var i;return 9===t?(this.Cb&&(e=(i=this.Db>>16)>=0?fkn(this,e):this.Cb.ih(this,-1-i,null,e)),JD(this,BB(n,33),e)):djn(this,n,t,e)},MWn.jh=function(n,t,e){return 9==t?JD(this,null,e):gjn(this,n,t,e)},MWn.lh=function(n){return 9==n?!!WY(this):Gon(this,n)},MWn.sh=function(n,t){9!==n?LAn(this,n,t):BLn(this,BB(t,33))},MWn.zh=function(){return CXn(),TOt},MWn.Bh=function(n){9!==n?xpn(this,n):BLn(this,null)},MWn.Ib=function(){return URn(this)},vX(b6n,"ElkPortImpl",186);var VOt=bq(B6n,"BasicEMap/Entry");wAn(1092,115,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1,114:1,115:1},so),MWn.Fb=function(n){return this===n},MWn.cd=function(){return this.b},MWn.Hb=function(){return PN(this)},MWn.Uh=function(n){Din(this,BB(n,146))},MWn._g=function(n,t,e){switch(n){case 0:return this.b;case 1:return this.c}return Zpn(this,n,t,e)},MWn.lh=function(n){switch(n){case 0:return!!this.b;case 1:return null!=this.c}return vpn(this,n)},MWn.sh=function(n,t){switch(n){case 0:return void Din(this,BB(t,146));case 1:return void _in(this,t)}yCn(this,n,t)},MWn.zh=function(){return CXn(),MOt},MWn.Bh=function(n){switch(n){case 0:return void Din(this,null);case 1:return void _in(this,null)}mPn(this,n)},MWn.Sh=function(){var n;return-1==this.a&&(n=this.b,this.a=n?nsn(n):0),this.a},MWn.dd=function(){return this.c},MWn.Th=function(n){this.a=n},MWn.ed=function(n){var t;return t=this.c,_in(this,n),t},MWn.Ib=function(){var n;return 0!=(64&this.Db)?P$n(this):(oO(oO(oO(n=new Ck,this.b?this.b.tg():zWn),e1n),kN(this.c)),n.a)},MWn.a=-1,MWn.c=null;var QOt,JOt,YOt,ZOt,nAt,tAt,eAt,iAt,rAt=vX(b6n,"ElkPropertyToValueMapEntryImpl",1092);wAn(984,1,{},lo),vX(G6n,"JsonAdapter",984),wAn(210,60,BVn,ek),vX(G6n,"JsonImportException",210),wAn(857,1,{},dkn),vX(G6n,"JsonImporter",857),wAn(891,1,{},aI),vX(G6n,"JsonImporter/lambda$0$Type",891),wAn(892,1,{},uI),vX(G6n,"JsonImporter/lambda$1$Type",892),wAn(900,1,{},$g),vX(G6n,"JsonImporter/lambda$10$Type",900),wAn(902,1,{},oI),vX(G6n,"JsonImporter/lambda$11$Type",902),wAn(903,1,{},sI),vX(G6n,"JsonImporter/lambda$12$Type",903),wAn(909,1,{},fQ),vX(G6n,"JsonImporter/lambda$13$Type",909),wAn(908,1,{},hQ),vX(G6n,"JsonImporter/lambda$14$Type",908),wAn(904,1,{},hI),vX(G6n,"JsonImporter/lambda$15$Type",904),wAn(905,1,{},fI),vX(G6n,"JsonImporter/lambda$16$Type",905),wAn(906,1,{},lI),vX(G6n,"JsonImporter/lambda$17$Type",906),wAn(907,1,{},bI),vX(G6n,"JsonImporter/lambda$18$Type",907),wAn(912,1,{},Lg),vX(G6n,"JsonImporter/lambda$19$Type",912),wAn(893,1,{},Ng),vX(G6n,"JsonImporter/lambda$2$Type",893),wAn(910,1,{},xg),vX(G6n,"JsonImporter/lambda$20$Type",910),wAn(911,1,{},Dg),vX(G6n,"JsonImporter/lambda$21$Type",911),wAn(915,1,{},Rg),vX(G6n,"JsonImporter/lambda$22$Type",915),wAn(913,1,{},Kg),vX(G6n,"JsonImporter/lambda$23$Type",913),wAn(914,1,{},_g),vX(G6n,"JsonImporter/lambda$24$Type",914),wAn(917,1,{},Fg),vX(G6n,"JsonImporter/lambda$25$Type",917),wAn(916,1,{},Bg),vX(G6n,"JsonImporter/lambda$26$Type",916),wAn(918,1,lVn,wI),MWn.td=function(n){E9(this.b,this.a,SD(n))},vX(G6n,"JsonImporter/lambda$27$Type",918),wAn(919,1,lVn,dI),MWn.td=function(n){T9(this.b,this.a,SD(n))},vX(G6n,"JsonImporter/lambda$28$Type",919),wAn(920,1,{},gI),vX(G6n,"JsonImporter/lambda$29$Type",920),wAn(896,1,{},Hg),vX(G6n,"JsonImporter/lambda$3$Type",896),wAn(921,1,{},pI),vX(G6n,"JsonImporter/lambda$30$Type",921),wAn(922,1,{},qg),vX(G6n,"JsonImporter/lambda$31$Type",922),wAn(923,1,{},Gg),vX(G6n,"JsonImporter/lambda$32$Type",923),wAn(924,1,{},zg),vX(G6n,"JsonImporter/lambda$33$Type",924),wAn(925,1,{},Ug),vX(G6n,"JsonImporter/lambda$34$Type",925),wAn(859,1,{},Xg),vX(G6n,"JsonImporter/lambda$35$Type",859),wAn(929,1,{},MB),vX(G6n,"JsonImporter/lambda$36$Type",929),wAn(926,1,lVn,Wg),MWn.td=function(n){J4(this.a,BB(n,469))},vX(G6n,"JsonImporter/lambda$37$Type",926),wAn(927,1,lVn,SI),MWn.td=function(n){lO(this.a,this.b,BB(n,202))},vX(G6n,"JsonImporter/lambda$38$Type",927),wAn(928,1,lVn,PI),MWn.td=function(n){bO(this.a,this.b,BB(n,202))},vX(G6n,"JsonImporter/lambda$39$Type",928),wAn(894,1,{},Vg),vX(G6n,"JsonImporter/lambda$4$Type",894),wAn(930,1,lVn,Qg),MWn.td=function(n){Y4(this.a,BB(n,8))},vX(G6n,"JsonImporter/lambda$40$Type",930),wAn(895,1,{},Jg),vX(G6n,"JsonImporter/lambda$5$Type",895),wAn(899,1,{},Yg),vX(G6n,"JsonImporter/lambda$6$Type",899),wAn(897,1,{},Zg),vX(G6n,"JsonImporter/lambda$7$Type",897),wAn(898,1,{},np),vX(G6n,"JsonImporter/lambda$8$Type",898),wAn(901,1,{},tp),vX(G6n,"JsonImporter/lambda$9$Type",901),wAn(948,1,lVn,ep),MWn.td=function(n){nW(this.a,new GX(SD(n)))},vX(G6n,"JsonMetaDataConverter/lambda$0$Type",948),wAn(949,1,lVn,ip),MWn.td=function(n){_X(this.a,BB(n,237))},vX(G6n,"JsonMetaDataConverter/lambda$1$Type",949),wAn(950,1,lVn,rp),MWn.td=function(n){t1(this.a,BB(n,149))},vX(G6n,"JsonMetaDataConverter/lambda$2$Type",950),wAn(951,1,lVn,cp),MWn.td=function(n){FX(this.a,BB(n,175))},vX(G6n,"JsonMetaDataConverter/lambda$3$Type",951),wAn(237,22,{3:1,35:1,22:1,237:1},MI);var cAt,aAt=Ben(IYn,"GraphFeature",237,Unt,Ktn,pB);wAn(13,1,{35:1,146:1},up,iR,$O,XA),MWn.wd=function(n){return pL(this,BB(n,146))},MWn.Fb=function(n){return EJ(this,n)},MWn.wg=function(){return mpn(this)},MWn.tg=function(){return this.b},MWn.Hb=function(){return vvn(this.b)},MWn.Ib=function(){return this.b},vX(IYn,"Property",13),wAn(818,1,MJn,ap),MWn.ue=function(n,t){return _ln(this,BB(n,94),BB(t,94))},MWn.Fb=function(n){return this===n},MWn.ve=function(){return new nw(this)},vX(IYn,"PropertyHolderComparator",818),wAn(695,1,QWn,sp),MWn.Nb=function(n){fU(this,n)},MWn.Pb=function(){return A9(this)},MWn.Qb=function(){uE()},MWn.Ob=function(){return!!this.a},vX(c8n,"ElkGraphUtil/AncestorIterator",695);var uAt=bq(B6n,"EList");wAn(67,52,{20:1,28:1,52:1,14:1,15:1,67:1,58:1}),MWn.Vc=function(n,t){sln(this,n,t)},MWn.Fc=function(n){return f9(this,n)},MWn.Wc=function(n,t){return oon(this,n,t)},MWn.Gc=function(n){return pX(this,n)},MWn.Zh=function(){return new ax(this)},MWn.$h=function(){return new ux(this)},MWn._h=function(n){return sin(this,n)},MWn.ai=function(){return!0},MWn.bi=function(n,t){},MWn.ci=function(){},MWn.di=function(n,t){L8(this,n,t)},MWn.ei=function(n,t,e){},MWn.fi=function(n,t){},MWn.gi=function(n,t,e){},MWn.Fb=function(n){return QDn(this,n)},MWn.Hb=function(){return Mun(this)},MWn.hi=function(){return!1},MWn.Kc=function(){return new AL(this)},MWn.Yc=function(){return new cx(this)},MWn.Zc=function(n){var t;if(t=this.gc(),n<0||n>t)throw Hp(new tK(n,t));return new GU(this,n)},MWn.ji=function(n,t){this.ii(n,this.Xc(t))},MWn.Mc=function(n){return snn(this,n)},MWn.li=function(n,t){return t},MWn._c=function(n,t){return ovn(this,n,t)},MWn.Ib=function(){return Ybn(this)},MWn.ni=function(){return!0},MWn.oi=function(n,t){return xsn(this,t)},vX(B6n,"AbstractEList",67),wAn(63,67,h8n,go,gtn,jcn),MWn.Vh=function(n,t){return BTn(this,n,t)},MWn.Wh=function(n){return bmn(this,n)},MWn.Xh=function(n,t){Ifn(this,n,t)},MWn.Yh=function(n){c6(this,n)},MWn.pi=function(n){return F9(this,n)},MWn.$b=function(){a6(this)},MWn.Hc=function(n){return Sjn(this,n)},MWn.Xb=function(n){return Wtn(this,n)},MWn.qi=function(n){var t,e,i;++this.j,n>(e=null==this.g?0:this.g.length)&&(i=this.g,(t=e+(e/2|0)+4)=0&&(this.$c(t),!0)},MWn.mi=function(n,t){return this.Ui(n,this.oi(n,t))},MWn.gc=function(){return this.Vi()},MWn.Pc=function(){return this.Wi()},MWn.Qc=function(n){return this.Xi(n)},MWn.Ib=function(){return this.Yi()},vX(B6n,"DelegatingEList",1995),wAn(1996,1995,n9n),MWn.Vh=function(n,t){return uFn(this,n,t)},MWn.Wh=function(n){return this.Vh(this.Vi(),n)},MWn.Xh=function(n,t){eAn(this,n,t)},MWn.Yh=function(n){OOn(this,n)},MWn.ai=function(){return!this.bj()},MWn.$b=function(){vqn(this)},MWn.Zi=function(n,t,e,i,r){return new NJ(this,n,t,e,i,r)},MWn.$i=function(n){ban(this.Ai(),n)},MWn._i=function(){return null},MWn.aj=function(){return-1},MWn.Ai=function(){return null},MWn.bj=function(){return!1},MWn.cj=function(n,t){return t},MWn.dj=function(n,t){return t},MWn.ej=function(){return!1},MWn.fj=function(){return!this.Ri()},MWn.ii=function(n,t){var e,i;return this.ej()?(i=this.fj(),e=AMn(this,n,t),this.$i(this.Zi(7,iln(t),e,n,i)),e):AMn(this,n,t)},MWn.$c=function(n){var t,e,i,r;return this.ej()?(e=null,i=this.fj(),t=this.Zi(4,r=wq(this,n),null,n,i),this.bj()&&r?(e=this.dj(r,e))?(e.Ei(t),e.Fi()):this.$i(t):e?(e.Ei(t),e.Fi()):this.$i(t),r):(r=wq(this,n),this.bj()&&r&&(e=this.dj(r,null))&&e.Fi(),r)},MWn.mi=function(n,t){return oFn(this,n,t)},vX(i6n,"DelegatingNotifyingListImpl",1996),wAn(143,1,t9n),MWn.Ei=function(n){return KEn(this,n)},MWn.Fi=function(){$7(this)},MWn.xi=function(){return this.d},MWn._i=function(){return null},MWn.gj=function(){return null},MWn.yi=function(n){return-1},MWn.zi=function(){return Rxn(this)},MWn.Ai=function(){return null},MWn.Bi=function(){return Kxn(this)},MWn.Ci=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},MWn.hj=function(){return!1},MWn.Di=function(n){var t,e,i,r,c,a,u,o;switch(this.d){case 1:case 2:switch(n.xi()){case 1:case 2:if(GI(n.Ai())===GI(this.Ai())&&this.yi(null)==n.yi(null))return this.g=n.zi(),1==n.xi()&&(this.d=1),!0}case 4:if(4===n.xi()&&GI(n.Ai())===GI(this.Ai())&&this.yi(null)==n.yi(null))return a=tGn(this),c=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,i=n.Ci(),this.d=6,o=new gtn(2),c<=i?(f9(o,this.n),f9(o,n.Bi()),this.g=Pun(Gk(ANt,1),hQn,25,15,[this.o=c,i+1])):(f9(o,n.Bi()),f9(o,this.n),this.g=Pun(Gk(ANt,1),hQn,25,15,[this.o=i,c])),this.n=o,a||(this.o=-2-this.o-1),!0;break;case 6:if(4===n.xi()&&GI(n.Ai())===GI(this.Ai())&&this.yi(null)==n.yi(null)){for(a=tGn(this),i=n.Ci(),u=BB(this.g,48),e=x8(ANt,hQn,25,u.length+1,15,1),t=0;t>>0).toString(16))).a+=" (eventType: ",this.d){case 1:e.a+="SET";break;case 2:e.a+="UNSET";break;case 3:e.a+="ADD";break;case 5:e.a+="ADD_MANY";break;case 4:e.a+="REMOVE";break;case 6:e.a+="REMOVE_MANY";break;case 7:e.a+="MOVE";break;case 8:e.a+="REMOVING_ADAPTER";break;case 9:e.a+="RESOLVE";break;default:mE(e,this.d)}if(lKn(this)&&(e.a+=", touch: true"),e.a+=", position: ",mE(e,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),e.a+=", notifier: ",rO(e,this.Ai()),e.a+=", feature: ",rO(e,this._i()),e.a+=", oldValue: ",rO(e,Kxn(this)),e.a+=", newValue: ",6==this.d&&cL(this.g,48)){for(t=BB(this.g,48),e.a+="[",n=0;n10?(this.b&&this.c.j==this.a||(this.b=new $q(this),this.a=this.j),FT(this.b,n)):Sjn(this,n)},MWn.ni=function(){return!0},MWn.a=0,vX(B6n,"AbstractEList/1",953),wAn(295,73,NQn,tK),vX(B6n,"AbstractEList/BasicIndexOutOfBoundsException",295),wAn(40,1,QWn,AL),MWn.Nb=function(n){fU(this,n)},MWn.mj=function(){if(this.i.j!=this.f)throw Hp(new vv)},MWn.nj=function(){return kpn(this)},MWn.Ob=function(){return this.e!=this.i.gc()},MWn.Pb=function(){return this.nj()},MWn.Qb=function(){Qjn(this)},MWn.e=0,MWn.f=0,MWn.g=-1,vX(B6n,"AbstractEList/EIterator",40),wAn(278,40,cVn,cx,GU),MWn.Qb=function(){Qjn(this)},MWn.Rb=function(n){odn(this,n)},MWn.oj=function(){var n;try{return n=this.d.Xb(--this.e),this.mj(),this.g=this.e,n}catch(t){throw cL(t=lun(t),73)?(this.mj(),Hp(new yv)):Hp(t)}},MWn.pj=function(n){kmn(this,n)},MWn.Sb=function(){return 0!=this.e},MWn.Tb=function(){return this.e},MWn.Ub=function(){return this.oj()},MWn.Vb=function(){return this.e-1},MWn.Wb=function(n){this.pj(n)},vX(B6n,"AbstractEList/EListIterator",278),wAn(341,40,QWn,ax),MWn.nj=function(){return jpn(this)},MWn.Qb=function(){throw Hp(new pv)},vX(B6n,"AbstractEList/NonResolvingEIterator",341),wAn(385,278,cVn,ux,RK),MWn.Rb=function(n){throw Hp(new pv)},MWn.nj=function(){var n;try{return n=this.c.ki(this.e),this.mj(),this.g=this.e++,n}catch(t){throw cL(t=lun(t),73)?(this.mj(),Hp(new yv)):Hp(t)}},MWn.oj=function(){var n;try{return n=this.c.ki(--this.e),this.mj(),this.g=this.e,n}catch(t){throw cL(t=lun(t),73)?(this.mj(),Hp(new yv)):Hp(t)}},MWn.Qb=function(){throw Hp(new pv)},MWn.Wb=function(n){throw Hp(new pv)},vX(B6n,"AbstractEList/NonResolvingEListIterator",385),wAn(1982,67,r9n),MWn.Vh=function(n,t){var e,i,r,c,a,u,o,s,h;if(0!=(i=t.gc())){for(e=Psn(this,(s=null==(o=BB(yan(this.a,4),126))?0:o.length)+i),(h=s-n)>0&&aHn(o,n,e,n+i,h),u=t.Kc(),c=0;ce)throw Hp(new tK(n,e));return new BW(this,n)},MWn.$b=function(){var n,t;++this.j,t=null==(n=BB(yan(this.a,4),126))?0:n.length,Fgn(this,null),L8(this,t,n)},MWn.Hc=function(n){var t,e,i,r;if(null!=(t=BB(yan(this.a,4),126)))if(null!=n){for(i=0,r=(e=t).length;i=(e=null==(t=BB(yan(this.a,4),126))?0:t.length))throw Hp(new tK(n,e));return t[n]},MWn.Xc=function(n){var t,e,i;if(null!=(t=BB(yan(this.a,4),126)))if(null!=n){for(e=0,i=t.length;ee)throw Hp(new tK(n,e));return new FW(this,n)},MWn.ii=function(n,t){var e,i,r;if(n>=(r=null==(e=$dn(this))?0:e.length))throw Hp(new Ay(u8n+n+o8n+r));if(t>=r)throw Hp(new Ay(s8n+t+o8n+r));return i=e[t],n!=t&&(n0&&aHn(n,0,t,0,e),t},MWn.Qc=function(n){var t,e;return(e=null==(t=BB(yan(this.a,4),126))?0:t.length)>0&&(n.lengthe&&$X(n,e,null),n},vX(B6n,"ArrayDelegatingEList",1982),wAn(1038,40,QWn,M5),MWn.mj=function(){if(this.b.j!=this.f||GI(BB(yan(this.b.a,4),126))!==GI(this.a))throw Hp(new vv)},MWn.Qb=function(){Qjn(this),this.a=BB(yan(this.b.a,4),126)},vX(B6n,"ArrayDelegatingEList/EIterator",1038),wAn(706,278,cVn,Qz,FW),MWn.mj=function(){if(this.b.j!=this.f||GI(BB(yan(this.b.a,4),126))!==GI(this.a))throw Hp(new vv)},MWn.pj=function(n){kmn(this,n),this.a=BB(yan(this.b.a,4),126)},MWn.Qb=function(){Qjn(this),this.a=BB(yan(this.b.a,4),126)},vX(B6n,"ArrayDelegatingEList/EListIterator",706),wAn(1039,341,QWn,S5),MWn.mj=function(){if(this.b.j!=this.f||GI(BB(yan(this.b.a,4),126))!==GI(this.a))throw Hp(new vv)},vX(B6n,"ArrayDelegatingEList/NonResolvingEIterator",1039),wAn(707,385,cVn,Jz,BW),MWn.mj=function(){if(this.b.j!=this.f||GI(BB(yan(this.b.a,4),126))!==GI(this.a))throw Hp(new vv)},vX(B6n,"ArrayDelegatingEList/NonResolvingEListIterator",707),wAn(606,295,NQn,LO),vX(B6n,"BasicEList/BasicIndexOutOfBoundsException",606),wAn(696,63,h8n,DI),MWn.Vc=function(n,t){throw Hp(new pv)},MWn.Fc=function(n){throw Hp(new pv)},MWn.Wc=function(n,t){throw Hp(new pv)},MWn.Gc=function(n){throw Hp(new pv)},MWn.$b=function(){throw Hp(new pv)},MWn.qi=function(n){throw Hp(new pv)},MWn.Kc=function(){return this.Zh()},MWn.Yc=function(){return this.$h()},MWn.Zc=function(n){return this._h(n)},MWn.ii=function(n,t){throw Hp(new pv)},MWn.ji=function(n,t){throw Hp(new pv)},MWn.$c=function(n){throw Hp(new pv)},MWn.Mc=function(n){throw Hp(new pv)},MWn._c=function(n,t){throw Hp(new pv)},vX(B6n,"BasicEList/UnmodifiableEList",696),wAn(705,1,{3:1,20:1,14:1,15:1,58:1,589:1}),MWn.Vc=function(n,t){Q$(this,n,BB(t,42))},MWn.Fc=function(n){return aD(this,BB(n,42))},MWn.Jc=function(n){e5(this,n)},MWn.Xb=function(n){return BB(Wtn(this.c,n),133)},MWn.ii=function(n,t){return BB(this.c.ii(n,t),42)},MWn.ji=function(n,t){J$(this,n,BB(t,42))},MWn.Lc=function(){return new Rq(null,new w1(this,16))},MWn.$c=function(n){return BB(this.c.$c(n),42)},MWn._c=function(n,t){return uX(this,n,BB(t,42))},MWn.ad=function(n){_rn(this,n)},MWn.Nc=function(){return new w1(this,16)},MWn.Oc=function(){return new Rq(null,new w1(this,16))},MWn.Wc=function(n,t){return this.c.Wc(n,t)},MWn.Gc=function(n){return this.c.Gc(n)},MWn.$b=function(){this.c.$b()},MWn.Hc=function(n){return this.c.Hc(n)},MWn.Ic=function(n){return oun(this.c,n)},MWn.qj=function(){var n,t;if(null==this.d){for(this.d=x8(oAt,c9n,63,2*this.f+1,0,1),t=this.e,this.f=0,n=this.c.Kc();n.e!=n.i.gc();)Ivn(this,BB(n.nj(),133));this.e=t}},MWn.Fb=function(n){return NK(this,n)},MWn.Hb=function(){return Mun(this.c)},MWn.Xc=function(n){return this.c.Xc(n)},MWn.rj=function(){this.c=new hp(this)},MWn.dc=function(){return 0==this.f},MWn.Kc=function(){return this.c.Kc()},MWn.Yc=function(){return this.c.Yc()},MWn.Zc=function(n){return this.c.Zc(n)},MWn.sj=function(){return A8(this)},MWn.tj=function(n,t,e){return new SB(n,t,e)},MWn.uj=function(){return new vo},MWn.Mc=function(n){return hin(this,n)},MWn.gc=function(){return this.f},MWn.bd=function(n,t){return new s1(this.c,n,t)},MWn.Pc=function(){return this.c.Pc()},MWn.Qc=function(n){return this.c.Qc(n)},MWn.Ib=function(){return Ybn(this.c)},MWn.e=0,MWn.f=0,vX(B6n,"BasicEMap",705),wAn(1033,63,h8n,hp),MWn.bi=function(n,t){Av(this,BB(t,133))},MWn.ei=function(n,t,e){var i;++(i=this,BB(t,133),i).a.e},MWn.fi=function(n,t){$v(this,BB(t,133))},MWn.gi=function(n,t,e){VN(this,BB(t,133),BB(e,133))},MWn.di=function(n,t){aan(this.a)},vX(B6n,"BasicEMap/1",1033),wAn(1034,63,h8n,vo),MWn.ri=function(n){return x8(vAt,a9n,612,n,0,1)},vX(B6n,"BasicEMap/2",1034),wAn(1035,nVn,tVn,fp),MWn.$b=function(){this.a.c.$b()},MWn.Hc=function(n){return rdn(this.a,n)},MWn.Kc=function(){return 0==this.a.f?(dD(),pAt.a):new Bj(this.a)},MWn.Mc=function(n){var t;return t=this.a.f,Wdn(this.a,n),this.a.f!=t},MWn.gc=function(){return this.a.f},vX(B6n,"BasicEMap/3",1035),wAn(1036,28,ZWn,lp),MWn.$b=function(){this.a.c.$b()},MWn.Hc=function(n){return JDn(this.a,n)},MWn.Kc=function(){return 0==this.a.f?(dD(),pAt.a):new Hj(this.a)},MWn.gc=function(){return this.a.f},vX(B6n,"BasicEMap/4",1036),wAn(1037,nVn,tVn,bp),MWn.$b=function(){this.a.c.$b()},MWn.Hc=function(n){var t,e,i,r,c,a,u,o,s;if(this.a.f>0&&cL(n,42)&&(this.a.qj(),r=null==(u=(o=BB(n,42)).cd())?0:nsn(u),c=eR(this.a,r),t=this.a.d[c]))for(e=BB(t.g,367),s=t.i,a=0;a"+this.c},MWn.a=0;var pAt,vAt=vX(B6n,"BasicEMap/EntryImpl",612);wAn(536,1,{},oo),vX(B6n,"BasicEMap/View",536),wAn(768,1,{}),MWn.Fb=function(n){return NAn((SQ(),set),n)},MWn.Hb=function(){return Fon((SQ(),set))},MWn.Ib=function(){return LMn((SQ(),set))},vX(B6n,"ECollections/BasicEmptyUnmodifiableEList",768),wAn(1312,1,cVn,mo),MWn.Nb=function(n){fU(this,n)},MWn.Rb=function(n){throw Hp(new pv)},MWn.Ob=function(){return!1},MWn.Sb=function(){return!1},MWn.Pb=function(){throw Hp(new yv)},MWn.Tb=function(){return 0},MWn.Ub=function(){throw Hp(new yv)},MWn.Vb=function(){return-1},MWn.Qb=function(){throw Hp(new pv)},MWn.Wb=function(n){throw Hp(new pv)},vX(B6n,"ECollections/BasicEmptyUnmodifiableEList/1",1312),wAn(1310,768,{20:1,14:1,15:1,58:1},Tm),MWn.Vc=function(n,t){NE()},MWn.Fc=function(n){return xE()},MWn.Wc=function(n,t){return DE()},MWn.Gc=function(n){return RE()},MWn.$b=function(){KE()},MWn.Hc=function(n){return!1},MWn.Ic=function(n){return!1},MWn.Jc=function(n){e5(this,n)},MWn.Xb=function(n){return yO((SQ(),n)),null},MWn.Xc=function(n){return-1},MWn.dc=function(){return!0},MWn.Kc=function(){return this.a},MWn.Yc=function(){return this.a},MWn.Zc=function(n){return this.a},MWn.ii=function(n,t){return _E()},MWn.ji=function(n,t){FE()},MWn.Lc=function(){return new Rq(null,new w1(this,16))},MWn.$c=function(n){return BE()},MWn.Mc=function(n){return HE()},MWn._c=function(n,t){return qE()},MWn.gc=function(){return 0},MWn.ad=function(n){_rn(this,n)},MWn.Nc=function(){return new w1(this,16)},MWn.Oc=function(){return new Rq(null,new w1(this,16))},MWn.bd=function(n,t){return SQ(),new s1(set,n,t)},MWn.Pc=function(){return cz((SQ(),set))},MWn.Qc=function(n){return SQ(),Emn(set,n)},vX(B6n,"ECollections/EmptyUnmodifiableEList",1310),wAn(1311,768,{20:1,14:1,15:1,58:1,589:1},Mm),MWn.Vc=function(n,t){NE()},MWn.Fc=function(n){return xE()},MWn.Wc=function(n,t){return DE()},MWn.Gc=function(n){return RE()},MWn.$b=function(){KE()},MWn.Hc=function(n){return!1},MWn.Ic=function(n){return!1},MWn.Jc=function(n){e5(this,n)},MWn.Xb=function(n){return yO((SQ(),n)),null},MWn.Xc=function(n){return-1},MWn.dc=function(){return!0},MWn.Kc=function(){return this.a},MWn.Yc=function(){return this.a},MWn.Zc=function(n){return this.a},MWn.ii=function(n,t){return _E()},MWn.ji=function(n,t){FE()},MWn.Lc=function(){return new Rq(null,new w1(this,16))},MWn.$c=function(n){return BE()},MWn.Mc=function(n){return HE()},MWn._c=function(n,t){return qE()},MWn.gc=function(){return 0},MWn.ad=function(n){_rn(this,n)},MWn.Nc=function(){return new w1(this,16)},MWn.Oc=function(){return new Rq(null,new w1(this,16))},MWn.bd=function(n,t){return SQ(),new s1(set,n,t)},MWn.Pc=function(){return cz((SQ(),set))},MWn.Qc=function(n){return SQ(),Emn(set,n)},MWn.sj=function(){return SQ(),SQ(),het},vX(B6n,"ECollections/EmptyUnmodifiableEMap",1311);var mAt,yAt=bq(B6n,"Enumerator");wAn(281,1,{281:1},rRn),MWn.Fb=function(n){var t;return this===n||!!cL(n,281)&&(t=BB(n,281),this.f==t.f&&vG(this.i,t.i)&&pG(this.a,0!=(256&this.f)?0!=(256&t.f)?t.a:null:0!=(256&t.f)?null:t.a)&&pG(this.d,t.d)&&pG(this.g,t.g)&&pG(this.e,t.e)&&Spn(this,t))},MWn.Hb=function(){return this.f},MWn.Ib=function(){return M_n(this)},MWn.f=0;var kAt,jAt,EAt,TAt=0,MAt=0,SAt=0,PAt=0,CAt=0,IAt=0,OAt=0,AAt=0,$At=0,LAt=0,NAt=0,xAt=0,DAt=0;vX(B6n,"URI",281),wAn(1091,43,tJn,Sm),MWn.zc=function(n,t){return BB(mZ(this,SD(n),BB(t,281)),281)},vX(B6n,"URI/URICache",1091),wAn(497,63,h8n,fo,rG),MWn.hi=function(){return!0},vX(B6n,"UniqueEList",497),wAn(581,60,BVn,L7),vX(B6n,"WrappedException",581);var RAt,KAt=bq(q5n,s9n),_At=bq(q5n,h9n),FAt=bq(q5n,f9n),BAt=bq(q5n,l9n),HAt=bq(q5n,b9n),qAt=bq(q5n,"EClass"),GAt=bq(q5n,"EDataType");wAn(1183,43,tJn,Pm),MWn.xc=function(n){return XI(n)?SY(this,n):qI(AJ(this.f,n))},vX(q5n,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1183);var zAt,UAt,XAt=bq(q5n,"EEnum"),WAt=bq(q5n,w9n),VAt=bq(q5n,d9n),QAt=bq(q5n,g9n),JAt=bq(q5n,p9n),YAt=bq(q5n,v9n);wAn(1029,1,{},ho),MWn.Ib=function(){return"NIL"},vX(q5n,"EStructuralFeature/Internal/DynamicValueHolder/1",1029),wAn(1028,43,tJn,Cm),MWn.xc=function(n){return XI(n)?SY(this,n):qI(AJ(this.f,n))},vX(q5n,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",1028);var ZAt,n$t,t$t,e$t,i$t,r$t,c$t,a$t,u$t,o$t,s$t,h$t,f$t,l$t,b$t,w$t,d$t,g$t,p$t,v$t,m$t,y$t,k$t,j$t,E$t,T$t,M$t,S$t,P$t,C$t,I$t,O$t=bq(q5n,m9n),A$t=bq(q5n,"EValidator/PatternMatcher"),$$t=bq(y9n,"FeatureMap/Entry");wAn(535,1,{72:1},CI),MWn.ak=function(){return this.a},MWn.dd=function(){return this.b},vX(l6n,"BasicEObjectImpl/1",535),wAn(1027,1,k9n,II),MWn.Wj=function(n){return V5(this.a,this.b,n)},MWn.fj=function(){return ZY(this.a,this.b)},MWn.Wb=function(n){NY(this.a,this.b,n)},MWn.Xj=function(){PW(this.a,this.b)},vX(l6n,"BasicEObjectImpl/4",1027),wAn(1983,1,{108:1}),MWn.bk=function(n){this.e=0==n?M$t:x8(Ant,HWn,1,n,5,1)},MWn.Ch=function(n){return this.e[n]},MWn.Dh=function(n,t){this.e[n]=t},MWn.Eh=function(n){this.e[n]=null},MWn.ck=function(){return this.c},MWn.dk=function(){throw Hp(new pv)},MWn.ek=function(){throw Hp(new pv)},MWn.fk=function(){return this.d},MWn.gk=function(){return null!=this.e},MWn.hk=function(n){this.c=n},MWn.ik=function(n){throw Hp(new pv)},MWn.jk=function(n){throw Hp(new pv)},MWn.kk=function(n){this.d=n},vX(l6n,"BasicEObjectImpl/EPropertiesHolderBaseImpl",1983),wAn(185,1983,{108:1},Kf),MWn.dk=function(){return this.a},MWn.ek=function(){return this.b},MWn.ik=function(n){this.a=n},MWn.jk=function(n){this.b=n},vX(l6n,"BasicEObjectImpl/EPropertiesHolderImpl",185),wAn(506,97,f6n,yo),MWn.Kg=function(){return this.f},MWn.Pg=function(){return this.k},MWn.Rg=function(n,t){this.g=n,this.i=t},MWn.Tg=function(){return 0==(2&this.j)?this.zh():this.ph().ck()},MWn.Vg=function(){return this.i},MWn.Mg=function(){return 0!=(1&this.j)},MWn.eh=function(){return this.g},MWn.kh=function(){return 0!=(4&this.j)},MWn.ph=function(){return!this.k&&(this.k=new Kf),this.k},MWn.th=function(n){this.ph().hk(n),n?this.j|=2:this.j&=-3},MWn.vh=function(n){this.ph().jk(n),n?this.j|=4:this.j&=-5},MWn.zh=function(){return(QX(),t$t).S},MWn.i=0,MWn.j=1,vX(l6n,"EObjectImpl",506),wAn(780,506,{105:1,92:1,90:1,56:1,108:1,49:1,97:1},jH),MWn.Ch=function(n){return this.e[n]},MWn.Dh=function(n,t){this.e[n]=t},MWn.Eh=function(n){this.e[n]=null},MWn.Tg=function(){return this.d},MWn.Yg=function(n){return Awn(this.d,n)},MWn.$g=function(){return this.d},MWn.dh=function(){return null!=this.e},MWn.ph=function(){return!this.k&&(this.k=new ko),this.k},MWn.th=function(n){this.d=n},MWn.yh=function(){var n;return null==this.e&&(n=bX(this.d),this.e=0==n?S$t:x8(Ant,HWn,1,n,5,1)),this},MWn.Ah=function(){return 0},vX(l6n,"DynamicEObjectImpl",780),wAn(1376,780,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1},fq),MWn.Fb=function(n){return this===n},MWn.Hb=function(){return PN(this)},MWn.th=function(n){this.d=n,this.b=NNn(n,"key"),this.c=NNn(n,E6n)},MWn.Sh=function(){var n;return-1==this.a&&(n=Y7(this,this.b),this.a=null==n?0:nsn(n)),this.a},MWn.cd=function(){return Y7(this,this.b)},MWn.dd=function(){return Y7(this,this.c)},MWn.Th=function(n){this.a=n},MWn.Uh=function(n){NY(this,this.b,n)},MWn.ed=function(n){var t;return t=Y7(this,this.c),NY(this,this.c,n),t},MWn.a=0,vX(l6n,"DynamicEObjectImpl/BasicEMapEntry",1376),wAn(1377,1,{108:1},ko),MWn.bk=function(n){throw Hp(new pv)},MWn.Ch=function(n){throw Hp(new pv)},MWn.Dh=function(n,t){throw Hp(new pv)},MWn.Eh=function(n){throw Hp(new pv)},MWn.ck=function(){throw Hp(new pv)},MWn.dk=function(){return this.a},MWn.ek=function(){return this.b},MWn.fk=function(){return this.c},MWn.gk=function(){throw Hp(new pv)},MWn.hk=function(n){throw Hp(new pv)},MWn.ik=function(n){this.a=n},MWn.jk=function(n){this.b=n},MWn.kk=function(n){this.c=n},vX(l6n,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1377),wAn(510,150,{105:1,92:1,90:1,590:1,147:1,56:1,108:1,49:1,97:1,510:1,150:1,114:1,115:1},jo),MWn.Qg=function(n){return bkn(this,n)},MWn._g=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.d;case 2:return e?(!this.b&&(this.b=new Yx((gWn(),k$t),X$t,this)),this.b):(!this.b&&(this.b=new Yx((gWn(),k$t),X$t,this)),A8(this.b));case 3:return bZ(this);case 4:return!this.a&&(this.a=new $L(LOt,this,4)),this.a;case 5:return!this.c&&(this.c=new RL(LOt,this,5)),this.c}return U9(this,n-bX((gWn(),e$t)),itn(BB(yan(this,16),26)||e$t,n),t,e)},MWn.hh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),Jwn(this.Ab,n,e);case 3:return this.Cb&&(e=(i=this.Db>>16)>=0?bkn(this,e):this.Cb.ih(this,-1-i,null,e)),QG(this,BB(n,147),e)}return BB(itn(BB(yan(this,16),26)||(gWn(),e$t),t),66).Nj().Qj(this,fgn(this),t-bX((gWn(),e$t)),n,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 2:return!this.b&&(this.b=new Yx((gWn(),k$t),X$t,this)),BK(this.b,n,e);case 3:return QG(this,null,e);case 4:return!this.a&&(this.a=new $L(LOt,this,4)),_pn(this.a,n,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),e$t),t),66).Nj().Rj(this,fgn(this),t-bX((gWn(),e$t)),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.d;case 2:return!!this.b&&0!=this.b.f;case 3:return!!bZ(this);case 4:return!!this.a&&0!=this.a.i;case 5:return!!this.c&&0!=this.c.i}return O3(this,n-bX((gWn(),e$t)),itn(BB(yan(this,16),26)||e$t,n))},MWn.sh=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void pq(this,SD(t));case 2:return!this.b&&(this.b=new Yx((gWn(),k$t),X$t,this)),void tan(this.b,t);case 3:return void ONn(this,BB(t,147));case 4:return!this.a&&(this.a=new $L(LOt,this,4)),sqn(this.a),!this.a&&(this.a=new $L(LOt,this,4)),void pX(this.a,BB(t,14));case 5:return!this.c&&(this.c=new RL(LOt,this,5)),sqn(this.c),!this.c&&(this.c=new RL(LOt,this,5)),void pX(this.c,BB(t,14))}Lbn(this,n-bX((gWn(),e$t)),itn(BB(yan(this,16),26)||e$t,n),t)},MWn.zh=function(){return gWn(),e$t},MWn.Bh=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return void Bin(this,null);case 2:return!this.b&&(this.b=new Yx((gWn(),k$t),X$t,this)),void this.b.c.$b();case 3:return void ONn(this,null);case 4:return!this.a&&(this.a=new $L(LOt,this,4)),void sqn(this.a);case 5:return!this.c&&(this.c=new RL(LOt,this,5)),void sqn(this.c)}qfn(this,n-bX((gWn(),e$t)),itn(BB(yan(this,16),26)||e$t,n))},MWn.Ib=function(){return Vfn(this)},MWn.d=null,vX(l6n,"EAnnotationImpl",510),wAn(151,705,j9n,y9),MWn.Xh=function(n,t){n$(this,n,BB(t,42))},MWn.lk=function(n,t){return FK(this,BB(n,42),t)},MWn.pi=function(n){return BB(BB(this.c,69).pi(n),133)},MWn.Zh=function(){return BB(this.c,69).Zh()},MWn.$h=function(){return BB(this.c,69).$h()},MWn._h=function(n){return BB(this.c,69)._h(n)},MWn.mk=function(n,t){return BK(this,n,t)},MWn.Wj=function(n){return BB(this.c,76).Wj(n)},MWn.rj=function(){},MWn.fj=function(){return BB(this.c,76).fj()},MWn.tj=function(n,t,e){var i;return(i=BB(Utn(this.b).Nh().Jh(this.b),133)).Th(n),i.Uh(t),i.ed(e),i},MWn.uj=function(){return new Ip(this)},MWn.Wb=function(n){tan(this,n)},MWn.Xj=function(){BB(this.c,76).Xj()},vX(y9n,"EcoreEMap",151),wAn(158,151,j9n,Yx),MWn.qj=function(){var n,t,e,i,r;if(null==this.d){for(r=x8(oAt,c9n,63,2*this.f+1,0,1),e=this.c.Kc();e.e!=e.i.gc();)!(n=r[i=((t=BB(e.nj(),133)).Sh()&DWn)%r.length])&&(n=r[i]=new Ip(this)),n.Fc(t);this.d=r}},vX(l6n,"EAnnotationImpl/1",158),wAn(284,438,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,472:1,49:1,97:1,150:1,284:1,114:1,115:1}),MWn._g=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return hN(),0!=(256&this.Bb);case 3:return hN(),0!=(512&this.Bb);case 4:return iln(this.s);case 5:return iln(this.t);case 6:return hN(),!!this.$j();case 7:return hN(),this.s>=1;case 8:return t?Ikn(this):this.r;case 9:return this.q}return U9(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n),t,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 9:return gX(this,e)}return BB(itn(BB(yan(this,16),26)||this.zh(),t),66).Nj().Rj(this,fgn(this),t-bX(this.zh()),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return this.$j();case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yW(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yW(this.q).i)}return O3(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n))},MWn.sh=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void this.Lh(SD(t));case 2:return void Jfn(this,qy(TD(t)));case 3:return void nln(this,qy(TD(t)));case 4:return void Len(this,BB(t,19).a);case 5:return void this.ok(BB(t,19).a);case 8:return void Ihn(this,BB(t,138));case 9:return void((e=HTn(this,BB(t,87),null))&&e.Fi())}Lbn(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n),t)},MWn.zh=function(){return gWn(),E$t},MWn.Bh=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return void this.Lh(null);case 2:return void Jfn(this,!0);case 3:return void nln(this,!0);case 4:return void Len(this,0);case 5:return void this.ok(1);case 8:return void Ihn(this,null);case 9:return void((t=HTn(this,null,null))&&t.Fi())}qfn(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n))},MWn.Gh=function(){Ikn(this),this.Bb|=1},MWn.Yj=function(){return Ikn(this)},MWn.Zj=function(){return this.t},MWn.$j=function(){var n;return(n=this.t)>1||-1==n},MWn.hi=function(){return 0!=(512&this.Bb)},MWn.nk=function(n,t){return Pfn(this,n,t)},MWn.ok=function(n){Nen(this,n)},MWn.Ib=function(){return KOn(this)},MWn.s=0,MWn.t=1,vX(l6n,"ETypedElementImpl",284),wAn(449,284,{105:1,92:1,90:1,147:1,191:1,56:1,170:1,66:1,108:1,472:1,49:1,97:1,150:1,449:1,284:1,114:1,115:1,677:1}),MWn.Qg=function(n){return Nyn(this,n)},MWn._g=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return hN(),0!=(256&this.Bb);case 3:return hN(),0!=(512&this.Bb);case 4:return iln(this.s);case 5:return iln(this.t);case 6:return hN(),!!this.$j();case 7:return hN(),this.s>=1;case 8:return t?Ikn(this):this.r;case 9:return this.q;case 10:return hN(),0!=(this.Bb&k6n);case 11:return hN(),0!=(this.Bb&M9n);case 12:return hN(),0!=(this.Bb&_Qn);case 13:return this.j;case 14:return qLn(this);case 15:return hN(),0!=(this.Bb&T9n);case 16:return hN(),0!=(this.Bb&hVn);case 17:return dZ(this)}return U9(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n),t,e)},MWn.hh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),Jwn(this.Ab,n,e);case 17:return this.Cb&&(e=(i=this.Db>>16)>=0?Nyn(this,e):this.Cb.ih(this,-1-i,null,e)),T_n(this,n,17,e)}return BB(itn(BB(yan(this,16),26)||this.zh(),t),66).Nj().Qj(this,fgn(this),t-bX(this.zh()),n,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 9:return gX(this,e);case 17:return T_n(this,null,17,e)}return BB(itn(BB(yan(this,16),26)||this.zh(),t),66).Nj().Rj(this,fgn(this),t-bX(this.zh()),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return this.$j();case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yW(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yW(this.q).i);case 10:return 0==(this.Bb&k6n);case 11:return 0!=(this.Bb&M9n);case 12:return 0!=(this.Bb&_Qn);case 13:return null!=this.j;case 14:return null!=qLn(this);case 15:return 0!=(this.Bb&T9n);case 16:return 0!=(this.Bb&hVn);case 17:return!!dZ(this)}return O3(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n))},MWn.sh=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void YZ(this,SD(t));case 2:return void Jfn(this,qy(TD(t)));case 3:return void nln(this,qy(TD(t)));case 4:return void Len(this,BB(t,19).a);case 5:return void this.ok(BB(t,19).a);case 8:return void Ihn(this,BB(t,138));case 9:return void((e=HTn(this,BB(t,87),null))&&e.Fi());case 10:return void Aln(this,qy(TD(t)));case 11:return void Nln(this,qy(TD(t)));case 12:return void $ln(this,qy(TD(t)));case 13:return void _I(this,SD(t));case 15:return void Lln(this,qy(TD(t)));case 16:return void qln(this,qy(TD(t)))}Lbn(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n),t)},MWn.zh=function(){return gWn(),j$t},MWn.Bh=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return cL(this.Cb,88)&&ACn(P5(BB(this.Cb,88)),4),void Nrn(this,null);case 2:return void Jfn(this,!0);case 3:return void nln(this,!0);case 4:return void Len(this,0);case 5:return void this.ok(1);case 8:return void Ihn(this,null);case 9:return void((t=HTn(this,null,null))&&t.Fi());case 10:return void Aln(this,!0);case 11:return void Nln(this,!1);case 12:return void $ln(this,!1);case 13:return this.i=null,void arn(this,null);case 15:return void Lln(this,!1);case 16:return void qln(this,!1)}qfn(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n))},MWn.Gh=function(){kV(B7((IPn(),Z$t),this)),Ikn(this),this.Bb|=1},MWn.Gj=function(){return this.f},MWn.zj=function(){return qLn(this)},MWn.Hj=function(){return dZ(this)},MWn.Lj=function(){return null},MWn.pk=function(){return this.k},MWn.aj=function(){return this.n},MWn.Mj=function(){return oEn(this)},MWn.Nj=function(){var n,t,e,i,r,c,a,u,o;return this.p||((null==(e=dZ(this)).i&&qFn(e),e.i).length,(i=this.Lj())&&bX(dZ(i)),n=(a=(r=Ikn(this)).Bj())?0!=(1&a.i)?a==$Nt?ktt:a==ANt?Att:a==DNt?Ctt:a==xNt?Ptt:a==LNt?Rtt:a==RNt?_tt:a==NNt?Ttt:Stt:a:null,t=qLn(this),u=r.zj(),bbn(this),0!=(this.Bb&hVn)&&((c=mjn((IPn(),Z$t),e))&&c!=this||(c=Z1(B7(Z$t,this))))?this.p=new AI(this,c):this.$j()?this.rk()?i?0!=(this.Bb&T9n)?n?this.sk()?this.p=new lQ(47,n,this,i):this.p=new lQ(5,n,this,i):this.sk()?this.p=new w4(46,this,i):this.p=new w4(4,this,i):n?this.sk()?this.p=new lQ(49,n,this,i):this.p=new lQ(7,n,this,i):this.sk()?this.p=new w4(48,this,i):this.p=new w4(6,this,i):0!=(this.Bb&T9n)?n?n==Hnt?this.p=new PB(50,VOt,this):this.sk()?this.p=new PB(43,n,this):this.p=new PB(1,n,this):this.sk()?this.p=new RJ(42,this):this.p=new RJ(0,this):n?n==Hnt?this.p=new PB(41,VOt,this):this.sk()?this.p=new PB(45,n,this):this.p=new PB(3,n,this):this.sk()?this.p=new RJ(44,this):this.p=new RJ(2,this):cL(r,148)?n==$$t?this.p=new RJ(40,this):0!=(512&this.Bb)?0!=(this.Bb&T9n)?this.p=n?new PB(9,n,this):new RJ(8,this):this.p=n?new PB(11,n,this):new RJ(10,this):0!=(this.Bb&T9n)?this.p=n?new PB(13,n,this):new RJ(12,this):this.p=n?new PB(15,n,this):new RJ(14,this):i?(o=i.t)>1||-1==o?this.sk()?0!=(this.Bb&T9n)?this.p=n?new lQ(25,n,this,i):new w4(24,this,i):this.p=n?new lQ(27,n,this,i):new w4(26,this,i):0!=(this.Bb&T9n)?this.p=n?new lQ(29,n,this,i):new w4(28,this,i):this.p=n?new lQ(31,n,this,i):new w4(30,this,i):this.sk()?0!=(this.Bb&T9n)?this.p=n?new lQ(33,n,this,i):new w4(32,this,i):this.p=n?new lQ(35,n,this,i):new w4(34,this,i):0!=(this.Bb&T9n)?this.p=n?new lQ(37,n,this,i):new w4(36,this,i):this.p=n?new lQ(39,n,this,i):new w4(38,this,i):this.sk()?0!=(this.Bb&T9n)?this.p=n?new PB(17,n,this):new RJ(16,this):this.p=n?new PB(19,n,this):new RJ(18,this):0!=(this.Bb&T9n)?this.p=n?new PB(21,n,this):new RJ(20,this):this.p=n?new PB(23,n,this):new RJ(22,this):this.qk()?this.sk()?this.p=new CB(BB(r,26),this,i):this.p=new mY(BB(r,26),this,i):cL(r,148)?n==$$t?this.p=new RJ(40,this):0!=(this.Bb&T9n)?this.p=n?new nz(t,u,this,(Bwn(),a==ANt?q$t:a==$Nt?K$t:a==LNt?G$t:a==DNt?H$t:a==xNt?B$t:a==RNt?U$t:a==NNt?_$t:a==ONt?F$t:z$t)):new dQ(BB(r,148),t,u,this):this.p=n?new ZG(t,u,this,(Bwn(),a==ANt?q$t:a==$Nt?K$t:a==LNt?G$t:a==DNt?H$t:a==xNt?B$t:a==RNt?U$t:a==NNt?_$t:a==ONt?F$t:z$t)):new wQ(BB(r,148),t,u,this):this.rk()?i?0!=(this.Bb&T9n)?this.sk()?this.p=new NB(BB(r,26),this,i):this.p=new LB(BB(r,26),this,i):this.sk()?this.p=new $B(BB(r,26),this,i):this.p=new IB(BB(r,26),this,i):0!=(this.Bb&T9n)?this.sk()?this.p=new eD(BB(r,26),this):this.p=new tD(BB(r,26),this):this.sk()?this.p=new nD(BB(r,26),this):this.p=new Zx(BB(r,26),this):this.sk()?i?0!=(this.Bb&T9n)?this.p=new xB(BB(r,26),this,i):this.p=new OB(BB(r,26),this,i):0!=(this.Bb&T9n)?this.p=new rD(BB(r,26),this):this.p=new iD(BB(r,26),this):i?0!=(this.Bb&T9n)?this.p=new DB(BB(r,26),this,i):this.p=new AB(BB(r,26),this,i):0!=(this.Bb&T9n)?this.p=new cD(BB(r,26),this):this.p=new cG(BB(r,26),this)),this.p},MWn.Ij=function(){return 0!=(this.Bb&k6n)},MWn.qk=function(){return!1},MWn.rk=function(){return!1},MWn.Jj=function(){return 0!=(this.Bb&hVn)},MWn.Oj=function(){return hnn(this)},MWn.sk=function(){return!1},MWn.Kj=function(){return 0!=(this.Bb&T9n)},MWn.tk=function(n){this.k=n},MWn.Lh=function(n){YZ(this,n)},MWn.Ib=function(){return ERn(this)},MWn.e=!1,MWn.n=0,vX(l6n,"EStructuralFeatureImpl",449),wAn(322,449,{105:1,92:1,90:1,34:1,147:1,191:1,56:1,170:1,66:1,108:1,472:1,49:1,97:1,322:1,150:1,449:1,284:1,114:1,115:1,677:1},Om),MWn._g=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return hN(),0!=(256&this.Bb);case 3:return hN(),0!=(512&this.Bb);case 4:return iln(this.s);case 5:return iln(this.t);case 6:return hN(),!!NIn(this);case 7:return hN(),this.s>=1;case 8:return t?Ikn(this):this.r;case 9:return this.q;case 10:return hN(),0!=(this.Bb&k6n);case 11:return hN(),0!=(this.Bb&M9n);case 12:return hN(),0!=(this.Bb&_Qn);case 13:return this.j;case 14:return qLn(this);case 15:return hN(),0!=(this.Bb&T9n);case 16:return hN(),0!=(this.Bb&hVn);case 17:return dZ(this);case 18:return hN(),0!=(this.Bb&h6n);case 19:return t?uun(this):x6(this)}return U9(this,n-bX((gWn(),i$t)),itn(BB(yan(this,16),26)||i$t,n),t,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return NIn(this);case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yW(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yW(this.q).i);case 10:return 0==(this.Bb&k6n);case 11:return 0!=(this.Bb&M9n);case 12:return 0!=(this.Bb&_Qn);case 13:return null!=this.j;case 14:return null!=qLn(this);case 15:return 0!=(this.Bb&T9n);case 16:return 0!=(this.Bb&hVn);case 17:return!!dZ(this);case 18:return 0!=(this.Bb&h6n);case 19:return!!x6(this)}return O3(this,n-bX((gWn(),i$t)),itn(BB(yan(this,16),26)||i$t,n))},MWn.sh=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void YZ(this,SD(t));case 2:return void Jfn(this,qy(TD(t)));case 3:return void nln(this,qy(TD(t)));case 4:return void Len(this,BB(t,19).a);case 5:return void Uj(this,BB(t,19).a);case 8:return void Ihn(this,BB(t,138));case 9:return void((e=HTn(this,BB(t,87),null))&&e.Fi());case 10:return void Aln(this,qy(TD(t)));case 11:return void Nln(this,qy(TD(t)));case 12:return void $ln(this,qy(TD(t)));case 13:return void _I(this,SD(t));case 15:return void Lln(this,qy(TD(t)));case 16:return void qln(this,qy(TD(t)));case 18:return void Gln(this,qy(TD(t)))}Lbn(this,n-bX((gWn(),i$t)),itn(BB(yan(this,16),26)||i$t,n),t)},MWn.zh=function(){return gWn(),i$t},MWn.Bh=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return cL(this.Cb,88)&&ACn(P5(BB(this.Cb,88)),4),void Nrn(this,null);case 2:return void Jfn(this,!0);case 3:return void nln(this,!0);case 4:return void Len(this,0);case 5:return this.b=0,void Nen(this,1);case 8:return void Ihn(this,null);case 9:return void((t=HTn(this,null,null))&&t.Fi());case 10:return void Aln(this,!0);case 11:return void Nln(this,!1);case 12:return void $ln(this,!1);case 13:return this.i=null,void arn(this,null);case 15:return void Lln(this,!1);case 16:return void qln(this,!1);case 18:return void Gln(this,!1)}qfn(this,n-bX((gWn(),i$t)),itn(BB(yan(this,16),26)||i$t,n))},MWn.Gh=function(){uun(this),kV(B7((IPn(),Z$t),this)),Ikn(this),this.Bb|=1},MWn.$j=function(){return NIn(this)},MWn.nk=function(n,t){return this.b=0,this.a=null,Pfn(this,n,t)},MWn.ok=function(n){Uj(this,n)},MWn.Ib=function(){var n;return 0!=(64&this.Db)?ERn(this):((n=new fN(ERn(this))).a+=" (iD: ",yE(n,0!=(this.Bb&h6n)),n.a+=")",n.a)},MWn.b=0,vX(l6n,"EAttributeImpl",322),wAn(351,438,{105:1,92:1,90:1,138:1,147:1,191:1,56:1,108:1,49:1,97:1,351:1,150:1,114:1,115:1,676:1}),MWn.uk=function(n){return n.Tg()==this},MWn.Qg=function(n){return fyn(this,n)},MWn.Rg=function(n,t){this.w=null,this.Db=t<<16|255&this.Db,this.Cb=n},MWn._g=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return iyn(this);case 4:return this.zj();case 5:return this.F;case 6:return t?Utn(this):wZ(this);case 7:return!this.A&&(this.A=new NL(O$t,this,7)),this.A}return U9(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n),t,e)},MWn.hh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),Jwn(this.Ab,n,e);case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?fyn(this,e):this.Cb.ih(this,-1-i,null,e)),T_n(this,n,6,e)}return BB(itn(BB(yan(this,16),26)||this.zh(),t),66).Nj().Qj(this,fgn(this),t-bX(this.zh()),n,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 6:return T_n(this,null,6,e);case 7:return!this.A&&(this.A=new NL(O$t,this,7)),_pn(this.A,n,e)}return BB(itn(BB(yan(this,16),26)||this.zh(),t),66).Nj().Rj(this,fgn(this),t-bX(this.zh()),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!iyn(this);case 4:return null!=this.zj();case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!wZ(this);case 7:return!!this.A&&0!=this.A.i}return O3(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n))},MWn.sh=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void ZZ(this,SD(t));case 2:return void IA(this,SD(t));case 5:return void Jqn(this,SD(t));case 7:return!this.A&&(this.A=new NL(O$t,this,7)),sqn(this.A),!this.A&&(this.A=new NL(O$t,this,7)),void pX(this.A,BB(t,14))}Lbn(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n),t)},MWn.zh=function(){return gWn(),c$t},MWn.Bh=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return cL(this.Cb,179)&&(BB(this.Cb,179).tb=null),void Nrn(this,null);case 2:return Dsn(this,null),void xen(this,this.D);case 5:return void Jqn(this,null);case 7:return!this.A&&(this.A=new NL(O$t,this,7)),void sqn(this.A)}qfn(this,n-bX(this.zh()),itn(BB(yan(this,16),26)||this.zh(),n))},MWn.yj=function(){var n;return-1==this.G&&(this.G=(n=Utn(this))?uvn(n.Mh(),this):-1),this.G},MWn.zj=function(){return null},MWn.Aj=function(){return Utn(this)},MWn.vk=function(){return this.v},MWn.Bj=function(){return iyn(this)},MWn.Cj=function(){return null!=this.D?this.D:this.B},MWn.Dj=function(){return this.F},MWn.wj=function(n){return SFn(this,n)},MWn.wk=function(n){this.v=n},MWn.xk=function(n){Urn(this,n)},MWn.yk=function(n){this.C=n},MWn.Lh=function(n){ZZ(this,n)},MWn.Ib=function(){return Cwn(this)},MWn.C=null,MWn.D=null,MWn.G=-1,vX(l6n,"EClassifierImpl",351),wAn(88,351,{105:1,92:1,90:1,26:1,138:1,147:1,191:1,56:1,108:1,49:1,97:1,88:1,351:1,150:1,473:1,114:1,115:1,676:1},_f),MWn.uk=function(n){return QR(this,n.Tg())},MWn._g=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return iyn(this);case 4:return null;case 5:return this.F;case 6:return t?Utn(this):wZ(this);case 7:return!this.A&&(this.A=new NL(O$t,this,7)),this.A;case 8:return hN(),0!=(256&this.Bb);case 9:return hN(),0!=(512&this.Bb);case 10:return kJ(this);case 11:return!this.q&&(this.q=new eU(QAt,this,11,10)),this.q;case 12:return JBn(this);case 13:return RBn(this);case 14:return RBn(this),this.r;case 15:return JBn(this),this.k;case 16:return WPn(this);case 17:return gBn(this);case 18:return qFn(this);case 19:return CLn(this);case 20:return JBn(this),this.o;case 21:return!this.s&&(this.s=new eU(FAt,this,21,17)),this.s;case 22:return a4(this);case 23:return HDn(this)}return U9(this,n-bX((gWn(),r$t)),itn(BB(yan(this,16),26)||r$t,n),t,e)},MWn.hh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),Jwn(this.Ab,n,e);case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?fyn(this,e):this.Cb.ih(this,-1-i,null,e)),T_n(this,n,6,e);case 11:return!this.q&&(this.q=new eU(QAt,this,11,10)),Jwn(this.q,n,e);case 21:return!this.s&&(this.s=new eU(FAt,this,21,17)),Jwn(this.s,n,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),r$t),t),66).Nj().Qj(this,fgn(this),t-bX((gWn(),r$t)),n,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 6:return T_n(this,null,6,e);case 7:return!this.A&&(this.A=new NL(O$t,this,7)),_pn(this.A,n,e);case 11:return!this.q&&(this.q=new eU(QAt,this,11,10)),_pn(this.q,n,e);case 21:return!this.s&&(this.s=new eU(FAt,this,21,17)),_pn(this.s,n,e);case 22:return _pn(a4(this),n,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),r$t),t),66).Nj().Rj(this,fgn(this),t-bX((gWn(),r$t)),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!iyn(this);case 4:return!1;case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!wZ(this);case 7:return!!this.A&&0!=this.A.i;case 8:return 0!=(256&this.Bb);case 9:return 0!=(512&this.Bb);case 10:return!(!this.u||0==a4(this.u.a).i||this.n&&Rvn(this.n));case 11:return!!this.q&&0!=this.q.i;case 12:return 0!=JBn(this).i;case 13:return 0!=RBn(this).i;case 14:return RBn(this),0!=this.r.i;case 15:return JBn(this),0!=this.k.i;case 16:return 0!=WPn(this).i;case 17:return 0!=gBn(this).i;case 18:return 0!=qFn(this).i;case 19:return 0!=CLn(this).i;case 20:return JBn(this),!!this.o;case 21:return!!this.s&&0!=this.s.i;case 22:return!!this.n&&Rvn(this.n);case 23:return 0!=HDn(this).i}return O3(this,n-bX((gWn(),r$t)),itn(BB(yan(this,16),26)||r$t,n))},MWn.oh=function(n){return(null==this.i||this.q&&0!=this.q.i?null:NNn(this,n))||hUn(this,n)},MWn.sh=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void ZZ(this,SD(t));case 2:return void IA(this,SD(t));case 5:return void Jqn(this,SD(t));case 7:return!this.A&&(this.A=new NL(O$t,this,7)),sqn(this.A),!this.A&&(this.A=new NL(O$t,this,7)),void pX(this.A,BB(t,14));case 8:return void Yfn(this,qy(TD(t)));case 9:return void tln(this,qy(TD(t)));case 10:return vqn(kJ(this)),void pX(kJ(this),BB(t,14));case 11:return!this.q&&(this.q=new eU(QAt,this,11,10)),sqn(this.q),!this.q&&(this.q=new eU(QAt,this,11,10)),void pX(this.q,BB(t,14));case 21:return!this.s&&(this.s=new eU(FAt,this,21,17)),sqn(this.s),!this.s&&(this.s=new eU(FAt,this,21,17)),void pX(this.s,BB(t,14));case 22:return sqn(a4(this)),void pX(a4(this),BB(t,14))}Lbn(this,n-bX((gWn(),r$t)),itn(BB(yan(this,16),26)||r$t,n),t)},MWn.zh=function(){return gWn(),r$t},MWn.Bh=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return cL(this.Cb,179)&&(BB(this.Cb,179).tb=null),void Nrn(this,null);case 2:return Dsn(this,null),void xen(this,this.D);case 5:return void Jqn(this,null);case 7:return!this.A&&(this.A=new NL(O$t,this,7)),void sqn(this.A);case 8:return void Yfn(this,!1);case 9:return void tln(this,!1);case 10:return void(this.u&&vqn(this.u));case 11:return!this.q&&(this.q=new eU(QAt,this,11,10)),void sqn(this.q);case 21:return!this.s&&(this.s=new eU(FAt,this,21,17)),void sqn(this.s);case 22:return void(this.n&&sqn(this.n))}qfn(this,n-bX((gWn(),r$t)),itn(BB(yan(this,16),26)||r$t,n))},MWn.Gh=function(){var n,t;if(JBn(this),RBn(this),WPn(this),gBn(this),qFn(this),CLn(this),HDn(this),a6(XB(P5(this))),this.s)for(n=0,t=this.s.i;n=0;--t)Wtn(this,t);return Qwn(this,n)},MWn.Xj=function(){sqn(this)},MWn.oi=function(n,t){return _en(this,n,t)},vX(y9n,"EcoreEList",622),wAn(496,622,R9n,yH),MWn.ai=function(){return!1},MWn.aj=function(){return this.c},MWn.bj=function(){return!1},MWn.Fk=function(){return!0},MWn.hi=function(){return!0},MWn.li=function(n,t){return t},MWn.ni=function(){return!1},MWn.c=0,vX(y9n,"EObjectEList",496),wAn(85,496,R9n,$L),MWn.bj=function(){return!0},MWn.Dk=function(){return!1},MWn.rk=function(){return!0},vX(y9n,"EObjectContainmentEList",85),wAn(545,85,R9n,LL),MWn.ci=function(){this.b=!0},MWn.fj=function(){return this.b},MWn.Xj=function(){var n;sqn(this),mA(this.e)?(n=this.b,this.b=!1,ban(this.e,new t6(this.e,2,this.c,n,!1))):this.b=!1},MWn.b=!1,vX(y9n,"EObjectContainmentEList/Unsettable",545),wAn(1140,545,R9n,JG),MWn.ii=function(n,t){var e,i;return e=BB(Iln(this,n,t),87),mA(this.e)&&Lv(this,new j9(this.a,7,(gWn(),a$t),iln(t),cL(i=e.c,88)?BB(i,26):d$t,n)),e},MWn.jj=function(n,t){return Zwn(this,BB(n,87),t)},MWn.kj=function(n,t){return Ywn(this,BB(n,87),t)},MWn.lj=function(n,t,e){return _jn(this,BB(n,87),BB(t,87),e)},MWn.Zi=function(n,t,e,i,r){switch(n){case 3:return yZ(this,n,t,e,i,this.i>1);case 5:return yZ(this,n,t,e,i,this.i-BB(e,15).gc()>0);default:return new N7(this.e,n,this.c,t,e,i,!0)}},MWn.ij=function(){return!0},MWn.fj=function(){return Rvn(this)},MWn.Xj=function(){sqn(this)},vX(l6n,"EClassImpl/1",1140),wAn(1154,1153,Z8n),MWn.ui=function(n){var t,e,i,r,c,a,u;if(8!=(e=n.xi())){if(0==(i=apn(n)))switch(e){case 1:case 9:null!=(u=n.Bi())&&(!(t=P5(BB(u,473))).c&&(t.c=new Bo),snn(t.c,n.Ai())),null!=(a=n.zi())&&0==(1&(r=BB(a,473)).Bb)&&(!(t=P5(r)).c&&(t.c=new Bo),f9(t.c,BB(n.Ai(),26)));break;case 3:null!=(a=n.zi())&&0==(1&(r=BB(a,473)).Bb)&&(!(t=P5(r)).c&&(t.c=new Bo),f9(t.c,BB(n.Ai(),26)));break;case 5:if(null!=(a=n.zi()))for(c=BB(a,14).Kc();c.Ob();)0==(1&(r=BB(c.Pb(),473)).Bb)&&(!(t=P5(r)).c&&(t.c=new Bo),f9(t.c,BB(n.Ai(),26)));break;case 4:null!=(u=n.Bi())&&0==(1&(r=BB(u,473)).Bb)&&(!(t=P5(r)).c&&(t.c=new Bo),snn(t.c,n.Ai()));break;case 6:if(null!=(u=n.Bi()))for(c=BB(u,14).Kc();c.Ob();)0==(1&(r=BB(c.Pb(),473)).Bb)&&(!(t=P5(r)).c&&(t.c=new Bo),snn(t.c,n.Ai()))}this.Hk(i)}},MWn.Hk=function(n){dRn(this,n)},MWn.b=63,vX(l6n,"ESuperAdapter",1154),wAn(1155,1154,Z8n,dp),MWn.Hk=function(n){ACn(this,n)},vX(l6n,"EClassImpl/10",1155),wAn(1144,696,R9n),MWn.Vh=function(n,t){return BTn(this,n,t)},MWn.Wh=function(n){return bmn(this,n)},MWn.Xh=function(n,t){Ifn(this,n,t)},MWn.Yh=function(n){c6(this,n)},MWn.pi=function(n){return F9(this,n)},MWn.mi=function(n,t){return onn(this,n,t)},MWn.lk=function(n,t){throw Hp(new pv)},MWn.Zh=function(){return new ax(this)},MWn.$h=function(){return new ux(this)},MWn._h=function(n){return sin(this,n)},MWn.mk=function(n,t){throw Hp(new pv)},MWn.Wj=function(n){return this},MWn.fj=function(){return 0!=this.i},MWn.Wb=function(n){throw Hp(new pv)},MWn.Xj=function(){throw Hp(new pv)},vX(y9n,"EcoreEList/UnmodifiableEList",1144),wAn(319,1144,R9n,NO),MWn.ni=function(){return!1},vX(y9n,"EcoreEList/UnmodifiableEList/FastCompare",319),wAn(1147,319,R9n,don),MWn.Xc=function(n){var t,e;if(cL(n,170)&&-1!=(t=BB(n,170).aj()))for(e=this.i;t4){if(!this.wj(n))return!1;if(this.rk()){if(a=(t=(e=BB(n,49)).Ug())==this.b&&(this.Dk()?e.Og(e.Vg(),BB(itn(jJ(this.b),this.aj()).Yj(),26).Bj())==Cvn(BB(itn(jJ(this.b),this.aj()),18)).n:-1-e.Vg()==this.aj()),this.Ek()&&!a&&!t&&e.Zg())for(i=0;i1||-1==e)},MWn.Dk=function(){var n;return!!cL(n=itn(jJ(this.b),this.aj()),99)&&!!Cvn(BB(n,18))},MWn.Ek=function(){var n;return!!cL(n=itn(jJ(this.b),this.aj()),99)&&0!=(BB(n,18).Bb&BQn)},MWn.Xc=function(n){var t,e,i;if((e=this.Qi(n))>=0)return e;if(this.Fk())for(t=0,i=this.Vi();t=0;--n)eGn(this,n,this.Oi(n));return this.Wi()},MWn.Qc=function(n){var t;if(this.Ek())for(t=this.Vi()-1;t>=0;--t)eGn(this,t,this.Oi(t));return this.Xi(n)},MWn.Xj=function(){vqn(this)},MWn.oi=function(n,t){return B9(this,n,t)},vX(y9n,"DelegatingEcoreEList",742),wAn(1150,742,H9n,uR),MWn.Hi=function(n,t){lD(this,n,BB(t,26))},MWn.Ii=function(n){e$(this,BB(n,26))},MWn.Oi=function(n){var t;return cL(t=BB(Wtn(a4(this.a),n),87).c,88)?BB(t,26):(gWn(),d$t)},MWn.Ti=function(n){var t;return cL(t=BB(fDn(a4(this.a),n),87).c,88)?BB(t,26):(gWn(),d$t)},MWn.Ui=function(n,t){return dmn(this,n,BB(t,26))},MWn.ai=function(){return!1},MWn.Zi=function(n,t,e,i,r){return null},MWn.Ji=function(){return new pp(this)},MWn.Ki=function(){sqn(a4(this.a))},MWn.Li=function(n){return Ufn(this,n)},MWn.Mi=function(n){var t;for(t=n.Kc();t.Ob();)if(!Ufn(this,t.Pb()))return!1;return!0},MWn.Ni=function(n){var t,e,i;if(cL(n,15)&&(i=BB(n,15)).gc()==a4(this.a).i){for(t=i.Kc(),e=new AL(this);t.Ob();)if(GI(t.Pb())!==GI(kpn(e)))return!1;return!0}return!1},MWn.Pi=function(){var n,t,e,i;for(t=1,n=new AL(a4(this.a));n.e!=n.i.gc();)t=31*t+((e=cL(i=BB(kpn(n),87).c,88)?BB(i,26):(gWn(),d$t))?PN(e):0);return t},MWn.Qi=function(n){var t,e,i,r;for(i=0,e=new AL(a4(this.a));e.e!=e.i.gc();){if(t=BB(kpn(e),87),GI(n)===GI(cL(r=t.c,88)?BB(r,26):(gWn(),d$t)))return i;++i}return-1},MWn.Ri=function(){return 0==a4(this.a).i},MWn.Si=function(){return null},MWn.Vi=function(){return a4(this.a).i},MWn.Wi=function(){var n,t,e,i,r,c;for(c=a4(this.a).i,r=x8(Ant,HWn,1,c,5,1),e=0,t=new AL(a4(this.a));t.e!=t.i.gc();)n=BB(kpn(t),87),r[e++]=cL(i=n.c,88)?BB(i,26):(gWn(),d$t);return r},MWn.Xi=function(n){var t,e,i,r;for(r=a4(this.a).i,n.lengthr&&$X(n,r,null),e=0,t=new AL(a4(this.a));t.e!=t.i.gc();)$X(n,e++,cL(i=BB(kpn(t),87).c,88)?BB(i,26):(gWn(),d$t));return n},MWn.Yi=function(){var n,t,e,i,r;for((r=new Sk).a+="[",n=a4(this.a),t=0,i=a4(this.a).i;t>16)>=0?fyn(this,e):this.Cb.ih(this,-1-i,null,e)),T_n(this,n,6,e);case 9:return!this.a&&(this.a=new eU(WAt,this,9,5)),Jwn(this.a,n,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),o$t),t),66).Nj().Qj(this,fgn(this),t-bX((gWn(),o$t)),n,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 6:return T_n(this,null,6,e);case 7:return!this.A&&(this.A=new NL(O$t,this,7)),_pn(this.A,n,e);case 9:return!this.a&&(this.a=new eU(WAt,this,9,5)),_pn(this.a,n,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),o$t),t),66).Nj().Rj(this,fgn(this),t-bX((gWn(),o$t)),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!iyn(this);case 4:return!!Qsn(this);case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!wZ(this);case 7:return!!this.A&&0!=this.A.i;case 8:return 0==(256&this.Bb);case 9:return!!this.a&&0!=this.a.i}return O3(this,n-bX((gWn(),o$t)),itn(BB(yan(this,16),26)||o$t,n))},MWn.sh=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void ZZ(this,SD(t));case 2:return void IA(this,SD(t));case 5:return void Jqn(this,SD(t));case 7:return!this.A&&(this.A=new NL(O$t,this,7)),sqn(this.A),!this.A&&(this.A=new NL(O$t,this,7)),void pX(this.A,BB(t,14));case 8:return void Zfn(this,qy(TD(t)));case 9:return!this.a&&(this.a=new eU(WAt,this,9,5)),sqn(this.a),!this.a&&(this.a=new eU(WAt,this,9,5)),void pX(this.a,BB(t,14))}Lbn(this,n-bX((gWn(),o$t)),itn(BB(yan(this,16),26)||o$t,n),t)},MWn.zh=function(){return gWn(),o$t},MWn.Bh=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return cL(this.Cb,179)&&(BB(this.Cb,179).tb=null),void Nrn(this,null);case 2:return Dsn(this,null),void xen(this,this.D);case 5:return void Jqn(this,null);case 7:return!this.A&&(this.A=new NL(O$t,this,7)),void sqn(this.A);case 8:return void Zfn(this,!0);case 9:return!this.a&&(this.a=new eU(WAt,this,9,5)),void sqn(this.a)}qfn(this,n-bX((gWn(),o$t)),itn(BB(yan(this,16),26)||o$t,n))},MWn.Gh=function(){var n,t;if(this.a)for(n=0,t=this.a.i;n>16==5?BB(this.Cb,671):null}return U9(this,n-bX((gWn(),s$t)),itn(BB(yan(this,16),26)||s$t,n),t,e)},MWn.hh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),Jwn(this.Ab,n,e);case 5:return this.Cb&&(e=(i=this.Db>>16)>=0?lkn(this,e):this.Cb.ih(this,-1-i,null,e)),T_n(this,n,5,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),s$t),t),66).Nj().Qj(this,fgn(this),t-bX((gWn(),s$t)),n,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 5:return T_n(this,null,5,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),s$t),t),66).Nj().Rj(this,fgn(this),t-bX((gWn(),s$t)),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0!=this.d;case 3:return!!this.b;case 4:return null!=this.c;case 5:return!(this.Db>>16!=5||!BB(this.Cb,671))}return O3(this,n-bX((gWn(),s$t)),itn(BB(yan(this,16),26)||s$t,n))},MWn.sh=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void Nrn(this,SD(t));case 2:return void $en(this,BB(t,19).a);case 3:return void gOn(this,BB(t,1940));case 4:return void Fin(this,SD(t))}Lbn(this,n-bX((gWn(),s$t)),itn(BB(yan(this,16),26)||s$t,n),t)},MWn.zh=function(){return gWn(),s$t},MWn.Bh=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return void Nrn(this,null);case 2:return void $en(this,0);case 3:return void gOn(this,null);case 4:return void Fin(this,null)}qfn(this,n-bX((gWn(),s$t)),itn(BB(yan(this,16),26)||s$t,n))},MWn.Ib=function(){var n;return null==(n=this.c)?this.zb:n},MWn.b=null,MWn.c=null,MWn.d=0,vX(l6n,"EEnumLiteralImpl",573);var L$t,N$t,x$t,D$t=bq(l6n,"EFactoryImpl/InternalEDateTimeFormat");wAn(489,1,{2015:1},vp),vX(l6n,"EFactoryImpl/1ClientInternalEDateTimeFormat",489),wAn(241,115,{105:1,92:1,90:1,87:1,56:1,108:1,49:1,97:1,241:1,114:1,115:1},Kp),MWn.Sg=function(n,t,e){var i;return e=T_n(this,n,t,e),this.e&&cL(n,170)&&(i=kLn(this,this.e))!=this.c&&(e=azn(this,i,e)),e},MWn._g=function(n,t,e){switch(n){case 0:return this.f;case 1:return!this.d&&(this.d=new $L(VAt,this,1)),this.d;case 2:return t?lFn(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?qvn(this):this.a}return U9(this,n-bX((gWn(),f$t)),itn(BB(yan(this,16),26)||f$t,n),t,e)},MWn.jh=function(n,t,e){switch(t){case 0:return nfn(this,null,e);case 1:return!this.d&&(this.d=new $L(VAt,this,1)),_pn(this.d,n,e);case 3:return Zhn(this,null,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),f$t),t),66).Nj().Rj(this,fgn(this),t-bX((gWn(),f$t)),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.f;case 1:return!!this.d&&0!=this.d.i;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return O3(this,n-bX((gWn(),f$t)),itn(BB(yan(this,16),26)||f$t,n))},MWn.sh=function(n,t){switch(n){case 0:return void jEn(this,BB(t,87));case 1:return!this.d&&(this.d=new $L(VAt,this,1)),sqn(this.d),!this.d&&(this.d=new $L(VAt,this,1)),void pX(this.d,BB(t,14));case 3:return void kEn(this,BB(t,87));case 4:return void DMn(this,BB(t,836));case 5:return void cen(this,BB(t,138))}Lbn(this,n-bX((gWn(),f$t)),itn(BB(yan(this,16),26)||f$t,n),t)},MWn.zh=function(){return gWn(),f$t},MWn.Bh=function(n){switch(n){case 0:return void jEn(this,null);case 1:return!this.d&&(this.d=new $L(VAt,this,1)),void sqn(this.d);case 3:return void kEn(this,null);case 4:return void DMn(this,null);case 5:return void cen(this,null)}qfn(this,n-bX((gWn(),f$t)),itn(BB(yan(this,16),26)||f$t,n))},MWn.Ib=function(){var n;return(n=new lN(P$n(this))).a+=" (expression: ",bHn(this,n),n.a+=")",n.a},vX(l6n,"EGenericTypeImpl",241),wAn(1969,1964,q9n),MWn.Xh=function(n,t){nR(this,n,t)},MWn.lk=function(n,t){return nR(this,this.gc(),n),t},MWn.pi=function(n){return Dpn(this.Gi(),n)},MWn.Zh=function(){return this.$h()},MWn.Gi=function(){return new Pp(this)},MWn.$h=function(){return this._h(0)},MWn._h=function(n){return this.Gi().Zc(n)},MWn.mk=function(n,t){return ywn(this,n,!0),t},MWn.ii=function(n,t){var e;return e=tkn(this,t),this.Zc(n).Rb(e),e},MWn.ji=function(n,t){ywn(this,t,!0),this.Zc(n).Rb(t)},vX(y9n,"AbstractSequentialInternalEList",1969),wAn(486,1969,q9n,QN),MWn.pi=function(n){return Dpn(this.Gi(),n)},MWn.Zh=function(){return null==this.b?(JM(),JM(),x$t):this.Jk()},MWn.Gi=function(){return new DO(this.a,this.b)},MWn.$h=function(){return null==this.b?(JM(),JM(),x$t):this.Jk()},MWn._h=function(n){var t,e;if(null==this.b){if(n<0||n>1)throw Hp(new Ay(e9n+n+", size=0"));return JM(),JM(),x$t}for(e=this.Jk(),t=0;t0;)if(t=this.c[--this.d],(!this.e||t.Gj()!=NOt||0!=t.aj())&&(!this.Mk()||this.b.mh(t)))if(c=this.b.bh(t,this.Lk()),this.f=(ZM(),BB(t,66).Oj()),this.f||t.$j()){if(this.Lk()?(i=BB(c,15),this.k=i):(i=BB(c,69),this.k=this.j=i),cL(this.k,54)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j._h(this.k.gc()):this.k.Zc(this.k.gc()),this.p?jPn(this,this.p):wCn(this))return r=this.p?this.p.Ub():this.j?this.j.pi(--this.n):this.k.Xb(--this.n),this.f?((n=BB(r,72)).ak(),e=n.dd(),this.i=e):(e=r,this.i=e),this.g=-3,!0}else if(null!=c)return this.k=null,this.p=null,e=c,this.i=e,this.g=-2,!0;return this.k=null,this.p=null,this.g=-1,!1}},MWn.Pb=function(){return Man(this)},MWn.Tb=function(){return this.a},MWn.Ub=function(){var n;if(this.g<-1||this.Sb())return--this.a,this.g=0,n=this.i,this.Sb(),n;throw Hp(new yv)},MWn.Vb=function(){return this.a-1},MWn.Qb=function(){throw Hp(new pv)},MWn.Lk=function(){return!1},MWn.Wb=function(n){throw Hp(new pv)},MWn.Mk=function(){return!0},MWn.a=0,MWn.d=0,MWn.f=!1,MWn.g=0,MWn.n=0,MWn.o=0,vX(y9n,"EContentsEList/FeatureIteratorImpl",279),wAn(697,279,G9n,Vx),MWn.Lk=function(){return!0},vX(y9n,"EContentsEList/ResolvingFeatureIteratorImpl",697),wAn(1157,697,G9n,Jx),MWn.Mk=function(){return!1},vX(l6n,"ENamedElementImpl/1/1",1157),wAn(1158,279,G9n,Qx),MWn.Mk=function(){return!1},vX(l6n,"ENamedElementImpl/1/2",1158),wAn(36,143,t9n,f4,l4,nU,k9,N7,t6,Hen,S0,qen,P0,Y5,C0,Uen,I0,Z5,O0,Gen,A0,tU,j9,GQ,zen,$0,n6,L0),MWn._i=function(){return h9(this)},MWn.gj=function(){var n;return(n=h9(this))?n.zj():null},MWn.yi=function(n){return-1==this.b&&this.a&&(this.b=this.c.Xg(this.a.aj(),this.a.Gj())),this.c.Og(this.b,n)},MWn.Ai=function(){return this.c},MWn.hj=function(){var n;return!!(n=h9(this))&&n.Kj()},MWn.b=-1,vX(l6n,"ENotificationImpl",36),wAn(399,284,{105:1,92:1,90:1,147:1,191:1,56:1,59:1,108:1,472:1,49:1,97:1,150:1,399:1,284:1,114:1,115:1},$m),MWn.Qg=function(n){return Pkn(this,n)},MWn._g=function(n,t,e){var i;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return hN(),0!=(256&this.Bb);case 3:return hN(),0!=(512&this.Bb);case 4:return iln(this.s);case 5:return iln(this.t);case 6:return hN(),(i=this.t)>1||-1==i;case 7:return hN(),this.s>=1;case 8:return t?Ikn(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?BB(this.Cb,26):null;case 11:return!this.d&&(this.d=new NL(O$t,this,11)),this.d;case 12:return!this.c&&(this.c=new eU(JAt,this,12,10)),this.c;case 13:return!this.a&&(this.a=new oR(this,this)),this.a;case 14:return H7(this)}return U9(this,n-bX((gWn(),g$t)),itn(BB(yan(this,16),26)||g$t,n),t,e)},MWn.hh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),Jwn(this.Ab,n,e);case 10:return this.Cb&&(e=(i=this.Db>>16)>=0?Pkn(this,e):this.Cb.ih(this,-1-i,null,e)),T_n(this,n,10,e);case 12:return!this.c&&(this.c=new eU(JAt,this,12,10)),Jwn(this.c,n,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),g$t),t),66).Nj().Qj(this,fgn(this),t-bX((gWn(),g$t)),n,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 9:return gX(this,e);case 10:return T_n(this,null,10,e);case 11:return!this.d&&(this.d=new NL(O$t,this,11)),_pn(this.d,n,e);case 12:return!this.c&&(this.c=new eU(JAt,this,12,10)),_pn(this.c,n,e);case 14:return _pn(H7(this),n,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),g$t),t),66).Nj().Rj(this,fgn(this),t-bX((gWn(),g$t)),n,e)},MWn.lh=function(n){var t;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(t=this.t)>1||-1==t;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yW(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yW(this.q).i);case 10:return!(this.Db>>16!=10||!BB(this.Cb,26));case 11:return!!this.d&&0!=this.d.i;case 12:return!!this.c&&0!=this.c.i;case 13:return!(!this.a||0==H7(this.a.a).i||this.b&&Kvn(this.b));case 14:return!!this.b&&Kvn(this.b)}return O3(this,n-bX((gWn(),g$t)),itn(BB(yan(this,16),26)||g$t,n))},MWn.sh=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void Nrn(this,SD(t));case 2:return void Jfn(this,qy(TD(t)));case 3:return void nln(this,qy(TD(t)));case 4:return void Len(this,BB(t,19).a);case 5:return void Nen(this,BB(t,19).a);case 8:return void Ihn(this,BB(t,138));case 9:return void((e=HTn(this,BB(t,87),null))&&e.Fi());case 11:return!this.d&&(this.d=new NL(O$t,this,11)),sqn(this.d),!this.d&&(this.d=new NL(O$t,this,11)),void pX(this.d,BB(t,14));case 12:return!this.c&&(this.c=new eU(JAt,this,12,10)),sqn(this.c),!this.c&&(this.c=new eU(JAt,this,12,10)),void pX(this.c,BB(t,14));case 13:return!this.a&&(this.a=new oR(this,this)),vqn(this.a),!this.a&&(this.a=new oR(this,this)),void pX(this.a,BB(t,14));case 14:return sqn(H7(this)),void pX(H7(this),BB(t,14))}Lbn(this,n-bX((gWn(),g$t)),itn(BB(yan(this,16),26)||g$t,n),t)},MWn.zh=function(){return gWn(),g$t},MWn.Bh=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return void Nrn(this,null);case 2:return void Jfn(this,!0);case 3:return void nln(this,!0);case 4:return void Len(this,0);case 5:return void Nen(this,1);case 8:return void Ihn(this,null);case 9:return void((t=HTn(this,null,null))&&t.Fi());case 11:return!this.d&&(this.d=new NL(O$t,this,11)),void sqn(this.d);case 12:return!this.c&&(this.c=new eU(JAt,this,12,10)),void sqn(this.c);case 13:return void(this.a&&vqn(this.a));case 14:return void(this.b&&sqn(this.b))}qfn(this,n-bX((gWn(),g$t)),itn(BB(yan(this,16),26)||g$t,n))},MWn.Gh=function(){var n,t;if(this.c)for(n=0,t=this.c.i;ni&&$X(n,i,null),e=0,t=new AL(H7(this.a));t.e!=t.i.gc();)$X(n,e++,BB(kpn(t),87).c||(gWn(),l$t));return n},MWn.Yi=function(){var n,t,e,i;for((i=new Sk).a+="[",n=H7(this.a),t=0,e=H7(this.a).i;t1);case 5:return yZ(this,n,t,e,i,this.i-BB(e,15).gc()>0);default:return new N7(this.e,n,this.c,t,e,i,!0)}},MWn.ij=function(){return!0},MWn.fj=function(){return Kvn(this)},MWn.Xj=function(){sqn(this)},vX(l6n,"EOperationImpl/2",1341),wAn(498,1,{1938:1,498:1},OI),vX(l6n,"EPackageImpl/1",498),wAn(16,85,R9n,eU),MWn.zk=function(){return this.d},MWn.Ak=function(){return this.b},MWn.Dk=function(){return!0},MWn.b=0,vX(y9n,"EObjectContainmentWithInverseEList",16),wAn(353,16,R9n,eK),MWn.Ek=function(){return!0},MWn.li=function(n,t){return GOn(this,n,BB(t,56))},vX(y9n,"EObjectContainmentWithInverseEList/Resolving",353),wAn(298,353,R9n,Yz),MWn.ci=function(){this.a.tb=null},vX(l6n,"EPackageImpl/2",298),wAn(1228,1,{},Oo),vX(l6n,"EPackageImpl/3",1228),wAn(718,43,tJn,Nm),MWn._b=function(n){return XI(n)?eJ(this,n):!!AJ(this.f,n)},vX(l6n,"EPackageRegistryImpl",718),wAn(509,284,{105:1,92:1,90:1,147:1,191:1,56:1,2017:1,108:1,472:1,49:1,97:1,150:1,509:1,284:1,114:1,115:1},Lm),MWn.Qg=function(n){return Ckn(this,n)},MWn._g=function(n,t,e){var i;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return hN(),0!=(256&this.Bb);case 3:return hN(),0!=(512&this.Bb);case 4:return iln(this.s);case 5:return iln(this.t);case 6:return hN(),(i=this.t)>1||-1==i;case 7:return hN(),this.s>=1;case 8:return t?Ikn(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?BB(this.Cb,59):null}return U9(this,n-bX((gWn(),m$t)),itn(BB(yan(this,16),26)||m$t,n),t,e)},MWn.hh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),Jwn(this.Ab,n,e);case 10:return this.Cb&&(e=(i=this.Db>>16)>=0?Ckn(this,e):this.Cb.ih(this,-1-i,null,e)),T_n(this,n,10,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),m$t),t),66).Nj().Qj(this,fgn(this),t-bX((gWn(),m$t)),n,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 9:return gX(this,e);case 10:return T_n(this,null,10,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),m$t),t),66).Nj().Rj(this,fgn(this),t-bX((gWn(),m$t)),n,e)},MWn.lh=function(n){var t;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(t=this.t)>1||-1==t;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yW(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yW(this.q).i);case 10:return!(this.Db>>16!=10||!BB(this.Cb,59))}return O3(this,n-bX((gWn(),m$t)),itn(BB(yan(this,16),26)||m$t,n))},MWn.zh=function(){return gWn(),m$t},vX(l6n,"EParameterImpl",509),wAn(99,449,{105:1,92:1,90:1,147:1,191:1,56:1,18:1,170:1,66:1,108:1,472:1,49:1,97:1,150:1,99:1,449:1,284:1,114:1,115:1,677:1},pD),MWn._g=function(n,t,e){var i,r;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return hN(),0!=(256&this.Bb);case 3:return hN(),0!=(512&this.Bb);case 4:return iln(this.s);case 5:return iln(this.t);case 6:return hN(),(r=this.t)>1||-1==r;case 7:return hN(),this.s>=1;case 8:return t?Ikn(this):this.r;case 9:return this.q;case 10:return hN(),0!=(this.Bb&k6n);case 11:return hN(),0!=(this.Bb&M9n);case 12:return hN(),0!=(this.Bb&_Qn);case 13:return this.j;case 14:return qLn(this);case 15:return hN(),0!=(this.Bb&T9n);case 16:return hN(),0!=(this.Bb&hVn);case 17:return dZ(this);case 18:return hN(),0!=(this.Bb&h6n);case 19:return hN(),!(!(i=Cvn(this))||0==(i.Bb&h6n));case 20:return hN(),0!=(this.Bb&BQn);case 21:return t?Cvn(this):this.b;case 22:return t?Ion(this):K5(this);case 23:return!this.a&&(this.a=new RL(BAt,this,23)),this.a}return U9(this,n-bX((gWn(),y$t)),itn(BB(yan(this,16),26)||y$t,n),t,e)},MWn.lh=function(n){var t,e;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(e=this.t)>1||-1==e;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yW(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yW(this.q).i);case 10:return 0==(this.Bb&k6n);case 11:return 0!=(this.Bb&M9n);case 12:return 0!=(this.Bb&_Qn);case 13:return null!=this.j;case 14:return null!=qLn(this);case 15:return 0!=(this.Bb&T9n);case 16:return 0!=(this.Bb&hVn);case 17:return!!dZ(this);case 18:return 0!=(this.Bb&h6n);case 19:return!!(t=Cvn(this))&&0!=(t.Bb&h6n);case 20:return 0==(this.Bb&BQn);case 21:return!!this.b;case 22:return!!K5(this);case 23:return!!this.a&&0!=this.a.i}return O3(this,n-bX((gWn(),y$t)),itn(BB(yan(this,16),26)||y$t,n))},MWn.sh=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void YZ(this,SD(t));case 2:return void Jfn(this,qy(TD(t)));case 3:return void nln(this,qy(TD(t)));case 4:return void Len(this,BB(t,19).a);case 5:return void Nen(this,BB(t,19).a);case 8:return void Ihn(this,BB(t,138));case 9:return void((e=HTn(this,BB(t,87),null))&&e.Fi());case 10:return void Aln(this,qy(TD(t)));case 11:return void Nln(this,qy(TD(t)));case 12:return void $ln(this,qy(TD(t)));case 13:return void _I(this,SD(t));case 15:return void Lln(this,qy(TD(t)));case 16:return void qln(this,qy(TD(t)));case 18:return void JZ(this,qy(TD(t)));case 20:return void Uln(this,qy(TD(t)));case 21:return void rrn(this,BB(t,18));case 23:return!this.a&&(this.a=new RL(BAt,this,23)),sqn(this.a),!this.a&&(this.a=new RL(BAt,this,23)),void pX(this.a,BB(t,14))}Lbn(this,n-bX((gWn(),y$t)),itn(BB(yan(this,16),26)||y$t,n),t)},MWn.zh=function(){return gWn(),y$t},MWn.Bh=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return cL(this.Cb,88)&&ACn(P5(BB(this.Cb,88)),4),void Nrn(this,null);case 2:return void Jfn(this,!0);case 3:return void nln(this,!0);case 4:return void Len(this,0);case 5:return void Nen(this,1);case 8:return void Ihn(this,null);case 9:return void((t=HTn(this,null,null))&&t.Fi());case 10:return void Aln(this,!0);case 11:return void Nln(this,!1);case 12:return void $ln(this,!1);case 13:return this.i=null,void arn(this,null);case 15:return void Lln(this,!1);case 16:return void qln(this,!1);case 18:return zln(this,!1),void(cL(this.Cb,88)&&ACn(P5(BB(this.Cb,88)),2));case 20:return void Uln(this,!0);case 21:return void rrn(this,null);case 23:return!this.a&&(this.a=new RL(BAt,this,23)),void sqn(this.a)}qfn(this,n-bX((gWn(),y$t)),itn(BB(yan(this,16),26)||y$t,n))},MWn.Gh=function(){Ion(this),kV(B7((IPn(),Z$t),this)),Ikn(this),this.Bb|=1},MWn.Lj=function(){return Cvn(this)},MWn.qk=function(){var n;return!!(n=Cvn(this))&&0!=(n.Bb&h6n)},MWn.rk=function(){return 0!=(this.Bb&h6n)},MWn.sk=function(){return 0!=(this.Bb&BQn)},MWn.nk=function(n,t){return this.c=null,Pfn(this,n,t)},MWn.Ib=function(){var n;return 0!=(64&this.Db)?ERn(this):((n=new fN(ERn(this))).a+=" (containment: ",yE(n,0!=(this.Bb&h6n)),n.a+=", resolveProxies: ",yE(n,0!=(this.Bb&BQn)),n.a+=")",n.a)},vX(l6n,"EReferenceImpl",99),wAn(548,115,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1,548:1,114:1,115:1},Ao),MWn.Fb=function(n){return this===n},MWn.cd=function(){return this.b},MWn.dd=function(){return this.c},MWn.Hb=function(){return PN(this)},MWn.Uh=function(n){vq(this,SD(n))},MWn.ed=function(n){return $H(this,SD(n))},MWn._g=function(n,t,e){switch(n){case 0:return this.b;case 1:return this.c}return U9(this,n-bX((gWn(),k$t)),itn(BB(yan(this,16),26)||k$t,n),t,e)},MWn.lh=function(n){switch(n){case 0:return null!=this.b;case 1:return null!=this.c}return O3(this,n-bX((gWn(),k$t)),itn(BB(yan(this,16),26)||k$t,n))},MWn.sh=function(n,t){switch(n){case 0:return void mq(this,SD(t));case 1:return void Kin(this,SD(t))}Lbn(this,n-bX((gWn(),k$t)),itn(BB(yan(this,16),26)||k$t,n),t)},MWn.zh=function(){return gWn(),k$t},MWn.Bh=function(n){switch(n){case 0:return void Rin(this,null);case 1:return void Kin(this,null)}qfn(this,n-bX((gWn(),k$t)),itn(BB(yan(this,16),26)||k$t,n))},MWn.Sh=function(){var n;return-1==this.a&&(n=this.b,this.a=null==n?0:vvn(n)),this.a},MWn.Th=function(n){this.a=n},MWn.Ib=function(){var n;return 0!=(64&this.Db)?P$n(this):((n=new fN(P$n(this))).a+=" (key: ",cO(n,this.b),n.a+=", value: ",cO(n,this.c),n.a+=")",n.a)},MWn.a=-1,MWn.b=null,MWn.c=null;var R$t,K$t,_$t,F$t,B$t,H$t,q$t,G$t,z$t,U$t,X$t=vX(l6n,"EStringToStringMapEntryImpl",548),W$t=bq(y9n,"FeatureMap/Entry/Internal");wAn(565,1,z9n),MWn.Ok=function(n){return this.Pk(BB(n,49))},MWn.Pk=function(n){return this.Ok(n)},MWn.Fb=function(n){var t,e;return this===n||!!cL(n,72)&&(t=BB(n,72)).ak()==this.c&&(null==(e=this.dd())?null==t.dd():Nfn(e,t.dd()))},MWn.ak=function(){return this.c},MWn.Hb=function(){var n;return n=this.dd(),nsn(this.c)^(null==n?0:nsn(n))},MWn.Ib=function(){var n,t;return t=Utn((n=this.c).Hj()).Ph(),n.ne(),(null!=t&&0!=t.length?t+":"+n.ne():n.ne())+"="+this.dd()},vX(l6n,"EStructuralFeatureImpl/BasicFeatureMapEntry",565),wAn(776,565,z9n,rR),MWn.Pk=function(n){return new rR(this.c,n)},MWn.dd=function(){return this.a},MWn.Qk=function(n,t,e){return Scn(this,n,this.a,t,e)},MWn.Rk=function(n,t,e){return Pcn(this,n,this.a,t,e)},vX(l6n,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",776),wAn(1314,1,{},AI),MWn.Pj=function(n,t,e,i,r){return BB(S9(n,this.b),215).nl(this.a).Wj(i)},MWn.Qj=function(n,t,e,i,r){return BB(S9(n,this.b),215).el(this.a,i,r)},MWn.Rj=function(n,t,e,i,r){return BB(S9(n,this.b),215).fl(this.a,i,r)},MWn.Sj=function(n,t,e){return BB(S9(n,this.b),215).nl(this.a).fj()},MWn.Tj=function(n,t,e,i){BB(S9(n,this.b),215).nl(this.a).Wb(i)},MWn.Uj=function(n,t,e){return BB(S9(n,this.b),215).nl(this.a)},MWn.Vj=function(n,t,e){BB(S9(n,this.b),215).nl(this.a).Xj()},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1314),wAn(89,1,{},PB,lQ,RJ,w4),MWn.Pj=function(n,t,e,i,r){var c;if(null==(c=t.Ch(e))&&t.Dh(e,c=iWn(this,n)),!r)switch(this.e){case 50:case 41:return BB(c,589).sj();case 40:return BB(c,215).kl()}return c},MWn.Qj=function(n,t,e,i,r){var c;return null==(c=t.Ch(e))&&t.Dh(e,c=iWn(this,n)),BB(c,69).lk(i,r)},MWn.Rj=function(n,t,e,i,r){var c;return null!=(c=t.Ch(e))&&(r=BB(c,69).mk(i,r)),r},MWn.Sj=function(n,t,e){var i;return null!=(i=t.Ch(e))&&BB(i,76).fj()},MWn.Tj=function(n,t,e,i){var r;!(r=BB(t.Ch(e),76))&&t.Dh(e,r=iWn(this,n)),r.Wb(i)},MWn.Uj=function(n,t,e){var i;return null==(i=t.Ch(e))&&t.Dh(e,i=iWn(this,n)),cL(i,76)?BB(i,76):new Ep(BB(t.Ch(e),15))},MWn.Vj=function(n,t,e){var i;!(i=BB(t.Ch(e),76))&&t.Dh(e,i=iWn(this,n)),i.Xj()},MWn.b=0,MWn.e=0,vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateMany",89),wAn(504,1,{}),MWn.Qj=function(n,t,e,i,r){throw Hp(new pv)},MWn.Rj=function(n,t,e,i,r){throw Hp(new pv)},MWn.Uj=function(n,t,e){return new bQ(this,n,t,e)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingle",504),wAn(1331,1,k9n,bQ),MWn.Wj=function(n){return this.a.Pj(this.c,this.d,this.b,n,!0)},MWn.fj=function(){return this.a.Sj(this.c,this.d,this.b)},MWn.Wb=function(n){this.a.Tj(this.c,this.d,this.b,n)},MWn.Xj=function(){this.a.Vj(this.c,this.d,this.b)},MWn.b=0,vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingle/1",1331),wAn(769,504,{},mY),MWn.Pj=function(n,t,e,i,r){return gKn(n,n.eh(),n.Vg())==this.b?this.sk()&&i?cAn(n):n.eh():null},MWn.Qj=function(n,t,e,i,r){var c,a;return n.eh()&&(r=(c=n.Vg())>=0?n.Qg(r):n.eh().ih(n,-1-c,null,r)),a=Awn(n.Tg(),this.e),n.Sg(i,a,r)},MWn.Rj=function(n,t,e,i,r){var c;return c=Awn(n.Tg(),this.e),n.Sg(null,c,r)},MWn.Sj=function(n,t,e){var i;return i=Awn(n.Tg(),this.e),!!n.eh()&&n.Vg()==i},MWn.Tj=function(n,t,e,i){var r,c,a,u,o;if(null!=i&&!SFn(this.a,i))throw Hp(new Ky(U9n+(cL(i,56)?dEn(BB(i,56).Tg()):utn(tsn(i)))+X9n+this.a+"'"));if(r=n.eh(),a=Awn(n.Tg(),this.e),GI(i)!==GI(r)||n.Vg()!=a&&null!=i){if(vkn(n,BB(i,56)))throw Hp(new _y(w6n+n.Ib()));o=null,r&&(o=(c=n.Vg())>=0?n.Qg(o):n.eh().ih(n,-1-c,null,o)),(u=BB(i,49))&&(o=u.gh(n,Awn(u.Tg(),this.b),null,o)),(o=n.Sg(u,a,o))&&o.Fi()}else n.Lg()&&n.Mg()&&ban(n,new nU(n,1,a,i,i))},MWn.Vj=function(n,t,e){var i,r,c;n.eh()?(c=(i=n.Vg())>=0?n.Qg(null):n.eh().ih(n,-1-i,null,null),r=Awn(n.Tg(),this.e),(c=n.Sg(null,r,c))&&c.Fi()):n.Lg()&&n.Mg()&&ban(n,new tU(n,1,this.e,null,null))},MWn.sk=function(){return!1},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",769),wAn(1315,769,{},CB),MWn.sk=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1315),wAn(563,504,{}),MWn.Pj=function(n,t,e,i,r){var c;return null==(c=t.Ch(e))?this.b:GI(c)===GI(R$t)?null:c},MWn.Sj=function(n,t,e){var i;return null!=(i=t.Ch(e))&&(GI(i)===GI(R$t)||!Nfn(i,this.b))},MWn.Tj=function(n,t,e,i){var r,c;n.Lg()&&n.Mg()?(r=null==(c=t.Ch(e))?this.b:GI(c)===GI(R$t)?null:c,null==i?null!=this.c?(t.Dh(e,null),i=this.b):null!=this.b?t.Dh(e,R$t):t.Dh(e,null):(this.Sk(i),t.Dh(e,i)),ban(n,this.d.Tk(n,1,this.e,r,i))):null==i?null!=this.c?t.Dh(e,null):null!=this.b?t.Dh(e,R$t):t.Dh(e,null):(this.Sk(i),t.Dh(e,i))},MWn.Vj=function(n,t,e){var i,r;n.Lg()&&n.Mg()?(i=null==(r=t.Ch(e))?this.b:GI(r)===GI(R$t)?null:r,t.Eh(e),ban(n,this.d.Tk(n,1,this.e,i,this.b))):t.Eh(e)},MWn.Sk=function(n){throw Hp(new bv)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",563),wAn(W9n,1,{},$o),MWn.Tk=function(n,t,e,i,r){return new tU(n,t,e,i,r)},MWn.Uk=function(n,t,e,i,r,c){return new GQ(n,t,e,i,r,c)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",W9n),wAn(1332,W9n,{},Lo),MWn.Tk=function(n,t,e,i,r){return new n6(n,t,e,qy(TD(i)),qy(TD(r)))},MWn.Uk=function(n,t,e,i,r,c){return new L0(n,t,e,qy(TD(i)),qy(TD(r)),c)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1332),wAn(1333,W9n,{},No),MWn.Tk=function(n,t,e,i,r){return new Hen(n,t,e,BB(i,217).a,BB(r,217).a)},MWn.Uk=function(n,t,e,i,r,c){return new S0(n,t,e,BB(i,217).a,BB(r,217).a,c)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1333),wAn(1334,W9n,{},xo),MWn.Tk=function(n,t,e,i,r){return new qen(n,t,e,BB(i,172).a,BB(r,172).a)},MWn.Uk=function(n,t,e,i,r,c){return new P0(n,t,e,BB(i,172).a,BB(r,172).a,c)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1334),wAn(1335,W9n,{},Do),MWn.Tk=function(n,t,e,i,r){return new Y5(n,t,e,Gy(MD(i)),Gy(MD(r)))},MWn.Uk=function(n,t,e,i,r,c){return new C0(n,t,e,Gy(MD(i)),Gy(MD(r)),c)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1335),wAn(1336,W9n,{},Ro),MWn.Tk=function(n,t,e,i,r){return new Uen(n,t,e,BB(i,155).a,BB(r,155).a)},MWn.Uk=function(n,t,e,i,r,c){return new I0(n,t,e,BB(i,155).a,BB(r,155).a,c)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1336),wAn(1337,W9n,{},Ko),MWn.Tk=function(n,t,e,i,r){return new Z5(n,t,e,BB(i,19).a,BB(r,19).a)},MWn.Uk=function(n,t,e,i,r,c){return new O0(n,t,e,BB(i,19).a,BB(r,19).a,c)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1337),wAn(1338,W9n,{},_o),MWn.Tk=function(n,t,e,i,r){return new Gen(n,t,e,BB(i,162).a,BB(r,162).a)},MWn.Uk=function(n,t,e,i,r,c){return new A0(n,t,e,BB(i,162).a,BB(r,162).a,c)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1338),wAn(1339,W9n,{},Fo),MWn.Tk=function(n,t,e,i,r){return new zen(n,t,e,BB(i,184).a,BB(r,184).a)},MWn.Uk=function(n,t,e,i,r,c){return new $0(n,t,e,BB(i,184).a,BB(r,184).a,c)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1339),wAn(1317,563,{},wQ),MWn.Sk=function(n){if(!this.a.wj(n))throw Hp(new Ky(U9n+tsn(n)+X9n+this.a+"'"))},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1317),wAn(1318,563,{},ZG),MWn.Sk=function(n){},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1318),wAn(770,563,{}),MWn.Sj=function(n,t,e){return null!=t.Ch(e)},MWn.Tj=function(n,t,e,i){var r,c;n.Lg()&&n.Mg()?(r=!0,null==(c=t.Ch(e))?(r=!1,c=this.b):GI(c)===GI(R$t)&&(c=null),null==i?null!=this.c?(t.Dh(e,null),i=this.b):t.Dh(e,R$t):(this.Sk(i),t.Dh(e,i)),ban(n,this.d.Uk(n,1,this.e,c,i,!r))):null==i?null!=this.c?t.Dh(e,null):t.Dh(e,R$t):(this.Sk(i),t.Dh(e,i))},MWn.Vj=function(n,t,e){var i,r;n.Lg()&&n.Mg()?(i=!0,null==(r=t.Ch(e))?(i=!1,r=this.b):GI(r)===GI(R$t)&&(r=null),t.Eh(e),ban(n,this.d.Uk(n,2,this.e,r,this.b,i))):t.Eh(e)},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",770),wAn(1319,770,{},dQ),MWn.Sk=function(n){if(!this.a.wj(n))throw Hp(new Ky(U9n+tsn(n)+X9n+this.a+"'"))},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1319),wAn(1320,770,{},nz),MWn.Sk=function(n){},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1320),wAn(398,504,{},cG),MWn.Pj=function(n,t,e,i,r){var c,a,u,o,s;if(s=t.Ch(e),this.Kj()&&GI(s)===GI(R$t))return null;if(this.sk()&&i&&null!=s){if((u=BB(s,49)).kh()&&u!=(o=tfn(n,u))){if(!SFn(this.a,o))throw Hp(new Ky(U9n+tsn(o)+X9n+this.a+"'"));t.Dh(e,s=o),this.rk()&&(c=BB(o,49),a=u.ih(n,this.b?Awn(u.Tg(),this.b):-1-Awn(n.Tg(),this.e),null,null),!c.eh()&&(a=c.gh(n,this.b?Awn(c.Tg(),this.b):-1-Awn(n.Tg(),this.e),null,a)),a&&a.Fi()),n.Lg()&&n.Mg()&&ban(n,new tU(n,9,this.e,u,o))}return s}return s},MWn.Qj=function(n,t,e,i,r){var c,a;return GI(a=t.Ch(e))===GI(R$t)&&(a=null),t.Dh(e,i),this.bj()?GI(a)!==GI(i)&&null!=a&&(r=(c=BB(a,49)).ih(n,Awn(c.Tg(),this.b),null,r)):this.rk()&&null!=a&&(r=BB(a,49).ih(n,-1-Awn(n.Tg(),this.e),null,r)),n.Lg()&&n.Mg()&&(!r&&(r=new Fj(4)),r.Ei(new tU(n,1,this.e,a,i))),r},MWn.Rj=function(n,t,e,i,r){var c;return GI(c=t.Ch(e))===GI(R$t)&&(c=null),t.Eh(e),n.Lg()&&n.Mg()&&(!r&&(r=new Fj(4)),this.Kj()?r.Ei(new tU(n,2,this.e,c,null)):r.Ei(new tU(n,1,this.e,c,null))),r},MWn.Sj=function(n,t,e){return null!=t.Ch(e)},MWn.Tj=function(n,t,e,i){var r,c,a,u,o;if(null!=i&&!SFn(this.a,i))throw Hp(new Ky(U9n+(cL(i,56)?dEn(BB(i,56).Tg()):utn(tsn(i)))+X9n+this.a+"'"));u=null!=(o=t.Ch(e)),this.Kj()&&GI(o)===GI(R$t)&&(o=null),a=null,this.bj()?GI(o)!==GI(i)&&(null!=o&&(a=(r=BB(o,49)).ih(n,Awn(r.Tg(),this.b),null,a)),null!=i&&(a=(r=BB(i,49)).gh(n,Awn(r.Tg(),this.b),null,a))):this.rk()&&GI(o)!==GI(i)&&(null!=o&&(a=BB(o,49).ih(n,-1-Awn(n.Tg(),this.e),null,a)),null!=i&&(a=BB(i,49).gh(n,-1-Awn(n.Tg(),this.e),null,a))),null==i&&this.Kj()?t.Dh(e,R$t):t.Dh(e,i),n.Lg()&&n.Mg()?(c=new GQ(n,1,this.e,o,i,this.Kj()&&!u),a?(a.Ei(c),a.Fi()):ban(n,c)):a&&a.Fi()},MWn.Vj=function(n,t,e){var i,r,c,a,u;a=null!=(u=t.Ch(e)),this.Kj()&&GI(u)===GI(R$t)&&(u=null),c=null,null!=u&&(this.bj()?c=(i=BB(u,49)).ih(n,Awn(i.Tg(),this.b),null,c):this.rk()&&(c=BB(u,49).ih(n,-1-Awn(n.Tg(),this.e),null,c))),t.Eh(e),n.Lg()&&n.Mg()?(r=new GQ(n,this.Kj()?2:1,this.e,u,null,a),c?(c.Ei(r),c.Fi()):ban(n,r)):c&&c.Fi()},MWn.bj=function(){return!1},MWn.rk=function(){return!1},MWn.sk=function(){return!1},MWn.Kj=function(){return!1},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",398),wAn(564,398,{},Zx),MWn.rk=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",564),wAn(1323,564,{},nD),MWn.sk=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1323),wAn(772,564,{},tD),MWn.Kj=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",772),wAn(1325,772,{},eD),MWn.sk=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1325),wAn(640,564,{},IB),MWn.bj=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",640),wAn(1324,640,{},$B),MWn.sk=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1324),wAn(773,640,{},LB),MWn.Kj=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",773),wAn(1326,773,{},NB),MWn.sk=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1326),wAn(641,398,{},iD),MWn.sk=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",641),wAn(1327,641,{},rD),MWn.Kj=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1327),wAn(774,641,{},OB),MWn.bj=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",774),wAn(1328,774,{},xB),MWn.Kj=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1328),wAn(1321,398,{},cD),MWn.Kj=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1321),wAn(771,398,{},AB),MWn.bj=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",771),wAn(1322,771,{},DB),MWn.Kj=function(){return!0},vX(l6n,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1322),wAn(775,565,z9n,aW),MWn.Pk=function(n){return new aW(this.a,this.c,n)},MWn.dd=function(){return this.b},MWn.Qk=function(n,t,e){return D8(this,n,this.b,e)},MWn.Rk=function(n,t,e){return R8(this,n,this.b,e)},vX(l6n,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",775),wAn(1329,1,k9n,Ep),MWn.Wj=function(n){return this.a},MWn.fj=function(){return cL(this.a,95)?BB(this.a,95).fj():!this.a.dc()},MWn.Wb=function(n){this.a.$b(),this.a.Gc(BB(n,15))},MWn.Xj=function(){cL(this.a,95)?BB(this.a,95).Xj():this.a.$b()},vX(l6n,"EStructuralFeatureImpl/SettingMany",1329),wAn(1330,565,z9n,g4),MWn.Ok=function(n){return new cR((Uqn(),FLt),this.b.Ih(this.a,n))},MWn.dd=function(){return null},MWn.Qk=function(n,t,e){return e},MWn.Rk=function(n,t,e){return e},vX(l6n,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1330),wAn(642,565,z9n,cR),MWn.Ok=function(n){return new cR(this.c,n)},MWn.dd=function(){return this.a},MWn.Qk=function(n,t,e){return e},MWn.Rk=function(n,t,e){return e},vX(l6n,"EStructuralFeatureImpl/SimpleFeatureMapEntry",642),wAn(391,497,h8n,Bo),MWn.ri=function(n){return x8(qAt,HWn,26,n,0,1)},MWn.ni=function(){return!1},vX(l6n,"ESuperAdapter/1",391),wAn(444,438,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,836:1,49:1,97:1,150:1,444:1,114:1,115:1},Ho),MWn._g=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new aG(this,VAt,this)),this.a}return U9(this,n-bX((gWn(),T$t)),itn(BB(yan(this,16),26)||T$t,n),t,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),_pn(this.Ab,n,e);case 2:return!this.a&&(this.a=new aG(this,VAt,this)),_pn(this.a,n,e)}return BB(itn(BB(yan(this,16),26)||(gWn(),T$t),t),66).Nj().Rj(this,fgn(this),t-bX((gWn(),T$t)),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!!this.a&&0!=this.a.i}return O3(this,n-bX((gWn(),T$t)),itn(BB(yan(this,16),26)||T$t,n))},MWn.sh=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),sqn(this.Ab),!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void pX(this.Ab,BB(t,14));case 1:return void Nrn(this,SD(t));case 2:return!this.a&&(this.a=new aG(this,VAt,this)),sqn(this.a),!this.a&&(this.a=new aG(this,VAt,this)),void pX(this.a,BB(t,14))}Lbn(this,n-bX((gWn(),T$t)),itn(BB(yan(this,16),26)||T$t,n),t)},MWn.zh=function(){return gWn(),T$t},MWn.Bh=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new eU(KAt,this,0,3)),void sqn(this.Ab);case 1:return void Nrn(this,null);case 2:return!this.a&&(this.a=new aG(this,VAt,this)),void sqn(this.a)}qfn(this,n-bX((gWn(),T$t)),itn(BB(yan(this,16),26)||T$t,n))},vX(l6n,"ETypeParameterImpl",444),wAn(445,85,R9n,aG),MWn.cj=function(n,t){return LTn(this,BB(n,87),t)},MWn.dj=function(n,t){return NTn(this,BB(n,87),t)},vX(l6n,"ETypeParameterImpl/1",445),wAn(634,43,tJn,xm),MWn.ec=function(){return new Tp(this)},vX(l6n,"ETypeParameterImpl/2",634),wAn(556,nVn,tVn,Tp),MWn.Fc=function(n){return JR(this,BB(n,87))},MWn.Gc=function(n){var t,e,i;for(i=!1,e=n.Kc();e.Ob();)t=BB(e.Pb(),87),null==VW(this.a,t,"")&&(i=!0);return i},MWn.$b=function(){$U(this.a)},MWn.Hc=function(n){return hU(this.a,n)},MWn.Kc=function(){return new Mp(new usn(new Pb(this.a).a))},MWn.Mc=function(n){return _6(this,n)},MWn.gc=function(){return NT(this.a)},vX(l6n,"ETypeParameterImpl/2/1",556),wAn(557,1,QWn,Mp),MWn.Nb=function(n){fU(this,n)},MWn.Pb=function(){return BB(ten(this.a).cd(),87)},MWn.Ob=function(){return this.a.b},MWn.Qb=function(){o9(this.a)},vX(l6n,"ETypeParameterImpl/2/1/1",557),wAn(1276,43,tJn,Dm),MWn._b=function(n){return XI(n)?eJ(this,n):!!AJ(this.f,n)},MWn.xc=function(n){var t;return cL(t=XI(n)?SY(this,n):qI(AJ(this.f,n)),837)?(t=BB(t,837)._j(),VW(this,BB(n,235),t),t):null!=t?t:null==n?(YM(),rLt):null},vX(l6n,"EValidatorRegistryImpl",1276),wAn(1313,704,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,1941:1,49:1,97:1,150:1,114:1,115:1},qo),MWn.Ih=function(n,t){switch(n.yj()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return null==t?null:Bbn(t);case 25:return Xtn(t);case 27:return X9(t);case 28:return W9(t);case 29:return null==t?null:H$(IOt[0],BB(t,199));case 41:return null==t?"":nE(BB(t,290));case 42:return Bbn(t);case 50:return SD(t);default:throw Hp(new _y(d6n+n.ne()+g6n))}},MWn.Jh=function(n){var t;switch(-1==n.G&&(n.G=(t=Utn(n))?uvn(t.Mh(),n):-1),n.G){case 0:return new Om;case 1:return new jo;case 2:return new _f;case 4:return new Ev;case 5:return new Am;case 6:return new jv;case 7:return new Rf;case 10:return new yo;case 11:return new $m;case 12:return new vJ;case 13:return new Lm;case 14:return new pD;case 17:return new Ao;case 18:return new Kp;case 19:return new Ho;default:throw Hp(new _y(m6n+n.zb+g6n))}},MWn.Kh=function(n,t){switch(n.yj()){case 20:return null==t?null:new wE(t);case 21:return null==t?null:new $A(t);case 23:case 22:return null==t?null:Zdn(t);case 26:case 24:return null==t?null:Pnn(l_n(t,-128,127)<<24>>24);case 25:return d$n(t);case 27:return Syn(t);case 28:return Pyn(t);case 29:return gMn(t);case 32:case 31:return null==t?null:bSn(t);case 38:case 37:return null==t?null:new Dv(t);case 40:case 39:return null==t?null:iln(l_n(t,_Vn,DWn));case 41:case 42:return null;case 44:case 43:return null==t?null:jgn(rUn(t));case 49:case 48:return null==t?null:rln(l_n(t,Q9n,32767)<<16>>16);case 50:return t;default:throw Hp(new _y(d6n+n.ne()+g6n))}},vX(l6n,"EcoreFactoryImpl",1313),wAn(547,179,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,1939:1,49:1,97:1,150:1,179:1,547:1,114:1,115:1,675:1},UW),MWn.gb=!1,MWn.hb=!1;var V$t,Q$t=!1;vX(l6n,"EcorePackageImpl",547),wAn(1184,1,{837:1},Go),MWn._j=function(){return sN(),cLt},vX(l6n,"EcorePackageImpl/1",1184),wAn(1193,1,s7n,zo),MWn.wj=function(n){return cL(n,147)},MWn.xj=function(n){return x8(BOt,HWn,147,n,0,1)},vX(l6n,"EcorePackageImpl/10",1193),wAn(1194,1,s7n,Uo),MWn.wj=function(n){return cL(n,191)},MWn.xj=function(n){return x8(qOt,HWn,191,n,0,1)},vX(l6n,"EcorePackageImpl/11",1194),wAn(1195,1,s7n,Xo),MWn.wj=function(n){return cL(n,56)},MWn.xj=function(n){return x8(LOt,HWn,56,n,0,1)},vX(l6n,"EcorePackageImpl/12",1195),wAn(1196,1,s7n,Wo),MWn.wj=function(n){return cL(n,399)},MWn.xj=function(n){return x8(QAt,x9n,59,n,0,1)},vX(l6n,"EcorePackageImpl/13",1196),wAn(1197,1,s7n,Vo),MWn.wj=function(n){return cL(n,235)},MWn.xj=function(n){return x8(GOt,HWn,235,n,0,1)},vX(l6n,"EcorePackageImpl/14",1197),wAn(1198,1,s7n,Qo),MWn.wj=function(n){return cL(n,509)},MWn.xj=function(n){return x8(JAt,HWn,2017,n,0,1)},vX(l6n,"EcorePackageImpl/15",1198),wAn(1199,1,s7n,Jo),MWn.wj=function(n){return cL(n,99)},MWn.xj=function(n){return x8(YAt,N9n,18,n,0,1)},vX(l6n,"EcorePackageImpl/16",1199),wAn(1200,1,s7n,Yo),MWn.wj=function(n){return cL(n,170)},MWn.xj=function(n){return x8(FAt,N9n,170,n,0,1)},vX(l6n,"EcorePackageImpl/17",1200),wAn(1201,1,s7n,Zo),MWn.wj=function(n){return cL(n,472)},MWn.xj=function(n){return x8(_At,HWn,472,n,0,1)},vX(l6n,"EcorePackageImpl/18",1201),wAn(1202,1,s7n,ns),MWn.wj=function(n){return cL(n,548)},MWn.xj=function(n){return x8(X$t,a9n,548,n,0,1)},vX(l6n,"EcorePackageImpl/19",1202),wAn(1185,1,s7n,ts),MWn.wj=function(n){return cL(n,322)},MWn.xj=function(n){return x8(BAt,N9n,34,n,0,1)},vX(l6n,"EcorePackageImpl/2",1185),wAn(1203,1,s7n,es),MWn.wj=function(n){return cL(n,241)},MWn.xj=function(n){return x8(VAt,B9n,87,n,0,1)},vX(l6n,"EcorePackageImpl/20",1203),wAn(1204,1,s7n,is),MWn.wj=function(n){return cL(n,444)},MWn.xj=function(n){return x8(O$t,HWn,836,n,0,1)},vX(l6n,"EcorePackageImpl/21",1204),wAn(1205,1,s7n,rs),MWn.wj=function(n){return zI(n)},MWn.xj=function(n){return x8(ktt,sVn,476,n,8,1)},vX(l6n,"EcorePackageImpl/22",1205),wAn(1206,1,s7n,cs),MWn.wj=function(n){return cL(n,190)},MWn.xj=function(n){return x8(NNt,sVn,190,n,0,2)},vX(l6n,"EcorePackageImpl/23",1206),wAn(1207,1,s7n,as),MWn.wj=function(n){return cL(n,217)},MWn.xj=function(n){return x8(Ttt,sVn,217,n,0,1)},vX(l6n,"EcorePackageImpl/24",1207),wAn(1208,1,s7n,us),MWn.wj=function(n){return cL(n,172)},MWn.xj=function(n){return x8(Stt,sVn,172,n,0,1)},vX(l6n,"EcorePackageImpl/25",1208),wAn(1209,1,s7n,os),MWn.wj=function(n){return cL(n,199)},MWn.xj=function(n){return x8(mtt,sVn,199,n,0,1)},vX(l6n,"EcorePackageImpl/26",1209),wAn(1210,1,s7n,ss),MWn.wj=function(n){return!1},MWn.xj=function(n){return x8(_Nt,HWn,2110,n,0,1)},vX(l6n,"EcorePackageImpl/27",1210),wAn(1211,1,s7n,hs),MWn.wj=function(n){return UI(n)},MWn.xj=function(n){return x8(Ptt,sVn,333,n,7,1)},vX(l6n,"EcorePackageImpl/28",1211),wAn(1212,1,s7n,fs),MWn.wj=function(n){return cL(n,58)},MWn.xj=function(n){return x8(uAt,nZn,58,n,0,1)},vX(l6n,"EcorePackageImpl/29",1212),wAn(1186,1,s7n,ls),MWn.wj=function(n){return cL(n,510)},MWn.xj=function(n){return x8(KAt,{3:1,4:1,5:1,1934:1},590,n,0,1)},vX(l6n,"EcorePackageImpl/3",1186),wAn(1213,1,s7n,bs),MWn.wj=function(n){return cL(n,573)},MWn.xj=function(n){return x8(yAt,HWn,1940,n,0,1)},vX(l6n,"EcorePackageImpl/30",1213),wAn(1214,1,s7n,ws),MWn.wj=function(n){return cL(n,153)},MWn.xj=function(n){return x8(oLt,nZn,153,n,0,1)},vX(l6n,"EcorePackageImpl/31",1214),wAn(1215,1,s7n,ds),MWn.wj=function(n){return cL(n,72)},MWn.xj=function(n){return x8($$t,h7n,72,n,0,1)},vX(l6n,"EcorePackageImpl/32",1215),wAn(1216,1,s7n,gs),MWn.wj=function(n){return cL(n,155)},MWn.xj=function(n){return x8(Ctt,sVn,155,n,0,1)},vX(l6n,"EcorePackageImpl/33",1216),wAn(1217,1,s7n,ps),MWn.wj=function(n){return cL(n,19)},MWn.xj=function(n){return x8(Att,sVn,19,n,0,1)},vX(l6n,"EcorePackageImpl/34",1217),wAn(1218,1,s7n,vs),MWn.wj=function(n){return cL(n,290)},MWn.xj=function(n){return x8($nt,HWn,290,n,0,1)},vX(l6n,"EcorePackageImpl/35",1218),wAn(1219,1,s7n,ms),MWn.wj=function(n){return cL(n,162)},MWn.xj=function(n){return x8(Rtt,sVn,162,n,0,1)},vX(l6n,"EcorePackageImpl/36",1219),wAn(1220,1,s7n,ys),MWn.wj=function(n){return cL(n,83)},MWn.xj=function(n){return x8(Nnt,HWn,83,n,0,1)},vX(l6n,"EcorePackageImpl/37",1220),wAn(1221,1,s7n,ks),MWn.wj=function(n){return cL(n,591)},MWn.xj=function(n){return x8(iLt,HWn,591,n,0,1)},vX(l6n,"EcorePackageImpl/38",1221),wAn(1222,1,s7n,js),MWn.wj=function(n){return!1},MWn.xj=function(n){return x8(FNt,HWn,2111,n,0,1)},vX(l6n,"EcorePackageImpl/39",1222),wAn(1187,1,s7n,Es),MWn.wj=function(n){return cL(n,88)},MWn.xj=function(n){return x8(qAt,HWn,26,n,0,1)},vX(l6n,"EcorePackageImpl/4",1187),wAn(1223,1,s7n,Ts),MWn.wj=function(n){return cL(n,184)},MWn.xj=function(n){return x8(_tt,sVn,184,n,0,1)},vX(l6n,"EcorePackageImpl/40",1223),wAn(1224,1,s7n,Ms),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(l6n,"EcorePackageImpl/41",1224),wAn(1225,1,s7n,Ss),MWn.wj=function(n){return cL(n,588)},MWn.xj=function(n){return x8(sAt,HWn,588,n,0,1)},vX(l6n,"EcorePackageImpl/42",1225),wAn(1226,1,s7n,Ps),MWn.wj=function(n){return!1},MWn.xj=function(n){return x8(BNt,sVn,2112,n,0,1)},vX(l6n,"EcorePackageImpl/43",1226),wAn(1227,1,s7n,Cs),MWn.wj=function(n){return cL(n,42)},MWn.xj=function(n){return x8(Hnt,kVn,42,n,0,1)},vX(l6n,"EcorePackageImpl/44",1227),wAn(1188,1,s7n,Is),MWn.wj=function(n){return cL(n,138)},MWn.xj=function(n){return x8(HAt,HWn,138,n,0,1)},vX(l6n,"EcorePackageImpl/5",1188),wAn(1189,1,s7n,Os),MWn.wj=function(n){return cL(n,148)},MWn.xj=function(n){return x8(GAt,HWn,148,n,0,1)},vX(l6n,"EcorePackageImpl/6",1189),wAn(1190,1,s7n,As),MWn.wj=function(n){return cL(n,457)},MWn.xj=function(n){return x8(XAt,HWn,671,n,0,1)},vX(l6n,"EcorePackageImpl/7",1190),wAn(1191,1,s7n,$s),MWn.wj=function(n){return cL(n,573)},MWn.xj=function(n){return x8(WAt,HWn,678,n,0,1)},vX(l6n,"EcorePackageImpl/8",1191),wAn(1192,1,s7n,Ls),MWn.wj=function(n){return cL(n,471)},MWn.xj=function(n){return x8(HOt,HWn,471,n,0,1)},vX(l6n,"EcorePackageImpl/9",1192),wAn(1025,1982,r9n,xy),MWn.bi=function(n,t){Afn(this,BB(t,415))},MWn.fi=function(n,t){eCn(this,n,BB(t,415))},vX(l6n,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",1025),wAn(1026,143,t9n,uW),MWn.Ai=function(){return this.a.a},vX(l6n,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",1026),wAn(1053,1052,{},o$),vX("org.eclipse.emf.ecore.plugin","EcorePlugin",1053);var J$t,Y$t,Z$t,nLt,tLt,eLt,iLt=bq(f7n,"Resource");wAn(781,1378,l7n),MWn.Yk=function(n){},MWn.Zk=function(n){},MWn.Vk=function(){return!this.a&&(this.a=new Sp(this)),this.a},MWn.Wk=function(n){var t,e,i,r,c;if((i=n.length)>0){if(b1(0,n.length),47==n.charCodeAt(0)){for(c=new Y6(4),r=1,t=1;t0&&(n=n.substr(0,e))}return jIn(this,n)},MWn.Xk=function(){return this.c},MWn.Ib=function(){return nE(this.gm)+"@"+(nsn(this)>>>0).toString(16)+" uri='"+this.d+"'"},MWn.b=!1,vX(b7n,"ResourceImpl",781),wAn(1379,781,l7n,Cp),vX(b7n,"BinaryResourceImpl",1379),wAn(1169,694,f8n),MWn.si=function(n){return cL(n,56)?TJ(this,BB(n,56)):cL(n,591)?new AL(BB(n,591).Vk()):GI(n)===GI(this.f)?BB(n,14).Kc():(dD(),pAt.a)},MWn.Ob=function(){return bOn(this)},MWn.a=!1,vX(y9n,"EcoreUtil/ContentTreeIterator",1169),wAn(1380,1169,f8n,rU),MWn.si=function(n){return GI(n)===GI(this.f)?BB(n,15).Kc():new F2(BB(n,56))},vX(b7n,"ResourceImpl/5",1380),wAn(648,1994,D9n,Sp),MWn.Hc=function(n){return this.i<=4?Sjn(this,n):cL(n,49)&&BB(n,49).Zg()==this.a},MWn.bi=function(n,t){n==this.i-1&&(this.a.b||(this.a.b=!0))},MWn.di=function(n,t){0==n?this.a.b||(this.a.b=!0):L8(this,n,t)},MWn.fi=function(n,t){},MWn.gi=function(n,t,e){},MWn.aj=function(){return 2},MWn.Ai=function(){return this.a},MWn.bj=function(){return!0},MWn.cj=function(n,t){return t=BB(n,49).wh(this.a,t)},MWn.dj=function(n,t){return BB(n,49).wh(null,t)},MWn.ej=function(){return!1},MWn.hi=function(){return!0},MWn.ri=function(n){return x8(LOt,HWn,56,n,0,1)},MWn.ni=function(){return!1},vX(b7n,"ResourceImpl/ContentsEList",648),wAn(957,1964,LVn,Pp),MWn.Zc=function(n){return this.a._h(n)},MWn.gc=function(){return this.a.gc()},vX(y9n,"AbstractSequentialInternalEList/1",957),wAn(624,1,{},SH),vX(y9n,"BasicExtendedMetaData",624),wAn(1160,1,{},$I),MWn.$k=function(){return null},MWn._k=function(){return-2==this.a&&ob(this,aMn(this.d,this.b)),this.a},MWn.al=function(){return null},MWn.bl=function(){return SQ(),SQ(),set},MWn.ne=function(){return this.c==C7n&&hb(this,Egn(this.d,this.b)),this.c},MWn.cl=function(){return 0},MWn.a=-2,MWn.c=C7n,vX(y9n,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1160),wAn(1161,1,{},_0),MWn.$k=function(){return this.a==(R5(),tLt)&&sb(this,vNn(this.f,this.b)),this.a},MWn._k=function(){return 0},MWn.al=function(){return this.c==(R5(),tLt)&&fb(this,mNn(this.f,this.b)),this.c},MWn.bl=function(){return!this.d&&lb(this,SKn(this.f,this.b)),this.d},MWn.ne=function(){return this.e==C7n&&bb(this,Egn(this.f,this.b)),this.e},MWn.cl=function(){return-2==this.g&&wb(this,JEn(this.f,this.b)),this.g},MWn.e=C7n,MWn.g=-2,vX(y9n,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",1161),wAn(1159,1,{},RI),MWn.b=!1,MWn.c=!1,vX(y9n,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1159),wAn(1162,1,{},K0),MWn.c=-2,MWn.e=C7n,MWn.f=C7n,vX(y9n,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1162),wAn(585,622,R9n,MH),MWn.aj=function(){return this.c},MWn.Fk=function(){return!1},MWn.li=function(n,t){return t},MWn.c=0,vX(y9n,"EDataTypeEList",585);var rLt,cLt,aLt,uLt,oLt=bq(y9n,"FeatureMap");wAn(75,585,{3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,76:1,153:1,215:1,1937:1,69:1,95:1},Ecn),MWn.Vc=function(n,t){lNn(this,n,BB(t,72))},MWn.Fc=function(n){return uLn(this,BB(n,72))},MWn.Yh=function(n){dX(this,BB(n,72))},MWn.cj=function(n,t){return HK(this,BB(n,72),t)},MWn.dj=function(n,t){return qK(this,BB(n,72),t)},MWn.ii=function(n,t){return a_n(this,n,t)},MWn.li=function(n,t){return hGn(this,n,BB(t,72))},MWn._c=function(n,t){return Pxn(this,n,BB(t,72))},MWn.jj=function(n,t){return GK(this,BB(n,72),t)},MWn.kj=function(n,t){return zK(this,BB(n,72),t)},MWn.lj=function(n,t,e){return gEn(this,BB(n,72),BB(t,72),e)},MWn.oi=function(n,t){return sTn(this,n,BB(t,72))},MWn.dl=function(n,t){return xKn(this,n,t)},MWn.Wc=function(n,t){var e,i,r,c,a,u,o,s,h;for(s=new gtn(t.gc()),r=t.Kc();r.Ob();)if(c=(i=BB(r.Pb(),72)).ak(),$xn(this.e,c))(!c.hi()||!G3(this,c,i.dd())&&!Sjn(s,i))&&f9(s,i);else{for(h=axn(this.e.Tg(),c),e=BB(this.g,119),a=!0,u=0;u=0;)if(t=n[this.c],this.k.rl(t.ak()))return this.j=this.f?t:t.dd(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},vX(y9n,"BasicFeatureMap/FeatureEIterator",410),wAn(662,410,cVn,xO),MWn.Lk=function(){return!0},vX(y9n,"BasicFeatureMap/ResolvingFeatureEIterator",662),wAn(955,486,q9n,z$),MWn.Gi=function(){return this},vX(y9n,"EContentsEList/1",955),wAn(956,486,q9n,DO),MWn.Lk=function(){return!1},vX(y9n,"EContentsEList/2",956),wAn(954,279,G9n,U$),MWn.Nk=function(n){},MWn.Ob=function(){return!1},MWn.Sb=function(){return!1},vX(y9n,"EContentsEList/FeatureIteratorImpl/1",954),wAn(825,585,R9n,KL),MWn.ci=function(){this.a=!0},MWn.fj=function(){return this.a},MWn.Xj=function(){var n;sqn(this),mA(this.e)?(n=this.a,this.a=!1,ban(this.e,new t6(this.e,2,this.c,n,!1))):this.a=!1},MWn.a=!1,vX(y9n,"EDataTypeEList/Unsettable",825),wAn(1849,585,R9n,_L),MWn.hi=function(){return!0},vX(y9n,"EDataTypeUniqueEList",1849),wAn(1850,825,R9n,FL),MWn.hi=function(){return!0},vX(y9n,"EDataTypeUniqueEList/Unsettable",1850),wAn(139,85,R9n,NL),MWn.Ek=function(){return!0},MWn.li=function(n,t){return GOn(this,n,BB(t,56))},vX(y9n,"EObjectContainmentEList/Resolving",139),wAn(1163,545,R9n,xL),MWn.Ek=function(){return!0},MWn.li=function(n,t){return GOn(this,n,BB(t,56))},vX(y9n,"EObjectContainmentEList/Unsettable/Resolving",1163),wAn(748,16,R9n,iK),MWn.ci=function(){this.a=!0},MWn.fj=function(){return this.a},MWn.Xj=function(){var n;sqn(this),mA(this.e)?(n=this.a,this.a=!1,ban(this.e,new t6(this.e,2,this.c,n,!1))):this.a=!1},MWn.a=!1,vX(y9n,"EObjectContainmentWithInverseEList/Unsettable",748),wAn(1173,748,R9n,rK),MWn.Ek=function(){return!0},MWn.li=function(n,t){return GOn(this,n,BB(t,56))},vX(y9n,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1173),wAn(743,496,R9n,DL),MWn.ci=function(){this.a=!0},MWn.fj=function(){return this.a},MWn.Xj=function(){var n;sqn(this),mA(this.e)?(n=this.a,this.a=!1,ban(this.e,new t6(this.e,2,this.c,n,!1))):this.a=!1},MWn.a=!1,vX(y9n,"EObjectEList/Unsettable",743),wAn(328,496,R9n,RL),MWn.Ek=function(){return!0},MWn.li=function(n,t){return GOn(this,n,BB(t,56))},vX(y9n,"EObjectResolvingEList",328),wAn(1641,743,R9n,BL),MWn.Ek=function(){return!0},MWn.li=function(n,t){return GOn(this,n,BB(t,56))},vX(y9n,"EObjectResolvingEList/Unsettable",1641),wAn(1381,1,{},Ns),vX(y9n,"EObjectValidator",1381),wAn(546,496,R9n,iU),MWn.zk=function(){return this.d},MWn.Ak=function(){return this.b},MWn.bj=function(){return!0},MWn.Dk=function(){return!0},MWn.b=0,vX(y9n,"EObjectWithInverseEList",546),wAn(1176,546,R9n,cK),MWn.Ck=function(){return!0},vX(y9n,"EObjectWithInverseEList/ManyInverse",1176),wAn(625,546,R9n,aK),MWn.ci=function(){this.a=!0},MWn.fj=function(){return this.a},MWn.Xj=function(){var n;sqn(this),mA(this.e)?(n=this.a,this.a=!1,ban(this.e,new t6(this.e,2,this.c,n,!1))):this.a=!1},MWn.a=!1,vX(y9n,"EObjectWithInverseEList/Unsettable",625),wAn(1175,625,R9n,oK),MWn.Ck=function(){return!0},vX(y9n,"EObjectWithInverseEList/Unsettable/ManyInverse",1175),wAn(749,546,R9n,uK),MWn.Ek=function(){return!0},MWn.li=function(n,t){return GOn(this,n,BB(t,56))},vX(y9n,"EObjectWithInverseResolvingEList",749),wAn(31,749,R9n,hK),MWn.Ck=function(){return!0},vX(y9n,"EObjectWithInverseResolvingEList/ManyInverse",31),wAn(750,625,R9n,sK),MWn.Ek=function(){return!0},MWn.li=function(n,t){return GOn(this,n,BB(t,56))},vX(y9n,"EObjectWithInverseResolvingEList/Unsettable",750),wAn(1174,750,R9n,fK),MWn.Ck=function(){return!0},vX(y9n,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1174),wAn(1164,622,R9n),MWn.ai=function(){return 0==(1792&this.b)},MWn.ci=function(){this.b|=1},MWn.Bk=function(){return 0!=(4&this.b)},MWn.bj=function(){return 0!=(40&this.b)},MWn.Ck=function(){return 0!=(16&this.b)},MWn.Dk=function(){return 0!=(8&this.b)},MWn.Ek=function(){return 0!=(this.b&M9n)},MWn.rk=function(){return 0!=(32&this.b)},MWn.Fk=function(){return 0!=(this.b&k6n)},MWn.wj=function(n){return this.d?x3(this.d,n):this.ak().Yj().wj(n)},MWn.fj=function(){return 0!=(2&this.b)?0!=(1&this.b):0!=this.i},MWn.hi=function(){return 0!=(128&this.b)},MWn.Xj=function(){var n;sqn(this),0!=(2&this.b)&&(mA(this.e)?(n=0!=(1&this.b),this.b&=-2,Lv(this,new t6(this.e,2,Awn(this.e.Tg(),this.ak()),n,!1))):this.b&=-2)},MWn.ni=function(){return 0==(1536&this.b)},MWn.b=0,vX(y9n,"EcoreEList/Generic",1164),wAn(1165,1164,R9n,zQ),MWn.ak=function(){return this.a},vX(y9n,"EcoreEList/Dynamic",1165),wAn(747,63,h8n,Ip),MWn.ri=function(n){return Den(this.a.a,n)},vX(y9n,"EcoreEMap/1",747),wAn(746,85,R9n,Zz),MWn.bi=function(n,t){Ivn(this.b,BB(t,133))},MWn.di=function(n,t){aan(this.b)},MWn.ei=function(n,t,e){var i;++(i=this.b,BB(t,133),i).e},MWn.fi=function(n,t){Oln(this.b,BB(t,133))},MWn.gi=function(n,t,e){Oln(this.b,BB(e,133)),GI(e)===GI(t)&&BB(e,133).Th(c$(BB(t,133).cd())),Ivn(this.b,BB(t,133))},vX(y9n,"EcoreEMap/DelegateEObjectContainmentEList",746),wAn(1171,151,j9n,yin),vX(y9n,"EcoreEMap/Unsettable",1171),wAn(1172,746,R9n,lK),MWn.ci=function(){this.a=!0},MWn.fj=function(){return this.a},MWn.Xj=function(){var n;sqn(this),mA(this.e)?(n=this.a,this.a=!1,ban(this.e,new t6(this.e,2,this.c,n,!1))):this.a=!1},MWn.a=!1,vX(y9n,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1172),wAn(1168,228,tJn,lX),MWn.a=!1,MWn.b=!1,vX(y9n,"EcoreUtil/Copier",1168),wAn(745,1,QWn,F2),MWn.Nb=function(n){fU(this,n)},MWn.Ob=function(){return udn(this)},MWn.Pb=function(){var n;return udn(this),n=this.b,this.b=null,n},MWn.Qb=function(){this.a.Qb()},vX(y9n,"EcoreUtil/ProperContentIterator",745),wAn(1382,1381,{},Ff),vX(y9n,"EcoreValidator",1382),bq(y9n,"FeatureMapUtil/Validator"),wAn(1260,1,{1942:1},xs),MWn.rl=function(n){return!0},vX(y9n,"FeatureMapUtil/1",1260),wAn(757,1,{1942:1},cUn),MWn.rl=function(n){var t;return this.c==n||(null==(t=TD(RX(this.a,n)))?xRn(this,n)?(r6(this.a,n,(hN(),vtt)),!0):(r6(this.a,n,(hN(),ptt)),!1):t==(hN(),vtt))},MWn.e=!1,vX(y9n,"FeatureMapUtil/BasicValidator",757),wAn(758,43,tJn,X$),vX(y9n,"FeatureMapUtil/BasicValidator/Cache",758),wAn(501,52,{20:1,28:1,52:1,14:1,15:1,58:1,76:1,69:1,95:1},xI),MWn.Vc=function(n,t){Axn(this.c,this.b,n,t)},MWn.Fc=function(n){return xKn(this.c,this.b,n)},MWn.Wc=function(n,t){return jHn(this.c,this.b,n,t)},MWn.Gc=function(n){return Z$(this,n)},MWn.Xh=function(n,t){htn(this.c,this.b,n,t)},MWn.lk=function(n,t){return PRn(this.c,this.b,n,t)},MWn.pi=function(n){return iHn(this.c,this.b,n,!1)},MWn.Zh=function(){return jA(this.c,this.b)},MWn.$h=function(){return EA(this.c,this.b)},MWn._h=function(n){return $8(this.c,this.b,n)},MWn.mk=function(n,t){return tR(this,n,t)},MWn.$b=function(){Nv(this)},MWn.Hc=function(n){return G3(this.c,this.b,n)},MWn.Ic=function(n){return Mcn(this.c,this.b,n)},MWn.Xb=function(n){return iHn(this.c,this.b,n,!0)},MWn.Wj=function(n){return this},MWn.Xc=function(n){return z3(this.c,this.b,n)},MWn.dc=function(){return HI(this)},MWn.fj=function(){return!adn(this.c,this.b)},MWn.Kc=function(){return cnn(this.c,this.b)},MWn.Yc=function(){return ann(this.c,this.b)},MWn.Zc=function(n){return lln(this.c,this.b,n)},MWn.ii=function(n,t){return mFn(this.c,this.b,n,t)},MWn.ji=function(n,t){Q6(this.c,this.b,n,t)},MWn.$c=function(n){return aPn(this.c,this.b,n)},MWn.Mc=function(n){return CKn(this.c,this.b,n)},MWn._c=function(n,t){return XFn(this.c,this.b,n,t)},MWn.Wb=function(n){AOn(this.c,this.b),Z$(this,BB(n,15))},MWn.gc=function(){return Kln(this.c,this.b)},MWn.Pc=function(){return G1(this.c,this.b)},MWn.Qc=function(n){return U3(this.c,this.b,n)},MWn.Ib=function(){var n,t;for((t=new Sk).a+="[",n=jA(this.c,this.b);Ksn(n);)cO(t,kN(cvn(n))),Ksn(n)&&(t.a+=FWn);return t.a+="]",t.a},MWn.Xj=function(){AOn(this.c,this.b)},vX(y9n,"FeatureMapUtil/FeatureEList",501),wAn(627,36,t9n,b4),MWn.yi=function(n){return eln(this,n)},MWn.Di=function(n){var t,e,i,r;switch(this.d){case 1:case 2:if(GI(n.Ai())===GI(this.c)&&eln(this,null)==n.yi(null))return this.g=n.zi(),1==n.xi()&&(this.d=1),!0;break;case 3:if(3===n.xi()&&GI(n.Ai())===GI(this.c)&&eln(this,null)==n.yi(null))return this.d=5,f9(t=new gtn(2),this.g),f9(t,n.zi()),this.g=t,!0;break;case 5:if(3===n.xi()&&GI(n.Ai())===GI(this.c)&&eln(this,null)==n.yi(null))return BB(this.g,14).Fc(n.zi()),!0;break;case 4:switch(n.xi()){case 3:if(GI(n.Ai())===GI(this.c)&&eln(this,null)==n.yi(null))return this.d=1,this.g=n.zi(),!0;break;case 4:if(GI(n.Ai())===GI(this.c)&&eln(this,null)==n.yi(null))return this.d=6,f9(r=new gtn(2),this.n),f9(r,n.Bi()),this.n=r,i=Pun(Gk(ANt,1),hQn,25,15,[this.o,n.Ci()]),this.g=i,!0}break;case 6:if(4===n.xi()&&GI(n.Ai())===GI(this.c)&&eln(this,null)==n.yi(null))return BB(this.n,14).Fc(n.Bi()),aHn(i=BB(this.g,48),0,e=x8(ANt,hQn,25,i.length+1,15,1),0,i.length),e[i.length]=n.Ci(),this.g=e,!0}return!1},vX(y9n,"FeatureMapUtil/FeatureENotificationImpl",627),wAn(552,501,{20:1,28:1,52:1,14:1,15:1,58:1,76:1,153:1,215:1,1937:1,69:1,95:1},lq),MWn.dl=function(n,t){return xKn(this.c,n,t)},MWn.el=function(n,t,e){return PRn(this.c,n,t,e)},MWn.fl=function(n,t,e){return ZBn(this.c,n,t,e)},MWn.gl=function(){return this},MWn.hl=function(n,t){return rHn(this.c,n,t)},MWn.il=function(n){return BB(iHn(this.c,this.b,n,!1),72).ak()},MWn.jl=function(n){return BB(iHn(this.c,this.b,n,!1),72).dd()},MWn.kl=function(){return this.a},MWn.ll=function(n){return!adn(this.c,n)},MWn.ml=function(n,t){MHn(this.c,n,t)},MWn.nl=function(n){return zin(this.c,n)},MWn.ol=function(n){Kmn(this.c,n)},vX(y9n,"FeatureMapUtil/FeatureFeatureMap",552),wAn(1259,1,k9n,KI),MWn.Wj=function(n){return iHn(this.b,this.a,-1,n)},MWn.fj=function(){return!adn(this.b,this.a)},MWn.Wb=function(n){MHn(this.b,this.a,n)},MWn.Xj=function(){AOn(this.b,this.a)},vX(y9n,"FeatureMapUtil/FeatureValue",1259);var sLt,hLt,fLt,lLt,bLt,wLt=bq(O7n,"AnyType");wAn(666,60,BVn,ik),vX(O7n,"InvalidDatatypeValueException",666);var dLt,gLt,pLt,vLt,mLt,yLt,kLt,jLt,ELt,TLt,MLt,SLt,PLt,CLt,ILt,OLt,ALt,$Lt,LLt,NLt,xLt,DLt,RLt,KLt,_Lt,FLt,BLt,HLt,qLt,GLt,zLt=bq(O7n,A7n),ULt=bq(O7n,$7n),XLt=bq(O7n,L7n);wAn(830,506,{105:1,92:1,90:1,56:1,49:1,97:1,843:1},Rm),MWn._g=function(n,t,e){switch(n){case 0:return e?(!this.c&&(this.c=new Ecn(this,0)),this.c):(!this.c&&(this.c=new Ecn(this,0)),this.c.b);case 1:return e?(!this.c&&(this.c=new Ecn(this,0)),BB(n1(this.c,(Uqn(),vLt)),153)):(!this.c&&(this.c=new Ecn(this,0)),BB(BB(n1(this.c,(Uqn(),vLt)),153),215)).kl();case 2:return e?(!this.b&&(this.b=new Ecn(this,2)),this.b):(!this.b&&(this.b=new Ecn(this,2)),this.b.b)}return U9(this,n-bX(this.zh()),itn(0==(2&this.j)?this.zh():(!this.k&&(this.k=new Kf),this.k).ck(),n),t,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.c&&(this.c=new Ecn(this,0)),TKn(this.c,n,e);case 1:return(!this.c&&(this.c=new Ecn(this,0)),BB(BB(n1(this.c,(Uqn(),vLt)),153),69)).mk(n,e);case 2:return!this.b&&(this.b=new Ecn(this,2)),TKn(this.b,n,e)}return BB(itn(0==(2&this.j)?this.zh():(!this.k&&(this.k=new Kf),this.k).ck(),t),66).Nj().Rj(this,Q7(this),t-bX(this.zh()),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.c&&0!=this.c.i;case 1:return!(!this.c&&(this.c=new Ecn(this,0)),BB(n1(this.c,(Uqn(),vLt)),153)).dc();case 2:return!!this.b&&0!=this.b.i}return O3(this,n-bX(this.zh()),itn(0==(2&this.j)?this.zh():(!this.k&&(this.k=new Kf),this.k).ck(),n))},MWn.sh=function(n,t){switch(n){case 0:return!this.c&&(this.c=new Ecn(this,0)),void tX(this.c,t);case 1:return void(!this.c&&(this.c=new Ecn(this,0)),BB(BB(n1(this.c,(Uqn(),vLt)),153),215)).Wb(t);case 2:return!this.b&&(this.b=new Ecn(this,2)),void tX(this.b,t)}Lbn(this,n-bX(this.zh()),itn(0==(2&this.j)?this.zh():(!this.k&&(this.k=new Kf),this.k).ck(),n),t)},MWn.zh=function(){return Uqn(),pLt},MWn.Bh=function(n){switch(n){case 0:return!this.c&&(this.c=new Ecn(this,0)),void sqn(this.c);case 1:return void(!this.c&&(this.c=new Ecn(this,0)),BB(n1(this.c,(Uqn(),vLt)),153)).$b();case 2:return!this.b&&(this.b=new Ecn(this,2)),void sqn(this.b)}qfn(this,n-bX(this.zh()),itn(0==(2&this.j)?this.zh():(!this.k&&(this.k=new Kf),this.k).ck(),n))},MWn.Ib=function(){var n;return 0!=(4&this.j)?P$n(this):((n=new fN(P$n(this))).a+=" (mixed: ",rO(n,this.c),n.a+=", anyAttribute: ",rO(n,this.b),n.a+=")",n.a)},vX(N7n,"AnyTypeImpl",830),wAn(667,506,{105:1,92:1,90:1,56:1,49:1,97:1,2021:1,667:1},Rs),MWn._g=function(n,t,e){switch(n){case 0:return this.a;case 1:return this.b}return U9(this,n-bX((Uqn(),OLt)),itn(0==(2&this.j)?OLt:(!this.k&&(this.k=new Kf),this.k).ck(),n),t,e)},MWn.lh=function(n){switch(n){case 0:return null!=this.a;case 1:return null!=this.b}return O3(this,n-bX((Uqn(),OLt)),itn(0==(2&this.j)?OLt:(!this.k&&(this.k=new Kf),this.k).ck(),n))},MWn.sh=function(n,t){switch(n){case 0:return void kb(this,SD(t));case 1:return void jb(this,SD(t))}Lbn(this,n-bX((Uqn(),OLt)),itn(0==(2&this.j)?OLt:(!this.k&&(this.k=new Kf),this.k).ck(),n),t)},MWn.zh=function(){return Uqn(),OLt},MWn.Bh=function(n){switch(n){case 0:return void(this.a=null);case 1:return void(this.b=null)}qfn(this,n-bX((Uqn(),OLt)),itn(0==(2&this.j)?OLt:(!this.k&&(this.k=new Kf),this.k).ck(),n))},MWn.Ib=function(){var n;return 0!=(4&this.j)?P$n(this):((n=new fN(P$n(this))).a+=" (data: ",cO(n,this.a),n.a+=", target: ",cO(n,this.b),n.a+=")",n.a)},MWn.a=null,MWn.b=null,vX(N7n,"ProcessingInstructionImpl",667),wAn(668,830,{105:1,92:1,90:1,56:1,49:1,97:1,843:1,2022:1,668:1},_m),MWn._g=function(n,t,e){switch(n){case 0:return e?(!this.c&&(this.c=new Ecn(this,0)),this.c):(!this.c&&(this.c=new Ecn(this,0)),this.c.b);case 1:return e?(!this.c&&(this.c=new Ecn(this,0)),BB(n1(this.c,(Uqn(),vLt)),153)):(!this.c&&(this.c=new Ecn(this,0)),BB(BB(n1(this.c,(Uqn(),vLt)),153),215)).kl();case 2:return e?(!this.b&&(this.b=new Ecn(this,2)),this.b):(!this.b&&(this.b=new Ecn(this,2)),this.b.b);case 3:return!this.c&&(this.c=new Ecn(this,0)),SD(rHn(this.c,(Uqn(),LLt),!0));case 4:return gK(this.a,(!this.c&&(this.c=new Ecn(this,0)),SD(rHn(this.c,(Uqn(),LLt),!0))));case 5:return this.a}return U9(this,n-bX((Uqn(),$Lt)),itn(0==(2&this.j)?$Lt:(!this.k&&(this.k=new Kf),this.k).ck(),n),t,e)},MWn.lh=function(n){switch(n){case 0:return!!this.c&&0!=this.c.i;case 1:return!(!this.c&&(this.c=new Ecn(this,0)),BB(n1(this.c,(Uqn(),vLt)),153)).dc();case 2:return!!this.b&&0!=this.b.i;case 3:return!this.c&&(this.c=new Ecn(this,0)),null!=SD(rHn(this.c,(Uqn(),LLt),!0));case 4:return null!=gK(this.a,(!this.c&&(this.c=new Ecn(this,0)),SD(rHn(this.c,(Uqn(),LLt),!0))));case 5:return!!this.a}return O3(this,n-bX((Uqn(),$Lt)),itn(0==(2&this.j)?$Lt:(!this.k&&(this.k=new Kf),this.k).ck(),n))},MWn.sh=function(n,t){switch(n){case 0:return!this.c&&(this.c=new Ecn(this,0)),void tX(this.c,t);case 1:return void(!this.c&&(this.c=new Ecn(this,0)),BB(BB(n1(this.c,(Uqn(),vLt)),153),215)).Wb(t);case 2:return!this.b&&(this.b=new Ecn(this,2)),void tX(this.b,t);case 3:return void F0(this,SD(t));case 4:return void F0(this,pK(this.a,t));case 5:return void Eb(this,BB(t,148))}Lbn(this,n-bX((Uqn(),$Lt)),itn(0==(2&this.j)?$Lt:(!this.k&&(this.k=new Kf),this.k).ck(),n),t)},MWn.zh=function(){return Uqn(),$Lt},MWn.Bh=function(n){switch(n){case 0:return!this.c&&(this.c=new Ecn(this,0)),void sqn(this.c);case 1:return void(!this.c&&(this.c=new Ecn(this,0)),BB(n1(this.c,(Uqn(),vLt)),153)).$b();case 2:return!this.b&&(this.b=new Ecn(this,2)),void sqn(this.b);case 3:return!this.c&&(this.c=new Ecn(this,0)),void MHn(this.c,(Uqn(),LLt),null);case 4:return void F0(this,pK(this.a,null));case 5:return void(this.a=null)}qfn(this,n-bX((Uqn(),$Lt)),itn(0==(2&this.j)?$Lt:(!this.k&&(this.k=new Kf),this.k).ck(),n))},vX(N7n,"SimpleAnyTypeImpl",668),wAn(669,506,{105:1,92:1,90:1,56:1,49:1,97:1,2023:1,669:1},Km),MWn._g=function(n,t,e){switch(n){case 0:return e?(!this.a&&(this.a=new Ecn(this,0)),this.a):(!this.a&&(this.a=new Ecn(this,0)),this.a.b);case 1:return e?(!this.b&&(this.b=new y9((gWn(),k$t),X$t,this,1)),this.b):(!this.b&&(this.b=new y9((gWn(),k$t),X$t,this,1)),A8(this.b));case 2:return e?(!this.c&&(this.c=new y9((gWn(),k$t),X$t,this,2)),this.c):(!this.c&&(this.c=new y9((gWn(),k$t),X$t,this,2)),A8(this.c));case 3:return!this.a&&(this.a=new Ecn(this,0)),n1(this.a,(Uqn(),DLt));case 4:return!this.a&&(this.a=new Ecn(this,0)),n1(this.a,(Uqn(),RLt));case 5:return!this.a&&(this.a=new Ecn(this,0)),n1(this.a,(Uqn(),_Lt));case 6:return!this.a&&(this.a=new Ecn(this,0)),n1(this.a,(Uqn(),FLt))}return U9(this,n-bX((Uqn(),xLt)),itn(0==(2&this.j)?xLt:(!this.k&&(this.k=new Kf),this.k).ck(),n),t,e)},MWn.jh=function(n,t,e){switch(t){case 0:return!this.a&&(this.a=new Ecn(this,0)),TKn(this.a,n,e);case 1:return!this.b&&(this.b=new y9((gWn(),k$t),X$t,this,1)),BK(this.b,n,e);case 2:return!this.c&&(this.c=new y9((gWn(),k$t),X$t,this,2)),BK(this.c,n,e);case 5:return!this.a&&(this.a=new Ecn(this,0)),tR(n1(this.a,(Uqn(),_Lt)),n,e)}return BB(itn(0==(2&this.j)?(Uqn(),xLt):(!this.k&&(this.k=new Kf),this.k).ck(),t),66).Nj().Rj(this,Q7(this),t-bX((Uqn(),xLt)),n,e)},MWn.lh=function(n){switch(n){case 0:return!!this.a&&0!=this.a.i;case 1:return!!this.b&&0!=this.b.f;case 2:return!!this.c&&0!=this.c.f;case 3:return!this.a&&(this.a=new Ecn(this,0)),!HI(n1(this.a,(Uqn(),DLt)));case 4:return!this.a&&(this.a=new Ecn(this,0)),!HI(n1(this.a,(Uqn(),RLt)));case 5:return!this.a&&(this.a=new Ecn(this,0)),!HI(n1(this.a,(Uqn(),_Lt)));case 6:return!this.a&&(this.a=new Ecn(this,0)),!HI(n1(this.a,(Uqn(),FLt)))}return O3(this,n-bX((Uqn(),xLt)),itn(0==(2&this.j)?xLt:(!this.k&&(this.k=new Kf),this.k).ck(),n))},MWn.sh=function(n,t){switch(n){case 0:return!this.a&&(this.a=new Ecn(this,0)),void tX(this.a,t);case 1:return!this.b&&(this.b=new y9((gWn(),k$t),X$t,this,1)),void tan(this.b,t);case 2:return!this.c&&(this.c=new y9((gWn(),k$t),X$t,this,2)),void tan(this.c,t);case 3:return!this.a&&(this.a=new Ecn(this,0)),Nv(n1(this.a,(Uqn(),DLt))),!this.a&&(this.a=new Ecn(this,0)),void Z$(n1(this.a,DLt),BB(t,14));case 4:return!this.a&&(this.a=new Ecn(this,0)),Nv(n1(this.a,(Uqn(),RLt))),!this.a&&(this.a=new Ecn(this,0)),void Z$(n1(this.a,RLt),BB(t,14));case 5:return!this.a&&(this.a=new Ecn(this,0)),Nv(n1(this.a,(Uqn(),_Lt))),!this.a&&(this.a=new Ecn(this,0)),void Z$(n1(this.a,_Lt),BB(t,14));case 6:return!this.a&&(this.a=new Ecn(this,0)),Nv(n1(this.a,(Uqn(),FLt))),!this.a&&(this.a=new Ecn(this,0)),void Z$(n1(this.a,FLt),BB(t,14))}Lbn(this,n-bX((Uqn(),xLt)),itn(0==(2&this.j)?xLt:(!this.k&&(this.k=new Kf),this.k).ck(),n),t)},MWn.zh=function(){return Uqn(),xLt},MWn.Bh=function(n){switch(n){case 0:return!this.a&&(this.a=new Ecn(this,0)),void sqn(this.a);case 1:return!this.b&&(this.b=new y9((gWn(),k$t),X$t,this,1)),void this.b.c.$b();case 2:return!this.c&&(this.c=new y9((gWn(),k$t),X$t,this,2)),void this.c.c.$b();case 3:return!this.a&&(this.a=new Ecn(this,0)),void Nv(n1(this.a,(Uqn(),DLt)));case 4:return!this.a&&(this.a=new Ecn(this,0)),void Nv(n1(this.a,(Uqn(),RLt)));case 5:return!this.a&&(this.a=new Ecn(this,0)),void Nv(n1(this.a,(Uqn(),_Lt)));case 6:return!this.a&&(this.a=new Ecn(this,0)),void Nv(n1(this.a,(Uqn(),FLt)))}qfn(this,n-bX((Uqn(),xLt)),itn(0==(2&this.j)?xLt:(!this.k&&(this.k=new Kf),this.k).ck(),n))},MWn.Ib=function(){var n;return 0!=(4&this.j)?P$n(this):((n=new fN(P$n(this))).a+=" (mixed: ",rO(n,this.a),n.a+=")",n.a)},vX(N7n,"XMLTypeDocumentRootImpl",669),wAn(1919,704,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1,2024:1},Ds),MWn.Ih=function(n,t){switch(n.yj()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return null==t?null:Bbn(t);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return SD(t);case 6:return mD(BB(t,190));case 12:case 47:case 49:case 11:return qGn(this,n,t);case 13:return null==t?null:GBn(BB(t,240));case 15:case 14:return null==t?null:RU(Gy(MD(t)));case 17:return EEn((Uqn(),t));case 18:return EEn(t);case 21:case 20:return null==t?null:KU(BB(t,155).a);case 27:return yD(BB(t,190));case 30:return _mn((Uqn(),BB(t,15)));case 31:return _mn(BB(t,15));case 40:return jD((Uqn(),t));case 42:return TEn((Uqn(),t));case 43:return TEn(t);case 59:case 48:return kD((Uqn(),t));default:throw Hp(new _y(d6n+n.ne()+g6n))}},MWn.Jh=function(n){var t;switch(-1==n.G&&(n.G=(t=Utn(n))?uvn(t.Mh(),n):-1),n.G){case 0:return new Rm;case 1:return new Rs;case 2:return new _m;case 3:return new Km;default:throw Hp(new _y(m6n+n.zb+g6n))}},MWn.Kh=function(n,t){var e,i,r,c,a,u,o,s,h,f,l,b,w,d,g,p;switch(n.yj()){case 5:case 52:case 4:return t;case 6:return ypn(t);case 8:case 7:return null==t?null:_En(t);case 9:return null==t?null:Pnn(l_n((i=FBn(t,!0)).length>0&&(b1(0,i.length),43==i.charCodeAt(0))?i.substr(1):i,-128,127)<<24>>24);case 10:return null==t?null:Pnn(l_n((r=FBn(t,!0)).length>0&&(b1(0,r.length),43==r.charCodeAt(0))?r.substr(1):r,-128,127)<<24>>24);case 11:return SD(xXn(this,(Uqn(),kLt),t));case 12:return SD(xXn(this,(Uqn(),jLt),t));case 13:return null==t?null:new wE(FBn(t,!0));case 15:case 14:return gLn(t);case 16:return SD(xXn(this,(Uqn(),ELt),t));case 17:return Hdn((Uqn(),t));case 18:return Hdn(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return FBn(t,!0);case 21:case 20:return ILn(t);case 22:return SD(xXn(this,(Uqn(),TLt),t));case 23:return SD(xXn(this,(Uqn(),MLt),t));case 24:return SD(xXn(this,(Uqn(),SLt),t));case 25:return SD(xXn(this,(Uqn(),PLt),t));case 26:return SD(xXn(this,(Uqn(),CLt),t));case 27:return Zgn(t);case 30:return qdn((Uqn(),t));case 31:return qdn(t);case 32:return null==t?null:iln(l_n((h=FBn(t,!0)).length>0&&(b1(0,h.length),43==h.charCodeAt(0))?h.substr(1):h,_Vn,DWn));case 33:return null==t?null:new $A((f=FBn(t,!0)).length>0&&(b1(0,f.length),43==f.charCodeAt(0))?f.substr(1):f);case 34:return null==t?null:iln(l_n((l=FBn(t,!0)).length>0&&(b1(0,l.length),43==l.charCodeAt(0))?l.substr(1):l,_Vn,DWn));case 36:return null==t?null:jgn(rUn((b=FBn(t,!0)).length>0&&(b1(0,b.length),43==b.charCodeAt(0))?b.substr(1):b));case 37:return null==t?null:jgn(rUn((w=FBn(t,!0)).length>0&&(b1(0,w.length),43==w.charCodeAt(0))?w.substr(1):w));case 40:return Vwn((Uqn(),t));case 42:return Gdn((Uqn(),t));case 43:return Gdn(t);case 44:return null==t?null:new $A((d=FBn(t,!0)).length>0&&(b1(0,d.length),43==d.charCodeAt(0))?d.substr(1):d);case 45:return null==t?null:new $A((g=FBn(t,!0)).length>0&&(b1(0,g.length),43==g.charCodeAt(0))?g.substr(1):g);case 46:return FBn(t,!1);case 47:return SD(xXn(this,(Uqn(),ILt),t));case 59:case 48:return Wwn((Uqn(),t));case 49:return SD(xXn(this,(Uqn(),ALt),t));case 50:return null==t?null:rln(l_n((p=FBn(t,!0)).length>0&&(b1(0,p.length),43==p.charCodeAt(0))?p.substr(1):p,Q9n,32767)<<16>>16);case 51:return null==t?null:rln(l_n((c=FBn(t,!0)).length>0&&(b1(0,c.length),43==c.charCodeAt(0))?c.substr(1):c,Q9n,32767)<<16>>16);case 53:return SD(xXn(this,(Uqn(),NLt),t));case 55:return null==t?null:rln(l_n((a=FBn(t,!0)).length>0&&(b1(0,a.length),43==a.charCodeAt(0))?a.substr(1):a,Q9n,32767)<<16>>16);case 56:return null==t?null:rln(l_n((u=FBn(t,!0)).length>0&&(b1(0,u.length),43==u.charCodeAt(0))?u.substr(1):u,Q9n,32767)<<16>>16);case 57:return null==t?null:jgn(rUn((o=FBn(t,!0)).length>0&&(b1(0,o.length),43==o.charCodeAt(0))?o.substr(1):o));case 58:return null==t?null:jgn(rUn((s=FBn(t,!0)).length>0&&(b1(0,s.length),43==s.charCodeAt(0))?s.substr(1):s));case 60:return null==t?null:iln(l_n((e=FBn(t,!0)).length>0&&(b1(0,e.length),43==e.charCodeAt(0))?e.substr(1):e,_Vn,DWn));case 61:return null==t?null:iln(l_n(FBn(t,!0),_Vn,DWn));default:throw Hp(new _y(d6n+n.ne()+g6n))}},vX(N7n,"XMLTypeFactoryImpl",1919),wAn(586,179,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1,1945:1,586:1},zW),MWn.N=!1,MWn.O=!1;var WLt,VLt,QLt,JLt,YLt,ZLt=!1;vX(N7n,"XMLTypePackageImpl",586),wAn(1852,1,{837:1},Ks),MWn._j=function(){return fFn(),TNt},vX(N7n,"XMLTypePackageImpl/1",1852),wAn(1861,1,s7n,_s),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/10",1861),wAn(1862,1,s7n,Fs),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/11",1862),wAn(1863,1,s7n,Bs),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/12",1863),wAn(1864,1,s7n,Hs),MWn.wj=function(n){return UI(n)},MWn.xj=function(n){return x8(Ptt,sVn,333,n,7,1)},vX(N7n,"XMLTypePackageImpl/13",1864),wAn(1865,1,s7n,qs),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/14",1865),wAn(1866,1,s7n,Gs),MWn.wj=function(n){return cL(n,15)},MWn.xj=function(n){return x8(Rnt,nZn,15,n,0,1)},vX(N7n,"XMLTypePackageImpl/15",1866),wAn(1867,1,s7n,zs),MWn.wj=function(n){return cL(n,15)},MWn.xj=function(n){return x8(Rnt,nZn,15,n,0,1)},vX(N7n,"XMLTypePackageImpl/16",1867),wAn(1868,1,s7n,Us),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/17",1868),wAn(1869,1,s7n,Xs),MWn.wj=function(n){return cL(n,155)},MWn.xj=function(n){return x8(Ctt,sVn,155,n,0,1)},vX(N7n,"XMLTypePackageImpl/18",1869),wAn(1870,1,s7n,Ws),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/19",1870),wAn(1853,1,s7n,Vs),MWn.wj=function(n){return cL(n,843)},MWn.xj=function(n){return x8(wLt,HWn,843,n,0,1)},vX(N7n,"XMLTypePackageImpl/2",1853),wAn(1871,1,s7n,Qs),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/20",1871),wAn(1872,1,s7n,Js),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/21",1872),wAn(1873,1,s7n,Ys),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/22",1873),wAn(1874,1,s7n,Zs),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/23",1874),wAn(1875,1,s7n,nh),MWn.wj=function(n){return cL(n,190)},MWn.xj=function(n){return x8(NNt,sVn,190,n,0,2)},vX(N7n,"XMLTypePackageImpl/24",1875),wAn(1876,1,s7n,th),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/25",1876),wAn(1877,1,s7n,eh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/26",1877),wAn(1878,1,s7n,ih),MWn.wj=function(n){return cL(n,15)},MWn.xj=function(n){return x8(Rnt,nZn,15,n,0,1)},vX(N7n,"XMLTypePackageImpl/27",1878),wAn(1879,1,s7n,rh),MWn.wj=function(n){return cL(n,15)},MWn.xj=function(n){return x8(Rnt,nZn,15,n,0,1)},vX(N7n,"XMLTypePackageImpl/28",1879),wAn(1880,1,s7n,ch),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/29",1880),wAn(1854,1,s7n,ah),MWn.wj=function(n){return cL(n,667)},MWn.xj=function(n){return x8(zLt,HWn,2021,n,0,1)},vX(N7n,"XMLTypePackageImpl/3",1854),wAn(1881,1,s7n,uh),MWn.wj=function(n){return cL(n,19)},MWn.xj=function(n){return x8(Att,sVn,19,n,0,1)},vX(N7n,"XMLTypePackageImpl/30",1881),wAn(1882,1,s7n,oh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/31",1882),wAn(1883,1,s7n,sh),MWn.wj=function(n){return cL(n,162)},MWn.xj=function(n){return x8(Rtt,sVn,162,n,0,1)},vX(N7n,"XMLTypePackageImpl/32",1883),wAn(1884,1,s7n,hh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/33",1884),wAn(1885,1,s7n,fh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/34",1885),wAn(1886,1,s7n,lh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/35",1886),wAn(1887,1,s7n,bh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/36",1887),wAn(1888,1,s7n,wh),MWn.wj=function(n){return cL(n,15)},MWn.xj=function(n){return x8(Rnt,nZn,15,n,0,1)},vX(N7n,"XMLTypePackageImpl/37",1888),wAn(1889,1,s7n,dh),MWn.wj=function(n){return cL(n,15)},MWn.xj=function(n){return x8(Rnt,nZn,15,n,0,1)},vX(N7n,"XMLTypePackageImpl/38",1889),wAn(1890,1,s7n,gh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/39",1890),wAn(1855,1,s7n,ph),MWn.wj=function(n){return cL(n,668)},MWn.xj=function(n){return x8(ULt,HWn,2022,n,0,1)},vX(N7n,"XMLTypePackageImpl/4",1855),wAn(1891,1,s7n,vh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/40",1891),wAn(1892,1,s7n,mh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/41",1892),wAn(1893,1,s7n,yh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/42",1893),wAn(1894,1,s7n,kh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/43",1894),wAn(1895,1,s7n,jh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/44",1895),wAn(1896,1,s7n,Eh),MWn.wj=function(n){return cL(n,184)},MWn.xj=function(n){return x8(_tt,sVn,184,n,0,1)},vX(N7n,"XMLTypePackageImpl/45",1896),wAn(1897,1,s7n,Th),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/46",1897),wAn(1898,1,s7n,Mh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/47",1898),wAn(1899,1,s7n,Sh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/48",1899),wAn(sQn,1,s7n,Ph),MWn.wj=function(n){return cL(n,184)},MWn.xj=function(n){return x8(_tt,sVn,184,n,0,1)},vX(N7n,"XMLTypePackageImpl/49",sQn),wAn(1856,1,s7n,Ch),MWn.wj=function(n){return cL(n,669)},MWn.xj=function(n){return x8(XLt,HWn,2023,n,0,1)},vX(N7n,"XMLTypePackageImpl/5",1856),wAn(1901,1,s7n,Ih),MWn.wj=function(n){return cL(n,162)},MWn.xj=function(n){return x8(Rtt,sVn,162,n,0,1)},vX(N7n,"XMLTypePackageImpl/50",1901),wAn(1902,1,s7n,Oh),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/51",1902),wAn(1903,1,s7n,Ah),MWn.wj=function(n){return cL(n,19)},MWn.xj=function(n){return x8(Att,sVn,19,n,0,1)},vX(N7n,"XMLTypePackageImpl/52",1903),wAn(1857,1,s7n,$h),MWn.wj=function(n){return XI(n)},MWn.xj=function(n){return x8(Qtt,sVn,2,n,6,1)},vX(N7n,"XMLTypePackageImpl/6",1857),wAn(1858,1,s7n,Lh),MWn.wj=function(n){return cL(n,190)},MWn.xj=function(n){return x8(NNt,sVn,190,n,0,2)},vX(N7n,"XMLTypePackageImpl/7",1858),wAn(1859,1,s7n,Nh),MWn.wj=function(n){return zI(n)},MWn.xj=function(n){return x8(ktt,sVn,476,n,8,1)},vX(N7n,"XMLTypePackageImpl/8",1859),wAn(1860,1,s7n,xh),MWn.wj=function(n){return cL(n,217)},MWn.xj=function(n){return x8(Ttt,sVn,217,n,0,1)},vX(N7n,"XMLTypePackageImpl/9",1860),wAn(50,60,BVn,ak),vX(ant,"RegEx/ParseException",50),wAn(820,1,{},Dh),MWn.sl=function(n){return n16*e)throw Hp(new ak(kWn((u$(),H8n))));e=16*e+r}if(125!=this.a)throw Hp(new ak(kWn((u$(),q8n))));if(e>unt)throw Hp(new ak(kWn((u$(),G8n))));n=e}else{if(r=0,0!=this.c||(r=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));if(e=r,QXn(this),0!=this.c||(r=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));n=e=16*e+r}break;case 117:if(i=0,QXn(this),0!=this.c||(i=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));if(t=i,QXn(this),0!=this.c||(i=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));if(t=16*t+i,QXn(this),0!=this.c||(i=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));if(t=16*t+i,QXn(this),0!=this.c||(i=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));n=t=16*t+i;break;case 118:if(QXn(this),0!=this.c||(i=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));if(t=i,QXn(this),0!=this.c||(i=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));if(t=16*t+i,QXn(this),0!=this.c||(i=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));if(t=16*t+i,QXn(this),0!=this.c||(i=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));if(t=16*t+i,QXn(this),0!=this.c||(i=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));if(t=16*t+i,QXn(this),0!=this.c||(i=Gvn(this.a))<0)throw Hp(new ak(kWn((u$(),B8n))));if((t=16*t+i)>unt)throw Hp(new ak(kWn((u$(),"parser.descappe.4"))));n=t;break;case 65:case 90:case 122:throw Hp(new ak(kWn((u$(),z8n))))}return n},MWn.ul=function(n){var t;switch(n){case 100:t=32==(32&this.e)?ZUn("Nd",!0):(wWn(),uNt);break;case 68:t=32==(32&this.e)?ZUn("Nd",!1):(wWn(),lNt);break;case 119:t=32==(32&this.e)?ZUn("IsWord",!0):(wWn(),kNt);break;case 87:t=32==(32&this.e)?ZUn("IsWord",!1):(wWn(),wNt);break;case 115:t=32==(32&this.e)?ZUn("IsSpace",!0):(wWn(),gNt);break;case 83:t=32==(32&this.e)?ZUn("IsSpace",!1):(wWn(),bNt);break;default:throw Hp(new dy(ont+n.toString(16)))}return t},MWn.vl=function(n){var t,e,i,r,c,a,u,o,s,h,f;for(this.b=1,QXn(this),t=null,0==this.c&&94==this.a?(QXn(this),n?(wWn(),wWn(),s=new M0(5)):(wWn(),wWn(),Jxn(t=new M0(4),0,unt),s=new M0(4))):(wWn(),wWn(),s=new M0(4)),r=!0;1!=(f=this.c)&&(0!=f||93!=this.a||r);){if(r=!1,e=this.a,i=!1,10==f)switch(e){case 100:case 68:case 119:case 87:case 115:case 83:sHn(s,this.ul(e)),i=!0;break;case 105:case 73:case 99:case 67:(e=this.Ll(s,e))<0&&(i=!0);break;case 112:case 80:if(!(h=DIn(this,e)))throw Hp(new ak(kWn((u$(),O8n))));sHn(s,h),i=!0;break;default:e=this.tl()}else if(20==f){if((c=lx(this.i,58,this.d))<0)throw Hp(new ak(kWn((u$(),A8n))));if(a=!0,94==fV(this.i,this.d)&&(++this.d,a=!1),!(u=b9(fx(this.i,this.d,c),a,512==(512&this.e))))throw Hp(new ak(kWn((u$(),L8n))));if(sHn(s,u),i=!0,c+1>=this.j||93!=fV(this.i,c+1))throw Hp(new ak(kWn((u$(),A8n))));this.d=c+2}if(QXn(this),!i)if(0!=this.c||45!=this.a)Jxn(s,e,e);else{if(QXn(this),1==(f=this.c))throw Hp(new ak(kWn((u$(),$8n))));0==f&&93==this.a?(Jxn(s,e,e),Jxn(s,45,45)):(o=this.a,10==f&&(o=this.tl()),QXn(this),Jxn(s,e,o))}(this.e&k6n)==k6n&&0==this.c&&44==this.a&&QXn(this)}if(1==this.c)throw Hp(new ak(kWn((u$(),$8n))));return t&&(WGn(t,s),s=t),T$n(s),qHn(s),this.b=0,QXn(this),s},MWn.wl=function(){var n,t,e,i;for(e=this.vl(!1);7!=(i=this.c);){if(n=this.a,(0!=i||45!=n&&38!=n)&&4!=i)throw Hp(new ak(kWn((u$(),_8n))));if(QXn(this),9!=this.c)throw Hp(new ak(kWn((u$(),K8n))));if(t=this.vl(!1),4==i)sHn(e,t);else if(45==n)WGn(e,t);else{if(38!=n)throw Hp(new dy("ASSERT"));kGn(e,t)}}return QXn(this),e},MWn.xl=function(){var n,t;return n=this.a-48,wWn(),wWn(),t=new vY(12,null,n),!this.g&&(this.g=new _v),Cv(this.g,new Op(n)),QXn(this),t},MWn.yl=function(){return QXn(this),wWn(),pNt},MWn.zl=function(){return QXn(this),wWn(),dNt},MWn.Al=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Bl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Cl=function(){return QXn(this),fsn()},MWn.Dl=function(){return QXn(this),wWn(),mNt},MWn.El=function(){return QXn(this),wWn(),jNt},MWn.Fl=function(){var n;if(this.d>=this.j||64!=(65504&(n=fV(this.i,this.d++))))throw Hp(new ak(kWn((u$(),S8n))));return QXn(this),wWn(),wWn(),new oG(0,n-64)},MWn.Gl=function(){return QXn(this),RFn()},MWn.Hl=function(){return QXn(this),wWn(),ENt},MWn.Il=function(){var n;return wWn(),wWn(),n=new oG(0,105),QXn(this),n},MWn.Jl=function(){return QXn(this),wWn(),yNt},MWn.Kl=function(){return QXn(this),wWn(),vNt},MWn.Ll=function(n,t){return this.tl()},MWn.Ml=function(){return QXn(this),wWn(),hNt},MWn.Nl=function(){var n,t,e,i,r;if(this.d+1>=this.j)throw Hp(new ak(kWn((u$(),E8n))));if(i=-1,t=null,49<=(n=fV(this.i,this.d))&&n<=57){if(i=n-48,!this.g&&(this.g=new _v),Cv(this.g,new Op(i)),++this.d,41!=fV(this.i,this.d))throw Hp(new ak(kWn((u$(),y8n))));++this.d}else switch(63==n&&--this.d,QXn(this),(t=OXn(this)).e){case 20:case 21:case 22:case 23:break;case 8:if(7!=this.c)throw Hp(new ak(kWn((u$(),y8n))));break;default:throw Hp(new ak(kWn((u$(),T8n))))}if(QXn(this),e=null,2==(r=Vdn(this)).e){if(2!=r.em())throw Hp(new ak(kWn((u$(),M8n))));e=r.am(1),r=r.am(0)}if(7!=this.c)throw Hp(new ak(kWn((u$(),y8n))));return QXn(this),wWn(),wWn(),new jnn(i,t,r,e)},MWn.Ol=function(){return QXn(this),wWn(),fNt},MWn.Pl=function(){var n;if(QXn(this),n=uU(24,Vdn(this)),7!=this.c)throw Hp(new ak(kWn((u$(),y8n))));return QXn(this),n},MWn.Ql=function(){var n;if(QXn(this),n=uU(20,Vdn(this)),7!=this.c)throw Hp(new ak(kWn((u$(),y8n))));return QXn(this),n},MWn.Rl=function(){var n;if(QXn(this),n=uU(22,Vdn(this)),7!=this.c)throw Hp(new ak(kWn((u$(),y8n))));return QXn(this),n},MWn.Sl=function(){var n,t,e,i,r;for(n=0,e=0,t=-1;this.d=this.j)throw Hp(new ak(kWn((u$(),k8n))));if(45==t){for(++this.d;this.d=this.j)throw Hp(new ak(kWn((u$(),k8n))))}if(58==t){if(++this.d,QXn(this),i=AX(Vdn(this),n,e),7!=this.c)throw Hp(new ak(kWn((u$(),y8n))));QXn(this)}else{if(41!=t)throw Hp(new ak(kWn((u$(),j8n))));++this.d,QXn(this),i=AX(Vdn(this),n,e)}return i},MWn.Tl=function(){var n;if(QXn(this),n=uU(21,Vdn(this)),7!=this.c)throw Hp(new ak(kWn((u$(),y8n))));return QXn(this),n},MWn.Ul=function(){var n;if(QXn(this),n=uU(23,Vdn(this)),7!=this.c)throw Hp(new ak(kWn((u$(),y8n))));return QXn(this),n},MWn.Vl=function(){var n,t;if(QXn(this),n=this.f++,t=oU(Vdn(this),n),7!=this.c)throw Hp(new ak(kWn((u$(),y8n))));return QXn(this),t},MWn.Wl=function(){var n;if(QXn(this),n=oU(Vdn(this),0),7!=this.c)throw Hp(new ak(kWn((u$(),y8n))));return QXn(this),n},MWn.Xl=function(n){return QXn(this),5==this.c?(QXn(this),gG(n,(wWn(),wWn(),new h4(9,n)))):gG(n,(wWn(),wWn(),new h4(3,n)))},MWn.Yl=function(n){var t;return QXn(this),wWn(),wWn(),t=new r$(2),5==this.c?(QXn(this),tqn(t,sNt),tqn(t,n)):(tqn(t,n),tqn(t,sNt)),t},MWn.Zl=function(n){return QXn(this),5==this.c?(QXn(this),wWn(),wWn(),new h4(9,n)):(wWn(),wWn(),new h4(3,n))},MWn.a=0,MWn.b=0,MWn.c=0,MWn.d=0,MWn.e=0,MWn.f=1,MWn.g=null,MWn.j=0,vX(ant,"RegEx/RegexParser",820),wAn(1824,820,{},Fm),MWn.sl=function(n){return!1},MWn.tl=function(){return qDn(this)},MWn.ul=function(n){return d_n(n)},MWn.vl=function(n){return ZXn(this)},MWn.wl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.xl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.yl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.zl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Al=function(){return QXn(this),d_n(67)},MWn.Bl=function(){return QXn(this),d_n(73)},MWn.Cl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Dl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.El=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Fl=function(){return QXn(this),d_n(99)},MWn.Gl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Hl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Il=function(){return QXn(this),d_n(105)},MWn.Jl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Kl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Ll=function(n,t){return sHn(n,d_n(t)),-1},MWn.Ml=function(){return QXn(this),wWn(),wWn(),new oG(0,94)},MWn.Nl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Ol=function(){return QXn(this),wWn(),wWn(),new oG(0,36)},MWn.Pl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Ql=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Rl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Sl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Tl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Ul=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Vl=function(){var n;if(QXn(this),n=oU(Vdn(this),0),7!=this.c)throw Hp(new ak(kWn((u$(),y8n))));return QXn(this),n},MWn.Wl=function(){throw Hp(new ak(kWn((u$(),U8n))))},MWn.Xl=function(n){return QXn(this),gG(n,(wWn(),wWn(),new h4(3,n)))},MWn.Yl=function(n){var t;return QXn(this),wWn(),wWn(),tqn(t=new r$(2),n),tqn(t,sNt),t},MWn.Zl=function(n){return QXn(this),wWn(),wWn(),new h4(3,n)};var nNt=null,tNt=null;vX(ant,"RegEx/ParserForXMLSchema",1824),wAn(117,1,ynt,Ap),MWn.$l=function(n){throw Hp(new dy("Not supported."))},MWn._l=function(){return-1},MWn.am=function(n){return null},MWn.bm=function(){return null},MWn.cm=function(n){},MWn.dm=function(n){},MWn.em=function(){return 0},MWn.Ib=function(){return this.fm(0)},MWn.fm=function(n){return 11==this.e?".":""},MWn.e=0;var eNt,iNt,rNt,cNt,aNt,uNt,oNt,sNt,hNt,fNt,lNt,bNt,wNt,dNt,gNt,pNt,vNt,mNt,yNt,kNt,jNt,ENt,TNt,MNt,SNt=null,PNt=null,CNt=null,INt=vX(ant,"RegEx/Token",117);wAn(136,117,{3:1,136:1,117:1},M0),MWn.fm=function(n){var t,e,i;if(4==this.e)if(this==oNt)e=".";else if(this==uNt)e="\\d";else if(this==kNt)e="\\w";else if(this==gNt)e="\\s";else{for((i=new Sk).a+="[",t=0;t0&&(i.a+=","),this.b[t]===this.b[t+1]?cO(i,aBn(this.b[t])):(cO(i,aBn(this.b[t])),i.a+="-",cO(i,aBn(this.b[t+1])));i.a+="]",e=i.a}else if(this==lNt)e="\\D";else if(this==wNt)e="\\W";else if(this==bNt)e="\\S";else{for((i=new Sk).a+="[^",t=0;t0&&(i.a+=","),this.b[t]===this.b[t+1]?cO(i,aBn(this.b[t])):(cO(i,aBn(this.b[t])),i.a+="-",cO(i,aBn(this.b[t+1])));i.a+="]",e=i.a}return e},MWn.a=!1,MWn.c=!1,vX(ant,"RegEx/RangeToken",136),wAn(584,1,{584:1},Op),MWn.a=0,vX(ant,"RegEx/RegexParser/ReferencePosition",584),wAn(583,1,{3:1,583:1},XE),MWn.Fb=function(n){var t;return null!=n&&!!cL(n,583)&&(t=BB(n,583),mK(this.b,t.b)&&this.a==t.a)},MWn.Hb=function(){return vvn(this.b+"/"+txn(this.a))},MWn.Ib=function(){return this.c.fm(this.a)},MWn.a=0,vX(ant,"RegEx/RegularExpression",583),wAn(223,117,ynt,oG),MWn._l=function(){return this.a},MWn.fm=function(n){var t,e;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:e="\\"+PR(this.a&QVn);break;case 12:e="\\f";break;case 10:e="\\n";break;case 13:e="\\r";break;case 9:e="\\t";break;case 27:e="\\e";break;default:e=this.a>=BQn?"\\v"+fx(t="0"+(this.a>>>0).toString(16),t.length-6,t.length):""+PR(this.a&QVn)}break;case 8:e=this==hNt||this==fNt?""+PR(this.a&QVn):"\\"+PR(this.a&QVn);break;default:e=null}return e},MWn.a=0,vX(ant,"RegEx/Token/CharToken",223),wAn(309,117,ynt,h4),MWn.am=function(n){return this.a},MWn.cm=function(n){this.b=n},MWn.dm=function(n){this.c=n},MWn.em=function(){return 1},MWn.fm=function(n){var t;if(3==this.e)if(this.c<0&&this.b<0)t=this.a.fm(n)+"*";else if(this.c==this.b)t=this.a.fm(n)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)t=this.a.fm(n)+"{"+this.c+","+this.b+"}";else{if(!(this.c>=0&&this.b<0))throw Hp(new dy("Token#toString(): CLOSURE "+this.c+FWn+this.b));t=this.a.fm(n)+"{"+this.c+",}"}else if(this.c<0&&this.b<0)t=this.a.fm(n)+"*?";else if(this.c==this.b)t=this.a.fm(n)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)t=this.a.fm(n)+"{"+this.c+","+this.b+"}?";else{if(!(this.c>=0&&this.b<0))throw Hp(new dy("Token#toString(): NONGREEDYCLOSURE "+this.c+FWn+this.b));t=this.a.fm(n)+"{"+this.c+",}?"}return t},MWn.b=0,MWn.c=0,vX(ant,"RegEx/Token/ClosureToken",309),wAn(821,117,ynt,UU),MWn.am=function(n){return 0==n?this.a:this.b},MWn.em=function(){return 2},MWn.fm=function(n){return 3==this.b.e&&this.b.am(0)==this.a?this.a.fm(n)+"+":9==this.b.e&&this.b.am(0)==this.a?this.a.fm(n)+"+?":this.a.fm(n)+""+this.b.fm(n)},vX(ant,"RegEx/Token/ConcatToken",821),wAn(1822,117,ynt,jnn),MWn.am=function(n){if(0==n)return this.d;if(1==n)return this.b;throw Hp(new dy("Internal Error: "+n))},MWn.em=function(){return this.b?2:1},MWn.fm=function(n){var t;return t=this.c>0?"(?("+this.c+")":8==this.a.e?"(?("+this.a+")":"(?"+this.a,this.b?t+=this.d+"|"+this.b+")":t+=this.d+")",t},MWn.c=0,vX(ant,"RegEx/Token/ConditionToken",1822),wAn(1823,117,ynt,T0),MWn.am=function(n){return this.b},MWn.em=function(){return 1},MWn.fm=function(n){return"(?"+(0==this.a?"":txn(this.a))+(0==this.c?"":txn(this.c))+":"+this.b.fm(n)+")"},MWn.a=0,MWn.c=0,vX(ant,"RegEx/Token/ModifierToken",1823),wAn(822,117,ynt,cW),MWn.am=function(n){return this.a},MWn.em=function(){return 1},MWn.fm=function(n){var t;switch(t=null,this.e){case 6:t=0==this.b?"(?:"+this.a.fm(n)+")":"("+this.a.fm(n)+")";break;case 20:t="(?="+this.a.fm(n)+")";break;case 21:t="(?!"+this.a.fm(n)+")";break;case 22:t="(?<="+this.a.fm(n)+")";break;case 23:t="(?"+this.a.fm(n)+")"}return t},MWn.b=0,vX(ant,"RegEx/Token/ParenToken",822),wAn(521,117,{3:1,117:1,521:1},vY),MWn.bm=function(){return this.b},MWn.fm=function(n){return 12==this.e?"\\"+this.a:iAn(this.b)},MWn.a=0,vX(ant,"RegEx/Token/StringToken",521),wAn(465,117,ynt,r$),MWn.$l=function(n){tqn(this,n)},MWn.am=function(n){return BB(bW(this.a,n),117)},MWn.em=function(){return this.a?this.a.a.c.length:0},MWn.fm=function(n){var t,e,i,r,c;if(1==this.e){if(2==this.a.a.c.length)t=BB(bW(this.a,0),117),r=3==(e=BB(bW(this.a,1),117)).e&&e.am(0)==t?t.fm(n)+"+":9==e.e&&e.am(0)==t?t.fm(n)+"+?":t.fm(n)+""+e.fm(n);else{for(c=new Sk,i=0;i=this.c.b:this.a<=this.c.b},MWn.Sb=function(){return this.b>0},MWn.Tb=function(){return this.b},MWn.Vb=function(){return this.b-1},MWn.Qb=function(){throw Hp(new tk(Snt))},MWn.a=0,MWn.b=0,vX(Ent,"ExclusiveRange/RangeIterator",254);var ONt=RW(P9n,"C"),ANt=RW(O9n,"I"),$Nt=RW($Wn,"Z"),LNt=RW(A9n,"J"),NNt=RW(S9n,"B"),xNt=RW(C9n,"D"),DNt=RW(I9n,"F"),RNt=RW($9n,"S"),KNt=bq("org.eclipse.elk.core.labels","ILabelManager"),_Nt=bq(B6n,"DiagnosticChain"),FNt=bq(f7n,"ResourceSet"),BNt=vX(B6n,"InvocationTargetException",null),HNt=(Dk(),f5),qNt=qNt=hEn;Zen(Qp),scn("permProps",[[[Pnt,Cnt],[Int,"gecko1_8"]],[[Pnt,Cnt],[Int,"ie10"]],[[Pnt,Cnt],[Int,"ie8"]],[[Pnt,Cnt],[Int,"ie9"]],[[Pnt,Cnt],[Int,"safari"]]]),qNt(null,"elk",null)}).call(this)}).call(this,void 0!==e.g?e.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(n,t,e){"use strict";function i(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function r(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var a=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var c=Object.assign({},t),a=!1;try{n.resolve("web-worker"),a=!0}catch(s){}if(t.workerUrl)if(a){var u=n("web-worker");c.workerFactory=function(n){return new u(n)}}else console.warn("Web worker requested but 'web-worker' package not installed. \nConsider installing the package or pass your own 'workerFactory' to ELK's constructor.\n... Falling back to non-web worker version.");if(!c.workerFactory){var o=n("./elk-worker.min.js").Worker;c.workerFactory=function(n){return new o(n)}}return r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c))}return c(e,t),e}(n("./elk-api.js").default);Object.defineProperty(t.exports,"__esModule",{value:!0}),t.exports=a,a.default=a},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(n,t,e){t.exports=Worker},{}]},{},[3])(3)},11848:(n,t,e)=>{"use strict";e.d(t,{diagram:()=>k});var i=e(43900),r=e(2588),c=e(53128),a=e(61707),u=e.n(a);e(62264),e(86208),e(24300),e(1488),e(95536),e(58408),e(128),e(18268),e(75816),e(27280);const o=new(u()),s={},h={};let f={};const l=(n,t,e)=>{const r={TB:{in:{north:"north"},out:{south:"west",west:"east",east:"south"}},LR:{in:{west:"west"},out:{east:"south",south:"north",north:"east"}},RL:{in:{east:"east"},out:{west:"north",north:"south",south:"west"}},BT:{in:{south:"south"},out:{north:"east",east:"west",west:"north"}}};return r.TD=r.TB,i.l.info("abc88",e,t,n),r[e][t][n]},b=(n,t,e)=>{if(i.l.info("getNextPort abc88",{node:n,edgeDirection:t,graphDirection:e}),!s[n])switch(e){case"TB":case"TD":s[n]={inPosition:"north",outPosition:"south"};break;case"BT":s[n]={inPosition:"south",outPosition:"north"};break;case"RL":s[n]={inPosition:"east",outPosition:"west"};break;case"LR":s[n]={inPosition:"west",outPosition:"east"}}const r="in"===t?s[n].inPosition:s[n].outPosition;return"in"===t?s[n].inPosition=l(s[n].inPosition,t,e):s[n].outPosition=l(s[n].outPosition,t,e),r},w=function(n,t,e,c){i.l.info("abc78 edges = ",n);const a=c.insert("g").attr("class","edgeLabels");let u,o,s={},l=t.db.getDirection();if(void 0!==n.defaultStyle){const t=(0,i.a)(n.defaultStyle);u=t.style,o=t.labelStyle}return n.forEach((function(t){var c="L-"+t.start+"-"+t.end;void 0===s[c]?(s[c]=0,i.l.info("abc78 new entry",c,s[c])):(s[c]++,i.l.info("abc78 new entry",c,s[c]));let w=c+"-"+s[c];i.l.info("abc78 new link id to be used is",c,w,s[c]);var d="LS-"+t.start,g="LE-"+t.end;const p={style:"",labelStyle:""};switch(p.minlen=t.length||1,"arrow_open"===t.type?p.arrowhead="none":p.arrowhead="normal",p.arrowTypeStart="arrow_open",p.arrowTypeEnd="arrow_open",t.type){case"double_arrow_cross":p.arrowTypeStart="arrow_cross";case"arrow_cross":p.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":p.arrowTypeStart="arrow_point";case"arrow_point":p.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":p.arrowTypeStart="arrow_circle";case"arrow_circle":p.arrowTypeEnd="arrow_circle"}let v="",m="";switch(t.stroke){case"normal":v="fill:none;",void 0!==u&&(v=u),void 0!==o&&(m=o),p.thickness="normal",p.pattern="solid";break;case"dotted":p.thickness="normal",p.pattern="dotted",p.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":p.thickness="thick",p.pattern="solid",p.style="stroke-width: 3.5px;fill:none;"}if(void 0!==t.style){const n=(0,i.a)(t.style);v=n.style,m=n.labelStyle}p.style=p.style+=v,p.labelStyle=p.labelStyle+=m,void 0!==t.interpolate?p.curve=(0,i.d)(t.interpolate,r.qGi):void 0!==n.defaultInterpolate?p.curve=(0,i.d)(n.defaultInterpolate,r.qGi):p.curve=(0,i.d)(h.curve,r.qGi),void 0===t.text?void 0!==t.style&&(p.arrowheadStyle="fill: #333"):(p.arrowheadStyle="fill: #333",p.labelpos="c"),p.labelType="text",p.label=t.text.replace(i.c.lineBreakRegex,"\n"),void 0===t.style&&(p.style=p.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),p.labelStyle=p.labelStyle.replace("color:","fill:"),p.id=w,p.classes="flowchart-link "+d+" "+g;const y=(0,i.f)(a,p),{source:k,target:j}=((n,t)=>{let e=n.start,i=n.end;const r=f[e],c=f[i];return r&&c?("diamond"===r.type&&(e=`${e}-${b(e,"out",t)}`),"diamond"===c.type&&(i=`${i}-${b(i,"in",t)}`),{source:e,target:i}):{source:e,target:i}})(t,l);i.l.debug("abc78 source and target",k,j),e.edges.push({id:"e"+t.start+t.end,sources:[k],targets:[j],labelEl:y,labels:[{width:p.width,height:p.height,orgWidth:p.width,orgHeight:p.height,text:p.label,layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}}],edgeData:p})})),e},d=function(n,t,e){const i=((n,t,e)=>{const{parentById:i}=e,r=new Set;let c=n;for(;c;){if(r.add(c),c===t)return c;c=i[c]}for(c=t;c;){if(r.has(c))return c;c=i[c]}return"root"})(n,t,e);if(void 0===i||"root"===i)return{x:0,y:0};const r=f[i].offset;return{x:r.posX,y:r.posY}},g=function(n,t,e,i,c){const a=d(t.sources[0],t.targets[0],c),u=t.sections[0].startPoint,o=t.sections[0].endPoint,s=(t.sections[0].bendPoints?t.sections[0].bendPoints:[]).map((n=>[n.x+a.x,n.y+a.y])),h=[[u.x+a.x,u.y+a.y],...s,[o.x+a.x,o.y+a.y]],f=(0,r.cFK)().curve(r.qGi),l=n.insert("path").attr("d",f(h)).attr("class","path").attr("fill","none"),b=n.insert("g").attr("class","edgeLabel"),w=(0,r.MlD)(b.node().appendChild(t.labelEl)),g=w.node().firstChild.getBoundingClientRect();w.attr("width",g.width),w.attr("height",g.height),b.attr("transform",`translate(${t.labels[0].x+a.x}, ${t.labels[0].y+a.y})`),function(n,t,e,i){let r="";switch(i&&(r=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,r=r.replace(/\(/g,"\\("),r=r.replace(/\)/g,"\\)")),t.arrowTypeStart){case"arrow_cross":n.attr("marker-start","url("+r+"#"+e+"-crossStart)");break;case"arrow_point":n.attr("marker-start","url("+r+"#"+e+"-pointStart)");break;case"arrow_barb":n.attr("marker-start","url("+r+"#"+e+"-barbStart)");break;case"arrow_circle":n.attr("marker-start","url("+r+"#"+e+"-circleStart)");break;case"aggregation":n.attr("marker-start","url("+r+"#"+e+"-aggregationStart)");break;case"extension":n.attr("marker-start","url("+r+"#"+e+"-extensionStart)");break;case"composition":n.attr("marker-start","url("+r+"#"+e+"-compositionStart)");break;case"dependency":n.attr("marker-start","url("+r+"#"+e+"-dependencyStart)");break;case"lollipop":n.attr("marker-start","url("+r+"#"+e+"-lollipopStart)")}switch(t.arrowTypeEnd){case"arrow_cross":n.attr("marker-end","url("+r+"#"+e+"-crossEnd)");break;case"arrow_point":n.attr("marker-end","url("+r+"#"+e+"-pointEnd)");break;case"arrow_barb":n.attr("marker-end","url("+r+"#"+e+"-barbEnd)");break;case"arrow_circle":n.attr("marker-end","url("+r+"#"+e+"-circleEnd)");break;case"aggregation":n.attr("marker-end","url("+r+"#"+e+"-aggregationEnd)");break;case"extension":n.attr("marker-end","url("+r+"#"+e+"-extensionEnd)");break;case"composition":n.attr("marker-end","url("+r+"#"+e+"-compositionEnd)");break;case"dependency":n.attr("marker-end","url("+r+"#"+e+"-dependencyEnd)");break;case"lollipop":n.attr("marker-end","url("+r+"#"+e+"-lollipopEnd)")}}(l,e,i.type,i.arrowMarkerAbsolute)},p=(n,t)=>{n.forEach((n=>{n.children||(n.children=[]);const e=t.childrenById[n.id];e&&e.forEach((t=>{n.children.push(f[t])})),p(n.children,t)}))},v=(n,t,e,r,c,a,u)=>{e.forEach((function(e){if(e)if(f[e.id].offset={posX:e.x+n,posY:e.y+t,x:n,y:t,depth:u,width:e.width,height:e.height},"group"===e.type){const r=c.insert("g").attr("class","subgraph");r.insert("rect").attr("class","subgraph subgraph-lvl-"+u%5+" node").attr("x",e.x+n).attr("y",e.y+t).attr("width",e.width).attr("height",e.height);const a=r.insert("g").attr("class","label");a.attr("transform",`translate(${e.labels[0].x+n+e.x}, ${e.labels[0].y+t+e.y})`),a.node().appendChild(e.labelData.labelNode),i.l.info("Id (UGH)= ",e.type,e.labels)}else i.l.info("Id (UGH)= ",e.id),e.el.attr("transform",`translate(${e.x+n+e.width/2}, ${e.y+t+e.height/2})`)})),e.forEach((function(e){e&&"group"===e.type&&v(n+e.x,t+e.y,e.children,r,c,a,u+1)}))},m={getClasses:function(n,t){i.l.info("Extracting classes"),t.db.clear("ver-2");try{return t.parse(n),t.db.getClasses()}catch(e){return{}}},draw:async function(n,t,e,a){var u;a.db.clear(),f={},a.db.setGen("gen-2"),a.parser.parse(n);const s=(0,r.MlD)("body").append("div").attr("style","height:400px").attr("id","cy");let h={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","org.eclipse.elk.padding":"[top=100, left=100, bottom=110, right=110]","elk.layered.spacing.edgeNodeBetweenLayers":"30","elk.direction":"DOWN"},children:[],edges:[]};switch(i.l.info("Drawing flowchart using v3 renderer",o),a.db.getDirection()){case"BT":h.layoutOptions["elk.direction"]="UP";break;case"TB":h.layoutOptions["elk.direction"]="DOWN";break;case"LR":h.layoutOptions["elk.direction"]="RIGHT";break;case"RL":h.layoutOptions["elk.direction"]="LEFT"}const{securityLevel:l,flowchart:b}=(0,i.g)();let d;"sandbox"===l&&(d=(0,r.MlD)("#i"+t));const m="sandbox"===l?(0,r.MlD)(d.nodes()[0].contentDocument.body):(0,r.MlD)("body"),y="sandbox"===l?d.nodes()[0].contentDocument:document,k=m.select(`[id="${t}"]`);(0,i.i)(k,["point","circle","cross"],a.type,a.arrowMarkerAbsolute);const j=a.db.getVertices();let E;const T=a.db.getSubGraphs();i.l.info("Subgraphs - ",T);for(let i=T.length-1;i>=0;i--)E=T[i],a.db.addVertex(E.id,E.title,"group",void 0,E.classes,E.dir);const M=k.insert("g").attr("class","subgraphs"),S=function(n){const t={parentById:{},childrenById:{}},e=n.getSubGraphs();return i.l.info("Subgraphs - ",e),e.forEach((function(n){n.nodes.forEach((function(e){t.parentById[e]=n.id,void 0===t.childrenById[n.id]&&(t.childrenById[n.id]=[]),t.childrenById[n.id].push(e)}))})),e.forEach((function(n){n.id,void 0!==t.parentById[n.id]&&t.parentById[n.id]})),t}(a.db);h=function(n,t,e,r,a,u,o){const s=e.select(`[id="${t}"]`),h=s.insert("g").attr("class","nodes");return Object.keys(n).forEach((function(t){const e=n[t];let o="default";e.classes.length>0&&(o=e.classes.join(" "));const l=(0,i.a)(e.styles);let b,w=void 0!==e.text?e.text:e.id;const d={width:0,height:0};if((0,i.e)((0,i.g)().flowchart.htmlLabels)){const n={label:w.replace(/fa[blrs]?:fa-[\w-]+/g,(n=>``))};b=(0,c.m)(s,n).node();const t=b.getBBox();d.width=t.width,d.height=t.height,d.labelNode=b,b.parentNode.removeChild(b)}else{const n=r.createElementNS("http://www.w3.org/2000/svg","text");n.setAttribute("style",l.labelStyle.replace("color:","fill:"));const t=w.split(i.c.lineBreakRegex);for(const i of t){const t=r.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","1"),t.textContent=i,n.appendChild(t)}b=n;const e=b.getBBox();d.width=e.width,d.height=e.height,d.labelNode=b}const g=[{id:e.id+"-west",layoutOptions:{"port.side":"WEST"}},{id:e.id+"-east",layoutOptions:{"port.side":"EAST"}},{id:e.id+"-south",layoutOptions:{"port.side":"SOUTH"}},{id:e.id+"-north",layoutOptions:{"port.side":"NORTH"}}];let p=0,v="",m={};switch(e.type){case"round":p=5,v="rect";break;case"square":case"group":default:v="rect";break;case"diamond":v="question",m={portConstraints:"FIXED_SIDE"};break;case"hexagon":v="hexagon";break;case"odd":case"odd_right":v="rect_left_inv_arrow";break;case"lean_right":v="lean_right";break;case"lean_left":v="lean_left";break;case"trapezoid":v="trapezoid";break;case"inv_trapezoid":v="inv_trapezoid";break;case"circle":v="circle";break;case"ellipse":v="ellipse";break;case"stadium":v="stadium";break;case"subroutine":v="subroutine";break;case"cylinder":v="cylinder";break;case"doublecircle":v="doublecircle"}const y={labelStyle:l.labelStyle,shape:v,labelText:w,rx:p,ry:p,class:o,style:l.style,id:e.id,link:e.link,linkTarget:e.linkTarget,tooltip:a.db.getTooltip(e.id)||"",domId:a.db.lookUpDomId(e.id),haveCallback:e.haveCallback,width:"group"===e.type?500:void 0,dir:e.dir,type:e.type,props:e.props,padding:(0,i.g)().flowchart.padding};let k,j;"group"!==y.type&&(j=(0,i.b)(h,y,e.dir),k=j.node().getBBox());const E={id:e.id,ports:"diamond"===e.type?g:[],layoutOptions:m,labelText:w,labelData:d,domId:a.db.lookUpDomId(e.id),width:null==k?void 0:k.width,height:null==k?void 0:k.height,type:e.type,el:j,parent:u.parentById[e.id]};f[y.id]=E})),o}(j,t,m,y,a,S,h);const P=k.insert("g").attr("class","edges edgePath"),C=a.db.getEdges();h=w(C,a,h,k);Object.keys(f).forEach((n=>{const t=f[n];t.parent||h.children.push(t),void 0!==S.childrenById[n]&&(t.labels=[{text:t.labelText,layoutOptions:{"nodeLabels.placement":"[H_CENTER, V_TOP, INSIDE]"},width:t.labelData.width,height:t.labelData.height}],delete t.x,delete t.y,delete t.width,delete t.height)})),p(h.children,S),i.l.info("after layout",JSON.stringify(h,null,2));const I=await o.layout(h);v(0,0,I.children,k,M,a,0),i.l.info("after layout",I),null==(u=I.edges)||u.map((n=>{g(P,n,n.edgeData,a,S)})),(0,i.s)({},k,b.diagramPadding,b.useMaxWidth),s.remove()}},y=n=>`.label {\n font-family: ${n.fontFamily};\n color: ${n.nodeTextColor||n.textColor};\n }\n .cluster-label text {\n fill: ${n.titleColor};\n }\n .cluster-label span {\n color: ${n.titleColor};\n }\n\n .label text,span {\n fill: ${n.nodeTextColor||n.textColor};\n color: ${n.nodeTextColor||n.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${n.mainBkg};\n stroke: ${n.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${n.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${n.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${n.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${n.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${n.edgeLabelBackground};\n fill: ${n.edgeLabelBackground};\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ${n.clusterBkg};\n stroke: ${n.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${n.titleColor};\n }\n\n .cluster span {\n color: ${n.titleColor};\n }\n /* .cluster div {\n color: ${n.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${n.fontFamily};\n font-size: 12px;\n background: ${n.tertiaryColor};\n border: 1px solid ${n.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${n.textColor};\n }\n .subgraph {\n stroke-width:2;\n rx:3;\n }\n // .subgraph-lvl-1 {\n // fill:#ccc;\n // // stroke:black;\n // }\n ${(n=>{let t="";for(let e=0;e<5;e++)t+=`\n .subgraph-lvl-${e} {\n fill: ${n[`surface${e}`]};\n stroke: ${n[`surfacePeer${e}`]};\n }\n `;return t})(n)}\n`,k={db:i.h,renderer:m,parser:i.p,styles:y}}}]); \ No newline at end of file diff --git a/assets/js/848.816b87e7.js b/assets/js/848.816b87e7.js new file mode 100644 index 00000000..2d797935 --- /dev/null +++ b/assets/js/848.816b87e7.js @@ -0,0 +1,7370 @@ +exports.id = 848; +exports.ids = [848]; +exports.modules = { + +/***/ 61707: +/***/ ((module) => { + +(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=undefined;if(!f&&c)return require(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=undefined,i=0;i 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref$defaultLayoutOpt = _ref.defaultLayoutOptions, + defaultLayoutOptions = _ref$defaultLayoutOpt === undefined ? {} : _ref$defaultLayoutOpt, + _ref$algorithms = _ref.algorithms, + algorithms = _ref$algorithms === undefined ? ['layered', 'stress', 'mrtree', 'radial', 'force', 'disco', 'sporeOverlap', 'sporeCompaction', 'rectpacking'] : _ref$algorithms, + workerFactory = _ref.workerFactory, + workerUrl = _ref.workerUrl; + + _classCallCheck(this, ELK); + + this.defaultLayoutOptions = defaultLayoutOptions; + this.initialized = false; + + // check valid worker construction possible + if (typeof workerUrl === 'undefined' && typeof workerFactory === 'undefined') { + throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'."); + } + var factory = workerFactory; + if (typeof workerUrl !== 'undefined' && typeof workerFactory === 'undefined') { + // use default Web Worker + factory = function factory(url) { + return new Worker(url); + }; + } + + // create the worker + var worker = factory(workerUrl); + if (typeof worker.postMessage !== 'function') { + throw new TypeError("Created worker does not provide" + " the required 'postMessage' function."); + } + + // wrap the worker to return promises + this.worker = new PromisedWorker(worker); + + // initially register algorithms + this.worker.postMessage({ + cmd: 'register', + algorithms: algorithms + }).then(function (r) { + return _this.initialized = true; + }).catch(console.err); + } + + _createClass(ELK, [{ + key: 'layout', + value: function layout(graph) { + var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref2$layoutOptions = _ref2.layoutOptions, + layoutOptions = _ref2$layoutOptions === undefined ? this.defaultLayoutOptions : _ref2$layoutOptions, + _ref2$logging = _ref2.logging, + logging = _ref2$logging === undefined ? false : _ref2$logging, + _ref2$measureExecutio = _ref2.measureExecutionTime, + measureExecutionTime = _ref2$measureExecutio === undefined ? false : _ref2$measureExecutio; + + if (!graph) { + return Promise.reject(new Error("Missing mandatory parameter 'graph'.")); + } + return this.worker.postMessage({ + cmd: 'layout', + graph: graph, + layoutOptions: layoutOptions, + options: { + logging: logging, + measureExecutionTime: measureExecutionTime + } + }); + } + }, { + key: 'knownLayoutAlgorithms', + value: function knownLayoutAlgorithms() { + return this.worker.postMessage({ cmd: 'algorithms' }); + } + }, { + key: 'knownLayoutOptions', + value: function knownLayoutOptions() { + return this.worker.postMessage({ cmd: 'options' }); + } + }, { + key: 'knownLayoutCategories', + value: function knownLayoutCategories() { + return this.worker.postMessage({ cmd: 'categories' }); + } + }, { + key: 'terminateWorker', + value: function terminateWorker() { + this.worker.terminate(); + } + }]); + + return ELK; +}(); + +exports.default = ELK; + +var PromisedWorker = function () { + function PromisedWorker(worker) { + var _this2 = this; + + _classCallCheck(this, PromisedWorker); + + if (worker === undefined) { + throw new Error("Missing mandatory parameter 'worker'."); + } + this.resolvers = {}; + this.worker = worker; + this.worker.onmessage = function (answer) { + // why is this necessary? + setTimeout(function () { + _this2.receive(_this2, answer); + }, 0); + }; + } + + _createClass(PromisedWorker, [{ + key: 'postMessage', + value: function postMessage(msg) { + var id = this.id || 0; + this.id = id + 1; + msg.id = id; + var self = this; + return new Promise(function (resolve, reject) { + // prepare the resolver + self.resolvers[id] = function (err, res) { + if (err) { + self.convertGwtStyleError(err); + reject(err); + } else { + resolve(res); + } + }; + // post the message + self.worker.postMessage(msg); + }); + } + }, { + key: 'receive', + value: function receive(self, answer) { + var json = answer.data; + var resolver = self.resolvers[json.id]; + if (resolver) { + delete self.resolvers[json.id]; + if (json.error) { + resolver(json.error); + } else { + resolver(null, json.data); + } + } + } + }, { + key: 'terminate', + value: function terminate() { + if (this.worker.terminate) { + this.worker.terminate(); + } + } + }, { + key: 'convertGwtStyleError', + value: function convertGwtStyleError(err) { + if (!err) { + return; + } + // Somewhat flatten the way GWT stores nested exception(s) + var javaException = err['__java$exception']; + if (javaException) { + // Note that the property name of the nested exception is different + // in the non-minified ('cause') and the minified (not deterministic) version. + // Hence, the version below only works for the non-minified version. + // However, as the minified stack trace is not of much use anyway, one + // should switch the used version for debugging in such a case. + if (javaException.cause && javaException.cause.backingJsObject) { + err.cause = javaException.cause.backingJsObject; + this.convertGwtStyleError(err.cause); + } + delete err['__java$exception']; + } + } + }]); + + return PromisedWorker; +}(); +},{}],2:[function(require,module,exports){ +(function (global){(function (){ +'use strict'; + +// -------------- FAKE ELEMENTS GWT ASSUMES EXIST -------------- +var $wnd; +if (typeof window !== 'undefined') + $wnd = window +else if (typeof global !== 'undefined') + $wnd = global // nodejs +else if (typeof self !== 'undefined') + $wnd = self // web worker + +var $moduleName, + $moduleBase; + +// -------------- WORKAROUND STRICT MODE, SEE #127 -------------- +var g, i, o; + +// -------------- GENERATED CODE -------------- +function nb(){} +function xb(){} +function Fd(){} +function $g(){} +function _p(){} +function yq(){} +function Sq(){} +function Es(){} +function Jw(){} +function Vw(){} +function VA(){} +function dA(){} +function MA(){} +function PA(){} +function PB(){} +function bx(){} +function cx(){} +function vy(){} +function Nz(){} +function Yz(){} +function Ylb(){} +function Ymb(){} +function xmb(){} +function Fmb(){} +function Qmb(){} +function gcb(){} +function ccb(){} +function jcb(){} +function jtb(){} +function otb(){} +function qtb(){} +function _fb(){} +function bpb(){} +function kpb(){} +function ppb(){} +function Gpb(){} +function drb(){} +function dzb(){} +function fzb(){} +function fxb(){} +function Vxb(){} +function Ovb(){} +function byb(){} +function zyb(){} +function Zyb(){} +function _yb(){} +function hzb(){} +function jzb(){} +function lzb(){} +function nzb(){} +function rzb(){} +function zzb(){} +function Czb(){} +function Ezb(){} +function Gzb(){} +function Izb(){} +function Mzb(){} +function bBb(){} +function NBb(){} +function PBb(){} +function RBb(){} +function iCb(){} +function OCb(){} +function SCb(){} +function GDb(){} +function JDb(){} +function fEb(){} +function xEb(){} +function CEb(){} +function GEb(){} +function yFb(){} +function KGb(){} +function tIb(){} +function vIb(){} +function xIb(){} +function zIb(){} +function OIb(){} +function SIb(){} +function TJb(){} +function VJb(){} +function XJb(){} +function XKb(){} +function fKb(){} +function VKb(){} +function VLb(){} +function jLb(){} +function nLb(){} +function GLb(){} +function KLb(){} +function MLb(){} +function OLb(){} +function RLb(){} +function YLb(){} +function bMb(){} +function gMb(){} +function lMb(){} +function pMb(){} +function wMb(){} +function zMb(){} +function CMb(){} +function FMb(){} +function LMb(){} +function zNb(){} +function PNb(){} +function kOb(){} +function pOb(){} +function tOb(){} +function yOb(){} +function FOb(){} +function GPb(){} +function aQb(){} +function cQb(){} +function eQb(){} +function gQb(){} +function iQb(){} +function CQb(){} +function MQb(){} +function OQb(){} +function ASb(){} +function fTb(){} +function kTb(){} +function STb(){} +function fUb(){} +function DUb(){} +function VUb(){} +function YUb(){} +function _Ub(){} +function _Wb(){} +function QWb(){} +function XWb(){} +function jVb(){} +function DVb(){} +function VVb(){} +function $Vb(){} +function dXb(){} +function hXb(){} +function lXb(){} +function gYb(){} +function HYb(){} +function SYb(){} +function VYb(){} +function dZb(){} +function P$b(){} +function T$b(){} +function h1b(){} +function m1b(){} +function q1b(){} +function u1b(){} +function y1b(){} +function C1b(){} +function e2b(){} +function g2b(){} +function m2b(){} +function q2b(){} +function u2b(){} +function S2b(){} +function U2b(){} +function W2b(){} +function _2b(){} +function e3b(){} +function h3b(){} +function p3b(){} +function t3b(){} +function w3b(){} +function y3b(){} +function A3b(){} +function M3b(){} +function Q3b(){} +function U3b(){} +function Y3b(){} +function l4b(){} +function q4b(){} +function s4b(){} +function u4b(){} +function w4b(){} +function y4b(){} +function L4b(){} +function N4b(){} +function P4b(){} +function R4b(){} +function T4b(){} +function X4b(){} +function I5b(){} +function Q5b(){} +function T5b(){} +function Z5b(){} +function l6b(){} +function o6b(){} +function t6b(){} +function z6b(){} +function L6b(){} +function M6b(){} +function P6b(){} +function X6b(){} +function $6b(){} +function a7b(){} +function c7b(){} +function g7b(){} +function j7b(){} +function m7b(){} +function r7b(){} +function x7b(){} +function D7b(){} +function D9b(){} +function b9b(){} +function h9b(){} +function j9b(){} +function l9b(){} +function w9b(){} +function F9b(){} +function hac(){} +function jac(){} +function pac(){} +function uac(){} +function Iac(){} +function Kac(){} +function Sac(){} +function obc(){} +function rbc(){} +function vbc(){} +function Fbc(){} +function Jbc(){} +function Xbc(){} +function ccc(){} +function fcc(){} +function lcc(){} +function occ(){} +function tcc(){} +function ycc(){} +function Acc(){} +function Ccc(){} +function Ecc(){} +function Gcc(){} +function Zcc(){} +function _cc(){} +function bdc(){} +function fdc(){} +function jdc(){} +function pdc(){} +function sdc(){} +function ydc(){} +function Adc(){} +function Cdc(){} +function Edc(){} +function Idc(){} +function Ndc(){} +function Qdc(){} +function Sdc(){} +function Udc(){} +function Wdc(){} +function Ydc(){} +function aec(){} +function hec(){} +function jec(){} +function lec(){} +function nec(){} +function uec(){} +function wec(){} +function yec(){} +function Aec(){} +function Fec(){} +function Jec(){} +function Lec(){} +function Nec(){} +function Rec(){} +function Uec(){} +function Zec(){} +function Zfc(){} +function lfc(){} +function tfc(){} +function xfc(){} +function zfc(){} +function Ffc(){} +function Jfc(){} +function Nfc(){} +function Pfc(){} +function Vfc(){} +function _fc(){} +function fgc(){} +function jgc(){} +function lgc(){} +function Bgc(){} +function ehc(){} +function ghc(){} +function ihc(){} +function khc(){} +function mhc(){} +function ohc(){} +function qhc(){} +function yhc(){} +function Ahc(){} +function Ghc(){} +function Ihc(){} +function Khc(){} +function Mhc(){} +function Shc(){} +function Uhc(){} +function Whc(){} +function dic(){} +function dlc(){} +function blc(){} +function flc(){} +function hlc(){} +function jlc(){} +function Glc(){} +function Ilc(){} +function Klc(){} +function Mlc(){} +function Mjc(){} +function Qjc(){} +function Qlc(){} +function Ulc(){} +function Ylc(){} +function Lkc(){} +function Nkc(){} +function Pkc(){} +function Rkc(){} +function Xkc(){} +function _kc(){} +function gmc(){} +function kmc(){} +function zmc(){} +function Fmc(){} +function Wmc(){} +function $mc(){} +function anc(){} +function mnc(){} +function wnc(){} +function Hnc(){} +function Jnc(){} +function Lnc(){} +function Nnc(){} +function Pnc(){} +function Ync(){} +function eoc(){} +function Aoc(){} +function Coc(){} +function Eoc(){} +function Joc(){} +function Loc(){} +function Zoc(){} +function _oc(){} +function bpc(){} +function hpc(){} +function kpc(){} +function ppc(){} +function pFc(){} +function Ryc(){} +function QCc(){} +function PDc(){} +function xGc(){} +function HGc(){} +function JGc(){} +function NGc(){} +function GIc(){} +function iKc(){} +function mKc(){} +function wKc(){} +function yKc(){} +function AKc(){} +function EKc(){} +function KKc(){} +function OKc(){} +function QKc(){} +function SKc(){} +function UKc(){} +function YKc(){} +function aLc(){} +function fLc(){} +function hLc(){} +function nLc(){} +function pLc(){} +function tLc(){} +function vLc(){} +function zLc(){} +function BLc(){} +function DLc(){} +function FLc(){} +function sMc(){} +function JMc(){} +function hNc(){} +function RNc(){} +function ZNc(){} +function _Nc(){} +function bOc(){} +function dOc(){} +function fOc(){} +function hOc(){} +function hRc(){} +function jRc(){} +function KRc(){} +function NRc(){} +function NQc(){} +function LQc(){} +function _Qc(){} +function cPc(){} +function iPc(){} +function kPc(){} +function mPc(){} +function xPc(){} +function zPc(){} +function zSc(){} +function BSc(){} +function GSc(){} +function ISc(){} +function NSc(){} +function TSc(){} +function NTc(){} +function NVc(){} +function oVc(){} +function SVc(){} +function VVc(){} +function XVc(){} +function ZVc(){} +function bWc(){} +function bXc(){} +function CXc(){} +function FXc(){} +function IXc(){} +function MXc(){} +function UXc(){} +function bYc(){} +function fYc(){} +function oYc(){} +function qYc(){} +function uYc(){} +function pZc(){} +function G$c(){} +function h0c(){} +function N0c(){} +function k1c(){} +function I1c(){} +function Q1c(){} +function f2c(){} +function i2c(){} +function k2c(){} +function w2c(){} +function O2c(){} +function S2c(){} +function Z2c(){} +function v3c(){} +function x3c(){} +function R3c(){} +function U3c(){} +function e4c(){} +function w4c(){} +function x4c(){} +function z4c(){} +function B4c(){} +function D4c(){} +function F4c(){} +function H4c(){} +function J4c(){} +function L4c(){} +function N4c(){} +function P4c(){} +function R4c(){} +function T4c(){} +function V4c(){} +function X4c(){} +function Z4c(){} +function _4c(){} +function _7c(){} +function b5c(){} +function d5c(){} +function f5c(){} +function h5c(){} +function H5c(){} +function Hfd(){} +function Zfd(){} +function Zed(){} +function ged(){} +function Jed(){} +function Ned(){} +function Red(){} +function Ved(){} +function bbd(){} +function mdd(){} +function _fd(){} +function fgd(){} +function kgd(){} +function Mgd(){} +function Ahd(){} +function Ald(){} +function Tld(){} +function xkd(){} +function rmd(){} +function knd(){} +function Jod(){} +function JCd(){} +function Bpd(){} +function BFd(){} +function oFd(){} +function bqd(){} +function bvd(){} +function jvd(){} +function yud(){} +function Hxd(){} +function EBd(){} +function aDd(){} +function MGd(){} +function vHd(){} +function RHd(){} +function wNd(){} +function zNd(){} +function CNd(){} +function KNd(){} +function XNd(){} +function $Nd(){} +function HPd(){} +function lUd(){} +function XUd(){} +function DWd(){} +function GWd(){} +function JWd(){} +function MWd(){} +function PWd(){} +function SWd(){} +function VWd(){} +function YWd(){} +function _Wd(){} +function xYd(){} +function BYd(){} +function mZd(){} +function EZd(){} +function GZd(){} +function JZd(){} +function MZd(){} +function PZd(){} +function SZd(){} +function VZd(){} +function YZd(){} +function _Zd(){} +function c$d(){} +function f$d(){} +function i$d(){} +function l$d(){} +function o$d(){} +function r$d(){} +function u$d(){} +function x$d(){} +function A$d(){} +function D$d(){} +function G$d(){} +function J$d(){} +function M$d(){} +function P$d(){} +function S$d(){} +function V$d(){} +function Y$d(){} +function _$d(){} +function c_d(){} +function f_d(){} +function i_d(){} +function l_d(){} +function o_d(){} +function r_d(){} +function u_d(){} +function x_d(){} +function A_d(){} +function D_d(){} +function G_d(){} +function J_d(){} +function M_d(){} +function P_d(){} +function S_d(){} +function V_d(){} +function Y_d(){} +function h5d(){} +function U6d(){} +function U9d(){} +function _8d(){} +function fae(){} +function hae(){} +function kae(){} +function nae(){} +function qae(){} +function tae(){} +function wae(){} +function zae(){} +function Cae(){} +function Fae(){} +function Iae(){} +function Lae(){} +function Oae(){} +function Rae(){} +function Uae(){} +function Xae(){} +function $ae(){} +function bbe(){} +function ebe(){} +function hbe(){} +function kbe(){} +function nbe(){} +function qbe(){} +function tbe(){} +function wbe(){} +function zbe(){} +function Cbe(){} +function Fbe(){} +function Ibe(){} +function Lbe(){} +function Obe(){} +function Rbe(){} +function Ube(){} +function Xbe(){} +function $be(){} +function bce(){} +function ece(){} +function hce(){} +function kce(){} +function nce(){} +function qce(){} +function tce(){} +function wce(){} +function zce(){} +function Cce(){} +function Fce(){} +function Ice(){} +function Lce(){} +function Oce(){} +function Rce(){} +function Uce(){} +function Xce(){} +function ude(){} +function Vge(){} +function dhe(){} +function s_b(a){} +function jSd(a){} +function ol(){wb()} +function oPb(){nPb()} +function EPb(){CPb()} +function gFb(){fFb()} +function TRb(){SRb()} +function ySb(){wSb()} +function PSb(){OSb()} +function dTb(){bTb()} +function i4b(){b4b()} +function D2b(){x2b()} +function J6b(){D6b()} +function u9b(){q9b()} +function $9b(){I9b()} +function Umc(){Imc()} +function abc(){Vac()} +function ZCc(){VCc()} +function kCc(){hCc()} +function rCc(){oCc()} +function Tcc(){Occ()} +function xkc(){gkc()} +function xDc(){rDc()} +function iDc(){cDc()} +function kwc(){jwc()} +function tJc(){jJc()} +function dJc(){aJc()} +function Pyc(){Nyc()} +function VBc(){SBc()} +function CFc(){yFc()} +function CUc(){wUc()} +function lUc(){fUc()} +function sUc(){pUc()} +function IUc(){GUc()} +function IWc(){HWc()} +function _Wc(){ZWc()} +function fHc(){dHc()} +function f0c(){d0c()} +function B0c(){A0c()} +function L0c(){J0c()} +function LTc(){JTc()} +function sTc(){rTc()} +function KLc(){ILc()} +function wNc(){tNc()} +function PYc(){OYc()} +function nZc(){lZc()} +function q3c(){p3c()} +function Z7c(){X7c()} +function Z9c(){Y9c()} +function _ad(){Zad()} +function kdd(){idd()} +function $md(){Smd()} +function HGd(){tGd()} +function hLd(){NKd()} +function J6d(){Uge()} +function Mvb(a){uCb(a)} +function Yb(a){this.a=a} +function cc(a){this.a=a} +function cj(a){this.a=a} +function ij(a){this.a=a} +function Dj(a){this.a=a} +function df(a){this.a=a} +function kf(a){this.a=a} +function ah(a){this.a=a} +function lh(a){this.a=a} +function th(a){this.a=a} +function Ph(a){this.a=a} +function vi(a){this.a=a} +function Ci(a){this.a=a} +function Fk(a){this.a=a} +function Ln(a){this.a=a} +function ap(a){this.a=a} +function zp(a){this.a=a} +function Yp(a){this.a=a} +function qq(a){this.a=a} +function Dq(a){this.a=a} +function wr(a){this.a=a} +function Ir(a){this.b=a} +function sj(a){this.c=a} +function sw(a){this.a=a} +function fw(a){this.a=a} +function xw(a){this.a=a} +function Cw(a){this.a=a} +function Qw(a){this.a=a} +function Rw(a){this.a=a} +function Xw(a){this.a=a} +function Xv(a){this.a=a} +function Sv(a){this.a=a} +function eu(a){this.a=a} +function Zx(a){this.a=a} +function _x(a){this.a=a} +function xy(a){this.a=a} +function xB(a){this.a=a} +function HB(a){this.a=a} +function TB(a){this.a=a} +function fC(a){this.a=a} +function wB(){this.a=[]} +function MBb(a,b){a.a=b} +function w_b(a,b){a.a=b} +function x_b(a,b){a.b=b} +function YOb(a,b){a.b=b} +function $Ob(a,b){a.b=b} +function ZGb(a,b){a.j=b} +function qNb(a,b){a.g=b} +function rNb(a,b){a.i=b} +function dRb(a,b){a.c=b} +function eRb(a,b){a.d=b} +function z_b(a,b){a.d=b} +function y_b(a,b){a.c=b} +function __b(a,b){a.k=b} +function E0b(a,b){a.c=b} +function njc(a,b){a.c=b} +function mjc(a,b){a.a=b} +function dFc(a,b){a.a=b} +function eFc(a,b){a.f=b} +function nOc(a,b){a.a=b} +function oOc(a,b){a.b=b} +function pOc(a,b){a.d=b} +function qOc(a,b){a.i=b} +function rOc(a,b){a.o=b} +function sOc(a,b){a.r=b} +function $Pc(a,b){a.a=b} +function _Pc(a,b){a.b=b} +function DVc(a,b){a.e=b} +function EVc(a,b){a.f=b} +function FVc(a,b){a.g=b} +function SZc(a,b){a.e=b} +function TZc(a,b){a.f=b} +function c$c(a,b){a.f=b} +function bJd(a,b){a.n=b} +function A1d(a,b){a.a=b} +function J1d(a,b){a.a=b} +function B1d(a,b){a.c=b} +function K1d(a,b){a.c=b} +function L1d(a,b){a.d=b} +function M1d(a,b){a.e=b} +function N1d(a,b){a.g=b} +function d2d(a,b){a.a=b} +function e2d(a,b){a.c=b} +function f2d(a,b){a.d=b} +function g2d(a,b){a.e=b} +function h2d(a,b){a.f=b} +function i2d(a,b){a.j=b} +function Z8d(a,b){a.a=b} +function $8d(a,b){a.b=b} +function g9d(a,b){a.a=b} +function Cic(a){a.b=a.a} +function Dg(a){a.c=a.d.d} +function vib(a){this.d=a} +function eib(a){this.a=a} +function Pib(a){this.a=a} +function Vib(a){this.a=a} +function $ib(a){this.a=a} +function mcb(a){this.a=a} +function Mcb(a){this.a=a} +function Xcb(a){this.a=a} +function Ndb(a){this.a=a} +function _db(a){this.a=a} +function teb(a){this.a=a} +function Qeb(a){this.a=a} +function djb(a){this.a=a} +function Gjb(a){this.a=a} +function Njb(a){this.a=a} +function Bjb(a){this.b=a} +function lnb(a){this.b=a} +function Dnb(a){this.b=a} +function anb(a){this.a=a} +function Mob(a){this.a=a} +function Rob(a){this.a=a} +function iob(a){this.c=a} +function olb(a){this.c=a} +function qub(a){this.c=a} +function Tub(a){this.a=a} +function Vub(a){this.a=a} +function Xub(a){this.a=a} +function Zub(a){this.a=a} +function tpb(a){this.a=a} +function _pb(a){this.a=a} +function Wqb(a){this.a=a} +function nsb(a){this.a=a} +function Rxb(a){this.a=a} +function Txb(a){this.a=a} +function Xxb(a){this.a=a} +function bzb(a){this.a=a} +function tzb(a){this.a=a} +function vzb(a){this.a=a} +function xzb(a){this.a=a} +function Kzb(a){this.a=a} +function Ozb(a){this.a=a} +function iAb(a){this.a=a} +function kAb(a){this.a=a} +function mAb(a){this.a=a} +function BAb(a){this.a=a} +function hBb(a){this.a=a} +function jBb(a){this.a=a} +function nBb(a){this.a=a} +function TBb(a){this.a=a} +function XBb(a){this.a=a} +function QCb(a){this.a=a} +function WCb(a){this.a=a} +function _Cb(a){this.a=a} +function dEb(a){this.a=a} +function QGb(a){this.a=a} +function YGb(a){this.a=a} +function tKb(a){this.a=a} +function CLb(a){this.a=a} +function JMb(a){this.a=a} +function RNb(a){this.a=a} +function kQb(a){this.a=a} +function mQb(a){this.a=a} +function FQb(a){this.a=a} +function ETb(a){this.a=a} +function UTb(a){this.a=a} +function dUb(a){this.a=a} +function hUb(a){this.a=a} +function EZb(a){this.a=a} +function j$b(a){this.a=a} +function v$b(a){this.e=a} +function J0b(a){this.a=a} +function M0b(a){this.a=a} +function R0b(a){this.a=a} +function U0b(a){this.a=a} +function i2b(a){this.a=a} +function k2b(a){this.a=a} +function o2b(a){this.a=a} +function s2b(a){this.a=a} +function G2b(a){this.a=a} +function I2b(a){this.a=a} +function K2b(a){this.a=a} +function M2b(a){this.a=a} +function W3b(a){this.a=a} +function $3b(a){this.a=a} +function V4b(a){this.a=a} +function u5b(a){this.a=a} +function A7b(a){this.a=a} +function G7b(a){this.a=a} +function J7b(a){this.a=a} +function M7b(a){this.a=a} +function Mbc(a){this.a=a} +function Pbc(a){this.a=a} +function lac(a){this.a=a} +function nac(a){this.a=a} +function qcc(a){this.a=a} +function Gdc(a){this.a=a} +function $dc(a){this.a=a} +function cec(a){this.a=a} +function _ec(a){this.a=a} +function pfc(a){this.a=a} +function Bfc(a){this.a=a} +function Lfc(a){this.a=a} +function ygc(a){this.a=a} +function Dgc(a){this.a=a} +function shc(a){this.a=a} +function uhc(a){this.a=a} +function whc(a){this.a=a} +function Chc(a){this.a=a} +function Ehc(a){this.a=a} +function Ohc(a){this.a=a} +function Yhc(a){this.a=a} +function Tkc(a){this.a=a} +function Vkc(a){this.a=a} +function Olc(a){this.a=a} +function pnc(a){this.a=a} +function rnc(a){this.a=a} +function dpc(a){this.a=a} +function fpc(a){this.a=a} +function GCc(a){this.a=a} +function KCc(a){this.a=a} +function mDc(a){this.a=a} +function jEc(a){this.a=a} +function HEc(a){this.a=a} +function FEc(a){this.c=a} +function qoc(a){this.b=a} +function bFc(a){this.a=a} +function GFc(a){this.a=a} +function iGc(a){this.a=a} +function kGc(a){this.a=a} +function mGc(a){this.a=a} +function $Gc(a){this.a=a} +function hIc(a){this.a=a} +function lIc(a){this.a=a} +function pIc(a){this.a=a} +function tIc(a){this.a=a} +function xIc(a){this.a=a} +function zIc(a){this.a=a} +function CIc(a){this.a=a} +function LIc(a){this.a=a} +function CKc(a){this.a=a} +function IKc(a){this.a=a} +function MKc(a){this.a=a} +function $Kc(a){this.a=a} +function cLc(a){this.a=a} +function jLc(a){this.a=a} +function rLc(a){this.a=a} +function xLc(a){this.a=a} +function OMc(a){this.a=a} +function ZOc(a){this.a=a} +function ZRc(a){this.a=a} +function aSc(a){this.a=a} +function I$c(a){this.a=a} +function K$c(a){this.a=a} +function M$c(a){this.a=a} +function O$c(a){this.a=a} +function U$c(a){this.a=a} +function n1c(a){this.a=a} +function z1c(a){this.a=a} +function B1c(a){this.a=a} +function Q2c(a){this.a=a} +function U2c(a){this.a=a} +function z3c(a){this.a=a} +function med(a){this.a=a} +function Xed(a){this.a=a} +function _ed(a){this.a=a} +function Qfd(a){this.a=a} +function Bgd(a){this.a=a} +function $gd(a){this.a=a} +function lrd(a){this.a=a} +function urd(a){this.a=a} +function vrd(a){this.a=a} +function wrd(a){this.a=a} +function xrd(a){this.a=a} +function yrd(a){this.a=a} +function zrd(a){this.a=a} +function Ard(a){this.a=a} +function Brd(a){this.a=a} +function Crd(a){this.a=a} +function Ird(a){this.a=a} +function Krd(a){this.a=a} +function Lrd(a){this.a=a} +function Mrd(a){this.a=a} +function Nrd(a){this.a=a} +function Prd(a){this.a=a} +function Srd(a){this.a=a} +function Yrd(a){this.a=a} +function Zrd(a){this.a=a} +function _rd(a){this.a=a} +function asd(a){this.a=a} +function bsd(a){this.a=a} +function csd(a){this.a=a} +function dsd(a){this.a=a} +function msd(a){this.a=a} +function osd(a){this.a=a} +function qsd(a){this.a=a} +function ssd(a){this.a=a} +function Wsd(a){this.a=a} +function Lsd(a){this.b=a} +function thd(a){this.f=a} +function qtd(a){this.a=a} +function yBd(a){this.a=a} +function GBd(a){this.a=a} +function MBd(a){this.a=a} +function SBd(a){this.a=a} +function iCd(a){this.a=a} +function YMd(a){this.a=a} +function GNd(a){this.a=a} +function EPd(a){this.a=a} +function EQd(a){this.a=a} +function NTd(a){this.a=a} +function qOd(a){this.b=a} +function lVd(a){this.c=a} +function VVd(a){this.e=a} +function iYd(a){this.a=a} +function RYd(a){this.a=a} +function ZYd(a){this.a=a} +function z0d(a){this.a=a} +function O0d(a){this.a=a} +function s0d(a){this.d=a} +function W5d(a){this.a=a} +function cge(a){this.a=a} +function xfe(a){this.e=a} +function Tfd(){this.a=0} +function jkb(){Vjb(this)} +function Rkb(){Ckb(this)} +function Lqb(){Uhb(this)} +function lEb(){kEb(this)} +function A_b(){s_b(this)} +function UQd(){this.c=FQd} +function v6d(a,b){b.Wb(a)} +function moc(a,b){a.b+=b} +function yXb(a){a.b=new Ji} +function vbb(a){return a.e} +function DB(a){return a.a} +function LB(a){return a.a} +function ZB(a){return a.a} +function lC(a){return a.a} +function EC(a){return a.a} +function wC(){return null} +function SB(){return null} +function hcb(){mvd();ovd()} +function zJb(a){a.b.tf(a.e)} +function j5b(a,b){a.b=b-a.b} +function g5b(a,b){a.a=b-a.a} +function PXc(a,b){b.ad(a.a)} +function plc(a,b){G0b(b,a)} +function hp(a,b,c){a.Od(c,b)} +function As(a,b){a.e=b;b.b=a} +function Zl(a){Ql();this.a=a} +function jq(a){Ql();this.a=a} +function sq(a){Ql();this.a=a} +function Fq(a){im();this.a=a} +function Sz(a){Rz();Qz.be(a)} +function gz(){Xy.call(this)} +function xcb(){Xy.call(this)} +function pcb(){gz.call(this)} +function tcb(){gz.call(this)} +function Bdb(){gz.call(this)} +function Vdb(){gz.call(this)} +function Ydb(){gz.call(this)} +function Geb(){gz.call(this)} +function bgb(){gz.call(this)} +function Apb(){gz.call(this)} +function Jpb(){gz.call(this)} +function utb(){gz.call(this)} +function x2c(){gz.call(this)} +function rQd(){this.a=this} +function MPd(){this.Bb|=256} +function tTb(){this.b=new mt} +function fA(){fA=ccb;new Lqb} +function rcb(){pcb.call(this)} +function dCb(a,b){a.length=b} +function Tvb(a,b){Ekb(a.a,b)} +function sKb(a,b){UHb(a.c,b)} +function SMc(a,b){Qqb(a.b,b)} +function vBd(a,b){uAd(a.a,b)} +function wBd(a,b){vAd(a.a,b)} +function GLd(a,b){Uhd(a.e,b)} +function d7d(a){D2d(a.c,a.b)} +function mj(a,b){a.kc().Nb(b)} +function Odb(a){this.a=Tdb(a)} +function Tqb(){this.a=new Lqb} +function gyb(){this.a=new Lqb} +function Wvb(){this.a=new Rkb} +function KFb(){this.a=new Rkb} +function PFb(){this.a=new Rkb} +function FFb(){this.a=new yFb} +function pGb(){this.a=new MFb} +function ZQb(){this.a=new MQb} +function Gxb(){this.a=new Pwb} +function jUb(){this.a=new PTb} +function sDb(){this.a=new oDb} +function zDb(){this.a=new tDb} +function CWb(){this.a=new Rkb} +function HXb(){this.a=new Rkb} +function nYb(){this.a=new Rkb} +function BYb(){this.a=new Rkb} +function fLb(){this.d=new Rkb} +function vYb(){this.a=new Tqb} +function a2b(){this.a=new Lqb} +function wZb(){this.b=new Lqb} +function TCc(){this.b=new Rkb} +function zJc(){this.e=new Rkb} +function uMc(){this.d=new Rkb} +function wdc(){this.a=new xkc} +function vKc(){Rkb.call(this)} +function twb(){Wvb.call(this)} +function oHb(){$Gb.call(this)} +function LXb(){HXb.call(this)} +function L_b(){H_b.call(this)} +function H_b(){A_b.call(this)} +function p0b(){A_b.call(this)} +function s0b(){p0b.call(this)} +function WMc(){VMc.call(this)} +function bNc(){VMc.call(this)} +function EPc(){CPc.call(this)} +function JPc(){CPc.call(this)} +function OPc(){CPc.call(this)} +function w1c(){s1c.call(this)} +function s7c(){Psb.call(this)} +function apd(){Ald.call(this)} +function ppd(){Ald.call(this)} +function lDd(){YCd.call(this)} +function NDd(){YCd.call(this)} +function mFd(){Lqb.call(this)} +function vFd(){Lqb.call(this)} +function GFd(){Lqb.call(this)} +function KPd(){Tqb.call(this)} +function OJd(){hJd.call(this)} +function aQd(){MPd.call(this)} +function SSd(){FId.call(this)} +function rUd(){FId.call(this)} +function oUd(){Lqb.call(this)} +function NYd(){Lqb.call(this)} +function cZd(){Lqb.call(this)} +function R8d(){MGd.call(this)} +function o9d(){MGd.call(this)} +function i9d(){R8d.call(this)} +function hee(){ude.call(this)} +function Dd(a){yd.call(this,a)} +function Hd(a){yd.call(this,a)} +function ph(a){lh.call(this,a)} +function Sh(a){Wc.call(this,a)} +function oi(a){Sh.call(this,a)} +function Ii(a){Wc.call(this,a)} +function Zdd(){this.a=new Psb} +function CPc(){this.a=new Tqb} +function s1c(){this.a=new Lqb} +function QSc(){this.a=new Rkb} +function D2c(){this.j=new Rkb} +function QXc(){this.a=new UXc} +function e_c(){this.a=new d_c} +function YCd(){this.a=new aDd} +function _k(){_k=ccb;$k=new al} +function Lk(){Lk=ccb;Kk=new Mk} +function wb(){wb=ccb;vb=new xb} +function hs(){hs=ccb;gs=new is} +function rs(a){Sh.call(this,a)} +function Gp(a){Sh.call(this,a)} +function xp(a){Lo.call(this,a)} +function Ep(a){Lo.call(this,a)} +function Tp(a){Wn.call(this,a)} +function wx(a){un.call(this,a)} +function ov(a){dv.call(this,a)} +function Mv(a){Br.call(this,a)} +function Ov(a){Br.call(this,a)} +function Lw(a){Br.call(this,a)} +function hz(a){Yy.call(this,a)} +function MB(a){hz.call(this,a)} +function eC(){fC.call(this,{})} +function Ftb(a){Atb();this.a=a} +function zwb(a){a.b=null;a.c=0} +function Vy(a,b){a.e=b;Sy(a,b)} +function LVb(a,b){a.a=b;NVb(a)} +function lIb(a,b,c){a.a[b.g]=c} +function vfd(a,b,c){Dfd(c,a,b)} +function Odc(a,b){rjc(b.i,a.n)} +function Wyc(a,b){Xyc(a).td(b)} +function ERb(a,b){return a*a/b} +function Xr(a,b){return a.g-b.g} +function tC(a){return new TB(a)} +function vC(a){return new yC(a)} +function ocb(a){hz.call(this,a)} +function qcb(a){hz.call(this,a)} +function ucb(a){hz.call(this,a)} +function vcb(a){Yy.call(this,a)} +function fGc(a){LFc();this.a=a} +function c0d(a){kzd();this.a=a} +function bhd(a){Rgd();this.f=a} +function dhd(a){Rgd();this.f=a} +function Cdb(a){hz.call(this,a)} +function Wdb(a){hz.call(this,a)} +function Zdb(a){hz.call(this,a)} +function Feb(a){hz.call(this,a)} +function Heb(a){hz.call(this,a)} +function Ccb(a){return uCb(a),a} +function Edb(a){return uCb(a),a} +function Gdb(a){return uCb(a),a} +function jfb(a){return uCb(a),a} +function tfb(a){return uCb(a),a} +function akb(a){return a.b==a.c} +function Hwb(a){return !!a&&a.b} +function pIb(a){return !!a&&a.k} +function qIb(a){return !!a&&a.j} +function amb(a){uCb(a);this.a=a} +function wVb(a){qVb(a);return a} +function Blb(a){Glb(a,a.length)} +function cgb(a){hz.call(this,a)} +function cqd(a){hz.call(this,a)} +function n8d(a){hz.call(this,a)} +function y2c(a){hz.call(this,a)} +function z2c(a){hz.call(this,a)} +function mde(a){hz.call(this,a)} +function pc(a){qc.call(this,a,0)} +function Ji(){Ki.call(this,12,3)} +function Kz(){Kz=ccb;Jz=new Nz} +function jz(){jz=ccb;iz=new nb} +function KA(){KA=ccb;JA=new MA} +function OB(){OB=ccb;NB=new PB} +function jc(){throw vbb(new bgb)} +function zh(){throw vbb(new bgb)} +function Pi(){throw vbb(new bgb)} +function Pj(){throw vbb(new bgb)} +function Qj(){throw vbb(new bgb)} +function Ym(){throw vbb(new bgb)} +function Gb(){this.a=GD(Qb(She))} +function oy(a){Ql();this.a=Qb(a)} +function Bs(a,b){a.Td(b);b.Sd(a)} +function iw(a,b){a.a.ec().Mc(b)} +function CYb(a,b,c){a.c.lf(b,c)} +function scb(a){qcb.call(this,a)} +function Oeb(a){Wdb.call(this,a)} +function Hfb(){mcb.call(this,'')} +function Ifb(){mcb.call(this,'')} +function Ufb(){mcb.call(this,'')} +function Vfb(){mcb.call(this,'')} +function Xfb(a){qcb.call(this,a)} +function zob(a){lnb.call(this,a)} +function Yob(a){Inb.call(this,a)} +function Gob(a){zob.call(this,a)} +function Mk(){Fk.call(this,null)} +function al(){Fk.call(this,null)} +function Az(){Az=ccb;!!(Rz(),Qz)} +function wrb(){wrb=ccb;vrb=yrb()} +function Mtb(a){return a.a?a.b:0} +function Vtb(a){return a.a?a.b:0} +function Lcb(a,b){return a.a-b.a} +function Wcb(a,b){return a.a-b.a} +function Peb(a,b){return a.a-b.a} +function eCb(a,b){return PC(a,b)} +function GC(a,b){return rdb(a,b)} +function _B(b,a){return a in b.a} +function _Db(a,b){a.f=b;return a} +function ZDb(a,b){a.b=b;return a} +function $Db(a,b){a.c=b;return a} +function aEb(a,b){a.g=b;return a} +function HGb(a,b){a.a=b;return a} +function IGb(a,b){a.f=b;return a} +function JGb(a,b){a.k=b;return a} +function dLb(a,b){a.a=b;return a} +function eLb(a,b){a.e=b;return a} +function zVb(a,b){a.e=b;return a} +function AVb(a,b){a.f=b;return a} +function KOb(a,b){a.b=true;a.d=b} +function DHb(a,b){a.b=new g7c(b)} +function uvb(a,b,c){b.td(a.a[c])} +function zvb(a,b,c){b.we(a.a[c])} +function wJc(a,b){return a.b-b.b} +function kOc(a,b){return a.g-b.g} +function WQc(a,b){return a.s-b.s} +function Lic(a,b){return a?0:b-1} +function SFc(a,b){return a?0:b-1} +function RFc(a,b){return a?b-1:0} +function M2c(a,b){return b.Yf(a)} +function M3c(a,b){a.b=b;return a} +function L3c(a,b){a.a=b;return a} +function N3c(a,b){a.c=b;return a} +function O3c(a,b){a.d=b;return a} +function P3c(a,b){a.e=b;return a} +function Q3c(a,b){a.f=b;return a} +function b4c(a,b){a.a=b;return a} +function c4c(a,b){a.b=b;return a} +function d4c(a,b){a.c=b;return a} +function z5c(a,b){a.c=b;return a} +function y5c(a,b){a.b=b;return a} +function A5c(a,b){a.d=b;return a} +function B5c(a,b){a.e=b;return a} +function C5c(a,b){a.f=b;return a} +function D5c(a,b){a.g=b;return a} +function E5c(a,b){a.a=b;return a} +function F5c(a,b){a.i=b;return a} +function G5c(a,b){a.j=b;return a} +function Vdd(a,b){a.k=b;return a} +function Wdd(a,b){a.j=b;return a} +function ykc(a,b){gkc();F0b(b,a)} +function T$c(a,b,c){R$c(a.a,b,c)} +function RGc(a){cEc.call(this,a)} +function iHc(a){cEc.call(this,a)} +function t7c(a){Qsb.call(this,a)} +function aPb(a){_Ob.call(this,a)} +function Ixd(a){zud.call(this,a)} +function dCd(a){ZBd.call(this,a)} +function fCd(a){ZBd.call(this,a)} +function p_b(){q_b.call(this,'')} +function d7c(){this.a=0;this.b=0} +function aPc(){this.b=0;this.a=0} +function NJd(a,b){a.b=0;DId(a,b)} +function X1d(a,b){a.c=b;a.b=true} +function Oc(a,b){return a.c._b(b)} +function gdb(a){return a.e&&a.e()} +function Vd(a){return !a?null:a.d} +function sn(a,b){return Gv(a.b,b)} +function Fv(a){return !a?null:a.g} +function Kv(a){return !a?null:a.i} +function hdb(a){fdb(a);return a.o} +function Fhd(){Fhd=ccb;Ehd=ond()} +function Hhd(){Hhd=ccb;Ghd=Cod()} +function LFd(){LFd=ccb;KFd=qZd()} +function p8d(){p8d=ccb;o8d=Y9d()} +function r8d(){r8d=ccb;q8d=dae()} +function mvd(){mvd=ccb;lvd=n4c()} +function Srb(){throw vbb(new bgb)} +function enb(){throw vbb(new bgb)} +function fnb(){throw vbb(new bgb)} +function gnb(){throw vbb(new bgb)} +function jnb(){throw vbb(new bgb)} +function Cnb(){throw vbb(new bgb)} +function Uqb(a){this.a=new Mqb(a)} +function tgb(a){lgb();ngb(this,a)} +function Hxb(a){this.a=new Qwb(a)} +function _ub(a,b){while(a.ye(b));} +function Sub(a,b){while(a.sd(b));} +function Bfb(a,b){a.a+=b;return a} +function Cfb(a,b){a.a+=b;return a} +function Ffb(a,b){a.a+=b;return a} +function Lfb(a,b){a.a+=b;return a} +function WAb(a){Tzb(a);return a.a} +function Wsb(a){return a.b!=a.d.c} +function pD(a){return a.l|a.m<<22} +function aIc(a,b){return a.d[b.p]} +function h2c(a,b){return c2c(a,b)} +function cCb(a,b,c){a.splice(b,c)} +function WHb(a){a.c?VHb(a):XHb(a)} +function jVc(a){this.a=0;this.b=a} +function ZUc(){this.a=new L2c(K$)} +function tRc(){this.b=new L2c(h$)} +function Q$c(){this.b=new L2c(J_)} +function d_c(){this.b=new L2c(J_)} +function OCd(){throw vbb(new bgb)} +function PCd(){throw vbb(new bgb)} +function QCd(){throw vbb(new bgb)} +function RCd(){throw vbb(new bgb)} +function SCd(){throw vbb(new bgb)} +function TCd(){throw vbb(new bgb)} +function UCd(){throw vbb(new bgb)} +function VCd(){throw vbb(new bgb)} +function WCd(){throw vbb(new bgb)} +function XCd(){throw vbb(new bgb)} +function ahe(){throw vbb(new utb)} +function bhe(){throw vbb(new utb)} +function Rge(a){this.a=new ege(a)} +function ege(a){dge(this,a,Vee())} +function Fhe(a){return !a||Ehe(a)} +function dde(a){return $ce[a]!=-1} +function Iz(){xz!=0&&(xz=0);zz=-1} +function Ybb(){Wbb==null&&(Wbb=[])} +function ONd(a,b){Rxd(ZKd(a.a),b)} +function TNd(a,b){Rxd(ZKd(a.a),b)} +function Yf(a,b){zf.call(this,a,b)} +function $f(a,b){Yf.call(this,a,b)} +function Hf(a,b){this.b=a;this.c=b} +function rk(a,b){this.b=a;this.a=b} +function ek(a,b){this.a=a;this.b=b} +function gk(a,b){this.a=a;this.b=b} +function pk(a,b){this.a=a;this.b=b} +function yk(a,b){this.a=a;this.b=b} +function Ak(a,b){this.a=a;this.b=b} +function Fj(a,b){this.a=a;this.b=b} +function _j(a,b){this.a=a;this.b=b} +function dr(a,b){this.a=a;this.b=b} +function zr(a,b){this.b=a;this.a=b} +function So(a,b){this.b=a;this.a=b} +function qp(a,b){this.b=a;this.a=b} +function $q(a,b){this.b=a;this.a=b} +function $r(a,b){this.f=a;this.g=b} +function ne(a,b){this.e=a;this.d=b} +function Wo(a,b){this.g=a;this.i=b} +function bu(a,b){this.a=a;this.b=b} +function qu(a,b){this.a=a;this.f=b} +function qv(a,b){this.b=a;this.c=b} +function ox(a,b){this.a=a;this.b=b} +function Px(a,b){this.a=a;this.b=b} +function mC(a,b){this.a=a;this.b=b} +function Wc(a){Lb(a.dc());this.c=a} +function rf(a){this.b=BD(Qb(a),83)} +function Zv(a){this.a=BD(Qb(a),83)} +function dv(a){this.a=BD(Qb(a),15)} +function $u(a){this.a=BD(Qb(a),15)} +function Br(a){this.b=BD(Qb(a),47)} +function eB(){this.q=new $wnd.Date} +function Zfb(){Zfb=ccb;Yfb=new jcb} +function Emb(){Emb=ccb;Dmb=new Fmb} +function Vhb(a){return a.f.c+a.g.c} +function hnb(a,b){return a.b.Hc(b)} +function inb(a,b){return a.b.Ic(b)} +function knb(a,b){return a.b.Qc(b)} +function Dob(a,b){return a.b.Hc(b)} +function dob(a,b){return a.c.uc(b)} +function Rqb(a,b){return a.a._b(b)} +function fob(a,b){return pb(a.c,b)} +function jt(a,b){return Mhb(a.b,b)} +function Lp(a,b){return a>b&&b0} +function Gbb(a,b){return ybb(a,b)<0} +function Crb(a,b){return a.a.get(b)} +function icb(b,a){return a.split(b)} +function Vrb(a,b){return Mhb(a.e,b)} +function Nvb(a){return uCb(a),false} +function Rub(a){Kub.call(this,a,21)} +function wcb(a,b){Zy.call(this,a,b)} +function mxb(a,b){$r.call(this,a,b)} +function Gyb(a,b){$r.call(this,a,b)} +function zx(a){yx();Wn.call(this,a)} +function zlb(a,b){Dlb(a,a.length,b)} +function Alb(a,b){Flb(a,a.length,b)} +function ABb(a,b,c){b.ud(a.a.Ge(c))} +function uBb(a,b,c){b.we(a.a.Fe(c))} +function GBb(a,b,c){b.td(a.a.Kb(c))} +function Zq(a,b,c){a.Mb(c)&&b.td(c)} +function aCb(a,b,c){a.splice(b,0,c)} +function lDb(a,b){return uqb(a.e,b)} +function pjb(a,b){this.d=a;this.e=b} +function kqb(a,b){this.b=a;this.a=b} +function VBb(a,b){this.b=a;this.a=b} +function BEb(a,b){this.b=a;this.a=b} +function sBb(a,b){this.a=a;this.b=b} +function yBb(a,b){this.a=a;this.b=b} +function EBb(a,b){this.a=a;this.b=b} +function KBb(a,b){this.a=a;this.b=b} +function aDb(a,b){this.a=a;this.b=b} +function tMb(a,b){this.b=a;this.a=b} +function oOb(a,b){this.b=a;this.a=b} +function SOb(a,b){$r.call(this,a,b)} +function SMb(a,b){$r.call(this,a,b)} +function NEb(a,b){$r.call(this,a,b)} +function VEb(a,b){$r.call(this,a,b)} +function sFb(a,b){$r.call(this,a,b)} +function hHb(a,b){$r.call(this,a,b)} +function OHb(a,b){$r.call(this,a,b)} +function FIb(a,b){$r.call(this,a,b)} +function wLb(a,b){$r.call(this,a,b)} +function YRb(a,b){$r.call(this,a,b)} +function zTb(a,b){$r.call(this,a,b)} +function rUb(a,b){$r.call(this,a,b)} +function oWb(a,b){$r.call(this,a,b)} +function SXb(a,b){$r.call(this,a,b)} +function k0b(a,b){$r.call(this,a,b)} +function z5b(a,b){$r.call(this,a,b)} +function T8b(a,b){$r.call(this,a,b)} +function ibc(a,b){$r.call(this,a,b)} +function Cec(a,b){this.a=a;this.b=b} +function rfc(a,b){this.a=a;this.b=b} +function Rfc(a,b){this.a=a;this.b=b} +function Tfc(a,b){this.a=a;this.b=b} +function bgc(a,b){this.a=a;this.b=b} +function ngc(a,b){this.a=a;this.b=b} +function Qhc(a,b){this.a=a;this.b=b} +function $hc(a,b){this.a=a;this.b=b} +function Z0b(a,b){this.a=a;this.b=b} +function ZVb(a,b){this.b=a;this.a=b} +function Dfc(a,b){this.b=a;this.a=b} +function dgc(a,b){this.b=a;this.a=b} +function Bmc(a,b){this.b=a;this.a=b} +function cWb(a,b){this.c=a;this.d=b} +function I$b(a,b){this.e=a;this.d=b} +function Unc(a,b){this.a=a;this.b=b} +function Oic(a,b){this.b=b;this.c=a} +function Bjc(a,b){$r.call(this,a,b)} +function Yjc(a,b){$r.call(this,a,b)} +function Gkc(a,b){$r.call(this,a,b)} +function Bpc(a,b){$r.call(this,a,b)} +function Jpc(a,b){$r.call(this,a,b)} +function Tpc(a,b){$r.call(this,a,b)} +function cqc(a,b){$r.call(this,a,b)} +function oqc(a,b){$r.call(this,a,b)} +function yqc(a,b){$r.call(this,a,b)} +function Hqc(a,b){$r.call(this,a,b)} +function Uqc(a,b){$r.call(this,a,b)} +function arc(a,b){$r.call(this,a,b)} +function mrc(a,b){$r.call(this,a,b)} +function zrc(a,b){$r.call(this,a,b)} +function Prc(a,b){$r.call(this,a,b)} +function Yrc(a,b){$r.call(this,a,b)} +function fsc(a,b){$r.call(this,a,b)} +function nsc(a,b){$r.call(this,a,b)} +function nzc(a,b){$r.call(this,a,b)} +function zzc(a,b){$r.call(this,a,b)} +function Kzc(a,b){$r.call(this,a,b)} +function Xzc(a,b){$r.call(this,a,b)} +function Dtc(a,b){$r.call(this,a,b)} +function lAc(a,b){$r.call(this,a,b)} +function uAc(a,b){$r.call(this,a,b)} +function CAc(a,b){$r.call(this,a,b)} +function LAc(a,b){$r.call(this,a,b)} +function UAc(a,b){$r.call(this,a,b)} +function aBc(a,b){$r.call(this,a,b)} +function uBc(a,b){$r.call(this,a,b)} +function DBc(a,b){$r.call(this,a,b)} +function MBc(a,b){$r.call(this,a,b)} +function sGc(a,b){$r.call(this,a,b)} +function VIc(a,b){$r.call(this,a,b)} +function EIc(a,b){this.b=a;this.a=b} +function qKc(a,b){this.a=a;this.b=b} +function GKc(a,b){this.a=a;this.b=b} +function lLc(a,b){this.a=a;this.b=b} +function mMc(a,b){this.a=a;this.b=b} +function fMc(a,b){$r.call(this,a,b)} +function ZLc(a,b){$r.call(this,a,b)} +function ZMc(a,b){this.b=a;this.d=b} +function IOc(a,b){$r.call(this,a,b)} +function GQc(a,b){$r.call(this,a,b)} +function PQc(a,b){this.a=a;this.b=b} +function RQc(a,b){this.a=a;this.b=b} +function ARc(a,b){$r.call(this,a,b)} +function rSc(a,b){$r.call(this,a,b)} +function TTc(a,b){$r.call(this,a,b)} +function _Tc(a,b){$r.call(this,a,b)} +function RUc(a,b){$r.call(this,a,b)} +function uVc(a,b){$r.call(this,a,b)} +function hWc(a,b){$r.call(this,a,b)} +function rWc(a,b){$r.call(this,a,b)} +function kXc(a,b){$r.call(this,a,b)} +function uXc(a,b){$r.call(this,a,b)} +function AYc(a,b){$r.call(this,a,b)} +function l$c(a,b){$r.call(this,a,b)} +function Z$c(a,b){$r.call(this,a,b)} +function D_c(a,b){$r.call(this,a,b)} +function O_c(a,b){$r.call(this,a,b)} +function c1c(a,b){$r.call(this,a,b)} +function cVb(a,b){return uqb(a.c,b)} +function nnc(a,b){return uqb(b.b,a)} +function x1c(a,b){return -a.b.Je(b)} +function D3c(a,b){return uqb(a.g,b)} +function O5c(a,b){$r.call(this,a,b)} +function a6c(a,b){$r.call(this,a,b)} +function m2c(a,b){this.a=a;this.b=b} +function W2c(a,b){this.a=a;this.b=b} +function f7c(a,b){this.a=a;this.b=b} +function G7c(a,b){$r.call(this,a,b)} +function j8c(a,b){$r.call(this,a,b)} +function iad(a,b){$r.call(this,a,b)} +function rad(a,b){$r.call(this,a,b)} +function Bad(a,b){$r.call(this,a,b)} +function Nad(a,b){$r.call(this,a,b)} +function ibd(a,b){$r.call(this,a,b)} +function tbd(a,b){$r.call(this,a,b)} +function Ibd(a,b){$r.call(this,a,b)} +function Ubd(a,b){$r.call(this,a,b)} +function gcd(a,b){$r.call(this,a,b)} +function scd(a,b){$r.call(this,a,b)} +function Ycd(a,b){$r.call(this,a,b)} +function udd(a,b){$r.call(this,a,b)} +function Jdd(a,b){$r.call(this,a,b)} +function Eed(a,b){$r.call(this,a,b)} +function bfd(a,b){this.a=a;this.b=b} +function dfd(a,b){this.a=a;this.b=b} +function ffd(a,b){this.a=a;this.b=b} +function Kfd(a,b){this.a=a;this.b=b} +function Mfd(a,b){this.a=a;this.b=b} +function Ofd(a,b){this.a=a;this.b=b} +function vgd(a,b){this.a=a;this.b=b} +function qgd(a,b){$r.call(this,a,b)} +function jrd(a,b){this.a=a;this.b=b} +function krd(a,b){this.a=a;this.b=b} +function mrd(a,b){this.a=a;this.b=b} +function nrd(a,b){this.a=a;this.b=b} +function qrd(a,b){this.a=a;this.b=b} +function rrd(a,b){this.a=a;this.b=b} +function srd(a,b){this.b=a;this.a=b} +function trd(a,b){this.b=a;this.a=b} +function Drd(a,b){this.b=a;this.a=b} +function Frd(a,b){this.b=a;this.a=b} +function Hrd(a,b){this.a=a;this.b=b} +function Jrd(a,b){this.a=a;this.b=b} +function Ord(a,b){Xqd(a.a,BD(b,56))} +function BIc(a,b){gIc(a.a,BD(b,11))} +function fIc(a,b){FHc();return b!=a} +function Arb(){wrb();return new vrb} +function CMc(){wMc();this.b=new Tqb} +function NNc(){FNc();this.a=new Tqb} +function eCc(){ZBc();aCc.call(this)} +function Dsd(a,b){$r.call(this,a,b)} +function Urd(a,b){this.a=a;this.b=b} +function Wrd(a,b){this.a=a;this.b=b} +function kGd(a,b){this.a=a;this.b=b} +function nGd(a,b){this.a=a;this.b=b} +function bUd(a,b){this.a=a;this.b=b} +function zVd(a,b){this.a=a;this.b=b} +function C1d(a,b){this.d=a;this.b=b} +function MLd(a,b){this.d=a;this.e=b} +function Wud(a,b){this.f=a;this.c=b} +function f7d(a,b){this.b=a;this.c=b} +function _zd(a,b){this.i=a;this.g=b} +function Y1d(a,b){this.e=a;this.a=b} +function c8d(a,b){this.a=a;this.b=b} +function $Id(a,b){a.i=null;_Id(a,b)} +function ivd(a,b){!!a&&Rhb(cvd,a,b)} +function hCd(a,b){return qAd(a.a,b)} +function e7d(a){return R2d(a.c,a.b)} +function Wd(a){return !a?null:a.dd()} +function PD(a){return a==null?null:a} +function KD(a){return typeof a===Khe} +function LD(a){return typeof a===Lhe} +function ND(a){return typeof a===Mhe} +function Em(a,b){return a.Hd().Xb(b)} +function Kq(a,b){return hr(a.Kc(),b)} +function Bbb(a,b){return ybb(a,b)==0} +function Ebb(a,b){return ybb(a,b)>=0} +function Kbb(a,b){return ybb(a,b)!=0} +function Jdb(a){return ''+(uCb(a),a)} +function pfb(a,b){return a.substr(b)} +function cg(a){ag(a);return a.d.gc()} +function oVb(a){pVb(a,a.c);return a} +function RD(a){CCb(a==null);return a} +function Dfb(a,b){a.a+=''+b;return a} +function Efb(a,b){a.a+=''+b;return a} +function Nfb(a,b){a.a+=''+b;return a} +function Pfb(a,b){a.a+=''+b;return a} +function Qfb(a,b){a.a+=''+b;return a} +function Mfb(a,b){return a.a+=''+b,a} +function Esb(a,b){Gsb(a,b,a.a,a.a.a)} +function Fsb(a,b){Gsb(a,b,a.c.b,a.c)} +function Mqd(a,b,c){Rpd(b,kqd(a,c))} +function Nqd(a,b,c){Rpd(b,kqd(a,c))} +function Dhe(a,b){Hhe(new Fyd(a),b)} +function cB(a,b){a.q.setTime(Sbb(b))} +function fvb(a,b){bvb.call(this,a,b)} +function jvb(a,b){bvb.call(this,a,b)} +function nvb(a,b){bvb.call(this,a,b)} +function Nqb(a){Uhb(this);Ld(this,a)} +function wmb(a){tCb(a,0);return null} +function X6c(a){a.a=0;a.b=0;return a} +function f3c(a,b){a.a=b.g+1;return a} +function PJc(a,b){return a.j[b.p]==2} +function _Pb(a){return VPb(BD(a,79))} +function yJb(){yJb=ccb;xJb=as(wJb())} +function Y8b(){Y8b=ccb;X8b=as(W8b())} +function mt(){this.b=new Mqb(Cv(12))} +function Otb(){this.b=0;this.a=false} +function Wtb(){this.b=0;this.a=false} +function sl(a){this.a=a;ol.call(this)} +function vl(a){this.a=a;ol.call(this)} +function Nsd(a,b){Msd.call(this,a,b)} +function $zd(a,b){Cyd.call(this,a,b)} +function nNd(a,b){_zd.call(this,a,b)} +function s4d(a,b){p4d.call(this,a,b)} +function w4d(a,b){qRd.call(this,a,b)} +function rEd(a,b){pEd();Rhb(oEd,a,b)} +function lcb(a,b){return qfb(a.a,0,b)} +function ww(a,b){return a.a.a.a.cc(b)} +function mb(a,b){return PD(a)===PD(b)} +function Mdb(a,b){return Kdb(a.a,b.a)} +function $db(a,b){return beb(a.a,b.a)} +function seb(a,b){return ueb(a.a,b.a)} +function hfb(a,b){return a.indexOf(b)} +function Ny(a,b){return a==b?0:a?1:-1} +function kB(a){return a<10?'0'+a:''+a} +function Mq(a){return Qb(a),new sl(a)} +function SC(a){return TC(a.l,a.m,a.h)} +function Hdb(a){return QD((uCb(a),a))} +function Idb(a){return QD((uCb(a),a))} +function NIb(a,b){return beb(a.g,b.g)} +function Fbb(a){return typeof a===Lhe} +function mWb(a){return a==hWb||a==kWb} +function nWb(a){return a==hWb||a==iWb} +function G1b(a){return Jkb(a.b.b,a,0)} +function lrb(a){this.a=Arb();this.b=a} +function Frb(a){this.a=Arb();this.b=a} +function swb(a,b){Ekb(a.a,b);return b} +function Z1c(a,b){Ekb(a.c,b);return a} +function E2c(a,b){d3c(a.a,b);return a} +function _gc(a,b){Hgc();return b.a+=a} +function bhc(a,b){Hgc();return b.a+=a} +function ahc(a,b){Hgc();return b.c+=a} +function Nlb(a,b){Klb(a,0,a.length,b)} +function zsb(){Wqb.call(this,new $rb)} +function I_b(){B_b.call(this,0,0,0,0)} +function I6c(){J6c.call(this,0,0,0,0)} +function g7c(a){this.a=a.a;this.b=a.b} +function fad(a){return a==aad||a==bad} +function gad(a){return a==dad||a==_9c} +function Jzc(a){return a==Fzc||a==Ezc} +function fcd(a){return a!=bcd&&a!=ccd} +function oid(a){return a.Lg()&&a.Mg()} +function Gfd(a){return Kkd(BD(a,118))} +function k3c(a){return d3c(new j3c,a)} +function y2d(a,b){return new p4d(b,a)} +function z2d(a,b){return new p4d(b,a)} +function ukd(a,b,c){vkd(a,b);wkd(a,c)} +function _kd(a,b,c){cld(a,b);ald(a,c)} +function bld(a,b,c){dld(a,b);eld(a,c)} +function gmd(a,b,c){hmd(a,b);imd(a,c)} +function nmd(a,b,c){omd(a,b);pmd(a,c)} +function iKd(a,b){$Jd(a,b);_Jd(a,a.D)} +function _ud(a){Wud.call(this,a,true)} +function Xg(a,b,c){Vg.call(this,a,b,c)} +function Ygb(a){Hgb();Zgb.call(this,a)} +function rxb(){mxb.call(this,'Head',1)} +function wxb(){mxb.call(this,'Tail',3)} +function Ckb(a){a.c=KC(SI,Uhe,1,0,5,1)} +function Vjb(a){a.a=KC(SI,Uhe,1,8,5,1)} +function MGb(a){Hkb(a.xf(),new QGb(a))} +function xtb(a){return a!=null?tb(a):0} +function b2b(a,b){return ntd(b,mpd(a))} +function c2b(a,b){return ntd(b,mpd(a))} +function dAb(a,b){return a[a.length]=b} +function gAb(a,b){return a[a.length]=b} +function Vq(a){return lr(a.b.Kc(),a.a)} +function dqd(a,b){return _o(qo(a.d),b)} +function eqd(a,b){return _o(qo(a.g),b)} +function fqd(a,b){return _o(qo(a.j),b)} +function Osd(a,b){Msd.call(this,a.b,b)} +function q0b(a){B_b.call(this,a,a,a,a)} +function HOb(a){a.b&&LOb(a);return a.a} +function IOb(a){a.b&&LOb(a);return a.c} +function uyb(a,b){if(lyb){return}a.b=b} +function lzd(a,b,c){NC(a,b,c);return c} +function mBc(a,b,c){NC(a.c[b.g],b.g,c)} +function _Hd(a,b,c){BD(a.c,69).Xh(b,c)} +function wfd(a,b,c){bld(c,c.i+a,c.j+b)} +function UOd(a,b){wtd(VKd(a.a),XOd(b))} +function bTd(a,b){wtd(QSd(a.a),eTd(b))} +function Lge(a){wfe();xfe.call(this,a)} +function CAd(a){return a==null?0:tb(a)} +function fNc(){fNc=ccb;eNc=new Rpb(v1)} +function h0d(){h0d=ccb;new i0d;new Rkb} +function i0d(){new Lqb;new Lqb;new Lqb} +function GA(){GA=ccb;fA();FA=new Lqb} +function Iy(){Iy=ccb;$wnd.Math.log(2)} +function UVd(){UVd=ccb;TVd=(AFd(),zFd)} +function _ge(){throw vbb(new cgb(Cxe))} +function ohe(){throw vbb(new cgb(Cxe))} +function che(){throw vbb(new cgb(Dxe))} +function rhe(){throw vbb(new cgb(Dxe))} +function Mg(a){this.a=a;Gg.call(this,a)} +function up(a){this.a=a;rf.call(this,a)} +function Bp(a){this.a=a;rf.call(this,a)} +function Okb(a,b){Mlb(a.c,a.c.length,b)} +function llb(a){return a.ab?1:0} +function Deb(a,b){return ybb(a,b)>0?a:b} +function TC(a,b,c){return {l:a,m:b,h:c}} +function Ctb(a,b){a.a!=null&&BIc(b,a.a)} +function Csb(a){a.a=new jtb;a.c=new jtb} +function hDb(a){this.b=a;this.a=new Rkb} +function dOb(a){this.b=new pOb;this.a=a} +function q_b(a){n_b.call(this);this.a=a} +function txb(){mxb.call(this,'Range',2)} +function bUb(){ZTb();this.a=new L2c(zP)} +function Bh(a,b){Qb(b);Ah(a).Jc(new Vw)} +function fKc(a,b){FJc();return b.n.b+=a} +function Tgc(a,b,c){return Rhb(a.g,c,b)} +function LJc(a,b,c){return Rhb(a.k,c,b)} +function r1c(a,b){return Rhb(a.a,b.a,b)} +function jBc(a,b,c){return hBc(b,c,a.c)} +function E6c(a){return new f7c(a.c,a.d)} +function F6c(a){return new f7c(a.c,a.d)} +function R6c(a){return new f7c(a.a,a.b)} +function CQd(a,b){return hA(a.a,b,null)} +function fec(a){QZb(a,null);RZb(a,null)} +function AOc(a){BOc(a,null);COc(a,null)} +function u4d(){qRd.call(this,null,null)} +function y4d(){RRd.call(this,null,null)} +function a7d(a){this.a=a;Lqb.call(this)} +function Pp(a){this.b=(mmb(),new iob(a))} +function Py(a){a.j=KC(VI,nie,310,0,0,1)} +function oAd(a,b,c){a.c.Vc(b,BD(c,133))} +function GAd(a,b,c){a.c.ji(b,BD(c,133))} +function JLd(a,b){Uxd(a);a.Gc(BD(b,15))} +function b7d(a,b){return t2d(a.c,a.b,b)} +function Bv(a,b){return new Qv(a.Kc(),b)} +function Lq(a,b){return rr(a.Kc(),b)!=-1} +function Sqb(a,b){return a.a.Bc(b)!=null} +function pr(a){return a.Ob()?a.Pb():null} +function yfb(a){return zfb(a,0,a.length)} +function JD(a,b){return a!=null&&AD(a,b)} +function $A(a,b){a.q.setHours(b);YA(a,b)} +function Yrb(a,b){if(a.c){jsb(b);isb(b)}} +function nk(a,b,c){BD(a.Kb(c),164).Nb(b)} +function RJc(a,b,c){SJc(a,b,c);return c} +function Eub(a,b,c){a.a=b^1502;a.b=c^kke} +function xHb(a,b,c){return a.a[b.g][c.g]} +function REc(a,b){return a.a[b.c.p][b.p]} +function aEc(a,b){return a.e[b.c.p][b.p]} +function tEc(a,b){return a.c[b.c.p][b.p]} +function OJc(a,b){return a.j[b.p]=aKc(b)} +function k5c(a,b){return cfb(a.f,b.tg())} +function Isd(a,b){return cfb(a.b,b.tg())} +function Sfd(a,b){return a.a0?b*b/a:b*b*100} +function CRb(a,b){return a>0?b/(a*a):b*100} +function G2c(a,b,c){return Ekb(b,I2c(a,c))} +function t3c(a,b,c){p3c();a.Xe(b)&&c.td(a)} +function St(a,b,c){var d;d=a.Zc(b);d.Rb(c)} +function O6c(a,b,c){a.a+=b;a.b+=c;return a} +function Z6c(a,b,c){a.a*=b;a.b*=c;return a} +function b7c(a,b,c){a.a-=b;a.b-=c;return a} +function a7c(a,b){a.a=b.a;a.b=b.b;return a} +function V6c(a){a.a=-a.a;a.b=-a.b;return a} +function Dic(a){this.c=a;this.a=1;this.b=1} +function xed(a){this.c=a;dld(a,0);eld(a,0)} +function u7c(a){Psb.call(this);n7c(this,a)} +function AXb(a){xXb();yXb(this);this.mf(a)} +function GRd(a,b){nRd();qRd.call(this,a,b)} +function dSd(a,b){LRd();RRd.call(this,a,b)} +function hSd(a,b){LRd();RRd.call(this,a,b)} +function fSd(a,b){LRd();dSd.call(this,a,b)} +function sId(a,b,c){dId.call(this,a,b,c,2)} +function zXd(a,b){UVd();nXd.call(this,a,b)} +function BXd(a,b){UVd();zXd.call(this,a,b)} +function DXd(a,b){UVd();zXd.call(this,a,b)} +function FXd(a,b){UVd();DXd.call(this,a,b)} +function PXd(a,b){UVd();nXd.call(this,a,b)} +function RXd(a,b){UVd();PXd.call(this,a,b)} +function XXd(a,b){UVd();nXd.call(this,a,b)} +function pAd(a,b){return a.c.Fc(BD(b,133))} +function w1d(a,b,c){return V1d(p1d(a,b),c)} +function N2d(a,b,c){return b.Qk(a.e,a.c,c)} +function P2d(a,b,c){return b.Rk(a.e,a.c,c)} +function a3d(a,b){return xid(a.e,BD(b,49))} +function aTd(a,b,c){vtd(QSd(a.a),b,eTd(c))} +function TOd(a,b,c){vtd(VKd(a.a),b,XOd(c))} +function ypb(a,b){b.$modCount=a.$modCount} +function MUc(){MUc=ccb;LUc=new Lsd('root')} +function LCd(){LCd=ccb;KCd=new lDd;new NDd} +function KVc(){this.a=new Hp;this.b=new Hp} +function FUd(){hJd.call(this);this.Bb|=Tje} +function t_c(){$r.call(this,'GROW_TREE',0)} +function C9d(a){return a==null?null:cde(a)} +function G9d(a){return a==null?null:jde(a)} +function J9d(a){return a==null?null:fcb(a)} +function K9d(a){return a==null?null:fcb(a)} +function fdb(a){if(a.o!=null){return}vdb(a)} +function DD(a){CCb(a==null||KD(a));return a} +function ED(a){CCb(a==null||LD(a));return a} +function GD(a){CCb(a==null||ND(a));return a} +function gB(a){this.q=new $wnd.Date(Sbb(a))} +function Mf(a,b){this.c=a;ne.call(this,a,b)} +function Sf(a,b){this.a=a;Mf.call(this,a,b)} +function Hg(a,b){this.d=a;Dg(this);this.b=b} +function bAb(a,b){Vzb.call(this,a);this.a=b} +function vAb(a,b){Vzb.call(this,a);this.a=b} +function sNb(a){pNb.call(this,0,0);this.f=a} +function Vg(a,b,c){dg.call(this,a,b,c,null)} +function Yg(a,b,c){dg.call(this,a,b,c,null)} +function Pxb(a,b,c){return a.ue(b,c)<=0?c:b} +function Qxb(a,b,c){return a.ue(b,c)<=0?b:c} +function g4c(a,b){return BD(Wrb(a.b,b),149)} +function i4c(a,b){return BD(Wrb(a.c,b),229)} +function wic(a){return BD(Ikb(a.a,a.b),287)} +function B6c(a){return new f7c(a.c,a.d+a.a)} +function eLc(a){return FJc(),Jzc(BD(a,197))} +function $Jb(){$Jb=ccb;ZJb=pqb((tdd(),sdd))} +function fOb(a,b){b.a?gOb(a,b):Fxb(a.a,b.b)} +function qyb(a,b){if(lyb){return}Ekb(a.a,b)} +function F2b(a,b){x2b();return f_b(b.d.i,a)} +function _9b(a,b){I9b();return new gac(b,a)} +function _Hb(a,b){ytb(b,lle);a.f=b;return a} +function Kld(a,b,c){c=_hd(a,b,3,c);return c} +function bmd(a,b,c){c=_hd(a,b,6,c);return c} +function kpd(a,b,c){c=_hd(a,b,9,c);return c} +function Cvd(a,b,c){++a.j;a.Ki();Atd(a,b,c)} +function Avd(a,b,c){++a.j;a.Hi(b,a.oi(b,c))} +function bRd(a,b,c){var d;d=a.Zc(b);d.Rb(c)} +function c7d(a,b,c){return C2d(a.c,a.b,b,c)} +function DAd(a,b){return (b&Ohe)%a.d.length} +function Msd(a,b){Lsd.call(this,a);this.a=b} +function uVd(a,b){lVd.call(this,a);this.a=b} +function sYd(a,b){lVd.call(this,a);this.a=b} +function zyd(a,b){this.c=a;zud.call(this,b)} +function YOd(a,b){this.a=a;qOd.call(this,b)} +function fTd(a,b){this.a=a;qOd.call(this,b)} +function Xp(a){this.a=(Xj(a,Jie),new Skb(a))} +function cq(a){this.a=(Xj(a,Jie),new Skb(a))} +function LA(a){!a.a&&(a.a=new VA);return a.a} +function XMb(a){if(a>8){return 0}return a+1} +function Ecb(a,b){Bcb();return a==b?0:a?1:-1} +function Opb(a,b,c){return Npb(a,BD(b,22),c)} +function Bz(a,b,c){return a.apply(b,c);var d} +function Sfb(a,b,c){a.a+=zfb(b,0,c);return a} +function ijb(a,b){var c;c=a.e;a.e=b;return c} +function trb(a,b){var c;c=a[hke];c.call(a,b)} +function urb(a,b){var c;c=a[hke];c.call(a,b)} +function Aib(a,b){a.a.Vc(a.b,b);++a.b;a.c=-1} +function Urb(a){Uhb(a.e);a.d.b=a.d;a.d.a=a.d} +function _f(a){a.b?_f(a.b):a.f.c.zc(a.e,a.d)} +function _Ab(a,b,c){EAb();MBb(a,b.Ce(a.a,c))} +function Bxb(a,b){return Vd(Cwb(a.a,b,true))} +function Cxb(a,b){return Vd(Dwb(a.a,b,true))} +function _Bb(a,b){return eCb(new Array(b),a)} +function HD(a){return String.fromCharCode(a)} +function mz(a){return a==null?null:a.message} +function gRb(){this.a=new Rkb;this.b=new Rkb} +function iTb(){this.a=new MQb;this.b=new tTb} +function tDb(){this.b=new d7c;this.c=new Rkb} +function _Qb(){this.d=new d7c;this.e=new d7c} +function n_b(){this.n=new d7c;this.o=new d7c} +function $Gb(){this.n=new p0b;this.i=new I6c} +function sec(){this.a=new Umc;this.b=new mnc} +function NIc(){this.a=new Rkb;this.d=new Rkb} +function LDc(){this.b=new Tqb;this.a=new Tqb} +function hSc(){this.b=new Lqb;this.a=new Lqb} +function HRc(){this.b=new tRc;this.a=new hRc} +function aHb(){$Gb.call(this);this.a=new d7c} +function Ywb(a){Zwb.call(this,a,(lxb(),hxb))} +function J_b(a,b,c,d){B_b.call(this,a,b,c,d)} +function sqd(a,b,c){c!=null&&kmd(b,Wqd(a,c))} +function tqd(a,b,c){c!=null&&lmd(b,Wqd(a,c))} +function Tod(a,b,c){c=_hd(a,b,11,c);return c} +function P6c(a,b){a.a+=b.a;a.b+=b.b;return a} +function c7c(a,b){a.a-=b.a;a.b-=b.b;return a} +function u7b(a,b){return a.n.a=(uCb(b),b)+10} +function v7b(a,b){return a.n.a=(uCb(b),b)+10} +function dLd(a,b){return b==a||pud(UKd(b),a)} +function PYd(a,b){return Rhb(a.a,b,'')==null} +function E2b(a,b){x2b();return !f_b(b.d.i,a)} +function rjc(a,b){fad(a.f)?sjc(a,b):tjc(a,b)} +function h1d(a,b){var c;c=b.Hh(a.a);return c} +function Cyd(a,b){qcb.call(this,gve+a+mue+b)} +function gUd(a,b,c,d){cUd.call(this,a,b,c,d)} +function Q4d(a,b,c,d){cUd.call(this,a,b,c,d)} +function U4d(a,b,c,d){Q4d.call(this,a,b,c,d)} +function n5d(a,b,c,d){i5d.call(this,a,b,c,d)} +function p5d(a,b,c,d){i5d.call(this,a,b,c,d)} +function v5d(a,b,c,d){i5d.call(this,a,b,c,d)} +function t5d(a,b,c,d){p5d.call(this,a,b,c,d)} +function A5d(a,b,c,d){p5d.call(this,a,b,c,d)} +function y5d(a,b,c,d){v5d.call(this,a,b,c,d)} +function D5d(a,b,c,d){A5d.call(this,a,b,c,d)} +function d6d(a,b,c,d){Y5d.call(this,a,b,c,d)} +function Vp(a,b,c){this.a=a;qc.call(this,b,c)} +function tk(a,b,c){this.c=b;this.b=c;this.a=a} +function ik(a,b,c){return a.d=BD(b.Kb(c),164)} +function j6d(a,b){return a.Aj().Nh().Kh(a,b)} +function h6d(a,b){return a.Aj().Nh().Ih(a,b)} +function Fdb(a,b){return uCb(a),PD(a)===PD(b)} +function dfb(a,b){return uCb(a),PD(a)===PD(b)} +function Dxb(a,b){return Vd(Cwb(a.a,b,false))} +function Exb(a,b){return Vd(Dwb(a.a,b,false))} +function vBb(a,b){return a.b.sd(new yBb(a,b))} +function BBb(a,b){return a.b.sd(new EBb(a,b))} +function HBb(a,b){return a.b.sd(new KBb(a,b))} +function lfb(a,b,c){return a.lastIndexOf(b,c)} +function uTb(a,b,c){return Kdb(a[b.b],a[c.b])} +function RTb(a,b){return yNb(b,(Nyc(),Cwc),a)} +function fmc(a,b){return beb(b.a.d.p,a.a.d.p)} +function emc(a,b){return beb(a.a.d.p,b.a.d.p)} +function _Oc(a,b){return Kdb(a.c-a.s,b.c-b.s)} +function S_b(a){return !a.c?-1:Jkb(a.c.a,a,0)} +function Vxd(a){return a<100?null:new Ixd(a)} +function ecd(a){return a==Zbd||a==_bd||a==$bd} +function zAd(a,b){return JD(b,15)&&Btd(a.c,b)} +function vyb(a,b){if(lyb){return}!!b&&(a.d=b)} +function ujb(a,b){var c;c=b;return !!Awb(a,c)} +function czd(a,b){this.c=a;Pyd.call(this,a,b)} +function fBb(a){this.c=a;nvb.call(this,rie,0)} +function Avb(a,b){Bvb.call(this,a,a.length,b)} +function aId(a,b,c){return BD(a.c,69).lk(b,c)} +function bId(a,b,c){return BD(a.c,69).mk(b,c)} +function O2d(a,b,c){return N2d(a,BD(b,332),c)} +function Q2d(a,b,c){return P2d(a,BD(b,332),c)} +function i3d(a,b,c){return h3d(a,BD(b,332),c)} +function k3d(a,b,c){return j3d(a,BD(b,332),c)} +function tn(a,b){return b==null?null:Hv(a.b,b)} +function Kcb(a){return LD(a)?(uCb(a),a):a.ke()} +function Ldb(a){return !isNaN(a)&&!isFinite(a)} +function Wn(a){Ql();this.a=(mmb(),new zob(a))} +function dIc(a){FHc();this.d=a;this.a=new jkb} +function xqb(a,b,c){this.a=a;this.b=b;this.c=c} +function Nrb(a,b,c){this.a=a;this.b=b;this.c=c} +function $sb(a,b,c){this.d=a;this.b=c;this.a=b} +function Qsb(a){Csb(this);Osb(this);ye(this,a)} +function Tkb(a){Ckb(this);bCb(this.c,0,a.Pc())} +function Xwb(a){uib(a.a);Kwb(a.c,a.b);a.b=null} +function iyb(a){this.a=a;Zfb();Cbb(Date.now())} +function JCb(){JCb=ccb;GCb=new nb;ICb=new nb} +function ntb(){ntb=ccb;ltb=new otb;mtb=new qtb} +function kzd(){kzd=ccb;jzd=KC(SI,Uhe,1,0,5,1)} +function tGd(){tGd=ccb;sGd=KC(SI,Uhe,1,0,5,1)} +function $Gd(){$Gd=ccb;ZGd=KC(SI,Uhe,1,0,5,1)} +function Ql(){Ql=ccb;new Zl((mmb(),mmb(),jmb))} +function pxb(a){lxb();return es((zxb(),yxb),a)} +function Hyb(a){Fyb();return es((Kyb(),Jyb),a)} +function OEb(a){MEb();return es((REb(),QEb),a)} +function WEb(a){UEb();return es((ZEb(),YEb),a)} +function tFb(a){rFb();return es((wFb(),vFb),a)} +function iHb(a){gHb();return es((lHb(),kHb),a)} +function PHb(a){NHb();return es((SHb(),RHb),a)} +function GIb(a){EIb();return es((JIb(),IIb),a)} +function vJb(a){qJb();return es((yJb(),xJb),a)} +function xLb(a){vLb();return es((ALb(),zLb),a)} +function TMb(a){RMb();return es((WMb(),VMb),a)} +function TOb(a){ROb();return es((WOb(),VOb),a)} +function ePb(a){cPb();return es((hPb(),gPb),a)} +function ZRb(a){XRb();return es((aSb(),_Rb),a)} +function ATb(a){yTb();return es((DTb(),CTb),a)} +function sUb(a){qUb();return es((vUb(),uUb),a)} +function rWb(a){lWb();return es((uWb(),tWb),a)} +function TXb(a){RXb();return es((WXb(),VXb),a)} +function Mb(a,b){if(!a){throw vbb(new Wdb(b))}} +function l0b(a){j0b();return es((o0b(),n0b),a)} +function r0b(a){B_b.call(this,a.d,a.c,a.a,a.b)} +function K_b(a){B_b.call(this,a.d,a.c,a.a,a.b)} +function mKb(a,b,c){this.b=a;this.c=b;this.a=c} +function BZb(a,b,c){this.b=a;this.a=b;this.c=c} +function TNb(a,b,c){this.a=a;this.b=b;this.c=c} +function uOb(a,b,c){this.a=a;this.b=b;this.c=c} +function S3b(a,b,c){this.a=a;this.b=b;this.c=c} +function Z6b(a,b,c){this.a=a;this.b=b;this.c=c} +function n9b(a,b,c){this.b=a;this.a=b;this.c=c} +function x$b(a,b,c){this.e=b;this.b=a;this.d=c} +function $Ab(a,b,c){EAb();a.a.Od(b,c);return b} +function LGb(a){var b;b=new KGb;b.e=a;return b} +function iLb(a){var b;b=new fLb;b.b=a;return b} +function D6b(){D6b=ccb;B6b=new M6b;C6b=new P6b} +function Hgc(){Hgc=ccb;Fgc=new ghc;Ggc=new ihc} +function jbc(a){gbc();return es((mbc(),lbc),a)} +function Cjc(a){Ajc();return es((Fjc(),Ejc),a)} +function Clc(a){Alc();return es((Flc(),Elc),a)} +function Cpc(a){Apc();return es((Fpc(),Epc),a)} +function Kpc(a){Ipc();return es((Npc(),Mpc),a)} +function Wpc(a){Rpc();return es((Zpc(),Ypc),a)} +function $jc(a){Xjc();return es((bkc(),akc),a)} +function Hkc(a){Fkc();return es((Kkc(),Jkc),a)} +function dqc(a){bqc();return es((gqc(),fqc),a)} +function rqc(a){mqc();return es((uqc(),tqc),a)} +function zqc(a){xqc();return es((Cqc(),Bqc),a)} +function Iqc(a){Gqc();return es((Lqc(),Kqc),a)} +function Vqc(a){Sqc();return es((Yqc(),Xqc),a)} +function brc(a){_qc();return es((erc(),drc),a)} +function nrc(a){lrc();return es((qrc(),prc),a)} +function Arc(a){yrc();return es((Drc(),Crc),a)} +function Qrc(a){Orc();return es((Trc(),Src),a)} +function Zrc(a){Xrc();return es((asc(),_rc),a)} +function gsc(a){esc();return es((jsc(),isc),a)} +function osc(a){msc();return es((rsc(),qsc),a)} +function Etc(a){Ctc();return es((Htc(),Gtc),a)} +function qzc(a){lzc();return es((tzc(),szc),a)} +function Azc(a){xzc();return es((Dzc(),Czc),a)} +function Mzc(a){Izc();return es((Pzc(),Ozc),a)} +function MAc(a){KAc();return es((PAc(),OAc),a)} +function mAc(a){kAc();return es((pAc(),oAc),a)} +function vAc(a){tAc();return es((yAc(),xAc),a)} +function DAc(a){BAc();return es((GAc(),FAc),a)} +function VAc(a){TAc();return es((YAc(),XAc),a)} +function $zc(a){Vzc();return es((bAc(),aAc),a)} +function bBc(a){_Ac();return es((eBc(),dBc),a)} +function vBc(a){tBc();return es((yBc(),xBc),a)} +function EBc(a){CBc();return es((HBc(),GBc),a)} +function NBc(a){LBc();return es((QBc(),PBc),a)} +function tGc(a){rGc();return es((wGc(),vGc),a)} +function WIc(a){UIc();return es((ZIc(),YIc),a)} +function $Lc(a){YLc();return es((bMc(),aMc),a)} +function gMc(a){eMc();return es((jMc(),iMc),a)} +function JOc(a){HOc();return es((MOc(),LOc),a)} +function HQc(a){FQc();return es((KQc(),JQc),a)} +function DRc(a){yRc();return es((GRc(),FRc),a)} +function tSc(a){qSc();return es((wSc(),vSc),a)} +function UTc(a){STc();return es((XTc(),WTc),a)} +function UUc(a){PUc();return es((XUc(),WUc),a)} +function aUc(a){$Tc();return es((dUc(),cUc),a)} +function wVc(a){tVc();return es((zVc(),yVc),a)} +function iWc(a){fWc();return es((lWc(),kWc),a)} +function sWc(a){pWc();return es((vWc(),uWc),a)} +function lXc(a){iXc();return es((oXc(),nXc),a)} +function vXc(a){sXc();return es((yXc(),xXc),a)} +function BYc(a){zYc();return es((EYc(),DYc),a)} +function m$c(a){k$c();return es((p$c(),o$c),a)} +function $$c(a){Y$c();return es((b_c(),a_c),a)} +function n_c(a){i_c();return es((q_c(),p_c),a)} +function w_c(a){s_c();return es((z_c(),y_c),a)} +function E_c(a){C_c();return es((H_c(),G_c),a)} +function P_c(a){N_c();return es((S_c(),R_c),a)} +function W0c(a){R0c();return es((Z0c(),Y0c),a)} +function f1c(a){a1c();return es((i1c(),h1c),a)} +function P5c(a){N5c();return es((S5c(),R5c),a)} +function b6c(a){_5c();return es((e6c(),d6c),a)} +function H7c(a){F7c();return es((K7c(),J7c),a)} +function k8c(a){i8c();return es((n8c(),m8c),a)} +function V8b(a){S8b();return es((Y8b(),X8b),a)} +function A5b(a){y5b();return es((D5b(),C5b),a)} +function jad(a){ead();return es((mad(),lad),a)} +function sad(a){qad();return es((vad(),uad),a)} +function Cad(a){Aad();return es((Fad(),Ead),a)} +function Oad(a){Mad();return es((Rad(),Qad),a)} +function jbd(a){hbd();return es((mbd(),lbd),a)} +function ubd(a){rbd();return es((xbd(),wbd),a)} +function Kbd(a){Hbd();return es((Nbd(),Mbd),a)} +function Vbd(a){Tbd();return es((Ybd(),Xbd),a)} +function hcd(a){dcd();return es((kcd(),jcd),a)} +function vcd(a){rcd();return es((ycd(),xcd),a)} +function vdd(a){tdd();return es((ydd(),xdd),a)} +function Kdd(a){Idd();return es((Ndd(),Mdd),a)} +function $cd(a){Ucd();return es((cdd(),bdd),a)} +function Fed(a){Ded();return es((Ied(),Hed),a)} +function rgd(a){pgd();return es((ugd(),tgd),a)} +function Esd(a){Csd();return es((Hsd(),Gsd),a)} +function Yoc(a,b){return (uCb(a),a)+(uCb(b),b)} +function NNd(a,b){Zfb();return wtd(ZKd(a.a),b)} +function SNd(a,b){Zfb();return wtd(ZKd(a.a),b)} +function bPc(a,b){this.c=a;this.a=b;this.b=b-a} +function nYc(a,b,c){this.a=a;this.b=b;this.c=c} +function L1c(a,b,c){this.a=a;this.b=b;this.c=c} +function T1c(a,b,c){this.a=a;this.b=b;this.c=c} +function Rrd(a,b,c){this.a=a;this.b=b;this.c=c} +function zCd(a,b,c){this.a=a;this.b=b;this.c=c} +function IVd(a,b,c){this.e=a;this.a=b;this.c=c} +function kWd(a,b,c){UVd();cWd.call(this,a,b,c)} +function HXd(a,b,c){UVd();oXd.call(this,a,b,c)} +function TXd(a,b,c){UVd();oXd.call(this,a,b,c)} +function ZXd(a,b,c){UVd();oXd.call(this,a,b,c)} +function JXd(a,b,c){UVd();HXd.call(this,a,b,c)} +function LXd(a,b,c){UVd();HXd.call(this,a,b,c)} +function NXd(a,b,c){UVd();LXd.call(this,a,b,c)} +function VXd(a,b,c){UVd();TXd.call(this,a,b,c)} +function _Xd(a,b,c){UVd();ZXd.call(this,a,b,c)} +function $j(a,b){Qb(a);Qb(b);return new _j(a,b)} +function Nq(a,b){Qb(a);Qb(b);return new Wq(a,b)} +function Rq(a,b){Qb(a);Qb(b);return new ar(a,b)} +function lr(a,b){Qb(a);Qb(b);return new zr(a,b)} +function BD(a,b){CCb(a==null||AD(a,b));return a} +function Nu(a){var b;b=new Rkb;fr(b,a);return b} +function Ex(a){var b;b=new Tqb;fr(b,a);return b} +function Hx(a){var b;b=new Gxb;Jq(b,a);return b} +function Ru(a){var b;b=new Psb;Jq(b,a);return b} +function YEc(a){!a.e&&(a.e=new Rkb);return a.e} +function SMd(a){!a.c&&(a.c=new xYd);return a.c} +function Ekb(a,b){a.c[a.c.length]=b;return true} +function WA(a,b){this.c=a;this.b=b;this.a=false} +function Gg(a){this.d=a;Dg(this);this.b=ed(a.d)} +function pzb(){this.a=';,;';this.b='';this.c=''} +function Bvb(a,b,c){qvb.call(this,b,c);this.a=a} +function fAb(a,b,c){this.b=a;fvb.call(this,b,c)} +function lsb(a,b,c){this.c=a;pjb.call(this,b,c)} +function bCb(a,b,c){$Bb(c,0,a,b,c.length,false)} +function HVb(a,b,c,d,e){a.b=b;a.c=c;a.d=d;a.a=e} +function eBb(a,b){if(b){a.b=b;a.a=(Tzb(b),b.a)}} +function v_b(a,b,c,d,e){a.d=b;a.c=c;a.a=d;a.b=e} +function h5b(a){var b,c;b=a.b;c=a.c;a.b=c;a.c=b} +function k5b(a){var b,c;c=a.d;b=a.a;a.d=b;a.a=c} +function Lbb(a){return zbb(iD(Fbb(a)?Rbb(a):a))} +function rlc(a,b){return beb(D0b(a.d),D0b(b.d))} +function uic(a,b){return b==(Ucd(),Tcd)?a.c:a.d} +function FHc(){FHc=ccb;DHc=(Ucd(),Tcd);EHc=zcd} +function DRb(){this.b=Edb(ED(Ksd((wSb(),vSb))))} +function aBb(a){return EAb(),KC(SI,Uhe,1,a,5,1)} +function C6c(a){return new f7c(a.c+a.b,a.d+a.a)} +function Vmc(a,b){Imc();return beb(a.d.p,b.d.p)} +function Lsb(a){sCb(a.b!=0);return Nsb(a,a.a.a)} +function Msb(a){sCb(a.b!=0);return Nsb(a,a.c.b)} +function rCb(a,b){if(!a){throw vbb(new ucb(b))}} +function mCb(a,b){if(!a){throw vbb(new Wdb(b))}} +function dWb(a,b,c){cWb.call(this,a,b);this.b=c} +function pMd(a,b,c){MLd.call(this,a,b);this.c=c} +function Dnc(a,b,c){Cnc.call(this,b,c);this.d=a} +function _Gd(a){$Gd();MGd.call(this);this.th(a)} +function PNd(a,b,c){this.a=a;nNd.call(this,b,c)} +function UNd(a,b,c){this.a=a;nNd.call(this,b,c)} +function k2d(a,b,c){MLd.call(this,a,b);this.c=c} +function y1d(){T0d();z1d.call(this,(yFd(),xFd))} +function gFd(a){return a!=null&&!OEd(a,CEd,DEd)} +function dFd(a,b){return (jFd(a)<<4|jFd(b))&aje} +function ln(a,b){return Vm(),Wj(a,b),new iy(a,b)} +function Sdd(a,b){var c;if(a.n){c=b;Ekb(a.f,c)}} +function Upd(a,b,c){var d;d=new yC(c);cC(a,b,d)} +function WUd(a,b){var c;c=a.c;VUd(a,b);return c} +function Ydd(a,b){b<0?(a.g=-1):(a.g=b);return a} +function $6c(a,b){W6c(a);a.a*=b;a.b*=b;return a} +function G6c(a,b,c,d,e){a.c=b;a.d=c;a.b=d;a.a=e} +function Dsb(a,b){Gsb(a,b,a.c.b,a.c);return true} +function jsb(a){a.a.b=a.b;a.b.a=a.a;a.a=a.b=null} +function Aq(a){this.b=a;this.a=Wm(this.b.a).Ed()} +function Wq(a,b){this.b=a;this.a=b;ol.call(this)} +function ar(a,b){this.a=a;this.b=b;ol.call(this)} +function vvb(a,b){qvb.call(this,b,1040);this.a=a} +function Eeb(a){return a==0||isNaN(a)?a:a<0?-1:1} +function WPb(a){QPb();return jtd(a)==Xod(ltd(a))} +function XPb(a){QPb();return ltd(a)==Xod(jtd(a))} +function iYb(a,b){return hYb(a,new cWb(b.a,b.b))} +function NZb(a){return !OZb(a)&&a.c.i.c==a.d.i.c} +function _Gb(a){var b;b=a.n;return a.a.b+b.d+b.a} +function YHb(a){var b;b=a.n;return a.e.b+b.d+b.a} +function ZHb(a){var b;b=a.n;return a.e.a+b.b+b.c} +function zfe(a){wfe();++vfe;return new ige(0,a)} +function o_b(a){if(a.a){return a.a}return JZb(a)} +function CCb(a){if(!a){throw vbb(new Cdb(null))}} +function X6d(){X6d=ccb;W6d=(mmb(),new anb(Fwe))} +function ex(){ex=ccb;new gx((_k(),$k),(Lk(),Kk))} +function oeb(){oeb=ccb;neb=KC(JI,nie,19,256,0,1)} +function d$c(a,b,c,d){e$c.call(this,a,b,c,d,0,0)} +function sQc(a,b,c){return Rhb(a.b,BD(c.b,17),b)} +function tQc(a,b,c){return Rhb(a.b,BD(c.b,17),b)} +function xfd(a,b){return Ekb(a,new f7c(b.a,b.b))} +function Bic(a,b){return a.c=b){throw vbb(new rcb)}} +function Pyb(a,b,c){NC(b,0,Bzb(b[0],c[0]));return b} +function _yc(a,b,c){b.Ye(c,Edb(ED(Ohb(a.b,c)))*a.a)} +function n6c(a,b,c){i6c();return m6c(a,b)&&m6c(a,c)} +function tcd(a){rcd();return !a.Hc(ncd)&&!a.Hc(pcd)} +function D6c(a){return new f7c(a.c+a.b/2,a.d+a.a/2)} +function oOd(a,b){return b.kh()?xid(a.b,BD(b,49)):b} +function bvb(a,b){this.e=a;this.d=(b&64)!=0?b|oie:b} +function qvb(a,b){this.c=0;this.d=a;this.b=b|64|oie} +function gub(a){this.b=new Skb(11);this.a=(ipb(),a)} +function Qwb(a){this.b=null;this.a=(ipb(),!a?fpb:a)} +function nHc(a){this.a=lHc(a.a);this.b=new Tkb(a.b)} +function Pzd(a){this.b=a;Oyd.call(this,a);Ozd(this)} +function Xzd(a){this.b=a;bzd.call(this,a);Wzd(this)} +function jUd(a,b,c){this.a=a;gUd.call(this,b,c,5,6)} +function Y5d(a,b,c,d){this.b=a;xMd.call(this,b,c,d)} +function nSd(a,b,c,d,e){oSd.call(this,a,b,c,d,e,-1)} +function DSd(a,b,c,d,e){ESd.call(this,a,b,c,d,e,-1)} +function cUd(a,b,c,d){xMd.call(this,a,b,c);this.b=d} +function i5d(a,b,c,d){pMd.call(this,a,b,c);this.b=d} +function x0d(a){Wud.call(this,a,false);this.a=false} +function Lj(a,b){this.b=a;sj.call(this,a.b);this.a=b} +function px(a,b){im();ox.call(this,a,Dm(new amb(b)))} +function Cfe(a,b){wfe();++vfe;return new Dge(a,b,0)} +function Efe(a,b){wfe();++vfe;return new Dge(6,a,b)} +function nfb(a,b){return dfb(a.substr(0,b.length),b)} +function Mhb(a,b){return ND(b)?Qhb(a,b):!!irb(a.f,b)} +function Rrb(a,b){uCb(b);while(a.Ob()){b.td(a.Pb())}} +function Vgb(a,b,c){Hgb();this.e=a;this.d=b;this.a=c} +function amc(a,b,c,d){var e;e=a.i;e.i=b;e.a=c;e.b=d} +function xJc(a){var b;b=a;while(b.f){b=b.f}return b} +function fkb(a){var b;b=bkb(a);sCb(b!=null);return b} +function gkb(a){var b;b=ckb(a);sCb(b!=null);return b} +function cv(a,b){var c;c=a.a.gc();Sb(b,c);return c-b} +function Glb(a,b){var c;for(c=0;c0?$wnd.Math.log(a/b):-100} +function ueb(a,b){return ybb(a,b)<0?-1:ybb(a,b)>0?1:0} +function HMb(a,b,c){return IMb(a,BD(b,46),BD(c,167))} +function iq(a,b){return BD(Rl(Wm(a.a)).Xb(b),42).cd()} +function Olb(a,b){return avb(b,a.length),new vvb(a,b)} +function Pyd(a,b){this.d=a;Fyd.call(this,a);this.e=b} +function Lub(a){this.d=(uCb(a),a);this.a=0;this.c=rie} +function rge(a,b){xfe.call(this,1);this.a=a;this.b=b} +function Rzb(a,b){!a.c?Ekb(a.b,b):Rzb(a.c,b);return a} +function uB(a,b,c){var d;d=tB(a,b);vB(a,b,c);return d} +function ZBb(a,b){var c;c=a.slice(0,b);return PC(c,a)} +function Flb(a,b,c){var d;for(d=0;d=a.g} +function NHc(a,b,c){var d;d=THc(a,b,c);return MHc(a,d)} +function Qpd(a,b){var c;c=a.a.length;tB(a,c);vB(a,c,b)} +function gCb(a,b){var c;c=console[a];c.call(console,b)} +function Bvd(a,b){var c;++a.j;c=a.Vi();a.Ii(a.oi(c,b))} +function E1c(a,b,c){BD(b.b,65);Hkb(b.a,new L1c(a,c,b))} +function oXd(a,b,c){VVd.call(this,b);this.a=a;this.b=c} +function Dge(a,b,c){xfe.call(this,a);this.a=b;this.b=c} +function dYd(a,b,c){this.a=a;lVd.call(this,b);this.b=c} +function f0d(a,b,c){this.a=a;mxd.call(this,8,b,null,c)} +function z1d(a){this.a=(uCb(Rve),Rve);this.b=a;new oUd} +function ct(a){this.c=a;this.b=this.c.a;this.a=this.c.e} +function usb(a){this.c=a;this.b=a.a.d.a;ypb(a.a.e,this)} +function uib(a){yCb(a.c!=-1);a.d.$c(a.c);a.b=a.c;a.c=-1} +function U6c(a){return $wnd.Math.sqrt(a.a*a.a+a.b*a.b)} +function Uvb(a,b){return _vb(b,a.a.c.length),Ikb(a.a,b)} +function Hb(a,b){return PD(a)===PD(b)||a!=null&&pb(a,b)} +function oAb(a){if(0>=a){return new yAb}return pAb(a-1)} +function Nfe(a){if(!bfe)return false;return Qhb(bfe,a)} +function Ehe(a){if(a)return a.dc();return !a.Kc().Ob()} +function Q_b(a){if(!a.a&&!!a.c){return a.c.b}return a.a} +function LHd(a){!a.a&&(a.a=new xMd(m5,a,4));return a.a} +function LQd(a){!a.d&&(a.d=new xMd(j5,a,1));return a.d} +function uCb(a){if(a==null){throw vbb(new Geb)}return a} +function Qzb(a){if(!a.c){a.d=true;Szb(a)}else{a.c.He()}} +function Tzb(a){if(!a.c){Uzb(a);a.d=true}else{Tzb(a.c)}} +function Kpb(a){Ae(a.a);a.b=KC(SI,Uhe,1,a.b.length,5,1)} +function qlc(a,b){return beb(b.j.c.length,a.j.c.length)} +function igd(a,b){a.c<0||a.b.b=0?a.Bh(c):vid(a,b)} +function WHc(a){var b,c;b=a.c.i.c;c=a.d.i.c;return b==c} +function Wwd(a){if(a.p!=4)throw vbb(new Ydb);return a.e} +function Vwd(a){if(a.p!=3)throw vbb(new Ydb);return a.e} +function Ywd(a){if(a.p!=6)throw vbb(new Ydb);return a.f} +function fxd(a){if(a.p!=6)throw vbb(new Ydb);return a.k} +function cxd(a){if(a.p!=3)throw vbb(new Ydb);return a.j} +function dxd(a){if(a.p!=4)throw vbb(new Ydb);return a.j} +function AYd(a){!a.b&&(a.b=new RYd(new NYd));return a.b} +function $1d(a){a.c==-2&&e2d(a,X0d(a.g,a.b));return a.c} +function pdb(a,b){var c;c=ldb('',a);c.n=b;c.i=1;return c} +function MNb(a,b){$Nb(BD(b.b,65),a);Hkb(b.a,new RNb(a))} +function Cnd(a,b){wtd((!a.a&&(a.a=new fTd(a,a)),a.a),b)} +function Qzd(a,b){this.b=a;Pyd.call(this,a,b);Ozd(this)} +function Yzd(a,b){this.b=a;czd.call(this,a,b);Wzd(this)} +function Ms(a,b,c,d){Wo.call(this,a,b);this.d=c;this.a=d} +function $o(a,b,c,d){Wo.call(this,a,c);this.a=b;this.f=d} +function iy(a,b){Pp.call(this,umb(Qb(a),Qb(b)));this.a=b} +function cae(){fod.call(this,Ewe,(p8d(),o8d));$9d(this)} +function AZd(){fod.call(this,_ve,(LFd(),KFd));uZd(this)} +function T0c(){$r.call(this,'DELAUNAY_TRIANGULATION',0)} +function vfb(a){return String.fromCharCode.apply(null,a)} +function Rhb(a,b,c){return ND(b)?Shb(a,b,c):jrb(a.f,b,c)} +function tmb(a){mmb();return !a?(ipb(),ipb(),hpb):a.ve()} +function d2c(a,b,c){Y1c();return c.pg(a,BD(b.cd(),146))} +function ix(a,b){ex();return new gx(new il(a),new Uk(b))} +function Iu(a){Xj(a,Mie);return Oy(wbb(wbb(5,a),a/10|0))} +function Vm(){Vm=ccb;Um=new wx(OC(GC(CK,1),zie,42,0,[]))} +function hob(a){!a.d&&(a.d=new lnb(a.c.Cc()));return a.d} +function eob(a){!a.a&&(a.a=new Gob(a.c.vc()));return a.a} +function gob(a){!a.b&&(a.b=new zob(a.c.ec()));return a.b} +function keb(a,b){while(b-->0){a=a<<1|(a<0?1:0)}return a} +function wtb(a,b){return PD(a)===PD(b)||a!=null&&pb(a,b)} +function Gbc(a,b){return Bcb(),BD(b.b,19).ad&&++d;return d} +function Nnd(a){var b,c;c=(b=new UQd,b);NQd(c,a);return c} +function Ond(a){var b,c;c=(b=new UQd,b);RQd(c,a);return c} +function hqd(a,b){var c;c=Ohb(a.f,b);Yqd(b,c);return null} +function JZb(a){var b;b=P2b(a);if(b){return b}return null} +function Wod(a){!a.b&&(a.b=new cUd(B2,a,12,3));return a.b} +function YEd(a){return a!=null&&hnb(GEd,a.toLowerCase())} +function ied(a,b){return Kdb(red(a)*qed(a),red(b)*qed(b))} +function jed(a,b){return Kdb(red(a)*qed(a),red(b)*qed(b))} +function wEb(a,b){return Kdb(a.d.c+a.d.b/2,b.d.c+b.d.b/2)} +function UVb(a,b){return Kdb(a.g.c+a.g.b/2,b.g.c+b.g.b/2)} +function pQb(a,b,c){c.a?eld(a,b.b-a.f/2):dld(a,b.a-a.g/2)} +function prd(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d} +function ord(a,b,c,d){this.a=a;this.b=b;this.c=c;this.d=d} +function JVd(a,b,c,d){this.e=a;this.a=b;this.c=c;this.d=d} +function ZVd(a,b,c,d){this.a=a;this.c=b;this.d=c;this.b=d} +function cXd(a,b,c,d){UVd();mWd.call(this,b,c,d);this.a=a} +function jXd(a,b,c,d){UVd();mWd.call(this,b,c,d);this.a=a} +function Ng(a,b){this.a=a;Hg.call(this,a,BD(a.d,15).Zc(b))} +function ZBd(a){this.f=a;this.c=this.f.e;a.f>0&&YBd(this)} +function lBb(a,b,c,d){this.b=a;this.c=d;nvb.call(this,b,c)} +function tib(a){sCb(a.b=0&&dfb(a.substr(c,b.length),b)} +function H2d(a,b,c,d,e,f,g){return new O7d(a.e,b,c,d,e,f,g)} +function Cxd(a,b,c,d,e,f){this.a=a;nxd.call(this,b,c,d,e,f)} +function vyd(a,b,c,d,e,f){this.a=a;nxd.call(this,b,c,d,e,f)} +function $Ec(a,b){this.g=a;this.d=OC(GC(OQ,1),kne,10,0,[b])} +function KVd(a,b){this.e=a;this.a=SI;this.b=R5d(b);this.c=b} +function cIb(a,b){$Gb.call(this);THb(this);this.a=a;this.c=b} +function kBc(a,b,c,d){NC(a.c[b.g],c.g,d);NC(a.c[c.g],b.g,d)} +function nBc(a,b,c,d){NC(a.c[b.g],b.g,c);NC(a.b[b.g],b.g,d)} +function cBc(){_Ac();return OC(GC(fX,1),Kie,376,0,[$Ac,ZAc])} +function crc(){_qc();return OC(GC(MW,1),Kie,479,0,[$qc,Zqc])} +function Aqc(){xqc();return OC(GC(JW,1),Kie,419,0,[vqc,wqc])} +function Lpc(){Ipc();return OC(GC(FW,1),Kie,422,0,[Gpc,Hpc])} +function psc(){msc();return OC(GC(SW,1),Kie,420,0,[ksc,lsc])} +function EAc(){BAc();return OC(GC(cX,1),Kie,421,0,[zAc,AAc])} +function XIc(){UIc();return OC(GC(mY,1),Kie,523,0,[TIc,SIc])} +function KOc(){HOc();return OC(GC(DZ,1),Kie,520,0,[GOc,FOc])} +function _Lc(){YLc();return OC(GC(fZ,1),Kie,516,0,[XLc,WLc])} +function hMc(){eMc();return OC(GC(gZ,1),Kie,515,0,[cMc,dMc])} +function IQc(){FQc();return OC(GC(YZ,1),Kie,455,0,[DQc,EQc])} +function bUc(){$Tc();return OC(GC(F$,1),Kie,425,0,[ZTc,YTc])} +function VTc(){STc();return OC(GC(E$,1),Kie,480,0,[QTc,RTc])} +function VUc(){PUc();return OC(GC(K$,1),Kie,495,0,[NUc,OUc])} +function jWc(){fWc();return OC(GC(X$,1),Kie,426,0,[dWc,eWc])} +function g1c(){a1c();return OC(GC(X_,1),Kie,429,0,[_0c,$0c])} +function F_c(){C_c();return OC(GC(P_,1),Kie,430,0,[B_c,A_c])} +function PEb(){MEb();return OC(GC(aN,1),Kie,428,0,[LEb,KEb])} +function XEb(){UEb();return OC(GC(bN,1),Kie,427,0,[SEb,TEb])} +function $Rb(){XRb();return OC(GC(gP,1),Kie,424,0,[VRb,WRb])} +function B5b(){y5b();return OC(GC(ZR,1),Kie,511,0,[x5b,w5b])} +function lid(a,b,c,d){return c>=0?a.jh(b,c,d):a.Sg(null,c,d)} +function hgd(a){if(a.b.b==0){return a.a.$e()}return Lsb(a.b)} +function Xwd(a){if(a.p!=5)throw vbb(new Ydb);return Tbb(a.f)} +function exd(a){if(a.p!=5)throw vbb(new Ydb);return Tbb(a.k)} +function pNd(a){PD(a.a)===PD((NKd(),MKd))&&qNd(a);return a.a} +function by(a){this.a=BD(Qb(a),271);this.b=(mmb(),new Zob(a))} +function bQc(a,b){$Pc(this,new f7c(a.a,a.b));_Pc(this,Ru(b))} +function FQc(){FQc=ccb;DQc=new GQc(jle,0);EQc=new GQc(kle,1)} +function YLc(){YLc=ccb;XLc=new ZLc(kle,0);WLc=new ZLc(jle,1)} +function Hp(){Gp.call(this,new Mqb(Cv(12)));Lb(true);this.a=2} +function Hge(a,b,c){wfe();xfe.call(this,a);this.b=b;this.a=c} +function cWd(a,b,c){UVd();VVd.call(this,b);this.a=a;this.b=c} +function aIb(a){$Gb.call(this);THb(this);this.a=a;this.c=true} +function isb(a){var b;b=a.c.d.b;a.b=b;a.a=a.c.d;b.a=a.c.d.b=a} +function $Cb(a){var b;NGb(a.a);MGb(a.a);b=new YGb(a.a);UGb(b)} +function iKb(a,b){hKb(a,true);Hkb(a.e.wf(),new mKb(a,true,b))} +function tlb(a,b){pCb(b);return vlb(a,KC(WD,oje,25,b,15,1),b)} +function YPb(a,b){QPb();return a==Xod(jtd(b))||a==Xod(ltd(b))} +function Phb(a,b){return b==null?Wd(irb(a.f,null)):Crb(a.g,b)} +function Ksb(a){return a.b==0?null:(sCb(a.b!=0),Nsb(a,a.a.a))} +function QD(a){return Math.max(Math.min(a,Ohe),-2147483648)|0} +function uz(a,b){var c=tz[a.charCodeAt(0)];return c==null?a:c} +function Cx(a,b){Rb(a,'set1');Rb(b,'set2');return new Px(a,b)} +function QUb(a,b){var c;c=zUb(a.f,b);return P6c(V6c(c),a.f.d)} +function Jwb(a,b){var c,d;c=b;d=new fxb;Lwb(a,c,d);return d.d} +function NJb(a,b,c,d){var e;e=new aHb;b.a[c.g]=e;Npb(a.b,d,e)} +function zid(a,b,c){var d;d=a.Yg(b);d>=0?a.sh(d,c):uid(a,b,c)} +function hvd(a,b,c){evd();!!a&&Rhb(dvd,a,b);!!a&&Rhb(cvd,a,c)} +function g_c(a,b,c){this.i=new Rkb;this.b=a;this.g=b;this.a=c} +function VZc(a,b,c){this.c=new Rkb;this.e=a;this.f=b;this.b=c} +function b$c(a,b,c){this.a=new Rkb;this.e=a;this.f=b;this.c=c} +function Zy(a,b){Py(this);this.f=b;this.g=a;Ry(this);this._d()} +function ZA(a,b){var c;c=a.q.getHours();a.q.setDate(b);YA(a,c)} +function no(a,b){var c;Qb(b);for(c=a.a;c;c=c.c){b.Od(c.g,c.i)}} +function Fx(a){var b;b=new Uqb(Cv(a.length));nmb(b,a);return b} +function ecb(a){function b(){} +;b.prototype=a||{};return new b} +function dkb(a,b){if(Zjb(a,b)){wkb(a);return true}return false} +function aC(a,b){if(b==null){throw vbb(new Geb)}return bC(a,b)} +function tdb(a){if(a.qe()){return null}var b=a.n;return _bb[b]} +function Mld(a){if(a.Db>>16!=3)return null;return BD(a.Cb,33)} +function mpd(a){if(a.Db>>16!=9)return null;return BD(a.Cb,33)} +function fmd(a){if(a.Db>>16!=6)return null;return BD(a.Cb,79)} +function Ind(a){if(a.Db>>16!=7)return null;return BD(a.Cb,235)} +function Fod(a){if(a.Db>>16!=7)return null;return BD(a.Cb,160)} +function Xod(a){if(a.Db>>16!=11)return null;return BD(a.Cb,33)} +function nid(a,b){var c;c=a.Yg(b);return c>=0?a.lh(c):tid(a,b)} +function Dtd(a,b){var c;c=new Bsb(b);Ve(c,a);return new Tkb(c)} +function Uud(a){var b;b=a.d;b=a.si(a.f);wtd(a,b);return b.Ob()} +function t_b(a,b){a.b+=b.b;a.c+=b.c;a.d+=b.d;a.a+=b.a;return a} +function A4b(a,b){return $wnd.Math.abs(a)<$wnd.Math.abs(b)?a:b} +function Zod(a){return !a.a&&(a.a=new cUd(E2,a,10,11)),a.a.i>0} +function oDb(){this.a=new zsb;this.e=new Tqb;this.g=0;this.i=0} +function BGc(a){this.a=a;this.b=KC(SX,nie,1944,a.e.length,0,2)} +function RHc(a,b,c){var d;d=SHc(a,b,c);a.b=new BHc(d.c.length)} +function eMc(){eMc=ccb;cMc=new fMc(vle,0);dMc=new fMc('UP',1)} +function STc(){STc=ccb;QTc=new TTc(Yqe,0);RTc=new TTc('FAN',1)} +function evd(){evd=ccb;dvd=new Lqb;cvd=new Lqb;ivd(hK,new jvd)} +function Swd(a){if(a.p!=0)throw vbb(new Ydb);return Kbb(a.f,0)} +function _wd(a){if(a.p!=0)throw vbb(new Ydb);return Kbb(a.k,0)} +function MHd(a){if(a.Db>>16!=3)return null;return BD(a.Cb,147)} +function ZJd(a){if(a.Db>>16!=6)return null;return BD(a.Cb,235)} +function WId(a){if(a.Db>>16!=17)return null;return BD(a.Cb,26)} +function rdb(a,b){var c=a.a=a.a||[];return c[b]||(c[b]=a.le(b))} +function hrb(a,b){var c;c=a.a.get(b);return c==null?new Array:c} +function aB(a,b){var c;c=a.q.getHours();a.q.setMonth(b);YA(a,c)} +function Shb(a,b,c){return b==null?jrb(a.f,null,c):Drb(a.g,b,c)} +function FLd(a,b,c,d,e,f){return new pSd(a.e,b,a.aj(),c,d,e,f)} +function Tfb(a,b,c){a.a=qfb(a.a,0,b)+(''+c)+pfb(a.a,b);return a} +function bq(a,b,c){Ekb(a.a,(Vm(),Wj(b,c),new Wo(b,c)));return a} +function uu(a){ot(a.c);a.e=a.a=a.c;a.c=a.c.c;++a.d;return a.a.f} +function vu(a){ot(a.e);a.c=a.a=a.e;a.e=a.e.e;--a.d;return a.a.f} +function RZb(a,b){!!a.d&&Lkb(a.d.e,a);a.d=b;!!a.d&&Ekb(a.d.e,a)} +function QZb(a,b){!!a.c&&Lkb(a.c.g,a);a.c=b;!!a.c&&Ekb(a.c.g,a)} +function $_b(a,b){!!a.c&&Lkb(a.c.a,a);a.c=b;!!a.c&&Ekb(a.c.a,a)} +function F0b(a,b){!!a.i&&Lkb(a.i.j,a);a.i=b;!!a.i&&Ekb(a.i.j,a)} +function jDb(a,b,c){this.a=b;this.c=a;this.b=(Qb(c),new Tkb(c))} +function qXb(a,b,c){this.a=b;this.c=a;this.b=(Qb(c),new Tkb(c))} +function aOb(a,b){this.a=a;this.c=R6c(this.a);this.b=new K6c(b)} +function IAb(a){var b;Uzb(a);b=new Tqb;return JAb(a,new jBb(b))} +function wCb(a,b){if(a<0||a>b){throw vbb(new qcb(Ake+a+Bke+b))}} +function Ppb(a,b){return vqb(a.a,b)?Qpb(a,BD(b,22).g,null):null} +function WUb(a){LUb();return Bcb(),BD(a.a,81).d.e!=0?true:false} +function qs(){qs=ccb;ps=as((hs(),OC(GC(yG,1),Kie,538,0,[gs])))} +function SBc(){SBc=ccb;RBc=c3c(new j3c,(qUb(),pUb),(S8b(),J8b))} +function ZBc(){ZBc=ccb;YBc=c3c(new j3c,(qUb(),pUb),(S8b(),J8b))} +function oCc(){oCc=ccb;nCc=c3c(new j3c,(qUb(),pUb),(S8b(),J8b))} +function aJc(){aJc=ccb;_Ic=e3c(new j3c,(qUb(),pUb),(S8b(),h8b))} +function FJc(){FJc=ccb;EJc=e3c(new j3c,(qUb(),pUb),(S8b(),h8b))} +function ILc(){ILc=ccb;HLc=e3c(new j3c,(qUb(),pUb),(S8b(),h8b))} +function wMc(){wMc=ccb;vMc=e3c(new j3c,(qUb(),pUb),(S8b(),h8b))} +function fUc(){fUc=ccb;eUc=c3c(new j3c,(yRc(),xRc),(qSc(),kSc))} +function DOc(a,b,c,d){this.c=a;this.d=d;BOc(this,b);COc(this,c)} +function W3c(a){this.c=new Psb;this.b=a.b;this.d=a.c;this.a=a.a} +function e7c(a){this.a=$wnd.Math.cos(a);this.b=$wnd.Math.sin(a)} +function BOc(a,b){!!a.a&&Lkb(a.a.k,a);a.a=b;!!a.a&&Ekb(a.a.k,a)} +function COc(a,b){!!a.b&&Lkb(a.b.f,a);a.b=b;!!a.b&&Ekb(a.b.f,a)} +function D1c(a,b){E1c(a,a.b,a.c);BD(a.b.b,65);!!b&&BD(b.b,65).b} +function BUd(a,b){CUd(a,b);JD(a.Cb,88)&&XMd($Kd(BD(a.Cb,88)),2)} +function cJd(a,b){JD(a.Cb,88)&&XMd($Kd(BD(a.Cb,88)),4);pnd(a,b)} +function lKd(a,b){JD(a.Cb,179)&&(BD(a.Cb,179).tb=null);pnd(a,b)} +function T2d(a,b){return Q6d(),YId(b)?new R7d(b,a):new f7d(b,a)} +function jsd(a,b){var c,d;c=b.c;d=c!=null;d&&Qpd(a,new yC(b.c))} +function XOd(a){var b,c;c=(LFd(),b=new UQd,b);NQd(c,a);return c} +function eTd(a){var b,c;c=(LFd(),b=new UQd,b);NQd(c,a);return c} +function yCc(a,b){var c;c=new H1b(a);b.c[b.c.length]=c;return c} +function Aw(a,b){var c;c=BD(Hv(nd(a.a),b),14);return !c?0:c.gc()} +function UAb(a){var b;Uzb(a);b=(ipb(),ipb(),gpb);return VAb(a,b)} +function nr(a){var b;while(true){b=a.Pb();if(!a.Ob()){return b}}} +function Ki(a,b){Ii.call(this,new Mqb(Cv(a)));Xj(b,mie);this.a=b} +function Jib(a,b,c){xCb(b,c,a.gc());this.c=a;this.a=b;this.b=c-b} +function Mkb(a,b,c){var d;xCb(b,c,a.c.length);d=c-b;cCb(a.c,b,d)} +function Fub(a,b){Eub(a,Tbb(xbb(Obb(b,24),nke)),Tbb(xbb(b,nke)))} +function tCb(a,b){if(a<0||a>=b){throw vbb(new qcb(Ake+a+Bke+b))}} +function BCb(a,b){if(a<0||a>=b){throw vbb(new Xfb(Ake+a+Bke+b))}} +function Kub(a,b){this.b=(uCb(a),a);this.a=(b&Rje)==0?b|64|oie:b} +function kkb(a){Vjb(this);dCb(this.a,geb($wnd.Math.max(8,a))<<1)} +function A0b(a){return l7c(OC(GC(m1,1),nie,8,0,[a.i.n,a.n,a.a]))} +function Iyb(){Fyb();return OC(GC(xL,1),Kie,132,0,[Cyb,Dyb,Eyb])} +function jHb(){gHb();return OC(GC(pN,1),Kie,232,0,[dHb,eHb,fHb])} +function QHb(){NHb();return OC(GC(sN,1),Kie,461,0,[LHb,KHb,MHb])} +function HIb(){EIb();return OC(GC(zN,1),Kie,462,0,[DIb,CIb,BIb])} +function UXb(){RXb();return OC(GC(hQ,1),Kie,423,0,[QXb,PXb,OXb])} +function BTb(){yTb();return OC(GC(oP,1),Kie,379,0,[wTb,vTb,xTb])} +function Bzc(){xzc();return OC(GC(ZW,1),Kie,378,0,[uzc,vzc,wzc])} +function Xpc(){Rpc();return OC(GC(GW,1),Kie,314,0,[Ppc,Opc,Qpc])} +function eqc(){bqc();return OC(GC(HW,1),Kie,337,0,[$pc,aqc,_pc])} +function Jqc(){Gqc();return OC(GC(KW,1),Kie,450,0,[Eqc,Dqc,Fqc])} +function Ikc(){Fkc();return OC(GC(vV,1),Kie,361,0,[Ekc,Dkc,Ckc])} +function hsc(){esc();return OC(GC(RW,1),Kie,303,0,[csc,dsc,bsc])} +function $rc(){Xrc();return OC(GC(QW,1),Kie,292,0,[Vrc,Wrc,Urc])} +function NAc(){KAc();return OC(GC(dX,1),Kie,452,0,[JAc,HAc,IAc])} +function wAc(){tAc();return OC(GC(bX,1),Kie,339,0,[rAc,qAc,sAc])} +function WAc(){TAc();return OC(GC(eX,1),Kie,375,0,[QAc,RAc,SAc])} +function OBc(){LBc();return OC(GC(jX,1),Kie,377,0,[JBc,KBc,IBc])} +function wBc(){tBc();return OC(GC(hX,1),Kie,336,0,[qBc,rBc,sBc])} +function FBc(){CBc();return OC(GC(iX,1),Kie,338,0,[BBc,zBc,ABc])} +function uGc(){rGc();return OC(GC(PX,1),Kie,454,0,[oGc,pGc,qGc])} +function xVc(){tVc();return OC(GC(O$,1),Kie,442,0,[sVc,qVc,rVc])} +function tWc(){pWc();return OC(GC(Y$,1),Kie,380,0,[mWc,nWc,oWc])} +function CYc(){zYc();return OC(GC(q_,1),Kie,381,0,[xYc,yYc,wYc])} +function wXc(){sXc();return OC(GC(b_,1),Kie,293,0,[qXc,rXc,pXc])} +function _$c(){Y$c();return OC(GC(J_,1),Kie,437,0,[V$c,W$c,X$c])} +function kbd(){hbd();return OC(GC(z1,1),Kie,334,0,[fbd,ebd,gbd])} +function tad(){qad();return OC(GC(u1,1),Kie,272,0,[nad,oad,pad])} +function o3d(a,b){return p3d(a,b,JD(b,99)&&(BD(b,18).Bb&Tje)!=0)} +function LZc(a,b,c){var d;d=MZc(a,b,false);return d.b<=b&&d.a<=c} +function tMc(a,b,c){var d;d=new sMc;d.b=b;d.a=c;++b.b;Ekb(a.d,d)} +function fs(a,b){var c;c=(uCb(a),a).g;lCb(!!c);uCb(b);return c(b)} +function av(a,b){var c,d;d=cv(a,b);c=a.a.Zc(d);return new qv(a,c)} +function cKd(a){if(a.Db>>16!=6)return null;return BD(aid(a),235)} +function Uwd(a){if(a.p!=2)throw vbb(new Ydb);return Tbb(a.f)&aje} +function bxd(a){if(a.p!=2)throw vbb(new Ydb);return Tbb(a.k)&aje} +function Z1d(a){a.a==(T0d(),S0d)&&d2d(a,U0d(a.g,a.b));return a.a} +function _1d(a){a.d==(T0d(),S0d)&&f2d(a,Y0d(a.g,a.b));return a.d} +function mlb(a){sCb(a.ad?1:0} +function bjc(a,b){var c,d;c=ajc(b);d=c;return BD(Ohb(a.c,d),19).a} +function iSc(a,b){var c;c=a+'';while(c.length0&&a.a[--a.d]==0);a.a[a.d++]==0&&(a.e=0)} +function wwb(a){return !a.a?a.c:a.e.length==0?a.a.a:a.a.a+(''+a.e)} +function RSd(a){return !!a.a&&QSd(a.a.a).i!=0&&!(!!a.b&&QTd(a.b))} +function cLd(a){return !!a.u&&VKd(a.u.a).i!=0&&!(!!a.n&&FMd(a.n))} +function $i(a){return Zj(a.e.Hd().gc()*a.c.Hd().gc(),16,new ij(a))} +function XA(a,b){return ueb(Cbb(a.q.getTime()),Cbb(b.q.getTime()))} +function k_b(a){return BD(Qkb(a,KC(AQ,jne,17,a.c.length,0,1)),474)} +function l_b(a){return BD(Qkb(a,KC(OQ,kne,10,a.c.length,0,1)),193)} +function cKc(a){FJc();return !OZb(a)&&!(!OZb(a)&&a.c.i.c==a.d.i.c)} +function kDb(a,b,c){var d;d=(Qb(a),new Tkb(a));iDb(new jDb(d,b,c))} +function rXb(a,b,c){var d;d=(Qb(a),new Tkb(a));pXb(new qXb(d,b,c))} +function Nwb(a,b){var c;c=1-b;a.a[c]=Owb(a.a[c],c);return Owb(a,b)} +function YXc(a,b){var c;a.e=new QXc;c=gVc(b);Okb(c,a.c);ZXc(a,c,0)} +function o4c(a,b,c,d){var e;e=new w4c;e.a=b;e.b=c;e.c=d;Dsb(a.a,e)} +function p4c(a,b,c,d){var e;e=new w4c;e.a=b;e.b=c;e.c=d;Dsb(a.b,e)} +function i6d(a){var b,c,d;b=new A6d;c=s6d(b,a);z6d(b);d=c;return d} +function vZd(){var a,b,c;b=(c=(a=new UQd,a),c);Ekb(rZd,b);return b} +function H2c(a){a.j.c=KC(SI,Uhe,1,0,5,1);Ae(a.c);h3c(a.a);return a} +function tgc(a){qgc();if(JD(a.g,10)){return BD(a.g,10)}return null} +function Zw(a){if(Ah(a).dc()){return false}Bh(a,new bx);return true} +function _y(b){if(!('stack' in b)){try{throw b}catch(a){}}return b} +function Pb(a,b){if(a<0||a>=b){throw vbb(new qcb(Ib(a,b)))}return a} +function Tb(a,b,c){if(a<0||bc){throw vbb(new qcb(Kb(a,b,c)))}} +function eVb(a,b){Qqb(a.a,b);if(b.d){throw vbb(new hz(Hke))}b.d=a} +function xpb(a,b){if(b.$modCount!=a.$modCount){throw vbb(new Apb)}} +function $pb(a,b){if(JD(b,42)){return Jd(a.a,BD(b,42))}return false} +function dib(a,b){if(JD(b,42)){return Jd(a.a,BD(b,42))}return false} +function msb(a,b){if(JD(b,42)){return Jd(a.a,BD(b,42))}return false} +function qAb(a,b){if(a.a<=a.b){b.ud(a.a++);return true}return false} +function Sbb(a){var b;if(Fbb(a)){b=a;return b==-0.?0:b}return oD(a)} +function tAb(a){var b;Tzb(a);b=new drb;_ub(a.a,new BAb(b));return b} +function Yzb(a){var b;Tzb(a);b=new Gpb;_ub(a.a,new mAb(b));return b} +function Bib(a,b){this.a=a;vib.call(this,a);wCb(b,a.gc());this.b=b} +function orb(a){this.e=a;this.b=this.e.a.entries();this.a=new Array} +function Oi(a){return Zj(a.e.Hd().gc()*a.c.Hd().gc(),273,new cj(a))} +function Qu(a){return new Skb((Xj(a,Mie),Oy(wbb(wbb(5,a),a/10|0))))} +function m_b(a){return BD(Qkb(a,KC(aR,lne,11,a.c.length,0,1)),1943)} +function sMb(a,b,c){return c.f.c.length>0?HMb(a.a,b,c):HMb(a.b,b,c)} +function SZb(a,b,c){!!a.d&&Lkb(a.d.e,a);a.d=b;!!a.d&&Dkb(a.d.e,c,a)} +function a5b(a,b){i5b(b,a);k5b(a.d);k5b(BD(vNb(a,(Nyc(),wxc)),207))} +function _4b(a,b){f5b(b,a);h5b(a.d);h5b(BD(vNb(a,(Nyc(),wxc)),207))} +function Ypd(a,b){var c,d;c=aC(a,b);d=null;!!c&&(d=c.fe());return d} +function Zpd(a,b){var c,d;c=tB(a,b);d=null;!!c&&(d=c.ie());return d} +function $pd(a,b){var c,d;c=aC(a,b);d=null;!!c&&(d=c.ie());return d} +function _pd(a,b){var c,d;c=aC(a,b);d=null;!!c&&(d=aqd(c));return d} +function Tqd(a,b,c){var d;d=Wpd(c);ro(a.g,d,b);ro(a.i,b,c);return b} +function Ez(a,b,c){var d;d=Cz();try{return Bz(a,b,c)}finally{Fz(d)}} +function C6d(a){var b;b=a.Wg();this.a=JD(b,69)?BD(b,69).Zh():b.Kc()} +function j3c(){D2c.call(this);this.j.c=KC(SI,Uhe,1,0,5,1);this.a=-1} +function mxd(a,b,c,d){this.d=a;this.n=b;this.g=c;this.o=d;this.p=-1} +function jk(a,b,c,d){this.e=d;this.d=null;this.c=a;this.a=b;this.b=c} +function uEc(a,b,c){this.d=new HEc(this);this.e=a;this.i=b;this.f=c} +function msc(){msc=ccb;ksc=new nsc(gle,0);lsc=new nsc('TOP_LEFT',1)} +function cDc(){cDc=ccb;bDc=ix(meb(1),meb(4));aDc=ix(meb(1),meb(2))} +function z_c(){z_c=ccb;y_c=as((s_c(),OC(GC(O_,1),Kie,551,0,[r_c])))} +function q_c(){q_c=ccb;p_c=as((i_c(),OC(GC(N_,1),Kie,482,0,[h_c])))} +function Z0c(){Z0c=ccb;Y0c=as((R0c(),OC(GC(W_,1),Kie,530,0,[Q0c])))} +function hPb(){hPb=ccb;gPb=as((cPb(),OC(GC(GO,1),Kie,481,0,[bPb])))} +function yLb(){vLb();return OC(GC(PN,1),Kie,406,0,[uLb,rLb,sLb,tLb])} +function qxb(){lxb();return OC(GC(iL,1),Kie,297,0,[hxb,ixb,jxb,kxb])} +function UOb(){ROb();return OC(GC(CO,1),Kie,394,0,[OOb,NOb,POb,QOb])} +function UMb(){RMb();return OC(GC(jO,1),Kie,323,0,[OMb,NMb,PMb,QMb])} +function sWb(){lWb();return OC(GC(SP,1),Kie,405,0,[hWb,kWb,iWb,jWb])} +function kbc(){gbc();return OC(GC(VS,1),Kie,360,0,[fbc,dbc,ebc,cbc])} +function Vc(a,b,c,d){return JD(c,54)?new Cg(a,b,c,d):new qg(a,b,c,d)} +function Djc(){Ajc();return OC(GC(mV,1),Kie,411,0,[wjc,xjc,yjc,zjc])} +function okc(a){var b;return a.j==(Ucd(),Rcd)&&(b=pkc(a),uqb(b,zcd))} +function Mdc(a,b){var c;c=b.a;QZb(c,b.c.d);RZb(c,b.d.d);q7c(c.a,a.n)} +function Smc(a,b){return BD(Btb(QAb(BD(Qc(a.k,b),15).Oc(),Hmc)),113)} +function Tmc(a,b){return BD(Btb(RAb(BD(Qc(a.k,b),15).Oc(),Hmc)),113)} +function _w(a){return new Kub(rmb(BD(a.a.dd(),14).gc(),a.a.cd()),16)} +function Qq(a){if(JD(a,14)){return BD(a,14).dc()}return !a.Kc().Ob()} +function ugc(a){qgc();if(JD(a.g,145)){return BD(a.g,145)}return null} +function Ko(a){if(a.e.g!=a.b){throw vbb(new Apb)}return !!a.c&&a.d>0} +function Xsb(a){sCb(a.b!=a.d.c);a.c=a.b;a.b=a.b.a;++a.a;return a.c.c} +function Xjb(a,b){uCb(b);NC(a.a,a.c,b);a.c=a.c+1&a.a.length-1;_jb(a)} +function Wjb(a,b){uCb(b);a.b=a.b-1&a.a.length-1;NC(a.a,a.b,b);_jb(a)} +function A2c(a,b){var c;for(c=a.j.c.length;c0&&$fb(a.g,0,b,0,a.i);return b} +function qEd(a,b){pEd();var c;c=BD(Ohb(oEd,a),55);return !c||c.wj(b)} +function Twd(a){if(a.p!=1)throw vbb(new Ydb);return Tbb(a.f)<<24>>24} +function axd(a){if(a.p!=1)throw vbb(new Ydb);return Tbb(a.k)<<24>>24} +function gxd(a){if(a.p!=7)throw vbb(new Ydb);return Tbb(a.k)<<16>>16} +function Zwd(a){if(a.p!=7)throw vbb(new Ydb);return Tbb(a.f)<<16>>16} +function sr(a){var b;b=0;while(a.Ob()){a.Pb();b=wbb(b,1)}return Oy(b)} +function nx(a,b){var c;c=new Vfb;a.xd(c);c.a+='..';b.yd(c);return c.a} +function Sgc(a,b,c){var d;d=BD(Ohb(a.g,c),57);Ekb(a.a.c,new vgd(b,d))} +function VCb(a,b,c){return Ddb(ED(Wd(irb(a.f,b))),ED(Wd(irb(a.f,c))))} +function E2d(a,b,c){return F2d(a,b,c,JD(b,99)&&(BD(b,18).Bb&Tje)!=0)} +function L2d(a,b,c){return M2d(a,b,c,JD(b,99)&&(BD(b,18).Bb&Tje)!=0)} +function q3d(a,b,c){return r3d(a,b,c,JD(b,99)&&(BD(b,18).Bb&Tje)!=0)} +function JJc(a,b){return a==(j0b(),h0b)&&b==h0b?4:a==h0b||b==h0b?8:32} +function Nd(a,b){return PD(b)===PD(a)?'(this Map)':b==null?Xhe:fcb(b)} +function kFd(a,b){return BD(b==null?Wd(irb(a.f,null)):Crb(a.g,b),281)} +function Rqd(a,b,c){var d;d=Wpd(c);Rhb(a.b,d,b);Rhb(a.c,b,c);return b} +function Bfd(a,b){var c;c=b;while(c){O6c(a,c.i,c.j);c=Xod(c)}return a} +function kt(a,b){var c;c=vmb(Nu(new wu(a,b)));ir(new wu(a,b));return c} +function R6d(a,b){Q6d();var c;c=BD(a,66).Mj();kVd(c,b);return c.Ok(b)} +function TOc(a,b,c,d,e){var f;f=OOc(e,c,d);Ekb(b,tOc(e,f));XOc(a,e,b)} +function mic(a,b,c){a.i=0;a.e=0;if(b==c){return}lic(a,b,c);kic(a,b,c)} +function dB(a,b){var c;c=a.q.getHours();a.q.setFullYear(b+nje);YA(a,c)} +function dC(d,a,b){if(b){var c=b.ee();d.a[a]=c(b)}else{delete d.a[a]}} +function vB(d,a,b){if(b){var c=b.ee();b=c(b)}else{b=undefined}d.a[a]=b} +function pCb(a){if(a<0){throw vbb(new Feb('Negative array size: '+a))}} +function VKd(a){if(!a.n){$Kd(a);a.n=new JMd(a,j5,a);_Kd(a)}return a.n} +function Fqb(a){sCb(a.a=0&&a.a[c]===b[c];c--);return c<0} +function Ucc(a,b){Occ();var c;c=a.j.g-b.j.g;if(c!=0){return c}return 0} +function Dtb(a,b){uCb(b);if(a.a!=null){return Itb(b.Kb(a.a))}return ztb} +function Gx(a){var b;if(a){return new Bsb(a)}b=new zsb;Jq(b,a);return b} +function GAb(a,b){var c;return b.b.Kb(SAb(a,b.c.Ee(),(c=new TBb(b),c)))} +function Hub(a){zub();Eub(this,Tbb(xbb(Obb(a,24),nke)),Tbb(xbb(a,nke)))} +function REb(){REb=ccb;QEb=as((MEb(),OC(GC(aN,1),Kie,428,0,[LEb,KEb])))} +function ZEb(){ZEb=ccb;YEb=as((UEb(),OC(GC(bN,1),Kie,427,0,[SEb,TEb])))} +function aSb(){aSb=ccb;_Rb=as((XRb(),OC(GC(gP,1),Kie,424,0,[VRb,WRb])))} +function D5b(){D5b=ccb;C5b=as((y5b(),OC(GC(ZR,1),Kie,511,0,[x5b,w5b])))} +function Cqc(){Cqc=ccb;Bqc=as((xqc(),OC(GC(JW,1),Kie,419,0,[vqc,wqc])))} +function erc(){erc=ccb;drc=as((_qc(),OC(GC(MW,1),Kie,479,0,[$qc,Zqc])))} +function eBc(){eBc=ccb;dBc=as((_Ac(),OC(GC(fX,1),Kie,376,0,[$Ac,ZAc])))} +function GAc(){GAc=ccb;FAc=as((BAc(),OC(GC(cX,1),Kie,421,0,[zAc,AAc])))} +function Npc(){Npc=ccb;Mpc=as((Ipc(),OC(GC(FW,1),Kie,422,0,[Gpc,Hpc])))} +function rsc(){rsc=ccb;qsc=as((msc(),OC(GC(SW,1),Kie,420,0,[ksc,lsc])))} +function MOc(){MOc=ccb;LOc=as((HOc(),OC(GC(DZ,1),Kie,520,0,[GOc,FOc])))} +function ZIc(){ZIc=ccb;YIc=as((UIc(),OC(GC(mY,1),Kie,523,0,[TIc,SIc])))} +function bMc(){bMc=ccb;aMc=as((YLc(),OC(GC(fZ,1),Kie,516,0,[XLc,WLc])))} +function jMc(){jMc=ccb;iMc=as((eMc(),OC(GC(gZ,1),Kie,515,0,[cMc,dMc])))} +function KQc(){KQc=ccb;JQc=as((FQc(),OC(GC(YZ,1),Kie,455,0,[DQc,EQc])))} +function dUc(){dUc=ccb;cUc=as(($Tc(),OC(GC(F$,1),Kie,425,0,[ZTc,YTc])))} +function XUc(){XUc=ccb;WUc=as((PUc(),OC(GC(K$,1),Kie,495,0,[NUc,OUc])))} +function XTc(){XTc=ccb;WTc=as((STc(),OC(GC(E$,1),Kie,480,0,[QTc,RTc])))} +function lWc(){lWc=ccb;kWc=as((fWc(),OC(GC(X$,1),Kie,426,0,[dWc,eWc])))} +function i1c(){i1c=ccb;h1c=as((a1c(),OC(GC(X_,1),Kie,429,0,[_0c,$0c])))} +function H_c(){H_c=ccb;G_c=as((C_c(),OC(GC(P_,1),Kie,430,0,[B_c,A_c])))} +function UIc(){UIc=ccb;TIc=new VIc('UPPER',0);SIc=new VIc('LOWER',1)} +function Lqd(a,b){var c;c=new eC;Spd(c,'x',b.a);Spd(c,'y',b.b);Qpd(a,c)} +function Oqd(a,b){var c;c=new eC;Spd(c,'x',b.a);Spd(c,'y',b.b);Qpd(a,c)} +function Jic(a,b){var c,d;d=false;do{c=Mic(a,b);d=d|c}while(c);return d} +function zHc(a,b){var c,d;c=b;d=0;while(c>0){d+=a.a[c];c-=c&-c}return d} +function Cfd(a,b){var c;c=b;while(c){O6c(a,-c.i,-c.j);c=Xod(c)}return a} +function reb(a,b){var c,d;uCb(b);for(d=a.Kc();d.Ob();){c=d.Pb();b.td(c)}} +function me(a,b){var c;c=b.cd();return new Wo(c,a.e.pc(c,BD(b.dd(),14)))} +function Gsb(a,b,c,d){var e;e=new jtb;e.c=b;e.b=c;e.a=d;d.b=c.a=e;++a.b} +function Nkb(a,b,c){var d;d=(tCb(b,a.c.length),a.c[b]);a.c[b]=c;return d} +function lFd(a,b,c){return BD(b==null?jrb(a.f,null,c):Drb(a.g,b,c),281)} +function fRb(a){return !!a.c&&!!a.d?oRb(a.c)+'->'+oRb(a.d):'e_'+FCb(a)} +function FAb(a,b){return (Uzb(a),WAb(new YAb(a,new qBb(b,a.a)))).sd(DAb)} +function tUb(){qUb();return OC(GC(zP,1),Kie,356,0,[lUb,mUb,nUb,oUb,pUb])} +function _cd(){Ucd();return OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd])} +function Dz(b){Az();return function(){return Ez(b,this,arguments);var a}} +function sz(){if(Date.now){return Date.now()}return (new Date).getTime()} +function OZb(a){if(!a.c||!a.d){return false}return !!a.c.i&&a.c.i==a.d.i} +function pv(a){if(!a.c.Sb()){throw vbb(new utb)}a.a=true;return a.c.Ub()} +function ko(a){a.i=0;Alb(a.b,null);Alb(a.c,null);a.a=null;a.e=null;++a.g} +function ycb(a){wcb.call(this,a==null?Xhe:fcb(a),JD(a,78)?BD(a,78):null)} +function PYb(a){MYb();yXb(this);this.a=new Psb;NYb(this,a);Dsb(this.a,a)} +function jYb(){Ckb(this);this.b=new f7c(Pje,Pje);this.a=new f7c(Qje,Qje)} +function rAb(a,b){this.c=0;this.b=b;jvb.call(this,a,17493);this.a=this.c} +function wyb(a){oyb();if(lyb){return}this.c=a;this.e=true;this.a=new Rkb} +function oyb(){oyb=ccb;lyb=true;jyb=false;kyb=false;nyb=false;myb=false} +function C3c(a,b){if(JD(b,149)){return dfb(a.c,BD(b,149).c)}return false} +function zUc(a,b){var c;c=0;!!a&&(c+=a.f.a/2);!!b&&(c+=b.f.a/2);return c} +function j4c(a,b){var c;c=BD(Wrb(a.d,b),23);return c?c:BD(Wrb(a.e,b),23)} +function Lzd(a){this.b=a;Fyd.call(this,a);this.a=BD(Ajd(this.b.a,4),126)} +function Uzd(a){this.b=a;$yd.call(this,a);this.a=BD(Ajd(this.b.a,4),126)} +function $Kd(a){if(!a.t){a.t=new YMd(a);vtd(new c0d(a),0,a.t)}return a.t} +function kad(){ead();return OC(GC(t1,1),Kie,103,0,[cad,bad,aad,_9c,dad])} +function Wbd(){Tbd();return OC(GC(C1,1),Kie,249,0,[Qbd,Sbd,Obd,Pbd,Rbd])} +function Q5c(){N5c();return OC(GC(e1,1),Kie,175,0,[L5c,K5c,I5c,M5c,J5c])} +function Q_c(){N_c();return OC(GC(Q_,1),Kie,316,0,[I_c,J_c,M_c,K_c,L_c])} +function _zc(){Vzc();return OC(GC(_W,1),Kie,315,0,[Uzc,Rzc,Szc,Qzc,Tzc])} +function sqc(){mqc();return OC(GC(IW,1),Kie,335,0,[iqc,hqc,kqc,lqc,jqc])} +function n$c(){k$c();return OC(GC(y_,1),Kie,355,0,[g$c,f$c,i$c,h$c,j$c])} +function _jc(){Xjc();return OC(GC(uV,1),Kie,363,0,[Tjc,Vjc,Wjc,Ujc,Sjc])} +function Ftc(){Ctc();return OC(GC(TW,1),Kie,163,0,[Btc,xtc,ytc,ztc,Atc])} +function T0d(){T0d=ccb;var a,b;R0d=(LFd(),b=new MPd,b);S0d=(a=new OJd,a)} +function yUd(a){var b;if(!a.c){b=a.r;JD(b,88)&&(a.c=BD(b,26))}return a.c} +function zc(a){a.e=3;a.d=a.Yb();if(a.e!=2){a.e=0;return true}return false} +function RC(a){var b,c,d;b=a&Eje;c=a>>22&Eje;d=a<0?Fje:0;return TC(b,c,d)} +function uy(a){var b,c,d,e;for(c=a,d=0,e=c.length;d0?ihb(a,b):lhb(a,-b)} +function Rgb(a,b){if(b==0||a.e==0){return a}return b>0?lhb(a,b):ihb(a,-b)} +function Rr(a){if(Qr(a)){a.c=a.a;return a.a.Pb()}else{throw vbb(new utb)}} +function Yac(a){var b,c;b=a.c.i;c=a.d.i;return b.k==(j0b(),e0b)&&c.k==e0b} +function kZb(a){var b;b=new UZb;tNb(b,a);yNb(b,(Nyc(),jxc),null);return b} +function hid(a,b,c){var d;return d=a.Yg(b),d>=0?a._g(d,c,true):sid(a,b,c)} +function uHb(a,b,c,d){var e;for(e=0;eb){throw vbb(new qcb(Jb(a,b,'index')))}return a} +function zhb(a,b,c,d){var e;e=KC(WD,oje,25,b,15,1);Ahb(e,a,b,c,d);return e} +function _A(a,b){var c;c=a.q.getHours()+(b/60|0);a.q.setMinutes(b);YA(a,c)} +function A$c(a,b){return $wnd.Math.min(S6c(b.a,a.d.d.c),S6c(b.b,a.d.d.c))} +function Thb(a,b){return ND(b)?b==null?krb(a.f,null):Erb(a.g,b):krb(a.f,b)} +function b1b(a){this.c=a;this.a=new olb(this.c.a);this.b=new olb(this.c.b)} +function kRb(){this.e=new Rkb;this.c=new Rkb;this.d=new Rkb;this.b=new Rkb} +function MFb(){this.g=new PFb;this.b=new PFb;this.a=new Rkb;this.k=new Rkb} +function Gjc(a,b,c){this.a=a;this.c=b;this.d=c;Ekb(b.e,this);Ekb(c.b,this)} +function wBb(a,b){fvb.call(this,b.rd(),b.qd()&-6);uCb(a);this.a=a;this.b=b} +function CBb(a,b){jvb.call(this,b.rd(),b.qd()&-6);uCb(a);this.a=a;this.b=b} +function IBb(a,b){nvb.call(this,b.rd(),b.qd()&-6);uCb(a);this.a=a;this.b=b} +function BQc(a,b,c){this.a=a;this.b=b;this.c=c;Ekb(a.t,this);Ekb(b.i,this)} +function SRc(){this.b=new Psb;this.a=new Psb;this.b=new Psb;this.a=new Psb} +function g6c(){g6c=ccb;f6c=new Lsd('org.eclipse.elk.labels.labelManager')} +function Vac(){Vac=ccb;Uac=new Msd('separateLayerConnections',(gbc(),fbc))} +function HOc(){HOc=ccb;GOc=new IOc('REGULAR',0);FOc=new IOc('CRITICAL',1)} +function _Ac(){_Ac=ccb;$Ac=new aBc('STACKED',0);ZAc=new aBc('SEQUENCED',1)} +function C_c(){C_c=ccb;B_c=new D_c('FIXED',0);A_c=new D_c('CENTER_NODE',1)} +function PHc(a,b){var c;c=VHc(a,b);a.b=new BHc(c.c.length);return OHc(a,c)} +function KAd(a,b,c){var d;++a.e;--a.f;d=BD(a.d[b].$c(c),133);return d.dd()} +function JJd(a){var b;if(!a.a){b=a.r;JD(b,148)&&(a.a=BD(b,148))}return a.a} +function poc(a){if(a.a){if(a.e){return poc(a.e)}}else{return a}return null} +function ODc(a,b){if(a.pb.p){return -1}return 0} +function pvb(a,b){uCb(b);if(a.c=0,'Initial capacity must not be negative')} +function lHb(){lHb=ccb;kHb=as((gHb(),OC(GC(pN,1),Kie,232,0,[dHb,eHb,fHb])))} +function SHb(){SHb=ccb;RHb=as((NHb(),OC(GC(sN,1),Kie,461,0,[LHb,KHb,MHb])))} +function JIb(){JIb=ccb;IIb=as((EIb(),OC(GC(zN,1),Kie,462,0,[DIb,CIb,BIb])))} +function Kyb(){Kyb=ccb;Jyb=as((Fyb(),OC(GC(xL,1),Kie,132,0,[Cyb,Dyb,Eyb])))} +function DTb(){DTb=ccb;CTb=as((yTb(),OC(GC(oP,1),Kie,379,0,[wTb,vTb,xTb])))} +function WXb(){WXb=ccb;VXb=as((RXb(),OC(GC(hQ,1),Kie,423,0,[QXb,PXb,OXb])))} +function Zpc(){Zpc=ccb;Ypc=as((Rpc(),OC(GC(GW,1),Kie,314,0,[Ppc,Opc,Qpc])))} +function gqc(){gqc=ccb;fqc=as((bqc(),OC(GC(HW,1),Kie,337,0,[$pc,aqc,_pc])))} +function Lqc(){Lqc=ccb;Kqc=as((Gqc(),OC(GC(KW,1),Kie,450,0,[Eqc,Dqc,Fqc])))} +function Kkc(){Kkc=ccb;Jkc=as((Fkc(),OC(GC(vV,1),Kie,361,0,[Ekc,Dkc,Ckc])))} +function jsc(){jsc=ccb;isc=as((esc(),OC(GC(RW,1),Kie,303,0,[csc,dsc,bsc])))} +function asc(){asc=ccb;_rc=as((Xrc(),OC(GC(QW,1),Kie,292,0,[Vrc,Wrc,Urc])))} +function Dzc(){Dzc=ccb;Czc=as((xzc(),OC(GC(ZW,1),Kie,378,0,[uzc,vzc,wzc])))} +function YAc(){YAc=ccb;XAc=as((TAc(),OC(GC(eX,1),Kie,375,0,[QAc,RAc,SAc])))} +function yAc(){yAc=ccb;xAc=as((tAc(),OC(GC(bX,1),Kie,339,0,[rAc,qAc,sAc])))} +function PAc(){PAc=ccb;OAc=as((KAc(),OC(GC(dX,1),Kie,452,0,[JAc,HAc,IAc])))} +function QBc(){QBc=ccb;PBc=as((LBc(),OC(GC(jX,1),Kie,377,0,[JBc,KBc,IBc])))} +function yBc(){yBc=ccb;xBc=as((tBc(),OC(GC(hX,1),Kie,336,0,[qBc,rBc,sBc])))} +function HBc(){HBc=ccb;GBc=as((CBc(),OC(GC(iX,1),Kie,338,0,[BBc,zBc,ABc])))} +function wGc(){wGc=ccb;vGc=as((rGc(),OC(GC(PX,1),Kie,454,0,[oGc,pGc,qGc])))} +function zVc(){zVc=ccb;yVc=as((tVc(),OC(GC(O$,1),Kie,442,0,[sVc,qVc,rVc])))} +function vWc(){vWc=ccb;uWc=as((pWc(),OC(GC(Y$,1),Kie,380,0,[mWc,nWc,oWc])))} +function EYc(){EYc=ccb;DYc=as((zYc(),OC(GC(q_,1),Kie,381,0,[xYc,yYc,wYc])))} +function yXc(){yXc=ccb;xXc=as((sXc(),OC(GC(b_,1),Kie,293,0,[qXc,rXc,pXc])))} +function b_c(){b_c=ccb;a_c=as((Y$c(),OC(GC(J_,1),Kie,437,0,[V$c,W$c,X$c])))} +function mbd(){mbd=ccb;lbd=as((hbd(),OC(GC(z1,1),Kie,334,0,[fbd,ebd,gbd])))} +function vad(){vad=ccb;uad=as((qad(),OC(GC(u1,1),Kie,272,0,[nad,oad,pad])))} +function icd(){dcd();return OC(GC(D1,1),Kie,98,0,[ccd,bcd,acd,Zbd,_bd,$bd])} +function ikd(a,b){return !a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),qAd(a.o,b)} +function NAd(a){!a.g&&(a.g=new JCd);!a.g.d&&(a.g.d=new MBd(a));return a.g.d} +function yAd(a){!a.g&&(a.g=new JCd);!a.g.a&&(a.g.a=new SBd(a));return a.g.a} +function EAd(a){!a.g&&(a.g=new JCd);!a.g.b&&(a.g.b=new GBd(a));return a.g.b} +function FAd(a){!a.g&&(a.g=new JCd);!a.g.c&&(a.g.c=new iCd(a));return a.g.c} +function A2d(a,b,c){var d,e;e=new p4d(b,a);for(d=0;dc||b=0?a._g(c,true,true):sid(a,b,true)} +function s6b(a,b){return Kdb(Edb(ED(vNb(a,(wtc(),htc)))),Edb(ED(vNb(b,htc))))} +function pUc(){pUc=ccb;oUc=b3c(b3c(g3c(new j3c,(yRc(),vRc)),(qSc(),pSc)),lSc)} +function IHc(a,b,c){var d;d=SHc(a,b,c);a.b=new BHc(d.c.length);return KHc(a,d)} +function qhe(a){if(a.b<=0)throw vbb(new utb);--a.b;a.a-=a.c.c;return meb(a.a)} +function ptd(a){var b;if(!a.a){throw vbb(new vtb)}b=a.a;a.a=Xod(a.a);return b} +function dBb(a){while(!a.a){if(!HBb(a.c,new hBb(a))){return false}}return true} +function vr(a){var b;Qb(a);if(JD(a,198)){b=BD(a,198);return b}return new wr(a)} +function r3c(a){p3c();BD(a.We((Y9c(),x9c)),174).Fc((rcd(),ocd));a.Ye(w9c,null)} +function p3c(){p3c=ccb;m3c=new v3c;o3c=new x3c;n3c=mn((Y9c(),w9c),m3c,b9c,o3c)} +function fWc(){fWc=ccb;dWc=new hWc('LEAF_NUMBER',0);eWc=new hWc('NODE_SIZE',1)} +function UMc(a,b,c){a.a=b;a.c=c;a.b.a.$b();Osb(a.d);a.e.a.c=KC(SI,Uhe,1,0,5,1)} +function yHc(a){a.a=KC(WD,oje,25,a.b+1,15,1);a.c=KC(WD,oje,25,a.b,15,1);a.d=0} +function MWb(a,b){if(a.a.ue(b.d,a.b)>0){Ekb(a.c,new dWb(b.c,b.d,a.d));a.b=b.d}} +function nud(a,b){if(a.g==null||b>=a.i)throw vbb(new $zd(b,a.i));return a.g[b]} +function pOd(a,b,c){Itd(a,c);if(c!=null&&!a.wj(c)){throw vbb(new tcb)}return c} +function KLd(a){var b;if(a.Ek()){for(b=a.i-1;b>=0;--b){qud(a,b)}}return wud(a)} +function Bwb(a){var b,c;if(!a.b){return null}c=a.b;while(b=c.a[0]){c=b}return c} +function ulb(a,b){var c,d;pCb(b);return c=(d=a.slice(0,b),PC(d,a)),c.length=b,c} +function Klb(a,b,c,d){var e;d=(ipb(),!d?fpb:d);e=a.slice(b,c);Llb(e,a,b,c,-b,d)} +function bid(a,b,c,d,e){return b<0?sid(a,c,d):BD(c,66).Nj().Pj(a,a.yh(),b,d,e)} +function hZd(a){if(JD(a,172)){return ''+BD(a,172).a}return a==null?null:fcb(a)} +function iZd(a){if(JD(a,172)){return ''+BD(a,172).a}return a==null?null:fcb(a)} +function nDb(a,b){if(b.a){throw vbb(new hz(Hke))}Qqb(a.a,b);b.a=a;!a.j&&(a.j=b)} +function qBb(a,b){nvb.call(this,b.rd(),b.qd()&-16449);uCb(a);this.a=a;this.c=b} +function Ti(a,b){var c,d;d=b/a.c.Hd().gc()|0;c=b%a.c.Hd().gc();return Mi(a,d,c)} +function NHb(){NHb=ccb;LHb=new OHb(jle,0);KHb=new OHb(gle,1);MHb=new OHb(kle,2)} +function lxb(){lxb=ccb;hxb=new mxb('All',0);ixb=new rxb;jxb=new txb;kxb=new wxb} +function zxb(){zxb=ccb;yxb=as((lxb(),OC(GC(iL,1),Kie,297,0,[hxb,ixb,jxb,kxb])))} +function uWb(){uWb=ccb;tWb=as((lWb(),OC(GC(SP,1),Kie,405,0,[hWb,kWb,iWb,jWb])))} +function ALb(){ALb=ccb;zLb=as((vLb(),OC(GC(PN,1),Kie,406,0,[uLb,rLb,sLb,tLb])))} +function WMb(){WMb=ccb;VMb=as((RMb(),OC(GC(jO,1),Kie,323,0,[OMb,NMb,PMb,QMb])))} +function WOb(){WOb=ccb;VOb=as((ROb(),OC(GC(CO,1),Kie,394,0,[OOb,NOb,POb,QOb])))} +function GRc(){GRc=ccb;FRc=as((yRc(),OC(GC(h$,1),Kie,393,0,[uRc,vRc,wRc,xRc])))} +function mbc(){mbc=ccb;lbc=as((gbc(),OC(GC(VS,1),Kie,360,0,[fbc,dbc,ebc,cbc])))} +function oXc(){oXc=ccb;nXc=as((iXc(),OC(GC(a_,1),Kie,340,0,[hXc,fXc,gXc,eXc])))} +function Fjc(){Fjc=ccb;Ejc=as((Ajc(),OC(GC(mV,1),Kie,411,0,[wjc,xjc,yjc,zjc])))} +function Pzc(){Pzc=ccb;Ozc=as((Izc(),OC(GC($W,1),Kie,197,0,[Gzc,Hzc,Fzc,Ezc])))} +function ugd(){ugd=ccb;tgd=as((pgd(),OC(GC(k2,1),Kie,396,0,[mgd,ngd,lgd,ogd])))} +function xbd(){xbd=ccb;wbd=as((rbd(),OC(GC(A1,1),Kie,285,0,[qbd,nbd,obd,pbd])))} +function Fad(){Fad=ccb;Ead=as((Aad(),OC(GC(v1,1),Kie,218,0,[zad,xad,wad,yad])))} +function Ied(){Ied=ccb;Hed=as((Ded(),OC(GC(O1,1),Kie,311,0,[Ced,zed,Bed,Aed])))} +function ydd(){ydd=ccb;xdd=as((tdd(),OC(GC(I1,1),Kie,374,0,[rdd,sdd,qdd,pdd])))} +function A9d(){A9d=ccb;Smd();x9d=Pje;w9d=Qje;z9d=new Ndb(Pje);y9d=new Ndb(Qje)} +function _qc(){_qc=ccb;$qc=new arc(ane,0);Zqc=new arc('IMPROVE_STRAIGHTNESS',1)} +function eIc(a,b){FHc();return Ekb(a,new vgd(b,meb(b.e.c.length+b.g.c.length)))} +function gIc(a,b){FHc();return Ekb(a,new vgd(b,meb(b.e.c.length+b.g.c.length)))} +function PC(a,b){HC(b)!=10&&OC(rb(b),b.hm,b.__elementTypeId$,HC(b),a);return a} +function Lkb(a,b){var c;c=Jkb(a,b,0);if(c==-1){return false}Kkb(a,c);return true} +function Zrb(a,b){var c;c=BD(Thb(a.e,b),387);if(c){jsb(c);return c.e}return null} +function Jbb(a){var b;if(Fbb(a)){b=0-a;if(!isNaN(b)){return b}}return zbb(hD(a))} +function Jkb(a,b,c){for(;c=0?fid(a,c,true,true):sid(a,b,true)} +function vgc(a,b){qgc();var c,d;c=ugc(a);d=ugc(b);return !!c&&!!d&&!omb(c.k,d.k)} +function Gqd(a,b){dld(a,b==null||Ldb((uCb(b),b))||isNaN((uCb(b),b))?0:(uCb(b),b))} +function Hqd(a,b){eld(a,b==null||Ldb((uCb(b),b))||isNaN((uCb(b),b))?0:(uCb(b),b))} +function Iqd(a,b){cld(a,b==null||Ldb((uCb(b),b))||isNaN((uCb(b),b))?0:(uCb(b),b))} +function Jqd(a,b){ald(a,b==null||Ldb((uCb(b),b))||isNaN((uCb(b),b))?0:(uCb(b),b))} +function agd(a){(!this.q?(mmb(),mmb(),kmb):this.q).Ac(!a.q?(mmb(),mmb(),kmb):a.q)} +function S2d(a,b){return JD(b,99)&&(BD(b,18).Bb&Tje)!=0?new s4d(b,a):new p4d(b,a)} +function U2d(a,b){return JD(b,99)&&(BD(b,18).Bb&Tje)!=0?new s4d(b,a):new p4d(b,a)} +function INb(a,b){HNb=new tOb;FNb=b;GNb=a;BD(GNb.b,65);KNb(GNb,HNb,null);JNb(GNb)} +function uud(a,b,c){var d;d=a.g[b];mud(a,b,a.oi(b,c));a.gi(b,c,d);a.ci();return d} +function Ftd(a,b){var c;c=a.Xc(b);if(c>=0){a.$c(c);return true}else{return false}} +function YId(a){var b;if(a.d!=a.r){b=wId(a);a.e=!!b&&b.Cj()==Bve;a.d=b}return a.e} +function fr(a,b){var c;Qb(a);Qb(b);c=false;while(b.Ob()){c=c|a.Fc(b.Pb())}return c} +function Wrb(a,b){var c;c=BD(Ohb(a.e,b),387);if(c){Yrb(a,c);return c.e}return null} +function UA(a){var b,c;b=a/60|0;c=a%60;if(c==0){return ''+b}return ''+b+':'+(''+c)} +function LAb(a,b){var c,d;Uzb(a);d=new IBb(b,a.a);c=new fBb(d);return new YAb(a,c)} +function tB(d,a){var b=d.a[a];var c=(rC(),qC)[typeof b];return c?c(b):xC(typeof b)} +function yzc(a){switch(a.g){case 0:return Ohe;case 1:return -1;default:return 0;}} +function oD(a){if(eD(a,(wD(),vD))<0){return -aD(hD(a))}return a.l+a.m*Hje+a.h*Ije} +function HC(a){return a.__elementTypeCategory$==null?10:a.__elementTypeCategory$} +function dub(a){var b;b=a.b.c.length==0?null:Ikb(a.b,0);b!=null&&fub(a,0);return b} +function uA(a,b){while(b[0]=0){++b[0]}} +function sgb(a,b){this.e=b;this.a=vgb(a);this.a<54?(this.f=Sbb(a)):(this.c=ghb(a))} +function vge(a,b,c,d){wfe();xfe.call(this,26);this.c=a;this.a=b;this.d=c;this.b=d} +function EA(a,b,c){var d,e;d=10;for(e=0;ea.a[d]&&(d=c)}return d} +function fic(a,b){var c;c=Jy(a.e.c,b.e.c);if(c==0){return Kdb(a.e.d,b.e.d)}return c} +function Ogb(a,b){if(b.e==0){return Ggb}if(a.e==0){return Ggb}return Dhb(),Ehb(a,b)} +function nCb(a,b){if(!a){throw vbb(new Wdb(DCb('Enum constant undefined: %s',b)))}} +function AWb(){AWb=ccb;xWb=new XWb;yWb=new _Wb;vWb=new dXb;wWb=new hXb;zWb=new lXb} +function UEb(){UEb=ccb;SEb=new VEb('BY_SIZE',0);TEb=new VEb('BY_SIZE_AND_SHAPE',1)} +function XRb(){XRb=ccb;VRb=new YRb('EADES',0);WRb=new YRb('FRUCHTERMAN_REINGOLD',1)} +function xqc(){xqc=ccb;vqc=new yqc('READING_DIRECTION',0);wqc=new yqc('ROTATION',1)} +function uqc(){uqc=ccb;tqc=as((mqc(),OC(GC(IW,1),Kie,335,0,[iqc,hqc,kqc,lqc,jqc])))} +function bAc(){bAc=ccb;aAc=as((Vzc(),OC(GC(_W,1),Kie,315,0,[Uzc,Rzc,Szc,Qzc,Tzc])))} +function bkc(){bkc=ccb;akc=as((Xjc(),OC(GC(uV,1),Kie,363,0,[Tjc,Vjc,Wjc,Ujc,Sjc])))} +function Htc(){Htc=ccb;Gtc=as((Ctc(),OC(GC(TW,1),Kie,163,0,[Btc,xtc,ytc,ztc,Atc])))} +function S_c(){S_c=ccb;R_c=as((N_c(),OC(GC(Q_,1),Kie,316,0,[I_c,J_c,M_c,K_c,L_c])))} +function S5c(){S5c=ccb;R5c=as((N5c(),OC(GC(e1,1),Kie,175,0,[L5c,K5c,I5c,M5c,J5c])))} +function p$c(){p$c=ccb;o$c=as((k$c(),OC(GC(y_,1),Kie,355,0,[g$c,f$c,i$c,h$c,j$c])))} +function vUb(){vUb=ccb;uUb=as((qUb(),OC(GC(zP,1),Kie,356,0,[lUb,mUb,nUb,oUb,pUb])))} +function mad(){mad=ccb;lad=as((ead(),OC(GC(t1,1),Kie,103,0,[cad,bad,aad,_9c,dad])))} +function Ybd(){Ybd=ccb;Xbd=as((Tbd(),OC(GC(C1,1),Kie,249,0,[Qbd,Sbd,Obd,Pbd,Rbd])))} +function cdd(){cdd=ccb;bdd=as((Ucd(),OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd])))} +function _1c(a,b){var c;c=BD(Ohb(a.a,b),134);if(!c){c=new zNb;Rhb(a.a,b,c)}return c} +function hoc(a){var b;b=BD(vNb(a,(wtc(),usc)),305);if(b){return b.a==a}return false} +function ioc(a){var b;b=BD(vNb(a,(wtc(),usc)),305);if(b){return b.i==a}return false} +function Jub(a,b){uCb(b);Iub(a);if(a.d.Ob()){b.td(a.d.Pb());return true}return false} +function Oy(a){if(ybb(a,Ohe)>0){return Ohe}if(ybb(a,Rie)<0){return Rie}return Tbb(a)} +function Cv(a){if(a<3){Xj(a,Hie);return a+1}if(a=0&&b=-0.01&&a.a<=ple&&(a.a=0);a.b>=-0.01&&a.b<=ple&&(a.b=0);return a} +function sfb(a,b){return b==(ntb(),ntb(),mtb)?a.toLocaleLowerCase():a.toLowerCase()} +function idb(a){return ((a.i&2)!=0?'interface ':(a.i&1)!=0?'':'class ')+(fdb(a),a.o)} +function Pnd(a){var b,c;c=(b=new SSd,b);wtd((!a.q&&(a.q=new cUd(n5,a,11,10)),a.q),c)} +function Pdd(a,b){var c;c=b>0?b-1:b;return Vdd(Wdd(Xdd(Ydd(new Zdd,c),a.n),a.j),a.k)} +function u2d(a,b,c,d){var e;a.j=-1;Qxd(a,I2d(a,b,c),(Q6d(),e=BD(b,66).Mj(),e.Ok(d)))} +function VWb(a){this.g=a;this.f=new Rkb;this.a=$wnd.Math.min(this.g.c.c,this.g.d.c)} +function mDb(a){this.b=new Rkb;this.a=new Rkb;this.c=new Rkb;this.d=new Rkb;this.e=a} +function Cnc(a,b){this.a=new Lqb;this.e=new Lqb;this.b=(xzc(),wzc);this.c=a;this.b=b} +function bIb(a,b,c){$Gb.call(this);THb(this);this.a=a;this.c=c;this.b=b.d;this.f=b.e} +function yd(a){this.d=a;this.c=a.c.vc().Kc();this.b=null;this.a=null;this.e=(hs(),gs)} +function zud(a){if(a<0){throw vbb(new Wdb('Illegal Capacity: '+a))}this.g=this.ri(a)} +function avb(a,b){if(0>a||a>b){throw vbb(new scb('fromIndex: 0, toIndex: '+a+oke+b))}} +function Gs(a){var b;if(a.a==a.b.a){throw vbb(new utb)}b=a.a;a.c=b;a.a=a.a.e;return b} +function Zsb(a){var b;yCb(!!a.c);b=a.c.a;Nsb(a.d,a.c);a.b==a.c?(a.b=b):--a.a;a.c=null} +function VAb(a,b){var c;Uzb(a);c=new lBb(a,a.a.rd(),a.a.qd()|4,b);return new YAb(a,c)} +function ke(a,b){var c,d;c=BD(Hv(a.d,b),14);if(!c){return null}d=b;return a.e.pc(d,c)} +function xac(a,b){var c,d;for(d=a.Kc();d.Ob();){c=BD(d.Pb(),70);yNb(c,(wtc(),Ssc),b)}} +function t9b(a){var b;b=Edb(ED(vNb(a,(Nyc(),Zwc))));if(b<0){b=0;yNb(a,Zwc,b)}return b} +function ifc(a,b,c){var d;d=$wnd.Math.max(0,a.b/2-0.5);cfc(c,d,1);Ekb(b,new rfc(c,d))} +function NMc(a,b,c){var d;d=a.a.e[BD(b.a,10).p]-a.a.e[BD(c.a,10).p];return QD(Eeb(d))} +function iZb(a,b,c,d,e,f){var g;g=kZb(d);QZb(g,e);RZb(g,f);Rc(a.a,d,new BZb(g,b,c.f))} +function Bid(a,b){var c;c=YKd(a.Tg(),b);if(!c){throw vbb(new Wdb(ite+b+lte))}return c} +function ntd(a,b){var c;c=a;while(Xod(c)){c=Xod(c);if(c==b){return true}}return false} +function Uw(a,b){var c,d,e;d=b.a.cd();c=BD(b.a.dd(),14).gc();for(e=0;e0){a.a/=b;a.b/=b}return a} +function bKd(a){var b;if(a.w){return a.w}else{b=cKd(a);!!b&&!b.kh()&&(a.w=b);return b}} +function gZd(a){var b;if(a==null){return null}else{b=BD(a,190);return Umd(b,b.length)}} +function qud(a,b){if(a.g==null||b>=a.i)throw vbb(new $zd(b,a.i));return a.li(b,a.g[b])} +function Mmc(a){var b,c;b=a.a.d.j;c=a.c.d.j;while(b!=c){rqb(a.b,b);b=Xcd(b)}rqb(a.b,b)} +function Jmc(a){var b;for(b=0;b=14&&b<=16)));return a} +function dcb(a,b,c){var d=function(){return a.apply(d,arguments)};b.apply(d,c);return d} +function TLc(a,b,c){var d,e;d=b;do{e=Edb(a.p[d.p])+c;a.p[d.p]=e;d=a.a[d.p]}while(d!=b)} +function NQd(a,b){var c,d;d=a.a;c=OQd(a,b,null);d!=b&&!a.e&&(c=QQd(a,b,c));!!c&&c.Fi()} +function ADb(a,b){return Iy(),My(Qie),$wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)} +function Ky(a,b){Iy();My(Qie);return $wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)} +function Akc(a,b){gkc();return beb(a.b.c.length-a.e.c.length,b.b.c.length-b.e.c.length)} +function oo(a,b){return Kv(uo(a,b,Tbb(Ibb(Eie,keb(Tbb(Ibb(b==null?0:tb(b),Fie)),15)))))} +function o0b(){o0b=ccb;n0b=as((j0b(),OC(GC(NQ,1),Kie,267,0,[h0b,g0b,e0b,i0b,f0b,d0b])))} +function n8c(){n8c=ccb;m8c=as((i8c(),OC(GC(r1,1),Kie,291,0,[h8c,g8c,f8c,d8c,c8c,e8c])))} +function K7c(){K7c=ccb;J7c=as((F7c(),OC(GC(o1,1),Kie,248,0,[z7c,C7c,D7c,E7c,A7c,B7c])))} +function Fpc(){Fpc=ccb;Epc=as((Apc(),OC(GC(EW,1),Kie,227,0,[wpc,ypc,vpc,xpc,zpc,upc])))} +function Drc(){Drc=ccb;Crc=as((yrc(),OC(GC(OW,1),Kie,275,0,[wrc,trc,xrc,vrc,urc,rrc])))} +function qrc(){qrc=ccb;prc=as((lrc(),OC(GC(NW,1),Kie,274,0,[irc,hrc,krc,grc,jrc,frc])))} +function tzc(){tzc=ccb;szc=as((lzc(),OC(GC(YW,1),Kie,313,0,[jzc,hzc,fzc,gzc,kzc,izc])))} +function Yqc(){Yqc=ccb;Xqc=as((Sqc(),OC(GC(LW,1),Kie,276,0,[Nqc,Mqc,Pqc,Oqc,Rqc,Qqc])))} +function wSc(){wSc=ccb;vSc=as((qSc(),OC(GC(t$,1),Kie,327,0,[pSc,lSc,nSc,mSc,oSc,kSc])))} +function ycd(){ycd=ccb;xcd=as((rcd(),OC(GC(E1,1),Kie,273,0,[pcd,ncd,ocd,mcd,lcd,qcd])))} +function Rad(){Rad=ccb;Qad=as((Mad(),OC(GC(w1,1),Kie,312,0,[Kad,Iad,Lad,Gad,Jad,Had])))} +function Lbd(){Hbd();return OC(GC(B1,1),Kie,93,0,[zbd,ybd,Bbd,Gbd,Fbd,Ebd,Cbd,Dbd,Abd])} +function vkd(a,b){var c;c=a.a;a.a=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,0,c,a.a))} +function wkd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,1,c,a.b))} +function hmd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,3,c,a.b))} +function ald(a,b){var c;c=a.f;a.f=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,3,c,a.f))} +function cld(a,b){var c;c=a.g;a.g=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,4,c,a.g))} +function dld(a,b){var c;c=a.i;a.i=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,5,c,a.i))} +function eld(a,b){var c;c=a.j;a.j=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,6,c,a.j))} +function omd(a,b){var c;c=a.j;a.j=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,1,c,a.j))} +function imd(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,4,c,a.c))} +function pmd(a,b){var c;c=a.k;a.k=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new lSd(a,2,c,a.k))} +function qQd(a,b){var c;c=a.d;a.d=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new mSd(a,2,c,a.d))} +function AId(a,b){var c;c=a.s;a.s=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new mSd(a,4,c,a.s))} +function DId(a,b){var c;c=a.t;a.t=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new mSd(a,5,c,a.t))} +function _Jd(a,b){var c;c=a.F;a.F=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,5,c,b))} +function izd(a,b){var c;c=BD(Ohb((pEd(),oEd),a),55);return c?c.xj(b):KC(SI,Uhe,1,b,5,1)} +function Xpd(a,b){var c,d;c=b in a.a;if(c){d=aC(a,b).he();if(d){return d.a}}return null} +function ftd(a,b){var c,d,e;c=(d=(Fhd(),e=new Jod,e),!!b&&God(d,b),d);Hod(c,a);return c} +function LLd(a,b,c){Itd(a,c);if(!a.Bk()&&c!=null&&!a.wj(c)){throw vbb(new tcb)}return c} +function Xdd(a,b){a.n=b;if(a.n){a.f=new Rkb;a.e=new Rkb}else{a.f=null;a.e=null}return a} +function ndb(a,b,c,d,e,f){var g;g=ldb(a,b);zdb(c,g);g.i=e?8:0;g.f=d;g.e=e;g.g=f;return g} +function rSd(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=1;this.c=a;this.a=c} +function tSd(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=2;this.c=a;this.a=c} +function BSd(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=6;this.c=a;this.a=c} +function GSd(a,b,c,d,e){this.d=b;this.k=d;this.f=e;this.o=-1;this.p=7;this.c=a;this.a=c} +function xSd(a,b,c,d,e){this.d=b;this.j=d;this.e=e;this.o=-1;this.p=4;this.c=a;this.a=c} +function rDb(a,b){var c,d,e,f;for(d=b,e=0,f=d.length;e=0);if(ekb(a.d,a.c)<0){a.a=a.a-1&a.d.a.length-1;a.b=a.d.c}a.c=-1} +function pgb(a){if(a.a<54){return a.f<0?-1:a.f>0?1:0}return (!a.c&&(a.c=fhb(a.f)),a.c).e} +function My(a){if(!(a>=0)){throw vbb(new Wdb('tolerance ('+a+') must be >= 0'))}return a} +function n4c(){if(!f4c){f4c=new m4c;l4c(f4c,OC(GC(C0,1),Uhe,130,0,[new Z9c]))}return f4c} +function KAc(){KAc=ccb;JAc=new LAc(ole,0);HAc=new LAc('INPUT',1);IAc=new LAc('OUTPUT',2)} +function bqc(){bqc=ccb;$pc=new cqc('ARD',0);aqc=new cqc('MSD',1);_pc=new cqc('MANUAL',2)} +function rGc(){rGc=ccb;oGc=new sGc('BARYCENTER',0);pGc=new sGc(Bne,1);qGc=new sGc(Cne,2)} +function ztd(a,b){var c;c=a.gc();if(b<0||b>c)throw vbb(new Cyd(b,c));return new czd(a,b)} +function JAd(a,b){var c;if(JD(b,42)){return a.c.Mc(b)}else{c=qAd(a,b);LAd(a,b);return c}} +function $nd(a,b,c){yId(a,b);pnd(a,c);AId(a,0);DId(a,1);CId(a,true);BId(a,true);return a} +function Xj(a,b){if(a<0){throw vbb(new Wdb(b+' cannot be negative but was: '+a))}return a} +function Bt(a,b){var c,d;for(c=0,d=a.gc();c0){return BD(Ikb(c.a,d-1),10)}return null} +function Lkd(a,b){var c;c=a.k;a.k=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,2,c,a.k))} +function kmd(a,b){var c;c=a.f;a.f=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,8,c,a.f))} +function lmd(a,b){var c;c=a.i;a.i=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,7,c,a.i))} +function Hod(a,b){var c;c=a.a;a.a=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,8,c,a.a))} +function zpd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,0,c,a.b))} +function UUd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,0,c,a.b))} +function VUd(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,1,c,a.c))} +function Apd(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,1,c,a.c))} +function pQd(a,b){var c;c=a.c;a.c=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,4,c,a.c))} +function PHd(a,b){var c;c=a.d;a.d=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,1,c,a.d))} +function jKd(a,b){var c;c=a.D;a.D=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,2,c,a.D))} +function Rdd(a,b){if(a.r>0&&a.c0&&a.g!=0&&Rdd(a.i,b/a.r*a.i.d)}} +function dge(a,b,c){var d;a.b=b;a.a=c;d=(a.a&512)==512?new hee:new ude;a.c=ode(d,a.b,a.a)} +function g3d(a,b){return T6d(a.e,b)?(Q6d(),YId(b)?new R7d(b,a):new f7d(b,a)):new c8d(b,a)} +function _o(a,b){return Fv(vo(a.a,b,Tbb(Ibb(Eie,keb(Tbb(Ibb(b==null?0:tb(b),Fie)),15)))))} +function Nyb(a,b,c){return Ayb(a,new Kzb(b),new Mzb,new Ozb(c),OC(GC(xL,1),Kie,132,0,[]))} +function pAb(a){var b,c;if(0>a){return new yAb}b=a+1;c=new rAb(b,a);return new vAb(null,c)} +function umb(a,b){mmb();var c;c=new Mqb(1);ND(a)?Shb(c,a,b):jrb(c.f,a,b);return new iob(c)} +function aMb(a,b){var c,d;c=a.o+a.p;d=b.o+b.p;if(cb){b<<=1;return b>0?b:Iie}return b} +function xc(a){Ub(a.e!=3);switch(a.e){case 2:return false;case 0:return true;}return zc(a)} +function T6c(a,b){var c;if(JD(b,8)){c=BD(b,8);return a.a==c.a&&a.b==c.b}else{return false}} +function _Mb(a,b,c){var d,e,f;f=b>>5;e=b&31;d=xbb(Pbb(a.n[c][f],Tbb(Nbb(e,1))),3);return d} +function IAd(a,b){var c,d;for(d=b.vc().Kc();d.Ob();){c=BD(d.Pb(),42);HAd(a,c.cd(),c.dd())}} +function N1c(a,b){var c;c=new tOb;BD(b.b,65);BD(b.b,65);BD(b.b,65);Hkb(b.a,new T1c(a,c,b))} +function DUd(a,b){var c;c=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,21,c,a.b))} +function jmd(a,b){var c;c=a.d;a.d=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,11,c,a.d))} +function _Id(a,b){var c;c=a.j;a.j=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,13,c,a.j))} +function $jb(a,b,c){var d,e,f;f=a.a.length-1;for(e=a.b,d=0;d>>31}d!=0&&(a[c]=d)} +function rmb(a,b){mmb();var c,d;d=new Rkb;for(c=0;c0){this.g=this.ri(this.i+(this.i/8|0)+1);a.Qc(this.g)}} +function u3d(a,b){k2d.call(this,D9,a,b);this.b=this;this.a=S6d(a.Tg(),XKd(this.e.Tg(),this.c))} +function Ld(a,b){var c,d;uCb(b);for(d=b.vc().Kc();d.Ob();){c=BD(d.Pb(),42);a.zc(c.cd(),c.dd())}} +function G2d(a,b,c){var d;for(d=c.Kc();d.Ob();){if(!E2d(a,b,d.Pb())){return false}}return true} +function sVd(a,b,c,d,e){var f;if(c){f=bLd(b.Tg(),a.c);e=c.gh(b,-1-(f==-1?d:f),null,e)}return e} +function tVd(a,b,c,d,e){var f;if(c){f=bLd(b.Tg(),a.c);e=c.ih(b,-1-(f==-1?d:f),null,e)}return e} +function Mgb(a){var b;if(a.b==-2){if(a.e==0){b=-1}else{for(b=0;a.a[b]==0;b++);}a.b=b}return a.b} +function Z4b(a){switch(a.g){case 2:return Ucd(),Tcd;case 4:return Ucd(),zcd;default:return a;}} +function $4b(a){switch(a.g){case 1:return Ucd(),Rcd;case 3:return Ucd(),Acd;default:return a;}} +function nkc(a){var b,c,d;return a.j==(Ucd(),Acd)&&(b=pkc(a),c=uqb(b,zcd),d=uqb(b,Tcd),d||d&&c)} +function oqb(a){var b,c;b=BD(a.e&&a.e(),9);c=BD(ZBb(b,b.length),9);return new xqb(b,c,b.length)} +function l7b(a,b){Odd(b,zne,1);UGb(TGb(new YGb((a$b(),new l$b(a,false,false,new T$b)))));Qdd(b)} +function Fcb(a,b){Bcb();return ND(a)?cfb(a,GD(b)):LD(a)?Ddb(a,ED(b)):KD(a)?Dcb(a,DD(b)):a.wd(b)} +function WZc(a,b){b.q=a;a.d=$wnd.Math.max(a.d,b.r);a.b+=b.d+(a.a.c.length==0?0:a.c);Ekb(a.a,b)} +function m6c(a,b){var c,d,e,f;e=a.c;c=a.c+a.b;f=a.d;d=a.d+a.a;return b.a>e&&b.af&&b.b1||a.Ob()){++a.a;a.g=0;b=a.i;a.Ob();return b}else{throw vbb(new utb)}} +function kNc(a){fNc();var b;if(!Lpb(eNc,a)){b=new hNc;b.a=a;Opb(eNc,a,b)}return BD(Mpb(eNc,a),635)} +function Rbb(a){var b,c,d,e;e=a;d=0;if(e<0){e+=Ije;d=Fje}c=QD(e/Hje);b=QD(e-c*Hje);return TC(b,c,d)} +function Ox(a){var b,c,d;d=0;for(c=new Gqb(a.a);c.a>22);e=a.h+b.h+(d>>22);return TC(c&Eje,d&Eje,e&Fje)} +function nD(a,b){var c,d,e;c=a.l-b.l;d=a.m-b.m+(c>>22);e=a.h-b.h+(d>>22);return TC(c&Eje,d&Eje,e&Fje)} +function bdb(a){var b;if(a<128){b=(ddb(),cdb)[a];!b&&(b=cdb[a]=new Xcb(a));return b}return new Xcb(a)} +function ubb(a){var b;if(JD(a,78)){return a}b=a&&a.__java$exception;if(!b){b=new lz(a);Sz(b)}return b} +function btd(a){if(JD(a,186)){return BD(a,118)}else if(!a){throw vbb(new Heb(gue))}else{return null}} +function Zjb(a,b){if(b==null){return false}while(a.a!=a.b){if(pb(b,vkb(a))){return true}}return false} +function kib(a){if(a.a.Ob()){return true}if(a.a!=a.d){return false}a.a=new orb(a.e.f);return a.a.Ob()} +function Gkb(a,b){var c,d;c=b.Pc();d=c.length;if(d==0){return false}bCb(a.c,a.c.length,c);return true} +function Vyb(a,b,c){var d,e;for(e=b.vc().Kc();e.Ob();){d=BD(e.Pb(),42);a.yc(d.cd(),d.dd(),c)}return a} +function yac(a,b){var c,d;for(d=new olb(a.b);d.a=0,'Negative initial capacity');mCb(b>=0,'Non-positive load factor');Uhb(this)} +function _Ed(a,b,c){if(a>=128)return false;return a<64?Kbb(xbb(Nbb(1,a),c),0):Kbb(xbb(Nbb(1,a-64),b),0)} +function bOb(a,b){if(!a||!b||a==b){return false}return Jy(a.b.c,b.b.c+b.b.b)<0&&Jy(b.b.c,a.b.c+a.b.b)<0} +function I4b(a){var b,c,d;c=a.n;d=a.o;b=a.d;return new J6c(c.a-b.b,c.b-b.d,d.a+(b.b+b.c),d.b+(b.d+b.a))} +function $ic(a){var b,c,d,e;for(c=a.a,d=0,e=c.length;dd)throw vbb(new Cyd(b,d));a.hi()&&(c=Dtd(a,c));return a.Vh(b,c)} +function xNb(a,b,c){return c==null?(!a.q&&(a.q=new Lqb),Thb(a.q,b)):(!a.q&&(a.q=new Lqb),Rhb(a.q,b,c)),a} +function yNb(a,b,c){c==null?(!a.q&&(a.q=new Lqb),Thb(a.q,b)):(!a.q&&(a.q=new Lqb),Rhb(a.q,b,c));return a} +function TQb(a){var b,c;c=new kRb;tNb(c,a);yNb(c,(HSb(),FSb),a);b=new Lqb;VQb(a,c,b);UQb(a,c,b);return c} +function j6c(a){i6c();var b,c,d;c=KC(m1,nie,8,2,0,1);d=0;for(b=0;b<2;b++){d+=0.5;c[b]=r6c(d,a)}return c} +function Mic(a,b){var c,d,e,f;c=false;d=a.a[b].length;for(f=0;f>=1);return b}} +function $C(a){var b,c;c=heb(a.h);if(c==32){b=heb(a.m);return b==32?heb(a.l)+32:b+20-10}else{return c-12}} +function bkb(a){var b;b=a.a[a.b];if(b==null){return null}NC(a.a,a.b,null);a.b=a.b+1&a.a.length-1;return b} +function EDc(a){var b,c;b=a.t-a.k[a.o.p]*a.d+a.j[a.o.p]>a.f;c=a.u+a.e[a.o.p]*a.d>a.f*a.s*a.d;return b||c} +function Iwb(a,b,c){var d,e;d=new exb(b,c);e=new fxb;a.b=Gwb(a,a.b,d,e);e.b||++a.c;a.b.b=false;return e.d} +function djc(a,b,c){var d,e,f,g;g=CHc(b,c);f=0;for(e=g.Kc();e.Ob();){d=BD(e.Pb(),11);Rhb(a.c,d,meb(f++))}} +function xVb(a){var b,c;for(c=new olb(a.a.b);c.ac&&(c=a[b])}return c} +function SHc(a,b,c){var d;d=new Rkb;UHc(a,b,d,(Ucd(),zcd),true,false);UHc(a,c,d,Tcd,false,false);return d} +function crd(a,b,c){var d,e,f,g;f=null;g=b;e=Ypd(g,'labels');d=new Hrd(a,c);f=(Dqd(d.a,d.b,e),e);return f} +function j1d(a,b,c,d){var e;e=r1d(a,b,c,d);if(!e){e=i1d(a,c,d);if(!!e&&!e1d(a,b,e)){return null}}return e} +function m1d(a,b,c,d){var e;e=s1d(a,b,c,d);if(!e){e=l1d(a,c,d);if(!!e&&!e1d(a,b,e)){return null}}return e} +function Xb(a,b){var c;for(c=0;c1||b>=0&&a.b<3} +function w7c(a){var b,c,d;b=new s7c;for(d=Jsb(a,0);d.b!=d.d.c;){c=BD(Xsb(d),8);St(b,0,new g7c(c))}return b} +function qVb(a){var b,c;for(c=new olb(a.a.b);c.ad?1:0} +function NYb(a,b){if(OYb(a,b)){Rc(a.b,BD(vNb(b,(wtc(),Esc)),21),b);Dsb(a.a,b);return true}else{return false}} +function d3b(a){var b,c;b=BD(vNb(a,(wtc(),gtc)),10);if(b){c=b.c;Lkb(c.a,b);c.a.c.length==0&&Lkb(Q_b(b).b,c)}} +function syb(a){if(lyb){return KC(qL,tke,572,0,0,1)}return BD(Qkb(a.a,KC(qL,tke,572,a.a.c.length,0,1)),842)} +function mn(a,b,c,d){Vm();return new wx(OC(GC(CK,1),zie,42,0,[(Wj(a,b),new Wo(a,b)),(Wj(c,d),new Wo(c,d))]))} +function Dnd(a,b,c){var d,e;e=(d=new SSd,d);$nd(e,b,c);wtd((!a.q&&(a.q=new cUd(n5,a,11,10)),a.q),e);return e} +function Zmd(a){var b,c,d,e;e=icb(Rmd,a);c=e.length;d=KC(ZI,nie,2,c,6,1);for(b=0;b=a.b.c.length){return}aub(a,2*b+1);c=2*b+2;c=0&&a[d]===b[d];d--);return d<0?0:Gbb(xbb(a[d],Yje),xbb(b[d],Yje))?-1:1} +function UFc(a,b){var c,d;for(d=Jsb(a,0);d.b!=d.d.c;){c=BD(Xsb(d),214);if(c.e.length>0){b.td(c);c.i&&_Fc(c)}}} +function nzd(a,b){var c,d;d=BD(Ajd(a.a,4),126);c=KC($3,hve,415,b,0,1);d!=null&&$fb(d,0,c,0,d.length);return c} +function JEd(a,b){var c;c=new NEd((a.f&256)!=0,a.i,a.a,a.d,(a.f&16)!=0,a.j,a.g,b);a.e!=null||(c.c=a);return c} +function Dc(a,b){var c,d;for(d=a.Zb().Cc().Kc();d.Ob();){c=BD(d.Pb(),14);if(c.Hc(b)){return true}}return false} +function oNb(a,b,c,d,e){var f,g;for(g=c;g<=e;g++){for(f=b;f<=d;f++){if(YMb(a,f,g)){return true}}}return false} +function Tt(a,b,c){var d,e,f,g;uCb(c);g=false;f=a.Zc(b);for(e=c.Kc();e.Ob();){d=e.Pb();f.Rb(d);g=true}return g} +function Dv(a,b){var c;if(a===b){return true}else if(JD(b,83)){c=BD(b,83);return Ax(Wm(a),c.vc())}return false} +function Nhb(a,b,c){var d,e;for(e=c.Kc();e.Ob();){d=BD(e.Pb(),42);if(a.re(b,d.dd())){return true}}return false} +function Hic(a,b,c){if(!a.d[b.p][c.p]){Gic(a,b,c);a.d[b.p][c.p]=true;a.d[c.p][b.p]=true}return a.a[b.p][c.p]} +function Itd(a,b){if(!a.ai()&&b==null){throw vbb(new Wdb("The 'no null' constraint is violated"))}return b} +function $Jd(a,b){if(a.D==null&&a.B!=null){a.D=a.B;a.B=null}jKd(a,b==null?null:(uCb(b),b));!!a.C&&a.yk(null)} +function XHc(a,b){var c;if(!a||a==b||!wNb(b,(wtc(),Psc))){return false}c=BD(vNb(b,(wtc(),Psc)),10);return c!=a} +function b4d(a){switch(a.i){case 2:{return true}case 1:{return false}case -1:{++a.c}default:{return a.pl()}}} +function c4d(a){switch(a.i){case -2:{return true}case -1:{return false}case 1:{--a.c}default:{return a.ql()}}} +function Xdb(a){Zy.call(this,'The given string does not match the expected format for individual spacings.',a)} +function pgd(){pgd=ccb;mgd=new qgd('ELK',0);ngd=new qgd('JSON',1);lgd=new qgd('DOT',2);ogd=new qgd('SVG',3)} +function pWc(){pWc=ccb;mWc=new rWc(ane,0);nWc=new rWc('RADIAL_COMPACTION',1);oWc=new rWc('WEDGE_COMPACTION',2)} +function Fyb(){Fyb=ccb;Cyb=new Gyb('CONCURRENT',0);Dyb=new Gyb('IDENTITY_FINISH',1);Eyb=new Gyb('UNORDERED',2)} +function nPb(){nPb=ccb;kPb=(cPb(),bPb);jPb=new Nsd(Tle,kPb);iPb=new Lsd(Ule);lPb=new Lsd(Vle);mPb=new Lsd(Wle)} +function Occ(){Occ=ccb;Mcc=new Zcc;Ncc=new _cc;Lcc=new bdc;Kcc=new fdc;Jcc=new jdc;Icc=(uCb(Jcc),new bpb)} +function tBc(){tBc=ccb;qBc=new uBc('CONSERVATIVE',0);rBc=new uBc('CONSERVATIVE_SOFT',1);sBc=new uBc('SLOPPY',2)} +function Zad(){Zad=ccb;Xad=new q0b(15);Wad=new Osd((Y9c(),f9c),Xad);Yad=C9c;Sad=s8c;Tad=Y8c;Vad=_8c;Uad=$8c} +function o7c(a,b,c){var d,e,f;d=new Psb;for(f=Jsb(c,0);f.b!=f.d.c;){e=BD(Xsb(f),8);Dsb(d,new g7c(e))}Tt(a,b,d)} +function r7c(a){var b,c,d;b=0;d=KC(m1,nie,8,a.b,0,1);c=Jsb(a,0);while(c.b!=c.d.c){d[b++]=BD(Xsb(c),8)}return d} +function $Pd(a){var b;b=(!a.a&&(a.a=new cUd(g5,a,9,5)),a.a);if(b.i!=0){return nQd(BD(qud(b,0),678))}return null} +function Ly(a,b){var c;c=wbb(a,b);if(Gbb(Vbb(a,b),0)|Ebb(Vbb(a,c),0)){return c}return wbb(rie,Vbb(Pbb(c,63),1))} +function Yyc(a,b){var c;c=Ksd((dzc(),bzc))!=null&&b.wg()!=null?Edb(ED(b.wg()))/Edb(ED(Ksd(bzc))):1;Rhb(a.b,b,c)} +function le(a,b){var c,d;c=BD(a.d.Bc(b),14);if(!c){return null}d=a.e.hc();d.Gc(c);a.e.d-=c.gc();c.$b();return d} +function AHc(a,b){var c,d;d=a.c[b];if(d==0){return}a.c[b]=0;a.d-=d;c=b+1;while(c0){return _vb(b-1,a.a.c.length),Kkb(a.a,b-1)}else{throw vbb(new Jpb)}} +function C2c(a,b,c){if(b<0){throw vbb(new qcb(ese+b))}if(bb){throw vbb(new Wdb(xke+a+yke+b))}if(a<0||b>c){throw vbb(new scb(xke+a+zke+b+oke+c))}} +function j5c(a){if(!a.a||(a.a.i&8)==0){throw vbb(new Zdb('Enumeration class expected for layout option '+a.f))}} +function vud(a){var b;++a.j;if(a.i==0){a.g=null}else if(a.iRqe?a-c>Rqe:c-a>Rqe} +function pHb(a,b){if(!a){return 0}if(b&&!a.j){return 0}if(JD(a,124)){if(BD(a,124).a.b==0){return 0}}return a.Re()} +function qHb(a,b){if(!a){return 0}if(b&&!a.k){return 0}if(JD(a,124)){if(BD(a,124).a.a==0){return 0}}return a.Se()} +function fhb(a){Hgb();if(a<0){if(a!=-1){return new Tgb(-1,-a)}return Bgb}else return a<=10?Dgb[QD(a)]:new Tgb(1,a)} +function xC(a){rC();throw vbb(new MB("Unexpected typeof result '"+a+"'; please report this bug to the GWT team"))} +function lz(a){jz();Py(this);Ry(this);this.e=a;Sy(this,a);this.g=a==null?Xhe:fcb(a);this.a='';this.b=a;this.a=''} +function F$c(){this.a=new G$c;this.f=new I$c(this);this.b=new K$c(this);this.i=new M$c(this);this.e=new O$c(this)} +function ss(){rs.call(this,new _rb(Cv(16)));Xj(2,mie);this.b=2;this.a=new Ms(null,null,0,null);As(this.a,this.a)} +function xzc(){xzc=ccb;uzc=new zzc('DUMMY_NODE_OVER',0);vzc=new zzc('DUMMY_NODE_UNDER',1);wzc=new zzc('EQUAL',2)} +function LUb(){LUb=ccb;JUb=Fx(OC(GC(t1,1),Kie,103,0,[(ead(),aad),bad]));KUb=Fx(OC(GC(t1,1),Kie,103,0,[dad,_9c]))} +function VQc(a){return (Ucd(),Lcd).Hc(a.j)?Edb(ED(vNb(a,(wtc(),qtc)))):l7c(OC(GC(m1,1),nie,8,0,[a.i.n,a.n,a.a])).b} +function DOb(a){var b,c,d,e;d=a.b.a;for(c=d.a.ec().Kc();c.Ob();){b=BD(c.Pb(),561);e=new MPb(b,a.e,a.f);Ekb(a.g,e)}} +function yId(a,b){var c,d,e;d=a.nk(b,null);e=null;if(b){e=(LFd(),c=new UQd,c);NQd(e,a.r)}d=xId(a,e,d);!!d&&d.Fi()} +function VFc(a,b){var c,d;d=Cub(a.d,1)!=0;c=true;while(c){c=false;c=b.c.Tf(b.e,d);c=c|dGc(a,b,d,false);d=!d}$Fc(a)} +function wZc(a,b){var c,d,e;d=false;c=b.q.d;if(b.de){$Zc(b.q,e);d=c!=b.q.d}}return d} +function PVc(a,b){var c,d,e,f,g,h,i,j;i=b.i;j=b.j;d=a.f;e=d.i;f=d.j;g=i-e;h=j-f;c=$wnd.Math.sqrt(g*g+h*h);return c} +function Rnd(a,b){var c,d;d=jid(a);if(!d){!And&&(And=new lUd);c=(IEd(),PEd(b));d=new s0d(c);wtd(d.Vk(),a)}return d} +function Sc(a,b){var c,d;c=BD(a.c.Bc(b),14);if(!c){return a.jc()}d=a.hc();d.Gc(c);a.d-=c.gc();c.$b();return a.mc(d)} +function j7c(a,b){var c;for(c=0;c=a.c.b:a.a<=a.c.b)){throw vbb(new utb)}b=a.a;a.a+=a.c.c;++a.b;return meb(b)} +function BWb(a){var b;b=new VWb(a);rXb(a.a,zWb,new amb(OC(GC(bQ,1),Uhe,369,0,[b])));!!b.d&&Ekb(b.f,b.d);return b.f} +function Z1b(a){var b;b=new q_b(a.a);tNb(b,a);yNb(b,(wtc(),$sc),a);b.o.a=a.g;b.o.b=a.f;b.n.a=a.i;b.n.b=a.j;return b} +function A9b(a,b,c,d){var e,f;for(f=a.Kc();f.Ob();){e=BD(f.Pb(),70);e.n.a=b.a+(d.a-e.o.a)/2;e.n.b=b.b;b.b+=e.o.b+c}} +function UDb(a,b,c){var d,e;for(e=b.a.a.ec().Kc();e.Ob();){d=BD(e.Pb(),57);if(VDb(a,d,c)){return true}}return false} +function JDc(a){var b,c;for(c=new olb(a.r);c.a=0?b:-b;while(d>0){if(d%2==0){c*=c;d=d/2|0}else{e*=c;d-=1}}return b<0?1/e:e} +function y6c(a,b){var c,d,e;e=1;c=a;d=b>=0?b:-b;while(d>0){if(d%2==0){c*=c;d=d/2|0}else{e*=c;d-=1}}return b<0?1/e:e} +function sAd(a){var b,c,d,e;if(a!=null){for(c=0;c0){c=BD(Ikb(a.a,a.a.c.length-1),570);if(NYb(c,b)){return}}Ekb(a.a,new PYb(b))} +function $gc(a){Hgc();var b,c;b=a.d.c-a.e.c;c=BD(a.g,145);Hkb(c.b,new shc(b));Hkb(c.c,new uhc(b));reb(c.i,new whc(b))} +function gic(a){var b;b=new Ufb;b.a+='VerticalSegment ';Pfb(b,a.e);b.a+=' ';Qfb(b,Eb(new Gb,new olb(a.k)));return b.a} +function u4c(a){var b;b=BD(Wrb(a.c.c,''),229);if(!b){b=new W3c(d4c(c4c(new e4c,''),'Other'));Xrb(a.c.c,'',b)}return b} +function qnd(a){var b;if((a.Db&64)!=0)return Eid(a);b=new Jfb(Eid(a));b.a+=' (name: ';Efb(b,a.zb);b.a+=')';return b.a} +function Jnd(a,b,c){var d,e;e=a.sb;a.sb=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new nSd(a,1,4,e,b);!c?(c=d):c.Ei(d)}return c} +function _ic(a,b){var c,d,e;c=0;for(e=V_b(a,b).Kc();e.Ob();){d=BD(e.Pb(),11);c+=vNb(d,(wtc(),gtc))!=null?1:0}return c} +function vPc(a,b,c){var d,e,f;d=0;for(f=Jsb(a,0);f.b!=f.d.c;){e=Edb(ED(Xsb(f)));if(e>c){break}else e>=b&&++d}return d} +function RTd(a,b,c){var d,e;d=new pSd(a.e,3,13,null,(e=b.c,e?e:(jGd(),YFd)),HLd(a,b),false);!c?(c=d):c.Ei(d);return c} +function STd(a,b,c){var d,e;d=new pSd(a.e,4,13,(e=b.c,e?e:(jGd(),YFd)),null,HLd(a,b),false);!c?(c=d):c.Ei(d);return c} +function zId(a,b,c){var d,e;e=a.r;a.r=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new nSd(a,1,8,e,a.r);!c?(c=d):c.Ei(d)}return c} +function o1d(a,b){var c,d;c=BD(b,676);d=c.vk();!d&&c.wk(d=JD(b,88)?new C1d(a,BD(b,26)):new O1d(a,BD(b,148)));return d} +function kud(a,b,c){var d;a.qi(a.i+1);d=a.oi(b,c);b!=a.i&&$fb(a.g,b,a.g,b+1,a.i-b);NC(a.g,b,d);++a.i;a.bi(b,c);a.ci()} +function vwb(a,b){var c;if(b.a){c=b.a.a.length;!a.a?(a.a=new Wfb(a.d)):Qfb(a.a,a.b);Ofb(a.a,b.a,b.d.length,c)}return a} +function __d(a,b){var c,d,e,f;b.vi(a.a);f=BD(Ajd(a.a,8),1936);if(f!=null){for(c=f,d=0,e=c.length;dc){throw vbb(new qcb(xke+a+zke+b+', size: '+c))}if(a>b){throw vbb(new Wdb(xke+a+yke+b))}} +function eid(a,b,c){if(b<0){vid(a,c)}else{if(!c.Ij()){throw vbb(new Wdb(ite+c.ne()+jte))}BD(c,66).Nj().Vj(a,a.yh(),b)}} +function Jlb(a,b,c,d,e,f,g,h){var i;i=c;while(f=d||b=65&&a<=70){return a-65+10}if(a>=97&&a<=102){return a-97+10}if(a>=48&&a<=57){return a-48}return 0} +function QHd(a){var b;if((a.Db&64)!=0)return Eid(a);b=new Jfb(Eid(a));b.a+=' (source: ';Efb(b,a.d);b.a+=')';return b.a} +function OQd(a,b,c){var d,e;e=a.a;a.a=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new nSd(a,1,5,e,a.a);!c?(c=d):Qwd(c,d)}return c} +function BId(a,b){var c;c=(a.Bb&256)!=0;b?(a.Bb|=256):(a.Bb&=-257);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,2,c,b))} +function eLd(a,b){var c;c=(a.Bb&256)!=0;b?(a.Bb|=256):(a.Bb&=-257);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,8,c,b))} +function LPd(a,b){var c;c=(a.Bb&256)!=0;b?(a.Bb|=256):(a.Bb&=-257);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,8,c,b))} +function CId(a,b){var c;c=(a.Bb&512)!=0;b?(a.Bb|=512):(a.Bb&=-513);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,3,c,b))} +function fLd(a,b){var c;c=(a.Bb&512)!=0;b?(a.Bb|=512):(a.Bb&=-513);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,9,c,b))} +function N7d(a,b){var c;if(a.b==-1&&!!a.a){c=a.a.Gj();a.b=!c?bLd(a.c.Tg(),a.a):a.c.Xg(a.a.aj(),c)}return a.c.Og(a.b,b)} +function meb(a){var b,c;if(a>-129&&a<128){b=a+128;c=(oeb(),neb)[b];!c&&(c=neb[b]=new _db(a));return c}return new _db(a)} +function Web(a){var b,c;if(a>-129&&a<128){b=a+128;c=(Yeb(),Xeb)[b];!c&&(c=Xeb[b]=new Qeb(a));return c}return new Qeb(a)} +function L5b(a){var b,c;b=a.k;if(b==(j0b(),e0b)){c=BD(vNb(a,(wtc(),Hsc)),61);return c==(Ucd(),Acd)||c==Rcd}return false} +function i1d(a,b,c){var d,e,f;f=(e=nUd(a.b,b),e);if(f){d=BD(V1d(p1d(a,f),''),26);if(d){return r1d(a,d,b,c)}}return null} +function l1d(a,b,c){var d,e,f;f=(e=nUd(a.b,b),e);if(f){d=BD(V1d(p1d(a,f),''),26);if(d){return s1d(a,d,b,c)}}return null} +function cTd(a,b){var c,d;for(d=new Fyd(a);d.e!=d.i.gc();){c=BD(Dyd(d),138);if(PD(b)===PD(c)){return true}}return false} +function vtd(a,b,c){var d;d=a.gc();if(b>d)throw vbb(new Cyd(b,d));if(a.hi()&&a.Hc(c)){throw vbb(new Wdb(kue))}a.Xh(b,c)} +function iqd(a,b){var c;c=oo(a.i,b);if(c==null){throw vbb(new cqd('Node did not exist in input.'))}Yqd(b,c);return null} +function $hd(a,b){var c;c=YKd(a,b);if(JD(c,322)){return BD(c,34)}throw vbb(new Wdb(ite+b+"' is not a valid attribute"))} +function V2d(a,b,c){var d,e;e=JD(b,99)&&(BD(b,18).Bb&Tje)!=0?new s4d(b,a):new p4d(b,a);for(d=0;db){return 1}if(a==b){return a==0?Kdb(1/a,1/b):0}return isNaN(a)?isNaN(b)?0:1:-1} +function f4b(a,b){Odd(b,'Sort end labels',1);MAb(JAb(LAb(new YAb(null,new Kub(a.b,16)),new q4b),new s4b),new u4b);Qdd(b)} +function Wxd(a,b,c){var d,e;if(a.ej()){e=a.fj();d=sud(a,b,c);a.$i(a.Zi(7,meb(c),d,b,e));return d}else{return sud(a,b,c)}} +function vAd(a,b){var c,d,e;if(a.d==null){++a.e;--a.f}else{e=b.cd();c=b.Sh();d=(c&Ohe)%a.d.length;KAd(a,d,xAd(a,d,c,e))}} +function ZId(a,b){var c;c=(a.Bb&zte)!=0;b?(a.Bb|=zte):(a.Bb&=-1025);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,10,c,b))} +function dJd(a,b){var c;c=(a.Bb&Rje)!=0;b?(a.Bb|=Rje):(a.Bb&=-4097);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,12,c,b))} +function eJd(a,b){var c;c=(a.Bb&Cve)!=0;b?(a.Bb|=Cve):(a.Bb&=-8193);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,15,c,b))} +function fJd(a,b){var c;c=(a.Bb&Dve)!=0;b?(a.Bb|=Dve):(a.Bb&=-2049);(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new qSd(a,1,11,c,b))} +function jOb(a,b){var c;c=Kdb(a.b.c,b.b.c);if(c!=0){return c}c=Kdb(a.a.a,b.a.a);if(c!=0){return c}return Kdb(a.a.b,b.a.b)} +function jqd(a,b){var c;c=Ohb(a.k,b);if(c==null){throw vbb(new cqd('Port did not exist in input.'))}Yqd(b,c);return null} +function k6d(a){var b,c;for(c=l6d(bKd(a)).Kc();c.Ob();){b=GD(c.Pb());if(Dmd(a,b)){return uFd((tFd(),sFd),b)}}return null} +function n3d(a,b){var c,d,e,f,g;g=S6d(a.e.Tg(),b);f=0;c=BD(a.g,119);for(e=0;e>10)+Uje&aje;b[1]=(a&1023)+56320&aje;return zfb(b,0,b.length)} +function a_b(a){var b,c;c=BD(vNb(a,(Nyc(),Lwc)),103);if(c==(ead(),cad)){b=Edb(ED(vNb(a,owc)));return b>=1?bad:_9c}return c} +function rec(a){switch(BD(vNb(a,(Nyc(),Swc)),218).g){case 1:return new Fmc;case 3:return new wnc;default:return new zmc;}} +function Uzb(a){if(a.c){Uzb(a.c)}else if(a.d){throw vbb(new Zdb("Stream already terminated, can't be modified or used"))}} +function Mkd(a){var b;if((a.Db&64)!=0)return Eid(a);b=new Jfb(Eid(a));b.a+=' (identifier: ';Efb(b,a.k);b.a+=')';return b.a} +function ctd(a,b,c){var d,e;d=(Fhd(),e=new xkd,e);vkd(d,b);wkd(d,c);!!a&&wtd((!a.a&&(a.a=new xMd(y2,a,5)),a.a),d);return d} +function ttb(a,b,c,d){var e,f;uCb(d);uCb(c);e=a.xc(b);f=e==null?c:Myb(BD(e,15),BD(c,14));f==null?a.Bc(b):a.zc(b,f);return f} +function pqb(a){var b,c,d,e;c=(b=BD(gdb((d=a.gm,e=d.f,e==CI?d:e)),9),new xqb(b,BD(_Bb(b,b.length),9),0));rqb(c,a);return c} +function hDc(a,b,c){var d,e;for(e=a.a.ec().Kc();e.Ob();){d=BD(e.Pb(),10);if(Be(c,BD(Ikb(b,d.p),14))){return d}}return null} +function Db(b,c,d){var e;try{Cb(b,c,d)}catch(a){a=ubb(a);if(JD(a,597)){e=a;throw vbb(new ycb(e))}else throw vbb(a)}return c} +function Qbb(a,b){var c;if(Fbb(a)&&Fbb(b)){c=a-b;if(Kje>1;a.k=c-1>>1} +function Gub(){zub();var a,b,c;c=yub+++Date.now();a=QD($wnd.Math.floor(c*lke))&nke;b=QD(c-a*mke);this.a=a^1502;this.b=b^kke} +function O_b(a){var b,c,d;b=new Rkb;for(d=new olb(a.j);d.a3.4028234663852886E38){return Pje}else if(b<-3.4028234663852886E38){return Qje}return b} +function aeb(a){a-=a>>1&1431655765;a=(a>>2&858993459)+(a&858993459);a=(a>>4)+a&252645135;a+=a>>8;a+=a>>16;return a&63} +function Ev(a){var b,c,d,e;b=new cq(a.Hd().gc());e=0;for(d=vr(a.Hd().Kc());d.Ob();){c=d.Pb();bq(b,c,meb(e++))}return fn(b.a)} +function Uyb(a,b){var c,d,e;e=new Lqb;for(d=b.vc().Kc();d.Ob();){c=BD(d.Pb(),42);Rhb(e,c.cd(),Yyb(a,BD(c.dd(),15)))}return e} +function EZc(a,b){a.n.c.length==0&&Ekb(a.n,new VZc(a.s,a.t,a.i));Ekb(a.b,b);QZc(BD(Ikb(a.n,a.n.c.length-1),211),b);GZc(a,b)} +function LFb(a){if(a.c!=a.b.b||a.i!=a.g.b){a.a.c=KC(SI,Uhe,1,0,5,1);Gkb(a.a,a.b);Gkb(a.a,a.g);a.c=a.b.b;a.i=a.g.b}return a.a} +function Ycc(a,b){var c,d,e;e=0;for(d=BD(b.Kb(a),20).Kc();d.Ob();){c=BD(d.Pb(),17);Ccb(DD(vNb(c,(wtc(),ltc))))||++e}return e} +function efc(a,b){var c,d,e;d=tgc(b);e=Edb(ED(pBc(d,(Nyc(),lyc))));c=$wnd.Math.max(0,e/2-0.5);cfc(b,c,1);Ekb(a,new Dfc(b,c))} +function Ctc(){Ctc=ccb;Btc=new Dtc(ane,0);xtc=new Dtc('FIRST',1);ytc=new Dtc(Gne,2);ztc=new Dtc('LAST',3);Atc=new Dtc(Hne,4)} +function Aad(){Aad=ccb;zad=new Bad(ole,0);xad=new Bad('POLYLINE',1);wad=new Bad('ORTHOGONAL',2);yad=new Bad('SPLINES',3)} +function zYc(){zYc=ccb;xYc=new AYc('ASPECT_RATIO_DRIVEN',0);yYc=new AYc('MAX_SCALE_DRIVEN',1);wYc=new AYc('AREA_DRIVEN',2)} +function Y$c(){Y$c=ccb;V$c=new Z$c('P1_STRUCTURE',0);W$c=new Z$c('P2_PROCESSING_ORDER',1);X$c=new Z$c('P3_EXECUTION',2)} +function tVc(){tVc=ccb;sVc=new uVc('OVERLAP_REMOVAL',0);qVc=new uVc('COMPACTION',1);rVc=new uVc('GRAPH_SIZE_CALCULATION',2)} +function Jy(a,b){Iy();return My(Qie),$wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)?0:ab?1:Ny(isNaN(a),isNaN(b))} +function yOc(a,b){var c,d;c=Jsb(a,0);while(c.b!=c.d.c){d=Gdb(ED(Xsb(c)));if(d==b){return}else if(d>b){Ysb(c);break}}Vsb(c,b)} +function t4c(a,b){var c,d,e,f,g;c=b.f;Xrb(a.c.d,c,b);if(b.g!=null){for(e=b.g,f=0,g=e.length;fb&&d.ue(a[f-1],a[f])>0;--f){g=a[f];NC(a,f,a[f-1]);NC(a,f-1,g)}}} +function did(a,b,c,d){if(b<0){uid(a,c,d)}else{if(!c.Ij()){throw vbb(new Wdb(ite+c.ne()+jte))}BD(c,66).Nj().Tj(a,a.yh(),b,d)}} +function xFb(a,b){if(b==a.d){return a.e}else if(b==a.e){return a.d}else{throw vbb(new Wdb('Node '+b+' not part of edge '+a))}} +function iEb(a,b){switch(b.g){case 2:return a.b;case 1:return a.c;case 4:return a.d;case 3:return a.a;default:return false;}} +function GVb(a,b){switch(b.g){case 2:return a.b;case 1:return a.c;case 4:return a.d;case 3:return a.a;default:return false;}} +function Xkd(a,b,c,d){switch(b){case 3:return a.f;case 4:return a.g;case 5:return a.i;case 6:return a.j;}return Ekd(a,b,c,d)} +function Ljc(a){if(a.k!=(j0b(),h0b)){return false}return FAb(new YAb(null,new Lub(new Sr(ur(U_b(a).a.Kc(),new Sq)))),new Mjc)} +function MEd(a){if(a.e==null){return a}else !a.c&&(a.c=new NEd((a.f&256)!=0,a.i,a.a,a.d,(a.f&16)!=0,a.j,a.g,null));return a.c} +function VC(a,b){if(a.h==Gje&&a.m==0&&a.l==0){b&&(QC=TC(0,0,0));return SC((wD(),uD))}b&&(QC=TC(a.l,a.m,a.h));return TC(0,0,0)} +function fcb(a){var b;if(Array.isArray(a)&&a.im===gcb){return hdb(rb(a))+'@'+(b=tb(a)>>>0,b.toString(16))}return a.toString()} +function Rpb(a){var b;this.a=(b=BD(a.e&&a.e(),9),new xqb(b,BD(_Bb(b,b.length),9),0));this.b=KC(SI,Uhe,1,this.a.a.length,5,1)} +function _Ob(a){var b,c,d;this.a=new zsb;for(d=new olb(a);d.a0&&(BCb(b-1,a.length),a.charCodeAt(b-1)==58)&&!OEd(a,CEd,DEd)} +function OEd(a,b,c){var d,e;for(d=0,e=a.length;d=e){return b.c+c}}return b.c+b.b.gc()} +function NCd(a,b){LCd();var c,d,e,f;d=KLd(a);e=b;Klb(d,0,d.length,e);for(c=0;c0){d+=e;++c}}c>1&&(d+=a.d*(c-1));return d} +function Htd(a){var b,c,d;d=new Hfb;d.a+='[';for(b=0,c=a.gc();b0&&this.b>0&&q$c(this.c,this.b,this.a)} +function ezc(a){dzc();this.c=Ou(OC(GC(h0,1),Uhe,831,0,[Uyc]));this.b=new Lqb;this.a=a;Rhb(this.b,bzc,1);Hkb(czc,new Xed(this))} +function I2c(a,b){var c;if(a.d){if(Mhb(a.b,b)){return BD(Ohb(a.b,b),51)}else{c=b.Kf();Rhb(a.b,b,c);return c}}else{return b.Kf()}} +function Kgb(a,b){var c;if(PD(a)===PD(b)){return true}if(JD(b,91)){c=BD(b,91);return a.e==c.e&&a.d==c.d&&Lgb(a,c.a)}return false} +function Zcd(a){Ucd();switch(a.g){case 4:return Acd;case 1:return zcd;case 3:return Rcd;case 2:return Tcd;default:return Scd;}} +function Ykd(a,b){switch(b){case 3:return a.f!=0;case 4:return a.g!=0;case 5:return a.i!=0;case 6:return a.j!=0;}return Hkd(a,b)} +function gWc(a){switch(a.g){case 0:return new FXc;case 1:return new IXc;default:throw vbb(new Wdb(jre+(a.f!=null?a.f:''+a.g)));}} +function QUc(a){switch(a.g){case 0:return new CXc;case 1:return new MXc;default:throw vbb(new Wdb(Dne+(a.f!=null?a.f:''+a.g)));}} +function b1c(a){switch(a.g){case 0:return new s1c;case 1:return new w1c;default:throw vbb(new Wdb(Mre+(a.f!=null?a.f:''+a.g)));}} +function qWc(a){switch(a.g){case 1:return new SVc;case 2:return new KVc;default:throw vbb(new Wdb(jre+(a.f!=null?a.f:''+a.g)));}} +function ryb(a){var b,c;if(a.b){return a.b}c=lyb?null:a.d;while(c){b=lyb?null:c.b;if(b){return b}c=lyb?null:c.d}return $xb(),Zxb} +function hhb(a){var b,c,d;if(a.e==0){return 0}b=a.d<<5;c=a.a[a.d-1];if(a.e<0){d=Mgb(a);if(d==a.d-1){--c;c=c|0}}b-=heb(c);return b} +function bhb(a){var b,c,d;if(a>5;b=a&31;d=KC(WD,oje,25,c+1,15,1);d[c]=1<3){e*=10;--f}a=(a+(e>>1))/e|0}d.i=a;return true} +function XUb(a){LUb();return Bcb(),GVb(BD(a.a,81).j,BD(a.b,103))||BD(a.a,81).d.e!=0&&GVb(BD(a.a,81).j,BD(a.b,103))?true:false} +function s3c(a){p3c();if(BD(a.We((Y9c(),b9c)),174).Hc((Idd(),Gdd))){BD(a.We(x9c),174).Fc((rcd(),qcd));BD(a.We(b9c),174).Mc(Gdd)}} +function Gxd(a,b){var c,d;if(!b){return false}else{for(c=0;c=0;--d){b=c[d];for(e=0;e>1;this.k=b-1>>1} +function r3b(a,b){Odd(b,'End label post-processing',1);MAb(JAb(LAb(new YAb(null,new Kub(a.b,16)),new w3b),new y3b),new A3b);Qdd(b)} +function NLc(a,b,c){var d,e;d=Edb(a.p[b.i.p])+Edb(a.d[b.i.p])+b.n.b+b.a.b;e=Edb(a.p[c.i.p])+Edb(a.d[c.i.p])+c.n.b+c.a.b;return e-d} +function xhb(a,b,c){var d,e;d=xbb(c,Yje);for(e=0;ybb(d,0)!=0&&e0&&(BCb(0,b.length),b.charCodeAt(0)==43)?b.substr(1):b))} +function T9d(a){var b;return a==null?null:new Ygb((b=Qge(a,true),b.length>0&&(BCb(0,b.length),b.charCodeAt(0)==43)?b.substr(1):b))} +function xud(a,b){var c;if(a.i>0){if(b.lengtha.i&&NC(b,a.i,null);return b} +function Sxd(a,b,c){var d,e,f;if(a.ej()){d=a.i;f=a.fj();kud(a,d,b);e=a.Zi(3,null,b,d,f);!c?(c=e):c.Ei(e)}else{kud(a,a.i,b)}return c} +function HMd(a,b,c){var d,e;d=new pSd(a.e,4,10,(e=b.c,JD(e,88)?BD(e,26):(jGd(),_Fd)),null,HLd(a,b),false);!c?(c=d):c.Ei(d);return c} +function GMd(a,b,c){var d,e;d=new pSd(a.e,3,10,null,(e=b.c,JD(e,88)?BD(e,26):(jGd(),_Fd)),HLd(a,b),false);!c?(c=d):c.Ei(d);return c} +function _Jb(a){$Jb();var b;b=new g7c(BD(a.e.We((Y9c(),_8c)),8));if(a.B.Hc((Idd(),Bdd))){b.a<=0&&(b.a=20);b.b<=0&&(b.b=20)}return b} +function Lzc(a){Izc();var b;(!a.q?(mmb(),mmb(),kmb):a.q)._b((Nyc(),Cxc))?(b=BD(vNb(a,Cxc),197)):(b=BD(vNb(Q_b(a),Dxc),197));return b} +function pBc(a,b){var c,d;d=null;if(wNb(a,(Nyc(),qyc))){c=BD(vNb(a,qyc),94);c.Xe(b)&&(d=c.We(b))}d==null&&(d=vNb(Q_b(a),b));return d} +function Ze(a,b){var c,d,e;if(JD(b,42)){c=BD(b,42);d=c.cd();e=Hv(a.Rc(),d);return Hb(e,c.dd())&&(e!=null||a.Rc()._b(d))}return false} +function qAd(a,b){var c,d,e;if(a.f>0){a.qj();d=b==null?0:tb(b);e=(d&Ohe)%a.d.length;c=xAd(a,e,d,b);return c!=-1}else{return false}} +function AAd(a,b){var c,d,e;if(a.f>0){a.qj();d=b==null?0:tb(b);e=(d&Ohe)%a.d.length;c=wAd(a,e,d,b);if(c){return c.dd()}}return null} +function R2d(a,b){var c,d,e,f;f=S6d(a.e.Tg(),b);c=BD(a.g,119);for(e=0;e1?Mbb(Nbb(b.a[1],32),xbb(b.a[0],Yje)):xbb(b.a[0],Yje),Sbb(Ibb(b.e,c))))} +function Hbb(a,b){var c;if(Fbb(a)&&Fbb(b)){c=a%b;if(Kje>5;b&=31;e=a.d+c+(b==0?0:1);d=KC(WD,oje,25,e,15,1);jhb(d,a.a,c,b);f=new Vgb(a.e,e,d);Jgb(f);return f} +function Ofe(a,b,c){var d,e;d=BD(Phb(Zee,b),117);e=BD(Phb($ee,b),117);if(c){Shb(Zee,a,d);Shb($ee,a,e)}else{Shb($ee,a,d);Shb(Zee,a,e)}} +function Cwb(a,b,c){var d,e,f;e=null;f=a.b;while(f){d=a.a.ue(b,f.d);if(c&&d==0){return f}if(d>=0){f=f.a[1]}else{e=f;f=f.a[0]}}return e} +function Dwb(a,b,c){var d,e,f;e=null;f=a.b;while(f){d=a.a.ue(b,f.d);if(c&&d==0){return f}if(d<=0){f=f.a[0]}else{e=f;f=f.a[1]}}return e} +function Nic(a,b,c,d){var e,f,g;e=false;if(fjc(a.f,c,d)){ijc(a.f,a.a[b][c],a.a[b][d]);f=a.a[b];g=f[d];f[d]=f[c];f[c]=g;e=true}return e} +function QHc(a,b,c,d,e){var f,g,h;g=e;while(b.b!=b.c){f=BD(fkb(b),10);h=BD(V_b(f,d).Xb(0),11);a.d[h.p]=g++;c.c[c.c.length]=h}return g} +function hBc(a,b,c){var d,e,f,g,h;g=a.k;h=b.k;d=c[g.g][h.g];e=ED(pBc(a,d));f=ED(pBc(b,d));return $wnd.Math.max((uCb(e),e),(uCb(f),f))} +function zZc(a,b,c){var d,e,f,g;d=c/a.c.length;e=0;for(g=new olb(a);g.a2000){yz=a;zz=$wnd.setTimeout(Iz,10)}}if(xz++==0){Lz((Kz(),Jz));return true}return false} +function wCc(a,b){var c,d,e;for(d=new Sr(ur(U_b(a).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),17);e=c.d.i;if(e.c==b){return false}}return true} +function Ek(b,c){var d,e;if(JD(c,245)){e=BD(c,245);try{d=b.vd(e);return d==0}catch(a){a=ubb(a);if(!JD(a,205))throw vbb(a)}}return false} +function Xz(){if(Error.stackTraceLimit>0){$wnd.Error.stackTraceLimit=Error.stackTraceLimit=64;return true}return 'stack' in new Error} +function BDb(a,b){return Iy(),Iy(),My(Qie),($wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)?0:ab?1:Ny(isNaN(a),isNaN(b)))>0} +function DDb(a,b){return Iy(),Iy(),My(Qie),($wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)?0:ab?1:Ny(isNaN(a),isNaN(b)))<0} +function CDb(a,b){return Iy(),Iy(),My(Qie),($wnd.Math.abs(a-b)<=Qie||a==b||isNaN(a)&&isNaN(b)?0:ab?1:Ny(isNaN(a),isNaN(b)))<=0} +function ydb(a,b){var c=0;while(!b[c]||b[c]==''){c++}var d=b[c++];for(;cWje){return c.fh()}d=c.Zg();if(!!d||c==a){break}}}return d} +function fvd(a){evd();if(JD(a,156)){return BD(Ohb(cvd,hK),288).vg(a)}if(Mhb(cvd,rb(a))){return BD(Ohb(cvd,rb(a)),288).vg(a)}return null} +function fZd(a){if(efb(kse,a)){return Bcb(),Acb}else if(efb(lse,a)){return Bcb(),zcb}else{throw vbb(new Wdb('Expecting true or false'))}} +function uDc(a,b){if(b.c==a){return b.d}else if(b.d==a){return b.c}throw vbb(new Wdb('Input edge is not connected to the input port.'))} +function Igb(a,b){if(a.e>b.e){return 1}if(a.eb.d){return a.e}if(a.d=48&&a<48+$wnd.Math.min(10,10)){return a-48}if(a>=97&&a<97){return a-97+10}if(a>=65&&a<65){return a-65+10}return -1} +function Ue(a,b){var c;if(PD(b)===PD(a)){return true}if(!JD(b,21)){return false}c=BD(b,21);if(c.gc()!=a.gc()){return false}return a.Ic(c)} +function ekb(a,b){var c,d,e,f;d=a.a.length-1;c=b-a.b&d;f=a.c-b&d;e=a.c-a.b&d;mkb(c=f){hkb(a,b);return -1}else{ikb(a,b);return 1}} +function lA(a,b){var c,d;c=(BCb(b,a.length),a.charCodeAt(b));d=b+1;while(db.e){return 1}else if(a.fb.f){return 1}return tb(a)-tb(b)} +function efb(a,b){uCb(a);if(b==null){return false}if(dfb(a,b)){return true}return a.length==b.length&&dfb(a.toLowerCase(),b.toLowerCase())} +function x6d(a,b){var c,d,e,f;for(d=0,e=b.gc();d0&&ybb(a,128)<0){b=Tbb(a)+128;c=(Ceb(),Beb)[b];!c&&(c=Beb[b]=new teb(a));return c}return new teb(a)} +function _0d(a,b){var c,d;c=b.Hh(a.a);if(c){d=GD(AAd((!c.b&&(c.b=new sId((jGd(),fGd),x6,c)),c.b),fue));if(d!=null){return d}}return b.ne()} +function a1d(a,b){var c,d;c=b.Hh(a.a);if(c){d=GD(AAd((!c.b&&(c.b=new sId((jGd(),fGd),x6,c)),c.b),fue));if(d!=null){return d}}return b.ne()} +function FMc(a,b){wMc();var c,d;for(d=new Sr(ur(O_b(a).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),17);if(c.d.i==b||c.c.i==b){return c}}return null} +function HUb(a,b,c){this.c=a;this.f=new Rkb;this.e=new d7c;this.j=new IVb;this.n=new IVb;this.b=b;this.g=new J6c(b.c,b.d,b.b,b.a);this.a=c} +function gVb(a){var b,c,d,e;this.a=new zsb;this.d=new Tqb;this.e=0;for(c=a,d=0,e=c.length;d0}else{return false}} +function q2c(a){var b;if(PD(hkd(a,(Y9c(),J8c)))===PD((hbd(),fbd))){if(!Xod(a)){jkd(a,J8c,gbd)}else{b=BD(hkd(Xod(a),J8c),334);jkd(a,J8c,b)}}} +function ijc(a,b,c){var d,e;bIc(a.e,b,c,(Ucd(),Tcd));bIc(a.i,b,c,zcd);if(a.a){e=BD(vNb(b,(wtc(),$sc)),11);d=BD(vNb(c,$sc),11);cIc(a.g,e,d)}} +function OEc(a,b,c){var d,e,f;d=b.c.p;f=b.p;a.b[d][f]=new $Ec(a,b);if(c){a.a[d][f]=new FEc(b);e=BD(vNb(b,(wtc(),Psc)),10);!!e&&Rc(a.d,e,b)}} +function TPb(a,b){var c,d,e;Ekb(PPb,a);b.Fc(a);c=BD(Ohb(OPb,a),21);if(c){for(e=c.Kc();e.Ob();){d=BD(e.Pb(),33);Jkb(PPb,d,0)!=-1||TPb(d,b)}}} +function tyb(a,b,c){var d;(jyb?(ryb(a),true):kyb?($xb(),true):nyb?($xb(),true):myb&&($xb(),false))&&(d=new iyb(b),d.b=c,pyb(a,d),undefined)} +function xKb(a,b){var c;c=!a.A.Hc((tdd(),sdd))||a.q==(dcd(),$bd);a.u.Hc((rcd(),ncd))?c?vKb(a,b):zKb(a,b):a.u.Hc(pcd)&&(c?wKb(a,b):AKb(a,b))} +function b0d(a,b){var c,d;++a.j;if(b!=null){c=(d=a.a.Cb,JD(d,97)?BD(d,97).Jg():null);if(xlb(b,c)){Cjd(a.a,4,c);return}}Cjd(a.a,4,BD(b,126))} +function dYb(a,b,c){return new J6c($wnd.Math.min(a.a,b.a)-c/2,$wnd.Math.min(a.b,b.b)-c/2,$wnd.Math.abs(a.a-b.a)+c,$wnd.Math.abs(a.b-b.b)+c)} +function k4b(a,b){var c,d;c=beb(a.a.c.p,b.a.c.p);if(c!=0){return c}d=beb(a.a.d.i.p,b.a.d.i.p);if(d!=0){return d}return beb(b.a.d.p,a.a.d.p)} +function _Dc(a,b,c){var d,e,f,g;f=b.j;g=c.j;if(f!=g){return f.g-g.g}else{d=a.f[b.p];e=a.f[c.p];return d==0&&e==0?0:d==0?-1:e==0?1:Kdb(d,e)}} +function HFb(a,b,c){var d,e,f;if(c[b.d]){return}c[b.d]=true;for(e=new olb(LFb(b));e.a=e)return e;for(b=b>0?b:0;bd&&NC(b,d,null);return b} +function _lb(a,b){var c,d;d=a.a.length;b.lengthd&&NC(b,d,null);return b} +function Xrb(a,b,c){var d,e,f;e=BD(Ohb(a.e,b),387);if(!e){d=new lsb(a,b,c);Rhb(a.e,b,d);isb(d);return null}else{f=ijb(e,c);Yrb(a,e);return f}} +function P9d(a){var b;if(a==null)return null;b=ide(Qge(a,true));if(b==null){throw vbb(new n8d("Invalid hexBinary value: '"+a+"'"))}return b} +function ghb(a){Hgb();if(ybb(a,0)<0){if(ybb(a,-1)!=0){return new Wgb(-1,Jbb(a))}return Bgb}else return ybb(a,10)<=0?Dgb[Tbb(a)]:new Wgb(1,a)} +function wJb(){qJb();return OC(GC(DN,1),Kie,159,0,[nJb,mJb,oJb,eJb,dJb,fJb,iJb,hJb,gJb,lJb,kJb,jJb,bJb,aJb,cJb,$Ib,ZIb,_Ib,XIb,WIb,YIb,pJb])} +function vjc(a){var b;this.d=new Rkb;this.j=new d7c;this.g=new d7c;b=a.g.b;this.f=BD(vNb(Q_b(b),(Nyc(),Lwc)),103);this.e=Edb(ED(c_b(b,ryc)))} +function Pjc(a){this.b=new Rkb;this.e=new Rkb;this.d=a;this.a=!WAb(JAb(new YAb(null,new Lub(new b1b(a.b))),new Xxb(new Qjc))).sd((EAb(),DAb))} +function N5c(){N5c=ccb;L5c=new O5c('PARENTS',0);K5c=new O5c('NODES',1);I5c=new O5c('EDGES',2);M5c=new O5c('PORTS',3);J5c=new O5c('LABELS',4)} +function Tbd(){Tbd=ccb;Qbd=new Ubd('DISTRIBUTED',0);Sbd=new Ubd('JUSTIFIED',1);Obd=new Ubd('BEGIN',2);Pbd=new Ubd(gle,3);Rbd=new Ubd('END',4)} +function UMd(a){var b;b=a.yi(null);switch(b){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4;}return -1} +function cYb(a){switch(a.g){case 1:return ead(),dad;case 4:return ead(),aad;case 2:return ead(),bad;case 3:return ead(),_9c;}return ead(),cad} +function kA(a,b,c){var d;d=c.q.getFullYear()-nje+nje;d<0&&(d=-d);switch(b){case 1:a.a+=d;break;case 2:EA(a,d%100,2);break;default:EA(a,d,b);}} +function Jsb(a,b){var c,d;wCb(b,a.b);if(b>=a.b>>1){d=a.c;for(c=a.b;c>b;--c){d=d.b}}else{d=a.a.a;for(c=0;c=64&&b<128&&(e=Mbb(e,Nbb(1,b-64)))}return e} +function c_b(a,b){var c,d;d=null;if(wNb(a,(Y9c(),O9c))){c=BD(vNb(a,O9c),94);c.Xe(b)&&(d=c.We(b))}d==null&&!!Q_b(a)&&(d=vNb(Q_b(a),b));return d} +function oQc(a,b){var c,d,e;e=b.d.i;d=e.k;if(d==(j0b(),h0b)||d==d0b){return}c=new Sr(ur(U_b(e).a.Kc(),new Sq));Qr(c)&&Rhb(a.k,b,BD(Rr(c),17))} +function mid(a,b){var c,d,e;d=XKd(a.Tg(),b);c=b-a.Ah();return c<0?(e=a.Yg(d),e>=0?a.lh(e):tid(a,d)):c<0?tid(a,d):BD(d,66).Nj().Sj(a,a.yh(),c)} +function Ksd(a){var b;if(JD(a.a,4)){b=fvd(a.a);if(b==null){throw vbb(new Zdb(mse+a.b+"'. "+ise+(fdb(Y3),Y3.k)+jse))}return b}else{return a.a}} +function L9d(a){var b;if(a==null)return null;b=bde(Qge(a,true));if(b==null){throw vbb(new n8d("Invalid base64Binary value: '"+a+"'"))}return b} +function Dyd(b){var c;try{c=b.i.Xb(b.e);b.mj();b.g=b.e++;return c}catch(a){a=ubb(a);if(JD(a,73)){b.mj();throw vbb(new utb)}else throw vbb(a)}} +function Zyd(b){var c;try{c=b.c.ki(b.e);b.mj();b.g=b.e++;return c}catch(a){a=ubb(a);if(JD(a,73)){b.mj();throw vbb(new utb)}else throw vbb(a)}} +function CPb(){CPb=ccb;BPb=(Y9c(),K9c);vPb=G8c;qPb=r8c;wPb=f9c;zPb=(fFb(),bFb);yPb=_Eb;APb=dFb;xPb=$Eb;sPb=(nPb(),jPb);rPb=iPb;tPb=lPb;uPb=mPb} +function NWb(a){LWb();this.c=new Rkb;this.d=a;switch(a.g){case 0:case 2:this.a=tmb(KWb);this.b=Pje;break;case 3:case 1:this.a=KWb;this.b=Qje;}} +function ued(a,b,c){var d,e;if(a.c){dld(a.c,a.c.i+b);eld(a.c,a.c.j+c)}else{for(e=new olb(a.b);e.a0){Ekb(a.b,new WA(b.a,c));d=b.a.length;0d&&(b.a+=yfb(KC(TD,$ie,25,-d,15,1)))}} +function JKb(a,b){var c,d,e;c=a.o;for(e=BD(BD(Qc(a.r,b),21),84).Kc();e.Ob();){d=BD(e.Pb(),111);d.e.a=DKb(d,c.a);d.e.b=c.b*Edb(ED(d.b.We(BKb)))}} +function S5b(a,b){var c,d,e,f;e=a.k;c=Edb(ED(vNb(a,(wtc(),htc))));f=b.k;d=Edb(ED(vNb(b,htc)));return f!=(j0b(),e0b)?-1:e!=e0b?1:c==d?0:c=0){return a.hh(b,c,d)}else{!!a.eh()&&(d=(e=a.Vg(),e>=0?a.Qg(d):a.eh().ih(a,-1-e,null,d)));return a.Sg(b,c,d)}} +function zld(a,b){switch(b){case 7:!a.e&&(a.e=new y5d(B2,a,7,4));Uxd(a.e);return;case 8:!a.d&&(a.d=new y5d(B2,a,8,5));Uxd(a.d);return;}$kd(a,b)} +function Ut(b,c){var d;d=b.Zc(c);try{return d.Pb()}catch(a){a=ubb(a);if(JD(a,109)){throw vbb(new qcb("Can't get element "+c))}else throw vbb(a)}} +function Tgb(a,b){this.e=a;if(b=0&&(c.d=a.t);break;case 3:a.t>=0&&(c.a=a.t);}if(a.C){c.b=a.C.b;c.c=a.C.c}} +function RMb(){RMb=ccb;OMb=new SMb(xle,0);NMb=new SMb(yle,1);PMb=new SMb(zle,2);QMb=new SMb(Ale,3);OMb.a=false;NMb.a=true;PMb.a=false;QMb.a=true} +function ROb(){ROb=ccb;OOb=new SOb(xle,0);NOb=new SOb(yle,1);POb=new SOb(zle,2);QOb=new SOb(Ale,3);OOb.a=false;NOb.a=true;POb.a=false;QOb.a=true} +function dac(a){var b;b=a.a;do{b=BD(Rr(new Sr(ur(R_b(b).a.Kc(),new Sq))),17).c.i;b.k==(j0b(),g0b)&&a.b.Fc(b)}while(b.k==(j0b(),g0b));a.b=Su(a.b)} +function CDc(a){var b,c,d;d=a.c.a;a.p=(Qb(d),new Tkb(d));for(c=new olb(d);c.ac.b){return true}}}return false} +function AD(a,b){if(ND(a)){return !!zD[b]}else if(a.hm){return !!a.hm[b]}else if(LD(a)){return !!yD[b]}else if(KD(a)){return !!xD[b]}return false} +function jkd(a,b,c){c==null?(!a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),LAd(a.o,b)):(!a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),HAd(a.o,b,c));return a} +function jKb(a,b,c,d){var e,f;f=b.Xe((Y9c(),W8c))?BD(b.We(W8c),21):a.j;e=uJb(f);if(e==(qJb(),pJb)){return}if(c&&!sJb(e)){return}UHb(lKb(a,e,d),b)} +function fid(a,b,c,d){var e,f,g;f=XKd(a.Tg(),b);e=b-a.Ah();return e<0?(g=a.Yg(f),g>=0?a._g(g,c,true):sid(a,f,c)):BD(f,66).Nj().Pj(a,a.yh(),e,c,d)} +function u6d(a,b,c,d){var e,f,g;if(c.mh(b)){Q6d();if(YId(b)){e=BD(c.ah(b),153);x6d(a,e)}else{f=(g=b,!g?null:BD(d,49).xh(g));!!f&&v6d(c.ah(b),f)}}} +function H3b(a){switch(a.g){case 1:return vLb(),uLb;case 3:return vLb(),rLb;case 2:return vLb(),tLb;case 4:return vLb(),sLb;default:return null;}} +function kCb(a){switch(typeof(a)){case Mhe:return LCb(a);case Lhe:return QD(a);case Khe:return Bcb(),a?1231:1237;default:return a==null?0:FCb(a);}} +function Gic(a,b,c){if(a.e){switch(a.b){case 1:oic(a.c,b,c);break;case 0:pic(a.c,b,c);}}else{mic(a.c,b,c)}a.a[b.p][c.p]=a.c.i;a.a[c.p][b.p]=a.c.e} +function lHc(a){var b,c;if(a==null){return null}c=KC(OQ,nie,193,a.length,0,2);for(b=0;b=0)return e;if(a.Fk()){for(d=0;d=e)throw vbb(new Cyd(b,e));if(a.hi()){d=a.Xc(c);if(d>=0&&d!=b){throw vbb(new Wdb(kue))}}return a.mi(b,c)} +function gx(a,b){this.a=BD(Qb(a),245);this.b=BD(Qb(b),245);if(a.vd(b)>0||a==(Lk(),Kk)||b==(_k(),$k)){throw vbb(new Wdb('Invalid range: '+nx(a,b)))}} +function mYb(a){var b,c;this.b=new Rkb;this.c=a;this.a=false;for(c=new olb(a.a);c.a0);if((b&-b)==b){return QD(b*Cub(a,31)*4.6566128730773926E-10)}do{c=Cub(a,31);d=c%b}while(c-d+(b-1)<0);return QD(d)} +function LCb(a){JCb();var b,c,d;c=':'+a;d=ICb[c];if(d!=null){return QD((uCb(d),d))}d=GCb[c];b=d==null?KCb(a):QD((uCb(d),d));MCb();ICb[c]=b;return b} +function qZb(a,b,c){Odd(c,'Compound graph preprocessor',1);a.a=new Hp;vZb(a,b,null);pZb(a,b);uZb(a);yNb(b,(wtc(),zsc),a.a);a.a=null;Uhb(a.b);Qdd(c)} +function X$b(a,b,c){switch(c.g){case 1:a.a=b.a/2;a.b=0;break;case 2:a.a=b.a;a.b=b.b/2;break;case 3:a.a=b.a/2;a.b=b.b;break;case 4:a.a=0;a.b=b.b/2;}} +function tkc(a){var b,c,d;for(d=BD(Qc(a.a,(Xjc(),Vjc)),15).Kc();d.Ob();){c=BD(d.Pb(),101);b=Bkc(c);kkc(a,c,b[0],(Fkc(),Ckc),0);kkc(a,c,b[1],Ekc,1)}} +function ukc(a){var b,c,d;for(d=BD(Qc(a.a,(Xjc(),Wjc)),15).Kc();d.Ob();){c=BD(d.Pb(),101);b=Bkc(c);kkc(a,c,b[0],(Fkc(),Ckc),0);kkc(a,c,b[1],Ekc,1)}} +function tXc(a){switch(a.g){case 0:return null;case 1:return new $Xc;case 2:return new QXc;default:throw vbb(new Wdb(jre+(a.f!=null?a.f:''+a.g)));}} +function OZc(a,b,c){var d,e;FZc(a,b-a.s,c-a.t);for(e=new olb(a.n);e.a1&&(f=GFb(a,b));return f} +function dmd(a){var b;if(!!a.f&&a.f.kh()){b=BD(a.f,49);a.f=BD(xid(a,b),82);a.f!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,9,8,b,a.f))}return a.f} +function emd(a){var b;if(!!a.i&&a.i.kh()){b=BD(a.i,49);a.i=BD(xid(a,b),82);a.i!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,9,7,b,a.i))}return a.i} +function zUd(a){var b;if(!!a.b&&(a.b.Db&64)!=0){b=a.b;a.b=BD(xid(a,b),18);a.b!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,9,21,b,a.b))}return a.b} +function uAd(a,b){var c,d,e;if(a.d==null){++a.e;++a.f}else{d=b.Sh();BAd(a,a.f+1);e=(d&Ohe)%a.d.length;c=a.d[e];!c&&(c=a.d[e]=a.uj());c.Fc(b);++a.f}} +function m3d(a,b,c){var d;if(b.Kj()){return false}else if(b.Zj()!=-2){d=b.zj();return d==null?c==null:pb(d,c)}else return b.Hj()==a.e.Tg()&&c==null} +function wo(){var a;Xj(16,Hie);a=Kp(16);this.b=KC(GF,Gie,317,a,0,1);this.c=KC(GF,Gie,317,a,0,1);this.a=null;this.e=null;this.i=0;this.f=a-1;this.g=0} +function b0b(a){n_b.call(this);this.k=(j0b(),h0b);this.j=(Xj(6,Jie),new Skb(6));this.b=(Xj(2,Jie),new Skb(2));this.d=new L_b;this.f=new s0b;this.a=a} +function Scc(a){var b,c;if(a.c.length<=1){return}b=Pcc(a,(Ucd(),Rcd));Rcc(a,BD(b.a,19).a,BD(b.b,19).a);c=Pcc(a,Tcd);Rcc(a,BD(c.a,19).a,BD(c.b,19).a)} +function Vzc(){Vzc=ccb;Uzc=new Xzc('SIMPLE',0);Rzc=new Xzc(Tne,1);Szc=new Xzc('LINEAR_SEGMENTS',2);Qzc=new Xzc('BRANDES_KOEPF',3);Tzc=new Xzc(Aqe,4)} +function XDc(a,b,c){if(!ecd(BD(vNb(b,(Nyc(),Vxc)),98))){WDc(a,b,Y_b(b,c));WDc(a,b,Y_b(b,(Ucd(),Rcd)));WDc(a,b,Y_b(b,Acd));mmb();Okb(b.j,new jEc(a))}} +function HVc(a,b,c,d){var e,f,g;e=d?BD(Qc(a.a,b),21):BD(Qc(a.b,b),21);for(g=e.Kc();g.Ob();){f=BD(g.Pb(),33);if(BVc(a,c,f)){return true}}return false} +function FMd(a){var b,c;for(c=new Fyd(a);c.e!=c.i.gc();){b=BD(Dyd(c),87);if(!!b.e||(!b.d&&(b.d=new xMd(j5,b,1)),b.d).i!=0){return true}}return false} +function QTd(a){var b,c;for(c=new Fyd(a);c.e!=c.i.gc();){b=BD(Dyd(c),87);if(!!b.e||(!b.d&&(b.d=new xMd(j5,b,1)),b.d).i!=0){return true}}return false} +function FDc(a){var b,c,d;b=0;for(d=new olb(a.c.a);d.a102)return -1;if(a<=57)return a-48;if(a<65)return -1;if(a<=70)return a-65+10;if(a<97)return -1;return a-97+10} +function Wj(a,b){if(a==null){throw vbb(new Heb('null key in entry: null='+b))}else if(b==null){throw vbb(new Heb('null value in entry: '+a+'=null'))}} +function kr(a,b){var c,d;while(a.Ob()){if(!b.Ob()){return false}c=a.Pb();d=b.Pb();if(!(PD(c)===PD(d)||c!=null&&pb(c,d))){return false}}return !b.Ob()} +function jIb(a,b){var c;c=OC(GC(UD,1),Vje,25,15,[pHb(a.a[0],b),pHb(a.a[1],b),pHb(a.a[2],b)]);if(a.d){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} +function kIb(a,b){var c;c=OC(GC(UD,1),Vje,25,15,[qHb(a.a[0],b),qHb(a.a[1],b),qHb(a.a[2],b)]);if(a.d){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} +function mqc(){mqc=ccb;iqc=new oqc('GREEDY',0);hqc=new oqc(Une,1);kqc=new oqc(Tne,2);lqc=new oqc('MODEL_ORDER',3);jqc=new oqc('GREEDY_MODEL_ORDER',4)} +function iUc(a,b){var c,d,e;a.b[b.g]=1;for(d=Jsb(b.d,0);d.b!=d.d.c;){c=BD(Xsb(d),188);e=c.c;a.b[e.g]==1?Dsb(a.a,c):a.b[e.g]==2?(a.b[e.g]=1):iUc(a,e)}} +function V9b(a,b){var c,d,e;e=new Skb(b.gc());for(d=b.Kc();d.Ob();){c=BD(d.Pb(),286);c.c==c.f?K9b(a,c,c.c):L9b(a,c)||(e.c[e.c.length]=c,true)}return e} +function IZc(a,b,c){var d,e,f,g,h;h=a.r+b;a.r+=b;a.d+=c;d=c/a.n.c.length;e=0;for(g=new olb(a.n);g.af&&NC(b,f,null);return b} +function Lu(a,b){var c,d;d=a.gc();if(b==null){for(c=0;c0&&(i+=e);j[k]=g;g+=h*(i+d)}} +function Uoc(a){var b,c,d;d=a.f;a.n=KC(UD,Vje,25,d,15,1);a.d=KC(UD,Vje,25,d,15,1);for(b=0;b0?a.c:0);++e}a.b=d;a.d=f} +function BZc(a,b){var c,d,e,f,g;d=0;e=0;c=0;for(g=new olb(b);g.a0?a.g:0);++c}a.c=e;a.d=d} +function AHb(a,b){var c;c=OC(GC(UD,1),Vje,25,15,[zHb(a,(gHb(),dHb),b),zHb(a,eHb,b),zHb(a,fHb,b)]);if(a.f){c[0]=$wnd.Math.max(c[0],c[2]);c[2]=c[0]}return c} +function lNb(b,c,d){var e;try{aNb(b,c+b.j,d+b.k,false,true)}catch(a){a=ubb(a);if(JD(a,73)){e=a;throw vbb(new qcb(e.g+Gle+c+She+d+').'))}else throw vbb(a)}} +function mNb(b,c,d){var e;try{aNb(b,c+b.j,d+b.k,true,false)}catch(a){a=ubb(a);if(JD(a,73)){e=a;throw vbb(new qcb(e.g+Gle+c+She+d+').'))}else throw vbb(a)}} +function d5b(a){var b;if(!wNb(a,(Nyc(),xxc))){return}b=BD(vNb(a,xxc),21);if(b.Hc((Hbd(),zbd))){b.Mc(zbd);b.Fc(Bbd)}else if(b.Hc(Bbd)){b.Mc(Bbd);b.Fc(zbd)}} +function e5b(a){var b;if(!wNb(a,(Nyc(),xxc))){return}b=BD(vNb(a,xxc),21);if(b.Hc((Hbd(),Gbd))){b.Mc(Gbd);b.Fc(Ebd)}else if(b.Hc(Ebd)){b.Mc(Ebd);b.Fc(Gbd)}} +function udc(a,b,c){Odd(c,'Self-Loop ordering',1);MAb(NAb(JAb(JAb(LAb(new YAb(null,new Kub(b.b,16)),new ydc),new Adc),new Cdc),new Edc),new Gdc(a));Qdd(c)} +function ikc(a,b,c,d){var e,f;for(e=b;e0&&(e.b+=b);return e} +function GXb(a,b){var c,d,e;e=new d7c;for(d=a.Kc();d.Ob();){c=BD(d.Pb(),37);uXb(c,0,e.b);e.b+=c.f.b+b;e.a=$wnd.Math.max(e.a,c.f.a)}e.a>0&&(e.a+=b);return e} +function d_b(a){var b,c,d;d=Ohe;for(c=new olb(a.a);c.a>16==6){return a.Cb.ih(a,5,o5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?a.zh():c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function Wz(a){Rz();var b=a.e;if(b&&b.stack){var c=b.stack;var d=b+'\n';c.substring(0,d.length)==d&&(c=c.substring(d.length));return c.split('\n')}return []} +function jeb(a){var b;b=(qeb(),peb);return b[a>>>28]|b[a>>24&15]<<4|b[a>>20&15]<<8|b[a>>16&15]<<12|b[a>>12&15]<<16|b[a>>8&15]<<20|b[a>>4&15]<<24|b[a&15]<<28} +function _jb(a){var b,c,d;if(a.b!=a.c){return}d=a.a.length;c=geb($wnd.Math.max(8,d))<<1;if(a.b!=0){b=_Bb(a.a,c);$jb(a,b,d);a.a=b;a.b=0}else{dCb(a.a,c)}a.c=d} +function DKb(a,b){var c;c=a.b;return c.Xe((Y9c(),s9c))?c.Hf()==(Ucd(),Tcd)?-c.rf().a-Edb(ED(c.We(s9c))):b+Edb(ED(c.We(s9c))):c.Hf()==(Ucd(),Tcd)?-c.rf().a:b} +function P_b(a){var b;if(a.b.c.length!=0&&!!BD(Ikb(a.b,0),70).a){return BD(Ikb(a.b,0),70).a}b=JZb(a);if(b!=null){return b}return ''+(!a.c?-1:Jkb(a.c.a,a,0))} +function C0b(a){var b;if(a.f.c.length!=0&&!!BD(Ikb(a.f,0),70).a){return BD(Ikb(a.f,0),70).a}b=JZb(a);if(b!=null){return b}return ''+(!a.i?-1:Jkb(a.i.j,a,0))} +function Ogc(a,b){var c,d;if(b<0||b>=a.gc()){return null}for(c=b;c0?a.c:0);e=$wnd.Math.max(e,b.d);++d}a.e=f;a.b=e} +function shd(a){var b,c;if(!a.b){a.b=Qu(BD(a.f,118).Ag().i);for(c=new Fyd(BD(a.f,118).Ag());c.e!=c.i.gc();){b=BD(Dyd(c),137);Ekb(a.b,new dhd(b))}}return a.b} +function Ctd(a,b){var c,d,e;if(b.dc()){return LCd(),LCd(),KCd}else{c=new zyd(a,b.gc());for(e=new Fyd(a);e.e!=e.i.gc();){d=Dyd(e);b.Hc(d)&&wtd(c,d)}return c}} +function bkd(a,b,c,d){if(b==0){return d?(!a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),a.o):(!a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),FAd(a.o))}return fid(a,b,c,d)} +function Tnd(a){var b,c;if(a.rb){for(b=0,c=a.rb.i;b>22);e+=d>>22;if(e<0){return false}a.l=c&Eje;a.m=d&Eje;a.h=e&Fje;return true} +function Fwb(a,b,c,d,e,f,g){var h,i;if(b.Ae()&&(i=a.a.ue(c,d),i<0||!e&&i==0)){return false}if(b.Be()&&(h=a.a.ue(c,f),h>0||!g&&h==0)){return false}return true} +function Vcc(a,b){Occ();var c;c=a.j.g-b.j.g;if(c!=0){return 0}switch(a.j.g){case 2:return Ycc(b,Ncc)-Ycc(a,Ncc);case 4:return Ycc(a,Mcc)-Ycc(b,Mcc);}return 0} +function Tqc(a){switch(a.g){case 0:return Mqc;case 1:return Nqc;case 2:return Oqc;case 3:return Pqc;case 4:return Qqc;case 5:return Rqc;default:return null;}} +function End(a,b,c){var d,e;d=(e=new rUd,yId(e,b),pnd(e,c),wtd((!a.c&&(a.c=new cUd(p5,a,12,10)),a.c),e),e);AId(d,0);DId(d,1);CId(d,true);BId(d,true);return d} +function tud(a,b){var c,d;if(b>=a.i)throw vbb(new $zd(b,a.i));++a.j;c=a.g[b];d=a.i-b-1;d>0&&$fb(a.g,b+1,a.g,b,d);NC(a.g,--a.i,null);a.fi(b,c);a.ci();return c} +function UId(a,b){var c,d;if(a.Db>>16==17){return a.Cb.ih(a,21,c5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?a.zh():c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function iDb(a){var b,c,d,e;mmb();Okb(a.c,a.a);for(e=new olb(a.c);e.ac.a.c.length)){throw vbb(new Wdb('index must be >= 0 and <= layer node count'))}!!a.c&&Lkb(a.c.a,a);a.c=c;!!c&&Dkb(c.a,b,a)} +function p7b(a,b){var c,d,e;for(d=new Sr(ur(O_b(a).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),17);e=BD(b.Kb(c),10);return new cc(Qb(e.n.b+e.o.b/2))}return wb(),wb(),vb} +function rMc(a,b){this.c=new Lqb;this.a=a;this.b=b;this.d=BD(vNb(a,(wtc(),otc)),304);PD(vNb(a,(Nyc(),yxc)))===PD((_qc(),Zqc))?(this.e=new bNc):(this.e=new WMc)} +function $dd(a,b){var c,d,e,f;f=0;for(d=new olb(a);d.a>16==6){return a.Cb.ih(a,6,B2,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(Thd(),Lhd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function Eod(a,b){var c,d;if(a.Db>>16==7){return a.Cb.ih(a,1,C2,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(Thd(),Nhd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function lpd(a,b){var c,d;if(a.Db>>16==9){return a.Cb.ih(a,9,E2,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(Thd(),Phd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function mQd(a,b){var c,d;if(a.Db>>16==5){return a.Cb.ih(a,9,h5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(jGd(),VFd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function KHd(a,b){var c,d;if(a.Db>>16==3){return a.Cb.ih(a,0,k5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(jGd(),OFd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function Snd(a,b){var c,d;if(a.Db>>16==7){return a.Cb.ih(a,6,o5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(jGd(),cGd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function ird(){this.a=new bqd;this.g=new wo;this.j=new wo;this.b=new Lqb;this.d=new wo;this.i=new wo;this.k=new Lqb;this.c=new Lqb;this.e=new Lqb;this.f=new Lqb} +function MCd(a,b,c){var d,e,f;c<0&&(c=0);f=a.i;for(e=c;eWje){return p6d(a,d)}if(d==a){return true}}}return false} +function HKb(a){CKb();switch(a.q.g){case 5:EKb(a,(Ucd(),Acd));EKb(a,Rcd);break;case 4:FKb(a,(Ucd(),Acd));FKb(a,Rcd);break;default:GKb(a,(Ucd(),Acd));GKb(a,Rcd);}} +function LKb(a){CKb();switch(a.q.g){case 5:IKb(a,(Ucd(),zcd));IKb(a,Tcd);break;case 4:JKb(a,(Ucd(),zcd));JKb(a,Tcd);break;default:KKb(a,(Ucd(),zcd));KKb(a,Tcd);}} +function XQb(a){var b,c;b=BD(vNb(a,(wSb(),pSb)),19);if(b){c=b.a;c==0?yNb(a,(HSb(),GSb),new Gub):yNb(a,(HSb(),GSb),new Hub(c))}else{yNb(a,(HSb(),GSb),new Hub(1))}} +function V$b(a,b){var c;c=a.i;switch(b.g){case 1:return -(a.n.b+a.o.b);case 2:return a.n.a-c.o.a;case 3:return a.n.b-c.o.b;case 4:return -(a.n.a+a.o.a);}return 0} +function hbc(a,b){switch(a.g){case 0:return b==(Ctc(),ytc)?dbc:ebc;case 1:return b==(Ctc(),ytc)?dbc:cbc;case 2:return b==(Ctc(),ytc)?cbc:ebc;default:return cbc;}} +function v$c(a,b){var c,d,e;Lkb(a.a,b);a.e-=b.r+(a.a.c.length==0?0:a.c);e=ere;for(d=new olb(a.a);d.a>16==3){return a.Cb.ih(a,12,E2,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(Thd(),Khd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function Uod(a,b){var c,d;if(a.Db>>16==11){return a.Cb.ih(a,10,E2,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(Thd(),Ohd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function PSd(a,b){var c,d;if(a.Db>>16==10){return a.Cb.ih(a,11,c5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(jGd(),aGd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function qUd(a,b){var c,d;if(a.Db>>16==10){return a.Cb.ih(a,12,n5,b)}return d=zUd(BD(XKd((c=BD(Ajd(a,16),26),!c?(jGd(),dGd):c),a.Db>>16),18)),a.Cb.ih(a,d.n,d.f,b)} +function wId(a){var b;if((a.Bb&1)==0&&!!a.r&&a.r.kh()){b=BD(a.r,49);a.r=BD(xid(a,b),138);a.r!=b&&(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,9,8,b,a.r))}return a.r} +function yHb(a,b,c){var d;d=OC(GC(UD,1),Vje,25,15,[BHb(a,(gHb(),dHb),b,c),BHb(a,eHb,b,c),BHb(a,fHb,b,c)]);if(a.f){d[0]=$wnd.Math.max(d[0],d[2]);d[2]=d[0]}return d} +function O9b(a,b){var c,d,e;e=V9b(a,b);if(e.c.length==0){return}Okb(e,new pac);c=e.c.length;for(d=0;d>19;j=b.h>>19;if(i!=j){return j-i}e=a.h;h=b.h;if(e!=h){return e-h}d=a.m;g=b.m;if(d!=g){return d-g}c=a.l;f=b.l;return c-f} +function fFb(){fFb=ccb;eFb=(rFb(),oFb);dFb=new Nsd(Yke,eFb);cFb=(UEb(),TEb);bFb=new Nsd(Zke,cFb);aFb=(MEb(),LEb);_Eb=new Nsd($ke,aFb);$Eb=new Nsd(_ke,(Bcb(),true))} +function cfc(a,b,c){var d,e;d=b*c;if(JD(a.g,145)){e=ugc(a);if(e.f.d){e.f.a||(a.d.a+=d+ple)}else{a.d.d-=d+ple;a.d.a+=d+ple}}else if(JD(a.g,10)){a.d.d-=d;a.d.a+=2*d}} +function vmc(a,b,c){var d,e,f,g,h;e=a[c.g];for(h=new olb(b.d);h.a0?a.g:0);++c}b.b=d;b.e=e} +function to(a){var b,c,d;d=a.b;if(Lp(a.i,d.length)){c=d.length*2;a.b=KC(GF,Gie,317,c,0,1);a.c=KC(GF,Gie,317,c,0,1);a.f=c-1;a.i=0;for(b=a.a;b;b=b.c){po(a,b,b)}++a.g}} +function cNb(a,b,c,d){var e,f,g,h;for(e=0;eg&&(h=g/d);e>f&&(i=f/e);Y6c(a,$wnd.Math.min(h,i));return a} +function ond(){Smd();var b,c;try{c=BD(mUd((yFd(),xFd),yte),2014);if(c){return c}}catch(a){a=ubb(a);if(JD(a,102)){b=a;uvd((h0d(),b))}else throw vbb(a)}return new knd} +function Y9d(){A9d();var b,c;try{c=BD(mUd((yFd(),xFd),Ewe),2024);if(c){return c}}catch(a){a=ubb(a);if(JD(a,102)){b=a;uvd((h0d(),b))}else throw vbb(a)}return new U9d} +function qZd(){Smd();var b,c;try{c=BD(mUd((yFd(),xFd),_ve),1941);if(c){return c}}catch(a){a=ubb(a);if(JD(a,102)){b=a;uvd((h0d(),b))}else throw vbb(a)}return new mZd} +function HQd(a,b,c){var d,e;e=a.e;a.e=b;if((a.Db&4)!=0&&(a.Db&1)==0){d=new nSd(a,1,4,e,b);!c?(c=d):c.Ei(d)}e!=b&&(b?(c=QQd(a,MQd(a,b),c)):(c=QQd(a,a.a,c)));return c} +function nB(){eB.call(this);this.e=-1;this.a=false;this.p=Rie;this.k=-1;this.c=-1;this.b=-1;this.g=false;this.f=-1;this.j=-1;this.n=-1;this.i=-1;this.d=-1;this.o=Rie} +function qEb(a,b){var c,d,e;d=a.b.d.d;a.a||(d+=a.b.d.a);e=b.b.d.d;b.a||(e+=b.b.d.a);c=Kdb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} +function eOb(a,b){var c,d,e;d=a.b.b.d;a.a||(d+=a.b.b.a);e=b.b.b.d;b.a||(e+=b.b.b.a);c=Kdb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} +function PVb(a,b){var c,d,e;d=a.b.g.d;a.a||(d+=a.b.g.a);e=b.b.g.d;b.a||(e+=b.b.g.a);c=Kdb(d,e);if(c==0){if(!a.a&&b.a){return -1}else if(!b.a&&a.a){return 1}}return c} +function ZTb(){ZTb=ccb;WTb=c3c(e3c(e3c(e3c(new j3c,(qUb(),oUb),(S8b(),m8b)),oUb,q8b),pUb,x8b),pUb,a8b);YTb=e3c(e3c(new j3c,oUb,S7b),oUb,b8b);XTb=c3c(new j3c,pUb,d8b)} +function s3b(a){var b,c,d,e,f;b=BD(vNb(a,(wtc(),Csc)),83);f=a.n;for(d=b.Cc().Kc();d.Ob();){c=BD(d.Pb(),306);e=c.i;e.c+=f.a;e.d+=f.b;c.c?VHb(c):XHb(c)}yNb(a,Csc,null)} +function qmc(a,b,c){var d,e;e=a.b;d=e.d;switch(b.g){case 1:return -d.d-c;case 2:return e.o.a+d.c+c;case 3:return e.o.b+d.a+c;case 4:return -d.b-c;default:return -1;}} +function BXc(a){var b,c,d,e,f;d=0;e=dme;if(a.b){for(b=0;b<360;b++){c=b*0.017453292519943295;zXc(a,a.d,0,0,dre,c);f=a.b.ig(a.d);if(f0){g=(f&Ohe)%a.d.length;e=wAd(a,g,f,b);if(e){h=e.ed(c);return h}}d=a.tj(f,b,c);a.c.Fc(d);return null} +function t1d(a,b){var c,d,e,f;switch(o1d(a,b)._k()){case 3:case 2:{c=OKd(b);for(e=0,f=c.i;e=0;d--){if(dfb(a[d].d,b)||dfb(a[d].d,c)){a.length>=d+1&&a.splice(0,d+1);break}}return a} +function Abb(a,b){var c;if(Fbb(a)&&Fbb(b)){c=a/b;if(Kje0){a.b+=2;a.a+=d}}else{a.b+=1;a.a+=$wnd.Math.min(d,e)}} +function Rpd(a,b){var c,d;d=false;if(ND(b)){d=true;Qpd(a,new yC(GD(b)))}if(!d){if(JD(b,236)){d=true;Qpd(a,(c=Kcb(BD(b,236)),new TB(c)))}}if(!d){throw vbb(new vcb(Ute))}} +function IMd(a,b,c,d){var e,f,g;e=new pSd(a.e,1,10,(g=b.c,JD(g,88)?BD(g,26):(jGd(),_Fd)),(f=c.c,JD(f,88)?BD(f,26):(jGd(),_Fd)),HLd(a,b),false);!d?(d=e):d.Ei(e);return d} +function T_b(a){var b,c;switch(BD(vNb(Q_b(a),(Nyc(),ixc)),420).g){case 0:b=a.n;c=a.o;return new f7c(b.a+c.a/2,b.b+c.b/2);case 1:return new g7c(a.n);default:return null;}} +function lrc(){lrc=ccb;irc=new mrc(ane,0);hrc=new mrc('LEFTUP',1);krc=new mrc('RIGHTUP',2);grc=new mrc('LEFTDOWN',3);jrc=new mrc('RIGHTDOWN',4);frc=new mrc('BALANCED',5)} +function FFc(a,b,c){var d,e,f;d=Kdb(a.a[b.p],a.a[c.p]);if(d==0){e=BD(vNb(b,(wtc(),Qsc)),15);f=BD(vNb(c,Qsc),15);if(e.Hc(c)){return -1}else if(f.Hc(b)){return 1}}return d} +function jXc(a){switch(a.g){case 1:return new XVc;case 2:return new ZVc;case 3:return new VVc;case 0:return null;default:throw vbb(new Wdb(jre+(a.f!=null?a.f:''+a.g)));}} +function Ikd(a,b,c){switch(b){case 1:!a.n&&(a.n=new cUd(D2,a,1,7));Uxd(a.n);!a.n&&(a.n=new cUd(D2,a,1,7));ytd(a.n,BD(c,14));return;case 2:Lkd(a,GD(c));return;}ekd(a,b,c)} +function Zkd(a,b,c){switch(b){case 3:ald(a,Edb(ED(c)));return;case 4:cld(a,Edb(ED(c)));return;case 5:dld(a,Edb(ED(c)));return;case 6:eld(a,Edb(ED(c)));return;}Ikd(a,b,c)} +function Fnd(a,b,c){var d,e,f;f=(d=new rUd,d);e=xId(f,b,null);!!e&&e.Fi();pnd(f,c);wtd((!a.c&&(a.c=new cUd(p5,a,12,10)),a.c),f);AId(f,0);DId(f,1);CId(f,true);BId(f,true)} +function mUd(a,b){var c,d,e;c=Crb(a.g,b);if(JD(c,235)){e=BD(c,235);e.Qh()==null&&undefined;return e.Nh()}else if(JD(c,498)){d=BD(c,1938);e=d.b;return e}else{return null}} +function Ui(a,b,c,d){var e,f;Qb(b);Qb(c);f=BD(tn(a.d,b),19);Ob(!!f,'Row %s not in %s',b,a.e);e=BD(tn(a.b,c),19);Ob(!!e,'Column %s not in %s',c,a.c);return Wi(a,f.a,e.a,d)} +function JC(a,b,c,d,e,f,g){var h,i,j,k,l;k=e[f];j=f==g-1;h=j?d:0;l=LC(h,k);d!=10&&OC(GC(a,g-f),b[f],c[f],h,l);if(!j){++f;for(i=0;i1||h==-1){f=BD(i,15);e.Wb(t6d(a,f))}else{e.Wb(s6d(a,BD(i,56)))}}}} +function Zbb(b,c,d,e){Ybb();var f=Wbb;$moduleName=c;$moduleBase=d;tbb=e;function g(){for(var a=0;aOqe){return c}else e>-1.0E-6&&++c}return c} +function PQd(a,b){var c;if(b!=a.b){c=null;!!a.b&&(c=lid(a.b,a,-4,c));!!b&&(c=kid(b,a,-4,c));c=GQd(a,b,c);!!c&&c.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,3,b,b))} +function SQd(a,b){var c;if(b!=a.f){c=null;!!a.f&&(c=lid(a.f,a,-1,c));!!b&&(c=kid(b,a,-1,c));c=IQd(a,b,c);!!c&&c.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,0,b,b))} +function E9d(a){var b,c,d;if(a==null)return null;c=BD(a,15);if(c.dc())return '';d=new Hfb;for(b=c.Kc();b.Ob();){Efb(d,(Q8d(),GD(b.Pb())));d.a+=' '}return lcb(d,d.a.length-1)} +function I9d(a){var b,c,d;if(a==null)return null;c=BD(a,15);if(c.dc())return '';d=new Hfb;for(b=c.Kc();b.Ob();){Efb(d,(Q8d(),GD(b.Pb())));d.a+=' '}return lcb(d,d.a.length-1)} +function qEc(a,b,c){var d,e;d=a.c[b.c.p][b.p];e=a.c[c.c.p][c.p];if(d.a!=null&&e.a!=null){return Ddb(d.a,e.a)}else if(d.a!=null){return -1}else if(e.a!=null){return 1}return 0} +function zqd(a,b){var c,d,e,f,g,h;if(b){f=b.a.length;c=new Yge(f);for(h=(c.b-c.a)*c.c<0?(Xge(),Wge):new she(c);h.Ob();){g=BD(h.Pb(),19);e=Zpd(b,g.a);d=new Crd(a);Aqd(d.a,e)}}} +function Qqd(a,b){var c,d,e,f,g,h;if(b){f=b.a.length;c=new Yge(f);for(h=(c.b-c.a)*c.c<0?(Xge(),Wge):new she(c);h.Ob();){g=BD(h.Pb(),19);e=Zpd(b,g.a);d=new lrd(a);nqd(d.a,e)}}} +function eFd(b){var c;if(b!=null&&b.length>0&&bfb(b,b.length-1)==33){try{c=PEd(qfb(b,0,b.length-1));return c.e==null}catch(a){a=ubb(a);if(!JD(a,32))throw vbb(a)}}return false} +function h3d(a,b,c){var d,e,f;d=b.ak();f=b.dd();e=d.$j()?H2d(a,3,d,null,f,M2d(a,d,f,JD(d,99)&&(BD(d,18).Bb&Tje)!=0),true):H2d(a,1,d,d.zj(),f,-1,true);c?c.Ei(e):(c=e);return c} +function Vee(){var a,b,c;b=0;for(a=0;a<'X'.length;a++){c=Uee((BCb(a,'X'.length),'X'.charCodeAt(a)));if(c==0)throw vbb(new mde('Unknown Option: '+'X'.substr(a)));b|=c}return b} +function mZb(a,b,c){var d,e,f;d=Q_b(b);e=a_b(d);f=new H0b;F0b(f,b);switch(c.g){case 1:G0b(f,Wcd(Zcd(e)));break;case 2:G0b(f,Zcd(e));}yNb(f,(Nyc(),Uxc),ED(vNb(a,Uxc)));return f} +function U9b(a){var b,c;b=BD(Rr(new Sr(ur(R_b(a.a).a.Kc(),new Sq))),17);c=BD(Rr(new Sr(ur(U_b(a.a).a.Kc(),new Sq))),17);return Ccb(DD(vNb(b,(wtc(),ltc))))||Ccb(DD(vNb(c,ltc)))} +function Xjc(){Xjc=ccb;Tjc=new Yjc('ONE_SIDE',0);Vjc=new Yjc('TWO_SIDES_CORNER',1);Wjc=new Yjc('TWO_SIDES_OPPOSING',2);Ujc=new Yjc('THREE_SIDES',3);Sjc=new Yjc('FOUR_SIDES',4)} +function jkc(a,b,c,d,e){var f,g;f=BD(GAb(JAb(b.Oc(),new _kc),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Dyb)]))),15);g=BD(Si(a.b,c,d),15);e==0?g.Wc(0,f):g.Gc(f)} +function KDc(a,b){var c,d,e,f,g;for(f=new olb(b.a);f.a0&&ric(this,this.c-1,(Ucd(),zcd));this.c0&&a[0].length>0&&(this.c=Ccb(DD(vNb(Q_b(a[0][0]),(wtc(),Rsc)))));this.a=KC(CX,nie,2018,a.length,0,2);this.b=KC(FX,nie,2019,a.length,0,2);this.d=new ss} +function tKc(a){if(a.c.length==0){return false}if((tCb(0,a.c.length),BD(a.c[0],17)).c.i.k==(j0b(),g0b)){return true}return FAb(NAb(new YAb(null,new Kub(a,16)),new wKc),new yKc)} +function rRc(a,b,c){Odd(c,'Tree layout',1);H2c(a.b);K2c(a.b,(yRc(),uRc),uRc);K2c(a.b,vRc,vRc);K2c(a.b,wRc,wRc);K2c(a.b,xRc,xRc);a.a=F2c(a.b,b);sRc(a,b,Udd(c,1));Qdd(c);return b} +function HXc(a,b){var c,d,e,f,g,h,i;h=gVc(b);f=b.f;i=b.g;g=$wnd.Math.sqrt(f*f+i*i);e=0;for(d=new olb(h);d.a=0){c=Abb(a,Jje);d=Hbb(a,Jje)}else{b=Pbb(a,1);c=Abb(b,500000000);d=Hbb(b,500000000);d=wbb(Nbb(d,1),xbb(a,1))}return Mbb(Nbb(d,32),xbb(c,Yje))} +function oQb(a,b,c){var d,e;d=(sCb(b.b!=0),BD(Nsb(b,b.a.a),8));switch(c.g){case 0:d.b=0;break;case 2:d.b=a.f;break;case 3:d.a=0;break;default:d.a=a.g;}e=Jsb(b,0);Vsb(e,d);return b} +function pmc(a,b,c,d){var e,f,g,h,i;i=a.b;f=b.d;g=f.j;h=umc(g,i.d[g.g],c);e=P6c(R6c(f.n),f.a);switch(f.j.g){case 1:case 3:h.a+=e.a;break;case 2:case 4:h.b+=e.b;}Gsb(d,h,d.c.b,d.c)} +function yJc(a,b,c){var d,e,f,g;g=Jkb(a.e,b,0);f=new zJc;f.b=c;d=new Bib(a.e,g);while(d.b1;b>>=1){(b&1)!=0&&(d=Ogb(d,c));c.d==1?(c=Ogb(c,c)):(c=new Xgb(Lhb(c.a,c.d,KC(WD,oje,25,c.d<<1,15,1))))}d=Ogb(d,c);return d} +function zub(){zub=ccb;var a,b,c,d;wub=KC(UD,Vje,25,25,15,1);xub=KC(UD,Vje,25,33,15,1);d=1.52587890625E-5;for(b=32;b>=0;b--){xub[b]=d;d*=0.5}c=1;for(a=24;a>=0;a--){wub[a]=c;c*=0.5}} +function S1b(a){var b,c;if(Ccb(DD(hkd(a,(Nyc(),fxc))))){for(c=new Sr(ur(_sd(a).a.Kc(),new Sq));Qr(c);){b=BD(Rr(c),79);if(Qld(b)){if(Ccb(DD(hkd(b,gxc)))){return true}}}}return false} +function kjc(a,b){var c,d,e;if(Qqb(a.f,b)){b.b=a;d=b.c;Jkb(a.j,d,0)!=-1||Ekb(a.j,d);e=b.d;Jkb(a.j,e,0)!=-1||Ekb(a.j,e);c=b.a.b;if(c.c.length!=0){!a.i&&(a.i=new vjc(a));qjc(a.i,c)}}} +function rmc(a){var b,c,d,e,f;c=a.c.d;d=c.j;e=a.d.d;f=e.j;if(d==f){return c.p=0&&dfb(a.substr(b,'GMT'.length),'GMT')){c[0]=b+3;return tA(a,c,d)}if(b>=0&&dfb(a.substr(b,'UTC'.length),'UTC')){c[0]=b+3;return tA(a,c,d)}return tA(a,c,d)} +function tjc(a,b){var c,d,e,f,g;f=a.g.a;g=a.g.b;for(d=new olb(a.d);d.ac;f--){a[f]|=b[f-c-1]>>>g;a[f-1]=b[f-c-1]<=a.f){break}f.c[f.c.length]=c}return f} +function sfd(a){var b,c,d,e;b=null;for(e=new olb(a.wf());e.a0&&$fb(a.g,b,a.g,b+d,h);g=c.Kc();a.i+=d;for(e=0;ef&&nfb(j,sfb(c[h],ltb))){e=h;f=i}}e>=0&&(d[0]=b+f);return e} +function MIb(a,b){var c;c=NIb(a.b.Hf(),b.b.Hf());if(c!=0){return c}switch(a.b.Hf().g){case 1:case 2:return beb(a.b.sf(),b.b.sf());case 3:case 4:return beb(b.b.sf(),a.b.sf());}return 0} +function iRb(a){var b,c,d;d=a.e.c.length;a.a=IC(WD,[nie,oje],[48,25],15,[d,d],2);for(c=new olb(a.c);c.a>4&15;f=a[d]&15;g[e++]=Qmd[c];g[e++]=Qmd[f]}return zfb(g,0,g.length)}} +function j3d(a,b,c){var d,e,f;d=b.ak();f=b.dd();e=d.$j()?H2d(a,4,d,f,null,M2d(a,d,f,JD(d,99)&&(BD(d,18).Bb&Tje)!=0),true):H2d(a,d.Kj()?2:1,d,f,d.zj(),-1,true);c?c.Ei(e):(c=e);return c} +function wfb(a){var b,c;if(a>=Tje){b=Uje+(a-Tje>>10&1023)&aje;c=56320+(a-Tje&1023)&aje;return String.fromCharCode(b)+(''+String.fromCharCode(c))}else{return String.fromCharCode(a&aje)}} +function bKb(a,b){$Jb();var c,d,e,f;e=BD(BD(Qc(a.r,b),21),84);if(e.gc()>=2){d=BD(e.Kc().Pb(),111);c=a.u.Hc((rcd(),mcd));f=a.u.Hc(qcd);return !d.a&&!c&&(e.gc()==2||f)}else{return false}} +function IVc(a,b,c,d,e){var f,g,h;f=JVc(a,b,c,d,e);h=false;while(!f){AVc(a,e,true);h=true;f=JVc(a,b,c,d,e)}h&&AVc(a,e,false);g=dVc(e);if(g.c.length!=0){!!a.d&&a.d.lg(g);IVc(a,e,c,d,g)}} +function Mad(){Mad=ccb;Kad=new Nad(ane,0);Iad=new Nad('DIRECTED',1);Lad=new Nad('UNDIRECTED',2);Gad=new Nad('ASSOCIATION',3);Jad=new Nad('GENERALIZATION',4);Had=new Nad('DEPENDENCY',5)} +function kfd(a,b){var c;if(!mpd(a)){throw vbb(new Zdb(Sse))}c=mpd(a);switch(b.g){case 1:return -(a.j+a.f);case 2:return a.i-c.g;case 3:return a.j-c.f;case 4:return -(a.i+a.g);}return 0} +function cub(a,b){var c,d;uCb(b);d=a.b.c.length;Ekb(a.b,b);while(d>0){c=d;d=(d-1)/2|0;if(a.a.ue(Ikb(a.b,d),b)<=0){Nkb(a.b,c,b);return true}Nkb(a.b,c,Ikb(a.b,d))}Nkb(a.b,d,b);return true} +function BHb(a,b,c,d){var e,f;e=0;if(!c){for(f=0;f=h} +function Tpd(a,b,c,d){var e;e=false;if(ND(d)){e=true;Upd(b,c,GD(d))}if(!e){if(KD(d)){e=true;Tpd(a,b,c,d)}}if(!e){if(JD(d,236)){e=true;Spd(b,c,BD(d,236))}}if(!e){throw vbb(new vcb(Ute))}} +function W0d(a,b){var c,d,e;c=b.Hh(a.a);if(c){e=AAd((!c.b&&(c.b=new sId((jGd(),fGd),x6,c)),c.b),Sve);if(e!=null){for(d=1;d<(O6d(),K6d).length;++d){if(dfb(K6d[d],e)){return d}}}}return 0} +function X0d(a,b){var c,d,e;c=b.Hh(a.a);if(c){e=AAd((!c.b&&(c.b=new sId((jGd(),fGd),x6,c)),c.b),Sve);if(e!=null){for(d=1;d<(O6d(),L6d).length;++d){if(dfb(L6d[d],e)){return d}}}}return 0} +function Ve(a,b){var c,d,e,f;uCb(b);f=a.a.gc();if(f0?1:0;while(f.a[e]!=c){f=f.a[e];e=a.a.ue(c.d,f.d)>0?1:0}f.a[e]=d;d.b=c.b;d.a[0]=c.a[0];d.a[1]=c.a[1];c.a[0]=null;c.a[1]=null} +function ucd(a){rcd();var b,c;b=qqb(ncd,OC(GC(E1,1),Kie,273,0,[pcd]));if(Ox(Cx(b,a))>1){return false}c=qqb(mcd,OC(GC(E1,1),Kie,273,0,[lcd,qcd]));if(Ox(Cx(c,a))>1){return false}return true} +function fod(a,b){var c;c=Phb((yFd(),xFd),a);JD(c,498)?Shb(xFd,a,new bUd(this,b)):Shb(xFd,a,this);bod(this,b);if(b==(LFd(),KFd)){this.wb=BD(this,1939);BD(b,1941)}else{this.wb=(NFd(),MFd)}} +function lZd(b){var c,d,e;if(b==null){return null}c=null;for(d=0;d=_ie?'error':d>=900?'warn':d>=800?'info':'log');gCb(c,a.a);!!a.b&&hCb(b,c,a.b,'Exception: ',true)} +function vNb(a,b){var c,d;d=(!a.q&&(a.q=new Lqb),Ohb(a.q,b));if(d!=null){return d}c=b.wg();JD(c,4)&&(c==null?(!a.q&&(a.q=new Lqb),Thb(a.q,b)):(!a.q&&(a.q=new Lqb),Rhb(a.q,b,c)),a);return c} +function qUb(){qUb=ccb;lUb=new rUb('P1_CYCLE_BREAKING',0);mUb=new rUb('P2_LAYERING',1);nUb=new rUb('P3_NODE_ORDERING',2);oUb=new rUb('P4_NODE_PLACEMENT',3);pUb=new rUb('P5_EDGE_ROUTING',4)} +function SUb(a,b){var c,d,e,f,g;e=b==1?KUb:JUb;for(d=e.a.ec().Kc();d.Ob();){c=BD(d.Pb(),103);for(g=BD(Qc(a.f.c,c),21).Kc();g.Ob();){f=BD(g.Pb(),46);Lkb(a.b.b,f.b);Lkb(a.b.a,BD(f.b,81).d)}}} +function IWb(a,b){AWb();var c;if(a.c==b.c){if(a.b==b.b||pWb(a.b,b.b)){c=mWb(a.b)?1:-1;if(a.a&&!b.a){return c}else if(!a.a&&b.a){return -c}}return beb(a.b.g,b.b.g)}else{return Kdb(a.c,b.c)}} +function y6b(a,b){var c;Odd(b,'Hierarchical port position processing',1);c=a.b;c.c.length>0&&x6b((tCb(0,c.c.length),BD(c.c[0],29)),a);c.c.length>1&&x6b(BD(Ikb(c,c.c.length-1),29),a);Qdd(b)} +function RVc(a,b){var c,d,e;if(CVc(a,b)){return true}for(d=new olb(b);d.a=e||b<0)throw vbb(new qcb(lue+b+mue+e));if(c>=e||c<0)throw vbb(new qcb(nue+c+mue+e));b!=c?(d=(f=a.Ti(c),a.Hi(b,f),f)):(d=a.Oi(c));return d} +function m6d(a){var b,c,d;d=a;if(a){b=0;for(c=a.Ug();c;c=c.Ug()){if(++b>Wje){return m6d(c)}d=c;if(c==a){throw vbb(new Zdb('There is a cycle in the containment hierarchy of '+a))}}}return d} +function Fe(a){var b,c,d;d=new xwb(She,'[',']');for(c=a.Kc();c.Ob();){b=c.Pb();uwb(d,PD(b)===PD(a)?'(this Collection)':b==null?Xhe:fcb(b))}return !d.a?d.c:d.e.length==0?d.a.a:d.a.a+(''+d.e)} +function CVc(a,b){var c,d;d=false;if(b.gc()<2){return false}for(c=0;cd&&(BCb(b-1,a.length),a.charCodeAt(b-1)<=32)){--b}return d>0||b1&&(a.j.b+=a.e)}else{a.j.a+=c.a;a.j.b=$wnd.Math.max(a.j.b,c.b);a.d.c.length>1&&(a.j.a+=a.e)}} +function gkc(){gkc=ccb;dkc=OC(GC(F1,1),bne,61,0,[(Ucd(),Acd),zcd,Rcd]);ckc=OC(GC(F1,1),bne,61,0,[zcd,Rcd,Tcd]);ekc=OC(GC(F1,1),bne,61,0,[Rcd,Tcd,Acd]);fkc=OC(GC(F1,1),bne,61,0,[Tcd,Acd,zcd])} +function omc(a,b,c,d){var e,f,g,h,i,j,k;g=a.c.d;h=a.d.d;if(g.j==h.j){return}k=a.b;e=g.j;i=null;while(e!=h.j){i=b==0?Xcd(e):Vcd(e);f=umc(e,k.d[e.g],c);j=umc(i,k.d[i.g],c);Dsb(d,P6c(f,j));e=i}} +function oFc(a,b,c,d){var e,f,g,h,i;g=JHc(a.a,b,c);h=BD(g.a,19).a;f=BD(g.b,19).a;if(d){i=BD(vNb(b,(wtc(),gtc)),10);e=BD(vNb(c,gtc),10);if(!!i&&!!e){mic(a.b,i,e);h+=a.b.i;f+=a.b.e}}return h>f} +function oHc(a){var b,c,d,e,f,g,h,i,j;this.a=lHc(a);this.b=new Rkb;for(c=a,d=0,e=c.length;dwic(a.d).c){a.i+=a.g.c;yic(a.d)}else if(wic(a.d).c>wic(a.g).c){a.e+=a.d.c;yic(a.g)}else{a.i+=vic(a.g);a.e+=vic(a.d);yic(a.g);yic(a.d)}}} +function XOc(a,b,c){var d,e,f,g;f=b.q;g=b.r;new DOc((HOc(),FOc),b,f,1);new DOc(FOc,f,g,1);for(e=new olb(c);e.ah&&(i=h/d);e>f&&(j=f/e);g=$wnd.Math.min(i,j);a.a+=g*(b.a-a.a);a.b+=g*(b.b-a.b)} +function sZc(a,b,c,d,e){var f,g;g=false;f=BD(Ikb(c.b,0),33);while(yZc(a,b,f,d,e)){g=true;NZc(c,f);if(c.b.c.length==0){break}f=BD(Ikb(c.b,0),33)}c.b.c.length==0&&v$c(c.j,c);g&&a$c(b.q);return g} +function t6c(a,b){i6c();var c,d,e,f;if(b.b<2){return false}f=Jsb(b,0);c=BD(Xsb(f),8);d=c;while(f.b!=f.d.c){e=BD(Xsb(f),8);if(s6c(a,d,e)){return true}d=e}if(s6c(a,d,c)){return true}return false} +function ckd(a,b,c,d){var e,f;if(c==0){return !a.o&&(a.o=new dId((Thd(),Qhd),S2,a,0)),bId(a.o,b,d)}return f=BD(XKd((e=BD(Ajd(a,16),26),!e?a.zh():e),c),66),f.Nj().Rj(a,yjd(a),c-aLd(a.zh()),b,d)} +function bod(a,b){var c;if(b!=a.sb){c=null;!!a.sb&&(c=BD(a.sb,49).ih(a,1,i5,c));!!b&&(c=BD(b,49).gh(a,1,i5,c));c=Jnd(a,b,c);!!c&&c.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,4,b,b))} +function yqd(a,b){var c,d,e,f;if(b){e=Xpd(b,'x');c=new zrd(a);hmd(c.a,(uCb(e),e));f=Xpd(b,'y');d=new Ard(a);imd(d.a,(uCb(f),f))}else{throw vbb(new cqd('All edge sections need an end point.'))}} +function wqd(a,b){var c,d,e,f;if(b){e=Xpd(b,'x');c=new wrd(a);omd(c.a,(uCb(e),e));f=Xpd(b,'y');d=new xrd(a);pmd(d.a,(uCb(f),f))}else{throw vbb(new cqd('All edge sections need a start point.'))}} +function pyb(a,b){var c,d,e,f,g,h,i;for(d=syb(a),f=0,h=d.length;f>22-b;e=a.h<>22-b}else if(b<44){c=0;d=a.l<>44-b}else{c=0;d=0;e=a.l<a){throw vbb(new Wdb('k must be smaller than n'))}else return b==0||b==a?1:a==0?0:q6c(a)/(q6c(b)*q6c(a-b))} +function jfd(a,b){var c,d,e,f;c=new _ud(a);while(c.g==null&&!c.c?Uud(c):c.g==null||c.i!=0&&BD(c.g[c.i-1],47).Ob()){f=BD(Vud(c),56);if(JD(f,160)){d=BD(f,160);for(e=0;e>4];b[c*2+1]=gde[f&15]}return zfb(b,0,b.length)} +function fn(a){Vm();var b,c,d;d=a.c.length;switch(d){case 0:return Um;case 1:b=BD(qr(new olb(a)),42);return ln(b.cd(),b.dd());default:c=BD(Qkb(a,KC(CK,zie,42,a.c.length,0,1)),165);return new wx(c);}} +function ITb(a){var b,c,d,e,f,g;b=new jkb;c=new jkb;Wjb(b,a);Wjb(c,a);while(c.b!=c.c){e=BD(fkb(c),37);for(g=new olb(e.a);g.a0&&WGc(a,c,b);return e}return TGc(a,b,c)} +function MSc(a,b,c){var d,e,f,g;if(b.b!=0){d=new Psb;for(g=Jsb(b,0);g.b!=g.d.c;){f=BD(Xsb(g),86);ye(d,URc(f));e=f.e;e.a=BD(vNb(f,(mTc(),kTc)),19).a;e.b=BD(vNb(f,lTc),19).a}MSc(a,d,Udd(c,d.b/a.a|0))}} +function JZc(a,b){var c,d,e,f,g;if(a.e<=b){return a.g}if(LZc(a,a.g,b)){return a.g}f=a.r;d=a.g;g=a.r;e=(f-d)/2+d;while(d+11&&(a.e.b+=a.a)}else{a.e.a+=c.a;a.e.b=$wnd.Math.max(a.e.b,c.b);a.d.c.length>1&&(a.e.a+=a.a)}} +function cmc(a){var b,c,d,e;e=a.i;b=e.b;d=e.j;c=e.g;switch(e.a.g){case 0:c.a=(a.g.b.o.a-d.a)/2;break;case 1:c.a=b.d.n.a+b.d.a.a;break;case 2:c.a=b.d.n.a+b.d.a.a-d.a;break;case 3:c.b=b.d.n.b+b.d.a.b;}} +function Q6c(a,b,c,d,e){if(dd&&(a.a=d);a.be&&(a.b=e);return a} +function lsd(a){if(JD(a,149)){return esd(BD(a,149))}else if(JD(a,229)){return fsd(BD(a,229))}else if(JD(a,23)){return gsd(BD(a,23))}else{throw vbb(new Wdb(Xte+Fe(new amb(OC(GC(SI,1),Uhe,1,5,[a])))))}} +function mhb(a,b,c,d,e){var f,g,h;f=true;for(g=0;g>>e|c[g+d+1]<>>e;++g}return f} +function zMc(a,b,c,d){var e,f,g;if(b.k==(j0b(),g0b)){for(f=new Sr(ur(R_b(b).a.Kc(),new Sq));Qr(f);){e=BD(Rr(f),17);g=e.c.i.k;if(g==g0b&&a.c.a[e.c.i.c.p]==d&&a.c.a[b.c.p]==c){return true}}}return false} +function mD(a,b){var c,d,e,f;b&=63;c=a.h&Fje;if(b<22){f=c>>>b;e=a.m>>b|c<<22-b;d=a.l>>b|a.m<<22-b}else if(b<44){f=0;e=c>>>b-22;d=a.m>>b-22|a.h<<44-b}else{f=0;e=0;d=c>>>b-44}return TC(d&Eje,e&Eje,f&Fje)} +function Iic(a,b,c,d){var e;this.b=d;this.e=a==(rGc(),pGc);e=b[c];this.d=IC(sbb,[nie,dle],[177,25],16,[e.length,e.length],2);this.a=IC(WD,[nie,oje],[48,25],15,[e.length,e.length],2);this.c=new sic(b,c)} +function ljc(a){var b,c,d;a.k=new Ki((Ucd(),OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd])).length,a.j.c.length);for(d=new olb(a.j);d.a=c){K9b(a,b,d.p);return true}}return false} +function Iod(a){var b;if((a.Db&64)!=0)return fld(a);b=new Wfb(dte);!a.a||Qfb(Qfb((b.a+=' "',b),a.a),'"');Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} +function Z2d(a,b,c){var d,e,f,g,h;h=S6d(a.e.Tg(),b);e=BD(a.g,119);d=0;for(g=0;gc){return Jb(a,c,'start index')}if(b<0||b>c){return Jb(b,c,'end index')}return hc('end index (%s) must not be less than start index (%s)',OC(GC(SI,1),Uhe,1,5,[meb(b),meb(a)]))} +function Pz(b,c){var d,e,f,g;for(e=0,f=b.length;e0&&iCc(a,f,c))}}b.p=0} +function p5c(a){var b;this.c=new Psb;this.f=a.e;this.e=a.d;this.i=a.g;this.d=a.c;this.b=a.b;this.k=a.j;this.a=a.a;!a.i?(this.j=(b=BD(gdb(e1),9),new xqb(b,BD(_Bb(b,b.length),9),0))):(this.j=a.i);this.g=a.f} +function Wb(a){var b,c,d,e;b=Kfb(Qfb(new Wfb('Predicates.'),'and'),40);c=true;for(e=new vib(a);e.b0?h[g-1]:KC(OQ,kne,10,0,0,1);e=h[g];j=g=0?a.Bh(e):vid(a,d)}else{throw vbb(new Wdb(ite+d.ne()+jte))}}else{eid(a,c,d)}} +function aqd(a){var b,c;c=null;b=false;if(JD(a,204)){b=true;c=BD(a,204).a}if(!b){if(JD(a,258)){b=true;c=''+BD(a,258).a}}if(!b){if(JD(a,483)){b=true;c=''+BD(a,483).a}}if(!b){throw vbb(new vcb(Ute))}return c} +function ORd(a,b){var c,d;if(a.f){while(b.Ob()){c=BD(b.Pb(),72);d=c.ak();if(JD(d,99)&&(BD(d,18).Bb&ote)!=0&&(!a.e||d.Gj()!=x2||d.aj()!=0)&&c.dd()!=null){b.Ub();return true}}return false}else{return b.Ob()}} +function QRd(a,b){var c,d;if(a.f){while(b.Sb()){c=BD(b.Ub(),72);d=c.ak();if(JD(d,99)&&(BD(d,18).Bb&ote)!=0&&(!a.e||d.Gj()!=x2||d.aj()!=0)&&c.dd()!=null){b.Pb();return true}}return false}else{return b.Sb()}} +function I2d(a,b,c){var d,e,f,g,h,i;i=S6d(a.e.Tg(),b);d=0;h=a.i;e=BD(a.g,119);for(g=0;g1&&(b.c[b.c.length]=f,true)}} +function TJc(a){var b,c,d,e;c=new Psb;ye(c,a.o);d=new twb;while(c.b!=0){b=BD(c.b==0?null:(sCb(c.b!=0),Nsb(c,c.a.a)),508);e=KJc(a,b,true);e&&Ekb(d.a,b)}while(d.a.c.length!=0){b=BD(rwb(d),508);KJc(a,b,false)}} +function _5c(){_5c=ccb;$5c=new a6c(ole,0);T5c=new a6c('BOOLEAN',1);X5c=new a6c('INT',2);Z5c=new a6c('STRING',3);U5c=new a6c('DOUBLE',4);V5c=new a6c('ENUM',5);W5c=new a6c('ENUMSET',6);Y5c=new a6c('OBJECT',7)} +function H6c(a,b){var c,d,e,f,g;d=$wnd.Math.min(a.c,b.c);f=$wnd.Math.min(a.d,b.d);e=$wnd.Math.max(a.c+a.b,b.c+b.b);g=$wnd.Math.max(a.d+a.a,b.d+b.a);if(e=(e/2|0)){this.e=!d?null:d.c;this.d=e;while(c++0){uu(this)}}this.b=b;this.a=null} +function rEb(a,b){var c,d;b.a?sEb(a,b):(c=BD(Exb(a.b,b.b),57),!!c&&c==a.a[b.b.f]&&!!c.a&&c.a!=b.b.a&&c.c.Fc(b.b),d=BD(Dxb(a.b,b.b),57),!!d&&a.a[d.f]==b.b&&!!d.a&&d.a!=b.b.a&&b.b.c.Fc(d),Fxb(a.b,b.b),undefined)} +function FJb(a,b){var c,d;c=BD(Mpb(a.b,b),124);if(BD(BD(Qc(a.r,b),21),84).dc()){c.n.b=0;c.n.c=0;return}c.n.b=a.C.b;c.n.c=a.C.c;a.A.Hc((tdd(),sdd))&&KJb(a,b);d=JJb(a,b);KIb(a,b)==(Tbd(),Qbd)&&(d+=2*a.w);c.a.a=d} +function OKb(a,b){var c,d;c=BD(Mpb(a.b,b),124);if(BD(BD(Qc(a.r,b),21),84).dc()){c.n.d=0;c.n.a=0;return}c.n.d=a.C.d;c.n.a=a.C.a;a.A.Hc((tdd(),sdd))&&SKb(a,b);d=RKb(a,b);KIb(a,b)==(Tbd(),Qbd)&&(d+=2*a.w);c.a.b=d} +function cOb(a,b){var c,d,e,f;f=new Rkb;for(d=new olb(b);d.ac.a&&(d.Hc((i8c(),c8c))?(e=(b.a-c.a)/2):d.Hc(e8c)&&(e=b.a-c.a));b.b>c.b&&(d.Hc((i8c(),g8c))?(f=(b.b-c.b)/2):d.Hc(f8c)&&(f=b.b-c.b));Efd(a,e,f)} +function aod(a,b,c,d,e,f,g,h,i,j,k,l,m){JD(a.Cb,88)&&XMd($Kd(BD(a.Cb,88)),4);pnd(a,c);a.f=g;dJd(a,h);fJd(a,i);ZId(a,j);eJd(a,k);CId(a,l);aJd(a,m);BId(a,true);AId(a,e);a.ok(f);yId(a,b);d!=null&&(a.i=null,_Id(a,d))} +function PRd(a){var b,c;if(a.f){while(a.n>0){b=BD(a.k.Xb(a.n-1),72);c=b.ak();if(JD(c,99)&&(BD(c,18).Bb&ote)!=0&&(!a.e||c.Gj()!=x2||c.aj()!=0)&&b.dd()!=null){return true}else{--a.n}}return false}else{return a.n>0}} +function Jb(a,b,c){if(a<0){return hc(The,OC(GC(SI,1),Uhe,1,5,[c,meb(a)]))}else if(b<0){throw vbb(new Wdb(Vhe+b))}else{return hc('%s (%s) must not be greater than size (%s)',OC(GC(SI,1),Uhe,1,5,[c,meb(a),meb(b)]))}} +function Llb(a,b,c,d,e,f){var g,h,i,j;g=d-c;if(g<7){Ilb(b,c,d,f);return}i=c+e;h=d+e;j=i+(h-i>>1);Llb(b,a,i,j,-e,f);Llb(b,a,j,h,-e,f);if(f.ue(a[j-1],a[j])<=0){while(c=0?a.sh(f,c):uid(a,e,c)}else{throw vbb(new Wdb(ite+e.ne()+jte))}}else{did(a,d,e,c)}} +function q6d(b){var c,d,e,f;d=BD(b,49).qh();if(d){try{e=null;c=nUd((yFd(),xFd),LEd(MEd(d)));if(c){f=c.rh();!!f&&(e=f.Wk(tfb(d.e)))}if(!!e&&e!=b){return q6d(e)}}catch(a){a=ubb(a);if(!JD(a,60))throw vbb(a)}}return b} +function jrb(a,b,c){var d,e,f,g;g=b==null?0:a.b.se(b);e=(d=a.a.get(g),d==null?new Array:d);if(e.length==0){a.a.set(g,e)}else{f=grb(a,b,e);if(f){return f.ed(c)}}NC(e,e.length,new pjb(b,c));++a.c;zpb(a.b);return null} +function YUc(a,b){var c,d;H2c(a.a);K2c(a.a,(PUc(),NUc),NUc);K2c(a.a,OUc,OUc);d=new j3c;e3c(d,OUc,(tVc(),sVc));PD(hkd(b,(ZWc(),LWc)))!==PD((pWc(),mWc))&&e3c(d,OUc,qVc);e3c(d,OUc,rVc);E2c(a.a,d);c=F2c(a.a,b);return c} +function uC(a){if(!a){return OB(),NB}var b=a.valueOf?a.valueOf():a;if(b!==a){var c=qC[typeof b];return c?c(b):xC(typeof b)}else if(a instanceof Array||a instanceof $wnd.Array){return new xB(a)}else{return new fC(a)}} +function RJb(a,b,c){var d,e,f;f=a.o;d=BD(Mpb(a.p,c),244);e=d.i;e.b=gIb(d);e.a=fIb(d);e.b=$wnd.Math.max(e.b,f.a);e.b>f.a&&!b&&(e.b=f.a);e.c=-(e.b-f.a)/2;switch(c.g){case 1:e.d=-e.a;break;case 3:e.d=f.b;}hIb(d);iIb(d)} +function SJb(a,b,c){var d,e,f;f=a.o;d=BD(Mpb(a.p,c),244);e=d.i;e.b=gIb(d);e.a=fIb(d);e.a=$wnd.Math.max(e.a,f.b);e.a>f.b&&!b&&(e.a=f.b);e.d=-(e.a-f.b)/2;switch(c.g){case 4:e.c=-e.b;break;case 2:e.c=f.a;}hIb(d);iIb(d)} +function Jgc(a,b){var c,d,e,f,g;if(b.dc()){return}e=BD(b.Xb(0),128);if(b.gc()==1){Igc(a,e,e,1,0,b);return}c=1;while(c0){try{f=Icb(c,Rie,Ohe)}catch(a){a=ubb(a);if(JD(a,127)){e=a;throw vbb(new rFd(e))}else throw vbb(a)}}d=(!b.a&&(b.a=new z0d(b)),b.a);return f=0?BD(qud(d,f),56):null} +function Ib(a,b){if(a<0){return hc(The,OC(GC(SI,1),Uhe,1,5,['index',meb(a)]))}else if(b<0){throw vbb(new Wdb(Vhe+b))}else{return hc('%s (%s) must be less than size (%s)',OC(GC(SI,1),Uhe,1,5,['index',meb(a),meb(b)]))}} +function Slb(a){var b,c,d,e,f;if(a==null){return Xhe}f=new xwb(She,'[',']');for(c=a,d=0,e=c.length;d0){g=a.c.d;h=a.d.d;e=Y6c(c7c(new f7c(h.a,h.b),g),1/(d+1));f=new f7c(g.a,g.b);for(c=new olb(a.a);c.a=0?a._g(c,true,true):sid(a,e,true),153));BD(d,215).ol(b)}else{throw vbb(new Wdb(ite+b.ne()+jte))}} +function ugb(a){var b,c;if(a>-140737488355328&&a<140737488355328){if(a==0){return 0}b=a<0;b&&(a=-a);c=QD($wnd.Math.floor($wnd.Math.log(a)/0.6931471805599453));(!b||a!=$wnd.Math.pow(2,c))&&++c;return c}return vgb(Cbb(a))} +function QOc(a){var b,c,d,e,f,g,h;f=new zsb;for(c=new olb(a);c.a2&&h.e.b+h.j.b<=2){e=h;d=g}f.a.zc(e,f);e.q=d}return f} +function K5b(a,b){var c,d,e;d=new b0b(a);tNb(d,b);yNb(d,(wtc(),Gsc),b);yNb(d,(Nyc(),Vxc),(dcd(),$bd));yNb(d,mwc,(F7c(),B7c));__b(d,(j0b(),e0b));c=new H0b;F0b(c,d);G0b(c,(Ucd(),Tcd));e=new H0b;F0b(e,d);G0b(e,zcd);return d} +function Spc(a){switch(a.g){case 0:return new fGc((rGc(),oGc));case 1:return new CFc;case 2:return new fHc;default:throw vbb(new Wdb('No implementation is available for the crossing minimizer '+(a.f!=null?a.f:''+a.g)));}} +function tDc(a,b){var c,d,e,f,g;a.c[b.p]=true;Ekb(a.a,b);for(g=new olb(b.j);g.a=f){g.$b()}else{e=g.Kc();for(d=0;d0?zh():g<0&&Bw(a,b,-g);return true}else{return false}} +function fIb(a){var b,c,d,e,f,g,h;h=0;if(a.b==0){g=jIb(a,true);b=0;for(d=g,e=0,f=d.length;e0){h+=c;++b}}b>1&&(h+=a.c*(b-1))}else{h=Mtb(Zzb(OAb(JAb(Plb(a.a),new xIb),new zIb)))}return h>0?h+a.n.d+a.n.a:0} +function gIb(a){var b,c,d,e,f,g,h;h=0;if(a.b==0){h=Mtb(Zzb(OAb(JAb(Plb(a.a),new tIb),new vIb)))}else{g=kIb(a,true);b=0;for(d=g,e=0,f=d.length;e0){h+=c;++b}}b>1&&(h+=a.c*(b-1))}return h>0?h+a.n.b+a.n.c:0} +function MJb(a,b){var c,d,e,f;f=BD(Mpb(a.b,b),124);c=f.a;for(e=BD(BD(Qc(a.r,b),21),84).Kc();e.Ob();){d=BD(e.Pb(),111);!!d.c&&(c.a=$wnd.Math.max(c.a,ZHb(d.c)))}if(c.a>0){switch(b.g){case 2:f.n.c=a.s;break;case 4:f.n.b=a.s;}}} +function NQb(a,b){var c,d,e;c=BD(vNb(b,(wSb(),oSb)),19).a-BD(vNb(a,oSb),19).a;if(c==0){d=c7c(R6c(BD(vNb(a,(HSb(),DSb)),8)),BD(vNb(a,ESb),8));e=c7c(R6c(BD(vNb(b,DSb),8)),BD(vNb(b,ESb),8));return Kdb(d.a*d.b,e.a*e.b)}return c} +function iRc(a,b){var c,d,e;c=BD(vNb(b,(JTc(),ETc)),19).a-BD(vNb(a,ETc),19).a;if(c==0){d=c7c(R6c(BD(vNb(a,(mTc(),VSc)),8)),BD(vNb(a,WSc),8));e=c7c(R6c(BD(vNb(b,VSc),8)),BD(vNb(b,WSc),8));return Kdb(d.a*d.b,e.a*e.b)}return c} +function TZb(a){var b,c;c=new Ufb;c.a+='e_';b=KZb(a);b!=null&&(c.a+=''+b,c);if(!!a.c&&!!a.d){Qfb((c.a+=' ',c),C0b(a.c));Qfb(Pfb((c.a+='[',c),a.c.i),']');Qfb((c.a+=gne,c),C0b(a.d));Qfb(Pfb((c.a+='[',c),a.d.i),']')}return c.a} +function zRc(a){switch(a.g){case 0:return new lUc;case 1:return new sUc;case 2:return new CUc;case 3:return new IUc;default:throw vbb(new Wdb('No implementation is available for the layout phase '+(a.f!=null?a.f:''+a.g)));}} +function mfd(a,b,c,d,e){var f;f=0;switch(e.g){case 1:f=$wnd.Math.max(0,b.b+a.b-(c.b+d));break;case 3:f=$wnd.Math.max(0,-a.b-d);break;case 2:f=$wnd.Math.max(0,-a.a-d);break;case 4:f=$wnd.Math.max(0,b.a+a.a-(c.a+d));}return f} +function mqd(a,b,c){var d,e,f,g,h;if(c){e=c.a.length;d=new Yge(e);for(h=(d.b-d.a)*d.c<0?(Xge(),Wge):new she(d);h.Ob();){g=BD(h.Pb(),19);f=Zpd(c,g.a);Lte in f.a||Mte in f.a?$qd(a,f,b):erd(a,f,b);otd(BD(Ohb(a.b,Wpd(f)),79))}}} +function LJd(a){var b,c;switch(a.b){case -1:{return true}case 0:{c=a.t;if(c>1||c==-1){a.b=-1;return true}else{b=wId(a);if(!!b&&(Q6d(),b.Cj()==Bve)){a.b=-1;return true}else{a.b=1;return false}}}default:case 1:{return false}}} +function k1d(a,b){var c,d,e,f,g;d=(!b.s&&(b.s=new cUd(t5,b,21,17)),b.s);f=null;for(e=0,g=d.i;e=0&&f=0?a._g(c,true,true):sid(a,e,true),153));return BD(d,215).ll(b)}else{throw vbb(new Wdb(ite+b.ne()+lte))}} +function BZd(){tZd();var a;if(sZd)return BD(nUd((yFd(),xFd),_ve),1939);rEd(CK,new J_d);CZd();a=BD(JD(Phb((yFd(),xFd),_ve),547)?Phb(xFd,_ve):new AZd,547);sZd=true;yZd(a);zZd(a);Rhb((JFd(),IFd),a,new EZd);Shb(xFd,_ve,a);return a} +function v2d(a,b){var c,d,e,f;a.j=-1;if(oid(a.e)){c=a.i;f=a.i!=0;lud(a,b);d=new pSd(a.e,3,a.c,null,b,c,f);e=b.Qk(a.e,a.c,null);e=h3d(a,b,e);if(!e){Uhd(a.e,d)}else{e.Ei(d);e.Fi()}}else{lud(a,b);e=b.Qk(a.e,a.c,null);!!e&&e.Fi()}} +function rA(a,b){var c,d,e;e=0;d=b[0];if(d>=a.length){return -1}c=(BCb(d,a.length),a.charCodeAt(d));while(c>=48&&c<=57){e=e*10+(c-48);++d;if(d>=a.length){break}c=(BCb(d,a.length),a.charCodeAt(d))}d>b[0]?(b[0]=d):(e=-1);return e} +function vMb(a){var b,c,d,e,f;e=BD(a.a,19).a;f=BD(a.b,19).a;c=e;d=f;b=$wnd.Math.max($wnd.Math.abs(e),$wnd.Math.abs(f));if(e<=0&&e==f){c=0;d=f-1}else{if(e==-b&&f!=b){c=f;d=e;f>=0&&++c}else{c=-f;d=e}}return new vgd(meb(c),meb(d))} +function fNb(a,b,c,d){var e,f,g,h,i,j;for(e=0;e=0&&j>=0&&i=a.i)throw vbb(new qcb(lue+b+mue+a.i));if(c>=a.i)throw vbb(new qcb(nue+c+mue+a.i));d=a.g[c];if(b!=c){b>16);b=d>>16&16;c=16-b;a=a>>b;d=a-256;b=d>>16&8;c+=b;a<<=b;d=a-Rje;b=d>>16&4;c+=b;a<<=b;d=a-oie;b=d>>16&2;c+=b;a<<=b;d=a>>14;b=d&~(d>>1);return c+2-b}} +function $Pb(a){QPb();var b,c,d,e;PPb=new Rkb;OPb=new Lqb;NPb=new Rkb;b=(!a.a&&(a.a=new cUd(E2,a,10,11)),a.a);SPb(b);for(e=new Fyd(b);e.e!=e.i.gc();){d=BD(Dyd(e),33);if(Jkb(PPb,d,0)==-1){c=new Rkb;Ekb(NPb,c);TPb(d,c)}}return NPb} +function BQb(a,b,c){var d,e,f,g;a.a=c.b.d;if(JD(b,352)){e=itd(BD(b,79),false,false);f=ofd(e);d=new FQb(a);reb(f,d);ifd(f,e);b.We((Y9c(),Q8c))!=null&&reb(BD(b.We(Q8c),74),d)}else{g=BD(b,470);g.Hg(g.Dg()+a.a.a);g.Ig(g.Eg()+a.a.b)}} +function _5b(a,b){var c,d,e,f,g,h,i,j;j=Edb(ED(vNb(b,(Nyc(),zyc))));i=a[0].n.a+a[0].o.a+a[0].d.c+j;for(h=1;h=0){return c}h=U6c(c7c(new f7c(g.c+g.b/2,g.d+g.a/2),new f7c(f.c+f.b/2,f.d+f.a/2)));return -(xOb(f,g)-1)*h} +function ufd(a,b,c){var d;MAb(new YAb(null,(!c.a&&(c.a=new cUd(A2,c,6,6)),new Kub(c.a,16))),new Mfd(a,b));MAb(new YAb(null,(!c.n&&(c.n=new cUd(D2,c,1,7)),new Kub(c.n,16))),new Ofd(a,b));d=BD(hkd(c,(Y9c(),Q8c)),74);!!d&&p7c(d,a,b)} +function sid(a,b,c){var d,e,f;f=e1d((O6d(),M6d),a.Tg(),b);if(f){Q6d();BD(f,66).Oj()||(f=_1d(q1d(M6d,f)));e=(d=a.Yg(f),BD(d>=0?a._g(d,true,true):sid(a,f,true),153));return BD(e,215).hl(b,c)}else{throw vbb(new Wdb(ite+b.ne()+lte))}} +function wAd(a,b,c,d){var e,f,g,h,i;e=a.d[b];if(e){f=e.g;i=e.i;if(d!=null){for(h=0;h=c){d=b;j=(i.c+i.a)/2;g=j-c;if(i.c<=j-c){e=new bPc(i.c,g);Dkb(a,d++,e)}h=j+c;if(h<=i.a){f=new bPc(h,i.a);wCb(d,a.c.length);aCb(a.c,d,f)}}} +function u0d(a){var b;if(!a.c&&a.g==null){a.d=a.si(a.f);wtd(a,a.d);b=a.d}else{if(a.g==null){return true}else if(a.i==0){return false}else{b=BD(a.g[a.i-1],47)}}if(b==a.b&&null.km>=null.jm()){Vud(a);return u0d(a)}else{return b.Ob()}} +function KTb(a,b,c){var d,e,f,g,h;h=c;!h&&(h=Ydd(new Zdd,0));Odd(h,Vme,1);aUb(a.c,b);g=EYb(a.a,b);if(g.gc()==1){MTb(BD(g.Xb(0),37),h)}else{f=1/g.gc();for(e=g.Kc();e.Ob();){d=BD(e.Pb(),37);MTb(d,Udd(h,f))}}CYb(a.a,g,b);NTb(b);Qdd(h)} +function qYb(a){this.a=a;if(a.c.i.k==(j0b(),e0b)){this.c=a.c;this.d=BD(vNb(a.c.i,(wtc(),Hsc)),61)}else if(a.d.i.k==e0b){this.c=a.d;this.d=BD(vNb(a.d.i,(wtc(),Hsc)),61)}else{throw vbb(new Wdb('Edge '+a+' is not an external edge.'))}} +function oQd(a,b){var c,d,e;e=a.b;a.b=b;(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,3,e,a.b));if(!b){pnd(a,null);qQd(a,0);pQd(a,null)}else if(b!=a){pnd(a,b.zb);qQd(a,b.d);c=(d=b.c,d==null?b.zb:d);pQd(a,c==null||dfb(c,b.zb)?null:c)}} +function NRd(a){var b,c;if(a.f){while(a.n=g)throw vbb(new Cyd(b,g));e=c[b];if(g==1){d=null}else{d=KC($3,hve,415,g-1,0,1);$fb(c,0,d,0,b);f=g-b-1;f>0&&$fb(c,b+1,d,b,f)}b0d(a,d);a0d(a,b,e);return e} +function m8d(){m8d=ccb;k8d=BD(qud(ZKd((r8d(),q8d).qb),6),34);h8d=BD(qud(ZKd(q8d.qb),3),34);i8d=BD(qud(ZKd(q8d.qb),4),34);j8d=BD(qud(ZKd(q8d.qb),5),18);XId(k8d);XId(h8d);XId(i8d);XId(j8d);l8d=new amb(OC(GC(t5,1),Mve,170,0,[k8d,h8d]))} +function AJb(a,b){var c;this.d=new H_b;this.b=b;this.e=new g7c(b.qf());c=a.u.Hc((rcd(),ocd));a.u.Hc(ncd)?a.D?(this.a=c&&!b.If()):(this.a=true):a.u.Hc(pcd)?c?(this.a=!(b.zf().Kc().Ob()||b.Bf().Kc().Ob())):(this.a=false):(this.a=false)} +function IKb(a,b){var c,d,e,f;c=a.o.a;for(f=BD(BD(Qc(a.r,b),21),84).Kc();f.Ob();){e=BD(f.Pb(),111);e.e.a=(d=e.b,d.Xe((Y9c(),s9c))?d.Hf()==(Ucd(),Tcd)?-d.rf().a-Edb(ED(d.We(s9c))):c+Edb(ED(d.We(s9c))):d.Hf()==(Ucd(),Tcd)?-d.rf().a:c)}} +function Q1b(a,b){var c,d,e,f;c=BD(vNb(a,(Nyc(),Lwc)),103);f=BD(hkd(b,$xc),61);e=BD(vNb(a,Vxc),98);if(e!=(dcd(),bcd)&&e!=ccd){if(f==(Ucd(),Scd)){f=lfd(b,c);f==Scd&&(f=Zcd(c))}}else{d=M1b(b);d>0?(f=Zcd(c)):(f=Wcd(Zcd(c)))}jkd(b,$xc,f)} +function olc(a,b){var c,d,e,f,g;g=a.j;b.a!=b.b&&Okb(g,new Ulc);e=g.c.length/2|0;for(d=0;d0&&WGc(a,c,b);return f}else if(d.a!=null){WGc(a,b,c);return -1}else if(e.a!=null){WGc(a,c,b);return 1}return 0} +function swd(a,b){var c,d,e,f;if(a.ej()){c=a.Vi();f=a.fj();++a.j;a.Hi(c,a.oi(c,b));d=a.Zi(3,null,b,c,f);if(a.bj()){e=a.cj(b,null);if(!e){a.$i(d)}else{e.Ei(d);e.Fi()}}else{a.$i(d)}}else{Bvd(a,b);if(a.bj()){e=a.cj(b,null);!!e&&e.Fi()}}} +function D2d(a,b){var c,d,e,f,g;g=S6d(a.e.Tg(),b);e=new yud;c=BD(a.g,119);for(f=a.i;--f>=0;){d=c[f];g.rl(d.ak())&&wtd(e,d)}!Yxd(a,e)&&oid(a.e)&&GLd(a,b.$j()?H2d(a,6,b,(mmb(),jmb),null,-1,false):H2d(a,b.Kj()?2:1,b,null,null,-1,false))} +function Dhb(){Dhb=ccb;var a,b;Bhb=KC(cJ,nie,91,32,0,1);Chb=KC(cJ,nie,91,32,0,1);a=1;for(b=0;b<=18;b++){Bhb[b]=ghb(a);Chb[b]=ghb(Nbb(a,b));a=Ibb(a,5)}for(;bg){return false}}if(b.q){d=b.C;g=d.c.c.a-d.o.a/2;e=d.n.a-c;if(e>g){return false}}return true} +function wcc(a,b){var c;Odd(b,'Partition preprocessing',1);c=BD(GAb(JAb(LAb(JAb(new YAb(null,new Kub(a.a,16)),new Acc),new Ccc),new Ecc),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Dyb)]))),15);MAb(c.Oc(),new Gcc);Qdd(b)} +function DMc(a){wMc();var b,c,d,e,f,g,h;c=new $rb;for(e=new olb(a.e.b);e.a1?(a.e*=Edb(a.a)):(a.f/=Edb(a.a));DOb(a);EOb(a);AOb(a);yNb(a.b,(CPb(),uPb),a.g)} +function Y5b(a,b,c){var d,e,f,g,h,i;d=0;i=c;if(!b){d=c*(a.c.length-1);i*=-1}for(f=new olb(a);f.a=0){if(!b){b=new Ifb;d>0&&Efb(b,a.substr(0,d))}b.a+='\\';Afb(b,c&aje)}else !!b&&Afb(b,c&aje)}return b?b.a:a} +function l5c(a){var b;if(!a.a){throw vbb(new Zdb('IDataType class expected for layout option '+a.f))}b=gvd(a.a);if(b==null){throw vbb(new Zdb("Couldn't create new instance of property '"+a.f+"'. "+ise+(fdb(Y3),Y3.k)+jse))}return BD(b,414)} +function aid(a){var b,c,d,e,f;f=a.eh();if(f){if(f.kh()){e=xid(a,f);if(e!=f){c=a.Vg();d=(b=a.Vg(),b>=0?a.Qg(null):a.eh().ih(a,-1-b,null,null));a.Rg(BD(e,49),c);!!d&&d.Fi();a.Lg()&&a.Mg()&&c>-1&&Uhd(a,new nSd(a,9,c,f,e));return e}}}return f} +function nTb(a){var b,c,d,e,f,g,h,i;g=0;f=a.f.e;for(d=0;d>5;if(e>=a.d){return a.e<0}c=a.a[e];b=1<<(b&31);if(a.e<0){d=Mgb(a);if(e>16)),15).Xc(f);if(h0){!(fad(a.a.c)&&b.n.d)&&!(gad(a.a.c)&&b.n.b)&&(b.g.d+=$wnd.Math.max(0,d/2-0.5));!(fad(a.a.c)&&b.n.a)&&!(gad(a.a.c)&&b.n.c)&&(b.g.a-=d-1)}}} +function N3b(a){var b,c,d,e,f;e=new Rkb;f=O3b(a,e);b=BD(vNb(a,(wtc(),gtc)),10);if(b){for(d=new olb(b.j);d.a>b;f=a.m>>b|c<<22-b;e=a.l>>b|a.m<<22-b}else if(b<44){g=d?Fje:0;f=c>>b-22;e=a.m>>b-22|c<<44-b}else{g=d?Fje:0;f=d?Eje:0;e=c>>b-44}return TC(e&Eje,f&Eje,g&Fje)} +function XOb(a){var b,c,d,e,f,g;this.c=new Rkb;this.d=a;d=Pje;e=Pje;b=Qje;c=Qje;for(g=Jsb(a,0);g.b!=g.d.c;){f=BD(Xsb(g),8);d=$wnd.Math.min(d,f.a);e=$wnd.Math.min(e,f.b);b=$wnd.Math.max(b,f.a);c=$wnd.Math.max(c,f.b)}this.a=new J6c(d,e,b-d,c-e)} +function Dac(a,b){var c,d,e,f,g,h;for(f=new olb(a.b);f.a0&&JD(b,42)){a.a.qj();j=BD(b,42);i=j.cd();f=i==null?0:tb(i);g=DAd(a.a,f);c=a.a.d[g];if(c){d=BD(c.g,367);k=c.i;for(h=0;h=2){c=e.Kc();b=ED(c.Pb());while(c.Ob()){f=b;b=ED(c.Pb());d=$wnd.Math.min(d,(uCb(b),b)-(uCb(f),f))}}return d} +function gUc(a,b){var c,d,e,f,g;d=new Psb;Gsb(d,b,d.c.b,d.c);do{c=(sCb(d.b!=0),BD(Nsb(d,d.a.a),86));a.b[c.g]=1;for(f=Jsb(c.d,0);f.b!=f.d.c;){e=BD(Xsb(f),188);g=e.c;a.b[g.g]==1?Dsb(a.a,e):a.b[g.g]==2?(a.b[g.g]=1):Gsb(d,g,d.c.b,d.c)}}while(d.b!=0)} +function Ju(a,b){var c,d,e;if(PD(b)===PD(Qb(a))){return true}if(!JD(b,15)){return false}d=BD(b,15);e=a.gc();if(e!=d.gc()){return false}if(JD(d,54)){for(c=0;c0&&(e=c);for(g=new olb(a.f.e);g.a0){b-=1;c-=1}else{if(d>=0&&e<0){b+=1;c+=1}else{if(d>0&&e>=0){b-=1;c+=1}else{b+=1;c-=1}}}}}return new vgd(meb(b),meb(c))} +function PIc(a,b){if(a.cb.c){return 1}else if(a.bb.b){return 1}else if(a.a!=b.a){return tb(a.a)-tb(b.a)}else if(a.d==(UIc(),TIc)&&b.d==SIc){return -1}else if(a.d==SIc&&b.d==TIc){return 1}return 0} +function aNc(a,b){var c,d,e,f,g;f=b.a;f.c.i==b.b?(g=f.d):(g=f.c);f.c.i==b.b?(d=f.c):(d=f.d);e=NLc(a.a,g,d);if(e>0&&e0}else if(e<0&&-e0}return false} +function RZc(a,b,c,d){var e,f,g,h,i,j,k,l;e=(b-a.d)/a.c.c.length;f=0;a.a+=c;a.d=b;for(l=new olb(a.c);l.a>24}return g} +function vdb(a){if(a.pe()){var b=a.c;b.qe()?(a.o='['+b.n):!b.pe()?(a.o='[L'+b.ne()+';'):(a.o='['+b.ne());a.b=b.me()+'[]';a.k=b.oe()+'[]';return}var c=a.j;var d=a.d;d=d.split('/');a.o=ydb('.',[c,ydb('$',d)]);a.b=ydb('.',[c,ydb('.',d)]);a.k=d[d.length-1]} +function qGb(a,b){var c,d,e,f,g;g=null;for(f=new olb(a.e.a);f.a=0;b-=2){for(c=0;c<=b;c+=2){if(a.b[c]>a.b[c+2]||a.b[c]===a.b[c+2]&&a.b[c+1]>a.b[c+3]){d=a.b[c+2];a.b[c+2]=a.b[c];a.b[c]=d;d=a.b[c+3];a.b[c+3]=a.b[c+1];a.b[c+1]=d}}}a.c=true} +function UUb(a,b){var c,d,e,f,g,h,i,j;g=b==1?KUb:JUb;for(f=g.a.ec().Kc();f.Ob();){e=BD(f.Pb(),103);for(i=BD(Qc(a.f.c,e),21).Kc();i.Ob();){h=BD(i.Pb(),46);d=BD(h.b,81);j=BD(h.a,189);c=j.c;switch(e.g){case 2:case 1:d.g.d+=c;break;case 4:case 3:d.g.c+=c;}}}} +function PFc(a,b){var c,d,e,f,g,h,i,j,k;j=-1;k=0;for(g=a,h=0,i=g.length;h0&&++k}}++j}return k} +function Eid(a){var b,c;c=new Wfb(hdb(a.gm));c.a+='@';Qfb(c,(b=tb(a)>>>0,b.toString(16)));if(a.kh()){c.a+=' (eProxyURI: ';Pfb(c,a.qh());if(a.$g()){c.a+=' eClass: ';Pfb(c,a.$g())}c.a+=')'}else if(a.$g()){c.a+=' (eClass: ';Pfb(c,a.$g());c.a+=')'}return c.a} +function TDb(a){var b,c,d,e;if(a.e){throw vbb(new Zdb((fdb(TM),Jke+TM.k+Kke)))}a.d==(ead(),cad)&&SDb(a,aad);for(c=new olb(a.a.a);c.a>24}return c} +function lKb(a,b,c){var d,e,f;e=BD(Mpb(a.i,b),306);if(!e){e=new bIb(a.d,b,c);Npb(a.i,b,e);if(sJb(b)){CHb(a.a,b.c,b.b,e)}else{f=rJb(b);d=BD(Mpb(a.p,f),244);switch(f.g){case 1:case 3:e.j=true;lIb(d,b.b,e);break;case 4:case 2:e.k=true;lIb(d,b.c,e);}}}return e} +function r3d(a,b,c,d){var e,f,g,h,i,j;h=new yud;i=S6d(a.e.Tg(),b);e=BD(a.g,119);Q6d();if(BD(b,66).Oj()){for(g=0;g=0){return e}else{f=1;for(h=new olb(b.j);h.a0&&b.ue((tCb(e-1,a.c.length),BD(a.c[e-1],10)),f)>0){Nkb(a,e,(tCb(e-1,a.c.length),BD(a.c[e-1],10)));--e}tCb(e,a.c.length);a.c[e]=f}c.a=new Lqb;c.b=new Lqb} +function n5c(a,b,c){var d,e,f,g,h,i,j,k;k=(d=BD(b.e&&b.e(),9),new xqb(d,BD(_Bb(d,d.length),9),0));i=mfb(c,'[\\[\\]\\s,]+');for(f=i,g=0,h=f.length;g0){!(fad(a.a.c)&&b.n.d)&&!(gad(a.a.c)&&b.n.b)&&(b.g.d-=$wnd.Math.max(0,d/2-0.5));!(fad(a.a.c)&&b.n.a)&&!(gad(a.a.c)&&b.n.c)&&(b.g.a+=$wnd.Math.max(0,d-1))}}} +function Hac(a,b,c){var d,e;if((a.c-a.b&a.a.length-1)==2){if(b==(Ucd(),Acd)||b==zcd){xac(BD(bkb(a),15),(rbd(),nbd));xac(BD(bkb(a),15),obd)}else{xac(BD(bkb(a),15),(rbd(),obd));xac(BD(bkb(a),15),nbd)}}else{for(e=new xkb(a);e.a!=e.b;){d=BD(vkb(e),15);xac(d,c)}}} +function htd(a,b){var c,d,e,f,g,h,i;e=Nu(new qtd(a));h=new Bib(e,e.c.length);f=Nu(new qtd(b));i=new Bib(f,f.c.length);g=null;while(h.b>0&&i.b>0){c=(sCb(h.b>0),BD(h.a.Xb(h.c=--h.b),33));d=(sCb(i.b>0),BD(i.a.Xb(i.c=--i.b),33));if(c==d){g=c}else{break}}return g} +function Cub(a,b){var c,d,e,f,g,h;f=a.a*kke+a.b*1502;h=a.b*kke+11;c=$wnd.Math.floor(h*lke);f+=c;h-=c*mke;f%=mke;a.a=f;a.b=h;if(b<=24){return $wnd.Math.floor(a.a*wub[b])}else{e=a.a*(1<=2147483648&&(d-=Zje);return d}} +function Zic(a,b,c){var d,e,f,g;if(bjc(a,b)>bjc(a,c)){d=V_b(c,(Ucd(),zcd));a.d=d.dc()?0:B0b(BD(d.Xb(0),11));g=V_b(b,Tcd);a.b=g.dc()?0:B0b(BD(g.Xb(0),11))}else{e=V_b(c,(Ucd(),Tcd));a.d=e.dc()?0:B0b(BD(e.Xb(0),11));f=V_b(b,zcd);a.b=f.dc()?0:B0b(BD(f.Xb(0),11))}} +function l6d(a){var b,c,d,e,f,g,h;if(a){b=a.Hh(_ve);if(b){g=GD(AAd((!b.b&&(b.b=new sId((jGd(),fGd),x6,b)),b.b),'conversionDelegates'));if(g!=null){h=new Rkb;for(d=mfb(g,'\\w+'),e=0,f=d.length;ea.c){break}else if(e.a>=a.s){f<0&&(f=g);h=g}}i=(a.s+a.c)/2;if(f>=0){d=NOc(a,b,f,h);i=$Oc((tCb(d,b.c.length),BD(b.c[d],329)));YOc(b,d,c)}return i} +function lZc(){lZc=ccb;RYc=new Osd((Y9c(),r8c),1.3);VYc=I8c;gZc=new q0b(15);fZc=new Osd(f9c,gZc);jZc=new Osd(T9c,15);SYc=w8c;_Yc=Y8c;aZc=_8c;bZc=b9c;$Yc=W8c;cZc=e9c;hZc=x9c;eZc=(OYc(),KYc);ZYc=IYc;dZc=JYc;iZc=MYc;WYc=HYc;XYc=O8c;YYc=P8c;UYc=GYc;TYc=FYc;kZc=NYc} +function Bnd(a,b,c){var d,e,f,g,h,i,j;g=(f=new RHd,f);PHd(g,(uCb(b),b));j=(!g.b&&(g.b=new sId((jGd(),fGd),x6,g)),g.b);for(i=1;i0&&JPb(this,e)}} +function IQb(a,b,c,d,e,f){var g,h,i;if(!e[b.b]){e[b.b]=true;g=d;!g&&(g=new kRb);Ekb(g.e,b);for(i=f[b.b].Kc();i.Ob();){h=BD(i.Pb(),282);if(h.d==c||h.c==c){continue}h.c!=b&&IQb(a,h.c,b,g,e,f);h.d!=b&&IQb(a,h.d,b,g,e,f);Ekb(g.c,h);Gkb(g.d,h.b)}return g}return null} +function e4b(a){var b,c,d,e,f,g,h;b=0;for(e=new olb(a.e);e.a=2} +function gec(a,b){var c,d,e,f;Odd(b,'Self-Loop pre-processing',1);for(d=new olb(a.a);d.a1){return false}b=qqb(zbd,OC(GC(B1,1),Kie,93,0,[ybd,Bbd]));if(Ox(Cx(b,a))>1){return false}d=qqb(Gbd,OC(GC(B1,1),Kie,93,0,[Fbd,Ebd]));if(Ox(Cx(d,a))>1){return false}return true} +function U0d(a,b){var c,d,e;c=b.Hh(a.a);if(c){e=GD(AAd((!c.b&&(c.b=new sId((jGd(),fGd),x6,c)),c.b),'affiliation'));if(e!=null){d=kfb(e,wfb(35));return d==-1?l1d(a,u1d(a,bKd(b.Hj())),e):d==0?l1d(a,null,e.substr(1)):l1d(a,e.substr(0,d),e.substr(d+1))}}return null} +function ic(b){var c,d,e;try{return b==null?Xhe:fcb(b)}catch(a){a=ubb(a);if(JD(a,102)){c=a;e=hdb(rb(b))+'@'+(d=(Zfb(),kCb(b))>>>0,d.toString(16));tyb(xyb(),($xb(),'Exception during lenientFormat for '+e),c);return '<'+e+' threw '+hdb(c.gm)+'>'}else throw vbb(a)}} +function mzc(a){switch(a.g){case 0:return new xDc;case 1:return new ZCc;case 2:return new DCc;case 3:return new QCc;case 4:return new LDc;case 5:return new iDc;default:throw vbb(new Wdb('No implementation is available for the layerer '+(a.f!=null?a.f:''+a.g)));}} +function AQc(a,b,c){var d,e,f;for(f=new olb(a.t);f.a0){d.b.n-=d.c;d.b.n<=0&&d.b.u>0&&Dsb(b,d.b)}}for(e=new olb(a.i);e.a0){d.a.u-=d.c;d.a.u<=0&&d.a.n>0&&Dsb(c,d.a)}}} +function Vud(a){var b,c,d,e,f;if(a.g==null){a.d=a.si(a.f);wtd(a,a.d);if(a.c){f=a.f;return f}}b=BD(a.g[a.i-1],47);e=b.Pb();a.e=b;c=a.si(e);if(c.Ob()){a.d=c;wtd(a,c)}else{a.d=null;while(!b.Ob()){NC(a.g,--a.i,null);if(a.i==0){break}d=BD(a.g[a.i-1],47);b=d}}return e} +function r2d(a,b){var c,d,e,f,g,h;d=b;e=d.ak();if(T6d(a.e,e)){if(e.hi()&&E2d(a,e,d.dd())){return false}}else{h=S6d(a.e.Tg(),e);c=BD(a.g,119);for(f=0;f1||c>1){return 2}}if(b+c==1){return 2}return 0} +function WQb(a,b,c){var d,e,f,g,h;Odd(c,'ELK Force',1);Ccb(DD(hkd(b,(wSb(),jSb))))||$Cb((d=new _Cb((Pgd(),new bhd(b))),d));h=TQb(b);XQb(h);YQb(a,BD(vNb(h,fSb),424));g=LQb(a.a,h);for(f=g.Kc();f.Ob();){e=BD(f.Pb(),231);tRb(a.b,e,Udd(c,1/g.gc()))}h=KQb(g);SQb(h);Qdd(c)} +function yoc(a,b){var c,d,e,f,g;Odd(b,'Breaking Point Processor',1);xoc(a);if(Ccb(DD(vNb(a,(Nyc(),Jyc))))){for(e=new olb(a.b);e.a=0?a._g(d,true,true):sid(a,f,true),153));BD(e,215).ml(b,c)}else{throw vbb(new Wdb(ite+b.ne()+jte))}} +function ROc(a,b){var c,d,e,f,g;c=new Rkb;e=LAb(new YAb(null,new Kub(a,16)),new iPc);f=LAb(new YAb(null,new Kub(a,16)),new kPc);g=aAb(_zb(OAb(ty(OC(GC(xM,1),Uhe,833,0,[e,f])),new mPc)));for(d=1;d=2*b&&Ekb(c,new bPc(g[d-1]+b,g[d]-b))}return c} +function AXc(a,b,c){Odd(c,'Eades radial',1);c.n&&!!b&&Tdd(c,i6d(b),(pgd(),mgd));a.d=BD(hkd(b,(MUc(),LUc)),33);a.c=Edb(ED(hkd(b,(ZWc(),VWc))));a.e=tXc(BD(hkd(b,WWc),293));a.a=gWc(BD(hkd(b,YWc),426));a.b=jXc(BD(hkd(b,RWc),340));BXc(a);c.n&&!!b&&Tdd(c,i6d(b),(pgd(),mgd))} +function Fqd(a,b,c){var d,e,f,g,h,j,k,l;if(c){f=c.a.length;d=new Yge(f);for(h=(d.b-d.a)*d.c<0?(Xge(),Wge):new she(d);h.Ob();){g=BD(h.Pb(),19);e=Zpd(c,g.a);!!e&&(i=null,j=Uqd(a,(k=(Fhd(),l=new ppd,l),!!b&&npd(k,b),k),e),Lkd(j,_pd(e,Vte)),grd(e,j),hrd(e,j),crd(a,e,j))}}} +function UKd(a){var b,c,d,e,f,g;if(!a.j){g=new HPd;b=KKd;f=b.a.zc(a,b);if(f==null){for(d=new Fyd(_Kd(a));d.e!=d.i.gc();){c=BD(Dyd(d),26);e=UKd(c);ytd(g,e);wtd(g,c)}b.a.Bc(a)!=null}vud(g);a.j=new nNd((BD(qud(ZKd((NFd(),MFd).o),11),18),g.i),g.g);$Kd(a).b&=-33}return a.j} +function O9d(a){var b,c,d,e;if(a==null){return null}else{d=Qge(a,true);e=Nwe.length;if(dfb(d.substr(d.length-e,e),Nwe)){c=d.length;if(c==4){b=(BCb(0,d.length),d.charCodeAt(0));if(b==43){return z9d}else if(b==45){return y9d}}else if(c==3){return z9d}}return new Odb(d)}} +function _C(a){var b,c,d;c=a.l;if((c&c-1)!=0){return -1}d=a.m;if((d&d-1)!=0){return -1}b=a.h;if((b&b-1)!=0){return -1}if(b==0&&d==0&&c==0){return -1}if(b==0&&d==0&&c!=0){return ieb(c)}if(b==0&&d!=0&&c==0){return ieb(d)+22}if(b!=0&&d==0&&c==0){return ieb(b)+44}return -1} +function qbc(a,b){var c,d,e,f,g;Odd(b,'Edge joining',1);c=Ccb(DD(vNb(a,(Nyc(),Byc))));for(e=new olb(a.b);e.a1){for(e=new olb(a.a);e.a0);f.a.Xb(f.c=--f.b);Aib(f,e);sCb(f.b3&&EA(a,0,b-3)}} +function cUb(a){var b,c,d,e;if(PD(vNb(a,(Nyc(),axc)))===PD((hbd(),ebd))){return !a.e&&PD(vNb(a,Cwc))!==PD((Xrc(),Urc))}d=BD(vNb(a,Dwc),292);e=Ccb(DD(vNb(a,Hwc)))||PD(vNb(a,Iwc))===PD((Rpc(),Opc));b=BD(vNb(a,Bwc),19).a;c=a.a.c.length;return !e&&d!=(Xrc(),Urc)&&(b==0||b>c)} +function lkc(a){var b,c;c=0;for(;c0){break}}if(c>0&&c0){break}}if(b>0&&c>16!=6&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+qmd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?cmd(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=kid(b,a,6,d));d=bmd(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,6,b,b))} +function npd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=9&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+opd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?lpd(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=kid(b,a,9,d));d=kpd(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,9,b,b))} +function Rld(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=3&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+Sld(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?Lld(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=kid(b,a,12,d));d=Kld(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,3,b,b))} +function VId(b){var c,d,e,f,g;e=wId(b);g=b.j;if(g==null&&!!e){return b.$j()?null:e.zj()}else if(JD(e,148)){d=e.Aj();if(d){f=d.Nh();if(f!=b.i){c=BD(e,148);if(c.Ej()){try{b.g=f.Kh(c,g)}catch(a){a=ubb(a);if(JD(a,78)){b.g=null}else throw vbb(a)}}b.i=f}}return b.g}return null} +function wOb(a){var b;b=new Rkb;Ekb(b,new aDb(new f7c(a.c,a.d),new f7c(a.c+a.b,a.d)));Ekb(b,new aDb(new f7c(a.c,a.d),new f7c(a.c,a.d+a.a)));Ekb(b,new aDb(new f7c(a.c+a.b,a.d+a.a),new f7c(a.c+a.b,a.d)));Ekb(b,new aDb(new f7c(a.c+a.b,a.d+a.a),new f7c(a.c,a.d+a.a)));return b} +function IJc(a,b,c,d){var e,f,g;g=LZb(b,c);d.c[d.c.length]=b;if(a.j[g.p]==-1||a.j[g.p]==2||a.a[b.p]){return d}a.j[g.p]=-1;for(f=new Sr(ur(O_b(g).a.Kc(),new Sq));Qr(f);){e=BD(Rr(f),17);if(!(!OZb(e)&&!(!OZb(e)&&e.c.i.c==e.d.i.c))||e==b){continue}return IJc(a,e,g,d)}return d} +function vQb(a,b,c){var d,e,f;for(f=b.a.ec().Kc();f.Ob();){e=BD(f.Pb(),79);d=BD(Ohb(a.b,e),266);!d&&(Xod(jtd(e))==Xod(ltd(e))?uQb(a,e,c):jtd(e)==Xod(ltd(e))?Ohb(a.c,e)==null&&Ohb(a.b,ltd(e))!=null&&xQb(a,e,c,false):Ohb(a.d,e)==null&&Ohb(a.b,jtd(e))!=null&&xQb(a,e,c,true))}} +function jcc(a,b){var c,d,e,f,g,h,i;for(e=a.Kc();e.Ob();){d=BD(e.Pb(),10);h=new H0b;F0b(h,d);G0b(h,(Ucd(),zcd));yNb(h,(wtc(),ftc),(Bcb(),true));for(g=b.Kc();g.Ob();){f=BD(g.Pb(),10);i=new H0b;F0b(i,f);G0b(i,Tcd);yNb(i,ftc,true);c=new UZb;yNb(c,ftc,true);QZb(c,h);RZb(c,i)}}} +function jnc(a,b,c,d){var e,f,g,h;e=hnc(a,b,c);f=hnc(a,c,b);g=BD(Ohb(a.c,b),112);h=BD(Ohb(a.c,c),112);if(ed.b.g&&(f.c[f.c.length]=d,true)}}return f} +function k$c(){k$c=ccb;g$c=new l$c('CANDIDATE_POSITION_LAST_PLACED_RIGHT',0);f$c=new l$c('CANDIDATE_POSITION_LAST_PLACED_BELOW',1);i$c=new l$c('CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT',2);h$c=new l$c('CANDIDATE_POSITION_WHOLE_DRAWING_BELOW',3);j$c=new l$c('WHOLE_DRAWING',4)} +function Xqd(a,b){if(JD(b,239)){return iqd(a,BD(b,33))}else if(JD(b,186)){return jqd(a,BD(b,118))}else if(JD(b,354)){return hqd(a,BD(b,137))}else if(JD(b,352)){return gqd(a,BD(b,79))}else if(b){return null}else{throw vbb(new Wdb(Xte+Fe(new amb(OC(GC(SI,1),Uhe,1,5,[b])))))}} +function aic(a){var b,c,d,e,f,g,h;f=new Psb;for(e=new olb(a.d.a);e.a1){b=nGb((c=new pGb,++a.b,c),a.d);for(h=Jsb(f,0);h.b!=h.d.c;){g=BD(Xsb(h),121);AFb(DFb(CFb(EFb(BFb(new FFb,1),0),b),g))}}} +function $od(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=11&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+_od(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?Uod(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=kid(b,a,10,d));d=Tod(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,11,b,b))} +function uZb(a){var b,c,d,e;for(d=new nib((new eib(a.b)).a);d.b;){c=lib(d);e=BD(c.cd(),11);b=BD(c.dd(),10);yNb(b,(wtc(),$sc),e);yNb(e,gtc,b);yNb(e,Nsc,(Bcb(),true));G0b(e,BD(vNb(b,Hsc),61));vNb(b,Hsc);yNb(e.i,(Nyc(),Vxc),(dcd(),acd));BD(vNb(Q_b(e.i),Ksc),21).Fc((Orc(),Krc))}} +function G4b(a,b,c){var d,e,f,g,h,i;f=0;g=0;if(a.c){for(i=new olb(a.d.i.j);i.af.a){return -1}else if(e.ai){k=a.d;a.d=KC(y4,jve,63,2*i+4,0,1);for(f=0;f=9223372036854775807){return wD(),sD}e=false;if(a<0){e=true;a=-a}d=0;if(a>=Ije){d=QD(a/Ije);a-=d*Ije}c=0;if(a>=Hje){c=QD(a/Hje);a-=c*Hje}b=QD(a);f=TC(b,c,d);e&&ZC(f);return f} +function rKb(a,b){var c,d,e,f;c=!b||!a.u.Hc((rcd(),ncd));f=0;for(e=new olb(a.e.Cf());e.a=-b&&d==b){return new vgd(meb(c-1),meb(d))}return new vgd(meb(c),meb(d-1))} +function W8b(){S8b();return OC(GC(AS,1),Kie,77,0,[Y7b,V7b,Z7b,n8b,G8b,r8b,M8b,w8b,E8b,i8b,A8b,v8b,F8b,e8b,O8b,P7b,z8b,I8b,o8b,H8b,Q8b,C8b,Q7b,D8b,R8b,K8b,P8b,p8b,b8b,q8b,m8b,N8b,T7b,_7b,t8b,S7b,u8b,k8b,f8b,x8b,h8b,W7b,U7b,l8b,g8b,y8b,L8b,R7b,B8b,j8b,s8b,c8b,a8b,J8b,$7b,d8b,X7b])} +function Yic(a,b,c){a.d=0;a.b=0;b.k==(j0b(),i0b)&&c.k==i0b&&BD(vNb(b,(wtc(),$sc)),10)==BD(vNb(c,$sc),10)&&(ajc(b).j==(Ucd(),Acd)?Zic(a,b,c):Zic(a,c,b));b.k==i0b&&c.k==g0b?ajc(b).j==(Ucd(),Acd)?(a.d=1):(a.b=1):c.k==i0b&&b.k==g0b&&(ajc(c).j==(Ucd(),Acd)?(a.b=1):(a.d=1));cjc(a,b,c)} +function esd(a){var b,c,d,e,f,g,h,i,j,k,l;l=hsd(a);b=a.a;i=b!=null;i&&Upd(l,'category',a.a);e=Fhe(new Pib(a.d));g=!e;if(g){j=new wB;cC(l,'knownOptions',j);c=new msd(j);reb(new Pib(a.d),c)}f=Fhe(a.g);h=!f;if(h){k=new wB;cC(l,'supportedFeatures',k);d=new osd(k);reb(a.g,d)}return l} +function ty(a){var b,c,d,e,f,g,h,i,j;d=false;b=336;c=0;f=new Xp(a.length);for(h=a,i=0,j=h.length;i>16!=7&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+Iod(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?Eod(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=BD(b,49).gh(a,1,C2,d));d=Dod(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,7,b,b))} +function NHd(a,b){var c,d;if(b!=a.Cb||a.Db>>16!=3&&!!b){if(p6d(a,b))throw vbb(new Wdb(ste+QHd(a)));d=null;!!a.Cb&&(d=(c=a.Db>>16,c>=0?KHd(a,d):a.Cb.ih(a,-1-c,null,d)));!!b&&(d=BD(b,49).gh(a,0,k5,d));d=JHd(a,b,d);!!d&&d.Fi()}else (a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,3,b,b))} +function Ehb(a,b){Dhb();var c,d,e,f,g,h,i,j,k;if(b.d>a.d){h=a;a=b;b=h}if(b.d<63){return Ihb(a,b)}g=(a.d&-2)<<4;j=Rgb(a,g);k=Rgb(b,g);d=yhb(a,Qgb(j,g));e=yhb(b,Qgb(k,g));i=Ehb(j,k);c=Ehb(d,e);f=Ehb(yhb(j,d),yhb(e,k));f=thb(thb(f,i),c);f=Qgb(f,g);i=Qgb(i,g<<1);return thb(thb(i,f),c)} +function aGc(a,b,c){var d,e,f,g,h;g=CHc(a,c);h=KC(OQ,kne,10,b.length,0,1);d=0;for(f=g.Kc();f.Ob();){e=BD(f.Pb(),11);Ccb(DD(vNb(e,(wtc(),Nsc))))&&(h[d++]=BD(vNb(e,gtc),10))}if(d=0;f+=c?1:-1){g=g|b.c.Sf(i,f,c,d&&!Ccb(DD(vNb(b.j,(wtc(),Jsc))))&&!Ccb(DD(vNb(b.j,(wtc(),mtc)))));g=g|b.q._f(i,f,c);g=g|cGc(a,i[f],c,d)}Qqb(a.c,b);return g} +function o3b(a,b,c){var d,e,f,g,h,i,j,k,l,m;for(k=m_b(a.j),l=0,m=k.length;l1&&(a.a=true);ZNb(BD(c.b,65),P6c(R6c(BD(b.b,65).c),Y6c(c7c(R6c(BD(c.b,65).a),BD(b.b,65).a),e)));D1c(a,b);F1c(a,c)}} +function rVb(a){var b,c,d,e,f,g,h;for(f=new olb(a.a.a);f.a0&&f>0?(g.p=b++):d>0?(g.p=c++):f>0?(g.p=e++):(g.p=c++);}}mmb();Okb(a.j,new fcc)} +function Vec(a){var b,c;c=null;b=BD(Ikb(a.g,0),17);do{c=b.d.i;if(wNb(c,(wtc(),Wsc))){return BD(vNb(c,Wsc),11).i}if(c.k!=(j0b(),h0b)&&Qr(new Sr(ur(U_b(c).a.Kc(),new Sq)))){b=BD(Rr(new Sr(ur(U_b(c).a.Kc(),new Sq))),17)}else if(c.k!=h0b){return null}}while(!!c&&c.k!=(j0b(),h0b));return c} +function Omc(a,b){var c,d,e,f,g,h,i,j,k;h=b.j;g=b.g;i=BD(Ikb(h,h.c.length-1),113);k=(tCb(0,h.c.length),BD(h.c[0],113));j=Kmc(a,g,i,k);for(f=1;fj){i=c;k=e;j=d}}b.a=k;b.c=i} +function sEb(a,b){var c,d;d=Axb(a.b,b.b);if(!d){throw vbb(new Zdb('Invalid hitboxes for scanline constraint calculation.'))}(mEb(b.b,BD(Cxb(a.b,b.b),57))||mEb(b.b,BD(Bxb(a.b,b.b),57)))&&(Zfb(),b.b+' has overlap.');a.a[b.b.f]=BD(Exb(a.b,b.b),57);c=BD(Dxb(a.b,b.b),57);!!c&&(a.a[c.f]=b.b)} +function AFb(a){if(!a.a.d||!a.a.e){throw vbb(new Zdb((fdb(fN),fN.k+' must have a source and target '+(fdb(jN),jN.k)+' specified.')))}if(a.a.d==a.a.e){throw vbb(new Zdb('Network simplex does not support self-loops: '+a.a+' '+a.a.d+' '+a.a.e))}NFb(a.a.d.g,a.a);NFb(a.a.e.b,a.a);return a.a} +function HHc(a,b,c){var d,e,f,g,h,i,j;j=new Hxb(new tIc(a));for(g=OC(GC(aR,1),lne,11,0,[b,c]),h=0,i=g.length;hi-a.b&&hi-a.a&&h0&&++n}}}++m}return n} +function hUc(a,b){var c,d,e,f,g;g=BD(vNb(b,(JTc(),FTc)),425);for(f=Jsb(b.b,0);f.b!=f.d.c;){e=BD(Xsb(f),86);if(a.b[e.g]==0){switch(g.g){case 0:iUc(a,e);break;case 1:gUc(a,e);}a.b[e.g]=2}}for(d=Jsb(a.a,0);d.b!=d.d.c;){c=BD(Xsb(d),188);ze(c.b.d,c,true);ze(c.c.b,c,true)}yNb(b,(mTc(),gTc),a.a)} +function S6d(a,b){Q6d();var c,d,e,f;if(!b){return P6d}else if(b==(Q8d(),N8d)||(b==v8d||b==t8d||b==u8d)&&a!=s8d){return new Z6d(a,b)}else{d=BD(b,677);c=d.pk();if(!c){a2d(q1d((O6d(),M6d),b));c=d.pk()}f=(!c.i&&(c.i=new Lqb),c.i);e=BD(Wd(irb(f.f,a)),1942);!e&&Rhb(f,a,e=new Z6d(a,b));return e}} +function Tbc(a,b){var c,d,e,f,g,h,i,j,k;i=BD(vNb(a,(wtc(),$sc)),11);j=l7c(OC(GC(m1,1),nie,8,0,[i.i.n,i.n,i.a])).a;k=a.i.n.b;c=k_b(a.e);for(e=c,f=0,g=e.length;f0){if(f.a){h=f.b.rf().a;if(c>h){e=(c-h)/2;f.d.b=e;f.d.c=e}}else{f.d.c=a.s+c}}else if(tcd(a.u)){d=sfd(f.b);d.c<0&&(f.d.b=-d.c);d.c+d.b>f.b.rf().a&&(f.d.c=d.c+d.b-f.b.rf().a)}}} +function Eec(a,b){var c,d,e,f;Odd(b,'Semi-Interactive Crossing Minimization Processor',1);c=false;for(e=new olb(a.b);e.a=0){if(b==c){return new vgd(meb(-b-1),meb(-b-1))}if(b==-c){return new vgd(meb(-b),meb(c+1))}}if($wnd.Math.abs(b)>$wnd.Math.abs(c)){if(b<0){return new vgd(meb(-b),meb(c))}return new vgd(meb(-b),meb(c+1))}return new vgd(meb(b+1),meb(c))} +function q5b(a){var b,c;c=BD(vNb(a,(Nyc(),mxc)),163);b=BD(vNb(a,(wtc(),Osc)),303);if(c==(Ctc(),ytc)){yNb(a,mxc,Btc);yNb(a,Osc,(esc(),dsc))}else if(c==Atc){yNb(a,mxc,Btc);yNb(a,Osc,(esc(),bsc))}else if(b==(esc(),dsc)){yNb(a,mxc,ytc);yNb(a,Osc,csc)}else if(b==bsc){yNb(a,mxc,Atc);yNb(a,Osc,csc)}} +function FNc(){FNc=ccb;DNc=new RNc;zNc=e3c(new j3c,(qUb(),nUb),(S8b(),o8b));CNc=c3c(e3c(new j3c,nUb,C8b),pUb,B8b);ENc=b3c(b3c(g3c(c3c(e3c(new j3c,lUb,M8b),pUb,L8b),oUb),K8b),N8b);ANc=c3c(e3c(e3c(e3c(new j3c,mUb,r8b),oUb,t8b),oUb,u8b),pUb,s8b);BNc=c3c(e3c(e3c(new j3c,oUb,u8b),oUb,_7b),pUb,$7b)} +function hQc(){hQc=ccb;cQc=e3c(c3c(new j3c,(qUb(),pUb),(S8b(),c8b)),nUb,o8b);gQc=b3c(b3c(g3c(c3c(e3c(new j3c,lUb,M8b),pUb,L8b),oUb),K8b),N8b);dQc=c3c(e3c(e3c(e3c(new j3c,mUb,r8b),oUb,t8b),oUb,u8b),pUb,s8b);fQc=e3c(e3c(new j3c,nUb,C8b),pUb,B8b);eQc=c3c(e3c(e3c(new j3c,oUb,u8b),oUb,_7b),pUb,$7b)} +function GNc(a,b,c,d,e){var f,g;if((!OZb(b)&&b.c.i.c==b.d.i.c||!T6c(l7c(OC(GC(m1,1),nie,8,0,[e.i.n,e.n,e.a])),c))&&!OZb(b)){b.c==e?St(b.a,0,new g7c(c)):Dsb(b.a,new g7c(c));if(d&&!Rqb(a.a,c)){g=BD(vNb(b,(Nyc(),jxc)),74);if(!g){g=new s7c;yNb(b,jxc,g)}f=new g7c(c);Gsb(g,f,g.c.b,g.c);Qqb(a.a,f)}}} +function Qac(a){var b,c;for(c=new Sr(ur(R_b(a).a.Kc(),new Sq));Qr(c);){b=BD(Rr(c),17);if(b.c.i.k!=(j0b(),f0b)){throw vbb(new y2c(Fne+P_b(a)+"' has its layer constraint set to FIRST, but has at least one incoming edge that "+' does not come from a FIRST_SEPARATE node. That must not happen.'))}}} +function vjd(a,b,c){var d,e,f,g,h,i,j;e=aeb(a.Db&254);if(e==0){a.Eb=c}else{if(e==1){h=KC(SI,Uhe,1,2,5,1);f=zjd(a,b);if(f==0){h[0]=c;h[1]=a.Eb}else{h[0]=a.Eb;h[1]=c}}else{h=KC(SI,Uhe,1,e+1,5,1);g=CD(a.Eb);for(d=2,i=0,j=0;d<=128;d<<=1){d==b?(h[j++]=c):(a.Db&d)!=0&&(h[j++]=g[i++])}}a.Eb=h}a.Db|=b} +function ENb(a,b,c){var d,e,f,g;this.b=new Rkb;e=0;d=0;for(g=new olb(a);g.a0){f=BD(Ikb(this.b,0),167);e+=f.o;d+=f.p}e*=2;d*=2;b>1?(e=QD($wnd.Math.ceil(e*b))):(d=QD($wnd.Math.ceil(d/b)));this.a=new pNb(e,d)} +function Igc(a,b,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q,r;k=d;if(b.j&&b.o){n=BD(Ohb(a.f,b.A),57);p=n.d.c+n.d.b;--k}else{p=b.a.c+b.a.b}l=e;if(c.q&&c.o){n=BD(Ohb(a.f,c.C),57);j=n.d.c;++l}else{j=c.a.c}q=j-p;i=$wnd.Math.max(2,l-k);h=q/i;o=p+h;for(m=k;m=0;g+=e?1:-1){h=b[g];i=d==(Ucd(),zcd)?e?V_b(h,d):Su(V_b(h,d)):e?Su(V_b(h,d)):V_b(h,d);f&&(a.c[h.p]=i.gc());for(l=i.Kc();l.Ob();){k=BD(l.Pb(),11);a.d[k.p]=j++}Gkb(c,i)}} +function aQc(a,b,c){var d,e,f,g,h,i,j,k;f=Edb(ED(a.b.Kc().Pb()));j=Edb(ED(Pq(b.b)));d=Y6c(R6c(a.a),j-c);e=Y6c(R6c(b.a),c-f);k=P6c(d,e);Y6c(k,1/(j-f));this.a=k;this.b=new Rkb;h=true;g=a.b.Kc();g.Pb();while(g.Ob()){i=Edb(ED(g.Pb()));if(h&&i-c>Oqe){this.b.Fc(c);h=false}this.b.Fc(i)}h&&this.b.Fc(c)} +function vGb(a){var b,c,d,e;yGb(a,a.n);if(a.d.c.length>0){Blb(a.c);while(GGb(a,BD(mlb(new olb(a.e.a)),121))>5;b&=31;if(d>=a.d){return a.e<0?(Hgb(),Bgb):(Hgb(),Ggb)}f=a.d-d;e=KC(WD,oje,25,f+1,15,1);mhb(e,f,a.a,d,b);if(a.e<0){for(c=0;c0&&a.a[c]<<32-b!=0){for(c=0;c=0){return false}else{c=e1d((O6d(),M6d),e,b);if(!c){return true}else{d=c.Zj();return (d>1||d==-1)&&$1d(q1d(M6d,c))!=3}}}}else{return false}} +function R1b(a,b,c,d){var e,f,g,h,i;h=atd(BD(qud((!b.b&&(b.b=new y5d(z2,b,4,7)),b.b),0),82));i=atd(BD(qud((!b.c&&(b.c=new y5d(z2,b,5,8)),b.c),0),82));if(Xod(h)==Xod(i)){return null}if(ntd(i,h)){return null}g=Mld(b);if(g==c){return d}else{f=BD(Ohb(a.a,g),10);if(f){e=f.e;if(e){return e}}}return null} +function Cac(a,b){var c;c=BD(vNb(a,(Nyc(),Rwc)),276);Odd(b,'Label side selection ('+c+')',1);switch(c.g){case 0:Dac(a,(rbd(),nbd));break;case 1:Dac(a,(rbd(),obd));break;case 2:Bac(a,(rbd(),nbd));break;case 3:Bac(a,(rbd(),obd));break;case 4:Eac(a,(rbd(),nbd));break;case 5:Eac(a,(rbd(),obd));}Qdd(b)} +function bGc(a,b,c){var d,e,f,g,h,i;d=RFc(c,a.length);g=a[d];if(g[0].k!=(j0b(),e0b)){return}f=SFc(c,g.length);i=b.j;for(e=0;e0){c[0]+=a.d;g-=c[0]}if(c[2]>0){c[2]+=a.d;g-=c[2]}f=$wnd.Math.max(0,g);c[1]=$wnd.Math.max(c[1],g);vHb(a,eHb,e.c+d.b+c[0]-(c[1]-g)/2,c);if(b==eHb){a.c.b=f;a.c.c=e.c+d.b+(f-g)/2}} +function AYb(){this.c=KC(UD,Vje,25,(Ucd(),OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd])).length,15,1);this.b=KC(UD,Vje,25,OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd]).length,15,1);this.a=KC(UD,Vje,25,OC(GC(F1,1),bne,61,0,[Scd,Acd,zcd,Rcd,Tcd]).length,15,1);zlb(this.c,Pje);zlb(this.b,Qje);zlb(this.a,Qje)} +function Ufe(a,b,c){var d,e,f,g;if(b<=c){e=b;f=c}else{e=c;f=b}d=0;if(a.b==null){a.b=KC(WD,oje,25,2,15,1);a.b[0]=e;a.b[1]=f;a.c=true}else{d=a.b.length;if(a.b[d-1]+1==e){a.b[d-1]=f;return}g=KC(WD,oje,25,d+2,15,1);$fb(a.b,0,g,0,d);a.b=g;a.b[d-1]>=e&&(a.c=false,a.a=false);a.b[d++]=e;a.b[d]=f;a.c||Yfe(a)}} +function inc(a,b,c){var d,e,f,g,h,i,j;j=b.d;a.a=new Skb(j.c.length);a.c=new Lqb;for(h=new olb(j);h.a=0?a._g(j,false,true):sid(a,c,false),58));n:for(f=l.Kc();f.Ob();){e=BD(f.Pb(),56);for(k=0;k1){Xxd(e,e.i-1)}}return d}} +function Z2b(a,b){var c,d,e,f,g,h,i;Odd(b,'Comment post-processing',1);for(f=new olb(a.b);f.aa.d[g.p]){c+=zHc(a.b,f);Wjb(a.a,meb(f))}}while(!akb(a.a)){xHc(a.b,BD(fkb(a.a),19).a)}}return c} +function o2c(a,b,c){var d,e,f,g;f=(!b.a&&(b.a=new cUd(E2,b,10,11)),b.a).i;for(e=new Fyd((!b.a&&(b.a=new cUd(E2,b,10,11)),b.a));e.e!=e.i.gc();){d=BD(Dyd(e),33);(!d.a&&(d.a=new cUd(E2,d,10,11)),d.a).i==0||(f+=o2c(a,d,false))}if(c){g=Xod(b);while(g){f+=(!g.a&&(g.a=new cUd(E2,g,10,11)),g.a).i;g=Xod(g)}}return f} +function Xxd(a,b){var c,d,e,f;if(a.ej()){d=null;e=a.fj();a.ij()&&(d=a.kj(a.pi(b),null));c=a.Zi(4,f=tud(a,b),null,b,e);if(a.bj()&&f!=null){d=a.dj(f,d);if(!d){a.$i(c)}else{d.Ei(c);d.Fi()}}else{if(!d){a.$i(c)}else{d.Ei(c);d.Fi()}}return f}else{f=tud(a,b);if(a.bj()&&f!=null){d=a.dj(f,null);!!d&&d.Fi()}return f}} +function UKb(a){var b,c,d,e,f,g,h,i,j,k;j=a.a;b=new Tqb;i=0;for(d=new olb(a.d);d.ah.d&&(k=h.d+h.a+j)}}c.c.d=k;b.a.zc(c,b);i=$wnd.Math.max(i,c.c.d+c.c.a)}return i} +function Orc(){Orc=ccb;Frc=new Prc('COMMENTS',0);Hrc=new Prc('EXTERNAL_PORTS',1);Irc=new Prc('HYPEREDGES',2);Jrc=new Prc('HYPERNODES',3);Krc=new Prc('NON_FREE_PORTS',4);Lrc=new Prc('NORTH_SOUTH_PORTS',5);Nrc=new Prc(Wne,6);Erc=new Prc('CENTER_LABELS',7);Grc=new Prc('END_LABELS',8);Mrc=new Prc('PARTITIONS',9)} +function gVc(a){var b,c,d,e,f;e=new Rkb;b=new Vqb((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));for(d=new Sr(ur(_sd(a).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),79);if(!JD(qud((!c.b&&(c.b=new y5d(z2,c,4,7)),c.b),0),186)){f=atd(BD(qud((!c.c&&(c.c=new y5d(z2,c,5,8)),c.c),0),82));b.a._b(f)||(e.c[e.c.length]=f,true)}}return e} +function fVc(a){var b,c,d,e,f,g;f=new Tqb;b=new Vqb((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));for(e=new Sr(ur(_sd(a).a.Kc(),new Sq));Qr(e);){d=BD(Rr(e),79);if(!JD(qud((!d.b&&(d.b=new y5d(z2,d,4,7)),d.b),0),186)){g=atd(BD(qud((!d.c&&(d.c=new y5d(z2,d,5,8)),d.c),0),82));b.a._b(g)||(c=f.a.zc(g,f),c==null)}}return f} +function zA(a,b,c,d,e){if(d<0){d=oA(a,e,OC(GC(ZI,1),nie,2,6,[bje,cje,dje,eje,fje,gje,hje,ije,jje,kje,lje,mje]),b);d<0&&(d=oA(a,e,OC(GC(ZI,1),nie,2,6,['Jan','Feb','Mar','Apr',fje,'Jun','Jul','Aug','Sep','Oct','Nov','Dec']),b));if(d<0){return false}c.k=d;return true}else if(d>0){c.k=d-1;return true}return false} +function BA(a,b,c,d,e){if(d<0){d=oA(a,e,OC(GC(ZI,1),nie,2,6,[bje,cje,dje,eje,fje,gje,hje,ije,jje,kje,lje,mje]),b);d<0&&(d=oA(a,e,OC(GC(ZI,1),nie,2,6,['Jan','Feb','Mar','Apr',fje,'Jun','Jul','Aug','Sep','Oct','Nov','Dec']),b));if(d<0){return false}c.k=d;return true}else if(d>0){c.k=d-1;return true}return false} +function DA(a,b,c,d,e,f){var g,h,i,j;h=32;if(d<0){if(b[0]>=a.length){return false}h=bfb(a,b[0]);if(h!=43&&h!=45){return false}++b[0];d=rA(a,b);if(d<0){return false}h==45&&(d=-d)}if(h==32&&b[0]-c==2&&e.b==2){i=new eB;j=i.q.getFullYear()-nje+nje-80;g=j%100;f.a=d==g;d+=(j/100|0)*100+(d=j&&(i=d)}!!i&&(k=$wnd.Math.max(k,i.a.o.a));if(k>m){l=j;m=k}}return l} +function ode(a,b,c){var d,e,f;a.e=c;a.d=0;a.b=0;a.f=1;a.i=b;(a.e&16)==16&&(a.i=Xee(a.i));a.j=a.i.length;nde(a);f=rde(a);if(a.d!=a.j)throw vbb(new mde(tvd((h0d(),sue))));if(a.g){for(d=0;dvre?Okb(i,a.b):d<=vre&&d>wre?Okb(i,a.d):d<=wre&&d>xre?Okb(i,a.c):d<=xre&&Okb(i,a.a);f=ZXc(a,i,f)}return e} +function Hgb(){Hgb=ccb;var a;Cgb=new Ugb(1,1);Egb=new Ugb(1,10);Ggb=new Ugb(0,0);Bgb=new Ugb(-1,1);Dgb=OC(GC(cJ,1),nie,91,0,[Ggb,Cgb,new Ugb(1,2),new Ugb(1,3),new Ugb(1,4),new Ugb(1,5),new Ugb(1,6),new Ugb(1,7),new Ugb(1,8),new Ugb(1,9),Egb]);Fgb=KC(cJ,nie,91,32,0,1);for(a=0;a1;if(h){d=new f7c(e,c.b);Dsb(b.a,d)}n7c(b.a,OC(GC(m1,1),nie,8,0,[m,l]))} +function jdd(a){r4c(a,new E3c(P3c(M3c(O3c(N3c(new R3c,Rse),'ELK Randomizer'),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new mdd)));p4c(a,Rse,ame,fdd);p4c(a,Rse,wme,15);p4c(a,Rse,yme,meb(0));p4c(a,Rse,_le,tme)} +function hde(){hde=ccb;var a,b,c,d,e,f;fde=KC(SD,wte,25,255,15,1);gde=KC(TD,$ie,25,16,15,1);for(b=0;b<255;b++){fde[b]=-1}for(c=57;c>=48;c--){fde[c]=c-48<<24>>24}for(d=70;d>=65;d--){fde[d]=d-65+10<<24>>24}for(e=102;e>=97;e--){fde[e]=e-97+10<<24>>24}for(f=0;f<10;f++)gde[f]=48+f&aje;for(a=10;a<=15;a++)gde[a]=65+a-10&aje} +function BVc(a,b,c){var d,e,f,g,h,i,j,k;h=b.i-a.g/2;i=c.i-a.g/2;j=b.j-a.g/2;k=c.j-a.g/2;f=b.g+a.g/2;g=c.g+a.g/2;d=b.f+a.g/2;e=c.f+a.g/2;if(h>19!=0){return '-'+qD(hD(a))}c=a;d='';while(!(c.l==0&&c.m==0&&c.h==0)){e=RC(Jje);c=UC(c,e,true);b=''+pD(QC);if(!(c.l==0&&c.m==0&&c.h==0)){f=9-b.length;for(;f>0;f--){b='0'+b}}d=b+d}return d} +function xrb(){if(!Object.create||!Object.getOwnPropertyNames){return false}var a='__proto__';var b=Object.create(null);if(b[a]!==undefined){return false}var c=Object.getOwnPropertyNames(b);if(c.length!=0){return false}b[a]=42;if(b[a]!==42){return false}if(Object.getOwnPropertyNames(b).length==0){return false}return true} +function Pgc(a){var b,c,d,e,f,g,h;b=false;c=0;for(e=new olb(a.d.b);e.a=a.a){return -1}if(!F6b(b,c)){return -1}if(Qq(BD(d.Kb(b),20))){return 1}e=0;for(g=BD(d.Kb(b),20).Kc();g.Ob();){f=BD(g.Pb(),17);i=f.c.i==b?f.d.i:f.c.i;h=G6b(a,i,c,d);if(h==-1){return -1}e=$wnd.Math.max(e,h);if(e>a.c-1){return -1}}return e+1} +function Btd(a,b){var c,d,e,f,g,h;if(PD(b)===PD(a)){return true}if(!JD(b,15)){return false}d=BD(b,15);h=a.gc();if(d.gc()!=h){return false}g=d.Kc();if(a.ni()){for(c=0;c0){a.qj();if(b!=null){for(f=0;f>24}case 97:case 98:case 99:case 100:case 101:case 102:{return a-97+10<<24>>24}case 65:case 66:case 67:case 68:case 69:case 70:{return a-65+10<<24>>24}default:{throw vbb(new Oeb('Invalid hexadecimal'))}}} +function AUc(a,b,c){var d,e,f,g;Odd(c,'Processor order nodes',2);a.a=Edb(ED(vNb(b,(JTc(),HTc))));e=new Psb;for(g=Jsb(b.b,0);g.b!=g.d.c;){f=BD(Xsb(g),86);Ccb(DD(vNb(f,(mTc(),jTc))))&&(Gsb(e,f,e.c.b,e.c),true)}d=(sCb(e.b!=0),BD(e.a.a.c,86));yUc(a,d);!c.b&&Rdd(c,1);BUc(a,d,0-Edb(ED(vNb(d,(mTc(),bTc))))/2,0);!c.b&&Rdd(c,1);Qdd(c)} +function rFb(){rFb=ccb;qFb=new sFb('SPIRAL',0);lFb=new sFb('LINE_BY_LINE',1);mFb=new sFb('MANHATTAN',2);kFb=new sFb('JITTER',3);oFb=new sFb('QUADRANTS_LINE_BY_LINE',4);pFb=new sFb('QUADRANTS_MANHATTAN',5);nFb=new sFb('QUADRANTS_JITTER',6);jFb=new sFb('COMBINE_LINE_BY_LINE_MANHATTAN',7);iFb=new sFb('COMBINE_JITTER_MANHATTAN',8)} +function roc(a,b,c,d){var e,f,g,h,i,j;i=woc(a,c);j=woc(b,c);e=false;while(!!i&&!!j){if(d||uoc(i,j,c)){g=woc(i,c);h=woc(j,c);zoc(b);zoc(a);f=i.c;sbc(i,false);sbc(j,false);if(c){Z_b(b,j.p,f);b.p=j.p;Z_b(a,i.p+1,f);a.p=i.p}else{Z_b(a,i.p,f);a.p=i.p;Z_b(b,j.p+1,f);b.p=j.p}$_b(i,null);$_b(j,null);i=g;j=h;e=true}else{break}}return e} +function VDc(a,b,c,d){var e,f,g,h,i;e=false;f=false;for(h=new olb(d.j);h.a=b.length){throw vbb(new qcb('Greedy SwitchDecider: Free layer not in graph.'))}this.c=b[a];this.e=new dIc(d);THc(this.e,this.c,(Ucd(),Tcd));this.i=new dIc(d);THc(this.i,this.c,zcd);this.f=new ejc(this.c);this.a=!f&&e.i&&!e.s&&this.c[0].k==(j0b(),e0b);this.a&&hjc(this,a,b.length)} +function hKb(a,b){var c,d,e,f,g,h;f=!a.B.Hc((Idd(),zdd));g=a.B.Hc(Cdd);a.a=new FHb(g,f,a.c);!!a.n&&u_b(a.a.n,a.n);lIb(a.g,(gHb(),eHb),a.a);if(!b){d=new mIb(1,f,a.c);d.n.a=a.k;Npb(a.p,(Ucd(),Acd),d);e=new mIb(1,f,a.c);e.n.d=a.k;Npb(a.p,Rcd,e);h=new mIb(0,f,a.c);h.n.c=a.k;Npb(a.p,Tcd,h);c=new mIb(0,f,a.c);c.n.b=a.k;Npb(a.p,zcd,c)}} +function Vgc(a){var b,c,d;b=BD(vNb(a.d,(Nyc(),Swc)),218);switch(b.g){case 2:c=Ngc(a);break;case 3:c=(d=new Rkb,MAb(JAb(NAb(LAb(LAb(new YAb(null,new Kub(a.d.b,16)),new Shc),new Uhc),new Whc),new ehc),new Yhc(d)),d);break;default:throw vbb(new Zdb('Compaction not supported for '+b+' edges.'));}Ugc(a,c);reb(new Pib(a.g),new Ehc(a))} +function a2c(a,b){var c;c=new zNb;!!b&&tNb(c,BD(Ohb(a.a,C2),94));JD(b,470)&&tNb(c,BD(Ohb(a.a,G2),94));if(JD(b,354)){tNb(c,BD(Ohb(a.a,D2),94));return c}JD(b,82)&&tNb(c,BD(Ohb(a.a,z2),94));if(JD(b,239)){tNb(c,BD(Ohb(a.a,E2),94));return c}if(JD(b,186)){tNb(c,BD(Ohb(a.a,F2),94));return c}JD(b,352)&&tNb(c,BD(Ohb(a.a,B2),94));return c} +function wSb(){wSb=ccb;oSb=new Osd((Y9c(),D9c),meb(1));uSb=new Osd(T9c,80);tSb=new Osd(M9c,5);bSb=new Osd(r8c,tme);pSb=new Osd(E9c,meb(1));sSb=new Osd(H9c,(Bcb(),true));lSb=new q0b(50);kSb=new Osd(f9c,lSb);dSb=O8c;mSb=t9c;cSb=new Osd(B8c,false);jSb=e9c;iSb=b9c;hSb=Y8c;gSb=W8c;nSb=x9c;fSb=(SRb(),LRb);vSb=QRb;eSb=KRb;qSb=NRb;rSb=PRb} +function ZXb(a){var b,c,d,e,f,g,h,i;i=new jYb;for(h=new olb(a.a);h.a0&&b=0){return false}else{b.p=c.b;Ekb(c.e,b)}if(e==(j0b(),g0b)||e==i0b){for(g=new olb(b.j);g.a1||g==-1)&&(f|=16);(e.Bb&ote)!=0&&(f|=64)}(c.Bb&Tje)!=0&&(f|=Dve);f|=zte}else{if(JD(b,457)){f|=512}else{d=b.Bj();!!d&&(d.i&1)!=0&&(f|=256)}}(a.Bb&512)!=0&&(f|=128);return f} +function hc(a,b){var c,d,e,f,g;a=a==null?Xhe:(uCb(a),a);for(e=0;ea.d[h.p]){c+=zHc(a.b,f);Wjb(a.a,meb(f))}}else{++g}}c+=a.b.d*g;while(!akb(a.a)){xHc(a.b,BD(fkb(a.a),19).a)}}return c} +function Y6d(a,b){var c;if(a.f==W6d){c=$1d(q1d((O6d(),M6d),b));return a.e?c==4&&b!=(m8d(),k8d)&&b!=(m8d(),h8d)&&b!=(m8d(),i8d)&&b!=(m8d(),j8d):c==2}if(!!a.d&&(a.d.Hc(b)||a.d.Hc(_1d(q1d((O6d(),M6d),b)))||a.d.Hc(e1d((O6d(),M6d),a.b,b)))){return true}if(a.f){if(x1d((O6d(),a.f),b2d(q1d(M6d,b)))){c=$1d(q1d(M6d,b));return a.e?c==4:c==2}}return false} +function iVc(a,b,c,d){var e,f,g,h,i,j,k,l;g=BD(hkd(c,(Y9c(),C9c)),8);i=g.a;k=g.b+a;e=$wnd.Math.atan2(k,i);e<0&&(e+=dre);e+=b;e>dre&&(e-=dre);h=BD(hkd(d,C9c),8);j=h.a;l=h.b+a;f=$wnd.Math.atan2(l,j);f<0&&(f+=dre);f+=b;f>dre&&(f-=dre);return Iy(),My(1.0E-10),$wnd.Math.abs(e-f)<=1.0E-10||e==f||isNaN(e)&&isNaN(f)?0:ef?1:Ny(isNaN(e),isNaN(f))} +function YDb(a){var b,c,d,e,f,g,h;h=new Lqb;for(d=new olb(a.a.b);d.a=b.o){throw vbb(new rcb)}i=c>>5;h=c&31;g=Nbb(1,Tbb(Nbb(h,1)));f?(b.n[d][i]=Mbb(b.n[d][i],g)):(b.n[d][i]=xbb(b.n[d][i],Lbb(g)));g=Nbb(g,1);e?(b.n[d][i]=Mbb(b.n[d][i],g)):(b.n[d][i]=xbb(b.n[d][i],Lbb(g)))}catch(a){a=ubb(a);if(JD(a,320)){throw vbb(new qcb(Dle+b.o+'*'+b.p+Ele+c+She+d+Fle))}else throw vbb(a)}} +function BUc(a,b,c,d){var e,f,g;if(b){f=Edb(ED(vNb(b,(mTc(),fTc))))+d;g=c+Edb(ED(vNb(b,bTc)))/2;yNb(b,kTc,meb(Tbb(Cbb($wnd.Math.round(f)))));yNb(b,lTc,meb(Tbb(Cbb($wnd.Math.round(g)))));b.d.b==0||BUc(a,BD(pr((e=Jsb((new ZRc(b)).a.d,0),new aSc(e))),86),c+Edb(ED(vNb(b,bTc)))+a.a,d+Edb(ED(vNb(b,cTc))));vNb(b,iTc)!=null&&BUc(a,BD(vNb(b,iTc),86),c,d)}} +function N9b(a,b){var c,d,e,f,g,h,i,j,k,l,m;i=Q_b(b.a);e=Edb(ED(vNb(i,(Nyc(),pyc))))*2;k=Edb(ED(vNb(i,wyc)));j=$wnd.Math.max(e,k);f=KC(UD,Vje,25,b.f-b.c+1,15,1);d=-j;c=0;for(h=b.b.Kc();h.Ob();){g=BD(h.Pb(),10);d+=a.a[g.c.p]+j;f[c++]=d}d+=a.a[b.a.c.p]+j;f[c++]=d;for(m=new olb(b.e);m.a0){d=(!a.n&&(a.n=new cUd(D2,a,1,7)),BD(qud(a.n,0),137)).a;!d||Qfb(Qfb((b.a+=' "',b),d),'"')}}else{Qfb(Qfb((b.a+=' "',b),c),'"')}Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} +function opd(a){var b,c,d;if((a.Db&64)!=0)return fld(a);b=new Wfb(fte);c=a.k;if(!c){!a.n&&(a.n=new cUd(D2,a,1,7));if(a.n.i>0){d=(!a.n&&(a.n=new cUd(D2,a,1,7)),BD(qud(a.n,0),137)).a;!d||Qfb(Qfb((b.a+=' "',b),d),'"')}}else{Qfb(Qfb((b.a+=' "',b),c),'"')}Qfb(Lfb(Qfb(Lfb(Qfb(Lfb(Qfb(Lfb((b.a+=' (',b),a.i),','),a.j),' | '),a.g),','),a.f),')');return b.a} +function h4c(a,b){var c,d,e,f,g,h,i;if(b==null||b.length==0){return null}e=BD(Phb(a.a,b),149);if(!e){for(d=(h=(new $ib(a.b)).a.vc().Kc(),new djb(h));d.a.Ob();){c=(f=BD(d.a.Pb(),42),BD(f.dd(),149));g=c.c;i=b.length;if(dfb(g.substr(g.length-i,i),b)&&(b.length==g.length||bfb(g,g.length-b.length-1)==46)){if(e){return null}e=c}}!!e&&Shb(a.a,b,e)}return e} +function QLb(a,b){var c,d,e,f;c=new VLb;d=BD(GAb(NAb(new YAb(null,new Kub(a.f,16)),c),Ayb(new hzb,new jzb,new Gzb,new Izb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Eyb),Dyb]))),21);e=d.gc();d=BD(GAb(NAb(new YAb(null,new Kub(b.f,16)),c),Ayb(new hzb,new jzb,new Gzb,new Izb,OC(GC(xL,1),Kie,132,0,[Eyb,Dyb]))),21);f=d.gc();if(ee.p){G0b(f,Rcd);if(f.d){h=f.o.b;b=f.a.b;f.a.b=h-b}}else if(f.j==Rcd&&e.p>a.p){G0b(f,Acd);if(f.d){h=f.o.b;b=f.a.b;f.a.b=-(h-b)}}break}}return e} +function NOc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;f=c;if(c1;if(h){d=new f7c(e,c.b);Dsb(b.a,d)}n7c(b.a,OC(GC(m1,1),nie,8,0,[m,l]))} +function Nid(a,b,c){var d,e,f,g,h,i;if(!b){return null}else{if(c<=-1){d=XKd(b.Tg(),-1-c);if(JD(d,99)){return BD(d,18)}else{g=BD(b.ah(d),153);for(h=0,i=g.gc();h0){e=i.length;while(e>0&&i[e-1]==''){--e}e=40;g&&FGb(a);wGb(a);vGb(a);c=zGb(a);d=0;while(!!c&&d0&&Dsb(a.f,f)}else{a.c[g]-=j+1;a.c[g]<=0&&a.a[g]>0&&Dsb(a.e,f)}}}}} +function _Kb(a){var b,c,d,e,f,g,h,i,j;h=new Hxb(BD(Qb(new nLb),62));j=Qje;for(c=new olb(a.d);c.a=0&&ic?b:c;j<=l;++j){if(j==c){h=d++}else{f=e[j];k=o.rl(f.ak());j==b&&(i=j==l&&!k?d-1:d);k&&++d}}m=BD(Wxd(a,b,c),72);h!=i&&GLd(a,new ESd(a.e,7,g,meb(h),n.dd(),i));return m}}}else{return BD(sud(a,b,c),72)}return BD(Wxd(a,b,c),72)} +function Qcc(a,b){var c,d,e,f,g,h,i;Odd(b,'Port order processing',1);i=BD(vNb(a,(Nyc(),_xc)),421);for(d=new olb(a.b);d.a=0){h=bD(a,g);if(h){j<22?(i.l|=1<>>1;g.m=k>>>1|(l&1)<<21;g.l=m>>>1|(k&1)<<21;--j}c&&ZC(i);if(f){if(d){QC=hD(a);e&&(QC=nD(QC,(wD(),uD)))}else{QC=TC(a.l,a.m,a.h)}}return i} +function TDc(a,b){var c,d,e,f,g,h,i,j,k,l;j=a.e[b.c.p][b.p]+1;i=b.c.a.c.length+1;for(h=new olb(a.a);h.a0&&(BCb(0,a.length),a.charCodeAt(0)==45||(BCb(0,a.length),a.charCodeAt(0)==43))?1:0;for(d=g;dc){throw vbb(new Oeb(Oje+a+'"'))}return h} +function dnc(a){var b,c,d,e,f,g,h;g=new Psb;for(f=new olb(a.a);f.a1)&&b==1&&BD(a.a[a.b],10).k==(j0b(),f0b)){zac(BD(a.a[a.b],10),(rbd(),nbd))}else if(d&&(!c||(a.c-a.b&a.a.length-1)>1)&&b==1&&BD(a.a[a.c-1&a.a.length-1],10).k==(j0b(),f0b)){zac(BD(a.a[a.c-1&a.a.length-1],10),(rbd(),obd))}else if((a.c-a.b&a.a.length-1)==2){zac(BD(bkb(a),10),(rbd(),nbd));zac(BD(bkb(a),10),obd)}else{wac(a,e)}Yjb(a)} +function pRc(a,b,c){var d,e,f,g,h;f=0;for(e=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));e.e!=e.i.gc();){d=BD(Dyd(e),33);g='';(!d.n&&(d.n=new cUd(D2,d,1,7)),d.n).i==0||(g=BD(qud((!d.n&&(d.n=new cUd(D2,d,1,7)),d.n),0),137).a);h=new XRc(f++,b,g);tNb(h,d);yNb(h,(mTc(),dTc),d);h.e.b=d.j+d.f/2;h.f.a=$wnd.Math.max(d.g,1);h.e.a=d.i+d.g/2;h.f.b=$wnd.Math.max(d.f,1);Dsb(b.b,h);jrb(c.f,d,h)}} +function B2b(a){var b,c,d,e,f;d=BD(vNb(a,(wtc(),$sc)),33);f=BD(hkd(d,(Nyc(),Fxc)),174).Hc((tdd(),sdd));if(!a.e){e=BD(vNb(a,Ksc),21);b=new f7c(a.f.a+a.d.b+a.d.c,a.f.b+a.d.d+a.d.a);if(e.Hc((Orc(),Hrc))){jkd(d,Vxc,(dcd(),$bd));Afd(d,b.a,b.b,false,true)}else{Ccb(DD(hkd(d,Gxc)))||Afd(d,b.a,b.b,true,true)}}f?jkd(d,Fxc,pqb(sdd)):jkd(d,Fxc,(c=BD(gdb(I1),9),new xqb(c,BD(_Bb(c,c.length),9),0)))} +function tA(a,b,c){var d,e,f,g;if(b[0]>=a.length){c.o=0;return true}switch(bfb(a,b[0])){case 43:e=1;break;case 45:e=-1;break;default:c.o=0;return true;}++b[0];f=b[0];g=rA(a,b);if(g==0&&b[0]==f){return false}if(b[0]=0&&h!=c){f=new nSd(a,1,h,g,null);!d?(d=f):d.Ei(f)}if(c>=0){f=new nSd(a,1,c,h==c?g:null,b);!d?(d=f):d.Ei(f)}}return d} +function LEd(a){var b,c,d;if(a.b==null){d=new Hfb;if(a.i!=null){Efb(d,a.i);d.a+=':'}if((a.f&256)!=0){if((a.f&256)!=0&&a.a!=null){YEd(a.i)||(d.a+='//',d);Efb(d,a.a)}if(a.d!=null){d.a+='/';Efb(d,a.d)}(a.f&16)!=0&&(d.a+='/',d);for(b=0,c=a.j.length;bm){return false}l=(i=MZc(d,m,false),i.a);if(k+h+l<=b.b){KZc(c,f-c.s);c.c=true;KZc(d,f-c.s);OZc(d,c.s,c.t+c.d+h);d.k=true;WZc(c.q,d);n=true;if(e){s$c(b,d);d.j=b;if(a.c.length>g){v$c((tCb(g,a.c.length),BD(a.c[g],200)),d);(tCb(g,a.c.length),BD(a.c[g],200)).a.c.length==0&&Kkb(a,g)}}}return n} +function kcc(a,b){var c,d,e,f,g,h;Odd(b,'Partition midprocessing',1);e=new Hp;MAb(JAb(new YAb(null,new Kub(a.a,16)),new occ),new qcc(e));if(e.d==0){return}h=BD(GAb(UAb((f=e.i,new YAb(null,(!f?(e.i=new zf(e,e.c)):f).Nc()))),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Dyb)]))),15);d=h.Kc();c=BD(d.Pb(),19);while(d.Ob()){g=BD(d.Pb(),19);jcc(BD(Qc(e,c),21),BD(Qc(e,g),21));c=g}Qdd(b)} +function DYb(a,b,c){var d,e,f,g,h,i,j,k;if(b.p==0){b.p=1;g=c;if(!g){e=new Rkb;f=(d=BD(gdb(F1),9),new xqb(d,BD(_Bb(d,d.length),9),0));g=new vgd(e,f)}BD(g.a,15).Fc(b);b.k==(j0b(),e0b)&&BD(g.b,21).Fc(BD(vNb(b,(wtc(),Hsc)),61));for(i=new olb(b.j);i.a0){e=BD(a.Ab.g,1934);if(b==null){for(f=0;f1){for(d=new olb(e);d.ac.s&&hh){h=e;k.c=KC(SI,Uhe,1,0,5,1)}e==h&&Ekb(k,new vgd(c.c.i,c))}mmb();Okb(k,a.c);Dkb(a.b,i.p,k)}}} +function MMc(a,b){var c,d,e,f,g,h,i,j,k;for(g=new olb(b.b);g.ah){h=e;k.c=KC(SI,Uhe,1,0,5,1)}e==h&&Ekb(k,new vgd(c.d.i,c))}mmb();Okb(k,a.c);Dkb(a.f,i.p,k)}}} +function Y7c(a){r4c(a,new E3c(P3c(M3c(O3c(N3c(new R3c,qse),'ELK Box'),'Algorithm for packing of unconnected boxes, i.e. graphs without edges.'),new _7c)));p4c(a,qse,ame,U7c);p4c(a,qse,wme,15);p4c(a,qse,vme,meb(0));p4c(a,qse,Jre,Ksd(O7c));p4c(a,qse,Fme,Ksd(Q7c));p4c(a,qse,Eme,Ksd(S7c));p4c(a,qse,_le,pse);p4c(a,qse,Ame,Ksd(P7c));p4c(a,qse,Tme,Ksd(R7c));p4c(a,qse,rse,Ksd(M7c));p4c(a,qse,lqe,Ksd(N7c))} +function W$b(a,b){var c,d,e,f,g,h,i,j,k;e=a.i;g=e.o.a;f=e.o.b;if(g<=0&&f<=0){return Ucd(),Scd}j=a.n.a;k=a.n.b;h=a.o.a;c=a.o.b;switch(b.g){case 2:case 1:if(j<0){return Ucd(),Tcd}else if(j+h>g){return Ucd(),zcd}break;case 4:case 3:if(k<0){return Ucd(),Acd}else if(k+c>f){return Ucd(),Rcd}}i=(j+h/2)/g;d=(k+c/2)/f;return i+d<=1&&i-d<=0?(Ucd(),Tcd):i+d>=1&&i-d>=0?(Ucd(),zcd):d<0.5?(Ucd(),Acd):(Ucd(),Rcd)} +function pJc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=false;k=Edb(ED(vNb(b,(Nyc(),vyc))));o=Qie*k;for(e=new olb(b.b);e.ai+o){p=l.g+m.g;m.a=(m.g*m.a+l.g*l.a)/p;m.g=p;l.f=m;c=true}}f=h;l=m}}return c} +function VGb(a,b,c,d,e,f,g){var h,i,j,k,l,m;m=new I6c;for(j=b.Kc();j.Ob();){h=BD(j.Pb(),839);for(l=new olb(h.wf());l.a0){if(h.a){j=h.b.rf().b;if(e>j){if(a.v||h.c.d.c.length==1){g=(e-j)/2;h.d.d=g;h.d.a=g}else{c=BD(Ikb(h.c.d,0),181).rf().b;d=(c-j)/2;h.d.d=$wnd.Math.max(0,d);h.d.a=e-d-j}}}else{h.d.a=a.t+e}}else if(tcd(a.u)){f=sfd(h.b);f.d<0&&(h.d.d=-f.d);f.d+f.a>h.b.rf().b&&(h.d.a=f.d+f.a-h.b.rf().b)}}} +function FC(a,b){var c;switch(HC(a)){case 6:return ND(b);case 7:return LD(b);case 8:return KD(b);case 3:return Array.isArray(b)&&(c=HC(b),!(c>=14&&c<=16));case 11:return b!=null&&typeof b===Nhe;case 12:return b!=null&&(typeof b===Jhe||typeof b==Nhe);case 0:return AD(b,a.__elementTypeId$);case 2:return OD(b)&&!(b.im===gcb);case 1:return OD(b)&&!(b.im===gcb)||AD(b,a.__elementTypeId$);default:return true;}} +function xOb(a,b){var c,d,e,f;d=$wnd.Math.min($wnd.Math.abs(a.c-(b.c+b.b)),$wnd.Math.abs(a.c+a.b-b.c));f=$wnd.Math.min($wnd.Math.abs(a.d-(b.d+b.a)),$wnd.Math.abs(a.d+a.a-b.d));c=$wnd.Math.abs(a.c+a.b/2-(b.c+b.b/2));if(c>a.b/2+b.b/2){return 1}e=$wnd.Math.abs(a.d+a.a/2-(b.d+b.a/2));if(e>a.a/2+b.a/2){return 1}if(c==0&&e==0){return 0}if(c==0){return f/e+1}if(e==0){return d/c+1}return $wnd.Math.min(d/c,f/e)+1} +function mgb(a,b){var c,d,e,f,g,h;e=pgb(a);h=pgb(b);if(e==h){if(a.e==b.e&&a.a<54&&b.a<54){return a.fb.f?1:0}d=a.e-b.e;c=(a.d>0?a.d:$wnd.Math.floor((a.a-1)*Xje)+1)-(b.d>0?b.d:$wnd.Math.floor((b.a-1)*Xje)+1);if(c>d+1){return e}else if(c0&&(g=Ogb(g,Khb(d)));return Igb(f,g)}}else return e0&&a.d!=(yTb(),xTb)&&(h+=g*(d.d.a+a.a[b.b][d.b]*(b.d.a-d.d.a)/c));c>0&&a.d!=(yTb(),vTb)&&(i+=g*(d.d.b+a.a[b.b][d.b]*(b.d.b-d.d.b)/c))}switch(a.d.g){case 1:return new f7c(h/f,b.d.b);case 2:return new f7c(b.d.a,i/f);default:return new f7c(h/f,i/f);}} +function Wcc(a,b){Occ();var c,d,e,f,g;g=BD(vNb(a.i,(Nyc(),Vxc)),98);f=a.j.g-b.j.g;if(f!=0||!(g==(dcd(),Zbd)||g==_bd||g==$bd)){return 0}if(g==(dcd(),Zbd)){c=BD(vNb(a,Wxc),19);d=BD(vNb(b,Wxc),19);if(!!c&&!!d){e=c.a-d.a;if(e!=0){return e}}}switch(a.j.g){case 1:return Kdb(a.n.a,b.n.a);case 2:return Kdb(a.n.b,b.n.b);case 3:return Kdb(b.n.a,a.n.a);case 4:return Kdb(b.n.b,a.n.b);default:throw vbb(new Zdb(ine));}} +function tfd(a){var b,c,d,e,f,g;c=(!a.a&&(a.a=new xMd(y2,a,5)),a.a).i+2;g=new Skb(c);Ekb(g,new f7c(a.j,a.k));MAb(new YAb(null,(!a.a&&(a.a=new xMd(y2,a,5)),new Kub(a.a,16))),new Qfd(g));Ekb(g,new f7c(a.b,a.c));b=1;while(b0){jEb(i,false,(ead(),aad));jEb(i,true,bad)}Hkb(b.g,new $hc(a,c));Rhb(a.g,b,c)} +function Neb(){Neb=ccb;var a;Jeb=OC(GC(WD,1),oje,25,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]);Keb=KC(WD,oje,25,37,15,1);Leb=OC(GC(WD,1),oje,25,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]);Meb=KC(XD,Sje,25,37,14,1);for(a=2;a<=36;a++){Keb[a]=QD($wnd.Math.pow(a,Jeb[a]));Meb[a]=Abb(rie,Keb[a])}} +function pfd(a){var b;if((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a).i!=1){throw vbb(new Wdb(Tse+(!a.a&&(a.a=new cUd(A2,a,6,6)),a.a).i))}b=new s7c;!!btd(BD(qud((!a.b&&(a.b=new y5d(z2,a,4,7)),a.b),0),82))&&ye(b,qfd(a,btd(BD(qud((!a.b&&(a.b=new y5d(z2,a,4,7)),a.b),0),82)),false));!!btd(BD(qud((!a.c&&(a.c=new y5d(z2,a,5,8)),a.c),0),82))&&ye(b,qfd(a,btd(BD(qud((!a.c&&(a.c=new y5d(z2,a,5,8)),a.c),0),82)),true));return b} +function _Mc(a,b){var c,d,e,f,g;b.d?(e=a.a.c==(YLc(),XLc)?R_b(b.b):U_b(b.b)):(e=a.a.c==(YLc(),WLc)?R_b(b.b):U_b(b.b));f=false;for(d=new Sr(ur(e.a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),17);g=Ccb(a.a.f[a.a.g[b.b.p].p]);if(!g&&!OZb(c)&&c.c.i.c==c.d.i.c){continue}if(Ccb(a.a.n[a.a.g[b.b.p].p])||Ccb(a.a.n[a.a.g[b.b.p].p])){continue}f=true;if(Rqb(a.b,a.a.g[TMc(c,b.b).p])){b.c=true;b.a=c;return b}}b.c=f;b.a=null;return b} +function bed(a,b,c,d,e){var f,g,h,i,j,k,l;mmb();Okb(a,new Red);h=new Bib(a,0);l=new Rkb;f=0;while(h.bf*2){k=new wed(l);j=red(g)/qed(g);i=fed(k,b,new p0b,c,d,e,j);P6c(X6c(k.e),i);l.c=KC(SI,Uhe,1,0,5,1);f=0;l.c[l.c.length]=k;l.c[l.c.length]=g;f=red(k)*qed(k)+red(g)*qed(g)}else{l.c[l.c.length]=g;f+=red(g)*qed(g)}}return l} +function qwd(a,b,c){var d,e,f,g,h,i,j;d=c.gc();if(d==0){return false}else{if(a.ej()){i=a.fj();zvd(a,b,c);g=d==1?a.Zi(3,null,c.Kc().Pb(),b,i):a.Zi(5,null,c,b,i);if(a.bj()){h=d<100?null:new Ixd(d);f=b+d;for(e=b;e0){for(g=0;g>16==-15&&a.Cb.nh()&&Rwd(new oSd(a.Cb,9,13,c,a.c,HLd(QSd(BD(a.Cb,59)),a)))}else if(JD(a.Cb,88)){if(a.Db>>16==-23&&a.Cb.nh()){b=a.c;JD(b,88)||(b=(jGd(),_Fd));JD(c,88)||(c=(jGd(),_Fd));Rwd(new oSd(a.Cb,9,10,c,b,HLd(VKd(BD(a.Cb,26)),a)))}}}}return a.c} +function f7b(a,b){var c,d,e,f,g,h,i,j,k,l;Odd(b,'Hypernodes processing',1);for(e=new olb(a.b);e.ac);return e} +function XFc(a,b){var c,d,e;d=Cub(a.d,1)!=0;!Ccb(DD(vNb(b.j,(wtc(),Jsc))))&&!Ccb(DD(vNb(b.j,mtc)))||PD(vNb(b.j,(Nyc(),ywc)))===PD((tAc(),rAc))?b.c.Tf(b.e,d):(d=Ccb(DD(vNb(b.j,Jsc))));dGc(a,b,d,true);Ccb(DD(vNb(b.j,mtc)))&&yNb(b.j,mtc,(Bcb(),false));if(Ccb(DD(vNb(b.j,Jsc)))){yNb(b.j,Jsc,(Bcb(),false));yNb(b.j,mtc,true)}c=NFc(a,b);do{$Fc(a);if(c==0){return 0}d=!d;e=c;dGc(a,b,d,false);c=NFc(a,b)}while(e>c);return e} +function uNd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;if(b==c){return true}else{b=vNd(a,b);c=vNd(a,c);d=JQd(b);if(d){k=JQd(c);if(k!=d){if(!k){return false}else{i=d.Dj();o=k.Dj();return i==o&&i!=null}}else{g=(!b.d&&(b.d=new xMd(j5,b,1)),b.d);f=g.i;m=(!c.d&&(c.d=new xMd(j5,c,1)),c.d);if(f==m.i){for(j=0;j0;h=xFb(b,f);c?OFb(h.b,b):OFb(h.g,b);LFb(h).c.length==1&&(Gsb(d,h,d.c.b,d.c),true);e=new vgd(f,b);Wjb(a.o,e);Lkb(a.e.a,f)}} +function _Nb(a,b){var c,d,e,f,g,h,i;d=$wnd.Math.abs(D6c(a.b).a-D6c(b.b).a);h=$wnd.Math.abs(D6c(a.b).b-D6c(b.b).b);e=0;i=0;c=1;g=1;if(d>a.b.b/2+b.b.b/2){e=$wnd.Math.min($wnd.Math.abs(a.b.c-(b.b.c+b.b.b)),$wnd.Math.abs(a.b.c+a.b.b-b.b.c));c=1-e/d}if(h>a.b.a/2+b.b.a/2){i=$wnd.Math.min($wnd.Math.abs(a.b.d-(b.b.d+b.b.a)),$wnd.Math.abs(a.b.d+a.b.a-b.b.d));g=1-i/h}f=$wnd.Math.min(c,g);return (1-f)*$wnd.Math.sqrt(d*d+h*h)} +function lQc(a){var b,c,d,e;nQc(a,a.e,a.f,(FQc(),DQc),true,a.c,a.i);nQc(a,a.e,a.f,DQc,false,a.c,a.i);nQc(a,a.e,a.f,EQc,true,a.c,a.i);nQc(a,a.e,a.f,EQc,false,a.c,a.i);mQc(a,a.c,a.e,a.f,a.i);d=new Bib(a.i,0);while(d.b=65;c--){$ce[c]=c-65<<24>>24}for(d=122;d>=97;d--){$ce[d]=d-97+26<<24>>24}for(e=57;e>=48;e--){$ce[e]=e-48+52<<24>>24}$ce[43]=62;$ce[47]=63;for(f=0;f<=25;f++)_ce[f]=65+f&aje;for(g=26,i=0;g<=51;++g,i++)_ce[g]=97+i&aje;for(a=52,h=0;a<=61;++a,h++)_ce[a]=48+h&aje;_ce[62]=43;_ce[63]=47} +function FXb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;if(a.dc()){return new d7c}j=0;l=0;for(e=a.Kc();e.Ob();){d=BD(e.Pb(),37);f=d.f;j=$wnd.Math.max(j,f.a);l+=f.a*f.b}j=$wnd.Math.max(j,$wnd.Math.sqrt(l)*Edb(ED(vNb(BD(a.Kc().Pb(),37),(Nyc(),owc)))));m=0;n=0;i=0;c=b;for(h=a.Kc();h.Ob();){g=BD(h.Pb(),37);k=g.f;if(m+k.a>j){m=0;n+=i+b;i=0}uXb(g,m,n);c=$wnd.Math.max(c,m+k.a);i=$wnd.Math.max(i,k.b);m+=k.a+b}return new f7c(c+b,n+i+b)} +function mQc(a,b,c,d,e){var f,g,h,i,j,k,l;for(g=new olb(b);g.af){return Ucd(),zcd}break;case 4:case 3:if(i<0){return Ucd(),Acd}else if(i+a.f>e){return Ucd(),Rcd}}g=(h+a.g/2)/f;c=(i+a.f/2)/e;return g+c<=1&&g-c<=0?(Ucd(),Tcd):g+c>=1&&g-c>=0?(Ucd(),zcd):c<0.5?(Ucd(),Acd):(Ucd(),Rcd)} +function vhb(a,b,c,d,e){var f,g;f=wbb(xbb(b[0],Yje),xbb(d[0],Yje));a[0]=Tbb(f);f=Obb(f,32);if(c>=e){for(g=1;g0){e.b[g++]=0;e.b[g++]=f.b[0]-1}for(b=1;b0){pOc(i,i.d-e.d);e.c==(HOc(),FOc)&&nOc(i,i.a-e.d);i.d<=0&&i.i>0&&(Gsb(b,i,b.c.b,b.c),true)}}}for(f=new olb(a.f);f.a0){qOc(h,h.i-e.d);e.c==(HOc(),FOc)&&oOc(h,h.b-e.d);h.i<=0&&h.d>0&&(Gsb(c,h,c.c.b,c.c),true)}}}} +function gSc(a,b,c){var d,e,f,g,h,i,j,k;Odd(c,'Processor compute fanout',1);Uhb(a.b);Uhb(a.a);h=null;f=Jsb(b.b,0);while(!h&&f.b!=f.d.c){j=BD(Xsb(f),86);Ccb(DD(vNb(j,(mTc(),jTc))))&&(h=j)}i=new Psb;Gsb(i,h,i.c.b,i.c);fSc(a,i);for(k=Jsb(b.b,0);k.b!=k.d.c;){j=BD(Xsb(k),86);g=GD(vNb(j,(mTc(),$Sc)));e=Phb(a.b,g)!=null?BD(Phb(a.b,g),19).a:0;yNb(j,ZSc,meb(e));d=1+(Phb(a.a,g)!=null?BD(Phb(a.a,g),19).a:0);yNb(j,XSc,meb(d))}Qdd(c)} +function WPc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o;m=VPc(a,c);for(i=0;i0);d.a.Xb(d.c=--d.b);l>m+i&&uib(d)}for(g=new olb(n);g.a0);d.a.Xb(d.c=--d.b)}}}} +function Jfe(){wfe();var a,b,c,d,e,f;if(gfe)return gfe;a=(++vfe,new $fe(4));Xfe(a,Kfe(vxe,true));Zfe(a,Kfe('M',true));Zfe(a,Kfe('C',true));f=(++vfe,new $fe(4));for(d=0;d<11;d++){Ufe(f,d,d)}b=(++vfe,new $fe(4));Xfe(b,Kfe('M',true));Ufe(b,4448,4607);Ufe(b,65438,65439);e=(++vfe,new Lge(2));Kge(e,a);Kge(e,ffe);c=(++vfe,new Lge(2));c.$l(Bfe(f,Kfe('L',true)));c.$l(b);c=(++vfe,new lge(3,c));c=(++vfe,new rge(e,c));gfe=c;return gfe} +function S3c(a){var b,c;b=GD(hkd(a,(Y9c(),o8c)));if(T3c(b,a)){return}if(!ikd(a,F9c)&&((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a).i!=0||Ccb(DD(hkd(a,M8c))))){if(b==null||ufb(b).length==0){if(!T3c(sne,a)){c=Qfb(Qfb(new Wfb('Unable to load default layout algorithm '),sne),' for unconfigured node ');yfd(a,c);throw vbb(new y2c(c.a))}}else{c=Qfb(Qfb(new Wfb("Layout algorithm '"),b),"' not found for ");yfd(a,c);throw vbb(new y2c(c.a))}}} +function hIb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;c=a.i;b=a.n;if(a.b==0){n=c.c+b.b;m=c.b-b.b-b.c;for(g=a.a,i=0,k=g.length;i0){l-=d[0]+a.c;d[0]+=a.c}d[2]>0&&(l-=d[2]+a.c);d[1]=$wnd.Math.max(d[1],l);mHb(a.a[1],c.c+b.b+d[0]-(d[1]-l)/2,d[1])}for(f=a.a,h=0,j=f.length;h0?(a.n.c.length-1)*a.i:0;for(d=new olb(a.n);d.a1){for(d=Jsb(e,0);d.b!=d.d.c;){c=BD(Xsb(d),231);f=0;for(i=new olb(c.e);i.a0){b[0]+=a.c;l-=b[0]}b[2]>0&&(l-=b[2]+a.c);b[1]=$wnd.Math.max(b[1],l);nHb(a.a[1],d.d+c.d+b[0]-(b[1]-l)/2,b[1])}else{o=d.d+c.d;n=d.a-c.d-c.a;for(g=a.a,i=0,k=g.length;i=0&&f!=c){throw vbb(new Wdb(kue))}}e=0;for(i=0;i0||Jy(e.b.d,a.b.d+a.b.a)==0&&d.b<0||Jy(e.b.d+e.b.a,a.b.d)==0&&d.b>0){h=0;break}}else{h=$wnd.Math.min(h,YNb(a,e,d))}h=$wnd.Math.min(h,ONb(a,f,h,d))}return h} +function ifd(a,b){var c,d,e,f,g,h,i;if(a.b<2){throw vbb(new Wdb('The vector chain must contain at least a source and a target point.'))}e=(sCb(a.b!=0),BD(a.a.a.c,8));nmd(b,e.a,e.b);i=new Oyd((!b.a&&(b.a=new xMd(y2,b,5)),b.a));g=Jsb(a,1);while(g.aEdb(REc(g.g,g.d[0]).a)){sCb(i.b>0);i.a.Xb(i.c=--i.b);Aib(i,g);e=true}else if(!!h.e&&h.e.gc()>0){f=(!h.e&&(h.e=new Rkb),h.e).Mc(b);j=(!h.e&&(h.e=new Rkb),h.e).Mc(c);if(f||j){(!h.e&&(h.e=new Rkb),h.e).Fc(g);++g.c}}}e||(d.c[d.c.length]=g,true)} +function odc(a){var b,c,d;if(fcd(BD(vNb(a,(Nyc(),Vxc)),98))){for(c=new olb(a.j);c.a>>0,'0'+b.toString(16));d='\\x'+qfb(c,c.length-2,c.length)}else if(a>=Tje){c=(b=a>>>0,'0'+b.toString(16));d='\\v'+qfb(c,c.length-6,c.length)}else d=''+String.fromCharCode(a&aje);}return d} +function yhb(a,b){var c,d,e,f,g,h,i,j,k,l;g=a.e;i=b.e;if(i==0){return a}if(g==0){return b.e==0?b:new Vgb(-b.e,b.d,b.a)}f=a.d;h=b.d;if(f+h==2){c=xbb(a.a[0],Yje);d=xbb(b.a[0],Yje);g<0&&(c=Jbb(c));i<0&&(d=Jbb(d));return ghb(Qbb(c,d))}e=f!=h?f>h?1:-1:whb(a.a,b.a,f);if(e==-1){l=-i;k=g==i?zhb(b.a,h,a.a,f):uhb(b.a,h,a.a,f)}else{l=g;if(g==i){if(e==0){return Hgb(),Ggb}k=zhb(a.a,f,b.a,h)}else{k=uhb(a.a,f,b.a,h)}}j=new Vgb(l,k.length,k);Jgb(j);return j} +function YPc(a){var b,c,d,e,f,g;this.e=new Rkb;this.a=new Rkb;for(c=a.b-1;c<3;c++){St(a,0,BD(Ut(a,0),8))}if(a.b<4){throw vbb(new Wdb('At (least dimension + 1) control points are necessary!'))}else{this.b=3;this.d=true;this.c=false;TPc(this,a.b+this.b-1);g=new Rkb;f=new olb(this.e);for(b=0;b=b.o&&c.f<=b.f||b.a*0.5<=c.f&&b.a*1.5>=c.f){g=BD(Ikb(b.n,b.n.c.length-1),211);if(g.e+g.d+c.g+e<=d&&(f=BD(Ikb(b.n,b.n.c.length-1),211),f.f-a.f+c.f<=a.b||a.a.c.length==1)){EZc(b,c);return true}else if(b.s+c.g<=d&&(b.t+b.d+c.f+e<=a.b||a.a.c.length==1)){Ekb(b.b,c);h=BD(Ikb(b.n,b.n.c.length-1),211);Ekb(b.n,new VZc(b.s,h.f+h.a+b.i,b.i));QZc(BD(Ikb(b.n,b.n.c.length-1),211),c);GZc(b,c);return true}}return false} +function Zxd(a,b,c){var d,e,f,g;if(a.ej()){e=null;f=a.fj();d=a.Zi(1,g=uud(a,b,c),c,b,f);if(a.bj()&&!(a.ni()&&g!=null?pb(g,c):PD(g)===PD(c))){g!=null&&(e=a.dj(g,e));e=a.cj(c,e);a.ij()&&(e=a.lj(g,c,e));if(!e){a.$i(d)}else{e.Ei(d);e.Fi()}}else{a.ij()&&(e=a.lj(g,c,e));if(!e){a.$i(d)}else{e.Ei(d);e.Fi()}}return g}else{g=uud(a,b,c);if(a.bj()&&!(a.ni()&&g!=null?pb(g,c):PD(g)===PD(c))){e=null;g!=null&&(e=a.dj(g,null));e=a.cj(c,e);!!e&&e.Fi()}return g}} +function YA(a,b){var c,d,e,f,g,h,i,j;b%=24;if(a.q.getHours()!=b){d=new $wnd.Date(a.q.getTime());d.setDate(d.getDate()+1);h=a.q.getTimezoneOffset()-d.getTimezoneOffset();if(h>0){i=h/60|0;j=h%60;e=a.q.getDate();c=a.q.getHours();c+i>=24&&++e;f=new $wnd.Date(a.q.getFullYear(),a.q.getMonth(),e,b+i,a.q.getMinutes()+j,a.q.getSeconds(),a.q.getMilliseconds());a.q.setTime(f.getTime())}}g=a.q.getTime();a.q.setTime(g+3600000);a.q.getHours()!=b&&a.q.setTime(g)} +function opc(a,b){var c,d,e,f,g;Odd(b,'Path-Like Graph Wrapping',1);if(a.b.c.length==0){Qdd(b);return}e=new Xoc(a);g=(e.i==null&&(e.i=Soc(e,new Zoc)),Edb(e.i)*e.f);c=g/(e.i==null&&(e.i=Soc(e,new Zoc)),Edb(e.i));if(e.b>c){Qdd(b);return}switch(BD(vNb(a,(Nyc(),Gyc)),337).g){case 2:f=new hpc;break;case 0:f=new Ync;break;default:f=new kpc;}d=f.Vf(a,e);if(!f.Wf()){switch(BD(vNb(a,Myc),338).g){case 2:d=tpc(e,d);break;case 1:d=rpc(e,d);}}npc(a,e,d);Qdd(b)} +function MFc(a,b){var c,d,e,f;Fub(a.d,a.e);a.c.a.$b();if(Edb(ED(vNb(b.j,(Nyc(),uwc))))!=0||Edb(ED(vNb(b.j,uwc)))!=0){c=dme;PD(vNb(b.j,ywc))!==PD((tAc(),rAc))&&yNb(b.j,(wtc(),Jsc),(Bcb(),true));f=BD(vNb(b.j,Ayc),19).a;for(e=0;ee&&++j;Ekb(g,(tCb(h+j,b.c.length),BD(b.c[h+j],19)));i+=(tCb(h+j,b.c.length),BD(b.c[h+j],19)).a-d;++c;while(c1&&(i>red(h)*qed(h)/2||g.b==0)){l=new wed(m);k=red(h)/qed(h);j=fed(l,b,new p0b,c,d,e,k);P6c(X6c(l.e),j);h=l;n.c[n.c.length]=l;i=0;m.c=KC(SI,Uhe,1,0,5,1)}}}Gkb(n,m);return n} +function y6d(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p;if(c.mh(b)){k=(n=b,!n?null:BD(d,49).xh(n));if(k){p=c.bh(b,a.a);o=b.t;if(o>1||o==-1){l=BD(p,69);m=BD(k,69);if(l.dc()){m.$b()}else{g=!!zUd(b);f=0;for(h=a.a?l.Kc():l.Zh();h.Ob();){j=BD(h.Pb(),56);e=BD(Wrb(a,j),56);if(!e){if(a.b&&!g){m.Xh(f,j);++f}}else{if(g){i=m.Xc(e);i==-1?m.Xh(f,e):f!=i&&m.ji(f,e)}else{m.Xh(f,e)}++f}}}}else{if(p==null){k.Wb(null)}else{e=Wrb(a,p);e==null?a.b&&!zUd(b)&&k.Wb(p):k.Wb(e)}}}}} +function E6b(a,b){var c,d,e,f,g,h,i,j;c=new L6b;for(e=new Sr(ur(R_b(b).a.Kc(),new Sq));Qr(e);){d=BD(Rr(e),17);if(OZb(d)){continue}h=d.c.i;if(F6b(h,C6b)){j=G6b(a,h,C6b,B6b);if(j==-1){continue}c.b=$wnd.Math.max(c.b,j);!c.a&&(c.a=new Rkb);Ekb(c.a,h)}}for(g=new Sr(ur(U_b(b).a.Kc(),new Sq));Qr(g);){f=BD(Rr(g),17);if(OZb(f)){continue}i=f.d.i;if(F6b(i,B6b)){j=G6b(a,i,B6b,C6b);if(j==-1){continue}c.d=$wnd.Math.max(c.d,j);!c.c&&(c.c=new Rkb);Ekb(c.c,i)}}return c} +function Khb(a){Dhb();var b,c,d,e;b=QD(a);if(a1000000){throw vbb(new ocb('power of ten too big'))}if(a<=Ohe){return Qgb(Pgb(Bhb[1],b),b)}d=Pgb(Bhb[1],Ohe);e=d;c=Cbb(a-Ohe);b=QD(a%Ohe);while(ybb(c,Ohe)>0){e=Ogb(e,d);c=Qbb(c,Ohe)}e=Ogb(e,Pgb(Bhb[1],b));e=Qgb(e,Ohe);c=Cbb(a-Ohe);while(ybb(c,Ohe)>0){e=Qgb(e,Ohe);c=Qbb(c,Ohe)}e=Qgb(e,b);return e} +function X5b(a,b){var c,d,e,f,g,h,i,j,k;Odd(b,'Hierarchical port dummy size processing',1);i=new Rkb;k=new Rkb;d=Edb(ED(vNb(a,(Nyc(),myc))));c=d*2;for(f=new olb(a.b);f.aj&&d>j){k=h;j=Edb(b.p[h.p])+Edb(b.d[h.p])+h.o.b+h.d.a}else{e=false;c.n&&Sdd(c,'bk node placement breaks on '+h+' which should have been after '+k);break}}if(!e){break}}c.n&&Sdd(c,b+' is feasible: '+e);return e} +function XNc(a,b,c,d){var e,f,g,h,i,j,k;h=-1;for(k=new olb(a);k.a=q&&a.e[i.p]>o*a.b||t>=c*q){m.c[m.c.length]=h;h=new Rkb;ye(g,f);f.a.$b();j-=k;n=$wnd.Math.max(n,j*a.b+p);j+=t;s=t;t=0;k=0;p=0}}return new vgd(n,m)} +function q4c(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;for(c=(j=(new $ib(a.c.b)).a.vc().Kc(),new djb(j));c.a.Ob();){b=(h=BD(c.a.Pb(),42),BD(h.dd(),149));e=b.a;e==null&&(e='');d=i4c(a.c,e);!d&&e.length==0&&(d=u4c(a));!!d&&!ze(d.c,b,false)&&Dsb(d.c,b)}for(g=Jsb(a.a,0);g.b!=g.d.c;){f=BD(Xsb(g),478);k=j4c(a.c,f.a);n=j4c(a.c,f.b);!!k&&!!n&&Dsb(k.c,new vgd(n,f.c))}Osb(a.a);for(m=Jsb(a.b,0);m.b!=m.d.c;){l=BD(Xsb(m),478);b=g4c(a.c,l.a);i=j4c(a.c,l.b);!!b&&!!i&&B3c(b,i,l.c)}Osb(a.b)} +function qvd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;f=new fC(a);g=new ird;e=(ko(g.g),ko(g.j),Uhb(g.b),ko(g.d),ko(g.i),Uhb(g.k),Uhb(g.c),Uhb(g.e),n=drd(g,f,null),ard(g,f),n);if(b){j=new fC(b);h=rvd(j);jfd(e,OC(GC(g2,1),Uhe,527,0,[h]))}m=false;l=false;if(c){j=new fC(c);que in j.a&&(m=aC(j,que).ge().a);rue in j.a&&(l=aC(j,rue).ge().a)}k=Vdd(Xdd(new Zdd,m),l);t2c(new w2c,e,k);que in f.a&&cC(f,que,null);if(m||l){i=new eC;nvd(k,i,m,l);cC(f,que,i)}d=new Prd(g);Ghe(new _ud(e),d)} +function pA(a,b,c){var d,e,f,g,h,i,j,k,l;g=new nB;j=OC(GC(WD,1),oje,25,15,[0]);e=-1;f=0;d=0;for(i=0;i0){if(e<0&&k.a){e=i;f=j[0];d=0}if(e>=0){h=k.b;if(i==e){h-=d++;if(h==0){return 0}}if(!wA(b,j,k,h,g)){i=e-1;j[0]=f;continue}}else{e=-1;if(!wA(b,j,k,0,g)){return 0}}}else{e=-1;if(bfb(k.c,0)==32){l=j[0];uA(b,j);if(j[0]>l){continue}}else if(ofb(b,k.c,j[0])){j[0]+=k.c.length;continue}return 0}}if(!mB(g,c)){return 0}return j[0]} +function SKd(a){var b,c,d,e,f,g,h,i;if(!a.f){i=new CNd;h=new CNd;b=KKd;g=b.a.zc(a,b);if(g==null){for(f=new Fyd(_Kd(a));f.e!=f.i.gc();){e=BD(Dyd(f),26);ytd(i,SKd(e))}b.a.Bc(a)!=null;b.a.gc()==0&&undefined}for(d=(!a.s&&(a.s=new cUd(t5,a,21,17)),new Fyd(a.s));d.e!=d.i.gc();){c=BD(Dyd(d),170);JD(c,99)&&wtd(h,BD(c,18))}vud(h);a.r=new UNd(a,(BD(qud(ZKd((NFd(),MFd).o),6),18),h.i),h.g);ytd(i,a.r);vud(i);a.f=new nNd((BD(qud(ZKd(MFd.o),5),18),i.i),i.g);$Kd(a).b&=-3}return a.f} +function rMb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;g=a.o;d=KC(WD,oje,25,g,15,1);e=KC(WD,oje,25,g,15,1);c=a.p;b=KC(WD,oje,25,c,15,1);f=KC(WD,oje,25,c,15,1);for(j=0;j=0&&!YMb(a,k,l)){--l}e[k]=l}for(n=0;n=0&&!YMb(a,h,o)){--h}f[o]=h}for(i=0;ib[m]&&md[i]&&aNb(a,i,m,false,true)}}} +function lRb(a){var b,c,d,e,f,g,h,i;c=Ccb(DD(vNb(a,(wSb(),cSb))));f=a.a.c.d;h=a.a.d.d;if(c){g=Y6c(c7c(new f7c(h.a,h.b),f),0.5);i=Y6c(R6c(a.e),0.5);b=c7c(P6c(new f7c(f.a,f.b),g),i);a7c(a.d,b)}else{e=Edb(ED(vNb(a.a,tSb)));d=a.d;if(f.a>=h.a){if(f.b>=h.b){d.a=h.a+(f.a-h.a)/2+e;d.b=h.b+(f.b-h.b)/2-e-a.e.b}else{d.a=h.a+(f.a-h.a)/2+e;d.b=f.b+(h.b-f.b)/2+e}}else{if(f.b>=h.b){d.a=f.a+(h.a-f.a)/2+e;d.b=h.b+(f.b-h.b)/2+e}else{d.a=f.a+(h.a-f.a)/2+e;d.b=f.b+(h.b-f.b)/2-e-a.e.b}}}} +function Qge(a,b){var c,d,e,f,g,h,i;if(a==null){return null}f=a.length;if(f==0){return ''}i=KC(TD,$ie,25,f,15,1);ACb(0,f,a.length);ACb(0,f,i.length);ffb(a,0,f,i,0);c=null;h=b;for(e=0,g=0;e0?qfb(c.a,0,f-1):''}}else{return !c?a:c.a}} +function DPb(a){r4c(a,new E3c(P3c(M3c(O3c(N3c(new R3c,Yle),'ELK DisCo'),'Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out.'),new GPb)));p4c(a,Yle,Zle,Ksd(BPb));p4c(a,Yle,$le,Ksd(vPb));p4c(a,Yle,_le,Ksd(qPb));p4c(a,Yle,ame,Ksd(wPb));p4c(a,Yle,Zke,Ksd(zPb));p4c(a,Yle,$ke,Ksd(yPb));p4c(a,Yle,Yke,Ksd(APb));p4c(a,Yle,_ke,Ksd(xPb));p4c(a,Yle,Tle,Ksd(sPb));p4c(a,Yle,Ule,Ksd(rPb));p4c(a,Yle,Vle,Ksd(tPb));p4c(a,Yle,Wle,Ksd(uPb))} +function Zbc(a,b,c,d){var e,f,g,h,i,j,k,l,m;f=new b0b(a);__b(f,(j0b(),i0b));yNb(f,(Nyc(),Vxc),(dcd(),$bd));e=0;if(b){g=new H0b;yNb(g,(wtc(),$sc),b);yNb(f,$sc,b.i);G0b(g,(Ucd(),Tcd));F0b(g,f);m=k_b(b.e);for(j=m,k=0,l=j.length;k0){c-=d.length-b;if(c>=0){e.a+='0.';for(;c>egb.length;c-=egb.length){Rfb(e,egb)}Sfb(e,egb,QD(c));Qfb(e,d.substr(b))}else{c=b-c;Qfb(e,qfb(d,b,QD(c)));e.a+='.';Qfb(e,pfb(d,QD(c)))}}else{Qfb(e,d.substr(b));for(;c<-egb.length;c+=egb.length){Rfb(e,egb)}Sfb(e,egb,QD(-c))}return e.a} +function v6c(a,b,c,d){var e,f,g,h,i,j,k,l,m;i=c7c(new f7c(c.a,c.b),a);j=i.a*b.b-i.b*b.a;k=b.a*d.b-b.b*d.a;l=(i.a*d.b-i.b*d.a)/k;m=j/k;if(k==0){if(j==0){e=P6c(new f7c(c.a,c.b),Y6c(new f7c(d.a,d.b),0.5));f=S6c(a,e);g=S6c(P6c(new f7c(a.a,a.b),b),e);h=$wnd.Math.sqrt(d.a*d.a+d.b*d.b)*0.5;if(f=0&&l<=1&&m>=0&&m<=1?P6c(new f7c(a.a,a.b),Y6c(new f7c(b.a,b.b),l)):null}} +function OTb(a,b,c){var d,e,f,g,h;d=BD(vNb(a,(Nyc(),zwc)),21);c.a>b.a&&(d.Hc((i8c(),c8c))?(a.c.a+=(c.a-b.a)/2):d.Hc(e8c)&&(a.c.a+=c.a-b.a));c.b>b.b&&(d.Hc((i8c(),g8c))?(a.c.b+=(c.b-b.b)/2):d.Hc(f8c)&&(a.c.b+=c.b-b.b));if(BD(vNb(a,(wtc(),Ksc)),21).Hc((Orc(),Hrc))&&(c.a>b.a||c.b>b.b)){for(h=new olb(a.a);h.ab.a&&(d.Hc((i8c(),c8c))?(a.c.a+=(c.a-b.a)/2):d.Hc(e8c)&&(a.c.a+=c.a-b.a));c.b>b.b&&(d.Hc((i8c(),g8c))?(a.c.b+=(c.b-b.b)/2):d.Hc(f8c)&&(a.c.b+=c.b-b.b));if(BD(vNb(a,(wtc(),Ksc)),21).Hc((Orc(),Hrc))&&(c.a>b.a||c.b>b.b)){for(g=new olb(a.a);g.ab){e=0;f+=k.b+c;l.c[l.c.length]=k;k=new x$c(f,c);d=new PZc(0,k.f,k,c);s$c(k,d);e=0}if(d.b.c.length==0||i.f>=d.o&&i.f<=d.f||d.a*0.5<=i.f&&d.a*1.5>=i.f){EZc(d,i)}else{g=new PZc(d.s+d.r+c,k.f,k,c);s$c(k,g);EZc(g,i)}e=i.i+i.g}l.c[l.c.length]=k;return l} +function OKd(a){var b,c,d,e,f,g,h,i;if(!a.a){a.o=null;i=new GNd(a);b=new KNd;c=KKd;h=c.a.zc(a,c);if(h==null){for(g=new Fyd(_Kd(a));g.e!=g.i.gc();){f=BD(Dyd(g),26);ytd(i,OKd(f))}c.a.Bc(a)!=null;c.a.gc()==0&&undefined}for(e=(!a.s&&(a.s=new cUd(t5,a,21,17)),new Fyd(a.s));e.e!=e.i.gc();){d=BD(Dyd(e),170);JD(d,322)&&wtd(b,BD(d,34))}vud(b);a.k=new PNd(a,(BD(qud(ZKd((NFd(),MFd).o),7),18),b.i),b.g);ytd(i,a.k);vud(i);a.a=new nNd((BD(qud(ZKd(MFd.o),4),18),i.i),i.g);$Kd(a).b&=-2}return a.a} +function vZc(a,b,c,d,e,f,g){var h,i,j,k,l,m;l=false;i=ZZc(c.q,b.f+b.b-c.q.f);m=e-(c.q.e+i-g);if(m=(tCb(f,a.c.length),BD(a.c[f],200)).e;k=(h=MZc(d,m,false),h.a);if(k>b.b&&!j){return false}if(j||k<=b.b){if(j&&k>b.b){c.d=k;KZc(c,JZc(c,k))}else{$Zc(c.q,i);c.c=true}KZc(d,e-(c.s+c.r));OZc(d,c.q.e+c.q.d,b.f);s$c(b,d);if(a.c.length>f){v$c((tCb(f,a.c.length),BD(a.c[f],200)),d);(tCb(f,a.c.length),BD(a.c[f],200)).a.c.length==0&&Kkb(a,f)}l=true}return l} +function C2d(a,b,c,d){var e,f,g,h,i,j,k;k=S6d(a.e.Tg(),b);e=0;f=BD(a.g,119);i=null;Q6d();if(BD(b,66).Oj()){for(h=0;ha.o.a){k=(i-a.o.a)/2;h.b=$wnd.Math.max(h.b,k);h.c=$wnd.Math.max(h.c,k)}} +function rvd(a){var b,c,d,e,f,g,h,i;f=new b2c;Z1c(f,(Y1c(),V1c));for(d=(e=$B(a,KC(ZI,nie,2,0,6,1)),new vib(new amb((new mC(a,e)).b)));d.b0?a.i:0)>b&&i>0){f=0;g+=i+a.i;e=$wnd.Math.max(e,m);d+=i+a.i;i=0;m=0;if(c){++l;Ekb(a.n,new VZc(a.s,g,a.i))}h=0}m+=j.g+(h>0?a.i:0);i=$wnd.Math.max(i,j.f);c&&QZc(BD(Ikb(a.n,l),211),j);f+=j.g+(h>0?a.i:0);++h}e=$wnd.Math.max(e,m);d+=i;if(c){a.r=e;a.d=d;u$c(a.j)}return new J6c(a.s,a.t,e,d)} +function $fb(a,b,c,d,e){Zfb();var f,g,h,i,j,k,l,m,n;vCb(a,'src');vCb(c,'dest');m=rb(a);i=rb(c);rCb((m.i&4)!=0,'srcType is not an array');rCb((i.i&4)!=0,'destType is not an array');l=m.c;g=i.c;rCb((l.i&1)!=0?l==g:(g.i&1)==0,"Array types don't match");n=a.length;j=c.length;if(b<0||d<0||e<0||b+e>n||d+e>j){throw vbb(new pcb)}if((l.i&1)==0&&m!=i){k=CD(a);f=CD(c);if(PD(a)===PD(c)&&bd;){NC(f,h,k[--b])}}else{for(h=d+e;d0&&$Bb(a,b,c,d,e,true)} +function phb(){phb=ccb;nhb=OC(GC(WD,1),oje,25,15,[Rie,1162261467,Iie,1220703125,362797056,1977326743,Iie,387420489,Jje,214358881,429981696,815730721,1475789056,170859375,268435456,410338673,612220032,893871739,1280000000,1801088541,113379904,148035889,191102976,244140625,308915776,387420489,481890304,594823321,729000000,887503681,Iie,1291467969,1544804416,1838265625,60466176]);ohb=OC(GC(WD,1),oje,25,15,[-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5])} +function soc(a){var b,c,d,e,f,g,h,i;for(e=new olb(a.b);e.a=a.b.length){f[e++]=g.b[d++];f[e++]=g.b[d++]}else if(d>=g.b.length){f[e++]=a.b[c++];f[e++]=a.b[c++]}else if(g.b[d]0?a.i:0)}++b}Ce(a.n,i);a.d=c;a.r=d;a.g=0;a.f=0;a.e=0;a.o=Pje;a.p=Pje;for(f=new olb(a.b);f.a0){e=(!a.n&&(a.n=new cUd(D2,a,1,7)),BD(qud(a.n,0),137)).a;!e||Qfb(Qfb((b.a+=' "',b),e),'"')}}else{Qfb(Qfb((b.a+=' "',b),d),'"')}c=(!a.b&&(a.b=new y5d(z2,a,4,7)),!(a.b.i<=1&&(!a.c&&(a.c=new y5d(z2,a,5,8)),a.c.i<=1)));c?(b.a+=' [',b):(b.a+=' ',b);Qfb(b,Eb(new Gb,new Fyd(a.b)));c&&(b.a+=']',b);b.a+=gne;c&&(b.a+='[',b);Qfb(b,Eb(new Gb,new Fyd(a.c)));c&&(b.a+=']',b);return b.a} +function TQd(a,b){var c,d,e,f,g,h,i;if(a.a){h=a.a.ne();i=null;if(h!=null){b.a+=''+h}else{g=a.a.Dj();if(g!=null){f=hfb(g,wfb(91));if(f!=-1){i=g.substr(f);b.a+=''+qfb(g==null?Xhe:(uCb(g),g),0,f)}else{b.a+=''+g}}}if(!!a.d&&a.d.i!=0){e=true;b.a+='<';for(d=new Fyd(a.d);d.e!=d.i.gc();){c=BD(Dyd(d),87);e?(e=false):(b.a+=She,b);TQd(c,b)}b.a+='>'}i!=null&&(b.a+=''+i,b)}else if(a.e){h=a.e.zb;h!=null&&(b.a+=''+h,b)}else{b.a+='?';if(a.b){b.a+=' super ';TQd(a.b,b)}else{if(a.f){b.a+=' extends ';TQd(a.f,b)}}}} +function Z9b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;v=a.c;w=b.c;c=Jkb(v.a,a,0);d=Jkb(w.a,b,0);t=BD(W_b(a,(KAc(),HAc)).Kc().Pb(),11);C=BD(W_b(a,IAc).Kc().Pb(),11);u=BD(W_b(b,HAc).Kc().Pb(),11);D=BD(W_b(b,IAc).Kc().Pb(),11);r=k_b(t.e);A=k_b(C.g);s=k_b(u.e);B=k_b(D.g);Z_b(a,d,w);for(g=s,k=0,o=g.length;kk){new DOc((HOc(),GOc),c,b,j-k)}else if(j>0&&k>0){new DOc((HOc(),GOc),b,c,0);new DOc(GOc,c,b,0)}}return g} +function TUb(a,b){var c,d,e,f,g,h;for(g=new nib((new eib(a.f.b)).a);g.b;){f=lib(g);e=BD(f.cd(),594);if(b==1){if(e.gf()!=(ead(),dad)&&e.gf()!=_9c){continue}}else{if(e.gf()!=(ead(),aad)&&e.gf()!=bad){continue}}d=BD(BD(f.dd(),46).b,81);h=BD(BD(f.dd(),46).a,189);c=h.c;switch(e.gf().g){case 2:d.g.c=a.e.a;d.g.b=$wnd.Math.max(1,d.g.b+c);break;case 1:d.g.c=d.g.c+c;d.g.b=$wnd.Math.max(1,d.g.b-c);break;case 4:d.g.d=a.e.b;d.g.a=$wnd.Math.max(1,d.g.a+c);break;case 3:d.g.d=d.g.d+c;d.g.a=$wnd.Math.max(1,d.g.a-c);}}} +function nJc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;h=KC(WD,oje,25,b.b.c.length,15,1);j=KC(NQ,Kie,267,b.b.c.length,0,1);i=KC(OQ,kne,10,b.b.c.length,0,1);for(l=a.a,m=0,n=l.length;m0&&!!i[d]&&(o=jBc(a.b,i[d],e));p=$wnd.Math.max(p,e.c.c.b+o)}for(f=new olb(k.e);f.a1){throw vbb(new Wdb(Hwe))}if(!i){f=R6d(b,d.Kc().Pb());g.Fc(f)}}return xtd(a,I2d(a,b,c),g)} +function Pmc(a,b){var c,d,e,f;Jmc(b.b.j);MAb(NAb(new YAb(null,new Kub(b.d,16)),new $mc),new anc);for(f=new olb(b.d);f.aa.o.b){return false}c=V_b(a,zcd);h=b.d+b.a+(c.gc()-1)*g;if(h>a.o.b){return false}}return true} +function thb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;g=a.e;i=b.e;if(g==0){return b}if(i==0){return a}f=a.d;h=b.d;if(f+h==2){c=xbb(a.a[0],Yje);d=xbb(b.a[0],Yje);if(g==i){k=wbb(c,d);o=Tbb(k);n=Tbb(Pbb(k,32));return n==0?new Ugb(g,o):new Vgb(g,2,OC(GC(WD,1),oje,25,15,[o,n]))}return ghb(g<0?Qbb(d,c):Qbb(c,d))}else if(g==i){m=g;l=f>=h?uhb(a.a,f,b.a,h):uhb(b.a,h,a.a,f)}else{e=f!=h?f>h?1:-1:whb(a.a,b.a,f);if(e==0){return Hgb(),Ggb}if(e==1){m=g;l=zhb(a.a,f,b.a,h)}else{m=i;l=zhb(b.a,h,a.a,f)}}j=new Vgb(m,l.length,l);Jgb(j);return j} +function oZb(a,b,c,d,e,f,g){var h,i,j,k,l,m,n;l=Ccb(DD(vNb(b,(Nyc(),vxc))));m=null;f==(KAc(),HAc)&&d.c.i==c?(m=d.c):f==IAc&&d.d.i==c&&(m=d.d);j=g;if(!j||!l||!!m){k=(Ucd(),Scd);m?(k=m.j):fcd(BD(vNb(c,Vxc),98))&&(k=f==HAc?Tcd:zcd);i=lZb(a,b,c,f,k,d);h=kZb((Q_b(c),d));if(f==HAc){QZb(h,BD(Ikb(i.j,0),11));RZb(h,e)}else{QZb(h,e);RZb(h,BD(Ikb(i.j,0),11))}j=new yZb(d,h,i,BD(vNb(i,(wtc(),$sc)),11),f,!m)}else{Ekb(j.e,d);n=$wnd.Math.max(Edb(ED(vNb(j.d,Zwc))),Edb(ED(vNb(d,Zwc))));yNb(j.d,Zwc,n)}Rc(a.a,d,new BZb(j.d,b,f));return j} +function V1d(a,b){var c,d,e,f,g,h,i,j,k,l;k=null;!!a.d&&(k=BD(Phb(a.d,b),138));if(!k){f=a.a.Mh();l=f.i;if(!a.d||Vhb(a.d)!=l){i=new Lqb;!!a.d&&Ld(i,a.d);j=i.f.c+i.g.c;for(h=j;h0){n=(o-1)*c;!!h&&(n+=d);!!k&&(n+=d);n=a.b[e+1]){e+=2}else if(c0){d=new Tkb(BD(Qc(a.a,f),21));mmb();Okb(d,new EZb(b));e=new Bib(f.b,0);while(e.bv)){i=2;g=Ohe}else if(i==0){i=1;g=A}else{i=0;g=A}}else{n=A>=g||g-A0?1:Ny(isNaN(d),isNaN(0)))>=0^(null,My(Jqe),($wnd.Math.abs(h)<=Jqe||h==0||isNaN(h)&&isNaN(0)?0:h<0?-1:h>0?1:Ny(isNaN(h),isNaN(0)))>=0)){return $wnd.Math.max(h,d)}My(Jqe);if(($wnd.Math.abs(d)<=Jqe||d==0||isNaN(d)&&isNaN(0)?0:d<0?-1:d>0?1:Ny(isNaN(d),isNaN(0)))>0){return $wnd.Math.sqrt(h*h+d*d)}return -$wnd.Math.sqrt(h*h+d*d)} +function Kge(a,b){var c,d,e,f,g,h;if(!b)return;!a.a&&(a.a=new Wvb);if(a.e==2){Tvb(a.a,b);return}if(b.e==1){for(e=0;e=Tje?Efb(c,Tee(d)):Afb(c,d&aje);g=(++vfe,new Hge(10,null,0));Vvb(a.a,g,h-1)}else{c=(g.bm().length+f,new Ifb);Efb(c,g.bm())}if(b.e==0){d=b._l();d>=Tje?Efb(c,Tee(d)):Afb(c,d&aje)}else{Efb(c,b.bm())}BD(g,521).b=c.a} +function rgb(a){var b,c,d,e,f;if(a.g!=null){return a.g}if(a.a<32){a.g=rhb(Cbb(a.f),QD(a.e));return a.g}e=shb((!a.c&&(a.c=fhb(a.f)),a.c),0);if(a.e==0){return e}b=(!a.c&&(a.c=fhb(a.f)),a.c).e<0?2:1;c=e.length;d=-a.e+c-b;f=new Ufb;f.a+=''+e;if(a.e>0&&d>=-6){if(d>=0){Tfb(f,c-QD(a.e),String.fromCharCode(46))}else{f.a=qfb(f.a,0,b-1)+'0.'+pfb(f.a,b-1);Tfb(f,b+1,zfb(egb,0,-QD(d)-1))}}else{if(c-b>=1){Tfb(f,b,String.fromCharCode(46));++c}Tfb(f,c,String.fromCharCode(69));d>0&&Tfb(f,++c,String.fromCharCode(43));Tfb(f,++c,''+Ubb(Cbb(d)))}a.g=f.a;return a.g} +function npc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(c.dc()){return}h=0;m=0;d=c.Kc();o=BD(d.Pb(),19).a;while(h1&&(i=j.mg(i,a.a,h))}if(i.c.length==1){return BD(Ikb(i,i.c.length-1),220)}if(i.c.length==2){return lYc((tCb(0,i.c.length),BD(i.c[0],220)),(tCb(1,i.c.length),BD(i.c[1],220)),g,f)}return null} +function JNb(a){var b,c,d,e,f,g;Hkb(a.a,new PNb);for(c=new olb(a.a);c.a=$wnd.Math.abs(d.b)){d.b=0;f.d+f.a>g.d&&f.dg.c&&f.c0){b=new _zd(a.i,a.g);c=a.i;f=c<100?null:new Ixd(c);if(a.ij()){for(d=0;d0){h=a.g;j=a.i;oud(a);f=j<100?null:new Ixd(j);for(d=0;d>13|(a.m&15)<<9;e=a.m>>4&8191;f=a.m>>17|(a.h&255)<<5;g=(a.h&1048320)>>8;h=b.l&8191;i=b.l>>13|(b.m&15)<<9;j=b.m>>4&8191;k=b.m>>17|(b.h&255)<<5;l=(b.h&1048320)>>8;B=c*h;C=d*h;D=e*h;F=f*h;G=g*h;if(i!=0){C+=c*i;D+=d*i;F+=e*i;G+=f*i}if(j!=0){D+=c*j;F+=d*j;G+=e*j}if(k!=0){F+=c*k;G+=d*k}l!=0&&(G+=c*l);n=B&Eje;o=(C&511)<<13;m=n+o;q=B>>22;r=C>>9;s=(D&262143)<<4;t=(F&31)<<17;p=q+r+s+t;v=D>>18;w=F>>5;A=(G&4095)<<8;u=v+w+A;p+=m>>22;m&=Eje;u+=p>>22;p&=Eje;u&=Fje;return TC(m,p,u)} +function o7b(a){var b,c,d,e,f,g,h;h=BD(Ikb(a.j,0),11);if(h.g.c.length!=0&&h.e.c.length!=0){throw vbb(new Zdb('Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges.'))}if(h.g.c.length!=0){f=Pje;for(c=new olb(h.g);c.a4){if(a.wj(b)){if(a.rk()){e=BD(b,49);d=e.Ug();i=d==a.e&&(a.Dk()?e.Og(e.Vg(),a.zk())==a.Ak():-1-e.Vg()==a.aj());if(a.Ek()&&!i&&!d&&!!e.Zg()){for(f=0;f0&&(j=a.n.a/f);break;case 2:case 4:e=a.i.o.b;e>0&&(j=a.n.b/e);}yNb(a,(wtc(),htc),j)}i=a.o;g=a.a;if(d){g.a=d.a;g.b=d.b;a.d=true}else if(b!=bcd&&b!=ccd&&h!=Scd){switch(h.g){case 1:g.a=i.a/2;break;case 2:g.a=i.a;g.b=i.b/2;break;case 3:g.a=i.a/2;g.b=i.b;break;case 4:g.b=i.b/2;}}else{g.a=i.a/2;g.b=i.b/2}} +function vwd(a){var b,c,d,e,f,g,h,i,j,k;if(a.ej()){k=a.Vi();i=a.fj();if(k>0){b=new Aud(a.Gi());c=k;f=c<100?null:new Ixd(c);Cvd(a,c,b.g);e=c==1?a.Zi(4,qud(b,0),null,0,i):a.Zi(6,b,null,-1,i);if(a.bj()){for(d=new Fyd(b);d.e!=d.i.gc();){f=a.dj(Dyd(d),f)}if(!f){a.$i(e)}else{f.Ei(e);f.Fi()}}else{if(!f){a.$i(e)}else{f.Ei(e);f.Fi()}}}else{Cvd(a,a.Vi(),a.Wi());a.$i(a.Zi(6,(mmb(),jmb),null,-1,i))}}else if(a.bj()){k=a.Vi();if(k>0){h=a.Wi();j=k;Cvd(a,k,h);f=j<100?null:new Ixd(j);for(d=0;da.d[g.p]){c+=zHc(a.b,f)*BD(i.b,19).a;Wjb(a.a,meb(f))}}while(!akb(a.a)){xHc(a.b,BD(fkb(a.a),19).a)}}return c} +function eed(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q;l=new g7c(BD(hkd(a,(X7c(),R7c)),8));l.a=$wnd.Math.max(l.a-c.b-c.c,0);l.b=$wnd.Math.max(l.b-c.d-c.a,0);e=ED(hkd(a,L7c));(e==null||(uCb(e),e)<=0)&&(e=1.3);h=new Rkb;for(o=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));o.e!=o.i.gc();){n=BD(Dyd(o),33);g=new xed(n);h.c[h.c.length]=g}m=BD(hkd(a,M7c),311);switch(m.g){case 3:q=bed(h,b,l.a,l.b,(j=d,uCb(e),e,j));break;case 1:q=aed(h,b,l.a,l.b,(k=d,uCb(e),e,k));break;default:q=ced(h,b,l.a,l.b,(i=d,uCb(e),e,i));}f=new wed(q);p=fed(f,b,c,l.a,l.b,d,(uCb(e),e));Afd(a,p.a,p.b,false,true)} +function vkc(a,b){var c,d,e,f;c=b.b;f=new Tkb(c.j);e=0;d=c.j;d.c=KC(SI,Uhe,1,0,5,1);hkc(BD(Si(a.b,(Ucd(),Acd),(Fkc(),Ekc)),15),c);e=ikc(f,e,new blc,d);hkc(BD(Si(a.b,Acd,Dkc),15),c);e=ikc(f,e,new dlc,d);hkc(BD(Si(a.b,Acd,Ckc),15),c);hkc(BD(Si(a.b,zcd,Ekc),15),c);hkc(BD(Si(a.b,zcd,Dkc),15),c);e=ikc(f,e,new flc,d);hkc(BD(Si(a.b,zcd,Ckc),15),c);hkc(BD(Si(a.b,Rcd,Ekc),15),c);e=ikc(f,e,new hlc,d);hkc(BD(Si(a.b,Rcd,Dkc),15),c);e=ikc(f,e,new jlc,d);hkc(BD(Si(a.b,Rcd,Ckc),15),c);hkc(BD(Si(a.b,Tcd,Ekc),15),c);e=ikc(f,e,new Pkc,d);hkc(BD(Si(a.b,Tcd,Dkc),15),c);hkc(BD(Si(a.b,Tcd,Ckc),15),c)} +function nbc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;Odd(b,'Layer size calculation',1);k=Pje;j=Qje;e=false;for(h=new olb(a.b);h.a0.5?(r-=g*2*(o-0.5)):o<0.5&&(r+=f*2*(0.5-o));e=h.d.b;rq.a-p-k&&(r=q.a-p-k);h.n.a=b+r}} +function ced(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q;h=KC(UD,Vje,25,a.c.length,15,1);m=new gub(new Ned);_tb(m,a);j=0;p=new Rkb;while(m.b.c.length!=0){g=BD(m.b.c.length==0?null:Ikb(m.b,0),157);if(j>1&&red(g)*qed(g)/2>h[0]){f=0;while(fh[f]){++f}o=new Jib(p,0,f+1);l=new wed(o);k=red(g)/qed(g);i=fed(l,b,new p0b,c,d,e,k);P6c(X6c(l.e),i);zCb(cub(m,l));n=new Jib(p,f+1,p.c.length);_tb(m,n);p.c=KC(SI,Uhe,1,0,5,1);j=0;Dlb(h,h.length,0)}else{q=m.b.c.length==0?null:Ikb(m.b,0);q!=null&&fub(m,0);j>0&&(h[j]=h[j-1]);h[j]+=red(g)*qed(g);++j;p.c[p.c.length]=g}}return p} +function Wac(a){var b,c,d,e,f;d=BD(vNb(a,(Nyc(),mxc)),163);if(d==(Ctc(),ytc)){for(c=new Sr(ur(R_b(a).a.Kc(),new Sq));Qr(c);){b=BD(Rr(c),17);if(!Yac(b)){throw vbb(new y2c(Fne+P_b(a)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. "+'FIRST_SEPARATE nodes must not have incoming edges.'))}}}else if(d==Atc){for(f=new Sr(ur(U_b(a).a.Kc(),new Sq));Qr(f);){e=BD(Rr(f),17);if(!Yac(e)){throw vbb(new y2c(Fne+P_b(a)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. "+'LAST_SEPARATE nodes must not have outgoing edges.'))}}}} +function C9b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;Odd(b,'Label dummy removal',1);d=Edb(ED(vNb(a,(Nyc(),nyc))));e=Edb(ED(vNb(a,ryc)));j=BD(vNb(a,Lwc),103);for(i=new olb(a.b);i.a0&&iCc(a,h,l)}for(e=new olb(l);e.a>19!=0){b=hD(b);i=!i}g=_C(b);f=false;e=false;d=false;if(a.h==Gje&&a.m==0&&a.l==0){e=true;f=true;if(g==-1){a=SC((wD(),sD));d=true;i=!i}else{h=lD(a,g);i&&ZC(h);c&&(QC=TC(0,0,0));return h}}else if(a.h>>19!=0){f=true;a=hD(a);d=true;i=!i}if(g!=-1){return WC(a,g,i,f,c)}if(eD(a,b)<0){c&&(f?(QC=hD(a)):(QC=TC(a.l,a.m,a.h)));return TC(0,0,0)}return XC(d?a:TC(a.l,a.m,a.h),b,i,f,e,c)} +function F2c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;if(a.e&&a.c.cb.f||b.g>a.f){return}c=0;d=0;for(g=a.w.a.ec().Kc();g.Ob();){e=BD(g.Pb(),11);aRc(l7c(OC(GC(m1,1),nie,8,0,[e.i.n,e.n,e.a])).b,b.g,b.f)&&++c}for(h=a.r.a.ec().Kc();h.Ob();){e=BD(h.Pb(),11);aRc(l7c(OC(GC(m1,1),nie,8,0,[e.i.n,e.n,e.a])).b,b.g,b.f)&&--c}for(i=b.w.a.ec().Kc();i.Ob();){e=BD(i.Pb(),11);aRc(l7c(OC(GC(m1,1),nie,8,0,[e.i.n,e.n,e.a])).b,a.g,a.f)&&++d}for(f=b.r.a.ec().Kc();f.Ob();){e=BD(f.Pb(),11);aRc(l7c(OC(GC(m1,1),nie,8,0,[e.i.n,e.n,e.a])).b,a.g,a.f)&&--d}if(c=0){f=wid(b,c.substr(1,h-1));l=c.substr(h+1,j-(h+1));return pid(b,l,f)}}else{d=-1;Vcb==null&&(Vcb=new RegExp('\\d'));if(Vcb.test(String.fromCharCode(i))){d=lfb(c,wfb(46),j-1);if(d>=0){e=BD(hid(b,Bid(b,c.substr(1,d-1)),false),58);k=0;try{k=Icb(c.substr(d+1),Rie,Ohe)}catch(a){a=ubb(a);if(JD(a,127)){g=a;throw vbb(new rFd(g))}else throw vbb(a)}if(k=0){return c}switch($1d(q1d(a,c))){case 2:{if(dfb('',o1d(a,c.Hj()).ne())){i=b2d(q1d(a,c));h=a2d(q1d(a,c));k=r1d(a,b,i,h);if(k){return k}e=f1d(a,b);for(g=0,l=e.gc();g1){throw vbb(new Wdb(Hwe))}k=S6d(a.e.Tg(),b);d=BD(a.g,119);for(g=0;g1;for(j=new b1b(m.b);llb(j.a)||llb(j.b);){i=BD(llb(j.a)?mlb(j.a):mlb(j.b),17);l=i.c==m?i.d:i.c;$wnd.Math.abs(l7c(OC(GC(m1,1),nie,8,0,[l.i.n,l.n,l.a])).b-g.b)>1&&GNc(a,i,g,f,m)}}} +function XPc(a){var b,c,d,e,f,g;e=new Bib(a.e,0);d=new Bib(a.a,0);if(a.d){for(c=0;cOqe){f=b;g=0;while($wnd.Math.abs(b-f)0);e.a.Xb(e.c=--e.b);WPc(a,a.b-g,f,d,e);sCb(e.b0);d.a.Xb(d.c=--d.b)}if(!a.d){for(c=0;c0){a.f[k.p]=n/(k.e.c.length+k.g.c.length);a.c=$wnd.Math.min(a.c,a.f[k.p]);a.b=$wnd.Math.max(a.b,a.f[k.p])}else h&&(a.f[k.p]=n)}} +function $9d(a){a.b=null;a.bb=null;a.fb=null;a.qb=null;a.a=null;a.c=null;a.d=null;a.e=null;a.f=null;a.n=null;a.M=null;a.L=null;a.Q=null;a.R=null;a.K=null;a.db=null;a.eb=null;a.g=null;a.i=null;a.j=null;a.k=null;a.gb=null;a.o=null;a.p=null;a.q=null;a.r=null;a.$=null;a.ib=null;a.S=null;a.T=null;a.t=null;a.s=null;a.u=null;a.v=null;a.w=null;a.B=null;a.A=null;a.C=null;a.D=null;a.F=null;a.G=null;a.H=null;a.I=null;a.J=null;a.P=null;a.Z=null;a.U=null;a.V=null;a.W=null;a.X=null;a.Y=null;a._=null;a.ab=null;a.cb=null;a.hb=null;a.nb=null;a.lb=null;a.mb=null;a.ob=null;a.pb=null;a.jb=null;a.kb=null;a.N=false;a.O=false} +function l5b(a,b,c){var d,e,f,g;Odd(c,'Graph transformation ('+a.a+')',1);g=Mu(b.a);for(f=new olb(b.b);f.a0){a.a=i+(n-1)*f;b.c.b+=a.a;b.f.b+=a.a}}if(o.a.gc()!=0){m=new tPc(1,f);n=sPc(m,b,o,p,b.f.b+i-b.c.b);n>0&&(b.f.b+=i+(n-1)*f)}} +function kKd(a,b){var c,d,e,f;f=a.F;if(b==null){a.F=null;$Jd(a,null)}else{a.F=(uCb(b),b);d=hfb(b,wfb(60));if(d!=-1){e=b.substr(0,d);hfb(b,wfb(46))==-1&&!dfb(e,Khe)&&!dfb(e,Eve)&&!dfb(e,Fve)&&!dfb(e,Gve)&&!dfb(e,Hve)&&!dfb(e,Ive)&&!dfb(e,Jve)&&!dfb(e,Kve)&&(e=Lve);c=kfb(b,wfb(62));c!=-1&&(e+=''+b.substr(c+1));$Jd(a,e)}else{e=b;if(hfb(b,wfb(46))==-1){d=hfb(b,wfb(91));d!=-1&&(e=b.substr(0,d));if(!dfb(e,Khe)&&!dfb(e,Eve)&&!dfb(e,Fve)&&!dfb(e,Gve)&&!dfb(e,Hve)&&!dfb(e,Ive)&&!dfb(e,Jve)&&!dfb(e,Kve)){e=Lve;d!=-1&&(e+=''+b.substr(d))}else{e=b}}$Jd(a,e);e==b&&(a.F=a.D)}}(a.Db&4)!=0&&(a.Db&1)==0&&Uhd(a,new nSd(a,1,5,f,b))} +function AMc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;p=b.b.c.length;if(p<3){return}n=KC(WD,oje,25,p,15,1);l=0;for(k=new olb(b.b);k.ag)&&Qqb(a.b,BD(q.b,17))}}++h}f=g}}}} +function o5c(b,c){var d;if(c==null||dfb(c,Xhe)){return null}if(c.length==0&&b.k!=(_5c(),W5c)){return null}switch(b.k.g){case 1:return efb(c,kse)?(Bcb(),Acb):efb(c,lse)?(Bcb(),zcb):null;case 2:try{return meb(Icb(c,Rie,Ohe))}catch(a){a=ubb(a);if(JD(a,127)){return null}else throw vbb(a)}case 4:try{return Hcb(c)}catch(a){a=ubb(a);if(JD(a,127)){return null}else throw vbb(a)}case 3:return c;case 5:j5c(b);return m5c(b,c);case 6:j5c(b);return n5c(b,b.a,c);case 7:try{d=l5c(b);d.Jf(c);return d}catch(a){a=ubb(a);if(JD(a,32)){return null}else throw vbb(a)}default:throw vbb(new Zdb('Invalid type set for this layout option.'));}} +function JWb(a){AWb();var b,c,d,e,f,g,h;h=new CWb;for(c=new olb(a);c.a=h.b.c)&&(h.b=b);if(!h.c||b.c<=h.c.c){h.d=h.c;h.c=b}(!h.e||b.d>=h.e.d)&&(h.e=b);(!h.f||b.d<=h.f.d)&&(h.f=b)}d=new NWb((lWb(),hWb));rXb(a,yWb,new amb(OC(GC(bQ,1),Uhe,369,0,[d])));g=new NWb(kWb);rXb(a,xWb,new amb(OC(GC(bQ,1),Uhe,369,0,[g])));e=new NWb(iWb);rXb(a,wWb,new amb(OC(GC(bQ,1),Uhe,369,0,[e])));f=new NWb(jWb);rXb(a,vWb,new amb(OC(GC(bQ,1),Uhe,369,0,[f])));DWb(d.c,hWb);DWb(e.c,iWb);DWb(f.c,jWb);DWb(g.c,kWb);h.a.c=KC(SI,Uhe,1,0,5,1);Gkb(h.a,d.c);Gkb(h.a,Su(e.c));Gkb(h.a,f.c);Gkb(h.a,Su(g.c));return h} +function jxd(a){var b;switch(a.d){case 1:{if(a.hj()){return a.o!=-2}break}case 2:{if(a.hj()){return a.o==-2}break}case 3:case 5:case 4:case 6:case 7:{return a.o>-2}default:{return false}}b=a.gj();switch(a.p){case 0:return b!=null&&Ccb(DD(b))!=Kbb(a.k,0);case 1:return b!=null&&BD(b,217).a!=Tbb(a.k)<<24>>24;case 2:return b!=null&&BD(b,172).a!=(Tbb(a.k)&aje);case 6:return b!=null&&Kbb(BD(b,162).a,a.k);case 5:return b!=null&&BD(b,19).a!=Tbb(a.k);case 7:return b!=null&&BD(b,184).a!=Tbb(a.k)<<16>>16;case 3:return b!=null&&Edb(ED(b))!=a.j;case 4:return b!=null&&BD(b,155).a!=a.j;default:return b==null?a.n!=null:!pb(b,a.n);}} +function nOd(a,b,c){var d,e,f,g;if(a.Fk()&&a.Ek()){g=oOd(a,BD(c,56));if(PD(g)!==PD(c)){a.Oi(b);a.Ui(b,pOd(a,b,g));if(a.rk()){f=(e=BD(c,49),a.Dk()?a.Bk()?e.ih(a.b,zUd(BD(XKd(wjd(a.b),a.aj()),18)).n,BD(XKd(wjd(a.b),a.aj()).Yj(),26).Bj(),null):e.ih(a.b,bLd(e.Tg(),zUd(BD(XKd(wjd(a.b),a.aj()),18))),null,null):e.ih(a.b,-1-a.aj(),null,null));!BD(g,49).eh()&&(f=(d=BD(g,49),a.Dk()?a.Bk()?d.gh(a.b,zUd(BD(XKd(wjd(a.b),a.aj()),18)).n,BD(XKd(wjd(a.b),a.aj()).Yj(),26).Bj(),f):d.gh(a.b,bLd(d.Tg(),zUd(BD(XKd(wjd(a.b),a.aj()),18))),null,f):d.gh(a.b,-1-a.aj(),null,f)));!!f&&f.Fi()}oid(a.b)&&a.$i(a.Zi(9,c,g,b,false));return g}}return c} +function Noc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;k=Edb(ED(vNb(a,(Nyc(),oyc))));d=Edb(ED(vNb(a,Cyc)));m=new _fd;yNb(m,oyc,k+d);j=b;r=j.d;p=j.c.i;s=j.d.i;q=G1b(p.c);t=G1b(s.c);e=new Rkb;for(l=q;l<=t;l++){h=new b0b(a);__b(h,(j0b(),g0b));yNb(h,(wtc(),$sc),j);yNb(h,Vxc,(dcd(),$bd));yNb(h,qyc,m);n=BD(Ikb(a.b,l),29);l==q?Z_b(h,n.a.c.length-c,n):$_b(h,n);u=Edb(ED(vNb(j,Zwc)));if(u<0){u=0;yNb(j,Zwc,u)}h.o.b=u;o=$wnd.Math.floor(u/2);g=new H0b;G0b(g,(Ucd(),Tcd));F0b(g,h);g.n.b=o;i=new H0b;G0b(i,zcd);F0b(i,h);i.n.b=o;RZb(j,g);f=new UZb;tNb(f,j);yNb(f,jxc,null);QZb(f,i);RZb(f,r);Ooc(h,j,f);e.c[e.c.length]=f;j=f}return e} +function sbc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;i=BD(Y_b(a,(Ucd(),Tcd)).Kc().Pb(),11).e;n=BD(Y_b(a,zcd).Kc().Pb(),11).g;h=i.c.length;t=A0b(BD(Ikb(a.j,0),11));while(h-->0){p=(tCb(0,i.c.length),BD(i.c[0],17));e=(tCb(0,n.c.length),BD(n.c[0],17));s=e.d.e;f=Jkb(s,e,0);SZb(p,e.d,f);QZb(e,null);RZb(e,null);o=p.a;b&&Dsb(o,new g7c(t));for(d=Jsb(e.a,0);d.b!=d.d.c;){c=BD(Xsb(d),8);Dsb(o,new g7c(c))}r=p.b;for(m=new olb(e.b);m.a0&&(g=$wnd.Math.max(g,IJb(a.C.b+d.d.b,e)))}else{n=m+k.d.c+a.w+d.d.b;g=$wnd.Math.max(g,(Iy(),My(ple),$wnd.Math.abs(l-e)<=ple||l==e||isNaN(l)&&isNaN(e)?0:n/(e-l)))}k=d;l=e;m=f}if(!!a.C&&a.C.c>0){n=m+a.C.c;j&&(n+=k.d.c);g=$wnd.Math.max(g,(Iy(),My(ple),$wnd.Math.abs(l-1)<=ple||l==1||isNaN(l)&&isNaN(1)?0:n/(1-l)))}c.n.b=0;c.a.a=g} +function NKb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n;c=BD(Mpb(a.b,b),124);i=BD(BD(Qc(a.r,b),21),84);if(i.dc()){c.n.d=0;c.n.a=0;return}j=a.u.Hc((rcd(),ncd));g=0;a.A.Hc((tdd(),sdd))&&SKb(a,b);h=i.Kc();k=null;m=0;l=0;while(h.Ob()){d=BD(h.Pb(),111);f=Edb(ED(d.b.We((CKb(),BKb))));e=d.b.rf().b;if(!k){!!a.C&&a.C.d>0&&(g=$wnd.Math.max(g,IJb(a.C.d+d.d.d,f)))}else{n=l+k.d.a+a.w+d.d.d;g=$wnd.Math.max(g,(Iy(),My(ple),$wnd.Math.abs(m-f)<=ple||m==f||isNaN(m)&&isNaN(f)?0:n/(f-m)))}k=d;m=f;l=e}if(!!a.C&&a.C.a>0){n=l+a.C.a;j&&(n+=k.d.a);g=$wnd.Math.max(g,(Iy(),My(ple),$wnd.Math.abs(m-1)<=ple||m==1||isNaN(m)&&isNaN(1)?0:n/(1-m)))}c.n.d=0;c.a.b=g} +function _Ec(a,b,c){var d,e,f,g,h,i;this.g=a;h=b.d.length;i=c.d.length;this.d=KC(OQ,kne,10,h+i,0,1);for(g=0;g0?ZEc(this,this.f/this.a):REc(b.g,b.d[0]).a!=null&&REc(c.g,c.d[0]).a!=null?ZEc(this,(Edb(REc(b.g,b.d[0]).a)+Edb(REc(c.g,c.d[0]).a))/2):REc(b.g,b.d[0]).a!=null?ZEc(this,REc(b.g,b.d[0]).a):REc(c.g,c.d[0]).a!=null&&ZEc(this,REc(c.g,c.d[0]).a)} +function BUb(a,b){var c,d,e,f,g,h,i,j,k,l;a.a=new dVb(oqb(t1));for(d=new olb(b.a);d.a=1){if(q-g>0&&l>=0){i.n.a+=p;i.n.b+=f*g}else if(q-g<0&&k>=0){i.n.a+=p*q;i.n.b+=f}}}a.o.a=b.a;a.o.b=b.b;yNb(a,(Nyc(),Fxc),(tdd(),d=BD(gdb(I1),9),new xqb(d,BD(_Bb(d,d.length),9),0)))} +function iFd(a,b,c,d,e,f){var g;if(!(b==null||!OEd(b,zEd,AEd))){throw vbb(new Wdb('invalid scheme: '+b))}if(!a&&!(c!=null&&hfb(c,wfb(35))==-1&&c.length>0&&(BCb(0,c.length),c.charCodeAt(0)!=47))){throw vbb(new Wdb('invalid opaquePart: '+c))}if(a&&!(b!=null&&hnb(GEd,b.toLowerCase()))&&!(c==null||!OEd(c,CEd,DEd))){throw vbb(new Wdb(mve+c))}if(a&&b!=null&&hnb(GEd,b.toLowerCase())&&!eFd(c)){throw vbb(new Wdb(mve+c))}if(!fFd(d)){throw vbb(new Wdb('invalid device: '+d))}if(!hFd(e)){g=e==null?'invalid segments: null':'invalid segment: '+VEd(e);throw vbb(new Wdb(g))}if(!(f==null||hfb(f,wfb(35))==-1)){throw vbb(new Wdb('invalid query: '+f))}} +function nVc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;Odd(b,'Calculate Graph Size',1);b.n&&!!a&&Tdd(b,i6d(a),(pgd(),mgd));h=dme;i=dme;f=ere;g=ere;for(l=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));l.e!=l.i.gc();){j=BD(Dyd(l),33);o=j.i;p=j.j;r=j.g;d=j.f;e=BD(hkd(j,(Y9c(),S8c)),142);h=$wnd.Math.min(h,o-e.b);i=$wnd.Math.min(i,p-e.d);f=$wnd.Math.max(f,o+r+e.c);g=$wnd.Math.max(g,p+d+e.a)}n=BD(hkd(a,(Y9c(),f9c)),116);m=new f7c(h-n.b,i-n.d);for(k=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));k.e!=k.i.gc();){j=BD(Dyd(k),33);dld(j,j.i-m.a);eld(j,j.j-m.b)}q=f-h+(n.b+n.c);c=g-i+(n.d+n.a);cld(a,q);ald(a,c);b.n&&!!a&&Tdd(b,i6d(a),(pgd(),mgd))} +function rGb(a){var b,c,d,e,f,g,h,i,j,k;d=new Rkb;for(g=new olb(a.e.a);g.a0){gA(a,c,0);c.a+=String.fromCharCode(d);e=lA(b,f);gA(a,c,e);f+=e-1;continue}if(d==39){if(f+11){p=KC(WD,oje,25,a.b.b.c.length,15,1);l=0;for(j=new olb(a.b.b);j.a=h&&e<=i){if(h<=e&&f<=i){c[k++]=e;c[k++]=f;d+=2}else if(h<=e){c[k++]=e;c[k++]=i;a.b[d]=i+1;g+=2}else if(f<=i){c[k++]=h;c[k++]=f;d+=2}else{c[k++]=h;c[k++]=i;a.b[d]=i+1}}else if(iQie)&&h<10);zVb(a.c,new _Ub);OUb(a);vVb(a.c);yUb(a.f)} +function sZb(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(!Ccb(DD(vNb(c,(Nyc(),fxc))))){return}for(h=new olb(c.j);h.a=2){i=Jsb(c,0);g=BD(Xsb(i),8);h=BD(Xsb(i),8);while(h.a0&&jEb(j,true,(ead(),bad));h.k==(j0b(),e0b)&&kEb(j);Rhb(a.f,h,b)}}} +function Bbc(a,b,c){var d,e,f,g,h,i,j,k,l,m;Odd(c,'Node promotion heuristic',1);a.g=b;Abc(a);a.q=BD(vNb(b,(Nyc(),rxc)),260);k=BD(vNb(a.g,qxc),19).a;f=new Jbc;switch(a.q.g){case 2:case 1:Dbc(a,f);break;case 3:a.q=(kAc(),jAc);Dbc(a,f);i=0;for(h=new olb(a.a);h.aa.j){a.q=dAc;Dbc(a,f)}break;case 4:a.q=(kAc(),jAc);Dbc(a,f);j=0;for(e=new olb(a.b);e.aa.k){a.q=gAc;Dbc(a,f)}break;case 6:m=QD($wnd.Math.ceil(a.f.length*k/100));Dbc(a,new Mbc(m));break;case 5:l=QD($wnd.Math.ceil(a.d*k/100));Dbc(a,new Pbc(l));break;default:Dbc(a,f);}Ebc(a,b);Qdd(c)} +function fFc(a,b,c){var d,e,f,g;this.j=a;this.e=WZb(a);this.o=this.j.e;this.i=!!this.o;this.p=this.i?BD(Ikb(c,Q_b(this.o).p),214):null;e=BD(vNb(a,(wtc(),Ksc)),21);this.g=e.Hc((Orc(),Hrc));this.b=new Rkb;this.d=new rHc(this.e);g=BD(vNb(this.j,jtc),230);this.q=wFc(b,g,this.e);this.k=new BGc(this);f=Ou(OC(GC(qY,1),Uhe,225,0,[this,this.d,this.k,this.q]));if(b==(rGc(),oGc)&&!Ccb(DD(vNb(a,(Nyc(),Awc))))){d=new SEc(this.e);f.c[f.c.length]=d;this.c=new uEc(d,g,BD(this.q,402))}else if(b==oGc&&Ccb(DD(vNb(a,(Nyc(),Awc))))){d=new SEc(this.e);f.c[f.c.length]=d;this.c=new XGc(d,g,BD(this.q,402))}else{this.c=new Oic(b,this)}Ekb(f,this.c);$Ic(f,this.e);this.s=AGc(this.k)} +function xUc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;l=BD(pr((g=Jsb((new ZRc(b)).a.d,0),new aSc(g))),86);o=l?BD(vNb(l,(mTc(),_Sc)),86):null;e=1;while(!!l&&!!o){i=0;u=0;c=l;d=o;for(h=0;h=a.i){++a.i;Ekb(a.a,meb(1));Ekb(a.b,k)}else{d=a.c[b.p][1];Nkb(a.a,j,meb(BD(Ikb(a.a,j),19).a+1-d));Nkb(a.b,j,Edb(ED(Ikb(a.b,j)))+k-d*a.e)}(a.q==(kAc(),dAc)&&(BD(Ikb(a.a,j),19).a>a.j||BD(Ikb(a.a,j-1),19).a>a.j)||a.q==gAc&&(Edb(ED(Ikb(a.b,j)))>a.k||Edb(ED(Ikb(a.b,j-1)))>a.k))&&(i=false);for(g=new Sr(ur(R_b(b).a.Kc(),new Sq));Qr(g);){f=BD(Rr(g),17);h=f.c.i;if(a.f[h.p]==j){l=Cbc(a,h);e=e+BD(l.a,19).a;i=i&&Ccb(DD(l.b))}}a.f[b.p]=j;e=e+a.c[b.p][0];return new vgd(meb(e),(Bcb(),i?true:false))} +function sPc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r;l=new Lqb;g=new Rkb;qPc(a,c,a.d.fg(),g,l);qPc(a,d,a.d.gg(),g,l);a.b=0.2*(p=rPc(LAb(new YAb(null,new Kub(g,16)),new xPc)),q=rPc(LAb(new YAb(null,new Kub(g,16)),new zPc)),$wnd.Math.min(p,q));f=0;for(h=0;h=2&&(r=WNc(g,true,m),!a.e&&(a.e=new ZOc(a)),VOc(a.e,r,g,a.b),undefined);uPc(g,m);wPc(g);n=-1;for(k=new olb(g);k.ah} +function k6b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=BD(vNb(a,(Nyc(),Vxc)),98);g=a.f;f=a.d;h=g.a+f.b+f.c;i=0-f.d-a.c.b;k=g.b+f.d+f.a-a.c.b;j=new Rkb;l=new Rkb;for(e=new olb(b);e.a0),BD(k.a.Xb(k.c=--k.b),17));while(f!=d&&k.b>0){a.a[f.p]=true;a.a[d.p]=true;f=(sCb(k.b>0),BD(k.a.Xb(k.c=--k.b),17))}k.b>0&&uib(k)}}}} +function Vmd(b,c,d){var e,f,g,h,i,j,k,l,m;if(b.a!=c.Aj()){throw vbb(new Wdb(tte+c.ne()+ute))}e=o1d((O6d(),M6d),c).$k();if(e){return e.Aj().Nh().Ih(e,d)}h=o1d(M6d,c).al();if(h){if(d==null){return null}i=BD(d,15);if(i.dc()){return ''}m=new Hfb;for(g=i.Kc();g.Ob();){f=g.Pb();Efb(m,h.Aj().Nh().Ih(h,f));m.a+=' '}return lcb(m,m.a.length-1)}l=o1d(M6d,c).bl();if(!l.dc()){for(k=l.Kc();k.Ob();){j=BD(k.Pb(),148);if(j.wj(d)){try{m=j.Aj().Nh().Ih(j,d);if(m!=null){return m}}catch(a){a=ubb(a);if(!JD(a,102))throw vbb(a)}}}throw vbb(new Wdb("Invalid value: '"+d+"' for datatype :"+c.ne()))}BD(c,834).Fj();return d==null?null:JD(d,172)?''+BD(d,172).a:rb(d)==$J?CQd(Pmd[0],BD(d,199)):fcb(d)} +function zQc(a){var b,c,d,e,f,g,h,i,j,k;j=new Psb;h=new Psb;for(f=new olb(a);f.a-1){for(e=Jsb(h,0);e.b!=e.d.c;){d=BD(Xsb(e),128);d.v=g}while(h.b!=0){d=BD(Vt(h,0),128);for(c=new olb(d.i);c.a0){c+=i.n.a+i.o.a/2;++l}for(o=new olb(i.j);o.a0&&(c/=l);r=KC(UD,Vje,25,d.a.c.length,15,1);h=0;for(j=new olb(d.a);j.a=h&&e<=i){if(h<=e&&f<=i){d+=2}else if(h<=e){a.b[d]=i+1;g+=2}else if(f<=i){c[k++]=e;c[k++]=h-1;d+=2}else{c[k++]=e;c[k++]=h-1;a.b[d]=i+1;g+=2}}else if(i0?(e-=86400000):(e+=86400000);i=new gB(wbb(Cbb(b.q.getTime()),e))}k=new Vfb;j=a.a.length;for(f=0;f=97&&d<=122||d>=65&&d<=90){for(g=f+1;g=j){throw vbb(new Wdb("Missing trailing '"))}g+10&&c.c==0){!b&&(b=new Rkb);b.c[b.c.length]=c}}if(b){while(b.c.length!=0){c=BD(Kkb(b,0),233);if(!!c.b&&c.b.c.length>0){for(f=(!c.b&&(c.b=new Rkb),new olb(c.b));f.aJkb(a,c,0)){return new vgd(e,c)}}else if(Edb(REc(e.g,e.d[0]).a)>Edb(REc(c.g,c.d[0]).a)){return new vgd(e,c)}}}for(h=(!c.e&&(c.e=new Rkb),c.e).Kc();h.Ob();){g=BD(h.Pb(),233);i=(!g.b&&(g.b=new Rkb),g.b);wCb(0,i.c.length);aCb(i.c,0,c);g.c==i.c.length&&(b.c[b.c.length]=g,true)}}}return null} +function wlb(a,b){var c,d,e,f,g,h,i,j,k;if(a==null){return Xhe}i=b.a.zc(a,b);if(i!=null){return '[...]'}c=new xwb(She,'[',']');for(e=a,f=0,g=e.length;f=14&&k<=16))){if(b.a._b(d)){!c.a?(c.a=new Wfb(c.d)):Qfb(c.a,c.b);Nfb(c.a,'[...]')}else{h=CD(d);j=new Vqb(b);uwb(c,wlb(h,j))}}else JD(d,177)?uwb(c,Xlb(BD(d,177))):JD(d,190)?uwb(c,Qlb(BD(d,190))):JD(d,195)?uwb(c,Rlb(BD(d,195))):JD(d,2012)?uwb(c,Wlb(BD(d,2012))):JD(d,48)?uwb(c,Ulb(BD(d,48))):JD(d,364)?uwb(c,Vlb(BD(d,364))):JD(d,832)?uwb(c,Tlb(BD(d,832))):JD(d,104)&&uwb(c,Slb(BD(d,104)))}else{uwb(c,d==null?Xhe:fcb(d))}}return !c.a?c.c:c.e.length==0?c.a.a:c.a.a+(''+c.e)} +function xQb(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;h=itd(b,false,false);r=ofd(h);d&&(r=w7c(r));t=Edb(ED(hkd(b,(CPb(),vPb))));q=(sCb(r.b!=0),BD(r.a.a.c,8));l=BD(Ut(r,1),8);if(r.b>2){k=new Rkb;Gkb(k,new Jib(r,1,r.b));f=sQb(k,t+a.a);s=new XOb(f);tNb(s,b);c.c[c.c.length]=s}else{d?(s=BD(Ohb(a.b,jtd(b)),266)):(s=BD(Ohb(a.b,ltd(b)),266))}i=jtd(b);d&&(i=ltd(b));g=zQb(q,i);j=t+a.a;if(g.a){j+=$wnd.Math.abs(q.b-l.b);p=new f7c(l.a,(l.b+q.b)/2)}else{j+=$wnd.Math.abs(q.a-l.a);p=new f7c((l.a+q.a)/2,l.b)}d?Rhb(a.d,b,new ZOb(s,g,p,j)):Rhb(a.c,b,new ZOb(s,g,p,j));Rhb(a.b,b,s);o=(!b.n&&(b.n=new cUd(D2,b,1,7)),b.n);for(n=new Fyd(o);n.e!=n.i.gc();){m=BD(Dyd(n),137);e=wQb(a,m,true,0,0);c.c[c.c.length]=e}} +function wPc(a){var b,c,d,e,f,g,h,i,j,k;j=new Rkb;h=new Rkb;for(g=new olb(a);g.a-1){for(f=new olb(h);f.a0){continue}rOc(i,$wnd.Math.min(i.o,e.o-1));qOc(i,i.i-1);i.i==0&&(h.c[h.c.length]=i,true)}}}} +function QQd(a,b,c){var d,e,f,g,h,i,j;j=a.c;!b&&(b=FQd);a.c=b;if((a.Db&4)!=0&&(a.Db&1)==0){i=new nSd(a,1,2,j,a.c);!c?(c=i):c.Ei(i)}if(j!=b){if(JD(a.Cb,284)){if(a.Db>>16==-10){c=BD(a.Cb,284).nk(b,c)}else if(a.Db>>16==-15){!b&&(b=(jGd(),YFd));!j&&(j=(jGd(),YFd));if(a.Cb.nh()){i=new pSd(a.Cb,1,13,j,b,HLd(QSd(BD(a.Cb,59)),a),false);!c?(c=i):c.Ei(i)}}}else if(JD(a.Cb,88)){if(a.Db>>16==-23){JD(b,88)||(b=(jGd(),_Fd));JD(j,88)||(j=(jGd(),_Fd));if(a.Cb.nh()){i=new pSd(a.Cb,1,10,j,b,HLd(VKd(BD(a.Cb,26)),a),false);!c?(c=i):c.Ei(i)}}}else if(JD(a.Cb,444)){h=BD(a.Cb,836);g=(!h.b&&(h.b=new RYd(new NYd)),h.b);for(f=(d=new nib((new eib(g.a)).a),new ZYd(d));f.a.b;){e=BD(lib(f.a).cd(),87);c=QQd(e,MQd(e,h),c)}}}return c} +function O1b(a,b){var c,d,e,f,g,h,i,j,k,l,m;g=Ccb(DD(hkd(a,(Nyc(),fxc))));m=BD(hkd(a,Yxc),21);i=false;j=false;l=new Fyd((!a.c&&(a.c=new cUd(F2,a,9,9)),a.c));while(l.e!=l.i.gc()&&(!i||!j)){f=BD(Dyd(l),118);h=0;for(e=ul(pl(OC(GC(KI,1),Uhe,20,0,[(!f.d&&(f.d=new y5d(B2,f,8,5)),f.d),(!f.e&&(f.e=new y5d(B2,f,7,4)),f.e)])));Qr(e);){d=BD(Rr(e),79);k=g&&Qld(d)&&Ccb(DD(hkd(d,gxc)));c=ELd((!d.b&&(d.b=new y5d(z2,d,4,7)),d.b),f)?a==Xod(atd(BD(qud((!d.c&&(d.c=new y5d(z2,d,5,8)),d.c),0),82))):a==Xod(atd(BD(qud((!d.b&&(d.b=new y5d(z2,d,4,7)),d.b),0),82)));if(k||c){++h;if(h>1){break}}}h>0?(i=true):m.Hc((rcd(),ncd))&&(!f.n&&(f.n=new cUd(D2,f,1,7)),f.n).i>0&&(i=true);h>1&&(j=true)}i&&b.Fc((Orc(),Hrc));j&&b.Fc((Orc(),Irc))} +function zfd(a){var b,c,d,e,f,g,h,i,j,k,l,m;m=BD(hkd(a,(Y9c(),Y8c)),21);if(m.dc()){return null}h=0;g=0;if(m.Hc((tdd(),rdd))){k=BD(hkd(a,t9c),98);d=2;c=2;e=2;f=2;b=!Xod(a)?BD(hkd(a,z8c),103):BD(hkd(Xod(a),z8c),103);for(j=new Fyd((!a.c&&(a.c=new cUd(F2,a,9,9)),a.c));j.e!=j.i.gc();){i=BD(Dyd(j),118);l=BD(hkd(i,A9c),61);if(l==(Ucd(),Scd)){l=lfd(i,b);jkd(i,A9c,l)}if(k==(dcd(),$bd)){switch(l.g){case 1:d=$wnd.Math.max(d,i.i+i.g);break;case 2:c=$wnd.Math.max(c,i.j+i.f);break;case 3:e=$wnd.Math.max(e,i.i+i.g);break;case 4:f=$wnd.Math.max(f,i.j+i.f);}}else{switch(l.g){case 1:d+=i.g+2;break;case 2:c+=i.f+2;break;case 3:e+=i.g+2;break;case 4:f+=i.f+2;}}}h=$wnd.Math.max(d,e);g=$wnd.Math.max(c,f)}return Afd(a,h,g,true,true)} +function lnc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;s=BD(GAb(VAb(JAb(new YAb(null,new Kub(b.d,16)),new pnc(c)),new rnc(c)),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Dyb)]))),15);l=Ohe;k=Rie;for(i=new olb(b.b.j);i.a0;if(j){if(j){m=r.p;g?++m:--m;l=BD(Ikb(r.c.a,m),10);d=I4b(l);n=!(s6c(d,w,c[0])||n6c(d,w,c[0]))}}else{n=true}}o=false;v=b.D.i;if(!!v&&!!v.c&&h.e){k=g&&v.p>0||!g&&v.p0&&(b.a+=She,b);yfd(BD(Dyd(h),160),b)}b.a+=gne;i=new Oyd((!d.c&&(d.c=new y5d(z2,d,5,8)),d.c));while(i.e!=i.i.gc()){i.e>0&&(b.a+=She,b);yfd(BD(Dyd(i),160),b)}b.a+=')'}}} +function y2b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;f=BD(vNb(a,(wtc(),$sc)),79);if(!f){return}d=a.a;e=new g7c(c);P6c(e,C2b(a));if(f_b(a.d.i,a.c.i)){m=a.c;l=l7c(OC(GC(m1,1),nie,8,0,[m.n,m.a]));c7c(l,c)}else{l=A0b(a.c)}Gsb(d,l,d.a,d.a.a);n=A0b(a.d);vNb(a,utc)!=null&&P6c(n,BD(vNb(a,utc),8));Gsb(d,n,d.c.b,d.c);q7c(d,e);g=itd(f,true,true);kmd(g,BD(qud((!f.b&&(f.b=new y5d(z2,f,4,7)),f.b),0),82));lmd(g,BD(qud((!f.c&&(f.c=new y5d(z2,f,5,8)),f.c),0),82));ifd(d,g);for(k=new olb(a.b);k.a=0){i=null;h=new Bib(k.a,j+1);while(h.bg?1:Ny(isNaN(0),isNaN(g)))<0&&(null,My(Jqe),($wnd.Math.abs(g-1)<=Jqe||g==1||isNaN(g)&&isNaN(1)?0:g<1?-1:g>1?1:Ny(isNaN(g),isNaN(1)))<0)&&(null,My(Jqe),($wnd.Math.abs(0-h)<=Jqe||0==h||isNaN(0)&&isNaN(h)?0:0h?1:Ny(isNaN(0),isNaN(h)))<0)&&(null,My(Jqe),($wnd.Math.abs(h-1)<=Jqe||h==1||isNaN(h)&&isNaN(1)?0:h<1?-1:h>1?1:Ny(isNaN(h),isNaN(1)))<0));return f} +function z6d(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;for(l=new usb(new nsb(a));l.b!=l.c.a.d;){k=tsb(l);h=BD(k.d,56);b=BD(k.e,56);g=h.Tg();for(p=0,u=(g.i==null&&TKd(g),g.i).length;p=0&&p=j.c.c.length?(k=JJc((j0b(),h0b),g0b)):(k=JJc((j0b(),g0b),g0b));k*=2;f=c.a.g;c.a.g=$wnd.Math.max(f,f+(k-f));g=c.b.g;c.b.g=$wnd.Math.max(g,g+(k-g));e=b}}} +function VNc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;v=Hx(a);k=new Rkb;h=a.c.length;l=h-1;m=h+1;while(v.a.c!=0){while(c.b!=0){t=(sCb(c.b!=0),BD(Nsb(c,c.a.a),112));Jwb(v.a,t)!=null;t.g=l--;YNc(t,b,c,d)}while(b.b!=0){u=(sCb(b.b!=0),BD(Nsb(b,b.a.a),112));Jwb(v.a,u)!=null;u.g=m++;YNc(u,b,c,d)}j=Rie;for(r=(g=new Ywb((new cxb((new Gjb(v.a)).a)).b),new Njb(g));sib(r.a.a);){q=(f=Wwb(r.a),BD(f.cd(),112));if(!d&&q.b>0&&q.a<=0){k.c=KC(SI,Uhe,1,0,5,1);k.c[k.c.length]=q;break}p=q.i-q.d;if(p>=j){if(p>j){k.c=KC(SI,Uhe,1,0,5,1);j=p}k.c[k.c.length]=q}}if(k.c.length!=0){i=BD(Ikb(k,Bub(e,k.c.length)),112);Jwb(v.a,i)!=null;i.g=m++;YNc(i,b,c,d);k.c=KC(SI,Uhe,1,0,5,1)}}s=a.c.length+1;for(o=new olb(a);o.a0){m.d+=k.n.d;m.d+=k.d}if(m.a>0){m.a+=k.n.a;m.a+=k.d}if(m.b>0){m.b+=k.n.b;m.b+=k.d}if(m.c>0){m.c+=k.n.c;m.c+=k.d}return m} +function d6b(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o;m=c.d;l=c.c;f=new f7c(c.f.a+c.d.b+c.d.c,c.f.b+c.d.d+c.d.a);g=f.b;for(j=new olb(a.a);j.a0){a.c[b.c.p][b.p].d+=Cub(a.i,24)*lke*0.07000000029802322-0.03500000014901161;a.c[b.c.p][b.p].a=a.c[b.c.p][b.p].d/a.c[b.c.p][b.p].b}} +function m5b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;for(o=new olb(a);o.ad.d;d.d=$wnd.Math.max(d.d,b);if(h&&c){d.d=$wnd.Math.max(d.d,d.a);d.a=d.d+e}break;case 3:c=b>d.a;d.a=$wnd.Math.max(d.a,b);if(h&&c){d.a=$wnd.Math.max(d.a,d.d);d.d=d.a+e}break;case 2:c=b>d.c;d.c=$wnd.Math.max(d.c,b);if(h&&c){d.c=$wnd.Math.max(d.b,d.c);d.b=d.c+e}break;case 4:c=b>d.b;d.b=$wnd.Math.max(d.b,b);if(h&&c){d.b=$wnd.Math.max(d.b,d.c);d.c=d.b+e}}}}} +function l3b(a){var b,c,d,e,f,g,h,i,j,k,l;for(j=new olb(a);j.a0||k.j==Tcd&&k.e.c.length-k.g.c.length<0)){b=false;break}for(e=new olb(k.g);e.a=j&&v>=q){m+=o.n.b+p.n.b+p.a.b-u;++h}}}}if(c){for(g=new olb(s.e);g.a=j&&v>=q){m+=o.n.b+p.n.b+p.a.b-u;++h}}}}}if(h>0){w+=m/h;++n}}if(n>0){b.a=e*w/n;b.g=n}else{b.a=0;b.g=0}} +function oMc(a,b){var c,d,e,f,g,h,i,j,k,l,m;for(e=new olb(a.a.b);e.aQje||b.o==cMc&&k0&&dld(r,u*w);v>0&&eld(r,v*A)}stb(a.b,new CQb);b=new Rkb;for(h=new nib((new eib(a.c)).a);h.b;){g=lib(h);d=BD(g.cd(),79);c=BD(g.dd(),395).a;e=itd(d,false,false);l=oQb(jtd(d),ofd(e),c);ifd(l,e);t=ktd(d);if(!!t&&Jkb(b,t,0)==-1){b.c[b.c.length]=t;pQb(t,(sCb(l.b!=0),BD(l.a.a.c,8)),c)}}for(q=new nib((new eib(a.d)).a);q.b;){p=lib(q);d=BD(p.cd(),79);c=BD(p.dd(),395).a;e=itd(d,false,false);l=oQb(ltd(d),w7c(ofd(e)),c);l=w7c(l);ifd(l,e);t=mtd(d);if(!!t&&Jkb(b,t,0)==-1){b.c[b.c.length]=t;pQb(t,(sCb(l.b!=0),BD(l.c.b.c,8)),c)}}} +function _Vc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;if(c.c.length!=0){o=new Rkb;for(n=new olb(c);n.a1){n=new ZQc(o,t,d);reb(t,new PQc(a,n));g.c[g.c.length]=n;for(l=t.a.ec().Kc();l.Ob();){k=BD(l.Pb(),46);Lkb(f,k.b)}}if(h.a.gc()>1){n=new ZQc(o,h,d);reb(h,new RQc(a,n));g.c[g.c.length]=n;for(l=h.a.ec().Kc();l.Ob();){k=BD(l.Pb(),46);Lkb(f,k.b)}}}} +function $Wc(a){r4c(a,new E3c(L3c(P3c(M3c(O3c(N3c(new R3c,sre),'ELK Radial'),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new bXc),sre)));p4c(a,sre,uqe,Ksd(UWc));p4c(a,sre,wme,Ksd(XWc));p4c(a,sre,Fme,Ksd(NWc));p4c(a,sre,Tme,Ksd(OWc));p4c(a,sre,Eme,Ksd(PWc));p4c(a,sre,Gme,Ksd(MWc));p4c(a,sre,Dme,Ksd(QWc));p4c(a,sre,Hme,Ksd(TWc));p4c(a,sre,ore,Ksd(KWc));p4c(a,sre,nre,Ksd(LWc));p4c(a,sre,rre,Ksd(RWc));p4c(a,sre,lre,Ksd(SWc));p4c(a,sre,mre,Ksd(VWc));p4c(a,sre,pre,Ksd(WWc));p4c(a,sre,qre,Ksd(YWc))} +function LIb(a){var b;this.r=Cy(new OIb,new SIb);this.b=new Rpb(BD(Qb(F1),290));this.p=new Rpb(BD(Qb(F1),290));this.i=new Rpb(BD(Qb(DN),290));this.e=a;this.o=new g7c(a.rf());this.D=a.Df()||Ccb(DD(a.We((Y9c(),M8c))));this.A=BD(a.We((Y9c(),Y8c)),21);this.B=BD(a.We(b9c),21);this.q=BD(a.We(t9c),98);this.u=BD(a.We(x9c),21);if(!ucd(this.u)){throw vbb(new y2c('Invalid port label placement: '+this.u))}this.v=Ccb(DD(a.We(z9c)));this.j=BD(a.We(W8c),21);if(!Jbd(this.j)){throw vbb(new y2c('Invalid node label placement: '+this.j))}this.n=BD(bgd(a,U8c),116);this.k=Edb(ED(bgd(a,Q9c)));this.d=Edb(ED(bgd(a,P9c)));this.w=Edb(ED(bgd(a,X9c)));this.s=Edb(ED(bgd(a,R9c)));this.t=Edb(ED(bgd(a,S9c)));this.C=BD(bgd(a,V9c),142);this.c=2*this.d;b=!this.B.Hc((Idd(),zdd));this.f=new mIb(0,b,0);this.g=new mIb(1,b,0);lIb(this.f,(gHb(),eHb),this.g)} +function Lgd(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;t=0;o=0;n=0;m=1;for(s=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));s.e!=s.i.gc();){q=BD(Dyd(s),33);m+=sr(new Sr(ur(_sd(q).a.Kc(),new Sq)));B=q.g;o=$wnd.Math.max(o,B);l=q.f;n=$wnd.Math.max(n,l);t+=B*l}p=(!a.a&&(a.a=new cUd(E2,a,10,11)),a.a).i;g=t+2*d*d*m*p;f=$wnd.Math.sqrt(g);i=$wnd.Math.max(f*c,o);h=$wnd.Math.max(f/c,n);for(r=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));r.e!=r.i.gc();){q=BD(Dyd(r),33);C=e.b+(Cub(b,26)*ike+Cub(b,27)*jke)*(i-q.g);D=e.b+(Cub(b,26)*ike+Cub(b,27)*jke)*(h-q.f);dld(q,C);eld(q,D)}A=i+(e.b+e.c);w=h+(e.d+e.a);for(v=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));v.e!=v.i.gc();){u=BD(Dyd(v),33);for(k=new Sr(ur(_sd(u).a.Kc(),new Sq));Qr(k);){j=BD(Rr(k),79);Pld(j)||Kgd(j,b,A,w)}}A+=e.b+e.c;w+=e.d+e.a;Afd(a,A,w,false,true)} +function Jcb(a){var b,c,d,e,f,g,h,i,j,k,l;if(a==null){throw vbb(new Oeb(Xhe))}j=a;f=a.length;i=false;if(f>0){b=(BCb(0,a.length),a.charCodeAt(0));if(b==45||b==43){a=a.substr(1);--f;i=b==45}}if(f==0){throw vbb(new Oeb(Oje+j+'"'))}while(a.length>0&&(BCb(0,a.length),a.charCodeAt(0)==48)){a=a.substr(1);--f}if(f>(Neb(),Leb)[10]){throw vbb(new Oeb(Oje+j+'"'))}for(e=0;e0){l=-parseInt(a.substr(0,d),10);a=a.substr(d);f-=d;c=false}while(f>=g){d=parseInt(a.substr(0,g),10);a=a.substr(g);f-=g;if(c){c=false}else{if(ybb(l,h)<0){throw vbb(new Oeb(Oje+j+'"'))}l=Ibb(l,k)}l=Qbb(l,d)}if(ybb(l,0)>0){throw vbb(new Oeb(Oje+j+'"'))}if(!i){l=Jbb(l);if(ybb(l,0)<0){throw vbb(new Oeb(Oje+j+'"'))}}return l} +function Z6d(a,b){X6d();var c,d,e,f,g,h,i;this.a=new a7d(this);this.b=a;this.c=b;this.f=c2d(q1d((O6d(),M6d),b));if(this.f.dc()){if((h=t1d(M6d,a))==b){this.e=true;this.d=new Rkb;this.f=new oFd;this.f.Fc(Ewe);BD(V1d(p1d(M6d,bKd(a)),''),26)==a&&this.f.Fc(u1d(M6d,bKd(a)));for(e=g1d(M6d,a).Kc();e.Ob();){d=BD(e.Pb(),170);switch($1d(q1d(M6d,d))){case 4:{this.d.Fc(d);break}case 5:{this.f.Gc(c2d(q1d(M6d,d)));break}}}}else{Q6d();if(BD(b,66).Oj()){this.e=true;this.f=null;this.d=new Rkb;for(g=0,i=(a.i==null&&TKd(a),a.i).length;g=0&&g0&&(BD(Mpb(a.b,b),124).a.b=c)} +function b3b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;Odd(b,'Comment pre-processing',1);c=0;i=new olb(a.a);while(i.a0){j=(BCb(0,c.length),c.charCodeAt(0));if(j!=64){if(j==37){m=c.lastIndexOf('%');k=false;if(m!=0&&(m==n-1||(k=(BCb(m+1,c.length),c.charCodeAt(m+1)==46)))){h=c.substr(1,m-1);u=dfb('%',h)?null:QEd(h);e=0;if(k){try{e=Icb(c.substr(m+2),Rie,Ohe)}catch(a){a=ubb(a);if(JD(a,127)){i=a;throw vbb(new rFd(i))}else throw vbb(a)}}for(r=pRd(b.Wg());r.Ob();){p=MRd(r);if(JD(p,510)){f=BD(p,590);t=f.d;if((u==null?t==null:dfb(u,t))&&e--==0){return f}}}return null}}l=c.lastIndexOf('.');o=l==-1?c:c.substr(0,l);d=0;if(l!=-1){try{d=Icb(c.substr(l+1),Rie,Ohe)}catch(a){a=ubb(a);if(JD(a,127)){o=c}else throw vbb(a)}}o=dfb('%',o)?null:QEd(o);for(q=pRd(b.Wg());q.Ob();){p=MRd(q);if(JD(p,191)){g=BD(p,191);s=g.ne();if((o==null?s==null:dfb(o,s))&&d--==0){return g}}}return null}}return rid(b,c)} +function f6b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F;w=new Rkb;for(o=new olb(a.b);o.a=b.length)return {done:true};var a=b[d++];return {value:[a,c.get(a)],done:false}}}};if(!xrb()){e.prototype.createObject=function(){return {}};e.prototype.get=function(a){return this.obj[':'+a]};e.prototype.set=function(a,b){this.obj[':'+a]=b};e.prototype[hke]=function(a){delete this.obj[':'+a]};e.prototype.keys=function(){var a=[];for(var b in this.obj){b.charCodeAt(0)==58&&a.push(b.substring(1))}return a}}return e} +function cde(a){ade();var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(a==null)return null;l=a.length*8;if(l==0){return ''}h=l%24;n=l/24|0;m=h!=0?n+1:n;f=null;f=KC(TD,$ie,25,m*4,15,1);j=0;k=0;b=0;c=0;d=0;g=0;e=0;for(i=0;i>24;j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;p=(c&-128)==0?c>>4<<24>>24:(c>>4^240)<<24>>24;q=(d&-128)==0?d>>6<<24>>24:(d>>6^252)<<24>>24;f[g++]=_ce[o];f[g++]=_ce[p|j<<4];f[g++]=_ce[k<<2|q];f[g++]=_ce[d&63]}if(h==8){b=a[e];j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;f[g++]=_ce[o];f[g++]=_ce[j<<4];f[g++]=61;f[g++]=61}else if(h==16){b=a[e];c=a[e+1];k=(c&15)<<24>>24;j=(b&3)<<24>>24;o=(b&-128)==0?b>>2<<24>>24:(b>>2^192)<<24>>24;p=(c&-128)==0?c>>4<<24>>24:(c>>4^240)<<24>>24;f[g++]=_ce[o];f[g++]=_ce[p|j<<4];f[g++]=_ce[k<<2];f[g++]=61}return zfb(f,0,f.length)} +function mB(a,b){var c,d,e,f,g,h,i;a.e==0&&a.p>0&&(a.p=-(a.p-1));a.p>Rie&&dB(b,a.p-nje);g=b.q.getDate();ZA(b,1);a.k>=0&&aB(b,a.k);if(a.c>=0){ZA(b,a.c)}else if(a.k>=0){i=new fB(b.q.getFullYear()-nje,b.q.getMonth(),35);d=35-i.q.getDate();ZA(b,$wnd.Math.min(d,g))}else{ZA(b,g)}a.f<0&&(a.f=b.q.getHours());a.b>0&&a.f<12&&(a.f+=12);$A(b,a.f==24&&a.g?0:a.f);a.j>=0&&_A(b,a.j);a.n>=0&&bB(b,a.n);a.i>=0&&cB(b,wbb(Ibb(Abb(Cbb(b.q.getTime()),_ie),_ie),a.i));if(a.a){e=new eB;dB(e,e.q.getFullYear()-nje-80);Gbb(Cbb(b.q.getTime()),Cbb(e.q.getTime()))&&dB(b,e.q.getFullYear()-nje+100)}if(a.d>=0){if(a.c==-1){c=(7+a.d-b.q.getDay())%7;c>3&&(c-=7);h=b.q.getMonth();ZA(b,b.q.getDate()+c);b.q.getMonth()!=h&&ZA(b,b.q.getDate()+(c>0?-7:7))}else{if(b.q.getDay()!=a.d){return false}}}if(a.o>Rie){f=b.q.getTimezoneOffset();cB(b,wbb(Cbb(b.q.getTime()),(a.o-f)*60*_ie))}return true} +function z2b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;e=vNb(b,(wtc(),$sc));if(!JD(e,239)){return}o=BD(e,33);p=b.e;m=new g7c(b.c);f=b.d;m.a+=f.b;m.b+=f.d;u=BD(hkd(o,(Nyc(),Ixc)),174);if(uqb(u,(Idd(),Add))){n=BD(hkd(o,Kxc),116);w_b(n,f.a);z_b(n,f.d);x_b(n,f.b);y_b(n,f.c)}c=new Rkb;for(k=new olb(b.a);k.a0&&Ekb(a.p,k);Ekb(a.o,k)}b-=d;n=i+b;j+=b*a.e;Nkb(a.a,h,meb(n));Nkb(a.b,h,j);a.j=$wnd.Math.max(a.j,n);a.k=$wnd.Math.max(a.k,j);a.d+=b;b+=p}} +function Ucd(){Ucd=ccb;var a;Scd=new Ycd(ole,0);Acd=new Ycd(xle,1);zcd=new Ycd(yle,2);Rcd=new Ycd(zle,3);Tcd=new Ycd(Ale,4);Fcd=(mmb(),new zob((a=BD(gdb(F1),9),new xqb(a,BD(_Bb(a,a.length),9),0))));Gcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[])));Bcd=Up(qqb(zcd,OC(GC(F1,1),bne,61,0,[])));Ocd=Up(qqb(Rcd,OC(GC(F1,1),bne,61,0,[])));Qcd=Up(qqb(Tcd,OC(GC(F1,1),bne,61,0,[])));Lcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[Rcd])));Ecd=Up(qqb(zcd,OC(GC(F1,1),bne,61,0,[Tcd])));Ncd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[Tcd])));Hcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[zcd])));Pcd=Up(qqb(Rcd,OC(GC(F1,1),bne,61,0,[Tcd])));Ccd=Up(qqb(zcd,OC(GC(F1,1),bne,61,0,[Rcd])));Kcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[zcd,Tcd])));Dcd=Up(qqb(zcd,OC(GC(F1,1),bne,61,0,[Rcd,Tcd])));Mcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[Rcd,Tcd])));Icd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[zcd,Rcd])));Jcd=Up(qqb(Acd,OC(GC(F1,1),bne,61,0,[zcd,Rcd,Tcd])))} +function fSc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;if(b.b!=0){n=new Psb;h=null;o=null;d=QD($wnd.Math.floor($wnd.Math.log(b.b)*$wnd.Math.LOG10E)+1);i=0;for(t=Jsb(b,0);t.b!=t.d.c;){r=BD(Xsb(t),86);if(PD(o)!==PD(vNb(r,(mTc(),$Sc)))){o=GD(vNb(r,$Sc));i=0}o!=null?(h=o+iSc(i++,d)):(h=iSc(i++,d));yNb(r,$Sc,h);for(q=(e=Jsb((new ZRc(r)).a.d,0),new aSc(e));Wsb(q.a);){p=BD(Xsb(q.a),188).c;Gsb(n,p,n.c.b,n.c);yNb(p,$Sc,h)}}m=new Lqb;for(g=0;g=i){sCb(r.b>0);r.a.Xb(r.c=--r.b);break}else if(p.a>j){if(!e){Ekb(p.b,l);p.c=$wnd.Math.min(p.c,j);p.a=$wnd.Math.max(p.a,i);e=p}else{Gkb(e.b,p.b);e.a=$wnd.Math.max(e.a,p.a);uib(r)}}}if(!e){e=new TCc;e.c=j;e.a=i;Aib(r,e);Ekb(e.b,l)}}h=b.b;k=0;for(q=new olb(d);q.ah?1:0}if(a.b){a.b._b(f)&&(e=BD(a.b.xc(f),19).a);a.b._b(i)&&(h=BD(a.b.xc(i),19).a)}return eh?1:0}return b.e.c.length!=0&&c.g.c.length!=0?1:-1} +function acc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A;Odd(b,Ine,1);p=new Rkb;w=new Rkb;for(j=new olb(a.b);j.a0&&(t-=n);h_b(g,t);k=0;for(m=new olb(g.a);m.a0);h.a.Xb(h.c=--h.b)}i=0.4*d*k;!f&&h.bb.d.c){n=a.c[b.a.d];q=a.c[l.a.d];if(n==q){continue}AFb(DFb(CFb(EFb(BFb(new FFb,1),100),n),q))}}}}}}} +function QEd(a){IEd();var b,c,d,e,f,g,h,i;if(a==null)return null;e=hfb(a,wfb(37));if(e<0){return a}else{i=new Wfb(a.substr(0,e));b=KC(SD,wte,25,4,15,1);h=0;d=0;for(g=a.length;ee+2&&_Ed((BCb(e+1,a.length),a.charCodeAt(e+1)),xEd,yEd)&&_Ed((BCb(e+2,a.length),a.charCodeAt(e+2)),xEd,yEd)){c=dFd((BCb(e+1,a.length),a.charCodeAt(e+1)),(BCb(e+2,a.length),a.charCodeAt(e+2)));e+=2;if(d>0){(c&192)==128?(b[h++]=c<<24>>24):(d=0)}else if(c>=128){if((c&224)==192){b[h++]=c<<24>>24;d=2}else if((c&240)==224){b[h++]=c<<24>>24;d=3}else if((c&248)==240){b[h++]=c<<24>>24;d=4}}if(d>0){if(h==d){switch(h){case 2:{Kfb(i,((b[0]&31)<<6|b[1]&63)&aje);break}case 3:{Kfb(i,((b[0]&15)<<12|(b[1]&63)<<6|b[2]&63)&aje);break}}h=0;d=0}}else{for(f=0;f0){if(g+d>a.length){return false}h=rA(a.substr(0,g+d),b)}else{h=rA(a,b)}}switch(f){case 71:h=oA(a,g,OC(GC(ZI,1),nie,2,6,[pje,qje]),b);e.e=h;return true;case 77:return zA(a,b,e,h,g);case 76:return BA(a,b,e,h,g);case 69:return xA(a,b,g,e);case 99:return AA(a,b,g,e);case 97:h=oA(a,g,OC(GC(ZI,1),nie,2,6,['AM','PM']),b);e.b=h;return true;case 121:return DA(a,b,g,h,c,e);case 100:if(h<=0){return false}e.c=h;return true;case 83:if(h<0){return false}return yA(h,g,b[0],e);case 104:h==12&&(h=0);case 75:case 72:if(h<0){return false}e.f=h;e.g=false;return true;case 107:if(h<0){return false}e.f=h;e.g=true;return true;case 109:if(h<0){return false}e.j=h;return true;case 115:if(h<0){return false}e.n=h;return true;case 90:if(gw&&(o.c=w-o.b);Ekb(g.d,new BLb(o,bLb(g,o)));s=b==Acd?$wnd.Math.max(s,p.b+j.b.rf().b):$wnd.Math.min(s,p.b)}s+=b==Acd?a.t:-a.t;t=cLb((g.e=s,g));t>0&&(BD(Mpb(a.b,b),124).a.b=t);for(k=m.Kc();k.Ob();){j=BD(k.Pb(),111);if(!j.c||j.c.d.c.length<=0){continue}o=j.c.i;o.c-=j.e.a;o.d-=j.e.b}} +function SPb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;b=new Lqb;for(i=new Fyd(a);i.e!=i.i.gc();){h=BD(Dyd(i),33);c=new Tqb;Rhb(OPb,h,c);n=new aQb;e=BD(GAb(new YAb(null,new Lub(new Sr(ur($sd(h).a.Kc(),new Sq)))),Wyb(n,Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[(Fyb(),Dyb)])))),83);RPb(c,BD(e.xc((Bcb(),true)),14),new cQb);d=BD(GAb(JAb(BD(e.xc(false),15).Lc(),new eQb),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[Dyb]))),15);for(g=d.Kc();g.Ob();){f=BD(g.Pb(),79);m=ktd(f);if(m){j=BD(Wd(irb(b.f,m)),21);if(!j){j=UPb(m);jrb(b.f,m,j)}ye(c,j)}}e=BD(GAb(new YAb(null,new Lub(new Sr(ur(_sd(h).a.Kc(),new Sq)))),Wyb(n,Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[Dyb])))),83);RPb(c,BD(e.xc(true),14),new gQb);d=BD(GAb(JAb(BD(e.xc(false),15).Lc(),new iQb),Byb(new fzb,new dzb,new Ezb,OC(GC(xL,1),Kie,132,0,[Dyb]))),15);for(l=d.Kc();l.Ob();){k=BD(l.Pb(),79);m=mtd(k);if(m){j=BD(Wd(irb(b.f,m)),21);if(!j){j=UPb(m);jrb(b.f,m,j)}ye(c,j)}}}} +function rhb(a,b){phb();var c,d,e,f,g,h,i,j,k,l,m,n,o,p;i=ybb(a,0)<0;i&&(a=Jbb(a));if(ybb(a,0)==0){switch(b){case 0:return '0';case 1:return $je;case 2:return '0.00';case 3:return '0.000';case 4:return '0.0000';case 5:return '0.00000';case 6:return '0.000000';default:n=new Ufb;b<0?(n.a+='0E+',n):(n.a+='0E',n);n.a+=b==Rie?'2147483648':''+-b;return n.a;}}k=18;l=KC(TD,$ie,25,k+1,15,1);c=k;p=a;do{j=p;p=Abb(p,10);l[--c]=Tbb(wbb(48,Qbb(j,Ibb(p,10))))&aje}while(ybb(p,0)!=0);e=Qbb(Qbb(Qbb(k,c),b),1);if(b==0){i&&(l[--c]=45);return zfb(l,c,k-c)}if(b>0&&ybb(e,-6)>=0){if(ybb(e,0)>=0){f=c+Tbb(e);for(h=k-1;h>=f;h--){l[h+1]=l[h]}l[++f]=46;i&&(l[--c]=45);return zfb(l,c,k-c+1)}for(g=2;Gbb(g,wbb(Jbb(e),1));g++){l[--c]=48}l[--c]=46;l[--c]=48;i&&(l[--c]=45);return zfb(l,c,k-c)}o=c+1;d=k;m=new Vfb;i&&(m.a+='-',m);if(d-o>=1){Kfb(m,l[c]);m.a+='.';m.a+=zfb(l,c+1,k-c-1)}else{m.a+=zfb(l,c,k-c)}m.a+='E';ybb(e,0)>0&&(m.a+='+',m);m.a+=''+Ubb(e);return m.a} +function iQc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;a.e.a.$b();a.f.a.$b();a.c.c=KC(SI,Uhe,1,0,5,1);a.i.c=KC(SI,Uhe,1,0,5,1);a.g.a.$b();if(b){for(g=new olb(b.a);g.a=1){if(v-j>0&&o>=0){dld(l,l.i+u);eld(l,l.j+i*j)}else if(v-j<0&&n>=0){dld(l,l.i+u*v);eld(l,l.j+i)}}}}jkd(a,(Y9c(),Y8c),(tdd(),f=BD(gdb(I1),9),new xqb(f,BD(_Bb(f,f.length),9),0)));return new f7c(w,k)} +function Yfd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;n=Xod(atd(BD(qud((!a.b&&(a.b=new y5d(z2,a,4,7)),a.b),0),82)));o=Xod(atd(BD(qud((!a.c&&(a.c=new y5d(z2,a,5,8)),a.c),0),82)));l=n==o;h=new d7c;b=BD(hkd(a,(Zad(),Sad)),74);if(!!b&&b.b>=2){if((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a).i==0){c=(Fhd(),e=new rmd,e);wtd((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a),c)}else if((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a).i>1){m=new Oyd((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a));while(m.e!=m.i.gc()){Eyd(m)}}ifd(b,BD(qud((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a),0),202))}if(l){for(d=new Fyd((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a));d.e!=d.i.gc();){c=BD(Dyd(d),202);for(j=new Fyd((!c.a&&(c.a=new xMd(y2,c,5)),c.a));j.e!=j.i.gc();){i=BD(Dyd(j),469);h.a=$wnd.Math.max(h.a,i.a);h.b=$wnd.Math.max(h.b,i.b)}}}for(g=new Fyd((!a.n&&(a.n=new cUd(D2,a,1,7)),a.n));g.e!=g.i.gc();){f=BD(Dyd(g),137);k=BD(hkd(f,Yad),8);!!k&&bld(f,k.a,k.b);if(l){h.a=$wnd.Math.max(h.a,f.i+f.g);h.b=$wnd.Math.max(h.b,f.j+f.f)}}return h} +function yMc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;t=b.c.length;e=new ULc(a.a,c,null,null);B=KC(UD,Vje,25,t,15,1);p=KC(UD,Vje,25,t,15,1);o=KC(UD,Vje,25,t,15,1);q=0;for(h=0;hB[i]&&(q=i);for(l=new olb(a.a.b);l.an){if(f){Fsb(w,m);Fsb(B,meb(j.b-1))}H=c.b;I+=m+b;m=0;k=$wnd.Math.max(k,c.b+c.c+G)}dld(h,H);eld(h,I);k=$wnd.Math.max(k,H+G+c.c);m=$wnd.Math.max(m,l);H+=G+b}k=$wnd.Math.max(k,d);F=I+m+c.a;if(Fqme;C=$wnd.Math.abs(m.b-o.b)>qme;(!c&&B&&C||c&&(B||C))&&Dsb(q.a,u)}ye(q.a,d);d.b==0?(m=u):(m=(sCb(d.b!=0),BD(d.c.b.c,8)));bZb(n,l,p);if(AZb(e)==A){if(Q_b(A.i)!=e.a){p=new d7c;Y$b(p,Q_b(A.i),s)}yNb(q,utc,p)}cZb(n,q,s);k.a.zc(n,k)}QZb(q,v);RZb(q,A)}for(j=k.a.ec().Kc();j.Ob();){i=BD(j.Pb(),17);QZb(i,null);RZb(i,null)}Qdd(b)} +function KQb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;if(a.gc()==1){return BD(a.Xb(0),231)}else if(a.gc()<=0){return new kRb}for(e=a.Kc();e.Ob();){c=BD(e.Pb(),231);o=0;k=Ohe;l=Ohe;i=Rie;j=Rie;for(n=new olb(c.e);n.ah){t=0;u+=g+r;g=0}JQb(p,c,t,u);b=$wnd.Math.max(b,t+q.a);g=$wnd.Math.max(g,q.b);t+=q.a+r}return p} +function Ioc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o;k=new s7c;switch(a.a.g){case 3:m=BD(vNb(b.e,(wtc(),rtc)),15);n=BD(vNb(b.j,rtc),15);o=BD(vNb(b.f,rtc),15);c=BD(vNb(b.e,ptc),15);d=BD(vNb(b.j,ptc),15);e=BD(vNb(b.f,ptc),15);g=new Rkb;Gkb(g,m);n.Jc(new Loc);Gkb(g,JD(n,152)?km(BD(n,152)):JD(n,131)?BD(n,131).a:JD(n,54)?new ov(n):new dv(n));Gkb(g,o);f=new Rkb;Gkb(f,c);Gkb(f,JD(d,152)?km(BD(d,152)):JD(d,131)?BD(d,131).a:JD(d,54)?new ov(d):new dv(d));Gkb(f,e);yNb(b.f,rtc,g);yNb(b.f,ptc,f);yNb(b.f,stc,b.f);yNb(b.e,rtc,null);yNb(b.e,ptc,null);yNb(b.j,rtc,null);yNb(b.j,ptc,null);break;case 1:ye(k,b.e.a);Dsb(k,b.i.n);ye(k,Su(b.j.a));Dsb(k,b.a.n);ye(k,b.f.a);break;default:ye(k,b.e.a);ye(k,Su(b.j.a));ye(k,b.f.a);}Osb(b.f.a);ye(b.f.a,k);QZb(b.f,b.e.c);h=BD(vNb(b.e,(Nyc(),jxc)),74);j=BD(vNb(b.j,jxc),74);i=BD(vNb(b.f,jxc),74);if(!!h||!!j||!!i){l=new s7c;Goc(l,i);Goc(l,j);Goc(l,h);yNb(b.f,jxc,l)}QZb(b.j,null);RZb(b.j,null);QZb(b.e,null);RZb(b.e,null);$_b(b.a,null);$_b(b.i,null);!!b.g&&Ioc(a,b.g)} +function bde(a){ade();var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if(a==null)return null;f=rfb(a);o=ede(f);if(o%4!=0){return null}p=o/4|0;if(p==0)return KC(SD,wte,25,0,15,1);l=null;b=0;c=0;d=0;e=0;g=0;h=0;i=0;j=0;n=0;m=0;k=0;l=KC(SD,wte,25,p*3,15,1);for(;n>4)<<24>>24;l[m++]=((c&15)<<4|d>>2&15)<<24>>24;l[m++]=(d<<6|e)<<24>>24}if(!dde(g=f[k++])||!dde(h=f[k++])){return null}b=$ce[g];c=$ce[h];i=f[k++];j=f[k++];if($ce[i]==-1||$ce[j]==-1){if(i==61&&j==61){if((c&15)!=0)return null;q=KC(SD,wte,25,n*3+1,15,1);$fb(l,0,q,0,n*3);q[m]=(b<<2|c>>4)<<24>>24;return q}else if(i!=61&&j==61){d=$ce[i];if((d&3)!=0)return null;q=KC(SD,wte,25,n*3+2,15,1);$fb(l,0,q,0,n*3);q[m++]=(b<<2|c>>4)<<24>>24;q[m]=((c&15)<<4|d>>2&15)<<24>>24;return q}else{return null}}else{d=$ce[i];e=$ce[j];l[m++]=(b<<2|c>>4)<<24>>24;l[m++]=((c&15)<<4|d>>2&15)<<24>>24;l[m++]=(d<<6|e)<<24>>24}return l} +function Sbc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;Odd(b,Ine,1);o=BD(vNb(a,(Nyc(),Swc)),218);for(e=new olb(a.b);e.a=2){p=true;m=new olb(f.j);c=BD(mlb(m),11);n=null;while(m.a0){e=BD(Ikb(q.c.a,w-1),10);g=a.i[e.p];B=$wnd.Math.ceil(jBc(a.n,e,q));f=v.a.e-q.d.d-(g.a.e+e.o.b+e.d.a)-B}j=Pje;if(w0&&A.a.e.e-A.a.a-(A.b.e.e-A.b.a)<0;o=t.a.e.e-t.a.a-(t.b.e.e-t.b.a)<0&&A.a.e.e-A.a.a-(A.b.e.e-A.b.a)>0;n=t.a.e.e+t.b.aA.b.e.e+A.a.a;u=0;!p&&!o&&(m?f+l>0?(u=l):j-d>0&&(u=d):n&&(f+h>0?(u=h):j-s>0&&(u=s)));v.a.e+=u;v.b&&(v.d.e+=u);return false} +function XGb(a,b,c){var d,e,f,g,h,i,j,k,l,m;d=new J6c(b.qf().a,b.qf().b,b.rf().a,b.rf().b);e=new I6c;if(a.c){for(g=new olb(b.wf());g.aj&&(d.a+=yfb(KC(TD,$ie,25,-j,15,1)));d.a+='Is';if(hfb(i,wfb(32))>=0){for(e=0;e=d.o.b/2}else{s=!l}if(s){r=BD(vNb(d,(wtc(),vtc)),15);if(!r){f=new Rkb;yNb(d,vtc,f)}else if(m){f=r}else{e=BD(vNb(d,tsc),15);if(!e){f=new Rkb;yNb(d,tsc,f)}else{r.gc()<=e.gc()?(f=r):(f=e)}}}else{e=BD(vNb(d,(wtc(),tsc)),15);if(!e){f=new Rkb;yNb(d,tsc,f)}else if(l){f=e}else{r=BD(vNb(d,vtc),15);if(!r){f=new Rkb;yNb(d,vtc,f)}else{e.gc()<=r.gc()?(f=e):(f=r)}}}f.Fc(a);yNb(a,(wtc(),vsc),c);if(b.d==c){RZb(b,null);c.e.c.length+c.g.c.length==0&&F0b(c,null);d3b(c)}else{QZb(b,null);c.e.c.length+c.g.c.length==0&&F0b(c,null)}Osb(b.a)} +function aoc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H;s=new Bib(a.b,0);k=b.Kc();o=0;j=BD(k.Pb(),19).a;v=0;c=new Tqb;A=new zsb;while(s.b=a.a){d=E6b(a,s);k=$wnd.Math.max(k,d.b);u=$wnd.Math.max(u,d.d);Ekb(h,new vgd(s,d))}}B=new Rkb;for(j=0;j0),q.a.Xb(q.c=--q.b),C=new H1b(a.b),Aib(q,C),sCb(q.b0){j=0;!!q&&(j+=h);j+=(C-1)*g;!!t&&(j+=h);B&&!!t&&(j=$wnd.Math.max(j,jQc(t,g,s,A)));if(j0){m=k<100?null:new Ixd(k);j=new Aud(b);o=j.g;r=KC(WD,oje,25,k,15,1);d=0;u=new zud(k);for(e=0;e=0;){if(n!=null?pb(n,o[i]):PD(n)===PD(o[i])){if(r.length<=d){q=r;r=KC(WD,oje,25,2*r.length,15,1);$fb(q,0,r,0,d)}r[d++]=e;wtd(u,o[i]);break v}}n=n;if(PD(n)===PD(h)){break}}}j=u;o=u.g;k=d;if(d>r.length){q=r;r=KC(WD,oje,25,d,15,1);$fb(q,0,r,0,d)}if(d>0){t=true;for(f=0;f=0;){tud(a,r[g])}if(d!=k){for(e=k;--e>=d;){tud(j,e)}q=r;r=KC(WD,oje,25,d,15,1);$fb(q,0,r,0,d)}b=j}}}else{b=Ctd(a,b);for(e=a.i;--e>=0;){if(b.Hc(a.g[e])){tud(a,e);t=true}}}if(t){if(r!=null){c=b.gc();l=c==1?FLd(a,4,b.Kc().Pb(),null,r[0],p):FLd(a,6,b,r,r[0],p);m=c<100?null:new Ixd(c);for(e=b.Kc();e.Ob();){n=e.Pb();m=Q2d(a,BD(n,72),m)}if(!m){Uhd(a.e,l)}else{m.Ei(l);m.Fi()}}else{m=Vxd(b.gc());for(e=b.Kc();e.Ob();){n=e.Pb();m=Q2d(a,BD(n,72),m)}!!m&&m.Fi()}return true}else{return false}} +function fYb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;c=new mYb(b);c.a||$Xb(b);j=ZXb(b);i=new Hp;q=new AYb;for(p=new olb(b.a);p.a0||c.o==dMc&&e0){l=BD(Ikb(m.c.a,g-1),10);B=jBc(a.b,m,l);q=m.n.b-m.d.d-(l.n.b+l.o.b+l.d.a+B)}else{q=m.n.b-m.d.d}j=$wnd.Math.min(q,j);if(gg?Anc(a,b,c):Anc(a,c,b);return eg?1:0}}d=BD(vNb(b,(wtc(),Zsc)),19).a;f=BD(vNb(c,Zsc),19).a;d>f?Anc(a,b,c):Anc(a,c,b);return df?1:0} +function u2c(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;if(Ccb(DD(hkd(b,(Y9c(),d9c))))){return mmb(),mmb(),jmb}j=(!b.a&&(b.a=new cUd(E2,b,10,11)),b.a).i!=0;l=s2c(b);k=!l.dc();if(j||k){e=BD(hkd(b,F9c),149);if(!e){throw vbb(new y2c('Resolved algorithm is not set; apply a LayoutAlgorithmResolver before computing layout.'))}s=D3c(e,(Csd(),ysd));q2c(b);if(!j&&k&&!s){return mmb(),mmb(),jmb}i=new Rkb;if(PD(hkd(b,J8c))===PD((hbd(),ebd))&&(D3c(e,vsd)||D3c(e,usd))){n=p2c(a,b);o=new Psb;ye(o,(!b.a&&(b.a=new cUd(E2,b,10,11)),b.a));while(o.b!=0){m=BD(o.b==0?null:(sCb(o.b!=0),Nsb(o,o.a.a)),33);q2c(m);r=PD(hkd(m,J8c))===PD(gbd);if(r||ikd(m,o8c)&&!C3c(e,hkd(m,F9c))){h=u2c(a,m,c,d);Gkb(i,h);jkd(m,J8c,gbd);hfd(m)}else{ye(o,(!m.a&&(m.a=new cUd(E2,m,10,11)),m.a))}}}else{n=(!b.a&&(b.a=new cUd(E2,b,10,11)),b.a).i;for(g=new Fyd((!b.a&&(b.a=new cUd(E2,b,10,11)),b.a));g.e!=g.i.gc();){f=BD(Dyd(g),33);h=u2c(a,f,c,d);Gkb(i,h);hfd(f)}}for(q=new olb(i);q.a=0?(n=Zcd(h)):(n=Wcd(Zcd(h)));a.Ye($xc,n)}j=new d7c;m=false;if(a.Xe(Txc)){a7c(j,BD(a.We(Txc),8));m=true}else{_6c(j,g.a/2,g.b/2)}switch(n.g){case 4:yNb(k,mxc,(Ctc(),ytc));yNb(k,Bsc,(Gqc(),Fqc));k.o.b=g.b;p<0&&(k.o.a=-p);G0b(l,(Ucd(),zcd));m||(j.a=g.a);j.a-=g.a;break;case 2:yNb(k,mxc,(Ctc(),Atc));yNb(k,Bsc,(Gqc(),Dqc));k.o.b=g.b;p<0&&(k.o.a=-p);G0b(l,(Ucd(),Tcd));m||(j.a=0);break;case 1:yNb(k,Osc,(esc(),dsc));k.o.a=g.a;p<0&&(k.o.b=-p);G0b(l,(Ucd(),Rcd));m||(j.b=g.b);j.b-=g.b;break;case 3:yNb(k,Osc,(esc(),bsc));k.o.a=g.a;p<0&&(k.o.b=-p);G0b(l,(Ucd(),Acd));m||(j.b=0);}a7c(l.n,j);yNb(k,Txc,j);if(b==Zbd||b==_bd||b==$bd){o=0;if(b==Zbd&&a.Xe(Wxc)){switch(n.g){case 1:case 2:o=BD(a.We(Wxc),19).a;break;case 3:case 4:o=-BD(a.We(Wxc),19).a;}}else{switch(n.g){case 4:case 2:o=f.b;b==_bd&&(o/=e.b);break;case 1:case 3:o=f.a;b==_bd&&(o/=e.a);}}yNb(k,htc,o)}yNb(k,Hsc,n);return k} +function AGc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C;c=Edb(ED(vNb(a.a.j,(Nyc(),Ewc))));if(c<-1||!a.a.i||ecd(BD(vNb(a.a.o,Vxc),98))||V_b(a.a.o,(Ucd(),zcd)).gc()<2&&V_b(a.a.o,Tcd).gc()<2){return true}if(a.a.c.Rf()){return false}v=0;u=0;t=new Rkb;for(i=a.a.e,j=0,k=i.length;j=c} +function ovd(){mvd();function h(f){var g=this;this.dispatch=function(a){var b=a.data;switch(b.cmd){case 'algorithms':var c=pvd((mmb(),new lnb(new $ib(lvd.b))));f.postMessage({id:b.id,data:c});break;case 'categories':var d=pvd((mmb(),new lnb(new $ib(lvd.c))));f.postMessage({id:b.id,data:d});break;case 'options':var e=pvd((mmb(),new lnb(new $ib(lvd.d))));f.postMessage({id:b.id,data:e});break;case 'register':svd(b.algorithms);f.postMessage({id:b.id});break;case 'layout':qvd(b.graph,b.layoutOptions||{},b.options||{});f.postMessage({id:b.id,data:b.graph});break;}};this.saveDispatch=function(b){try{g.dispatch(b)}catch(a){f.postMessage({id:b.data.id,error:a})}}} +function j(b){var c=this;this.dispatcher=new h({postMessage:function(a){c.onmessage({data:a})}});this.postMessage=function(a){setTimeout(function(){c.dispatcher.saveDispatch({data:a})},0)}} +if(typeof document===uke&&typeof self!==uke){var i=new h(self);self.onmessage=i.saveDispatch}else if(typeof module!==uke&&module.exports){Object.defineProperty(exports,'__esModule',{value:true});module.exports={'default':j,Worker:j}}} +function aae(a){if(a.N)return;a.N=true;a.b=Lnd(a,0);Knd(a.b,0);Knd(a.b,1);Knd(a.b,2);a.bb=Lnd(a,1);Knd(a.bb,0);Knd(a.bb,1);a.fb=Lnd(a,2);Knd(a.fb,3);Knd(a.fb,4);Qnd(a.fb,5);a.qb=Lnd(a,3);Knd(a.qb,0);Qnd(a.qb,1);Qnd(a.qb,2);Knd(a.qb,3);Knd(a.qb,4);Qnd(a.qb,5);Knd(a.qb,6);a.a=Mnd(a,4);a.c=Mnd(a,5);a.d=Mnd(a,6);a.e=Mnd(a,7);a.f=Mnd(a,8);a.g=Mnd(a,9);a.i=Mnd(a,10);a.j=Mnd(a,11);a.k=Mnd(a,12);a.n=Mnd(a,13);a.o=Mnd(a,14);a.p=Mnd(a,15);a.q=Mnd(a,16);a.s=Mnd(a,17);a.r=Mnd(a,18);a.t=Mnd(a,19);a.u=Mnd(a,20);a.v=Mnd(a,21);a.w=Mnd(a,22);a.B=Mnd(a,23);a.A=Mnd(a,24);a.C=Mnd(a,25);a.D=Mnd(a,26);a.F=Mnd(a,27);a.G=Mnd(a,28);a.H=Mnd(a,29);a.J=Mnd(a,30);a.I=Mnd(a,31);a.K=Mnd(a,32);a.M=Mnd(a,33);a.L=Mnd(a,34);a.P=Mnd(a,35);a.Q=Mnd(a,36);a.R=Mnd(a,37);a.S=Mnd(a,38);a.T=Mnd(a,39);a.U=Mnd(a,40);a.V=Mnd(a,41);a.X=Mnd(a,42);a.W=Mnd(a,43);a.Y=Mnd(a,44);a.Z=Mnd(a,45);a.$=Mnd(a,46);a._=Mnd(a,47);a.ab=Mnd(a,48);a.cb=Mnd(a,49);a.db=Mnd(a,50);a.eb=Mnd(a,51);a.gb=Mnd(a,52);a.hb=Mnd(a,53);a.ib=Mnd(a,54);a.jb=Mnd(a,55);a.kb=Mnd(a,56);a.lb=Mnd(a,57);a.mb=Mnd(a,58);a.nb=Mnd(a,59);a.ob=Mnd(a,60);a.pb=Mnd(a,61)} +function f5b(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;s=0;if(b.f.a==0){for(q=new olb(a);q.aj&&(tCb(j,b.c.length),BD(b.c[j],200)).a.c.length==0){Lkb(b,(tCb(j,b.c.length),b.c[j]))}}if(!i){--f;continue}if(uZc(b,k,e,i,m,c,j,d)){l=true;continue}if(m){if(vZc(b,k,e,i,c,j,d)){l=true;continue}else if(wZc(k,e)){e.c=true;l=true;continue}}else if(wZc(k,e)){e.c=true;l=true;continue}if(l){continue}}if(wZc(k,e)){e.c=true;l=true;!!i&&(i.k=false);continue}else{a$c(e.q)}}return l} +function fed(a,b,c,d,e,f,g){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I;p=0;D=0;for(j=new olb(a.b);j.ap){if(f){Fsb(w,n);Fsb(B,meb(k.b-1));Ekb(a.d,o);h.c=KC(SI,Uhe,1,0,5,1)}H=c.b;I+=n+b;n=0;l=$wnd.Math.max(l,c.b+c.c+G)}h.c[h.c.length]=i;ued(i,H,I);l=$wnd.Math.max(l,H+G+c.c);n=$wnd.Math.max(n,m);H+=G+b;o=i}Gkb(a.a,h);Ekb(a.d,BD(Ikb(h,h.c.length-1),157));l=$wnd.Math.max(l,d);F=I+n+c.a;if(F1&&(g=$wnd.Math.min(g,$wnd.Math.abs(BD(Ut(h.a,1),8).b-k.b)))}}}}}else{for(p=new olb(b.j);p.ae){f=m.a-e;g=Ohe;d.c=KC(SI,Uhe,1,0,5,1);e=m.a}if(m.a>=e){d.c[d.c.length]=h;h.a.b>1&&(g=$wnd.Math.min(g,$wnd.Math.abs(BD(Ut(h.a,h.a.b-2),8).b-m.b)))}}}}}if(d.c.length!=0&&f>b.o.a/2&&g>b.o.b/2){n=new H0b;F0b(n,b);G0b(n,(Ucd(),Acd));n.n.a=b.o.a/2;r=new H0b;F0b(r,b);G0b(r,Rcd);r.n.a=b.o.a/2;r.n.b=b.o.b;for(i=new olb(d);i.a=j.b?QZb(h,r):QZb(h,n)}else{j=BD(Msb(h.a),8);q=h.a.b==0?A0b(h.c):BD(Isb(h.a),8);q.b>=j.b?RZb(h,r):RZb(h,n)}l=BD(vNb(h,(Nyc(),jxc)),74);!!l&&ze(l,j,true)}b.n.a=e-b.o.a/2}} +function erd(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K;D=null;G=b;F=Rqd(a,dtd(c),G);Lkd(F,_pd(G,Vte));H=BD(oo(a.g,Vpd(aC(G,Cte))),33);m=aC(G,'sourcePort');d=null;!!m&&(d=Vpd(m));I=BD(oo(a.j,d),118);if(!H){h=Wpd(G);o="An edge must have a source node (edge id: '"+h;p=o+$te;throw vbb(new cqd(p))}if(!!I&&!Hb(mpd(I),H)){i=_pd(G,Vte);q="The source port of an edge must be a port of the edge's source node (edge id: '"+i;r=q+$te;throw vbb(new cqd(r))}B=(!F.b&&(F.b=new y5d(z2,F,4,7)),F.b);f=null;I?(f=I):(f=H);wtd(B,f);J=BD(oo(a.g,Vpd(aC(G,bue))),33);n=aC(G,'targetPort');e=null;!!n&&(e=Vpd(n));K=BD(oo(a.j,e),118);if(!J){l=Wpd(G);s="An edge must have a target node (edge id: '"+l;t=s+$te;throw vbb(new cqd(t))}if(!!K&&!Hb(mpd(K),J)){j=_pd(G,Vte);u="The target port of an edge must be a port of the edge's target node (edge id: '"+j;v=u+$te;throw vbb(new cqd(v))}C=(!F.c&&(F.c=new y5d(z2,F,5,8)),F.c);g=null;K?(g=K):(g=J);wtd(C,g);if((!F.b&&(F.b=new y5d(z2,F,4,7)),F.b).i==0||(!F.c&&(F.c=new y5d(z2,F,5,8)),F.c).i==0){k=_pd(G,Vte);w=Zte+k;A=w+$te;throw vbb(new cqd(A))}grd(G,F);frd(G,F);D=crd(a,G,F);return D} +function DXb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D;l=FXb(zXb(a,(Ucd(),Fcd)),b);o=EXb(zXb(a,Gcd),b);u=EXb(zXb(a,Ocd),b);B=GXb(zXb(a,Qcd),b);m=GXb(zXb(a,Bcd),b);s=EXb(zXb(a,Ncd),b);p=EXb(zXb(a,Hcd),b);w=EXb(zXb(a,Pcd),b);v=EXb(zXb(a,Ccd),b);C=GXb(zXb(a,Ecd),b);r=EXb(zXb(a,Lcd),b);t=EXb(zXb(a,Kcd),b);A=EXb(zXb(a,Dcd),b);D=GXb(zXb(a,Mcd),b);n=GXb(zXb(a,Icd),b);q=EXb(zXb(a,Jcd),b);c=w6c(OC(GC(UD,1),Vje,25,15,[s.a,B.a,w.a,D.a]));d=w6c(OC(GC(UD,1),Vje,25,15,[o.a,l.a,u.a,q.a]));e=r.a;f=w6c(OC(GC(UD,1),Vje,25,15,[p.a,m.a,v.a,n.a]));j=w6c(OC(GC(UD,1),Vje,25,15,[s.b,o.b,p.b,t.b]));i=w6c(OC(GC(UD,1),Vje,25,15,[B.b,l.b,m.b,q.b]));k=C.b;h=w6c(OC(GC(UD,1),Vje,25,15,[w.b,u.b,v.b,A.b]));vXb(zXb(a,Fcd),c+e,j+k);vXb(zXb(a,Jcd),c+e,j+k);vXb(zXb(a,Gcd),c+e,0);vXb(zXb(a,Ocd),c+e,j+k+i);vXb(zXb(a,Qcd),0,j+k);vXb(zXb(a,Bcd),c+e+d,j+k);vXb(zXb(a,Hcd),c+e+d,0);vXb(zXb(a,Pcd),0,j+k+i);vXb(zXb(a,Ccd),c+e+d,j+k+i);vXb(zXb(a,Ecd),0,j);vXb(zXb(a,Lcd),c,0);vXb(zXb(a,Dcd),0,j+k+i);vXb(zXb(a,Icd),c+e+d,0);g=new d7c;g.a=w6c(OC(GC(UD,1),Vje,25,15,[c+d+e+f,C.a,t.a,A.a]));g.b=w6c(OC(GC(UD,1),Vje,25,15,[j+i+k+h,r.b,D.b,n.b]));return g} +function Ngc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;p=new Rkb;for(m=new olb(a.d.b);m.ae.d.d+e.d.a){k.f.d=true}else{k.f.d=true;k.f.a=true}}}d.b!=d.d.c&&(b=c)}if(k){f=BD(Ohb(a.f,g.d.i),57);if(b.bf.d.d+f.d.a){k.f.d=true}else{k.f.d=true;k.f.a=true}}}}for(h=new Sr(ur(R_b(n).a.Kc(),new Sq));Qr(h);){g=BD(Rr(h),17);if(g.a.b!=0){b=BD(Isb(g.a),8);if(g.d.j==(Ucd(),Acd)){q=new hic(b,new f7c(b.a,e.d.d),e,g);q.f.a=true;q.a=g.d;p.c[p.c.length]=q}if(g.d.j==Rcd){q=new hic(b,new f7c(b.a,e.d.d+e.d.a),e,g);q.f.d=true;q.a=g.d;p.c[p.c.length]=q}}}}}return p} +function WJc(a,b,c){var d,e,f,g,h,i,j,k,l;Odd(c,'Network simplex node placement',1);a.e=b;a.n=BD(vNb(b,(wtc(),otc)),304);VJc(a);HJc(a);MAb(LAb(new YAb(null,new Kub(a.e.b,16)),new KKc),new MKc(a));MAb(JAb(LAb(JAb(LAb(new YAb(null,new Kub(a.e.b,16)),new zLc),new BLc),new DLc),new FLc),new IKc(a));if(Ccb(DD(vNb(a.e,(Nyc(),Axc))))){g=Udd(c,1);Odd(g,'Straight Edges Pre-Processing',1);UJc(a);Qdd(g)}JFb(a.f);f=BD(vNb(b,Ayc),19).a*a.f.a.c.length;uGb(HGb(IGb(LGb(a.f),f),false),Udd(c,1));if(a.d.a.gc()!=0){g=Udd(c,1);Odd(g,'Flexible Where Space Processing',1);h=BD(Btb(RAb(NAb(new YAb(null,new Kub(a.f.a,16)),new OKc),new iKc)),19).a;i=BD(Btb(QAb(NAb(new YAb(null,new Kub(a.f.a,16)),new QKc),new mKc)),19).a;j=i-h;k=nGb(new pGb,a.f);l=nGb(new pGb,a.f);AFb(DFb(CFb(BFb(EFb(new FFb,20000),j),k),l));MAb(JAb(JAb(Plb(a.i),new SKc),new UKc),new WKc(h,k,j,l));for(e=a.d.a.ec().Kc();e.Ob();){d=BD(e.Pb(),213);d.g=1}uGb(HGb(IGb(LGb(a.f),f),false),Udd(g,1));Qdd(g)}if(Ccb(DD(vNb(b,Axc)))){g=Udd(c,1);Odd(g,'Straight Edges Post-Processing',1);TJc(a);Qdd(g)}GJc(a);a.e=null;a.f=null;a.i=null;a.c=null;Uhb(a.k);a.j=null;a.a=null;a.o=null;a.d.a.$b();Qdd(c)} +function lMc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;for(h=new olb(a.a.b);h.a0){d=l.gc();j=QD($wnd.Math.floor((d+1)/2))-1;e=QD($wnd.Math.ceil((d+1)/2))-1;if(b.o==dMc){for(k=e;k>=j;k--){if(b.a[u.p]==u){p=BD(l.Xb(k),46);o=BD(p.a,10);if(!Rqb(c,p.b)&&n>a.b.e[o.p]){b.a[o.p]=u;b.g[u.p]=b.g[o.p];b.a[u.p]=b.g[u.p];b.f[b.g[u.p].p]=(Bcb(),Ccb(b.f[b.g[u.p].p])&u.k==(j0b(),g0b)?true:false);n=a.b.e[o.p]}}}}else{for(k=j;k<=e;k++){if(b.a[u.p]==u){r=BD(l.Xb(k),46);q=BD(r.a,10);if(!Rqb(c,r.b)&&n=o){if(s>o){n.c=KC(SI,Uhe,1,0,5,1);o=s}n.c[n.c.length]=g}}if(n.c.length!=0){m=BD(Ikb(n,Bub(b,n.c.length)),128);F.a.Bc(m)!=null;m.s=p++;AQc(m,C,w);n.c=KC(SI,Uhe,1,0,5,1)}}u=a.c.length+1;for(h=new olb(a);h.aD.s){uib(c);Lkb(D.i,d);if(d.c>0){d.a=D;Ekb(D.t,d);d.b=A;Ekb(A.i,d)}}}}} +function qde(a){var b,c,d,e,f;b=a.c;switch(b){case 11:return a.Ml();case 12:return a.Ol();case 14:return a.Ql();case 15:return a.Tl();case 16:return a.Rl();case 17:return a.Ul();case 21:nde(a);return wfe(),wfe(),ffe;case 10:switch(a.a){case 65:return a.yl();case 90:return a.Dl();case 122:return a.Kl();case 98:return a.El();case 66:return a.zl();case 60:return a.Jl();case 62:return a.Hl();}}f=pde(a);b=a.c;switch(b){case 3:return a.Zl(f);case 4:return a.Xl(f);case 5:return a.Yl(f);case 0:if(a.a==123&&a.d=48&&b<=57){d=b-48;while(e=48&&b<=57){d=d*10+b-48;if(d<0)throw vbb(new mde(tvd((h0d(),bve))))}}else{throw vbb(new mde(tvd((h0d(),Zue))))}c=d;if(b==44){if(e>=a.j){throw vbb(new mde(tvd((h0d(),_ue))))}else if((b=bfb(a.i,e++))>=48&&b<=57){c=b-48;while(e=48&&b<=57){c=c*10+b-48;if(c<0)throw vbb(new mde(tvd((h0d(),bve))))}if(d>c)throw vbb(new mde(tvd((h0d(),ave))))}else{c=-1}}if(b!=125)throw vbb(new mde(tvd((h0d(),$ue))));if(a.sl(e)){f=(wfe(),wfe(),++vfe,new lge(9,f));a.d=e+1}else{f=(wfe(),wfe(),++vfe,new lge(3,f));a.d=e}f.dm(d);f.cm(c);nde(a)}}return f} +function $bc(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F;p=new Skb(b.b);u=new Skb(b.b);m=new Skb(b.b);B=new Skb(b.b);q=new Skb(b.b);for(A=Jsb(b,0);A.b!=A.d.c;){v=BD(Xsb(A),11);for(h=new olb(v.g);h.a0;r=v.g.c.length>0;j&&r?(m.c[m.c.length]=v,true):j?(p.c[p.c.length]=v,true):r&&(u.c[u.c.length]=v,true)}for(o=new olb(p);o.a1){o=new Oyd((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a));while(o.e!=o.i.gc()){Eyd(o)}}g=BD(qud((!a.a&&(a.a=new cUd(A2,a,6,6)),a.a),0),202);q=H;H>v+u?(q=v+u):Hw+p?(r=w+p):Iv-u&&qw-p&&rH+G?(B=H+G):vI+A?(C=I+A):wH-G&&BI-A&&Cc&&(m=c-1);n=N+Cub(b,24)*lke*l-l/2;n<0?(n=1):n>d&&(n=d-1);e=(Fhd(),i=new xkd,i);vkd(e,m);wkd(e,n);wtd((!g.a&&(g.a=new xMd(y2,g,5)),g.a),e)}} +function Nyc(){Nyc=ccb;iyc=(Y9c(),I9c);jyc=J9c;kyc=K9c;lyc=L9c;nyc=M9c;oyc=N9c;ryc=P9c;tyc=R9c;uyc=S9c;syc=Q9c;vyc=T9c;xyc=U9c;zyc=X9c;qyc=O9c;hyc=(jwc(),Bvc);myc=Cvc;pyc=Dvc;wyc=Evc;byc=new Osd(D9c,meb(0));cyc=yvc;dyc=zvc;eyc=Avc;Kyc=awc;Cyc=Hvc;Dyc=Kvc;Gyc=Svc;Eyc=Nvc;Fyc=Pvc;Myc=fwc;Lyc=cwc;Iyc=Yvc;Hyc=Wvc;Jyc=$vc;Cxc=pvc;Dxc=qvc;Xwc=Auc;Ywc=Duc;Lxc=new q0b(12);Kxc=new Osd(f9c,Lxc);Twc=(Aad(),wad);Swc=new Osd(E8c,Twc);Uxc=new Osd(s9c,0);fyc=new Osd(E9c,meb(1));owc=new Osd(r8c,tme);Jxc=d9c;Vxc=t9c;$xc=A9c;Kwc=y8c;mwc=p8c;axc=J8c;gyc=new Osd(H9c,(Bcb(),true));fxc=M8c;gxc=N8c;Fxc=Y8c;Ixc=b9c;Gxc=$8c;Nwc=(ead(),cad);Lwc=new Osd(z8c,Nwc);xxc=W8c;wxc=U8c;Yxc=x9c;Xxc=w9c;Zxc=z9c;Oxc=(Tbd(),Sbd);new Osd(l9c,Oxc);Qxc=o9c;Rxc=p9c;Sxc=q9c;Pxc=n9c;Byc=Gvc;sxc=avc;rxc=$uc;Ayc=Fvc;mxc=Suc;Jwc=muc;Iwc=kuc;Awc=Xtc;Bwc=Ytc;Dwc=buc;Cwc=Ztc;Hwc=iuc;uxc=cvc;vxc=dvc;ixc=Luc;Exc=uvc;zxc=hvc;$wc=Guc;Bxc=nvc;Vwc=wuc;Wwc=yuc;zwc=w8c;yxc=evc;swc=Mtc;rwc=Ktc;qwc=Jtc;cxc=Juc;bxc=Iuc;dxc=Kuc;Hxc=_8c;jxc=Q8c;Zwc=G8c;Qwc=C8c;Pwc=B8c;Ewc=euc;Wxc=v9c;pwc=v8c;exc=L8c;Txc=r9c;Mxc=h9c;Nxc=j9c;oxc=Vuc;pxc=Xuc;ayc=C9c;nwc=Itc;qxc=Zuc;Rwc=suc;Owc=quc;txc=S8c;kxc=Puc;Axc=kvc;yyc=V9c;Mwc=ouc;_xc=wvc;Uwc=uuc;lxc=Ruc;Fwc=guc;hxc=P8c;nxc=Uuc;Gwc=huc;ywc=Vtc;wwc=Stc;uwc=Qtc;vwc=Rtc;xwc=Utc;twc=Otc;_wc=Huc} +function shb(a,b){phb();var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H;B=a.e;o=a.d;e=a.a;if(B==0){switch(b){case 0:return '0';case 1:return $je;case 2:return '0.00';case 3:return '0.000';case 4:return '0.0000';case 5:return '0.00000';case 6:return '0.000000';default:w=new Ufb;b<0?(w.a+='0E+',w):(w.a+='0E',w);w.a+=-b;return w.a;}}t=o*10+1+7;u=KC(TD,$ie,25,t+1,15,1);c=t;if(o==1){h=e[0];if(h<0){H=xbb(h,Yje);do{p=H;H=Abb(H,10);u[--c]=48+Tbb(Qbb(p,Ibb(H,10)))&aje}while(ybb(H,0)!=0)}else{H=h;do{p=H;H=H/10|0;u[--c]=48+(p-H*10)&aje}while(H!=0)}}else{D=KC(WD,oje,25,o,15,1);G=o;$fb(e,0,D,0,G);I:while(true){A=0;for(j=G-1;j>=0;j--){F=wbb(Nbb(A,32),xbb(D[j],Yje));r=qhb(F);D[j]=Tbb(r);A=Tbb(Obb(r,32))}s=Tbb(A);q=c;do{u[--c]=48+s%10&aje}while((s=s/10|0)!=0&&c!=0);d=9-q+c;for(i=0;i0;i++){u[--c]=48}l=G-1;for(;D[l]==0;l--){if(l==0){break I}}G=l+1}while(u[c]==48){++c}}n=B<0;g=t-c-b-1;if(b==0){n&&(u[--c]=45);return zfb(u,c,t-c)}if(b>0&&g>=-6){if(g>=0){k=c+g;for(m=t-1;m>=k;m--){u[m+1]=u[m]}u[++k]=46;n&&(u[--c]=45);return zfb(u,c,t-c+1)}for(l=2;l<-g+1;l++){u[--c]=48}u[--c]=46;u[--c]=48;n&&(u[--c]=45);return zfb(u,c,t-c)}C=c+1;f=t;v=new Vfb;n&&(v.a+='-',v);if(f-C>=1){Kfb(v,u[c]);v.a+='.';v.a+=zfb(u,c+1,t-c-1)}else{v.a+=zfb(u,c,t-c)}v.a+='E';g>0&&(v.a+='+',v);v.a+=''+g;return v.a} +function z$c(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;a.c=b;a.g=new Lqb;c=(Pgd(),new bhd(a.c));d=new YGb(c);UGb(d);t=GD(hkd(a.c,(d0c(),Y_c)));i=BD(hkd(a.c,$_c),316);v=BD(hkd(a.c,__c),429);g=BD(hkd(a.c,T_c),482);u=BD(hkd(a.c,Z_c),430);a.j=Edb(ED(hkd(a.c,a0c)));h=a.a;switch(i.g){case 0:h=a.a;break;case 1:h=a.b;break;case 2:h=a.i;break;case 3:h=a.e;break;case 4:h=a.f;break;default:throw vbb(new Wdb(Mre+(i.f!=null?i.f:''+i.g)));}a.d=new g_c(h,v,g);yNb(a.d,(XNb(),VNb),DD(hkd(a.c,V_c)));a.d.c=Ccb(DD(hkd(a.c,U_c)));if(Vod(a.c).i==0){return a.d}for(l=new Fyd(Vod(a.c));l.e!=l.i.gc();){k=BD(Dyd(l),33);n=k.g/2;m=k.f/2;w=new f7c(k.i+n,k.j+m);while(Mhb(a.g,w)){O6c(w,($wnd.Math.random()-0.5)*qme,($wnd.Math.random()-0.5)*qme)}p=BD(hkd(k,(Y9c(),S8c)),142);q=new aOb(w,new J6c(w.a-n-a.j/2-p.b,w.b-m-a.j/2-p.d,k.g+a.j+(p.b+p.c),k.f+a.j+(p.d+p.a)));Ekb(a.d.i,q);Rhb(a.g,w,new vgd(q,k))}switch(u.g){case 0:if(t==null){a.d.d=BD(Ikb(a.d.i,0),65)}else{for(s=new olb(a.d.i);s.a1&&(Gsb(k,r,k.c.b,k.c),true);Zsb(e)}}}r=s}}return k} +function $Bc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L;Odd(c,'Greedy cycle removal',1);t=b.a;L=t.c.length;a.a=KC(WD,oje,25,L,15,1);a.c=KC(WD,oje,25,L,15,1);a.b=KC(WD,oje,25,L,15,1);j=0;for(r=new olb(t);r.a0?G+1:1}for(g=new olb(w.g);g.a0?G+1:1}}a.c[j]==0?Dsb(a.e,p):a.a[j]==0&&Dsb(a.f,p);++j}o=-1;n=1;l=new Rkb;a.d=BD(vNb(b,(wtc(),jtc)),230);while(L>0){while(a.e.b!=0){I=BD(Lsb(a.e),10);a.b[I.p]=o--;_Bc(a,I);--L}while(a.f.b!=0){J=BD(Lsb(a.f),10);a.b[J.p]=n++;_Bc(a,J);--L}if(L>0){m=Rie;for(s=new olb(t);s.a=m){if(u>m){l.c=KC(SI,Uhe,1,0,5,1);m=u}l.c[l.c.length]=p}}}k=a.Zf(l);a.b[k.p]=n++;_Bc(a,k);--L}}H=t.c.length+1;for(j=0;ja.b[K]){PZb(d,true);yNb(b,Asc,(Bcb(),true))}}}}a.a=null;a.c=null;a.b=null;Osb(a.f);Osb(a.e);Qdd(c)} +function sQb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;d=new Rkb;h=new Rkb;q=b/2;n=a.gc();e=BD(a.Xb(0),8);r=BD(a.Xb(1),8);o=tQb(e.a,e.b,r.a,r.b,q);Ekb(d,(tCb(0,o.c.length),BD(o.c[0],8)));Ekb(h,(tCb(1,o.c.length),BD(o.c[1],8)));for(j=2;j=0;i--){Dsb(c,(tCb(i,g.c.length),BD(g.c[i],8)))}return c} +function aFd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;g=true;l=null;d=null;e=null;b=false;n=BEd;j=null;f=null;h=0;i=UEd(a,h,zEd,AEd);if(i=0&&dfb(a.substr(h,'//'.length),'//')){h+=2;i=UEd(a,h,CEd,DEd);d=a.substr(h,i-h);h=i}else if(l!=null&&(h==a.length||(BCb(h,a.length),a.charCodeAt(h)!=47))){g=false;i=ifb(a,wfb(35),h);i==-1&&(i=a.length);d=a.substr(h,i-h);h=i}if(!c&&h0&&bfb(k,k.length-1)==58){e=k;h=i}}if(h=a.j){a.a=-1;a.c=1;return}b=bfb(a.i,a.d++);a.a=b;if(a.b==1){switch(b){case 92:d=10;if(a.d>=a.j)throw vbb(new mde(tvd((h0d(),uue))));a.a=bfb(a.i,a.d++);break;case 45:if((a.e&512)==512&&a.d=a.j)break;if(bfb(a.i,a.d)!=63)break;if(++a.d>=a.j)throw vbb(new mde(tvd((h0d(),vue))));b=bfb(a.i,a.d++);switch(b){case 58:d=13;break;case 61:d=14;break;case 33:d=15;break;case 91:d=19;break;case 62:d=18;break;case 60:if(a.d>=a.j)throw vbb(new mde(tvd((h0d(),vue))));b=bfb(a.i,a.d++);if(b==61){d=16}else if(b==33){d=17}else throw vbb(new mde(tvd((h0d(),wue))));break;case 35:while(a.d=a.j)throw vbb(new mde(tvd((h0d(),uue))));a.a=bfb(a.i,a.d++);break;default:d=0;}a.c=d} +function P5b(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;A=BD(vNb(a,(Nyc(),Vxc)),98);if(!(A!=(dcd(),bcd)&&A!=ccd)){return}o=a.b;n=o.c.length;k=new Skb((Xj(n+2,Mie),Oy(wbb(wbb(5,n+2),(n+2)/10|0))));p=new Skb((Xj(n+2,Mie),Oy(wbb(wbb(5,n+2),(n+2)/10|0))));Ekb(k,new Lqb);Ekb(k,new Lqb);Ekb(p,new Rkb);Ekb(p,new Rkb);w=new Rkb;for(b=0;b=v||!wCc(r,d))&&(d=yCc(b,k));$_b(r,d);for(f=new Sr(ur(R_b(r).a.Kc(),new Sq));Qr(f);){e=BD(Rr(f),17);if(a.a[e.p]){continue}p=e.c.i;--a.e[p.p];a.e[p.p]==0&&(zCb(cub(n,p)),true)}}for(j=k.c.length-1;j>=0;--j){Ekb(b.b,(tCb(j,k.c.length),BD(k.c[j],29)))}b.a.c=KC(SI,Uhe,1,0,5,1);Qdd(c)} +function gee(a){var b,c,d,e,f,g,h,i,j;a.b=1;nde(a);b=null;if(a.c==0&&a.a==94){nde(a);b=(wfe(),wfe(),++vfe,new $fe(4));Ufe(b,0,lxe);h=(null,++vfe,new $fe(4))}else{h=(wfe(),wfe(),++vfe,new $fe(4))}e=true;while((j=a.c)!=1){if(j==0&&a.a==93&&!e){if(b){Zfe(b,h);h=b}break}c=a.a;d=false;if(j==10){switch(c){case 100:case 68:case 119:case 87:case 115:case 83:Xfe(h,fee(c));d=true;break;case 105:case 73:case 99:case 67:c=(Xfe(h,fee(c)),-1);c<0&&(d=true);break;case 112:case 80:i=tde(a,c);if(!i)throw vbb(new mde(tvd((h0d(),Iue))));Xfe(h,i);d=true;break;default:c=eee(a);}}else if(j==24&&!e){if(b){Zfe(b,h);h=b}f=gee(a);Zfe(h,f);if(a.c!=0||a.a!=93)throw vbb(new mde(tvd((h0d(),Mue))));break}nde(a);if(!d){if(j==0){if(c==91)throw vbb(new mde(tvd((h0d(),Nue))));if(c==93)throw vbb(new mde(tvd((h0d(),Oue))));if(c==45&&!e&&a.a!=93)throw vbb(new mde(tvd((h0d(),Pue))))}if(a.c!=0||a.a!=45||c==45&&e){Ufe(h,c,c)}else{nde(a);if((j=a.c)==1)throw vbb(new mde(tvd((h0d(),Kue))));if(j==0&&a.a==93){Ufe(h,c,c);Ufe(h,45,45)}else if(j==0&&a.a==93||j==24){throw vbb(new mde(tvd((h0d(),Pue))))}else{g=a.a;if(j==0){if(g==91)throw vbb(new mde(tvd((h0d(),Nue))));if(g==93)throw vbb(new mde(tvd((h0d(),Oue))));if(g==45)throw vbb(new mde(tvd((h0d(),Pue))))}else j==10&&(g=eee(a));nde(a);if(c>g)throw vbb(new mde(tvd((h0d(),Sue))));Ufe(h,c,g)}}}e=false}if(a.c==1)throw vbb(new mde(tvd((h0d(),Kue))));Yfe(h);Vfe(h);a.b=0;nde(a);return h} +function xZd(a){Bnd(a.c,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#decimal']));Bnd(a.d,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#integer']));Bnd(a.e,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#boolean']));Bnd(a.f,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EBoolean',fue,'EBoolean:Object']));Bnd(a.i,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#byte']));Bnd(a.g,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#hexBinary']));Bnd(a.j,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EByte',fue,'EByte:Object']));Bnd(a.n,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EChar',fue,'EChar:Object']));Bnd(a.t,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#double']));Bnd(a.u,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EDouble',fue,'EDouble:Object']));Bnd(a.F,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#float']));Bnd(a.G,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EFloat',fue,'EFloat:Object']));Bnd(a.I,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#int']));Bnd(a.J,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EInt',fue,'EInt:Object']));Bnd(a.N,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#long']));Bnd(a.O,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'ELong',fue,'ELong:Object']));Bnd(a.Z,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#short']));Bnd(a.$,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'EShort',fue,'EShort:Object']));Bnd(a._,Rve,OC(GC(ZI,1),nie,2,6,[cwe,'http://www.w3.org/2001/XMLSchema#string']))} +function fRc(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G;if(a.c.length==1){return tCb(0,a.c.length),BD(a.c[0],135)}else if(a.c.length<=0){return new SRc}for(i=new olb(a);i.al){F=0;G+=k+A;k=0}eRc(v,g,F,G);b=$wnd.Math.max(b,F+w.a);k=$wnd.Math.max(k,w.b);F+=w.a+A}u=new Lqb;c=new Lqb;for(C=new olb(a);C.aSLc(f))&&(l=f)}}!l&&(l=(tCb(0,q.c.length),BD(q.c[0],180)));for(p=new olb(b.b);p.a=-1900?1:0;c>=4?Qfb(a,OC(GC(ZI,1),nie,2,6,[pje,qje])[h]):Qfb(a,OC(GC(ZI,1),nie,2,6,['BC','AD'])[h]);break;case 121:kA(a,c,d);break;case 77:jA(a,c,d);break;case 107:i=e.q.getHours();i==0?EA(a,24,c):EA(a,i,c);break;case 83:iA(a,c,e);break;case 69:k=d.q.getDay();c==5?Qfb(a,OC(GC(ZI,1),nie,2,6,['S','M','T','W','T','F','S'])[k]):c==4?Qfb(a,OC(GC(ZI,1),nie,2,6,[rje,sje,tje,uje,vje,wje,xje])[k]):Qfb(a,OC(GC(ZI,1),nie,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat'])[k]);break;case 97:e.q.getHours()>=12&&e.q.getHours()<24?Qfb(a,OC(GC(ZI,1),nie,2,6,['AM','PM'])[1]):Qfb(a,OC(GC(ZI,1),nie,2,6,['AM','PM'])[0]);break;case 104:l=e.q.getHours()%12;l==0?EA(a,12,c):EA(a,l,c);break;case 75:m=e.q.getHours()%12;EA(a,m,c);break;case 72:n=e.q.getHours();EA(a,n,c);break;case 99:o=d.q.getDay();c==5?Qfb(a,OC(GC(ZI,1),nie,2,6,['S','M','T','W','T','F','S'])[o]):c==4?Qfb(a,OC(GC(ZI,1),nie,2,6,[rje,sje,tje,uje,vje,wje,xje])[o]):c==3?Qfb(a,OC(GC(ZI,1),nie,2,6,['Sun','Mon','Tue','Wed','Thu','Fri','Sat'])[o]):EA(a,o,1);break;case 76:p=d.q.getMonth();c==5?Qfb(a,OC(GC(ZI,1),nie,2,6,['J','F','M','A','M','J','J','A','S','O','N','D'])[p]):c==4?Qfb(a,OC(GC(ZI,1),nie,2,6,[bje,cje,dje,eje,fje,gje,hje,ije,jje,kje,lje,mje])[p]):c==3?Qfb(a,OC(GC(ZI,1),nie,2,6,['Jan','Feb','Mar','Apr',fje,'Jun','Jul','Aug','Sep','Oct','Nov','Dec'])[p]):EA(a,p+1,c);break;case 81:q=d.q.getMonth()/3|0;c<4?Qfb(a,OC(GC(ZI,1),nie,2,6,['Q1','Q2','Q3','Q4'])[q]):Qfb(a,OC(GC(ZI,1),nie,2,6,['1st quarter','2nd quarter','3rd quarter','4th quarter'])[q]);break;case 100:r=d.q.getDate();EA(a,r,c);break;case 109:j=e.q.getMinutes();EA(a,j,c);break;case 115:g=e.q.getSeconds();EA(a,g,c);break;case 122:c<4?Qfb(a,f.c[0]):Qfb(a,f.c[1]);break;case 118:Qfb(a,f.b);break;case 90:c<3?Qfb(a,OA(f)):c==3?Qfb(a,NA(f)):Qfb(a,QA(f.a));break;default:return false;}return true} +function X1b(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H;N1b(b);i=BD(qud((!b.b&&(b.b=new y5d(z2,b,4,7)),b.b),0),82);k=BD(qud((!b.c&&(b.c=new y5d(z2,b,5,8)),b.c),0),82);h=atd(i);j=atd(k);g=(!b.a&&(b.a=new cUd(A2,b,6,6)),b.a).i==0?null:BD(qud((!b.a&&(b.a=new cUd(A2,b,6,6)),b.a),0),202);A=BD(Ohb(a.a,h),10);F=BD(Ohb(a.a,j),10);B=null;G=null;if(JD(i,186)){w=BD(Ohb(a.a,i),299);if(JD(w,11)){B=BD(w,11)}else if(JD(w,10)){A=BD(w,10);B=BD(Ikb(A.j,0),11)}}if(JD(k,186)){D=BD(Ohb(a.a,k),299);if(JD(D,11)){G=BD(D,11)}else if(JD(D,10)){F=BD(D,10);G=BD(Ikb(F.j,0),11)}}if(!A||!F){throw vbb(new z2c('The source or the target of edge '+b+' could not be found. '+'This usually happens when an edge connects a node laid out by ELK Layered to a node in '+'another level of hierarchy laid out by either another instance of ELK Layered or another '+'layout algorithm alltogether. The former can be solved by setting the hierarchyHandling '+'option to INCLUDE_CHILDREN.'))}p=new UZb;tNb(p,b);yNb(p,(wtc(),$sc),b);yNb(p,(Nyc(),jxc),null);n=BD(vNb(d,Ksc),21);A==F&&n.Fc((Orc(),Nrc));if(!B){v=(KAc(),IAc);C=null;if(!!g&&fcd(BD(vNb(A,Vxc),98))){C=new f7c(g.j,g.k);Bfd(C,Mld(b));Cfd(C,c);if(ntd(j,h)){v=HAc;P6c(C,A.n)}}B=$$b(A,C,v,d)}if(!G){v=(KAc(),HAc);H=null;if(!!g&&fcd(BD(vNb(F,Vxc),98))){H=new f7c(g.b,g.c);Bfd(H,Mld(b));Cfd(H,c)}G=$$b(F,H,v,Q_b(F))}QZb(p,B);RZb(p,G);(B.e.c.length>1||B.g.c.length>1||G.e.c.length>1||G.g.c.length>1)&&n.Fc((Orc(),Irc));for(m=new Fyd((!b.n&&(b.n=new cUd(D2,b,1,7)),b.n));m.e!=m.i.gc();){l=BD(Dyd(m),137);if(!Ccb(DD(hkd(l,Jxc)))&&!!l.a){q=Z1b(l);Ekb(p.b,q);switch(BD(vNb(q,Qwc),272).g){case 1:case 2:n.Fc((Orc(),Grc));break;case 0:n.Fc((Orc(),Erc));yNb(q,Qwc,(qad(),nad));}}}f=BD(vNb(d,Iwc),314);r=BD(vNb(d,Exc),315);e=f==(Rpc(),Opc)||r==(Vzc(),Rzc);if(!!g&&(!g.a&&(g.a=new xMd(y2,g,5)),g.a).i!=0&&e){s=ofd(g);o=new s7c;for(u=Jsb(s,0);u.b!=u.d.c;){t=BD(Xsb(u),8);Dsb(o,new g7c(t))}yNb(p,_sc,o)}return p} +function yZd(a){if(a.gb)return;a.gb=true;a.b=Lnd(a,0);Knd(a.b,18);Qnd(a.b,19);a.a=Lnd(a,1);Knd(a.a,1);Qnd(a.a,2);Qnd(a.a,3);Qnd(a.a,4);Qnd(a.a,5);a.o=Lnd(a,2);Knd(a.o,8);Knd(a.o,9);Qnd(a.o,10);Qnd(a.o,11);Qnd(a.o,12);Qnd(a.o,13);Qnd(a.o,14);Qnd(a.o,15);Qnd(a.o,16);Qnd(a.o,17);Qnd(a.o,18);Qnd(a.o,19);Qnd(a.o,20);Qnd(a.o,21);Qnd(a.o,22);Qnd(a.o,23);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);Pnd(a.o);a.p=Lnd(a,3);Knd(a.p,2);Knd(a.p,3);Knd(a.p,4);Knd(a.p,5);Qnd(a.p,6);Qnd(a.p,7);Pnd(a.p);Pnd(a.p);a.q=Lnd(a,4);Knd(a.q,8);a.v=Lnd(a,5);Qnd(a.v,9);Pnd(a.v);Pnd(a.v);Pnd(a.v);a.w=Lnd(a,6);Knd(a.w,2);Knd(a.w,3);Knd(a.w,4);Qnd(a.w,5);a.B=Lnd(a,7);Qnd(a.B,1);Pnd(a.B);Pnd(a.B);Pnd(a.B);a.Q=Lnd(a,8);Qnd(a.Q,0);Pnd(a.Q);a.R=Lnd(a,9);Knd(a.R,1);a.S=Lnd(a,10);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);Pnd(a.S);a.T=Lnd(a,11);Qnd(a.T,10);Qnd(a.T,11);Qnd(a.T,12);Qnd(a.T,13);Qnd(a.T,14);Pnd(a.T);Pnd(a.T);a.U=Lnd(a,12);Knd(a.U,2);Knd(a.U,3);Qnd(a.U,4);Qnd(a.U,5);Qnd(a.U,6);Qnd(a.U,7);Pnd(a.U);a.V=Lnd(a,13);Qnd(a.V,10);a.W=Lnd(a,14);Knd(a.W,18);Knd(a.W,19);Knd(a.W,20);Qnd(a.W,21);Qnd(a.W,22);Qnd(a.W,23);a.bb=Lnd(a,15);Knd(a.bb,10);Knd(a.bb,11);Knd(a.bb,12);Knd(a.bb,13);Knd(a.bb,14);Knd(a.bb,15);Knd(a.bb,16);Qnd(a.bb,17);Pnd(a.bb);Pnd(a.bb);a.eb=Lnd(a,16);Knd(a.eb,2);Knd(a.eb,3);Knd(a.eb,4);Knd(a.eb,5);Knd(a.eb,6);Knd(a.eb,7);Qnd(a.eb,8);Qnd(a.eb,9);a.ab=Lnd(a,17);Knd(a.ab,0);Knd(a.ab,1);a.H=Lnd(a,18);Qnd(a.H,0);Qnd(a.H,1);Qnd(a.H,2);Qnd(a.H,3);Qnd(a.H,4);Qnd(a.H,5);Pnd(a.H);a.db=Lnd(a,19);Qnd(a.db,2);a.c=Mnd(a,20);a.d=Mnd(a,21);a.e=Mnd(a,22);a.f=Mnd(a,23);a.i=Mnd(a,24);a.g=Mnd(a,25);a.j=Mnd(a,26);a.k=Mnd(a,27);a.n=Mnd(a,28);a.r=Mnd(a,29);a.s=Mnd(a,30);a.t=Mnd(a,31);a.u=Mnd(a,32);a.fb=Mnd(a,33);a.A=Mnd(a,34);a.C=Mnd(a,35);a.D=Mnd(a,36);a.F=Mnd(a,37);a.G=Mnd(a,38);a.I=Mnd(a,39);a.J=Mnd(a,40);a.L=Mnd(a,41);a.M=Mnd(a,42);a.N=Mnd(a,43);a.O=Mnd(a,44);a.P=Mnd(a,45);a.X=Mnd(a,46);a.Y=Mnd(a,47);a.Z=Mnd(a,48);a.$=Mnd(a,49);a._=Mnd(a,50);a.cb=Mnd(a,51);a.K=Mnd(a,52)} +function Y9c(){Y9c=ccb;var a,b;o8c=new Lsd(sse);F9c=new Lsd(tse);q8c=(F7c(),z7c);p8c=new Nsd($pe,q8c);new Tfd;r8c=new Nsd(_le,null);s8c=new Lsd(use);x8c=(i8c(),qqb(h8c,OC(GC(r1,1),Kie,291,0,[d8c])));w8c=new Nsd(lqe,x8c);y8c=new Nsd(Zpe,(Bcb(),false));A8c=(ead(),cad);z8c=new Nsd(cqe,A8c);F8c=(Aad(),zad);E8c=new Nsd(ype,F8c);I8c=new Nsd(Jre,false);K8c=(hbd(),fbd);J8c=new Nsd(tpe,K8c);g9c=new q0b(12);f9c=new Nsd(ame,g9c);O8c=new Nsd(Ame,false);P8c=new Nsd(xqe,false);e9c=new Nsd(Dme,false);u9c=(dcd(),ccd);t9c=new Nsd(Bme,u9c);C9c=new Lsd(uqe);D9c=new Lsd(vme);E9c=new Lsd(yme);H9c=new Lsd(zme);R8c=new s7c;Q8c=new Nsd(mqe,R8c);v8c=new Nsd(pqe,false);L8c=new Nsd(qqe,false);new Lsd(vse);T8c=new H_b;S8c=new Nsd(vqe,T8c);d9c=new Nsd(Xpe,false);new Tfd;G9c=new Nsd(wse,1);new Nsd(xse,true);meb(0);new Nsd(yse,meb(100));new Nsd(zse,false);meb(0);new Nsd(Ase,meb(4000));meb(0);new Nsd(Bse,meb(400));new Nsd(Cse,false);new Nsd(Dse,false);new Nsd(Ese,true);new Nsd(Fse,false);u8c=(Ded(),Ced);t8c=new Nsd(rse,u8c);I9c=new Nsd(Lpe,10);J9c=new Nsd(Mpe,10);K9c=new Nsd(Zle,20);L9c=new Nsd(Npe,10);M9c=new Nsd(xme,2);N9c=new Nsd(Ope,10);P9c=new Nsd(Ppe,0);Q9c=new Nsd(Spe,5);R9c=new Nsd(Qpe,1);S9c=new Nsd(Rpe,1);T9c=new Nsd(wme,20);U9c=new Nsd(Tpe,10);X9c=new Nsd(Upe,10);O9c=new Lsd(Vpe);W9c=new I_b;V9c=new Nsd(wqe,W9c);j9c=new Lsd(tqe);i9c=false;h9c=new Nsd(sqe,i9c);V8c=new q0b(5);U8c=new Nsd(dqe,V8c);X8c=(Hbd(),b=BD(gdb(B1),9),new xqb(b,BD(_Bb(b,b.length),9),0));W8c=new Nsd(Gme,X8c);m9c=(Tbd(),Qbd);l9c=new Nsd(gqe,m9c);o9c=new Lsd(hqe);p9c=new Lsd(iqe);q9c=new Lsd(jqe);n9c=new Lsd(kqe);Z8c=(a=BD(gdb(I1),9),new xqb(a,BD(_Bb(a,a.length),9),0));Y8c=new Nsd(Fme,Z8c);c9c=pqb((Idd(),Bdd));b9c=new Nsd(Eme,c9c);a9c=new f7c(0,0);_8c=new Nsd(Tme,a9c);$8c=new Nsd(bqe,false);D8c=(qad(),nad);C8c=new Nsd(nqe,D8c);B8c=new Nsd(Cme,false);new Lsd(Gse);meb(1);new Nsd(Hse,null);r9c=new Lsd(rqe);v9c=new Lsd(oqe);B9c=(Ucd(),Scd);A9c=new Nsd(Ype,B9c);s9c=new Lsd(Wpe);y9c=(rcd(),pqb(pcd));x9c=new Nsd(Hme,y9c);w9c=new Nsd(eqe,false);z9c=new Nsd(fqe,true);M8c=new Nsd(_pe,false);N8c=new Nsd(aqe,false);G8c=new Nsd($le,1);H8c=(Mad(),Kad);new Nsd(Ise,H8c);k9c=true} +function wtc(){wtc=ccb;var a,b;$sc=new Lsd(Ime);xsc=new Lsd('coordinateOrigin');itc=new Lsd('processors');wsc=new Msd('compoundNode',(Bcb(),false));Nsc=new Msd('insideConnections',false);_sc=new Lsd('originalBendpoints');atc=new Lsd('originalDummyNodePosition');btc=new Lsd('originalLabelEdge');ktc=new Lsd('representedLabels');Csc=new Lsd('endLabels');Dsc=new Lsd('endLabel.origin');Ssc=new Msd('labelSide',(rbd(),qbd));Ysc=new Msd('maxEdgeThickness',0);ltc=new Msd('reversed',false);jtc=new Lsd(Jme);Vsc=new Msd('longEdgeSource',null);Wsc=new Msd('longEdgeTarget',null);Usc=new Msd('longEdgeHasLabelDummies',false);Tsc=new Msd('longEdgeBeforeLabelDummy',false);Bsc=new Msd('edgeConstraint',(Gqc(),Eqc));Psc=new Lsd('inLayerLayoutUnit');Osc=new Msd('inLayerConstraint',(esc(),csc));Qsc=new Msd('inLayerSuccessorConstraint',new Rkb);Rsc=new Msd('inLayerSuccessorConstraintBetweenNonDummies',false);gtc=new Lsd('portDummy');ysc=new Msd('crossingHint',meb(0));Ksc=new Msd('graphProperties',(b=BD(gdb(PW),9),new xqb(b,BD(_Bb(b,b.length),9),0)));Hsc=new Msd('externalPortSide',(Ucd(),Scd));Isc=new Msd('externalPortSize',new d7c);Fsc=new Lsd('externalPortReplacedDummies');Gsc=new Lsd('externalPortReplacedDummy');Esc=new Msd('externalPortConnections',(a=BD(gdb(F1),9),new xqb(a,BD(_Bb(a,a.length),9),0)));htc=new Msd(tle,0);ssc=new Lsd('barycenterAssociates');vtc=new Lsd('TopSideComments');tsc=new Lsd('BottomSideComments');vsc=new Lsd('CommentConnectionPort');Msc=new Msd('inputCollect',false);etc=new Msd('outputCollect',false);Asc=new Msd('cyclic',false);zsc=new Lsd('crossHierarchyMap');utc=new Lsd('targetOffset');new Msd('splineLabelSize',new d7c);otc=new Lsd('spacings');ftc=new Msd('partitionConstraint',false);usc=new Lsd('breakingPoint.info');stc=new Lsd('splines.survivingEdge');rtc=new Lsd('splines.route.start');ptc=new Lsd('splines.edgeChain');dtc=new Lsd('originalPortConstraints');ntc=new Lsd('selfLoopHolder');qtc=new Lsd('splines.nsPortY');Zsc=new Lsd('modelOrder');Xsc=new Lsd('longEdgeTargetNode');Jsc=new Msd(Xne,false);mtc=new Msd(Xne,false);Lsc=new Lsd('layerConstraints.hiddenNodes');ctc=new Lsd('layerConstraints.opposidePort');ttc=new Lsd('targetNode.modelOrder')} +function jwc(){jwc=ccb;puc=(xqc(),vqc);ouc=new Nsd(Yne,puc);Guc=new Nsd(Zne,(Bcb(),false));Muc=(msc(),ksc);Luc=new Nsd($ne,Muc);cvc=new Nsd(_ne,false);dvc=new Nsd(aoe,true);Itc=new Nsd(boe,false);xvc=(BAc(),zAc);wvc=new Nsd(coe,xvc);meb(1);Fvc=new Nsd(doe,meb(7));Gvc=new Nsd(eoe,false);Huc=new Nsd(foe,false);nuc=(mqc(),iqc);muc=new Nsd(goe,nuc);bvc=(lzc(),jzc);avc=new Nsd(hoe,bvc);Tuc=(Ctc(),Btc);Suc=new Nsd(ioe,Tuc);meb(-1);Ruc=new Nsd(joe,meb(-1));meb(-1);Uuc=new Nsd(koe,meb(-1));meb(-1);Vuc=new Nsd(loe,meb(4));meb(-1);Xuc=new Nsd(moe,meb(2));_uc=(kAc(),iAc);$uc=new Nsd(noe,_uc);meb(0);Zuc=new Nsd(ooe,meb(0));Puc=new Nsd(poe,meb(Ohe));luc=(Rpc(),Ppc);kuc=new Nsd(qoe,luc);Xtc=new Nsd(roe,false);euc=new Nsd(soe,0.1);iuc=new Nsd(toe,false);meb(-1);guc=new Nsd(uoe,meb(-1));meb(-1);huc=new Nsd(voe,meb(-1));meb(0);Ytc=new Nsd(woe,meb(40));cuc=(Xrc(),Wrc);buc=new Nsd(xoe,cuc);$tc=Urc;Ztc=new Nsd(yoe,$tc);vvc=(Vzc(),Qzc);uvc=new Nsd(zoe,vvc);kvc=new Lsd(Aoe);fvc=(_qc(),Zqc);evc=new Nsd(Boe,fvc);ivc=(lrc(),irc);hvc=new Nsd(Coe,ivc);new Tfd;nvc=new Nsd(Doe,0.3);pvc=new Lsd(Eoe);rvc=(Izc(),Gzc);qvc=new Nsd(Foe,rvc);xuc=(TAc(),RAc);wuc=new Nsd(Goe,xuc);zuc=(_Ac(),$Ac);yuc=new Nsd(Hoe,zuc);Buc=(tBc(),sBc);Auc=new Nsd(Ioe,Buc);Duc=new Nsd(Joe,0.2);uuc=new Nsd(Koe,2);Bvc=new Nsd(Loe,null);Dvc=new Nsd(Moe,10);Cvc=new Nsd(Noe,10);Evc=new Nsd(Ooe,20);meb(0);yvc=new Nsd(Poe,meb(0));meb(0);zvc=new Nsd(Qoe,meb(0));meb(0);Avc=new Nsd(Roe,meb(0));Jtc=new Nsd(Soe,false);Ntc=(yrc(),wrc);Mtc=new Nsd(Toe,Ntc);Ltc=(Ipc(),Hpc);Ktc=new Nsd(Uoe,Ltc);Juc=new Nsd(Voe,false);meb(0);Iuc=new Nsd(Woe,meb(16));meb(0);Kuc=new Nsd(Xoe,meb(5));bwc=(LBc(),JBc);awc=new Nsd(Yoe,bwc);Hvc=new Nsd(Zoe,10);Kvc=new Nsd($oe,1);Tvc=(bqc(),aqc);Svc=new Nsd(_oe,Tvc);Nvc=new Lsd(ape);Qvc=meb(1);meb(0);Pvc=new Nsd(bpe,Qvc);gwc=(CBc(),zBc);fwc=new Nsd(cpe,gwc);cwc=new Lsd(dpe);Yvc=new Nsd(epe,true);Wvc=new Nsd(fpe,2);$vc=new Nsd(gpe,true);tuc=(Sqc(),Qqc);suc=new Nsd(hpe,tuc);ruc=(Apc(),wpc);quc=new Nsd(ipe,ruc);Wtc=(tAc(),rAc);Vtc=new Nsd(jpe,Wtc);Utc=new Nsd(kpe,false);Ptc=(RXb(),QXb);Otc=new Nsd(lpe,Ptc);Ttc=(xzc(),uzc);Stc=new Nsd(mpe,Ttc);Qtc=new Nsd(npe,0);Rtc=new Nsd(ope,0);Ouc=kqc;Nuc=Opc;Wuc=izc;Yuc=izc;Quc=fzc;fuc=(hbd(),ebd);juc=Ppc;duc=Ppc;_tc=Ppc;auc=ebd;lvc=Tzc;mvc=Qzc;gvc=Qzc;jvc=Qzc;ovc=Szc;tvc=Tzc;svc=Tzc;Cuc=(Aad(),yad);Euc=yad;Fuc=sBc;vuc=xad;Ivc=KBc;Jvc=IBc;Lvc=KBc;Mvc=IBc;Uvc=KBc;Vvc=IBc;Ovc=_pc;Rvc=aqc;hwc=KBc;iwc=IBc;dwc=KBc;ewc=IBc;Zvc=IBc;Xvc=IBc;_vc=IBc} +function S8b(){S8b=ccb;Y7b=new T8b('DIRECTION_PREPROCESSOR',0);V7b=new T8b('COMMENT_PREPROCESSOR',1);Z7b=new T8b('EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER',2);n8b=new T8b('INTERACTIVE_EXTERNAL_PORT_POSITIONER',3);G8b=new T8b('PARTITION_PREPROCESSOR',4);r8b=new T8b('LABEL_DUMMY_INSERTER',5);M8b=new T8b('SELF_LOOP_PREPROCESSOR',6);w8b=new T8b('LAYER_CONSTRAINT_PREPROCESSOR',7);E8b=new T8b('PARTITION_MIDPROCESSOR',8);i8b=new T8b('HIGH_DEGREE_NODE_LAYER_PROCESSOR',9);A8b=new T8b('NODE_PROMOTION',10);v8b=new T8b('LAYER_CONSTRAINT_POSTPROCESSOR',11);F8b=new T8b('PARTITION_POSTPROCESSOR',12);e8b=new T8b('HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR',13);O8b=new T8b('SEMI_INTERACTIVE_CROSSMIN_PROCESSOR',14);P7b=new T8b('BREAKING_POINT_INSERTER',15);z8b=new T8b('LONG_EDGE_SPLITTER',16);I8b=new T8b('PORT_SIDE_PROCESSOR',17);o8b=new T8b('INVERTED_PORT_PROCESSOR',18);H8b=new T8b('PORT_LIST_SORTER',19);Q8b=new T8b('SORT_BY_INPUT_ORDER_OF_MODEL',20);C8b=new T8b('NORTH_SOUTH_PORT_PREPROCESSOR',21);Q7b=new T8b('BREAKING_POINT_PROCESSOR',22);D8b=new T8b(Bne,23);R8b=new T8b(Cne,24);K8b=new T8b('SELF_LOOP_PORT_RESTORER',25);P8b=new T8b('SINGLE_EDGE_GRAPH_WRAPPER',26);p8b=new T8b('IN_LAYER_CONSTRAINT_PROCESSOR',27);b8b=new T8b('END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR',28);q8b=new T8b('LABEL_AND_NODE_SIZE_PROCESSOR',29);m8b=new T8b('INNERMOST_NODE_MARGIN_CALCULATOR',30);N8b=new T8b('SELF_LOOP_ROUTER',31);T7b=new T8b('COMMENT_NODE_MARGIN_CALCULATOR',32);_7b=new T8b('END_LABEL_PREPROCESSOR',33);t8b=new T8b('LABEL_DUMMY_SWITCHER',34);S7b=new T8b('CENTER_LABEL_MANAGEMENT_PROCESSOR',35);u8b=new T8b('LABEL_SIDE_SELECTOR',36);k8b=new T8b('HYPEREDGE_DUMMY_MERGER',37);f8b=new T8b('HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR',38);x8b=new T8b('LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR',39);h8b=new T8b('HIERARCHICAL_PORT_POSITION_PROCESSOR',40);W7b=new T8b('CONSTRAINTS_POSTPROCESSOR',41);U7b=new T8b('COMMENT_POSTPROCESSOR',42);l8b=new T8b('HYPERNODE_PROCESSOR',43);g8b=new T8b('HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER',44);y8b=new T8b('LONG_EDGE_JOINER',45);L8b=new T8b('SELF_LOOP_POSTPROCESSOR',46);R7b=new T8b('BREAKING_POINT_REMOVER',47);B8b=new T8b('NORTH_SOUTH_PORT_POSTPROCESSOR',48);j8b=new T8b('HORIZONTAL_COMPACTOR',49);s8b=new T8b('LABEL_DUMMY_REMOVER',50);c8b=new T8b('FINAL_SPLINE_BENDPOINTS_CALCULATOR',51);a8b=new T8b('END_LABEL_SORTER',52);J8b=new T8b('REVERSED_EDGE_RESTORER',53);$7b=new T8b('END_LABEL_POSTPROCESSOR',54);d8b=new T8b('HIERARCHICAL_NODE_RESIZER',55);X7b=new T8b('DIRECTION_POSTPROCESSOR',56)} +function KIc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B,C,D,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,ab,bb,cb,db,eb,fb,gb,hb,ib,jb,kb,lb;cb=0;for(H=b,K=0,N=H.length;K0&&(a.a[U.p]=cb++)}}hb=0;for(I=c,L=0,O=I.length;L0){U=(sCb(Y.b>0),BD(Y.a.Xb(Y.c=--Y.b),11));X=0;for(h=new olb(U.e);h.a0){if(U.j==(Ucd(),Acd)){a.a[U.p]=hb;++hb}else{a.a[U.p]=hb+P+R;++R}}}hb+=R}W=new Lqb;o=new zsb;for(G=b,J=0,M=G.length;Jj.b&&(j.b=Z)}else if(U.i.c==bb){Zj.c&&(j.c=Z)}}}Klb(p,0,p.length,null);gb=KC(WD,oje,25,p.length,15,1);d=KC(WD,oje,25,hb+1,15,1);for(r=0;r0){A%2>0&&(e+=kb[A+1]);A=(A-1)/2|0;++kb[A]}}C=KC(nY,Uhe,362,p.length*2,0,1);for(u=0;u'?":dfb(wue,a)?"'(?<' or '(? toIndex: ',zke=', toIndex: ',Ake='Index: ',Bke=', Size: ',Cke='org.eclipse.elk.alg.common',Dke={62:1},Eke='org.eclipse.elk.alg.common.compaction',Fke='Scanline/EventHandler',Gke='org.eclipse.elk.alg.common.compaction.oned',Hke='CNode belongs to another CGroup.',Ike='ISpacingsHandler/1',Jke='The ',Kke=' instance has been finished already.',Lke='The direction ',Mke=' is not supported by the CGraph instance.',Nke='OneDimensionalCompactor',Oke='OneDimensionalCompactor/lambda$0$Type',Pke='Quadruplet',Qke='ScanlineConstraintCalculator',Rke='ScanlineConstraintCalculator/ConstraintsScanlineHandler',Ske='ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type',Tke='ScanlineConstraintCalculator/Timestamp',Uke='ScanlineConstraintCalculator/lambda$0$Type',Vke={169:1,45:1},Wke='org.eclipse.elk.alg.common.compaction.options',Xke='org.eclipse.elk.core.data',Yke='org.eclipse.elk.polyomino.traversalStrategy',Zke='org.eclipse.elk.polyomino.lowLevelSort',$ke='org.eclipse.elk.polyomino.highLevelSort',_ke='org.eclipse.elk.polyomino.fill',ale={130:1},ble='polyomino',cle='org.eclipse.elk.alg.common.networksimplex',dle={177:1,3:1,4:1},ele='org.eclipse.elk.alg.common.nodespacing',fle='org.eclipse.elk.alg.common.nodespacing.cellsystem',gle='CENTER',hle={212:1,326:1},ile={3:1,4:1,5:1,595:1},jle='LEFT',kle='RIGHT',lle='Vertical alignment cannot be null',mle='BOTTOM',nle='org.eclipse.elk.alg.common.nodespacing.internal',ole='UNDEFINED',ple=0.01,qle='org.eclipse.elk.alg.common.nodespacing.internal.algorithm',rle='LabelPlacer/lambda$0$Type',sle='LabelPlacer/lambda$1$Type',tle='portRatioOrPosition',ule='org.eclipse.elk.alg.common.overlaps',vle='DOWN',wle='org.eclipse.elk.alg.common.polyomino',xle='NORTH',yle='EAST',zle='SOUTH',Ale='WEST',Ble='org.eclipse.elk.alg.common.polyomino.structures',Cle='Direction',Dle='Grid is only of size ',Ele='. Requested point (',Fle=') is out of bounds.',Gle=' Given center based coordinates were (',Hle='org.eclipse.elk.graph.properties',Ile='IPropertyHolder',Jle={3:1,94:1,134:1},Kle='org.eclipse.elk.alg.common.spore',Lle='org.eclipse.elk.alg.common.utils',Mle={209:1},Nle='org.eclipse.elk.core',Ole='Connected Components Compaction',Ple='org.eclipse.elk.alg.disco',Qle='org.eclipse.elk.alg.disco.graph',Rle='org.eclipse.elk.alg.disco.options',Sle='CompactionStrategy',Tle='org.eclipse.elk.disco.componentCompaction.strategy',Ule='org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm',Vle='org.eclipse.elk.disco.debug.discoGraph',Wle='org.eclipse.elk.disco.debug.discoPolys',Xle='componentCompaction',Yle='org.eclipse.elk.disco',Zle='org.eclipse.elk.spacing.componentComponent',$le='org.eclipse.elk.edge.thickness',_le='org.eclipse.elk.aspectRatio',ame='org.eclipse.elk.padding',bme='org.eclipse.elk.alg.disco.transform',cme=1.5707963267948966,dme=1.7976931348623157E308,eme={3:1,4:1,5:1,192:1},fme={3:1,6:1,4:1,5:1,106:1,120:1},gme='org.eclipse.elk.alg.force',hme='ComponentsProcessor',ime='ComponentsProcessor/1',jme='org.eclipse.elk.alg.force.graph',kme='Component Layout',lme='org.eclipse.elk.alg.force.model',mme='org.eclipse.elk.force.model',nme='org.eclipse.elk.force.iterations',ome='org.eclipse.elk.force.repulsivePower',pme='org.eclipse.elk.force.temperature',qme=0.001,rme='org.eclipse.elk.force.repulsion',sme='org.eclipse.elk.alg.force.options',tme=1.600000023841858,ume='org.eclipse.elk.force',vme='org.eclipse.elk.priority',wme='org.eclipse.elk.spacing.nodeNode',xme='org.eclipse.elk.spacing.edgeLabel',yme='org.eclipse.elk.randomSeed',zme='org.eclipse.elk.separateConnectedComponents',Ame='org.eclipse.elk.interactive',Bme='org.eclipse.elk.portConstraints',Cme='org.eclipse.elk.edgeLabels.inline',Dme='org.eclipse.elk.omitNodeMicroLayout',Eme='org.eclipse.elk.nodeSize.options',Fme='org.eclipse.elk.nodeSize.constraints',Gme='org.eclipse.elk.nodeLabels.placement',Hme='org.eclipse.elk.portLabels.placement',Ime='origin',Jme='random',Kme='boundingBox.upLeft',Lme='boundingBox.lowRight',Mme='org.eclipse.elk.stress.fixed',Nme='org.eclipse.elk.stress.desiredEdgeLength',Ome='org.eclipse.elk.stress.dimension',Pme='org.eclipse.elk.stress.epsilon',Qme='org.eclipse.elk.stress.iterationLimit',Rme='org.eclipse.elk.stress',Sme='ELK Stress',Tme='org.eclipse.elk.nodeSize.minimum',Ume='org.eclipse.elk.alg.force.stress',Vme='Layered layout',Wme='org.eclipse.elk.alg.layered',Xme='org.eclipse.elk.alg.layered.compaction.components',Yme='org.eclipse.elk.alg.layered.compaction.oned',Zme='org.eclipse.elk.alg.layered.compaction.oned.algs',$me='org.eclipse.elk.alg.layered.compaction.recthull',_me='org.eclipse.elk.alg.layered.components',ane='NONE',bne={3:1,6:1,4:1,9:1,5:1,122:1},cne={3:1,6:1,4:1,5:1,141:1,106:1,120:1},dne='org.eclipse.elk.alg.layered.compound',ene={51:1},fne='org.eclipse.elk.alg.layered.graph',gne=' -> ',hne='Not supported by LGraph',ine='Port side is undefined',jne={3:1,6:1,4:1,5:1,474:1,141:1,106:1,120:1},kne={3:1,6:1,4:1,5:1,141:1,193:1,203:1,106:1,120:1},lne={3:1,6:1,4:1,5:1,141:1,1943:1,203:1,106:1,120:1},mne='([{"\' \t\r\n',nne=')]}"\' \t\r\n',one='The given string contains parts that cannot be parsed as numbers.',pne='org.eclipse.elk.core.math',qne={3:1,4:1,142:1,207:1,414:1},rne={3:1,4:1,116:1,207:1,414:1},sne='org.eclipse.elk.layered',tne='org.eclipse.elk.alg.layered.graph.transform',une='ElkGraphImporter',vne='ElkGraphImporter/lambda$0$Type',wne='ElkGraphImporter/lambda$1$Type',xne='ElkGraphImporter/lambda$2$Type',yne='ElkGraphImporter/lambda$4$Type',zne='Node margin calculation',Ane='org.eclipse.elk.alg.layered.intermediate',Bne='ONE_SIDED_GREEDY_SWITCH',Cne='TWO_SIDED_GREEDY_SWITCH',Dne='No implementation is available for the layout processor ',Ene='IntermediateProcessorStrategy',Fne="Node '",Gne='FIRST_SEPARATE',Hne='LAST_SEPARATE',Ine='Odd port side processing',Jne='org.eclipse.elk.alg.layered.intermediate.compaction',Kne='org.eclipse.elk.alg.layered.intermediate.greedyswitch',Lne='org.eclipse.elk.alg.layered.p3order.counting',Mne={225:1},Nne='org.eclipse.elk.alg.layered.intermediate.loops',One='org.eclipse.elk.alg.layered.intermediate.loops.ordering',Pne='org.eclipse.elk.alg.layered.intermediate.loops.routing',Qne='org.eclipse.elk.alg.layered.intermediate.preserveorder',Rne='org.eclipse.elk.alg.layered.intermediate.wrapping',Sne='org.eclipse.elk.alg.layered.options',Tne='INTERACTIVE',Une='DEPTH_FIRST',Vne='EDGE_LENGTH',Wne='SELF_LOOPS',Xne='firstTryWithInitialOrder',Yne='org.eclipse.elk.layered.directionCongruency',Zne='org.eclipse.elk.layered.feedbackEdges',$ne='org.eclipse.elk.layered.interactiveReferencePoint',_ne='org.eclipse.elk.layered.mergeEdges',aoe='org.eclipse.elk.layered.mergeHierarchyEdges',boe='org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides',coe='org.eclipse.elk.layered.portSortingStrategy',doe='org.eclipse.elk.layered.thoroughness',eoe='org.eclipse.elk.layered.unnecessaryBendpoints',foe='org.eclipse.elk.layered.generatePositionAndLayerIds',goe='org.eclipse.elk.layered.cycleBreaking.strategy',hoe='org.eclipse.elk.layered.layering.strategy',ioe='org.eclipse.elk.layered.layering.layerConstraint',joe='org.eclipse.elk.layered.layering.layerChoiceConstraint',koe='org.eclipse.elk.layered.layering.layerId',loe='org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth',moe='org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor',noe='org.eclipse.elk.layered.layering.nodePromotion.strategy',ooe='org.eclipse.elk.layered.layering.nodePromotion.maxIterations',poe='org.eclipse.elk.layered.layering.coffmanGraham.layerBound',qoe='org.eclipse.elk.layered.crossingMinimization.strategy',roe='org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder',soe='org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness',toe='org.eclipse.elk.layered.crossingMinimization.semiInteractive',uoe='org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint',voe='org.eclipse.elk.layered.crossingMinimization.positionId',woe='org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold',xoe='org.eclipse.elk.layered.crossingMinimization.greedySwitch.type',yoe='org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type',zoe='org.eclipse.elk.layered.nodePlacement.strategy',Aoe='org.eclipse.elk.layered.nodePlacement.favorStraightEdges',Boe='org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening',Coe='org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment',Doe='org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening',Eoe='org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility',Foe='org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default',Goe='org.eclipse.elk.layered.edgeRouting.selfLoopDistribution',Hoe='org.eclipse.elk.layered.edgeRouting.selfLoopOrdering',Ioe='org.eclipse.elk.layered.edgeRouting.splines.mode',Joe='org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor',Koe='org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth',Loe='org.eclipse.elk.layered.spacing.baseValue',Moe='org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers',Noe='org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers',Ooe='org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers',Poe='org.eclipse.elk.layered.priority.direction',Qoe='org.eclipse.elk.layered.priority.shortness',Roe='org.eclipse.elk.layered.priority.straightness',Soe='org.eclipse.elk.layered.compaction.connectedComponents',Toe='org.eclipse.elk.layered.compaction.postCompaction.strategy',Uoe='org.eclipse.elk.layered.compaction.postCompaction.constraints',Voe='org.eclipse.elk.layered.highDegreeNodes.treatment',Woe='org.eclipse.elk.layered.highDegreeNodes.threshold',Xoe='org.eclipse.elk.layered.highDegreeNodes.treeHeight',Yoe='org.eclipse.elk.layered.wrapping.strategy',Zoe='org.eclipse.elk.layered.wrapping.additionalEdgeSpacing',$oe='org.eclipse.elk.layered.wrapping.correctionFactor',_oe='org.eclipse.elk.layered.wrapping.cutting.strategy',ape='org.eclipse.elk.layered.wrapping.cutting.cuts',bpe='org.eclipse.elk.layered.wrapping.cutting.msd.freedom',cpe='org.eclipse.elk.layered.wrapping.validify.strategy',dpe='org.eclipse.elk.layered.wrapping.validify.forbiddenIndices',epe='org.eclipse.elk.layered.wrapping.multiEdge.improveCuts',fpe='org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty',gpe='org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges',hpe='org.eclipse.elk.layered.edgeLabels.sideSelection',ipe='org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy',jpe='org.eclipse.elk.layered.considerModelOrder.strategy',kpe='org.eclipse.elk.layered.considerModelOrder.noModelOrder',lpe='org.eclipse.elk.layered.considerModelOrder.components',mpe='org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy',npe='org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence',ope='org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence',ppe='layering',qpe='layering.minWidth',rpe='layering.nodePromotion',spe='crossingMinimization',tpe='org.eclipse.elk.hierarchyHandling',upe='crossingMinimization.greedySwitch',vpe='nodePlacement',wpe='nodePlacement.bk',xpe='edgeRouting',ype='org.eclipse.elk.edgeRouting',zpe='spacing',Ape='priority',Bpe='compaction',Cpe='compaction.postCompaction',Dpe='Specifies whether and how post-process compaction is applied.',Epe='highDegreeNodes',Fpe='wrapping',Gpe='wrapping.cutting',Hpe='wrapping.validify',Ipe='wrapping.multiEdge',Jpe='edgeLabels',Kpe='considerModelOrder',Lpe='org.eclipse.elk.spacing.commentComment',Mpe='org.eclipse.elk.spacing.commentNode',Npe='org.eclipse.elk.spacing.edgeEdge',Ope='org.eclipse.elk.spacing.edgeNode',Ppe='org.eclipse.elk.spacing.labelLabel',Qpe='org.eclipse.elk.spacing.labelPortHorizontal',Rpe='org.eclipse.elk.spacing.labelPortVertical',Spe='org.eclipse.elk.spacing.labelNode',Tpe='org.eclipse.elk.spacing.nodeSelfLoop',Upe='org.eclipse.elk.spacing.portPort',Vpe='org.eclipse.elk.spacing.individual',Wpe='org.eclipse.elk.port.borderOffset',Xpe='org.eclipse.elk.noLayout',Ype='org.eclipse.elk.port.side',Zpe='org.eclipse.elk.debugMode',$pe='org.eclipse.elk.alignment',_pe='org.eclipse.elk.insideSelfLoops.activate',aqe='org.eclipse.elk.insideSelfLoops.yo',bqe='org.eclipse.elk.nodeSize.fixedGraphSize',cqe='org.eclipse.elk.direction',dqe='org.eclipse.elk.nodeLabels.padding',eqe='org.eclipse.elk.portLabels.nextToPortIfPossible',fqe='org.eclipse.elk.portLabels.treatAsGroup',gqe='org.eclipse.elk.portAlignment.default',hqe='org.eclipse.elk.portAlignment.north',iqe='org.eclipse.elk.portAlignment.south',jqe='org.eclipse.elk.portAlignment.west',kqe='org.eclipse.elk.portAlignment.east',lqe='org.eclipse.elk.contentAlignment',mqe='org.eclipse.elk.junctionPoints',nqe='org.eclipse.elk.edgeLabels.placement',oqe='org.eclipse.elk.port.index',pqe='org.eclipse.elk.commentBox',qqe='org.eclipse.elk.hypernode',rqe='org.eclipse.elk.port.anchor',sqe='org.eclipse.elk.partitioning.activate',tqe='org.eclipse.elk.partitioning.partition',uqe='org.eclipse.elk.position',vqe='org.eclipse.elk.margins',wqe='org.eclipse.elk.spacing.portsSurrounding',xqe='org.eclipse.elk.interactiveLayout',yqe='org.eclipse.elk.core.util',zqe={3:1,4:1,5:1,593:1},Aqe='NETWORK_SIMPLEX',Bqe={123:1,51:1},Cqe='org.eclipse.elk.alg.layered.p1cycles',Dqe='org.eclipse.elk.alg.layered.p2layers',Eqe={402:1,225:1},Fqe={832:1,3:1,4:1},Gqe='org.eclipse.elk.alg.layered.p3order',Hqe='org.eclipse.elk.alg.layered.p4nodes',Iqe={3:1,4:1,5:1,840:1},Jqe=1.0E-5,Kqe='org.eclipse.elk.alg.layered.p4nodes.bk',Lqe='org.eclipse.elk.alg.layered.p5edges',Mqe='org.eclipse.elk.alg.layered.p5edges.orthogonal',Nqe='org.eclipse.elk.alg.layered.p5edges.orthogonal.direction',Oqe=1.0E-6,Pqe='org.eclipse.elk.alg.layered.p5edges.splines',Qqe=0.09999999999999998,Rqe=1.0E-8,Sqe=4.71238898038469,Tqe=3.141592653589793,Uqe='org.eclipse.elk.alg.mrtree',Vqe='org.eclipse.elk.alg.mrtree.graph',Wqe='org.eclipse.elk.alg.mrtree.intermediate',Xqe='Set neighbors in level',Yqe='DESCENDANTS',Zqe='org.eclipse.elk.mrtree.weighting',$qe='org.eclipse.elk.mrtree.searchOrder',_qe='org.eclipse.elk.alg.mrtree.options',are='org.eclipse.elk.mrtree',bre='org.eclipse.elk.tree',cre='org.eclipse.elk.alg.radial',dre=6.283185307179586,ere=4.9E-324,fre='org.eclipse.elk.alg.radial.intermediate',gre='org.eclipse.elk.alg.radial.intermediate.compaction',hre={3:1,4:1,5:1,106:1},ire='org.eclipse.elk.alg.radial.intermediate.optimization',jre='No implementation is available for the layout option ',kre='org.eclipse.elk.alg.radial.options',lre='org.eclipse.elk.radial.orderId',mre='org.eclipse.elk.radial.radius',nre='org.eclipse.elk.radial.compactor',ore='org.eclipse.elk.radial.compactionStepSize',pre='org.eclipse.elk.radial.sorter',qre='org.eclipse.elk.radial.wedgeCriteria',rre='org.eclipse.elk.radial.optimizationCriteria',sre='org.eclipse.elk.radial',tre='org.eclipse.elk.alg.radial.p1position.wedge',ure='org.eclipse.elk.alg.radial.sorting',vre=5.497787143782138,wre=3.9269908169872414,xre=2.356194490192345,yre='org.eclipse.elk.alg.rectpacking',zre='org.eclipse.elk.alg.rectpacking.firstiteration',Are='org.eclipse.elk.alg.rectpacking.options',Bre='org.eclipse.elk.rectpacking.optimizationGoal',Cre='org.eclipse.elk.rectpacking.lastPlaceShift',Dre='org.eclipse.elk.rectpacking.currentPosition',Ere='org.eclipse.elk.rectpacking.desiredPosition',Fre='org.eclipse.elk.rectpacking.onlyFirstIteration',Gre='org.eclipse.elk.rectpacking.rowCompaction',Hre='org.eclipse.elk.rectpacking.expandToAspectRatio',Ire='org.eclipse.elk.rectpacking.targetWidth',Jre='org.eclipse.elk.expandNodes',Kre='org.eclipse.elk.rectpacking',Lre='org.eclipse.elk.alg.rectpacking.util',Mre='No implementation available for ',Nre='org.eclipse.elk.alg.spore',Ore='org.eclipse.elk.alg.spore.options',Pre='org.eclipse.elk.sporeCompaction',Qre='org.eclipse.elk.underlyingLayoutAlgorithm',Rre='org.eclipse.elk.processingOrder.treeConstruction',Sre='org.eclipse.elk.processingOrder.spanningTreeCostFunction',Tre='org.eclipse.elk.processingOrder.preferredRoot',Ure='org.eclipse.elk.processingOrder.rootSelection',Vre='org.eclipse.elk.structure.structureExtractionStrategy',Wre='org.eclipse.elk.compaction.compactionStrategy',Xre='org.eclipse.elk.compaction.orthogonal',Yre='org.eclipse.elk.overlapRemoval.maxIterations',Zre='org.eclipse.elk.overlapRemoval.runScanline',$re='processingOrder',_re='overlapRemoval',ase='org.eclipse.elk.sporeOverlap',bse='org.eclipse.elk.alg.spore.p1structure',cse='org.eclipse.elk.alg.spore.p2processingorder',dse='org.eclipse.elk.alg.spore.p3execution',ese='Invalid index: ',fse='org.eclipse.elk.core.alg',gse={331:1},hse={288:1},ise='Make sure its type is registered with the ',jse=' utility class.',kse='true',lse='false',mse="Couldn't clone property '",nse=0.05,ose='org.eclipse.elk.core.options',pse=1.2999999523162842,qse='org.eclipse.elk.box',rse='org.eclipse.elk.box.packingMode',sse='org.eclipse.elk.algorithm',tse='org.eclipse.elk.resolvedAlgorithm',use='org.eclipse.elk.bendPoints',vse='org.eclipse.elk.labelManager',wse='org.eclipse.elk.scaleFactor',xse='org.eclipse.elk.animate',yse='org.eclipse.elk.animTimeFactor',zse='org.eclipse.elk.layoutAncestors',Ase='org.eclipse.elk.maxAnimTime',Bse='org.eclipse.elk.minAnimTime',Cse='org.eclipse.elk.progressBar',Dse='org.eclipse.elk.validateGraph',Ese='org.eclipse.elk.validateOptions',Fse='org.eclipse.elk.zoomToFit',Gse='org.eclipse.elk.font.name',Hse='org.eclipse.elk.font.size',Ise='org.eclipse.elk.edge.type',Jse='partitioning',Kse='nodeLabels',Lse='portAlignment',Mse='nodeSize',Nse='port',Ose='portLabels',Pse='insideSelfLoops',Qse='org.eclipse.elk.fixed',Rse='org.eclipse.elk.random',Sse='port must have a parent node to calculate the port side',Tse='The edge needs to have exactly one edge section. Found: ',Use='org.eclipse.elk.core.util.adapters',Vse='org.eclipse.emf.ecore',Wse='org.eclipse.elk.graph',Xse='EMapPropertyHolder',Yse='ElkBendPoint',Zse='ElkGraphElement',$se='ElkConnectableShape',_se='ElkEdge',ate='ElkEdgeSection',bte='EModelElement',cte='ENamedElement',dte='ElkLabel',ete='ElkNode',fte='ElkPort',gte={92:1,90:1},hte='org.eclipse.emf.common.notify.impl',ite="The feature '",jte="' is not a valid changeable feature",kte='Expecting null',lte="' is not a valid feature",mte='The feature ID',nte=' is not a valid feature ID',ote=32768,pte={105:1,92:1,90:1,56:1,49:1,97:1},qte='org.eclipse.emf.ecore.impl',rte='org.eclipse.elk.graph.impl',ste='Recursive containment not allowed for ',tte="The datatype '",ute="' is not a valid classifier",vte="The value '",wte={190:1,3:1,4:1},xte="The class '",yte='http://www.eclipse.org/elk/ElkGraph',zte=1024,Ate='property',Bte='value',Cte='source',Dte='properties',Ete='identifier',Fte='height',Gte='width',Hte='parent',Ite='text',Jte='children',Kte='hierarchical',Lte='sources',Mte='targets',Nte='sections',Ote='bendPoints',Pte='outgoingShape',Qte='incomingShape',Rte='outgoingSections',Ste='incomingSections',Tte='org.eclipse.emf.common.util',Ute='Severe implementation error in the Json to ElkGraph importer.',Vte='id',Wte='org.eclipse.elk.graph.json',Xte='Unhandled parameter types: ',Yte='startPoint',Zte="An edge must have at least one source and one target (edge id: '",$te="').",_te='Referenced edge section does not exist: ',aue=" (edge id: '",bue='target',cue='sourcePoint',due='targetPoint',eue='group',fue='name',gue='connectableShape cannot be null',hue='edge cannot be null',iue="Passed edge is not 'simple'.",jue='org.eclipse.elk.graph.util',kue="The 'no duplicates' constraint is violated",lue='targetIndex=',mue=', size=',nue='sourceIndex=',oue={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1},pue={3:1,4:1,20:1,28:1,52:1,14:1,47:1,15:1,54:1,67:1,63:1,58:1,588:1},que='logging',rue='measureExecutionTime',sue='parser.parse.1',tue='parser.parse.2',uue='parser.next.1',vue='parser.next.2',wue='parser.next.3',xue='parser.next.4',yue='parser.factor.1',zue='parser.factor.2',Aue='parser.factor.3',Bue='parser.factor.4',Cue='parser.factor.5',Due='parser.factor.6',Eue='parser.atom.1',Fue='parser.atom.2',Gue='parser.atom.3',Hue='parser.atom.4',Iue='parser.atom.5',Jue='parser.cc.1',Kue='parser.cc.2',Lue='parser.cc.3',Mue='parser.cc.5',Nue='parser.cc.6',Oue='parser.cc.7',Pue='parser.cc.8',Que='parser.ope.1',Rue='parser.ope.2',Sue='parser.ope.3',Tue='parser.descape.1',Uue='parser.descape.2',Vue='parser.descape.3',Wue='parser.descape.4',Xue='parser.descape.5',Yue='parser.process.1',Zue='parser.quantifier.1',$ue='parser.quantifier.2',_ue='parser.quantifier.3',ave='parser.quantifier.4',bve='parser.quantifier.5',cve='org.eclipse.emf.common.notify',dve={415:1,672:1},eve={3:1,4:1,20:1,28:1,52:1,14:1,15:1,67:1,58:1},fve={366:1,143:1},gve='index=',hve={3:1,4:1,5:1,126:1},ive={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,58:1},jve={3:1,6:1,4:1,5:1,192:1},kve={3:1,4:1,5:1,165:1,367:1},lve=';/?:@&=+$,',mve='invalid authority: ',nve='EAnnotation',ove='ETypedElement',pve='EStructuralFeature',qve='EAttribute',rve='EClassifier',sve='EEnumLiteral',tve='EGenericType',uve='EOperation',vve='EParameter',wve='EReference',xve='ETypeParameter',yve='org.eclipse.emf.ecore.util',zve={76:1},Ave={3:1,20:1,14:1,15:1,58:1,589:1,76:1,69:1,95:1},Bve='org.eclipse.emf.ecore.util.FeatureMap$Entry',Cve=8192,Dve=2048,Eve='byte',Fve='char',Gve='double',Hve='float',Ive='int',Jve='long',Kve='short',Lve='java.lang.Object',Mve={3:1,4:1,5:1,247:1},Nve={3:1,4:1,5:1,673:1},Ove={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,69:1},Pve={3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,76:1,69:1,95:1},Qve='mixed',Rve='http:///org/eclipse/emf/ecore/util/ExtendedMetaData',Sve='kind',Tve={3:1,4:1,5:1,674:1},Uve={3:1,4:1,20:1,28:1,52:1,14:1,15:1,67:1,58:1,76:1,69:1,95:1},Vve={20:1,28:1,52:1,14:1,15:1,58:1,69:1},Wve={47:1,125:1,279:1},Xve={72:1,332:1},Yve="The value of type '",Zve="' must be of type '",$ve=1316,_ve='http://www.eclipse.org/emf/2002/Ecore',awe=-32768,bwe='constraints',cwe='baseType',dwe='getEStructuralFeature',ewe='getFeatureID',fwe='feature',gwe='getOperationID',hwe='operation',iwe='defaultValue',jwe='eTypeParameters',kwe='isInstance',lwe='getEEnumLiteral',mwe='eContainingClass',nwe={55:1},owe={3:1,4:1,5:1,119:1},pwe='org.eclipse.emf.ecore.resource',qwe={92:1,90:1,591:1,1935:1},rwe='org.eclipse.emf.ecore.resource.impl',swe='unspecified',twe='simple',uwe='attribute',vwe='attributeWildcard',wwe='element',xwe='elementWildcard',ywe='collapse',zwe='itemType',Awe='namespace',Bwe='##targetNamespace',Cwe='whiteSpace',Dwe='wildcards',Ewe='http://www.eclipse.org/emf/2003/XMLType',Fwe='##any',Gwe='uninitialized',Hwe='The multiplicity constraint is violated',Iwe='org.eclipse.emf.ecore.xml.type',Jwe='ProcessingInstruction',Kwe='SimpleAnyType',Lwe='XMLTypeDocumentRoot',Mwe='org.eclipse.emf.ecore.xml.type.impl',Nwe='INF',Owe='processing',Pwe='ENTITIES_._base',Qwe='minLength',Rwe='ENTITY',Swe='NCName',Twe='IDREFS_._base',Uwe='integer',Vwe='token',Wwe='pattern',Xwe='[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*',Ywe='\\i\\c*',Zwe='[\\i-[:]][\\c-[:]]*',$we='nonPositiveInteger',_we='maxInclusive',axe='NMTOKEN',bxe='NMTOKENS_._base',cxe='nonNegativeInteger',dxe='minInclusive',exe='normalizedString',fxe='unsignedByte',gxe='unsignedInt',hxe='18446744073709551615',ixe='unsignedShort',jxe='processingInstruction',kxe='org.eclipse.emf.ecore.xml.type.internal',lxe=1114111,mxe='Internal Error: shorthands: \\u',nxe='xml:isDigit',oxe='xml:isWord',pxe='xml:isSpace',qxe='xml:isNameChar',rxe='xml:isInitialNameChar',sxe='09\u0660\u0669\u06F0\u06F9\u0966\u096F\u09E6\u09EF\u0A66\u0A6F\u0AE6\u0AEF\u0B66\u0B6F\u0BE7\u0BEF\u0C66\u0C6F\u0CE6\u0CEF\u0D66\u0D6F\u0E50\u0E59\u0ED0\u0ED9\u0F20\u0F29',txe='AZaz\xC0\xD6\xD8\xF6\xF8\u0131\u0134\u013E\u0141\u0148\u014A\u017E\u0180\u01C3\u01CD\u01F0\u01F4\u01F5\u01FA\u0217\u0250\u02A8\u02BB\u02C1\u0386\u0386\u0388\u038A\u038C\u038C\u038E\u03A1\u03A3\u03CE\u03D0\u03D6\u03DA\u03DA\u03DC\u03DC\u03DE\u03DE\u03E0\u03E0\u03E2\u03F3\u0401\u040C\u040E\u044F\u0451\u045C\u045E\u0481\u0490\u04C4\u04C7\u04C8\u04CB\u04CC\u04D0\u04EB\u04EE\u04F5\u04F8\u04F9\u0531\u0556\u0559\u0559\u0561\u0586\u05D0\u05EA\u05F0\u05F2\u0621\u063A\u0641\u064A\u0671\u06B7\u06BA\u06BE\u06C0\u06CE\u06D0\u06D3\u06D5\u06D5\u06E5\u06E6\u0905\u0939\u093D\u093D\u0958\u0961\u0985\u098C\u098F\u0990\u0993\u09A8\u09AA\u09B0\u09B2\u09B2\u09B6\u09B9\u09DC\u09DD\u09DF\u09E1\u09F0\u09F1\u0A05\u0A0A\u0A0F\u0A10\u0A13\u0A28\u0A2A\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59\u0A5C\u0A5E\u0A5E\u0A72\u0A74\u0A85\u0A8B\u0A8D\u0A8D\u0A8F\u0A91\u0A93\u0AA8\u0AAA\u0AB0\u0AB2\u0AB3\u0AB5\u0AB9\u0ABD\u0ABD\u0AE0\u0AE0\u0B05\u0B0C\u0B0F\u0B10\u0B13\u0B28\u0B2A\u0B30\u0B32\u0B33\u0B36\u0B39\u0B3D\u0B3D\u0B5C\u0B5D\u0B5F\u0B61\u0B85\u0B8A\u0B8E\u0B90\u0B92\u0B95\u0B99\u0B9A\u0B9C\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8\u0BAA\u0BAE\u0BB5\u0BB7\u0BB9\u0C05\u0C0C\u0C0E\u0C10\u0C12\u0C28\u0C2A\u0C33\u0C35\u0C39\u0C60\u0C61\u0C85\u0C8C\u0C8E\u0C90\u0C92\u0CA8\u0CAA\u0CB3\u0CB5\u0CB9\u0CDE\u0CDE\u0CE0\u0CE1\u0D05\u0D0C\u0D0E\u0D10\u0D12\u0D28\u0D2A\u0D39\u0D60\u0D61\u0E01\u0E2E\u0E30\u0E30\u0E32\u0E33\u0E40\u0E45\u0E81\u0E82\u0E84\u0E84\u0E87\u0E88\u0E8A\u0E8A\u0E8D\u0E8D\u0E94\u0E97\u0E99\u0E9F\u0EA1\u0EA3\u0EA5\u0EA5\u0EA7\u0EA7\u0EAA\u0EAB\u0EAD\u0EAE\u0EB0\u0EB0\u0EB2\u0EB3\u0EBD\u0EBD\u0EC0\u0EC4\u0F40\u0F47\u0F49\u0F69\u10A0\u10C5\u10D0\u10F6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110B\u110C\u110E\u1112\u113C\u113C\u113E\u113E\u1140\u1140\u114C\u114C\u114E\u114E\u1150\u1150\u1154\u1155\u1159\u1159\u115F\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116D\u116E\u1172\u1173\u1175\u1175\u119E\u119E\u11A8\u11A8\u11AB\u11AB\u11AE\u11AF\u11B7\u11B8\u11BA\u11BA\u11BC\u11C2\u11EB\u11EB\u11F0\u11F0\u11F9\u11F9\u1E00\u1E9B\u1EA0\u1EF9\u1F00\u1F15\u1F18\u1F1D\u1F20\u1F45\u1F48\u1F4D\u1F50\u1F57\u1F59\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F7D\u1F80\u1FB4\u1FB6\u1FBC\u1FBE\u1FBE\u1FC2\u1FC4\u1FC6\u1FCC\u1FD0\u1FD3\u1FD6\u1FDB\u1FE0\u1FEC\u1FF2\u1FF4\u1FF6\u1FFC\u2126\u2126\u212A\u212B\u212E\u212E\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30A1\u30FA\u3105\u312C\u4E00\u9FA5\uAC00\uD7A3',uxe='Private Use',vxe='ASSIGNED',wxe='\x00\x7F\x80\xFF\u0100\u017F\u0180\u024F\u0250\u02AF\u02B0\u02FF\u0300\u036F\u0370\u03FF\u0400\u04FF\u0530\u058F\u0590\u05FF\u0600\u06FF\u0700\u074F\u0780\u07BF\u0900\u097F\u0980\u09FF\u0A00\u0A7F\u0A80\u0AFF\u0B00\u0B7F\u0B80\u0BFF\u0C00\u0C7F\u0C80\u0CFF\u0D00\u0D7F\u0D80\u0DFF\u0E00\u0E7F\u0E80\u0EFF\u0F00\u0FFF\u1000\u109F\u10A0\u10FF\u1100\u11FF\u1200\u137F\u13A0\u13FF\u1400\u167F\u1680\u169F\u16A0\u16FF\u1780\u17FF\u1800\u18AF\u1E00\u1EFF\u1F00\u1FFF\u2000\u206F\u2070\u209F\u20A0\u20CF\u20D0\u20FF\u2100\u214F\u2150\u218F\u2190\u21FF\u2200\u22FF\u2300\u23FF\u2400\u243F\u2440\u245F\u2460\u24FF\u2500\u257F\u2580\u259F\u25A0\u25FF\u2600\u26FF\u2700\u27BF\u2800\u28FF\u2E80\u2EFF\u2F00\u2FDF\u2FF0\u2FFF\u3000\u303F\u3040\u309F\u30A0\u30FF\u3100\u312F\u3130\u318F\u3190\u319F\u31A0\u31BF\u3200\u32FF\u3300\u33FF\u3400\u4DB5\u4E00\u9FFF\uA000\uA48F\uA490\uA4CF\uAC00\uD7A3\uE000\uF8FF\uF900\uFAFF\uFB00\uFB4F\uFB50\uFDFF\uFE20\uFE2F\uFE30\uFE4F\uFE50\uFE6F\uFE70\uFEFE\uFEFF\uFEFF\uFF00\uFFEF',xxe='UNASSIGNED',yxe={3:1,117:1},zxe='org.eclipse.emf.ecore.xml.type.util',Axe={3:1,4:1,5:1,368:1},Bxe='org.eclipse.xtext.xbase.lib',Cxe='Cannot add elements to a Range',Dxe='Cannot set elements in a Range',Exe='Cannot remove elements from a Range',Fxe='locale',Gxe='default',Hxe='user.agent';var _,_bb,Wbb,tbb=-1;$wnd.goog=$wnd.goog||{};$wnd.goog.global=$wnd.goog.global||$wnd;acb();bcb(1,null,{},nb);_.Fb=function ob(a){return mb(this,a)};_.Gb=function qb(){return this.gm};_.Hb=function sb(){return FCb(this)};_.Ib=function ub(){var a;return hdb(rb(this))+'@'+(a=tb(this)>>>0,a.toString(16))};_.equals=function(a){return this.Fb(a)};_.hashCode=function(){return this.Hb()};_.toString=function(){return this.Ib()};var xD,yD,zD;bcb(290,1,{290:1,2026:1},jdb);_.le=function kdb(a){var b;b=new jdb;b.i=4;a>1?(b.c=rdb(this,a-1)):(b.c=this);return b};_.me=function qdb(){fdb(this);return this.b};_.ne=function sdb(){return hdb(this)};_.oe=function udb(){return fdb(this),this.k};_.pe=function wdb(){return (this.i&4)!=0};_.qe=function xdb(){return (this.i&1)!=0};_.Ib=function Adb(){return idb(this)};_.i=0;var edb=1;var SI=mdb(Phe,'Object',1);var AI=mdb(Phe,'Class',290);bcb(1998,1,Qhe);var $D=mdb(Rhe,'Optional',1998);bcb(1170,1998,Qhe,xb);_.Fb=function yb(a){return a===this};_.Hb=function zb(){return 2040732332};_.Ib=function Ab(){return 'Optional.absent()'};_.Jb=function Bb(a){Qb(a);return wb(),vb};var vb;var YD=mdb(Rhe,'Absent',1170);bcb(628,1,{},Gb);var ZD=mdb(Rhe,'Joiner',628);var _D=odb(Rhe,'Predicate');bcb(582,1,{169:1,582:1,3:1,45:1},Yb);_.Mb=function ac(a){return Xb(this,a)};_.Lb=function Zb(a){return Xb(this,a)};_.Fb=function $b(a){var b;if(JD(a,582)){b=BD(a,582);return At(this.a,b.a)}return false};_.Hb=function _b(){return qmb(this.a)+306654252};_.Ib=function bc(){return Wb(this.a)};var aE=mdb(Rhe,'Predicates/AndPredicate',582);bcb(408,1998,{408:1,3:1},cc);_.Fb=function dc(a){var b;if(JD(a,408)){b=BD(a,408);return pb(this.a,b.a)}return false};_.Hb=function ec(){return 1502476572+tb(this.a)};_.Ib=function fc(){return Whe+this.a+')'};_.Jb=function gc(a){return new cc(Rb(a.Kb(this.a),'the Function passed to Optional.transform() must not return null.'))};var bE=mdb(Rhe,'Present',408);bcb(198,1,Yhe);_.Nb=function kc(a){Rrb(this,a)};_.Qb=function lc(){jc()};var MH=mdb(Zhe,'UnmodifiableIterator',198);bcb(1978,198,$he);_.Qb=function nc(){jc()};_.Rb=function mc(a){throw vbb(new bgb)};_.Wb=function oc(a){throw vbb(new bgb)};var NH=mdb(Zhe,'UnmodifiableListIterator',1978);bcb(386,1978,$he);_.Ob=function rc(){return this.c0};_.Pb=function tc(){if(this.c>=this.d){throw vbb(new utb)}return this.Xb(this.c++)};_.Tb=function uc(){return this.c};_.Ub=function vc(){if(this.c<=0){throw vbb(new utb)}return this.Xb(--this.c)};_.Vb=function wc(){return this.c-1};_.c=0;_.d=0;var cE=mdb(Zhe,'AbstractIndexedListIterator',386);bcb(699,198,Yhe);_.Ob=function Ac(){return xc(this)};_.Pb=function Bc(){return yc(this)};_.e=1;var dE=mdb(Zhe,'AbstractIterator',699);bcb(1986,1,{224:1});_.Zb=function Hc(){var a;return a=this.f,!a?(this.f=this.ac()):a};_.Fb=function Ic(a){return hw(this,a)};_.Hb=function Jc(){return tb(this.Zb())};_.dc=function Kc(){return this.gc()==0};_.ec=function Lc(){return Ec(this)};_.Ib=function Mc(){return fcb(this.Zb())};var IE=mdb(Zhe,'AbstractMultimap',1986);bcb(726,1986,_he);_.$b=function Xc(){Nc(this)};_._b=function Yc(a){return Oc(this,a)};_.ac=function Zc(){return new ne(this,this.c)};_.ic=function $c(a){return this.hc()};_.bc=function _c(){return new zf(this,this.c)};_.jc=function ad(){return this.mc(this.hc())};_.kc=function bd(){return new Hd(this)};_.lc=function cd(){return Yj(this.c.vc().Nc(),new $g,64,this.d)};_.cc=function dd(a){return Qc(this,a)};_.fc=function gd(a){return Sc(this,a)};_.gc=function hd(){return this.d};_.mc=function jd(a){return mmb(),new lnb(a)};_.nc=function kd(){return new Dd(this)};_.oc=function ld(){return Yj(this.c.Cc().Nc(),new Fd,64,this.d)};_.pc=function md(a,b){return new dg(this,a,b,null)};_.d=0;var DE=mdb(Zhe,'AbstractMapBasedMultimap',726);bcb(1631,726,_he);_.hc=function pd(){return new Skb(this.a)};_.jc=function qd(){return mmb(),mmb(),jmb};_.cc=function sd(a){return BD(Qc(this,a),15)};_.fc=function ud(a){return BD(Sc(this,a),15)};_.Zb=function od(){return nd(this)};_.Fb=function rd(a){return hw(this,a)};_.qc=function td(a){return BD(Qc(this,a),15)};_.rc=function vd(a){return BD(Sc(this,a),15)};_.mc=function wd(a){return vmb(BD(a,15))};_.pc=function xd(a,b){return Vc(this,a,BD(b,15),null)};var eE=mdb(Zhe,'AbstractListMultimap',1631);bcb(732,1,aie);_.Nb=function zd(a){Rrb(this,a)};_.Ob=function Ad(){return this.c.Ob()||this.e.Ob()};_.Pb=function Bd(){var a;if(!this.e.Ob()){a=BD(this.c.Pb(),42);this.b=a.cd();this.a=BD(a.dd(),14);this.e=this.a.Kc()}return this.sc(this.b,this.e.Pb())};_.Qb=function Cd(){this.e.Qb();this.a.dc()&&this.c.Qb();--this.d.d};var mE=mdb(Zhe,'AbstractMapBasedMultimap/Itr',732);bcb(1099,732,aie,Dd);_.sc=function Ed(a,b){return b};var fE=mdb(Zhe,'AbstractMapBasedMultimap/1',1099);bcb(1100,1,{},Fd);_.Kb=function Gd(a){return BD(a,14).Nc()};var gE=mdb(Zhe,'AbstractMapBasedMultimap/1methodref$spliterator$Type',1100);bcb(1101,732,aie,Hd);_.sc=function Id(a,b){return new Wo(a,b)};var hE=mdb(Zhe,'AbstractMapBasedMultimap/2',1101);var DK=odb(bie,'Map');bcb(1967,1,cie);_.wc=function Td(a){stb(this,a)};_.yc=function $d(a,b,c){return ttb(this,a,b,c)};_.$b=function Od(){this.vc().$b()};_.tc=function Pd(a){return Jd(this,a)};_._b=function Qd(a){return !!Kd(this,a,false)};_.uc=function Rd(a){var b,c,d;for(c=this.vc().Kc();c.Ob();){b=BD(c.Pb(),42);d=b.dd();if(PD(a)===PD(d)||a!=null&&pb(a,d)){return true}}return false};_.Fb=function Sd(a){var b,c,d;if(a===this){return true}if(!JD(a,83)){return false}d=BD(a,83);if(this.gc()!=d.gc()){return false}for(c=d.vc().Kc();c.Ob();){b=BD(c.Pb(),42);if(!this.tc(b)){return false}}return true};_.xc=function Ud(a){return Wd(Kd(this,a,false))};_.Hb=function Xd(){return pmb(this.vc())};_.dc=function Yd(){return this.gc()==0};_.ec=function Zd(){return new Pib(this)};_.zc=function _d(a,b){throw vbb(new cgb('Put not supported on this map'))};_.Ac=function ae(a){Ld(this,a)};_.Bc=function be(a){return Wd(Kd(this,a,true))};_.gc=function ce(){return this.vc().gc()};_.Ib=function de(){return Md(this)};_.Cc=function ee(){return new $ib(this)};var sJ=mdb(bie,'AbstractMap',1967);bcb(1987,1967,cie);_.bc=function ge(){return new rf(this)};_.vc=function he(){return fe(this)};_.ec=function ie(){var a;a=this.g;return !a?(this.g=this.bc()):a};_.Cc=function je(){var a;a=this.i;return !a?(this.i=new Zv(this)):a};var bH=mdb(Zhe,'Maps/ViewCachingAbstractMap',1987);bcb(389,1987,cie,ne);_.xc=function se(a){return ke(this,a)};_.Bc=function ve(a){return le(this,a)};_.$b=function oe(){this.d==this.e.c?this.e.$b():ir(new mf(this))};_._b=function pe(a){return Gv(this.d,a)};_.Ec=function qe(){return new df(this)};_.Dc=function(){return this.Ec()};_.Fb=function re(a){return this===a||pb(this.d,a)};_.Hb=function te(){return tb(this.d)};_.ec=function ue(){return this.e.ec()};_.gc=function we(){return this.d.gc()};_.Ib=function xe(){return fcb(this.d)};var lE=mdb(Zhe,'AbstractMapBasedMultimap/AsMap',389);var KI=odb(Phe,'Iterable');bcb(28,1,die);_.Jc=function Le(a){reb(this,a)};_.Lc=function Ne(){return this.Oc()};_.Nc=function Pe(){return new Kub(this,0)};_.Oc=function Qe(){return new YAb(null,this.Nc())};_.Fc=function Ge(a){throw vbb(new cgb('Add not supported on this collection'))};_.Gc=function He(a){return ye(this,a)};_.$b=function Ie(){Ae(this)};_.Hc=function Je(a){return ze(this,a,false)};_.Ic=function Ke(a){return Be(this,a)};_.dc=function Me(){return this.gc()==0};_.Mc=function Oe(a){return ze(this,a,true)};_.Pc=function Re(){return De(this)};_.Qc=function Se(a){return Ee(this,a)};_.Ib=function Te(){return Fe(this)};var dJ=mdb(bie,'AbstractCollection',28);var LK=odb(bie,'Set');bcb(eie,28,fie);_.Nc=function Ye(){return new Kub(this,1)};_.Fb=function We(a){return Ue(this,a)};_.Hb=function Xe(){return pmb(this)};var zJ=mdb(bie,'AbstractSet',eie);bcb(1970,eie,fie);var BH=mdb(Zhe,'Sets/ImprovedAbstractSet',1970);bcb(1971,1970,fie);_.$b=function $e(){this.Rc().$b()};_.Hc=function _e(a){return Ze(this,a)};_.dc=function af(){return this.Rc().dc()};_.Mc=function bf(a){var b;if(this.Hc(a)){b=BD(a,42);return this.Rc().ec().Mc(b.cd())}return false};_.gc=function cf(){return this.Rc().gc()};var WG=mdb(Zhe,'Maps/EntrySet',1971);bcb(1097,1971,fie,df);_.Hc=function ef(a){return Ck(this.a.d.vc(),a)};_.Kc=function ff(){return new mf(this.a)};_.Rc=function gf(){return this.a};_.Mc=function hf(a){var b;if(!Ck(this.a.d.vc(),a)){return false}b=BD(a,42);Tc(this.a.e,b.cd());return true};_.Nc=function jf(){return $j(this.a.d.vc().Nc(),new kf(this.a))};var jE=mdb(Zhe,'AbstractMapBasedMultimap/AsMap/AsMapEntries',1097);bcb(1098,1,{},kf);_.Kb=function lf(a){return me(this.a,BD(a,42))};var iE=mdb(Zhe,'AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type',1098);bcb(730,1,aie,mf);_.Nb=function nf(a){Rrb(this,a)};_.Pb=function pf(){var a;return a=BD(this.b.Pb(),42),this.a=BD(a.dd(),14),me(this.c,a)};_.Ob=function of(){return this.b.Ob()};_.Qb=function qf(){Vb(!!this.a);this.b.Qb();this.c.e.d-=this.a.gc();this.a.$b();this.a=null};var kE=mdb(Zhe,'AbstractMapBasedMultimap/AsMap/AsMapIterator',730);bcb(532,1970,fie,rf);_.$b=function sf(){this.b.$b()};_.Hc=function tf(a){return this.b._b(a)};_.Jc=function uf(a){Qb(a);this.b.wc(new Xv(a))};_.dc=function vf(){return this.b.dc()};_.Kc=function wf(){return new Mv(this.b.vc().Kc())};_.Mc=function xf(a){if(this.b._b(a)){this.b.Bc(a);return true}return false};_.gc=function yf(){return this.b.gc()};var $G=mdb(Zhe,'Maps/KeySet',532);bcb(318,532,fie,zf);_.$b=function Af(){var a;ir((a=this.b.vc().Kc(),new Hf(this,a)))};_.Ic=function Bf(a){return this.b.ec().Ic(a)};_.Fb=function Cf(a){return this===a||pb(this.b.ec(),a)};_.Hb=function Df(){return tb(this.b.ec())};_.Kc=function Ef(){var a;return a=this.b.vc().Kc(),new Hf(this,a)};_.Mc=function Ff(a){var b,c;c=0;b=BD(this.b.Bc(a),14);if(b){c=b.gc();b.$b();this.a.d-=c}return c>0};_.Nc=function Gf(){return this.b.ec().Nc()};var oE=mdb(Zhe,'AbstractMapBasedMultimap/KeySet',318);bcb(731,1,aie,Hf);_.Nb=function If(a){Rrb(this,a)};_.Ob=function Jf(){return this.c.Ob()};_.Pb=function Kf(){this.a=BD(this.c.Pb(),42);return this.a.cd()};_.Qb=function Lf(){var a;Vb(!!this.a);a=BD(this.a.dd(),14);this.c.Qb();this.b.a.d-=a.gc();a.$b();this.a=null};var nE=mdb(Zhe,'AbstractMapBasedMultimap/KeySet/1',731);bcb(491,389,{83:1,161:1},Mf);_.bc=function Nf(){return this.Sc()};_.ec=function Pf(){return this.Tc()};_.Sc=function Of(){return new Yf(this.c,this.Uc())};_.Tc=function Qf(){var a;return a=this.b,!a?(this.b=this.Sc()):a};_.Uc=function Rf(){return BD(this.d,161)};var sE=mdb(Zhe,'AbstractMapBasedMultimap/SortedAsMap',491);bcb(542,491,gie,Sf);_.bc=function Tf(){return new $f(this.a,BD(BD(this.d,161),171))};_.Sc=function Uf(){return new $f(this.a,BD(BD(this.d,161),171))};_.ec=function Vf(){var a;return a=this.b,BD(!a?(this.b=new $f(this.a,BD(BD(this.d,161),171))):a,271)};_.Tc=function Wf(){var a;return a=this.b,BD(!a?(this.b=new $f(this.a,BD(BD(this.d,161),171))):a,271)};_.Uc=function Xf(){return BD(BD(this.d,161),171)};var pE=mdb(Zhe,'AbstractMapBasedMultimap/NavigableAsMap',542);bcb(490,318,hie,Yf);_.Nc=function Zf(){return this.b.ec().Nc()};var tE=mdb(Zhe,'AbstractMapBasedMultimap/SortedKeySet',490);bcb(388,490,iie,$f);var qE=mdb(Zhe,'AbstractMapBasedMultimap/NavigableKeySet',388);bcb(541,28,die,dg);_.Fc=function eg(a){var b,c;ag(this);c=this.d.dc();b=this.d.Fc(a);if(b){++this.f.d;c&&_f(this)}return b};_.Gc=function fg(a){var b,c,d;if(a.dc()){return false}d=(ag(this),this.d.gc());b=this.d.Gc(a);if(b){c=this.d.gc();this.f.d+=c-d;d==0&&_f(this)}return b};_.$b=function gg(){var a;a=(ag(this),this.d.gc());if(a==0){return}this.d.$b();this.f.d-=a;bg(this)};_.Hc=function hg(a){ag(this);return this.d.Hc(a)};_.Ic=function ig(a){ag(this);return this.d.Ic(a)};_.Fb=function jg(a){if(a===this){return true}ag(this);return pb(this.d,a)};_.Hb=function kg(){ag(this);return tb(this.d)};_.Kc=function lg(){ag(this);return new Gg(this)};_.Mc=function mg(a){var b;ag(this);b=this.d.Mc(a);if(b){--this.f.d;bg(this)}return b};_.gc=function ng(){return cg(this)};_.Nc=function og(){return ag(this),this.d.Nc()};_.Ib=function pg(){ag(this);return fcb(this.d)};var vE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedCollection',541);var yK=odb(bie,'List');bcb(728,541,{20:1,28:1,14:1,15:1},qg);_.ad=function zg(a){ktb(this,a)};_.Nc=function Ag(){return ag(this),this.d.Nc()};_.Vc=function rg(a,b){var c;ag(this);c=this.d.dc();BD(this.d,15).Vc(a,b);++this.a.d;c&&_f(this)};_.Wc=function sg(a,b){var c,d,e;if(b.dc()){return false}e=(ag(this),this.d.gc());c=BD(this.d,15).Wc(a,b);if(c){d=this.d.gc();this.a.d+=d-e;e==0&&_f(this)}return c};_.Xb=function tg(a){ag(this);return BD(this.d,15).Xb(a)};_.Xc=function ug(a){ag(this);return BD(this.d,15).Xc(a)};_.Yc=function vg(){ag(this);return new Mg(this)};_.Zc=function wg(a){ag(this);return new Ng(this,a)};_.$c=function xg(a){var b;ag(this);b=BD(this.d,15).$c(a);--this.a.d;bg(this);return b};_._c=function yg(a,b){ag(this);return BD(this.d,15)._c(a,b)};_.bd=function Bg(a,b){ag(this);return Vc(this.a,this.e,BD(this.d,15).bd(a,b),!this.b?this:this.b)};var xE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedList',728);bcb(1096,728,{20:1,28:1,14:1,15:1,54:1},Cg);var rE=mdb(Zhe,'AbstractMapBasedMultimap/RandomAccessWrappedList',1096);bcb(620,1,aie,Gg);_.Nb=function Ig(a){Rrb(this,a)};_.Ob=function Jg(){Fg(this);return this.b.Ob()};_.Pb=function Kg(){Fg(this);return this.b.Pb()};_.Qb=function Lg(){Eg(this)};var uE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedCollection/WrappedIterator',620);bcb(729,620,jie,Mg,Ng);_.Qb=function Tg(){Eg(this)};_.Rb=function Og(a){var b;b=cg(this.a)==0;(Fg(this),BD(this.b,125)).Rb(a);++this.a.a.d;b&&_f(this.a)};_.Sb=function Pg(){return (Fg(this),BD(this.b,125)).Sb()};_.Tb=function Qg(){return (Fg(this),BD(this.b,125)).Tb()};_.Ub=function Rg(){return (Fg(this),BD(this.b,125)).Ub()};_.Vb=function Sg(){return (Fg(this),BD(this.b,125)).Vb()};_.Wb=function Ug(a){(Fg(this),BD(this.b,125)).Wb(a)};var wE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedList/WrappedListIterator',729);bcb(727,541,hie,Vg);_.Nc=function Wg(){return ag(this),this.d.Nc()};var AE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedSortedSet',727);bcb(1095,727,iie,Xg);var yE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedNavigableSet',1095);bcb(1094,541,fie,Yg);_.Nc=function Zg(){return ag(this),this.d.Nc()};var zE=mdb(Zhe,'AbstractMapBasedMultimap/WrappedSet',1094);bcb(1103,1,{},$g);_.Kb=function _g(a){return fd(BD(a,42))};var BE=mdb(Zhe,'AbstractMapBasedMultimap/lambda$1$Type',1103);bcb(1102,1,{},ah);_.Kb=function bh(a){return new Wo(this.a,a)};var CE=mdb(Zhe,'AbstractMapBasedMultimap/lambda$2$Type',1102);var CK=odb(bie,'Map/Entry');bcb(345,1,kie);_.Fb=function dh(a){var b;if(JD(a,42)){b=BD(a,42);return Hb(this.cd(),b.cd())&&Hb(this.dd(),b.dd())}return false};_.Hb=function eh(){var a,b;a=this.cd();b=this.dd();return (a==null?0:tb(a))^(b==null?0:tb(b))};_.ed=function fh(a){throw vbb(new bgb)};_.Ib=function gh(){return this.cd()+'='+this.dd()};var EE=mdb(Zhe,lie,345);bcb(1988,28,die);_.$b=function hh(){this.fd().$b()};_.Hc=function ih(a){var b;if(JD(a,42)){b=BD(a,42);return Cc(this.fd(),b.cd(),b.dd())}return false};_.Mc=function jh(a){var b;if(JD(a,42)){b=BD(a,42);return Gc(this.fd(),b.cd(),b.dd())}return false};_.gc=function kh(){return this.fd().d};var fH=mdb(Zhe,'Multimaps/Entries',1988);bcb(733,1988,die,lh);_.Kc=function mh(){return this.a.kc()};_.fd=function nh(){return this.a};_.Nc=function oh(){return this.a.lc()};var FE=mdb(Zhe,'AbstractMultimap/Entries',733);bcb(734,733,fie,ph);_.Nc=function sh(){return this.a.lc()};_.Fb=function qh(a){return Ax(this,a)};_.Hb=function rh(){return Bx(this)};var GE=mdb(Zhe,'AbstractMultimap/EntrySet',734);bcb(735,28,die,th);_.$b=function uh(){this.a.$b()};_.Hc=function vh(a){return Dc(this.a,a)};_.Kc=function wh(){return this.a.nc()};_.gc=function xh(){return this.a.d};_.Nc=function yh(){return this.a.oc()};var HE=mdb(Zhe,'AbstractMultimap/Values',735);bcb(1989,28,{835:1,20:1,28:1,14:1});_.Jc=function Gh(a){Qb(a);Ah(this).Jc(new Xw(a))};_.Nc=function Kh(){var a;return a=Ah(this).Nc(),Yj(a,new cx,64|a.qd()&1296,this.a.d)};_.Fc=function Ch(a){zh();return true};_.Gc=function Dh(a){return Qb(this),Qb(a),JD(a,543)?Zw(BD(a,835)):!a.dc()&&fr(this,a.Kc())};_.Hc=function Eh(a){var b;return b=BD(Hv(nd(this.a),a),14),(!b?0:b.gc())>0};_.Fb=function Fh(a){return $w(this,a)};_.Hb=function Hh(){return tb(Ah(this))};_.dc=function Ih(){return Ah(this).dc()};_.Mc=function Jh(a){return Bw(this,a,1)>0};_.Ib=function Lh(){return fcb(Ah(this))};var KE=mdb(Zhe,'AbstractMultiset',1989);bcb(1991,1970,fie);_.$b=function Mh(){Nc(this.a.a)};_.Hc=function Nh(a){var b,c;if(JD(a,492)){c=BD(a,416);if(BD(c.a.dd(),14).gc()<=0){return false}b=Aw(this.a,c.a.cd());return b==BD(c.a.dd(),14).gc()}return false};_.Mc=function Oh(a){var b,c,d,e;if(JD(a,492)){c=BD(a,416);b=c.a.cd();d=BD(c.a.dd(),14).gc();if(d!=0){e=this.a;return ax(e,b,d)}}return false};var pH=mdb(Zhe,'Multisets/EntrySet',1991);bcb(1109,1991,fie,Ph);_.Kc=function Qh(){return new Lw(fe(nd(this.a.a)).Kc())};_.gc=function Rh(){return nd(this.a.a).gc()};var JE=mdb(Zhe,'AbstractMultiset/EntrySet',1109);bcb(619,726,_he);_.hc=function Uh(){return this.gd()};_.jc=function Vh(){return this.hd()};_.cc=function Yh(a){return this.jd(a)};_.fc=function $h(a){return this.kd(a)};_.Zb=function Th(){var a;return a=this.f,!a?(this.f=this.ac()):a};_.hd=function Wh(){return mmb(),mmb(),lmb};_.Fb=function Xh(a){return hw(this,a)};_.jd=function Zh(a){return BD(Qc(this,a),21)};_.kd=function _h(a){return BD(Sc(this,a),21)};_.mc=function ai(a){return mmb(),new zob(BD(a,21))};_.pc=function bi(a,b){return new Yg(this,a,BD(b,21))};var LE=mdb(Zhe,'AbstractSetMultimap',619);bcb(1657,619,_he);_.hc=function ei(){return new Hxb(this.b)};_.gd=function fi(){return new Hxb(this.b)};_.jc=function gi(){return Ix(new Hxb(this.b))};_.hd=function hi(){return Ix(new Hxb(this.b))};_.cc=function ii(a){return BD(BD(Qc(this,a),21),84)};_.jd=function ji(a){return BD(BD(Qc(this,a),21),84)};_.fc=function ki(a){return BD(BD(Sc(this,a),21),84)};_.kd=function li(a){return BD(BD(Sc(this,a),21),84)};_.mc=function mi(a){return JD(a,271)?Ix(BD(a,271)):(mmb(),new Zob(BD(a,84)))};_.Zb=function di(){var a;return a=this.f,!a?(this.f=JD(this.c,171)?new Sf(this,BD(this.c,171)):JD(this.c,161)?new Mf(this,BD(this.c,161)):new ne(this,this.c)):a};_.pc=function ni(a,b){return JD(b,271)?new Xg(this,a,BD(b,271)):new Vg(this,a,BD(b,84))};var NE=mdb(Zhe,'AbstractSortedSetMultimap',1657);bcb(1658,1657,_he);_.Zb=function pi(){var a;return a=this.f,BD(BD(!a?(this.f=JD(this.c,171)?new Sf(this,BD(this.c,171)):JD(this.c,161)?new Mf(this,BD(this.c,161)):new ne(this,this.c)):a,161),171)};_.ec=function ri(){var a;return a=this.i,BD(BD(!a?(this.i=JD(this.c,171)?new $f(this,BD(this.c,171)):JD(this.c,161)?new Yf(this,BD(this.c,161)):new zf(this,this.c)):a,84),271)};_.bc=function qi(){return JD(this.c,171)?new $f(this,BD(this.c,171)):JD(this.c,161)?new Yf(this,BD(this.c,161)):new zf(this,this.c)};var ME=mdb(Zhe,'AbstractSortedKeySortedSetMultimap',1658);bcb(2010,1,{1947:1});_.Fb=function si(a){return zy(this,a)};_.Hb=function ti(){var a;return pmb((a=this.g,!a?(this.g=new vi(this)):a))};_.Ib=function ui(){var a;return Md((a=this.f,!a?(this.f=new Rj(this)):a))};var QE=mdb(Zhe,'AbstractTable',2010);bcb(665,eie,fie,vi);_.$b=function wi(){Pi()};_.Hc=function xi(a){var b,c;if(JD(a,468)){b=BD(a,682);c=BD(Hv(Vi(this.a),Em(b.c.e,b.b)),83);return !!c&&Ck(c.vc(),new Wo(Em(b.c.c,b.a),Mi(b.c,b.b,b.a)))}return false};_.Kc=function yi(){return Ni(this.a)};_.Mc=function zi(a){var b,c;if(JD(a,468)){b=BD(a,682);c=BD(Hv(Vi(this.a),Em(b.c.e,b.b)),83);return !!c&&Dk(c.vc(),new Wo(Em(b.c.c,b.a),Mi(b.c,b.b,b.a)))}return false};_.gc=function Ai(){return Xi(this.a)};_.Nc=function Bi(){return Oi(this.a)};var OE=mdb(Zhe,'AbstractTable/CellSet',665);bcb(1928,28,die,Ci);_.$b=function Di(){Pi()};_.Hc=function Ei(a){return Qi(this.a,a)};_.Kc=function Fi(){return Zi(this.a)};_.gc=function Gi(){return Xi(this.a)};_.Nc=function Hi(){return $i(this.a)};var PE=mdb(Zhe,'AbstractTable/Values',1928);bcb(1632,1631,_he);var RE=mdb(Zhe,'ArrayListMultimapGwtSerializationDependencies',1632);bcb(513,1632,_he,Ji,Ki);_.hc=function Li(){return new Skb(this.a)};_.a=0;var SE=mdb(Zhe,'ArrayListMultimap',513);bcb(664,2010,{664:1,1947:1,3:1},_i);var cF=mdb(Zhe,'ArrayTable',664);bcb(1924,386,$he,aj);_.Xb=function bj(a){return new hj(this.a,a)};var TE=mdb(Zhe,'ArrayTable/1',1924);bcb(1925,1,{},cj);_.ld=function dj(a){return new hj(this.a,a)};var UE=mdb(Zhe,'ArrayTable/1methodref$getCell$Type',1925);bcb(2011,1,{682:1});_.Fb=function ej(a){var b;if(a===this){return true}if(JD(a,468)){b=BD(a,682);return Hb(Em(this.c.e,this.b),Em(b.c.e,b.b))&&Hb(Em(this.c.c,this.a),Em(b.c.c,b.a))&&Hb(Mi(this.c,this.b,this.a),Mi(b.c,b.b,b.a))}return false};_.Hb=function fj(){return Hlb(OC(GC(SI,1),Uhe,1,5,[Em(this.c.e,this.b),Em(this.c.c,this.a),Mi(this.c,this.b,this.a)]))};_.Ib=function gj(){return '('+Em(this.c.e,this.b)+','+Em(this.c.c,this.a)+')='+Mi(this.c,this.b,this.a)};var JH=mdb(Zhe,'Tables/AbstractCell',2011);bcb(468,2011,{468:1,682:1},hj);_.a=0;_.b=0;_.d=0;var VE=mdb(Zhe,'ArrayTable/2',468);bcb(1927,1,{},ij);_.ld=function jj(a){return Ti(this.a,a)};var WE=mdb(Zhe,'ArrayTable/2methodref$getValue$Type',1927);bcb(1926,386,$he,kj);_.Xb=function lj(a){return Ti(this.a,a)};var XE=mdb(Zhe,'ArrayTable/3',1926);bcb(1979,1967,cie);_.$b=function nj(){ir(this.kc())};_.vc=function oj(){return new Sv(this)};_.lc=function pj(){return new Mub(this.kc(),this.gc())};var YG=mdb(Zhe,'Maps/IteratorBasedAbstractMap',1979);bcb(828,1979,cie);_.$b=function tj(){throw vbb(new bgb)};_._b=function uj(a){return sn(this.c,a)};_.kc=function vj(){return new Jj(this,this.c.b.c.gc())};_.lc=function wj(){return Zj(this.c.b.c.gc(),16,new Dj(this))};_.xc=function xj(a){var b;b=BD(tn(this.c,a),19);return !b?null:this.nd(b.a)};_.dc=function yj(){return this.c.b.c.dc()};_.ec=function zj(){return Xm(this.c)};_.zc=function Aj(a,b){var c;c=BD(tn(this.c,a),19);if(!c){throw vbb(new Wdb(this.md()+' '+a+' not in '+Xm(this.c)))}return this.od(c.a,b)};_.Bc=function Bj(a){throw vbb(new bgb)};_.gc=function Cj(){return this.c.b.c.gc()};var _E=mdb(Zhe,'ArrayTable/ArrayMap',828);bcb(1923,1,{},Dj);_.ld=function Ej(a){return qj(this.a,a)};var YE=mdb(Zhe,'ArrayTable/ArrayMap/0methodref$getEntry$Type',1923);bcb(1921,345,kie,Fj);_.cd=function Gj(){return rj(this.a,this.b)};_.dd=function Hj(){return this.a.nd(this.b)};_.ed=function Ij(a){return this.a.od(this.b,a)};_.b=0;var ZE=mdb(Zhe,'ArrayTable/ArrayMap/1',1921);bcb(1922,386,$he,Jj);_.Xb=function Kj(a){return qj(this.a,a)};var $E=mdb(Zhe,'ArrayTable/ArrayMap/2',1922);bcb(1920,828,cie,Lj);_.md=function Mj(){return 'Column'};_.nd=function Nj(a){return Mi(this.b,this.a,a)};_.od=function Oj(a,b){return Wi(this.b,this.a,a,b)};_.a=0;var bF=mdb(Zhe,'ArrayTable/Row',1920);bcb(829,828,cie,Rj);_.nd=function Tj(a){return new Lj(this.a,a)};_.zc=function Uj(a,b){return BD(b,83),Pj()};_.od=function Vj(a,b){return BD(b,83),Qj()};_.md=function Sj(){return 'Row'};var aF=mdb(Zhe,'ArrayTable/RowMap',829);bcb(1120,1,pie,_j);_.qd=function ak(){return this.a.qd()&-262};_.rd=function bk(){return this.a.rd()};_.Nb=function ck(a){this.a.Nb(new gk(a,this.b))};_.sd=function dk(a){return this.a.sd(new ek(a,this.b))};var lF=mdb(Zhe,'CollectSpliterators/1',1120);bcb(1121,1,qie,ek);_.td=function fk(a){this.a.td(this.b.Kb(a))};var dF=mdb(Zhe,'CollectSpliterators/1/lambda$0$Type',1121);bcb(1122,1,qie,gk);_.td=function hk(a){this.a.td(this.b.Kb(a))};var eF=mdb(Zhe,'CollectSpliterators/1/lambda$1$Type',1122);bcb(1123,1,pie,jk);_.qd=function kk(){return this.a};_.rd=function lk(){!!this.d&&(this.b=Deb(this.b,this.d.rd()));return Deb(this.b,0)};_.Nb=function mk(a){if(this.d){this.d.Nb(a);this.d=null}this.c.Nb(new rk(this.e,a));this.b=0};_.sd=function ok(a){while(true){if(!!this.d&&this.d.sd(a)){Kbb(this.b,rie)&&(this.b=Qbb(this.b,1));return true}else{this.d=null}if(!this.c.sd(new pk(this,this.e))){return false}}};_.a=0;_.b=0;var hF=mdb(Zhe,'CollectSpliterators/1FlatMapSpliterator',1123);bcb(1124,1,qie,pk);_.td=function qk(a){ik(this.a,this.b,a)};var fF=mdb(Zhe,'CollectSpliterators/1FlatMapSpliterator/lambda$0$Type',1124);bcb(1125,1,qie,rk);_.td=function sk(a){nk(this.b,this.a,a)};var gF=mdb(Zhe,'CollectSpliterators/1FlatMapSpliterator/lambda$1$Type',1125);bcb(1117,1,pie,tk);_.qd=function uk(){return 16464|this.b};_.rd=function vk(){return this.a.rd()};_.Nb=function wk(a){this.a.xe(new Ak(a,this.c))};_.sd=function xk(a){return this.a.ye(new yk(a,this.c))};_.b=0;var kF=mdb(Zhe,'CollectSpliterators/1WithCharacteristics',1117);bcb(1118,1,sie,yk);_.ud=function zk(a){this.a.td(this.b.ld(a))};var iF=mdb(Zhe,'CollectSpliterators/1WithCharacteristics/lambda$0$Type',1118);bcb(1119,1,sie,Ak);_.ud=function Bk(a){this.a.td(this.b.ld(a))};var jF=mdb(Zhe,'CollectSpliterators/1WithCharacteristics/lambda$1$Type',1119);bcb(245,1,tie);_.wd=function Hk(a){return this.vd(BD(a,245))};_.vd=function Gk(a){var b;if(a==(_k(),$k)){return 1}if(a==(Lk(),Kk)){return -1}b=(ex(),Fcb(this.a,a.a));if(b!=0){return b}return JD(this,519)==JD(a,519)?0:JD(this,519)?1:-1};_.zd=function Ik(){return this.a};_.Fb=function Jk(a){return Ek(this,a)};var qF=mdb(Zhe,'Cut',245);bcb(1761,245,tie,Mk);_.vd=function Nk(a){return a==this?0:1};_.xd=function Ok(a){throw vbb(new xcb)};_.yd=function Pk(a){a.a+='+\u221E)'};_.zd=function Qk(){throw vbb(new Zdb(uie))};_.Hb=function Rk(){return Zfb(),kCb(this)};_.Ad=function Sk(a){return false};_.Ib=function Tk(){return '+\u221E'};var Kk;var mF=mdb(Zhe,'Cut/AboveAll',1761);bcb(519,245,{245:1,519:1,3:1,35:1},Uk);_.xd=function Vk(a){Pfb((a.a+='(',a),this.a)};_.yd=function Wk(a){Kfb(Pfb(a,this.a),93)};_.Hb=function Xk(){return ~tb(this.a)};_.Ad=function Yk(a){return ex(),Fcb(this.a,a)<0};_.Ib=function Zk(){return '/'+this.a+'\\'};var nF=mdb(Zhe,'Cut/AboveValue',519);bcb(1760,245,tie,al);_.vd=function bl(a){return a==this?0:-1};_.xd=function cl(a){a.a+='(-\u221E'};_.yd=function dl(a){throw vbb(new xcb)};_.zd=function el(){throw vbb(new Zdb(uie))};_.Hb=function fl(){return Zfb(),kCb(this)};_.Ad=function gl(a){return true};_.Ib=function hl(){return '-\u221E'};var $k;var oF=mdb(Zhe,'Cut/BelowAll',1760);bcb(1762,245,tie,il);_.xd=function jl(a){Pfb((a.a+='[',a),this.a)};_.yd=function kl(a){Kfb(Pfb(a,this.a),41)};_.Hb=function ll(){return tb(this.a)};_.Ad=function ml(a){return ex(),Fcb(this.a,a)<=0};_.Ib=function nl(){return '\\'+this.a+'/'};var pF=mdb(Zhe,'Cut/BelowValue',1762);bcb(537,1,vie);_.Jc=function ql(a){reb(this,a)};_.Ib=function rl(){return tr(BD(Rb(this,'use Optional.orNull() instead of Optional.or(null)'),20).Kc())};var uF=mdb(Zhe,'FluentIterable',537);bcb(433,537,vie,sl);_.Kc=function tl(){return new Sr(ur(this.a.Kc(),new Sq))};var rF=mdb(Zhe,'FluentIterable/2',433);bcb(1046,537,vie,vl);_.Kc=function wl(){return ul(this)};var tF=mdb(Zhe,'FluentIterable/3',1046);bcb(708,386,$he,xl);_.Xb=function yl(a){return this.a[a].Kc()};var sF=mdb(Zhe,'FluentIterable/3/1',708);bcb(1972,1,{});_.Ib=function zl(){return fcb(this.Bd().b)};var BF=mdb(Zhe,'ForwardingObject',1972);bcb(1973,1972,wie);_.Bd=function Fl(){return this.Cd()};_.Jc=function Gl(a){reb(this,a)};_.Lc=function Jl(){return this.Oc()};_.Nc=function Ml(){return new Kub(this,0)};_.Oc=function Nl(){return new YAb(null,this.Nc())};_.Fc=function Al(a){return this.Cd(),enb()};_.Gc=function Bl(a){return this.Cd(),fnb()};_.$b=function Cl(){this.Cd(),gnb()};_.Hc=function Dl(a){return this.Cd().Hc(a)};_.Ic=function El(a){return this.Cd().Ic(a)};_.dc=function Hl(){return this.Cd().b.dc()};_.Kc=function Il(){return this.Cd().Kc()};_.Mc=function Kl(a){return this.Cd(),jnb()};_.gc=function Ll(){return this.Cd().b.gc()};_.Pc=function Ol(){return this.Cd().Pc()};_.Qc=function Pl(a){return this.Cd().Qc(a)};var vF=mdb(Zhe,'ForwardingCollection',1973);bcb(1980,28,xie);_.Kc=function Xl(){return this.Ed()};_.Fc=function Sl(a){throw vbb(new bgb)};_.Gc=function Tl(a){throw vbb(new bgb)};_.$b=function Ul(){throw vbb(new bgb)};_.Hc=function Vl(a){return a!=null&&ze(this,a,false)};_.Dd=function Wl(){switch(this.gc()){case 0:return im(),im(),hm;case 1:return im(),new my(Qb(this.Ed().Pb()));default:return new px(this,this.Pc());}};_.Mc=function Yl(a){throw vbb(new bgb)};var WF=mdb(Zhe,'ImmutableCollection',1980);bcb(712,1980,xie,Zl);_.Kc=function cm(){return vr(this.a.Kc())};_.Hc=function $l(a){return a!=null&&this.a.Hc(a)};_.Ic=function _l(a){return this.a.Ic(a)};_.dc=function am(){return this.a.dc()};_.Ed=function bm(){return vr(this.a.Kc())};_.gc=function dm(){return this.a.gc()};_.Pc=function em(){return this.a.Pc()};_.Qc=function fm(a){return this.a.Qc(a)};_.Ib=function gm(){return fcb(this.a)};var wF=mdb(Zhe,'ForwardingImmutableCollection',712);bcb(152,1980,yie);_.Kc=function sm(){return this.Ed()};_.Yc=function tm(){return this.Fd(0)};_.Zc=function vm(a){return this.Fd(a)};_.ad=function zm(a){ktb(this,a)};_.Nc=function Am(){return new Kub(this,16)};_.bd=function Cm(a,b){return this.Gd(a,b)};_.Vc=function lm(a,b){throw vbb(new bgb)};_.Wc=function mm(a,b){throw vbb(new bgb)};_.Fb=function om(a){return Ju(this,a)};_.Hb=function pm(){return Ku(this)};_.Xc=function qm(a){return a==null?-1:Lu(this,a)};_.Ed=function rm(){return this.Fd(0)};_.Fd=function um(a){return jm(this,a)};_.$c=function xm(a){throw vbb(new bgb)};_._c=function ym(a,b){throw vbb(new bgb)};_.Gd=function Bm(a,b){var c;return Dm((c=new $u(this),new Jib(c,a,b)))};var hm;var _F=mdb(Zhe,'ImmutableList',152);bcb(2006,152,yie);_.Kc=function Nm(){return vr(this.Hd().Kc())};_.bd=function Qm(a,b){return Dm(this.Hd().bd(a,b))};_.Hc=function Fm(a){return a!=null&&this.Hd().Hc(a)};_.Ic=function Gm(a){return this.Hd().Ic(a)};_.Fb=function Hm(a){return pb(this.Hd(),a)};_.Xb=function Im(a){return Em(this,a)};_.Hb=function Jm(){return tb(this.Hd())};_.Xc=function Km(a){return this.Hd().Xc(a)};_.dc=function Lm(){return this.Hd().dc()};_.Ed=function Mm(){return vr(this.Hd().Kc())};_.gc=function Om(){return this.Hd().gc()};_.Gd=function Pm(a,b){return Dm(this.Hd().bd(a,b))};_.Pc=function Rm(){return this.Hd().Qc(KC(SI,Uhe,1,this.Hd().gc(),5,1))};_.Qc=function Sm(a){return this.Hd().Qc(a)};_.Ib=function Tm(){return fcb(this.Hd())};var xF=mdb(Zhe,'ForwardingImmutableList',2006);bcb(714,1,Aie);_.vc=function cn(){return Wm(this)};_.wc=function en(a){stb(this,a)};_.ec=function jn(){return Xm(this)};_.yc=function kn(a,b,c){return ttb(this,a,b,c)};_.Cc=function rn(){return this.Ld()};_.$b=function Zm(){throw vbb(new bgb)};_._b=function $m(a){return this.xc(a)!=null};_.uc=function _m(a){return this.Ld().Hc(a)};_.Jd=function an(){return new jq(this)};_.Kd=function bn(){return new sq(this)};_.Fb=function dn(a){return Dv(this,a)};_.Hb=function gn(){return Wm(this).Hb()};_.dc=function hn(){return this.gc()==0};_.zc=function nn(a,b){return Ym()};_.Bc=function on(a){throw vbb(new bgb)};_.Ib=function pn(){return Jv(this)};_.Ld=function qn(){if(this.e){return this.e}return this.e=this.Kd()};_.c=null;_.d=null;_.e=null;var Um;var iG=mdb(Zhe,'ImmutableMap',714);bcb(715,714,Aie);_._b=function vn(a){return sn(this,a)};_.uc=function wn(a){return dob(this.b,a)};_.Id=function xn(){return Vn(new Ln(this))};_.Jd=function yn(){return Vn(gob(this.b))};_.Kd=function zn(){return Ql(),new Zl(hob(this.b))};_.Fb=function An(a){return fob(this.b,a)};_.xc=function Bn(a){return tn(this,a)};_.Hb=function Cn(){return tb(this.b.c)};_.dc=function Dn(){return this.b.c.dc()};_.gc=function En(){return this.b.c.gc()};_.Ib=function Fn(){return fcb(this.b.c)};var zF=mdb(Zhe,'ForwardingImmutableMap',715);bcb(1974,1973,Bie);_.Bd=function Gn(){return this.Md()};_.Cd=function Hn(){return this.Md()};_.Nc=function Kn(){return new Kub(this,1)};_.Fb=function In(a){return a===this||this.Md().Fb(a)};_.Hb=function Jn(){return this.Md().Hb()};var CF=mdb(Zhe,'ForwardingSet',1974);bcb(1069,1974,Bie,Ln);_.Bd=function Nn(){return eob(this.a.b)};_.Cd=function On(){return eob(this.a.b)};_.Hc=function Mn(b){if(JD(b,42)&&BD(b,42).cd()==null){return false}try{return Dob(eob(this.a.b),b)}catch(a){a=ubb(a);if(JD(a,205)){return false}else throw vbb(a)}};_.Md=function Pn(){return eob(this.a.b)};_.Qc=function Qn(a){var b;b=Eob(eob(this.a.b),a);eob(this.a.b).b.gc()=0?'+':'')+(c/60|0);b=kB($wnd.Math.abs(c)%60);return (Dpb(),Bpb)[this.q.getDay()]+' '+Cpb[this.q.getMonth()]+' '+kB(this.q.getDate())+' '+kB(this.q.getHours())+':'+kB(this.q.getMinutes())+':'+kB(this.q.getSeconds())+' GMT'+a+b+' '+this.q.getFullYear()};var $J=mdb(bie,'Date',199);bcb(1915,199,Cje,nB);_.a=false;_.b=0;_.c=0;_.d=0;_.e=0;_.f=0;_.g=false;_.i=0;_.j=0;_.k=0;_.n=0;_.o=0;_.p=0;var eI=mdb('com.google.gwt.i18n.shared.impl','DateRecord',1915);bcb(1966,1,{});_.fe=function oB(){return null};_.ge=function pB(){return null};_.he=function qB(){return null};_.ie=function rB(){return null};_.je=function sB(){return null};var nI=mdb(Dje,'JSONValue',1966);bcb(216,1966,{216:1},wB,xB);_.Fb=function yB(a){if(!JD(a,216)){return false}return qz(this.a,BD(a,216).a)};_.ee=function zB(){return DB};_.Hb=function AB(){return rz(this.a)};_.fe=function BB(){return this};_.Ib=function CB(){var a,b,c;c=new Wfb('[');for(b=0,a=this.a.length;b0&&(c.a+=',',c);Pfb(c,tB(this,b))}c.a+=']';return c.a};var fI=mdb(Dje,'JSONArray',216);bcb(483,1966,{483:1},HB);_.ee=function IB(){return LB};_.ge=function JB(){return this};_.Ib=function KB(){return Bcb(),''+this.a};_.a=false;var EB,FB;var gI=mdb(Dje,'JSONBoolean',483);bcb(985,60,Tie,MB);var hI=mdb(Dje,'JSONException',985);bcb(1023,1966,{},PB);_.ee=function QB(){return SB};_.Ib=function RB(){return Xhe};var NB;var iI=mdb(Dje,'JSONNull',1023);bcb(258,1966,{258:1},TB);_.Fb=function UB(a){if(!JD(a,258)){return false}return this.a==BD(a,258).a};_.ee=function VB(){return ZB};_.Hb=function WB(){return Hdb(this.a)};_.he=function XB(){return this};_.Ib=function YB(){return this.a+''};_.a=0;var jI=mdb(Dje,'JSONNumber',258);bcb(183,1966,{183:1},eC,fC);_.Fb=function gC(a){if(!JD(a,183)){return false}return qz(this.a,BD(a,183).a)};_.ee=function hC(){return lC};_.Hb=function iC(){return rz(this.a)};_.ie=function jC(){return this};_.Ib=function kC(){var a,b,c,d,e,f,g;g=new Wfb('{');a=true;f=$B(this,KC(ZI,nie,2,0,6,1));for(c=f,d=0,e=c.length;d=0?':'+this.c:'')+')'};_.c=0;var VI=mdb(Phe,'StackTraceElement',310);zD={3:1,475:1,35:1,2:1};var ZI=mdb(Phe,Vie,2);bcb(107,418,{475:1},Hfb,Ifb,Jfb);var WI=mdb(Phe,'StringBuffer',107);bcb(100,418,{475:1},Ufb,Vfb,Wfb);var XI=mdb(Phe,'StringBuilder',100);bcb(687,73,Mje,Xfb);var YI=mdb(Phe,'StringIndexOutOfBoundsException',687);bcb(2043,1,{});var Yfb;bcb(844,1,{},_fb);_.Kb=function agb(a){return BD(a,78).e};var $I=mdb(Phe,'Throwable/lambda$0$Type',844);bcb(41,60,{3:1,102:1,60:1,78:1,41:1},bgb,cgb);var aJ=mdb(Phe,'UnsupportedOperationException',41);bcb(240,236,{3:1,35:1,236:1,240:1},sgb,tgb);_.wd=function wgb(a){return mgb(this,BD(a,240))};_.ke=function xgb(){return Hcb(rgb(this))};_.Fb=function ygb(a){var b;if(this===a){return true}if(JD(a,240)){b=BD(a,240);return this.e==b.e&&mgb(this,b)==0}return false};_.Hb=function zgb(){var a;if(this.b!=0){return this.b}if(this.a<54){a=Cbb(this.f);this.b=Tbb(xbb(a,-1));this.b=33*this.b+Tbb(xbb(Obb(a,32),-1));this.b=17*this.b+QD(this.e);return this.b}this.b=17*Ngb(this.c)+QD(this.e);return this.b};_.Ib=function Agb(){return rgb(this)};_.a=0;_.b=0;_.d=0;_.e=0;_.f=0;var dgb,egb,fgb,ggb,hgb,igb,jgb,kgb;var bJ=mdb('java.math','BigDecimal',240);bcb(91,236,{3:1,35:1,236:1,91:1},Tgb,Ugb,Vgb,Wgb,Xgb,Ygb);_.wd=function $gb(a){return Igb(this,BD(a,91))};_.ke=function _gb(){return Hcb(shb(this,0))};_.Fb=function ahb(a){return Kgb(this,a)};_.Hb=function chb(){return Ngb(this)};_.Ib=function ehb(){return shb(this,0)};_.b=-2;_.c=0;_.d=0;_.e=0;var Bgb,Cgb,Dgb,Egb,Fgb,Ggb;var cJ=mdb('java.math','BigInteger',91);var nhb,ohb;var Bhb,Chb;bcb(488,1967,cie);_.$b=function Xhb(){Uhb(this)};_._b=function Yhb(a){return Mhb(this,a)};_.uc=function Zhb(a){return Nhb(this,a,this.g)||Nhb(this,a,this.f)};_.vc=function $hb(){return new eib(this)};_.xc=function _hb(a){return Ohb(this,a)};_.zc=function aib(a,b){return Rhb(this,a,b)};_.Bc=function bib(a){return Thb(this,a)};_.gc=function cib(){return Vhb(this)};var gJ=mdb(bie,'AbstractHashMap',488);bcb(261,eie,fie,eib);_.$b=function fib(){this.a.$b()};_.Hc=function gib(a){return dib(this,a)};_.Kc=function hib(){return new nib(this.a)};_.Mc=function iib(a){var b;if(dib(this,a)){b=BD(a,42).cd();this.a.Bc(b);return true}return false};_.gc=function jib(){return this.a.gc()};var fJ=mdb(bie,'AbstractHashMap/EntrySet',261);bcb(262,1,aie,nib);_.Nb=function oib(a){Rrb(this,a)};_.Pb=function qib(){return lib(this)};_.Ob=function pib(){return this.b};_.Qb=function rib(){mib(this)};_.b=false;var eJ=mdb(bie,'AbstractHashMap/EntrySetIterator',262);bcb(417,1,aie,vib);_.Nb=function wib(a){Rrb(this,a)};_.Ob=function xib(){return sib(this)};_.Pb=function yib(){return tib(this)};_.Qb=function zib(){uib(this)};_.b=0;_.c=-1;var hJ=mdb(bie,'AbstractList/IteratorImpl',417);bcb(96,417,jie,Bib);_.Qb=function Hib(){uib(this)};_.Rb=function Cib(a){Aib(this,a)};_.Sb=function Dib(){return this.b>0};_.Tb=function Eib(){return this.b};_.Ub=function Fib(){return sCb(this.b>0),this.a.Xb(this.c=--this.b)};_.Vb=function Gib(){return this.b-1};_.Wb=function Iib(a){yCb(this.c!=-1);this.a._c(this.c,a)};var iJ=mdb(bie,'AbstractList/ListIteratorImpl',96);bcb(219,52,Lie,Jib);_.Vc=function Kib(a,b){wCb(a,this.b);this.c.Vc(this.a+a,b);++this.b};_.Xb=function Lib(a){tCb(a,this.b);return this.c.Xb(this.a+a)};_.$c=function Mib(a){var b;tCb(a,this.b);b=this.c.$c(this.a+a);--this.b;return b};_._c=function Nib(a,b){tCb(a,this.b);return this.c._c(this.a+a,b)};_.gc=function Oib(){return this.b};_.a=0;_.b=0;var jJ=mdb(bie,'AbstractList/SubList',219);bcb(384,eie,fie,Pib);_.$b=function Qib(){this.a.$b()};_.Hc=function Rib(a){return this.a._b(a)};_.Kc=function Sib(){var a;return a=this.a.vc().Kc(),new Vib(a)};_.Mc=function Tib(a){if(this.a._b(a)){this.a.Bc(a);return true}return false};_.gc=function Uib(){return this.a.gc()};var mJ=mdb(bie,'AbstractMap/1',384);bcb(691,1,aie,Vib);_.Nb=function Wib(a){Rrb(this,a)};_.Ob=function Xib(){return this.a.Ob()};_.Pb=function Yib(){var a;return a=BD(this.a.Pb(),42),a.cd()};_.Qb=function Zib(){this.a.Qb()};var lJ=mdb(bie,'AbstractMap/1/1',691);bcb(226,28,die,$ib);_.$b=function _ib(){this.a.$b()};_.Hc=function ajb(a){return this.a.uc(a)};_.Kc=function bjb(){var a;return a=this.a.vc().Kc(),new djb(a)};_.gc=function cjb(){return this.a.gc()};var oJ=mdb(bie,'AbstractMap/2',226);bcb(294,1,aie,djb);_.Nb=function ejb(a){Rrb(this,a)};_.Ob=function fjb(){return this.a.Ob()};_.Pb=function gjb(){var a;return a=BD(this.a.Pb(),42),a.dd()};_.Qb=function hjb(){this.a.Qb()};var nJ=mdb(bie,'AbstractMap/2/1',294);bcb(484,1,{484:1,42:1});_.Fb=function jjb(a){var b;if(!JD(a,42)){return false}b=BD(a,42);return wtb(this.d,b.cd())&&wtb(this.e,b.dd())};_.cd=function kjb(){return this.d};_.dd=function ljb(){return this.e};_.Hb=function mjb(){return xtb(this.d)^xtb(this.e)};_.ed=function njb(a){return ijb(this,a)};_.Ib=function ojb(){return this.d+'='+this.e};var pJ=mdb(bie,'AbstractMap/AbstractEntry',484);bcb(383,484,{484:1,383:1,42:1},pjb);var qJ=mdb(bie,'AbstractMap/SimpleEntry',383);bcb(1984,1,_je);_.Fb=function qjb(a){var b;if(!JD(a,42)){return false}b=BD(a,42);return wtb(this.cd(),b.cd())&&wtb(this.dd(),b.dd())};_.Hb=function rjb(){return xtb(this.cd())^xtb(this.dd())};_.Ib=function sjb(){return this.cd()+'='+this.dd()};var rJ=mdb(bie,lie,1984);bcb(1992,1967,gie);_.tc=function vjb(a){return tjb(this,a)};_._b=function wjb(a){return ujb(this,a)};_.vc=function xjb(){return new Bjb(this)};_.xc=function yjb(a){var b;b=a;return Wd(Awb(this,b))};_.ec=function Ajb(){return new Gjb(this)};var wJ=mdb(bie,'AbstractNavigableMap',1992);bcb(739,eie,fie,Bjb);_.Hc=function Cjb(a){return JD(a,42)&&tjb(this.b,BD(a,42))};_.Kc=function Djb(){return new Ywb(this.b)};_.Mc=function Ejb(a){var b;if(JD(a,42)){b=BD(a,42);return Kwb(this.b,b)}return false};_.gc=function Fjb(){return this.b.c};var tJ=mdb(bie,'AbstractNavigableMap/EntrySet',739);bcb(493,eie,iie,Gjb);_.Nc=function Mjb(){return new Rub(this)};_.$b=function Hjb(){zwb(this.a)};_.Hc=function Ijb(a){return ujb(this.a,a)};_.Kc=function Jjb(){var a;return a=new Ywb((new cxb(this.a)).b),new Njb(a)};_.Mc=function Kjb(a){if(ujb(this.a,a)){Jwb(this.a,a);return true}return false};_.gc=function Ljb(){return this.a.c};var vJ=mdb(bie,'AbstractNavigableMap/NavigableKeySet',493);bcb(494,1,aie,Njb);_.Nb=function Ojb(a){Rrb(this,a)};_.Ob=function Pjb(){return sib(this.a.a)};_.Pb=function Qjb(){var a;return a=Wwb(this.a),a.cd()};_.Qb=function Rjb(){Xwb(this.a)};var uJ=mdb(bie,'AbstractNavigableMap/NavigableKeySet/1',494);bcb(2004,28,die);_.Fc=function Sjb(a){return zCb(cub(this,a)),true};_.Gc=function Tjb(a){uCb(a);mCb(a!=this,"Can't add a queue to itself");return ye(this,a)};_.$b=function Ujb(){while(dub(this)!=null);};var xJ=mdb(bie,'AbstractQueue',2004);bcb(302,28,{4:1,20:1,28:1,14:1},jkb,kkb);_.Fc=function lkb(a){return Xjb(this,a),true};_.$b=function nkb(){Yjb(this)};_.Hc=function okb(a){return Zjb(new xkb(this),a)};_.dc=function pkb(){return akb(this)};_.Kc=function qkb(){return new xkb(this)};_.Mc=function rkb(a){return dkb(new xkb(this),a)};_.gc=function skb(){return this.c-this.b&this.a.length-1};_.Nc=function tkb(){return new Kub(this,272)};_.Qc=function ukb(a){var b;b=this.c-this.b&this.a.length-1;a.lengthb&&NC(a,b,null);return a};_.b=0;_.c=0;var BJ=mdb(bie,'ArrayDeque',302);bcb(446,1,aie,xkb);_.Nb=function ykb(a){Rrb(this,a)};_.Ob=function zkb(){return this.a!=this.b};_.Pb=function Akb(){return vkb(this)};_.Qb=function Bkb(){wkb(this)};_.a=0;_.b=0;_.c=-1;var AJ=mdb(bie,'ArrayDeque/IteratorImpl',446);bcb(12,52,ake,Rkb,Skb,Tkb);_.Vc=function Ukb(a,b){Dkb(this,a,b)};_.Fc=function Vkb(a){return Ekb(this,a)};_.Wc=function Wkb(a,b){return Fkb(this,a,b)};_.Gc=function Xkb(a){return Gkb(this,a)};_.$b=function Ykb(){this.c=KC(SI,Uhe,1,0,5,1)};_.Hc=function Zkb(a){return Jkb(this,a,0)!=-1};_.Jc=function $kb(a){Hkb(this,a)};_.Xb=function _kb(a){return Ikb(this,a)};_.Xc=function alb(a){return Jkb(this,a,0)};_.dc=function blb(){return this.c.length==0};_.Kc=function clb(){return new olb(this)};_.$c=function dlb(a){return Kkb(this,a)};_.Mc=function elb(a){return Lkb(this,a)};_.Ud=function flb(a,b){Mkb(this,a,b)};_._c=function glb(a,b){return Nkb(this,a,b)};_.gc=function hlb(){return this.c.length};_.ad=function ilb(a){Okb(this,a)};_.Pc=function jlb(){return Pkb(this)};_.Qc=function klb(a){return Qkb(this,a)};var DJ=mdb(bie,'ArrayList',12);bcb(7,1,aie,olb);_.Nb=function plb(a){Rrb(this,a)};_.Ob=function qlb(){return llb(this)};_.Pb=function rlb(){return mlb(this)};_.Qb=function slb(){nlb(this)};_.a=0;_.b=-1;var CJ=mdb(bie,'ArrayList/1',7);bcb(2013,$wnd.Function,{},Ylb);_.te=function Zlb(a,b){return Kdb(a,b)};bcb(154,52,bke,amb);_.Hc=function bmb(a){return Bt(this,a)!=-1};_.Jc=function cmb(a){var b,c,d,e;uCb(a);for(c=this.a,d=0,e=c.length;d>>0,a.toString(16))};_.f=0;_.i=Qje;var PM=mdb(Gke,'CNode',57);bcb(814,1,{},zDb);var OM=mdb(Gke,'CNode/CNodeBuilder',814);var EDb;bcb(1525,1,{},GDb);_.Oe=function HDb(a,b){return 0};_.Pe=function IDb(a,b){return 0};var QM=mdb(Gke,Ike,1525);bcb(1790,1,{},JDb);_.Le=function KDb(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;j=Pje;for(d=new olb(a.a.b);d.ad.d.c||d.d.c==f.d.c&&d.d.b0?a+this.n.d+this.n.a:0};_.Se=function HHb(){var a,b,c,d,e;e=0;if(this.e){this.b?(e=this.b.a):!!this.a[1][1]&&(e=this.a[1][1].Se())}else if(this.g){e=EHb(this,yHb(this,null,true))}else{for(b=(gHb(),OC(GC(pN,1),Kie,232,0,[dHb,eHb,fHb])),c=0,d=b.length;c0?e+this.n.b+this.n.c:0};_.Te=function IHb(){var a,b,c,d,e;if(this.g){a=yHb(this,null,false);for(c=(gHb(),OC(GC(pN,1),Kie,232,0,[dHb,eHb,fHb])),d=0,e=c.length;d0){d[0]+=this.d;c-=d[0]}if(d[2]>0){d[2]+=this.d;c-=d[2]}this.c.a=$wnd.Math.max(0,c);this.c.d=b.d+a.d+(this.c.a-c)/2;d[1]=$wnd.Math.max(d[1],c);uHb(this,eHb,b.d+a.d+d[0]-(d[1]-c)/2,d)};_.b=null;_.d=0;_.e=false;_.f=false;_.g=false;var rHb=0,sHb=0;var rN=mdb(fle,'GridContainerCell',1473);bcb(461,22,{3:1,35:1,22:1,461:1},OHb);var KHb,LHb,MHb;var sN=ndb(fle,'HorizontalLabelAlignment',461,CI,QHb,PHb);var RHb;bcb(306,212,{212:1,306:1},aIb,bIb,cIb);_.Re=function dIb(){return YHb(this)};_.Se=function eIb(){return ZHb(this)};_.a=0;_.c=false;var tN=mdb(fle,'LabelCell',306);bcb(244,326,{212:1,326:1,244:1},mIb);_.Re=function nIb(){return fIb(this)};_.Se=function oIb(){return gIb(this)};_.Te=function rIb(){hIb(this)};_.Ue=function sIb(){iIb(this)};_.b=0;_.c=0;_.d=false;var yN=mdb(fle,'StripContainerCell',244);bcb(1626,1,Oie,tIb);_.Mb=function uIb(a){return pIb(BD(a,212))};var uN=mdb(fle,'StripContainerCell/lambda$0$Type',1626);bcb(1627,1,{},vIb);_.Fe=function wIb(a){return BD(a,212).Se()};var vN=mdb(fle,'StripContainerCell/lambda$1$Type',1627);bcb(1628,1,Oie,xIb);_.Mb=function yIb(a){return qIb(BD(a,212))};var wN=mdb(fle,'StripContainerCell/lambda$2$Type',1628);bcb(1629,1,{},zIb);_.Fe=function AIb(a){return BD(a,212).Re()};var xN=mdb(fle,'StripContainerCell/lambda$3$Type',1629);bcb(462,22,{3:1,35:1,22:1,462:1},FIb);var BIb,CIb,DIb;var zN=ndb(fle,'VerticalLabelAlignment',462,CI,HIb,GIb);var IIb;bcb(789,1,{},LIb);_.c=0;_.d=0;_.k=0;_.s=0;_.t=0;_.v=false;_.w=0;_.D=false;var CN=mdb(nle,'NodeContext',789);bcb(1471,1,Dke,OIb);_.ue=function PIb(a,b){return NIb(BD(a,61),BD(b,61))};_.Fb=function QIb(a){return this===a};_.ve=function RIb(){return new tpb(this)};var AN=mdb(nle,'NodeContext/0methodref$comparePortSides$Type',1471);bcb(1472,1,Dke,SIb);_.ue=function TIb(a,b){return MIb(BD(a,111),BD(b,111))};_.Fb=function UIb(a){return this===a};_.ve=function VIb(){return new tpb(this)};var BN=mdb(nle,'NodeContext/1methodref$comparePortContexts$Type',1472);bcb(159,22,{3:1,35:1,22:1,159:1},tJb);var WIb,XIb,YIb,ZIb,$Ib,_Ib,aJb,bJb,cJb,dJb,eJb,fJb,gJb,hJb,iJb,jJb,kJb,lJb,mJb,nJb,oJb,pJb;var DN=ndb(nle,'NodeLabelLocation',159,CI,wJb,vJb);var xJb;bcb(111,1,{111:1},AJb);_.a=false;var EN=mdb(nle,'PortContext',111);bcb(1476,1,qie,TJb);_.td=function UJb(a){WHb(BD(a,306))};var FN=mdb(qle,rle,1476);bcb(1477,1,Oie,VJb);_.Mb=function WJb(a){return !!BD(a,111).c};var GN=mdb(qle,sle,1477);bcb(1478,1,qie,XJb);_.td=function YJb(a){WHb(BD(a,111).c)};var HN=mdb(qle,'LabelPlacer/lambda$2$Type',1478);var ZJb;bcb(1475,1,qie,fKb);_.td=function gKb(a){$Jb();zJb(BD(a,111))};var IN=mdb(qle,'NodeLabelAndSizeUtilities/lambda$0$Type',1475);bcb(790,1,qie,mKb);_.td=function nKb(a){kKb(this.b,this.c,this.a,BD(a,181))};_.a=false;_.c=false;var JN=mdb(qle,'NodeLabelCellCreator/lambda$0$Type',790);bcb(1474,1,qie,tKb);_.td=function uKb(a){sKb(this.a,BD(a,181))};var KN=mdb(qle,'PortContextCreator/lambda$0$Type',1474);var BKb;bcb(1829,1,{},VKb);var MN=mdb(ule,'GreedyRectangleStripOverlapRemover',1829);bcb(1830,1,Dke,XKb);_.ue=function YKb(a,b){return WKb(BD(a,222),BD(b,222))};_.Fb=function ZKb(a){return this===a};_.ve=function $Kb(){return new tpb(this)};var LN=mdb(ule,'GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type',1830);bcb(1786,1,{},fLb);_.a=5;_.e=0;var SN=mdb(ule,'RectangleStripOverlapRemover',1786);bcb(1787,1,Dke,jLb);_.ue=function kLb(a,b){return gLb(BD(a,222),BD(b,222))};_.Fb=function lLb(a){return this===a};_.ve=function mLb(){return new tpb(this)};var NN=mdb(ule,'RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type',1787);bcb(1789,1,Dke,nLb);_.ue=function oLb(a,b){return hLb(BD(a,222),BD(b,222))};_.Fb=function pLb(a){return this===a};_.ve=function qLb(){return new tpb(this)};var ON=mdb(ule,'RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type',1789);bcb(406,22,{3:1,35:1,22:1,406:1},wLb);var rLb,sLb,tLb,uLb;var PN=ndb(ule,'RectangleStripOverlapRemover/OverlapRemovalDirection',406,CI,yLb,xLb);var zLb;bcb(222,1,{222:1},BLb);var QN=mdb(ule,'RectangleStripOverlapRemover/RectangleNode',222);bcb(1788,1,qie,CLb);_.td=function DLb(a){aLb(this.a,BD(a,222))};var RN=mdb(ule,'RectangleStripOverlapRemover/lambda$1$Type',1788);bcb(1304,1,Dke,GLb);_.ue=function HLb(a,b){return FLb(BD(a,167),BD(b,167))};_.Fb=function ILb(a){return this===a};_.ve=function JLb(){return new tpb(this)};var WN=mdb(wle,'PolyominoCompactor/CornerCasesGreaterThanRestComparator',1304);bcb(1307,1,{},KLb);_.Kb=function LLb(a){return BD(a,324).a};var TN=mdb(wle,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type',1307);bcb(1308,1,Oie,MLb);_.Mb=function NLb(a){return BD(a,323).a};var UN=mdb(wle,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type',1308);bcb(1309,1,Oie,OLb);_.Mb=function PLb(a){return BD(a,323).a};var VN=mdb(wle,'PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type',1309);bcb(1302,1,Dke,RLb);_.ue=function SLb(a,b){return QLb(BD(a,167),BD(b,167))};_.Fb=function TLb(a){return this===a};_.ve=function ULb(){return new tpb(this)};var YN=mdb(wle,'PolyominoCompactor/MinNumOfExtensionDirectionsComparator',1302);bcb(1305,1,{},VLb);_.Kb=function WLb(a){return BD(a,324).a};var XN=mdb(wle,'PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type',1305);bcb(767,1,Dke,YLb);_.ue=function ZLb(a,b){return XLb(BD(a,167),BD(b,167))};_.Fb=function $Lb(a){return this===a};_.ve=function _Lb(){return new tpb(this)};var ZN=mdb(wle,'PolyominoCompactor/MinNumOfExtensionsComparator',767);bcb(1300,1,Dke,bMb);_.ue=function cMb(a,b){return aMb(BD(a,321),BD(b,321))};_.Fb=function dMb(a){return this===a};_.ve=function eMb(){return new tpb(this)};var _N=mdb(wle,'PolyominoCompactor/MinPerimeterComparator',1300);bcb(1301,1,Dke,gMb);_.ue=function hMb(a,b){return fMb(BD(a,321),BD(b,321))};_.Fb=function iMb(a){return this===a};_.ve=function jMb(){return new tpb(this)};var $N=mdb(wle,'PolyominoCompactor/MinPerimeterComparatorWithShape',1301);bcb(1303,1,Dke,lMb);_.ue=function mMb(a,b){return kMb(BD(a,167),BD(b,167))};_.Fb=function nMb(a){return this===a};_.ve=function oMb(){return new tpb(this)};var bO=mdb(wle,'PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator',1303);bcb(1306,1,{},pMb);_.Kb=function qMb(a){return BD(a,324).a};var aO=mdb(wle,'PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type',1306);bcb(777,1,{},tMb);_.Ce=function uMb(a,b){return sMb(this,BD(a,46),BD(b,167))};var cO=mdb(wle,'SuccessorCombination',777);bcb(644,1,{},wMb);_.Ce=function xMb(a,b){var c;return vMb((c=BD(a,46),BD(b,167),c))};var dO=mdb(wle,'SuccessorJitter',644);bcb(643,1,{},zMb);_.Ce=function AMb(a,b){var c;return yMb((c=BD(a,46),BD(b,167),c))};var eO=mdb(wle,'SuccessorLineByLine',643);bcb(568,1,{},CMb);_.Ce=function DMb(a,b){var c;return BMb((c=BD(a,46),BD(b,167),c))};var fO=mdb(wle,'SuccessorManhattan',568);bcb(1356,1,{},FMb);_.Ce=function GMb(a,b){var c;return EMb((c=BD(a,46),BD(b,167),c))};var gO=mdb(wle,'SuccessorMaxNormWindingInMathPosSense',1356);bcb(400,1,{},JMb);_.Ce=function KMb(a,b){return HMb(this,a,b)};_.c=false;_.d=false;_.e=false;_.f=false;var iO=mdb(wle,'SuccessorQuadrantsGeneric',400);bcb(1357,1,{},LMb);_.Kb=function MMb(a){return BD(a,324).a};var hO=mdb(wle,'SuccessorQuadrantsGeneric/lambda$0$Type',1357);bcb(323,22,{3:1,35:1,22:1,323:1},SMb);_.a=false;var NMb,OMb,PMb,QMb;var jO=ndb(Ble,Cle,323,CI,UMb,TMb);var VMb;bcb(1298,1,{});_.Ib=function bNb(){var a,b,c,d,e,f;c=' ';a=meb(0);for(e=0;e=0?'b'+a+'['+fRb(this.a)+']':'b['+fRb(this.a)+']'}return 'b_'+FCb(this)};var YO=mdb(jme,'FBendpoint',559);bcb(282,134,{3:1,282:1,94:1,134:1},gRb);_.Ib=function hRb(){return fRb(this)};var ZO=mdb(jme,'FEdge',282);bcb(231,134,{3:1,231:1,94:1,134:1},kRb);var $O=mdb(jme,'FGraph',231);bcb(447,357,{3:1,447:1,357:1,94:1,134:1},mRb);_.Ib=function nRb(){return this.b==null||this.b.length==0?'l['+fRb(this.a)+']':'l_'+this.b};var _O=mdb(jme,'FLabel',447);bcb(144,357,{3:1,144:1,357:1,94:1,134:1},pRb);_.Ib=function qRb(){return oRb(this)};_.b=0;var aP=mdb(jme,'FNode',144);bcb(2003,1,{});_.bf=function vRb(a){rRb(this,a)};_.cf=function wRb(){sRb(this)};_.d=0;var cP=mdb(lme,'AbstractForceModel',2003);bcb(631,2003,{631:1},xRb);_.af=function zRb(a,b){var c,d,e,f,g;uRb(this.f,a,b);e=c7c(R6c(b.d),a.d);g=$wnd.Math.sqrt(e.a*e.a+e.b*e.b);d=$wnd.Math.max(0,g-U6c(a.e)/2-U6c(b.e)/2);c=jRb(this.e,a,b);c>0?(f=-yRb(d,this.c)*c):(f=CRb(d,this.b)*BD(vNb(a,(wSb(),oSb)),19).a);Y6c(e,f/g);return e};_.bf=function ARb(a){rRb(this,a);this.a=BD(vNb(a,(wSb(),eSb)),19).a;this.c=Edb(ED(vNb(a,uSb)));this.b=Edb(ED(vNb(a,qSb)))};_.df=function BRb(a){return a0&&(f-=ERb(d,this.a)*c);Y6c(e,f*this.b/g);return e};_.bf=function GRb(a){var b,c,d,e,f,g,h;rRb(this,a);this.b=Edb(ED(vNb(a,(wSb(),vSb))));this.c=this.b/BD(vNb(a,eSb),19).a;d=a.e.c.length;f=0;e=0;for(h=new olb(a.e);h.a0};_.a=0;_.b=0;_.c=0;var eP=mdb(lme,'FruchtermanReingoldModel',632);bcb(849,1,ale,TRb);_.Qe=function URb(a){t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,mme),''),'Force Model'),'Determines the model for force calculation.'),MRb),(_5c(),V5c)),gP),pqb((N5c(),L5c)))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,nme),''),'Iterations'),'The number of iterations on the force model.'),meb(300)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ome),''),'Repulsive Power'),'Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model'),meb(0)),X5c),JI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,pme),''),'FR Temperature'),'The temperature is used as a scaling factor for particle displacements.'),qme),U5c),BI),pqb(L5c))));o4c(a,pme,mme,RRb);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,rme),''),'Eades Repulsion'),"Factor for repulsive forces in Eades' model."),5),U5c),BI),pqb(L5c))));o4c(a,rme,mme,ORb);xSb((new ySb,a))};var KRb,LRb,MRb,NRb,ORb,PRb,QRb,RRb;var fP=mdb(sme,'ForceMetaDataProvider',849);bcb(424,22,{3:1,35:1,22:1,424:1},YRb);var VRb,WRb;var gP=ndb(sme,'ForceModelStrategy',424,CI,$Rb,ZRb);var _Rb;bcb(988,1,ale,ySb);_.Qe=function zSb(a){xSb(a)};var bSb,cSb,dSb,eSb,fSb,gSb,hSb,iSb,jSb,kSb,lSb,mSb,nSb,oSb,pSb,qSb,rSb,sSb,tSb,uSb,vSb;var iP=mdb(sme,'ForceOptions',988);bcb(989,1,{},ASb);_.$e=function BSb(){var a;return a=new ZQb,a};_._e=function CSb(a){};var hP=mdb(sme,'ForceOptions/ForceFactory',989);var DSb,ESb,FSb,GSb;bcb(850,1,ale,PSb);_.Qe=function QSb(a){t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Mme),''),'Fixed Position'),'Prevent that the node is moved by the layout algorithm.'),(Bcb(),false)),(_5c(),T5c)),wI),pqb((N5c(),K5c)))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Nme),''),'Desired Edge Length'),'Either specified for parent nodes or for individual edges, where the latter takes higher precedence.'),100),U5c),BI),qqb(L5c,OC(GC(e1,1),Kie,175,0,[I5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ome),''),'Layout Dimension'),'Dimensions that are permitted to be altered during layout.'),KSb),V5c),oP),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Pme),''),'Stress Epsilon'),'Termination criterion for the iterative process.'),qme),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Qme),''),'Iteration Limit'),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),meb(Ohe)),X5c),JI),pqb(L5c))));cTb((new dTb,a))};var ISb,JSb,KSb,LSb,MSb,NSb;var jP=mdb(sme,'StressMetaDataProvider',850);bcb(992,1,ale,dTb);_.Qe=function eTb(a){cTb(a)};var RSb,SSb,TSb,USb,VSb,WSb,XSb,YSb,ZSb,$Sb,_Sb,aTb;var lP=mdb(sme,'StressOptions',992);bcb(993,1,{},fTb);_.$e=function gTb(){var a;return a=new iTb,a};_._e=function hTb(a){};var kP=mdb(sme,'StressOptions/StressFactory',993);bcb(1128,209,Mle,iTb);_.Ze=function jTb(a,b){var c,d,e,f,g;Odd(b,Sme,1);Ccb(DD(hkd(a,(bTb(),VSb))))?Ccb(DD(hkd(a,_Sb)))||$Cb((c=new _Cb((Pgd(),new bhd(a))),c)):WQb(new ZQb,a,Udd(b,1));e=TQb(a);d=LQb(this.a,e);for(g=d.Kc();g.Ob();){f=BD(g.Pb(),231);if(f.e.c.length<=1){continue}sTb(this.b,f);qTb(this.b);Hkb(f.d,new kTb)}e=KQb(d);SQb(e);Qdd(b)};var nP=mdb(Ume,'StressLayoutProvider',1128);bcb(1129,1,qie,kTb);_.td=function lTb(a){lRb(BD(a,447))};var mP=mdb(Ume,'StressLayoutProvider/lambda$0$Type',1129);bcb(990,1,{},tTb);_.c=0;_.e=0;_.g=0;var qP=mdb(Ume,'StressMajorization',990);bcb(379,22,{3:1,35:1,22:1,379:1},zTb);var vTb,wTb,xTb;var oP=ndb(Ume,'StressMajorization/Dimension',379,CI,BTb,ATb);var CTb;bcb(991,1,Dke,ETb);_.ue=function FTb(a,b){return uTb(this.a,BD(a,144),BD(b,144))};_.Fb=function GTb(a){return this===a};_.ve=function HTb(){return new tpb(this)};var pP=mdb(Ume,'StressMajorization/lambda$0$Type',991);bcb(1229,1,{},PTb);var tP=mdb(Wme,'ElkLayered',1229);bcb(1230,1,qie,STb);_.td=function TTb(a){QTb(BD(a,37))};var rP=mdb(Wme,'ElkLayered/lambda$0$Type',1230);bcb(1231,1,qie,UTb);_.td=function VTb(a){RTb(this.a,BD(a,37))};var sP=mdb(Wme,'ElkLayered/lambda$1$Type',1231);bcb(1263,1,{},bUb);var WTb,XTb,YTb;var xP=mdb(Wme,'GraphConfigurator',1263);bcb(759,1,qie,dUb);_.td=function eUb(a){$Tb(this.a,BD(a,10))};var uP=mdb(Wme,'GraphConfigurator/lambda$0$Type',759);bcb(760,1,{},fUb);_.Kb=function gUb(a){return ZTb(),new YAb(null,new Kub(BD(a,29).a,16))};var vP=mdb(Wme,'GraphConfigurator/lambda$1$Type',760);bcb(761,1,qie,hUb);_.td=function iUb(a){$Tb(this.a,BD(a,10))};var wP=mdb(Wme,'GraphConfigurator/lambda$2$Type',761);bcb(1127,209,Mle,jUb);_.Ze=function kUb(a,b){var c;c=U1b(new a2b,a);PD(hkd(a,(Nyc(),axc)))===PD((hbd(),ebd))?JTb(this.a,c,b):KTb(this.a,c,b);z2b(new D2b,c)};var yP=mdb(Wme,'LayeredLayoutProvider',1127);bcb(356,22,{3:1,35:1,22:1,356:1},rUb);var lUb,mUb,nUb,oUb,pUb;var zP=ndb(Wme,'LayeredPhases',356,CI,tUb,sUb);var uUb;bcb(1651,1,{},CUb);_.i=0;var wUb;var CP=mdb(Xme,'ComponentsToCGraphTransformer',1651);var hVb;bcb(1652,1,{},DUb);_.ef=function EUb(a,b){return $wnd.Math.min(a.a!=null?Edb(a.a):a.c.i,b.a!=null?Edb(b.a):b.c.i)};_.ff=function FUb(a,b){return $wnd.Math.min(a.a!=null?Edb(a.a):a.c.i,b.a!=null?Edb(b.a):b.c.i)};var AP=mdb(Xme,'ComponentsToCGraphTransformer/1',1652);bcb(81,1,{81:1});_.i=0;_.k=true;_.o=Qje;var IP=mdb(Yme,'CNode',81);bcb(460,81,{460:1,81:1},GUb,HUb);_.Ib=function IUb(){return ''};var BP=mdb(Xme,'ComponentsToCGraphTransformer/CRectNode',460);bcb(1623,1,{},VUb);var JUb,KUb;var FP=mdb(Xme,'OneDimensionalComponentsCompaction',1623);bcb(1624,1,{},YUb);_.Kb=function ZUb(a){return WUb(BD(a,46))};_.Fb=function $Ub(a){return this===a};var DP=mdb(Xme,'OneDimensionalComponentsCompaction/lambda$0$Type',1624);bcb(1625,1,{},_Ub);_.Kb=function aVb(a){return XUb(BD(a,46))};_.Fb=function bVb(a){return this===a};var EP=mdb(Xme,'OneDimensionalComponentsCompaction/lambda$1$Type',1625);bcb(1654,1,{},dVb);var GP=mdb(Yme,'CGraph',1654);bcb(189,1,{189:1},gVb);_.b=0;_.c=0;_.e=0;_.g=true;_.i=Qje;var HP=mdb(Yme,'CGroup',189);bcb(1653,1,{},jVb);_.ef=function kVb(a,b){return $wnd.Math.max(a.a!=null?Edb(a.a):a.c.i,b.a!=null?Edb(b.a):b.c.i)};_.ff=function lVb(a,b){return $wnd.Math.max(a.a!=null?Edb(a.a):a.c.i,b.a!=null?Edb(b.a):b.c.i)};var JP=mdb(Yme,Ike,1653);bcb(1655,1,{},CVb);_.d=false;var mVb;var LP=mdb(Yme,Nke,1655);bcb(1656,1,{},DVb);_.Kb=function EVb(a){return nVb(),Bcb(),BD(BD(a,46).a,81).d.e!=0?true:false};_.Fb=function FVb(a){return this===a};var KP=mdb(Yme,Oke,1656);bcb(823,1,{},IVb);_.a=false;_.b=false;_.c=false;_.d=false;var MP=mdb(Yme,Pke,823);bcb(1825,1,{},OVb);var RP=mdb(Zme,Qke,1825);var bQ=odb($me,Fke);bcb(1826,1,{369:1},SVb);_.Ke=function TVb(a){QVb(this,BD(a,466))};var OP=mdb(Zme,Rke,1826);bcb(1827,1,Dke,VVb);_.ue=function WVb(a,b){return UVb(BD(a,81),BD(b,81))};_.Fb=function XVb(a){return this===a};_.ve=function YVb(){return new tpb(this)};var NP=mdb(Zme,Ske,1827);bcb(466,1,{466:1},ZVb);_.a=false;var PP=mdb(Zme,Tke,466);bcb(1828,1,Dke,$Vb);_.ue=function _Vb(a,b){return PVb(BD(a,466),BD(b,466))};_.Fb=function aWb(a){return this===a};_.ve=function bWb(){return new tpb(this)};var QP=mdb(Zme,Uke,1828);bcb(140,1,{140:1},cWb,dWb);_.Fb=function eWb(a){var b;if(a==null){return false}if(TP!=rb(a)){return false}b=BD(a,140);return wtb(this.c,b.c)&&wtb(this.d,b.d)};_.Hb=function fWb(){return Hlb(OC(GC(SI,1),Uhe,1,5,[this.c,this.d]))};_.Ib=function gWb(){return '('+this.c+She+this.d+(this.a?'cx':'')+this.b+')'};_.a=true;_.c=0;_.d=0;var TP=mdb($me,'Point',140);bcb(405,22,{3:1,35:1,22:1,405:1},oWb);var hWb,iWb,jWb,kWb;var SP=ndb($me,'Point/Quadrant',405,CI,sWb,rWb);var tWb;bcb(1642,1,{},CWb);_.b=null;_.c=null;_.d=null;_.e=null;_.f=null;var vWb,wWb,xWb,yWb,zWb;var aQ=mdb($me,'RectilinearConvexHull',1642);bcb(574,1,{369:1},NWb);_.Ke=function OWb(a){MWb(this,BD(a,140))};_.b=0;var KWb;var VP=mdb($me,'RectilinearConvexHull/MaximalElementsEventHandler',574);bcb(1644,1,Dke,QWb);_.ue=function RWb(a,b){return PWb(ED(a),ED(b))};_.Fb=function SWb(a){return this===a};_.ve=function TWb(){return new tpb(this)};var UP=mdb($me,'RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type',1644);bcb(1643,1,{369:1},VWb);_.Ke=function WWb(a){UWb(this,BD(a,140))};_.a=0;_.b=null;_.c=null;_.d=null;_.e=null;var WP=mdb($me,'RectilinearConvexHull/RectangleEventHandler',1643);bcb(1645,1,Dke,XWb);_.ue=function YWb(a,b){return EWb(BD(a,140),BD(b,140))};_.Fb=function ZWb(a){return this===a};_.ve=function $Wb(){return new tpb(this)};var XP=mdb($me,'RectilinearConvexHull/lambda$0$Type',1645);bcb(1646,1,Dke,_Wb);_.ue=function aXb(a,b){return FWb(BD(a,140),BD(b,140))};_.Fb=function bXb(a){return this===a};_.ve=function cXb(){return new tpb(this)};var YP=mdb($me,'RectilinearConvexHull/lambda$1$Type',1646);bcb(1647,1,Dke,dXb);_.ue=function eXb(a,b){return GWb(BD(a,140),BD(b,140))};_.Fb=function fXb(a){return this===a};_.ve=function gXb(){return new tpb(this)};var ZP=mdb($me,'RectilinearConvexHull/lambda$2$Type',1647);bcb(1648,1,Dke,hXb);_.ue=function iXb(a,b){return HWb(BD(a,140),BD(b,140))};_.Fb=function jXb(a){return this===a};_.ve=function kXb(){return new tpb(this)};var $P=mdb($me,'RectilinearConvexHull/lambda$3$Type',1648);bcb(1649,1,Dke,lXb);_.ue=function mXb(a,b){return IWb(BD(a,140),BD(b,140))};_.Fb=function nXb(a){return this===a};_.ve=function oXb(){return new tpb(this)};var _P=mdb($me,'RectilinearConvexHull/lambda$4$Type',1649);bcb(1650,1,{},qXb);var cQ=mdb($me,'Scanline',1650);bcb(2005,1,{});var dQ=mdb(_me,'AbstractGraphPlacer',2005);bcb(325,1,{325:1},AXb);_.mf=function BXb(a){if(this.nf(a)){Rc(this.b,BD(vNb(a,(wtc(),Esc)),21),a);return true}else{return false}};_.nf=function CXb(a){var b,c,d,e;b=BD(vNb(a,(wtc(),Esc)),21);e=BD(Qc(wXb,b),21);for(d=e.Kc();d.Ob();){c=BD(d.Pb(),21);if(!BD(Qc(this.b,c),15).dc()){return false}}return true};var wXb;var gQ=mdb(_me,'ComponentGroup',325);bcb(765,2005,{},HXb);_.of=function IXb(a){var b,c;for(c=new olb(this.a);c.an){v=0;w+=m+e;m=0}q=g.c;uXb(g,v+q.a,w+q.b);X6c(q);c=$wnd.Math.max(c,v+s.a);m=$wnd.Math.max(m,s.b);v+=s.a+e}b.f.a=c;b.f.b=w+m;if(Ccb(DD(vNb(f,qwc)))){d=new gYb;YXb(d,a,e);for(l=a.Kc();l.Ob();){k=BD(l.Pb(),37);P6c(X6c(k.c),d.e)}P6c(X6c(b.f),d.a)}tXb(b,a)};var uQ=mdb(_me,'SimpleRowGraphPlacer',1291);bcb(1292,1,Dke,VYb);_.ue=function WYb(a,b){return UYb(BD(a,37),BD(b,37))};_.Fb=function XYb(a){return this===a};_.ve=function YYb(){return new tpb(this)};var tQ=mdb(_me,'SimpleRowGraphPlacer/1',1292);var ZYb;bcb(1262,1,Vke,dZb);_.Lb=function eZb(a){var b;return b=BD(vNb(BD(a,243).b,(Nyc(),jxc)),74),!!b&&b.b!=0};_.Fb=function fZb(a){return this===a};_.Mb=function gZb(a){var b;return b=BD(vNb(BD(a,243).b,(Nyc(),jxc)),74),!!b&&b.b!=0};var vQ=mdb(dne,'CompoundGraphPostprocessor/1',1262);bcb(1261,1,ene,wZb);_.pf=function xZb(a,b){qZb(this,BD(a,37),b)};var xQ=mdb(dne,'CompoundGraphPreprocessor',1261);bcb(441,1,{441:1},yZb);_.c=false;var wQ=mdb(dne,'CompoundGraphPreprocessor/ExternalPort',441);bcb(243,1,{243:1},BZb);_.Ib=function CZb(){return Zr(this.c)+':'+TZb(this.b)};var zQ=mdb(dne,'CrossHierarchyEdge',243);bcb(763,1,Dke,EZb);_.ue=function FZb(a,b){return DZb(this,BD(a,243),BD(b,243))};_.Fb=function GZb(a){return this===a};_.ve=function IZb(){return new tpb(this)};var yQ=mdb(dne,'CrossHierarchyEdgeComparator',763);bcb(299,134,{3:1,299:1,94:1,134:1});_.p=0;var JQ=mdb(fne,'LGraphElement',299);bcb(17,299,{3:1,17:1,299:1,94:1,134:1},UZb);_.Ib=function VZb(){return TZb(this)};var AQ=mdb(fne,'LEdge',17);bcb(37,299,{3:1,20:1,37:1,299:1,94:1,134:1},XZb);_.Jc=function YZb(a){reb(this,a)};_.Kc=function ZZb(){return new olb(this.b)};_.Ib=function $Zb(){if(this.b.c.length==0){return 'G-unlayered'+Fe(this.a)}else if(this.a.c.length==0){return 'G-layered'+Fe(this.b)}return 'G[layerless'+Fe(this.a)+', layers'+Fe(this.b)+']'};var KQ=mdb(fne,'LGraph',37);var _Zb;bcb(657,1,{});_.qf=function b$b(){return this.e.n};_.We=function c$b(a){return vNb(this.e,a)};_.rf=function d$b(){return this.e.o};_.sf=function e$b(){return this.e.p};_.Xe=function f$b(a){return wNb(this.e,a)};_.tf=function g$b(a){this.e.n.a=a.a;this.e.n.b=a.b};_.uf=function h$b(a){this.e.o.a=a.a;this.e.o.b=a.b};_.vf=function i$b(a){this.e.p=a};var BQ=mdb(fne,'LGraphAdapters/AbstractLShapeAdapter',657);bcb(577,1,{839:1},j$b);_.wf=function k$b(){var a,b;if(!this.b){this.b=Pu(this.a.b.c.length);for(b=new olb(this.a.b);b.a0&&E_b((BCb(c-1,b.length),b.charCodeAt(c-1)),nne)){--c}if(g> ',a),C0b(c));Qfb(Pfb((a.a+='[',a),c.i),']')}return a.a};_.c=true;_.d=false;var t0b,u0b,v0b,w0b,x0b,y0b;var aR=mdb(fne,'LPort',11);bcb(397,1,vie,J0b);_.Jc=function K0b(a){reb(this,a)};_.Kc=function L0b(){var a;a=new olb(this.a.e);return new M0b(a)};var RQ=mdb(fne,'LPort/1',397);bcb(1290,1,aie,M0b);_.Nb=function N0b(a){Rrb(this,a)};_.Pb=function P0b(){return BD(mlb(this.a),17).c};_.Ob=function O0b(){return llb(this.a)};_.Qb=function Q0b(){nlb(this.a)};var QQ=mdb(fne,'LPort/1/1',1290);bcb(359,1,vie,R0b);_.Jc=function S0b(a){reb(this,a)};_.Kc=function T0b(){var a;return a=new olb(this.a.g),new U0b(a)};var TQ=mdb(fne,'LPort/2',359);bcb(762,1,aie,U0b);_.Nb=function V0b(a){Rrb(this,a)};_.Pb=function X0b(){return BD(mlb(this.a),17).d};_.Ob=function W0b(){return llb(this.a)};_.Qb=function Y0b(){nlb(this.a)};var SQ=mdb(fne,'LPort/2/1',762);bcb(1283,1,vie,Z0b);_.Jc=function $0b(a){reb(this,a)};_.Kc=function _0b(){return new b1b(this)};var VQ=mdb(fne,'LPort/CombineIter',1283);bcb(201,1,aie,b1b);_.Nb=function c1b(a){Rrb(this,a)};_.Qb=function f1b(){Srb()};_.Ob=function d1b(){return a1b(this)};_.Pb=function e1b(){return llb(this.a)?mlb(this.a):mlb(this.b)};var UQ=mdb(fne,'LPort/CombineIter/1',201);bcb(1285,1,Vke,h1b);_.Lb=function i1b(a){return g1b(a)};_.Fb=function j1b(a){return this===a};_.Mb=function k1b(a){return z0b(),BD(a,11).e.c.length!=0};var WQ=mdb(fne,'LPort/lambda$0$Type',1285);bcb(1284,1,Vke,m1b);_.Lb=function n1b(a){return l1b(a)};_.Fb=function o1b(a){return this===a};_.Mb=function p1b(a){return z0b(),BD(a,11).g.c.length!=0};var XQ=mdb(fne,'LPort/lambda$1$Type',1284);bcb(1286,1,Vke,q1b);_.Lb=function r1b(a){return z0b(),BD(a,11).j==(Ucd(),Acd)};_.Fb=function s1b(a){return this===a};_.Mb=function t1b(a){return z0b(),BD(a,11).j==(Ucd(),Acd)};var YQ=mdb(fne,'LPort/lambda$2$Type',1286);bcb(1287,1,Vke,u1b);_.Lb=function v1b(a){return z0b(),BD(a,11).j==(Ucd(),zcd)};_.Fb=function w1b(a){return this===a};_.Mb=function x1b(a){return z0b(),BD(a,11).j==(Ucd(),zcd)};var ZQ=mdb(fne,'LPort/lambda$3$Type',1287);bcb(1288,1,Vke,y1b);_.Lb=function z1b(a){return z0b(),BD(a,11).j==(Ucd(),Rcd)};_.Fb=function A1b(a){return this===a};_.Mb=function B1b(a){return z0b(),BD(a,11).j==(Ucd(),Rcd)};var $Q=mdb(fne,'LPort/lambda$4$Type',1288);bcb(1289,1,Vke,C1b);_.Lb=function D1b(a){return z0b(),BD(a,11).j==(Ucd(),Tcd)};_.Fb=function E1b(a){return this===a};_.Mb=function F1b(a){return z0b(),BD(a,11).j==(Ucd(),Tcd)};var _Q=mdb(fne,'LPort/lambda$5$Type',1289);bcb(29,299,{3:1,20:1,299:1,29:1,94:1,134:1},H1b);_.Jc=function I1b(a){reb(this,a)};_.Kc=function J1b(){return new olb(this.a)};_.Ib=function K1b(){return 'L_'+Jkb(this.b.b,this,0)+Fe(this.a)};var cR=mdb(fne,'Layer',29);bcb(1342,1,{},a2b);var mR=mdb(tne,une,1342);bcb(1346,1,{},e2b);_.Kb=function f2b(a){return atd(BD(a,82))};var dR=mdb(tne,'ElkGraphImporter/0methodref$connectableShapeToNode$Type',1346);bcb(1349,1,{},g2b);_.Kb=function h2b(a){return atd(BD(a,82))};var eR=mdb(tne,'ElkGraphImporter/1methodref$connectableShapeToNode$Type',1349);bcb(1343,1,qie,i2b);_.td=function j2b(a){Q1b(this.a,BD(a,118))};var fR=mdb(tne,vne,1343);bcb(1344,1,qie,k2b);_.td=function l2b(a){Q1b(this.a,BD(a,118))};var gR=mdb(tne,wne,1344);bcb(1345,1,{},m2b);_.Kb=function n2b(a){return new YAb(null,new Kub(Old(BD(a,79)),16))};var hR=mdb(tne,xne,1345);bcb(1347,1,Oie,o2b);_.Mb=function p2b(a){return b2b(this.a,BD(a,33))};var iR=mdb(tne,yne,1347);bcb(1348,1,{},q2b);_.Kb=function r2b(a){return new YAb(null,new Kub(Nld(BD(a,79)),16))};var jR=mdb(tne,'ElkGraphImporter/lambda$5$Type',1348);bcb(1350,1,Oie,s2b);_.Mb=function t2b(a){return c2b(this.a,BD(a,33))};var kR=mdb(tne,'ElkGraphImporter/lambda$7$Type',1350);bcb(1351,1,Oie,u2b);_.Mb=function v2b(a){return d2b(BD(a,79))};var lR=mdb(tne,'ElkGraphImporter/lambda$8$Type',1351);bcb(1278,1,{},D2b);var w2b;var rR=mdb(tne,'ElkGraphLayoutTransferrer',1278);bcb(1279,1,Oie,G2b);_.Mb=function H2b(a){return E2b(this.a,BD(a,17))};var nR=mdb(tne,'ElkGraphLayoutTransferrer/lambda$0$Type',1279);bcb(1280,1,qie,I2b);_.td=function J2b(a){x2b();Ekb(this.a,BD(a,17))};var oR=mdb(tne,'ElkGraphLayoutTransferrer/lambda$1$Type',1280);bcb(1281,1,Oie,K2b);_.Mb=function L2b(a){return F2b(this.a,BD(a,17))};var pR=mdb(tne,'ElkGraphLayoutTransferrer/lambda$2$Type',1281);bcb(1282,1,qie,M2b);_.td=function N2b(a){x2b();Ekb(this.a,BD(a,17))};var qR=mdb(tne,'ElkGraphLayoutTransferrer/lambda$3$Type',1282);bcb(1485,1,ene,S2b);_.pf=function T2b(a,b){Q2b(BD(a,37),b)};var uR=mdb(Ane,'CommentNodeMarginCalculator',1485);bcb(1486,1,{},U2b);_.Kb=function V2b(a){return new YAb(null,new Kub(BD(a,29).a,16))};var sR=mdb(Ane,'CommentNodeMarginCalculator/lambda$0$Type',1486);bcb(1487,1,qie,W2b);_.td=function X2b(a){R2b(BD(a,10))};var tR=mdb(Ane,'CommentNodeMarginCalculator/lambda$1$Type',1487);bcb(1488,1,ene,_2b);_.pf=function a3b(a,b){Z2b(BD(a,37),b)};var vR=mdb(Ane,'CommentPostprocessor',1488);bcb(1489,1,ene,e3b);_.pf=function f3b(a,b){b3b(BD(a,37),b)};var wR=mdb(Ane,'CommentPreprocessor',1489);bcb(1490,1,ene,h3b);_.pf=function i3b(a,b){g3b(BD(a,37),b)};var xR=mdb(Ane,'ConstraintsPostprocessor',1490);bcb(1491,1,ene,p3b);_.pf=function q3b(a,b){n3b(BD(a,37),b)};var yR=mdb(Ane,'EdgeAndLayerConstraintEdgeReverser',1491);bcb(1492,1,ene,t3b);_.pf=function v3b(a,b){r3b(BD(a,37),b)};var CR=mdb(Ane,'EndLabelPostprocessor',1492);bcb(1493,1,{},w3b);_.Kb=function x3b(a){return new YAb(null,new Kub(BD(a,29).a,16))};var zR=mdb(Ane,'EndLabelPostprocessor/lambda$0$Type',1493);bcb(1494,1,Oie,y3b);_.Mb=function z3b(a){return u3b(BD(a,10))};var AR=mdb(Ane,'EndLabelPostprocessor/lambda$1$Type',1494);bcb(1495,1,qie,A3b);_.td=function B3b(a){s3b(BD(a,10))};var BR=mdb(Ane,'EndLabelPostprocessor/lambda$2$Type',1495);bcb(1496,1,ene,M3b);_.pf=function P3b(a,b){I3b(BD(a,37),b)};var JR=mdb(Ane,'EndLabelPreprocessor',1496);bcb(1497,1,{},Q3b);_.Kb=function R3b(a){return new YAb(null,new Kub(BD(a,29).a,16))};var DR=mdb(Ane,'EndLabelPreprocessor/lambda$0$Type',1497);bcb(1498,1,qie,S3b);_.td=function T3b(a){E3b(this.a,this.b,this.c,BD(a,10))};_.a=0;_.b=0;_.c=false;var ER=mdb(Ane,'EndLabelPreprocessor/lambda$1$Type',1498);bcb(1499,1,Oie,U3b);_.Mb=function V3b(a){return PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),pad))};var FR=mdb(Ane,'EndLabelPreprocessor/lambda$2$Type',1499);bcb(1500,1,qie,W3b);_.td=function X3b(a){Dsb(this.a,BD(a,70))};var GR=mdb(Ane,'EndLabelPreprocessor/lambda$3$Type',1500);bcb(1501,1,Oie,Y3b);_.Mb=function Z3b(a){return PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),oad))};var HR=mdb(Ane,'EndLabelPreprocessor/lambda$4$Type',1501);bcb(1502,1,qie,$3b);_.td=function _3b(a){Dsb(this.a,BD(a,70))};var IR=mdb(Ane,'EndLabelPreprocessor/lambda$5$Type',1502);bcb(1551,1,ene,i4b);_.pf=function j4b(a,b){f4b(BD(a,37),b)};var a4b;var RR=mdb(Ane,'EndLabelSorter',1551);bcb(1552,1,Dke,l4b);_.ue=function m4b(a,b){return k4b(BD(a,456),BD(b,456))};_.Fb=function n4b(a){return this===a};_.ve=function o4b(){return new tpb(this)};var KR=mdb(Ane,'EndLabelSorter/1',1552);bcb(456,1,{456:1},p4b);var LR=mdb(Ane,'EndLabelSorter/LabelGroup',456);bcb(1553,1,{},q4b);_.Kb=function r4b(a){return b4b(),new YAb(null,new Kub(BD(a,29).a,16))};var MR=mdb(Ane,'EndLabelSorter/lambda$0$Type',1553);bcb(1554,1,Oie,s4b);_.Mb=function t4b(a){return b4b(),BD(a,10).k==(j0b(),h0b)};var NR=mdb(Ane,'EndLabelSorter/lambda$1$Type',1554);bcb(1555,1,qie,u4b);_.td=function v4b(a){g4b(BD(a,10))};var OR=mdb(Ane,'EndLabelSorter/lambda$2$Type',1555);bcb(1556,1,Oie,w4b);_.Mb=function x4b(a){return b4b(),PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),oad))};var PR=mdb(Ane,'EndLabelSorter/lambda$3$Type',1556);bcb(1557,1,Oie,y4b);_.Mb=function z4b(a){return b4b(),PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),pad))};var QR=mdb(Ane,'EndLabelSorter/lambda$4$Type',1557);bcb(1503,1,ene,L4b);_.pf=function M4b(a,b){J4b(this,BD(a,37))};_.b=0;_.c=0;var YR=mdb(Ane,'FinalSplineBendpointsCalculator',1503);bcb(1504,1,{},N4b);_.Kb=function O4b(a){return new YAb(null,new Kub(BD(a,29).a,16))};var SR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$0$Type',1504);bcb(1505,1,{},P4b);_.Kb=function Q4b(a){return new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var TR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$1$Type',1505);bcb(1506,1,Oie,R4b);_.Mb=function S4b(a){return !OZb(BD(a,17))};var UR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$2$Type',1506);bcb(1507,1,Oie,T4b);_.Mb=function U4b(a){return wNb(BD(a,17),(wtc(),rtc))};var VR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$3$Type',1507);bcb(1508,1,qie,V4b);_.td=function W4b(a){C4b(this.a,BD(a,128))};var WR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$4$Type',1508);bcb(1509,1,qie,X4b);_.td=function Y4b(a){smb(BD(a,17).a)};var XR=mdb(Ane,'FinalSplineBendpointsCalculator/lambda$5$Type',1509);bcb(792,1,ene,u5b);_.pf=function v5b(a,b){l5b(this,BD(a,37),b)};var $R=mdb(Ane,'GraphTransformer',792);bcb(511,22,{3:1,35:1,22:1,511:1},z5b);var w5b,x5b;var ZR=ndb(Ane,'GraphTransformer/Mode',511,CI,B5b,A5b);var C5b;bcb(1510,1,ene,I5b);_.pf=function J5b(a,b){F5b(BD(a,37),b)};var _R=mdb(Ane,'HierarchicalNodeResizingProcessor',1510);bcb(1511,1,ene,Q5b);_.pf=function R5b(a,b){M5b(BD(a,37),b)};var bS=mdb(Ane,'HierarchicalPortConstraintProcessor',1511);bcb(1512,1,Dke,T5b);_.ue=function U5b(a,b){return S5b(BD(a,10),BD(b,10))};_.Fb=function V5b(a){return this===a};_.ve=function W5b(){return new tpb(this)};var aS=mdb(Ane,'HierarchicalPortConstraintProcessor/NodeComparator',1512);bcb(1513,1,ene,Z5b);_.pf=function $5b(a,b){X5b(BD(a,37),b)};var cS=mdb(Ane,'HierarchicalPortDummySizeProcessor',1513);bcb(1514,1,ene,l6b);_.pf=function m6b(a,b){e6b(this,BD(a,37),b)};_.a=0;var fS=mdb(Ane,'HierarchicalPortOrthogonalEdgeRouter',1514);bcb(1515,1,Dke,o6b);_.ue=function p6b(a,b){return n6b(BD(a,10),BD(b,10))};_.Fb=function q6b(a){return this===a};_.ve=function r6b(){return new tpb(this)};var dS=mdb(Ane,'HierarchicalPortOrthogonalEdgeRouter/1',1515);bcb(1516,1,Dke,t6b);_.ue=function u6b(a,b){return s6b(BD(a,10),BD(b,10))};_.Fb=function v6b(a){return this===a};_.ve=function w6b(){return new tpb(this)};var eS=mdb(Ane,'HierarchicalPortOrthogonalEdgeRouter/2',1516);bcb(1517,1,ene,z6b);_.pf=function A6b(a,b){y6b(BD(a,37),b)};var gS=mdb(Ane,'HierarchicalPortPositionProcessor',1517);bcb(1518,1,ene,J6b);_.pf=function K6b(a,b){I6b(this,BD(a,37))};_.a=0;_.c=0;var B6b,C6b;var kS=mdb(Ane,'HighDegreeNodeLayeringProcessor',1518);bcb(571,1,{571:1},L6b);_.b=-1;_.d=-1;var hS=mdb(Ane,'HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation',571);bcb(1519,1,{},M6b);_.Kb=function N6b(a){return D6b(),R_b(BD(a,10))};_.Fb=function O6b(a){return this===a};var iS=mdb(Ane,'HighDegreeNodeLayeringProcessor/lambda$0$Type',1519);bcb(1520,1,{},P6b);_.Kb=function Q6b(a){return D6b(),U_b(BD(a,10))};_.Fb=function R6b(a){return this===a};var jS=mdb(Ane,'HighDegreeNodeLayeringProcessor/lambda$1$Type',1520);bcb(1526,1,ene,X6b);_.pf=function Y6b(a,b){W6b(this,BD(a,37),b)};var pS=mdb(Ane,'HyperedgeDummyMerger',1526);bcb(793,1,{},Z6b);_.a=false;_.b=false;_.c=false;var lS=mdb(Ane,'HyperedgeDummyMerger/MergeState',793);bcb(1527,1,{},$6b);_.Kb=function _6b(a){return new YAb(null,new Kub(BD(a,29).a,16))};var mS=mdb(Ane,'HyperedgeDummyMerger/lambda$0$Type',1527);bcb(1528,1,{},a7b);_.Kb=function b7b(a){return new YAb(null,new Kub(BD(a,10).j,16))};var nS=mdb(Ane,'HyperedgeDummyMerger/lambda$1$Type',1528);bcb(1529,1,qie,c7b);_.td=function d7b(a){BD(a,11).p=-1};var oS=mdb(Ane,'HyperedgeDummyMerger/lambda$2$Type',1529);bcb(1530,1,ene,g7b);_.pf=function h7b(a,b){f7b(BD(a,37),b)};var qS=mdb(Ane,'HypernodesProcessor',1530);bcb(1531,1,ene,j7b);_.pf=function k7b(a,b){i7b(BD(a,37),b)};var rS=mdb(Ane,'InLayerConstraintProcessor',1531);bcb(1532,1,ene,m7b);_.pf=function n7b(a,b){l7b(BD(a,37),b)};var sS=mdb(Ane,'InnermostNodeMarginCalculator',1532);bcb(1533,1,ene,r7b);_.pf=function w7b(a,b){q7b(this,BD(a,37))};_.a=Qje;_.b=Qje;_.c=Pje;_.d=Pje;var zS=mdb(Ane,'InteractiveExternalPortPositioner',1533);bcb(1534,1,{},x7b);_.Kb=function y7b(a){return BD(a,17).d.i};_.Fb=function z7b(a){return this===a};var tS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$0$Type',1534);bcb(1535,1,{},A7b);_.Kb=function B7b(a){return s7b(this.a,ED(a))};_.Fb=function C7b(a){return this===a};var uS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$1$Type',1535);bcb(1536,1,{},D7b);_.Kb=function E7b(a){return BD(a,17).c.i};_.Fb=function F7b(a){return this===a};var vS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$2$Type',1536);bcb(1537,1,{},G7b);_.Kb=function H7b(a){return t7b(this.a,ED(a))};_.Fb=function I7b(a){return this===a};var wS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$3$Type',1537);bcb(1538,1,{},J7b);_.Kb=function K7b(a){return u7b(this.a,ED(a))};_.Fb=function L7b(a){return this===a};var xS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$4$Type',1538);bcb(1539,1,{},M7b);_.Kb=function N7b(a){return v7b(this.a,ED(a))};_.Fb=function O7b(a){return this===a};var yS=mdb(Ane,'InteractiveExternalPortPositioner/lambda$5$Type',1539);bcb(77,22,{3:1,35:1,22:1,77:1,234:1},T8b);_.Kf=function U8b(){switch(this.g){case 15:return new eoc;case 22:return new Aoc;case 47:return new Joc;case 28:case 35:return new uac;case 32:return new S2b;case 42:return new _2b;case 1:return new e3b;case 41:return new h3b;case 56:return new u5b((y5b(),x5b));case 0:return new u5b((y5b(),w5b));case 2:return new p3b;case 54:return new t3b;case 33:return new M3b;case 51:return new L4b;case 55:return new I5b;case 13:return new Q5b;case 38:return new Z5b;case 44:return new l6b;case 40:return new z6b;case 9:return new J6b;case 49:return new sgc;case 37:return new X6b;case 43:return new g7b;case 27:return new j7b;case 30:return new m7b;case 3:return new r7b;case 18:return new b9b;case 29:return new h9b;case 5:return new u9b;case 50:return new D9b;case 34:return new $9b;case 36:return new Iac;case 52:return new i4b;case 11:return new Sac;case 7:return new abc;case 39:return new obc;case 45:return new rbc;case 16:return new vbc;case 10:return new Fbc;case 48:return new Xbc;case 21:return new ccc;case 23:return new fGc((rGc(),pGc));case 8:return new lcc;case 12:return new tcc;case 4:return new ycc;case 19:return new Tcc;case 17:return new pdc;case 53:return new sdc;case 6:return new hec;case 25:return new wdc;case 46:return new Ndc;case 31:return new sec;case 14:return new Fec;case 26:return new ppc;case 20:return new Uec;case 24:return new fGc((rGc(),qGc));default:throw vbb(new Wdb(Dne+(this.f!=null?this.f:''+this.g)));}};var P7b,Q7b,R7b,S7b,T7b,U7b,V7b,W7b,X7b,Y7b,Z7b,$7b,_7b,a8b,b8b,c8b,d8b,e8b,f8b,g8b,h8b,i8b,j8b,k8b,l8b,m8b,n8b,o8b,p8b,q8b,r8b,s8b,t8b,u8b,v8b,w8b,x8b,y8b,z8b,A8b,B8b,C8b,D8b,E8b,F8b,G8b,H8b,I8b,J8b,K8b,L8b,M8b,N8b,O8b,P8b,Q8b,R8b;var AS=ndb(Ane,Ene,77,CI,W8b,V8b);var X8b;bcb(1540,1,ene,b9b);_.pf=function c9b(a,b){_8b(BD(a,37),b)};var BS=mdb(Ane,'InvertedPortProcessor',1540);bcb(1541,1,ene,h9b);_.pf=function i9b(a,b){g9b(BD(a,37),b)};var FS=mdb(Ane,'LabelAndNodeSizeProcessor',1541);bcb(1542,1,Oie,j9b);_.Mb=function k9b(a){return BD(a,10).k==(j0b(),h0b)};var CS=mdb(Ane,'LabelAndNodeSizeProcessor/lambda$0$Type',1542);bcb(1543,1,Oie,l9b);_.Mb=function m9b(a){return BD(a,10).k==(j0b(),e0b)};var DS=mdb(Ane,'LabelAndNodeSizeProcessor/lambda$1$Type',1543);bcb(1544,1,qie,n9b);_.td=function o9b(a){e9b(this.b,this.a,this.c,BD(a,10))};_.a=false;_.c=false;var ES=mdb(Ane,'LabelAndNodeSizeProcessor/lambda$2$Type',1544);bcb(1545,1,ene,u9b);_.pf=function v9b(a,b){s9b(BD(a,37),b)};var p9b;var HS=mdb(Ane,'LabelDummyInserter',1545);bcb(1546,1,Vke,w9b);_.Lb=function x9b(a){return PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),nad))};_.Fb=function y9b(a){return this===a};_.Mb=function z9b(a){return PD(vNb(BD(a,70),(Nyc(),Qwc)))===PD((qad(),nad))};var GS=mdb(Ane,'LabelDummyInserter/1',1546);bcb(1547,1,ene,D9b);_.pf=function E9b(a,b){C9b(BD(a,37),b)};var JS=mdb(Ane,'LabelDummyRemover',1547);bcb(1548,1,Oie,F9b);_.Mb=function G9b(a){return Ccb(DD(vNb(BD(a,70),(Nyc(),Pwc))))};var IS=mdb(Ane,'LabelDummyRemover/lambda$0$Type',1548);bcb(1359,1,ene,$9b);_.pf=function cac(a,b){W9b(this,BD(a,37),b)};_.a=null;var H9b;var QS=mdb(Ane,'LabelDummySwitcher',1359);bcb(286,1,{286:1},gac);_.c=0;_.d=null;_.f=0;var KS=mdb(Ane,'LabelDummySwitcher/LabelDummyInfo',286);bcb(1360,1,{},hac);_.Kb=function iac(a){return I9b(),new YAb(null,new Kub(BD(a,29).a,16))};var LS=mdb(Ane,'LabelDummySwitcher/lambda$0$Type',1360);bcb(1361,1,Oie,jac);_.Mb=function kac(a){return I9b(),BD(a,10).k==(j0b(),f0b)};var MS=mdb(Ane,'LabelDummySwitcher/lambda$1$Type',1361);bcb(1362,1,{},lac);_.Kb=function mac(a){return _9b(this.a,BD(a,10))};var NS=mdb(Ane,'LabelDummySwitcher/lambda$2$Type',1362);bcb(1363,1,qie,nac);_.td=function oac(a){aac(this.a,BD(a,286))};var OS=mdb(Ane,'LabelDummySwitcher/lambda$3$Type',1363);bcb(1364,1,Dke,pac);_.ue=function qac(a,b){return bac(BD(a,286),BD(b,286))};_.Fb=function rac(a){return this===a};_.ve=function sac(){return new tpb(this)};var PS=mdb(Ane,'LabelDummySwitcher/lambda$4$Type',1364);bcb(791,1,ene,uac);_.pf=function vac(a,b){tac(BD(a,37),b)};var RS=mdb(Ane,'LabelManagementProcessor',791);bcb(1549,1,ene,Iac);_.pf=function Jac(a,b){Cac(BD(a,37),b)};var TS=mdb(Ane,'LabelSideSelector',1549);bcb(1550,1,Oie,Kac);_.Mb=function Lac(a){return Ccb(DD(vNb(BD(a,70),(Nyc(),Pwc))))};var SS=mdb(Ane,'LabelSideSelector/lambda$0$Type',1550);bcb(1558,1,ene,Sac);_.pf=function Tac(a,b){Oac(BD(a,37),b)};var US=mdb(Ane,'LayerConstraintPostprocessor',1558);bcb(1559,1,ene,abc);_.pf=function bbc(a,b){$ac(BD(a,37),b)};var Uac;var WS=mdb(Ane,'LayerConstraintPreprocessor',1559);bcb(360,22,{3:1,35:1,22:1,360:1},ibc);var cbc,dbc,ebc,fbc;var VS=ndb(Ane,'LayerConstraintPreprocessor/HiddenNodeConnections',360,CI,kbc,jbc);var lbc;bcb(1560,1,ene,obc);_.pf=function pbc(a,b){nbc(BD(a,37),b)};var XS=mdb(Ane,'LayerSizeAndGraphHeightCalculator',1560);bcb(1561,1,ene,rbc);_.pf=function tbc(a,b){qbc(BD(a,37),b)};var YS=mdb(Ane,'LongEdgeJoiner',1561);bcb(1562,1,ene,vbc);_.pf=function xbc(a,b){ubc(BD(a,37),b)};var ZS=mdb(Ane,'LongEdgeSplitter',1562);bcb(1563,1,ene,Fbc);_.pf=function Ibc(a,b){Bbc(this,BD(a,37),b)};_.d=0;_.e=0;_.i=0;_.j=0;_.k=0;_.n=0;var bT=mdb(Ane,'NodePromotion',1563);bcb(1564,1,{},Jbc);_.Kb=function Kbc(a){return BD(a,46),Bcb(),true};_.Fb=function Lbc(a){return this===a};var $S=mdb(Ane,'NodePromotion/lambda$0$Type',1564);bcb(1565,1,{},Mbc);_.Kb=function Nbc(a){return Gbc(this.a,BD(a,46))};_.Fb=function Obc(a){return this===a};_.a=0;var _S=mdb(Ane,'NodePromotion/lambda$1$Type',1565);bcb(1566,1,{},Pbc);_.Kb=function Qbc(a){return Hbc(this.a,BD(a,46))};_.Fb=function Rbc(a){return this===a};_.a=0;var aT=mdb(Ane,'NodePromotion/lambda$2$Type',1566);bcb(1567,1,ene,Xbc);_.pf=function Ybc(a,b){Sbc(BD(a,37),b)};var cT=mdb(Ane,'NorthSouthPortPostprocessor',1567);bcb(1568,1,ene,ccc);_.pf=function ecc(a,b){acc(BD(a,37),b)};var eT=mdb(Ane,'NorthSouthPortPreprocessor',1568);bcb(1569,1,Dke,fcc);_.ue=function gcc(a,b){return dcc(BD(a,11),BD(b,11))};_.Fb=function hcc(a){return this===a};_.ve=function icc(){return new tpb(this)};var dT=mdb(Ane,'NorthSouthPortPreprocessor/lambda$0$Type',1569);bcb(1570,1,ene,lcc);_.pf=function ncc(a,b){kcc(BD(a,37),b)};var hT=mdb(Ane,'PartitionMidprocessor',1570);bcb(1571,1,Oie,occ);_.Mb=function pcc(a){return wNb(BD(a,10),(Nyc(),Nxc))};var fT=mdb(Ane,'PartitionMidprocessor/lambda$0$Type',1571);bcb(1572,1,qie,qcc);_.td=function rcc(a){mcc(this.a,BD(a,10))};var gT=mdb(Ane,'PartitionMidprocessor/lambda$1$Type',1572);bcb(1573,1,ene,tcc);_.pf=function ucc(a,b){scc(BD(a,37),b)};var iT=mdb(Ane,'PartitionPostprocessor',1573);bcb(1574,1,ene,ycc);_.pf=function zcc(a,b){wcc(BD(a,37),b)};var nT=mdb(Ane,'PartitionPreprocessor',1574);bcb(1575,1,Oie,Acc);_.Mb=function Bcc(a){return wNb(BD(a,10),(Nyc(),Nxc))};var jT=mdb(Ane,'PartitionPreprocessor/lambda$0$Type',1575);bcb(1576,1,{},Ccc);_.Kb=function Dcc(a){return new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var kT=mdb(Ane,'PartitionPreprocessor/lambda$1$Type',1576);bcb(1577,1,Oie,Ecc);_.Mb=function Fcc(a){return vcc(BD(a,17))};var lT=mdb(Ane,'PartitionPreprocessor/lambda$2$Type',1577);bcb(1578,1,qie,Gcc);_.td=function Hcc(a){xcc(BD(a,17))};var mT=mdb(Ane,'PartitionPreprocessor/lambda$3$Type',1578);bcb(1579,1,ene,Tcc);_.pf=function Xcc(a,b){Qcc(BD(a,37),b)};var Icc,Jcc,Kcc,Lcc,Mcc,Ncc;var tT=mdb(Ane,'PortListSorter',1579);bcb(1580,1,{},Zcc);_.Kb=function $cc(a){return Occ(),BD(a,11).e};var oT=mdb(Ane,'PortListSorter/lambda$0$Type',1580);bcb(1581,1,{},_cc);_.Kb=function adc(a){return Occ(),BD(a,11).g};var pT=mdb(Ane,'PortListSorter/lambda$1$Type',1581);bcb(1582,1,Dke,bdc);_.ue=function cdc(a,b){return Ucc(BD(a,11),BD(b,11))};_.Fb=function ddc(a){return this===a};_.ve=function edc(){return new tpb(this)};var qT=mdb(Ane,'PortListSorter/lambda$2$Type',1582);bcb(1583,1,Dke,fdc);_.ue=function gdc(a,b){return Vcc(BD(a,11),BD(b,11))};_.Fb=function hdc(a){return this===a};_.ve=function idc(){return new tpb(this)};var rT=mdb(Ane,'PortListSorter/lambda$3$Type',1583);bcb(1584,1,Dke,jdc);_.ue=function kdc(a,b){return Wcc(BD(a,11),BD(b,11))};_.Fb=function ldc(a){return this===a};_.ve=function mdc(){return new tpb(this)};var sT=mdb(Ane,'PortListSorter/lambda$4$Type',1584);bcb(1585,1,ene,pdc);_.pf=function qdc(a,b){ndc(BD(a,37),b)};var uT=mdb(Ane,'PortSideProcessor',1585);bcb(1586,1,ene,sdc);_.pf=function tdc(a,b){rdc(BD(a,37),b)};var vT=mdb(Ane,'ReversedEdgeRestorer',1586);bcb(1591,1,ene,wdc);_.pf=function xdc(a,b){udc(this,BD(a,37),b)};var CT=mdb(Ane,'SelfLoopPortRestorer',1591);bcb(1592,1,{},ydc);_.Kb=function zdc(a){return new YAb(null,new Kub(BD(a,29).a,16))};var wT=mdb(Ane,'SelfLoopPortRestorer/lambda$0$Type',1592);bcb(1593,1,Oie,Adc);_.Mb=function Bdc(a){return BD(a,10).k==(j0b(),h0b)};var xT=mdb(Ane,'SelfLoopPortRestorer/lambda$1$Type',1593);bcb(1594,1,Oie,Cdc);_.Mb=function Ddc(a){return wNb(BD(a,10),(wtc(),ntc))};var yT=mdb(Ane,'SelfLoopPortRestorer/lambda$2$Type',1594);bcb(1595,1,{},Edc);_.Kb=function Fdc(a){return BD(vNb(BD(a,10),(wtc(),ntc)),403)};var zT=mdb(Ane,'SelfLoopPortRestorer/lambda$3$Type',1595);bcb(1596,1,qie,Gdc);_.td=function Hdc(a){vdc(this.a,BD(a,403))};var AT=mdb(Ane,'SelfLoopPortRestorer/lambda$4$Type',1596);bcb(794,1,qie,Idc);_.td=function Jdc(a){ljc(BD(a,101))};var BT=mdb(Ane,'SelfLoopPortRestorer/lambda$5$Type',794);bcb(1597,1,ene,Ndc);_.pf=function Pdc(a,b){Kdc(BD(a,37),b)};var LT=mdb(Ane,'SelfLoopPostProcessor',1597);bcb(1598,1,{},Qdc);_.Kb=function Rdc(a){return new YAb(null,new Kub(BD(a,29).a,16))};var DT=mdb(Ane,'SelfLoopPostProcessor/lambda$0$Type',1598);bcb(1599,1,Oie,Sdc);_.Mb=function Tdc(a){return BD(a,10).k==(j0b(),h0b)};var ET=mdb(Ane,'SelfLoopPostProcessor/lambda$1$Type',1599);bcb(1600,1,Oie,Udc);_.Mb=function Vdc(a){return wNb(BD(a,10),(wtc(),ntc))};var FT=mdb(Ane,'SelfLoopPostProcessor/lambda$2$Type',1600);bcb(1601,1,qie,Wdc);_.td=function Xdc(a){Ldc(BD(a,10))};var GT=mdb(Ane,'SelfLoopPostProcessor/lambda$3$Type',1601);bcb(1602,1,{},Ydc);_.Kb=function Zdc(a){return new YAb(null,new Kub(BD(a,101).f,1))};var HT=mdb(Ane,'SelfLoopPostProcessor/lambda$4$Type',1602);bcb(1603,1,qie,$dc);_.td=function _dc(a){Mdc(this.a,BD(a,409))};var IT=mdb(Ane,'SelfLoopPostProcessor/lambda$5$Type',1603);bcb(1604,1,Oie,aec);_.Mb=function bec(a){return !!BD(a,101).i};var JT=mdb(Ane,'SelfLoopPostProcessor/lambda$6$Type',1604);bcb(1605,1,qie,cec);_.td=function dec(a){Odc(this.a,BD(a,101))};var KT=mdb(Ane,'SelfLoopPostProcessor/lambda$7$Type',1605);bcb(1587,1,ene,hec);_.pf=function iec(a,b){gec(BD(a,37),b)};var PT=mdb(Ane,'SelfLoopPreProcessor',1587);bcb(1588,1,{},jec);_.Kb=function kec(a){return new YAb(null,new Kub(BD(a,101).f,1))};var MT=mdb(Ane,'SelfLoopPreProcessor/lambda$0$Type',1588);bcb(1589,1,{},lec);_.Kb=function mec(a){return BD(a,409).a};var NT=mdb(Ane,'SelfLoopPreProcessor/lambda$1$Type',1589);bcb(1590,1,qie,nec);_.td=function oec(a){fec(BD(a,17))};var OT=mdb(Ane,'SelfLoopPreProcessor/lambda$2$Type',1590);bcb(1606,1,ene,sec);_.pf=function tec(a,b){qec(this,BD(a,37),b)};var VT=mdb(Ane,'SelfLoopRouter',1606);bcb(1607,1,{},uec);_.Kb=function vec(a){return new YAb(null,new Kub(BD(a,29).a,16))};var QT=mdb(Ane,'SelfLoopRouter/lambda$0$Type',1607);bcb(1608,1,Oie,wec);_.Mb=function xec(a){return BD(a,10).k==(j0b(),h0b)};var RT=mdb(Ane,'SelfLoopRouter/lambda$1$Type',1608);bcb(1609,1,Oie,yec);_.Mb=function zec(a){return wNb(BD(a,10),(wtc(),ntc))};var ST=mdb(Ane,'SelfLoopRouter/lambda$2$Type',1609);bcb(1610,1,{},Aec);_.Kb=function Bec(a){return BD(vNb(BD(a,10),(wtc(),ntc)),403)};var TT=mdb(Ane,'SelfLoopRouter/lambda$3$Type',1610);bcb(1611,1,qie,Cec);_.td=function Dec(a){pec(this.a,this.b,BD(a,403))};var UT=mdb(Ane,'SelfLoopRouter/lambda$4$Type',1611);bcb(1612,1,ene,Fec);_.pf=function Iec(a,b){Eec(BD(a,37),b)};var $T=mdb(Ane,'SemiInteractiveCrossMinProcessor',1612);bcb(1613,1,Oie,Jec);_.Mb=function Kec(a){return BD(a,10).k==(j0b(),h0b)};var WT=mdb(Ane,'SemiInteractiveCrossMinProcessor/lambda$0$Type',1613);bcb(1614,1,Oie,Lec);_.Mb=function Mec(a){return uNb(BD(a,10))._b((Nyc(),ayc))};var XT=mdb(Ane,'SemiInteractiveCrossMinProcessor/lambda$1$Type',1614);bcb(1615,1,Dke,Nec);_.ue=function Oec(a,b){return Gec(BD(a,10),BD(b,10))};_.Fb=function Pec(a){return this===a};_.ve=function Qec(){return new tpb(this)};var YT=mdb(Ane,'SemiInteractiveCrossMinProcessor/lambda$2$Type',1615);bcb(1616,1,{},Rec);_.Ce=function Sec(a,b){return Hec(BD(a,10),BD(b,10))};var ZT=mdb(Ane,'SemiInteractiveCrossMinProcessor/lambda$3$Type',1616);bcb(1618,1,ene,Uec);_.pf=function Yec(a,b){Tec(BD(a,37),b)};var bU=mdb(Ane,'SortByInputModelProcessor',1618);bcb(1619,1,Oie,Zec);_.Mb=function $ec(a){return BD(a,11).g.c.length!=0};var _T=mdb(Ane,'SortByInputModelProcessor/lambda$0$Type',1619);bcb(1620,1,qie,_ec);_.td=function afc(a){Wec(this.a,BD(a,11))};var aU=mdb(Ane,'SortByInputModelProcessor/lambda$1$Type',1620);bcb(1693,803,{},jfc);_.Me=function kfc(a){var b,c,d,e;this.c=a;switch(this.a.g){case 2:b=new Rkb;MAb(JAb(new YAb(null,new Kub(this.c.a.b,16)),new lgc),new ngc(this,b));nEb(this,new tfc);Hkb(b,new xfc);b.c=KC(SI,Uhe,1,0,5,1);MAb(JAb(new YAb(null,new Kub(this.c.a.b,16)),new zfc),new Bfc(b));nEb(this,new Ffc);Hkb(b,new Jfc);b.c=KC(SI,Uhe,1,0,5,1);c=Ntb($zb(OAb(new YAb(null,new Kub(this.c.a.b,16)),new Lfc(this))),new Nfc);MAb(new YAb(null,new Kub(this.c.a.a,16)),new Rfc(c,b));nEb(this,new Vfc);Hkb(b,new Zfc);b.c=KC(SI,Uhe,1,0,5,1);break;case 3:d=new Rkb;nEb(this,new lfc);e=Ntb($zb(OAb(new YAb(null,new Kub(this.c.a.b,16)),new pfc(this))),new Pfc);MAb(JAb(new YAb(null,new Kub(this.c.a.b,16)),new _fc),new bgc(e,d));nEb(this,new fgc);Hkb(d,new jgc);d.c=KC(SI,Uhe,1,0,5,1);break;default:throw vbb(new x2c);}};_.b=0;var AU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation',1693);bcb(1694,1,Vke,lfc);_.Lb=function mfc(a){return JD(BD(a,57).g,145)};_.Fb=function nfc(a){return this===a};_.Mb=function ofc(a){return JD(BD(a,57).g,145)};var cU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$0$Type',1694);bcb(1695,1,{},pfc);_.Fe=function qfc(a){return dfc(this.a,BD(a,57))};var dU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$1$Type',1695);bcb(1703,1,Pie,rfc);_.Vd=function sfc(){cfc(this.a,this.b,-1)};_.b=0;var eU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$10$Type',1703);bcb(1705,1,Vke,tfc);_.Lb=function ufc(a){return JD(BD(a,57).g,145)};_.Fb=function vfc(a){return this===a};_.Mb=function wfc(a){return JD(BD(a,57).g,145)};var fU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$11$Type',1705);bcb(1706,1,qie,xfc);_.td=function yfc(a){BD(a,365).Vd()};var gU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$12$Type',1706);bcb(1707,1,Oie,zfc);_.Mb=function Afc(a){return JD(BD(a,57).g,10)};var hU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$13$Type',1707);bcb(1709,1,qie,Bfc);_.td=function Cfc(a){efc(this.a,BD(a,57))};var iU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$14$Type',1709);bcb(1708,1,Pie,Dfc);_.Vd=function Efc(){cfc(this.b,this.a,-1)};_.a=0;var jU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$15$Type',1708);bcb(1710,1,Vke,Ffc);_.Lb=function Gfc(a){return JD(BD(a,57).g,10)};_.Fb=function Hfc(a){return this===a};_.Mb=function Ifc(a){return JD(BD(a,57).g,10)};var kU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$16$Type',1710);bcb(1711,1,qie,Jfc);_.td=function Kfc(a){BD(a,365).Vd()};var lU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$17$Type',1711);bcb(1712,1,{},Lfc);_.Fe=function Mfc(a){return ffc(this.a,BD(a,57))};var mU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$18$Type',1712);bcb(1713,1,{},Nfc);_.De=function Ofc(){return 0};var nU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$19$Type',1713);bcb(1696,1,{},Pfc);_.De=function Qfc(){return 0};var oU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$2$Type',1696);bcb(1715,1,qie,Rfc);_.td=function Sfc(a){gfc(this.a,this.b,BD(a,307))};_.a=0;var pU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$20$Type',1715);bcb(1714,1,Pie,Tfc);_.Vd=function Ufc(){bfc(this.a,this.b,-1)};_.b=0;var qU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$21$Type',1714);bcb(1716,1,Vke,Vfc);_.Lb=function Wfc(a){return BD(a,57),true};_.Fb=function Xfc(a){return this===a};_.Mb=function Yfc(a){return BD(a,57),true};var rU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$22$Type',1716);bcb(1717,1,qie,Zfc);_.td=function $fc(a){BD(a,365).Vd()};var sU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$23$Type',1717);bcb(1697,1,Oie,_fc);_.Mb=function agc(a){return JD(BD(a,57).g,10)};var tU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$3$Type',1697);bcb(1699,1,qie,bgc);_.td=function cgc(a){hfc(this.a,this.b,BD(a,57))};_.a=0;var uU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$4$Type',1699);bcb(1698,1,Pie,dgc);_.Vd=function egc(){cfc(this.b,this.a,-1)};_.a=0;var vU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$5$Type',1698);bcb(1700,1,Vke,fgc);_.Lb=function ggc(a){return BD(a,57),true};_.Fb=function hgc(a){return this===a};_.Mb=function igc(a){return BD(a,57),true};var wU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$6$Type',1700);bcb(1701,1,qie,jgc);_.td=function kgc(a){BD(a,365).Vd()};var xU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$7$Type',1701);bcb(1702,1,Oie,lgc);_.Mb=function mgc(a){return JD(BD(a,57).g,145)};var yU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$8$Type',1702);bcb(1704,1,qie,ngc);_.td=function ogc(a){ifc(this.a,this.b,BD(a,57))};var zU=mdb(Jne,'EdgeAwareScanlineConstraintCalculation/lambda$9$Type',1704);bcb(1521,1,ene,sgc);_.pf=function xgc(a,b){rgc(this,BD(a,37),b)};var pgc;var EU=mdb(Jne,'HorizontalGraphCompactor',1521);bcb(1522,1,{},ygc);_.Oe=function zgc(a,b){var c,d,e;if(vgc(a,b)){return 0}c=tgc(a);d=tgc(b);if(!!c&&c.k==(j0b(),e0b)||!!d&&d.k==(j0b(),e0b)){return 0}e=BD(vNb(this.a.a,(wtc(),otc)),304);return fBc(e,c?c.k:(j0b(),g0b),d?d.k:(j0b(),g0b))};_.Pe=function Agc(a,b){var c,d,e;if(vgc(a,b)){return 1}c=tgc(a);d=tgc(b);e=BD(vNb(this.a.a,(wtc(),otc)),304);return iBc(e,c?c.k:(j0b(),g0b),d?d.k:(j0b(),g0b))};var BU=mdb(Jne,'HorizontalGraphCompactor/1',1522);bcb(1523,1,{},Bgc);_.Ne=function Cgc(a,b){return qgc(),a.a.i==0};var CU=mdb(Jne,'HorizontalGraphCompactor/lambda$0$Type',1523);bcb(1524,1,{},Dgc);_.Ne=function Egc(a,b){return wgc(this.a,a,b)};var DU=mdb(Jne,'HorizontalGraphCompactor/lambda$1$Type',1524);bcb(1664,1,{},Ygc);var Fgc,Ggc;var cV=mdb(Jne,'LGraphToCGraphTransformer',1664);bcb(1672,1,Oie,ehc);_.Mb=function fhc(a){return a!=null};var FU=mdb(Jne,'LGraphToCGraphTransformer/0methodref$nonNull$Type',1672);bcb(1665,1,{},ghc);_.Kb=function hhc(a){return Hgc(),fcb(vNb(BD(BD(a,57).g,10),(wtc(),$sc)))};var GU=mdb(Jne,'LGraphToCGraphTransformer/lambda$0$Type',1665);bcb(1666,1,{},ihc);_.Kb=function jhc(a){return Hgc(),gic(BD(BD(a,57).g,145))};var HU=mdb(Jne,'LGraphToCGraphTransformer/lambda$1$Type',1666);bcb(1675,1,Oie,khc);_.Mb=function lhc(a){return Hgc(),JD(BD(a,57).g,10)};var IU=mdb(Jne,'LGraphToCGraphTransformer/lambda$10$Type',1675);bcb(1676,1,qie,mhc);_.td=function nhc(a){Zgc(BD(a,57))};var JU=mdb(Jne,'LGraphToCGraphTransformer/lambda$11$Type',1676);bcb(1677,1,Oie,ohc);_.Mb=function phc(a){return Hgc(),JD(BD(a,57).g,145)};var KU=mdb(Jne,'LGraphToCGraphTransformer/lambda$12$Type',1677);bcb(1681,1,qie,qhc);_.td=function rhc(a){$gc(BD(a,57))};var LU=mdb(Jne,'LGraphToCGraphTransformer/lambda$13$Type',1681);bcb(1678,1,qie,shc);_.td=function thc(a){_gc(this.a,BD(a,8))};_.a=0;var MU=mdb(Jne,'LGraphToCGraphTransformer/lambda$14$Type',1678);bcb(1679,1,qie,uhc);_.td=function vhc(a){ahc(this.a,BD(a,110))};_.a=0;var NU=mdb(Jne,'LGraphToCGraphTransformer/lambda$15$Type',1679);bcb(1680,1,qie,whc);_.td=function xhc(a){bhc(this.a,BD(a,8))};_.a=0;var OU=mdb(Jne,'LGraphToCGraphTransformer/lambda$16$Type',1680);bcb(1682,1,{},yhc);_.Kb=function zhc(a){return Hgc(),new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var PU=mdb(Jne,'LGraphToCGraphTransformer/lambda$17$Type',1682);bcb(1683,1,Oie,Ahc);_.Mb=function Bhc(a){return Hgc(),OZb(BD(a,17))};var QU=mdb(Jne,'LGraphToCGraphTransformer/lambda$18$Type',1683);bcb(1684,1,qie,Chc);_.td=function Dhc(a){Qgc(this.a,BD(a,17))};var RU=mdb(Jne,'LGraphToCGraphTransformer/lambda$19$Type',1684);bcb(1668,1,qie,Ehc);_.td=function Fhc(a){Rgc(this.a,BD(a,145))};var SU=mdb(Jne,'LGraphToCGraphTransformer/lambda$2$Type',1668);bcb(1685,1,{},Ghc);_.Kb=function Hhc(a){return Hgc(),new YAb(null,new Kub(BD(a,29).a,16))};var TU=mdb(Jne,'LGraphToCGraphTransformer/lambda$20$Type',1685);bcb(1686,1,{},Ihc);_.Kb=function Jhc(a){return Hgc(),new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var UU=mdb(Jne,'LGraphToCGraphTransformer/lambda$21$Type',1686);bcb(1687,1,{},Khc);_.Kb=function Lhc(a){return Hgc(),BD(vNb(BD(a,17),(wtc(),rtc)),15)};var VU=mdb(Jne,'LGraphToCGraphTransformer/lambda$22$Type',1687);bcb(1688,1,Oie,Mhc);_.Mb=function Nhc(a){return chc(BD(a,15))};var WU=mdb(Jne,'LGraphToCGraphTransformer/lambda$23$Type',1688);bcb(1689,1,qie,Ohc);_.td=function Phc(a){Jgc(this.a,BD(a,15))};var XU=mdb(Jne,'LGraphToCGraphTransformer/lambda$24$Type',1689);bcb(1667,1,qie,Qhc);_.td=function Rhc(a){Sgc(this.a,this.b,BD(a,145))};var YU=mdb(Jne,'LGraphToCGraphTransformer/lambda$3$Type',1667);bcb(1669,1,{},Shc);_.Kb=function Thc(a){return Hgc(),new YAb(null,new Kub(BD(a,29).a,16))};var ZU=mdb(Jne,'LGraphToCGraphTransformer/lambda$4$Type',1669);bcb(1670,1,{},Uhc);_.Kb=function Vhc(a){return Hgc(),new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var $U=mdb(Jne,'LGraphToCGraphTransformer/lambda$5$Type',1670);bcb(1671,1,{},Whc);_.Kb=function Xhc(a){return Hgc(),BD(vNb(BD(a,17),(wtc(),rtc)),15)};var _U=mdb(Jne,'LGraphToCGraphTransformer/lambda$6$Type',1671);bcb(1673,1,qie,Yhc);_.td=function Zhc(a){dhc(this.a,BD(a,15))};var aV=mdb(Jne,'LGraphToCGraphTransformer/lambda$8$Type',1673);bcb(1674,1,qie,$hc);_.td=function _hc(a){Tgc(this.a,this.b,BD(a,145))};var bV=mdb(Jne,'LGraphToCGraphTransformer/lambda$9$Type',1674);bcb(1663,1,{},dic);_.Le=function eic(a){var b,c,d,e,f;this.a=a;this.d=new KFb;this.c=KC(jN,Uhe,121,this.a.a.a.c.length,0,1);this.b=0;for(c=new olb(this.a.a.a);c.a=p){Ekb(f,meb(k));s=$wnd.Math.max(s,t[k-1]-l);h+=o;q+=t[k-1]-q;l=t[k-1];o=i[k]}o=$wnd.Math.max(o,i[k]);++k}h+=o}n=$wnd.Math.min(1/s,1/b.b/h);if(n>d){d=n;c=f}}return c};_.Wf=function mpc(){return false};var CW=mdb(Rne,'MSDCutIndexHeuristic',802);bcb(1617,1,ene,ppc);_.pf=function qpc(a,b){opc(BD(a,37),b)};var DW=mdb(Rne,'SingleEdgeGraphWrapper',1617);bcb(227,22,{3:1,35:1,22:1,227:1},Bpc);var upc,vpc,wpc,xpc,ypc,zpc;var EW=ndb(Sne,'CenterEdgeLabelPlacementStrategy',227,CI,Dpc,Cpc);var Epc;bcb(422,22,{3:1,35:1,22:1,422:1},Jpc);var Gpc,Hpc;var FW=ndb(Sne,'ConstraintCalculationStrategy',422,CI,Lpc,Kpc);var Mpc;bcb(314,22,{3:1,35:1,22:1,314:1,246:1,234:1},Tpc);_.Kf=function Vpc(){return Spc(this)};_.Xf=function Upc(){return Spc(this)};var Opc,Ppc,Qpc;var GW=ndb(Sne,'CrossingMinimizationStrategy',314,CI,Xpc,Wpc);var Ypc;bcb(337,22,{3:1,35:1,22:1,337:1},cqc);var $pc,_pc,aqc;var HW=ndb(Sne,'CuttingStrategy',337,CI,eqc,dqc);var fqc;bcb(335,22,{3:1,35:1,22:1,335:1,246:1,234:1},oqc);_.Kf=function qqc(){return nqc(this)};_.Xf=function pqc(){return nqc(this)};var hqc,iqc,jqc,kqc,lqc;var IW=ndb(Sne,'CycleBreakingStrategy',335,CI,sqc,rqc);var tqc;bcb(419,22,{3:1,35:1,22:1,419:1},yqc);var vqc,wqc;var JW=ndb(Sne,'DirectionCongruency',419,CI,Aqc,zqc);var Bqc;bcb(450,22,{3:1,35:1,22:1,450:1},Hqc);var Dqc,Eqc,Fqc;var KW=ndb(Sne,'EdgeConstraint',450,CI,Jqc,Iqc);var Kqc;bcb(276,22,{3:1,35:1,22:1,276:1},Uqc);var Mqc,Nqc,Oqc,Pqc,Qqc,Rqc;var LW=ndb(Sne,'EdgeLabelSideSelection',276,CI,Wqc,Vqc);var Xqc;bcb(479,22,{3:1,35:1,22:1,479:1},arc);var Zqc,$qc;var MW=ndb(Sne,'EdgeStraighteningStrategy',479,CI,crc,brc);var drc;bcb(274,22,{3:1,35:1,22:1,274:1},mrc);var frc,grc,hrc,irc,jrc,krc;var NW=ndb(Sne,'FixedAlignment',274,CI,orc,nrc);var prc;bcb(275,22,{3:1,35:1,22:1,275:1},zrc);var rrc,trc,urc,vrc,wrc,xrc;var OW=ndb(Sne,'GraphCompactionStrategy',275,CI,Brc,Arc);var Crc;bcb(256,22,{3:1,35:1,22:1,256:1},Prc);var Erc,Frc,Grc,Hrc,Irc,Jrc,Krc,Lrc,Mrc,Nrc;var PW=ndb(Sne,'GraphProperties',256,CI,Rrc,Qrc);var Src;bcb(292,22,{3:1,35:1,22:1,292:1},Yrc);var Urc,Vrc,Wrc;var QW=ndb(Sne,'GreedySwitchType',292,CI,$rc,Zrc);var _rc;bcb(303,22,{3:1,35:1,22:1,303:1},fsc);var bsc,csc,dsc;var RW=ndb(Sne,'InLayerConstraint',303,CI,hsc,gsc);var isc;bcb(420,22,{3:1,35:1,22:1,420:1},nsc);var ksc,lsc;var SW=ndb(Sne,'InteractiveReferencePoint',420,CI,psc,osc);var qsc;var ssc,tsc,usc,vsc,wsc,xsc,ysc,zsc,Asc,Bsc,Csc,Dsc,Esc,Fsc,Gsc,Hsc,Isc,Jsc,Ksc,Lsc,Msc,Nsc,Osc,Psc,Qsc,Rsc,Ssc,Tsc,Usc,Vsc,Wsc,Xsc,Ysc,Zsc,$sc,_sc,atc,btc,ctc,dtc,etc,ftc,gtc,htc,itc,jtc,ktc,ltc,mtc,ntc,otc,ptc,qtc,rtc,stc,ttc,utc,vtc;bcb(163,22,{3:1,35:1,22:1,163:1},Dtc);var xtc,ytc,ztc,Atc,Btc;var TW=ndb(Sne,'LayerConstraint',163,CI,Ftc,Etc);var Gtc;bcb(848,1,ale,kwc);_.Qe=function lwc(a){t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Yne),''),'Direction Congruency'),'Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other.'),puc),(_5c(),V5c)),JW),pqb((N5c(),L5c)))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Zne),''),'Feedback Edges'),'Whether feedback edges should be highlighted by routing around the nodes.'),(Bcb(),false)),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,$ne),''),'Interactive Reference Point'),'Determines which point of a node is considered by interactive layout phases.'),Muc),V5c),SW),pqb(L5c))));o4c(a,$ne,goe,Ouc);o4c(a,$ne,qoe,Nuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,_ne),''),'Merge Edges'),'Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,aoe),''),'Merge Hierarchy-Crossing Edges'),'If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port.'),true),T5c),wI),pqb(L5c))));t4c(a,new p5c(C5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,boe),''),'Allow Non-Flow Ports To Switch Sides'),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),false),T5c),wI),pqb(M5c)),OC(GC(ZI,1),nie,2,6,['org.eclipse.elk.layered.northOrSouthPort']))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,coe),''),'Port Sorting Strategy'),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),xvc),V5c),cX),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,doe),''),'Thoroughness'),'How much effort should be spent to produce a nice layout.'),meb(7)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,eoe),''),'Add Unnecessary Bendpoints'),'Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,foe),''),'Generate Position and Layer IDs'),'If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,goe),'cycleBreaking'),'Cycle Breaking Strategy'),'Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right).'),nuc),V5c),IW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,hoe),ppe),'Node Layering Strategy'),'Strategy for node layering.'),bvc),V5c),YW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ioe),ppe),'Layer Constraint'),'Determines a constraint on the placement of the node regarding the layering.'),Tuc),V5c),TW),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,joe),ppe),'Layer Choice Constraint'),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),meb(-1)),X5c),JI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,koe),ppe),'Layer ID'),'Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set.'),meb(-1)),X5c),JI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,loe),qpe),'Upper Bound On Width [MinWidth Layerer]'),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),meb(4)),X5c),JI),pqb(L5c))));o4c(a,loe,hoe,Wuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,moe),qpe),'Upper Layer Estimation Scaling Factor [MinWidth Layerer]'),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),meb(2)),X5c),JI),pqb(L5c))));o4c(a,moe,hoe,Yuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,noe),rpe),'Node Promotion Strategy'),'Reduces number of dummy nodes after layering phase (if possible).'),_uc),V5c),aX),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ooe),rpe),'Max Node Promotion Iterations'),'Limits the number of iterations for node promotion.'),meb(0)),X5c),JI),pqb(L5c))));o4c(a,ooe,noe,null);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,poe),'layering.coffmanGraham'),'Layer Bound'),'The maximum number of nodes allowed per layer.'),meb(Ohe)),X5c),JI),pqb(L5c))));o4c(a,poe,hoe,Quc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,qoe),spe),'Crossing Minimization Strategy'),'Strategy for crossing minimization.'),luc),V5c),GW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,roe),spe),'Force Node Model Order'),'The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,soe),spe),'Hierarchical Sweepiness'),'How likely it is to use cross-hierarchy (1) vs bottom-up (-1).'),0.1),U5c),BI),pqb(L5c))));o4c(a,soe,tpe,fuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,toe),spe),'Semi-Interactive Crossing Minimization'),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),false),T5c),wI),pqb(L5c))));o4c(a,toe,qoe,juc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,uoe),spe),'Position Choice Constraint'),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),meb(-1)),X5c),JI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,voe),spe),'Position ID'),'Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set.'),meb(-1)),X5c),JI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,woe),upe),'Greedy Switch Activation Threshold'),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),meb(40)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,xoe),upe),'Greedy Switch Crossing Minimization'),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),cuc),V5c),QW),pqb(L5c))));o4c(a,xoe,qoe,duc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,yoe),'crossingMinimization.greedySwitchHierarchical'),'Greedy Switch Crossing Minimization (hierarchical)'),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),$tc),V5c),QW),pqb(L5c))));o4c(a,yoe,qoe,_tc);o4c(a,yoe,tpe,auc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,zoe),vpe),'Node Placement Strategy'),'Strategy for node placement.'),vvc),V5c),_W),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Aoe),vpe),'Favor Straight Edges Over Balancing'),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),T5c),wI),pqb(L5c))));o4c(a,Aoe,zoe,lvc);o4c(a,Aoe,zoe,mvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Boe),wpe),'BK Edge Straightening'),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),fvc),V5c),MW),pqb(L5c))));o4c(a,Boe,zoe,gvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Coe),wpe),'BK Fixed Alignment'),'Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four.'),ivc),V5c),NW),pqb(L5c))));o4c(a,Coe,zoe,jvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Doe),'nodePlacement.linearSegments'),'Linear Segments Deflection Dampening'),'Dampens the movement of nodes to keep the diagram from getting too large.'),0.3),U5c),BI),pqb(L5c))));o4c(a,Doe,zoe,ovc);t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Eoe),'nodePlacement.networkSimplex'),'Node Flexibility'),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),V5c),$W),pqb(K5c))));o4c(a,Eoe,zoe,tvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Foe),'nodePlacement.networkSimplex.nodeFlexibility'),'Node Flexibility Default'),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),rvc),V5c),$W),pqb(L5c))));o4c(a,Foe,zoe,svc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Goe),xpe),'Self-Loop Distribution'),'Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE.'),xuc),V5c),eX),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Hoe),xpe),'Self-Loop Ordering'),'Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE.'),zuc),V5c),fX),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ioe),'edgeRouting.splines'),'Spline Routing Mode'),'Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes.'),Buc),V5c),hX),pqb(L5c))));o4c(a,Ioe,ype,Cuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Joe),'edgeRouting.splines.sloppy'),'Sloppy Spline Layer Spacing Factor'),'Spacing factor for routing area between layers when using sloppy spline routing.'),0.2),U5c),BI),pqb(L5c))));o4c(a,Joe,ype,Euc);o4c(a,Joe,Ioe,Fuc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Koe),'edgeRouting.polyline'),'Sloped Edge Zone Width'),'Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer.'),2),U5c),BI),pqb(L5c))));o4c(a,Koe,ype,vuc);t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Loe),zpe),'Spacing Base Value'),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Moe),zpe),'Edge Node Between Layers Spacing'),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Noe),zpe),'Edge Edge Between Layer Spacing'),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ooe),zpe),'Node Node Between Layers Spacing'),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Poe),Ape),'Direction Priority'),'Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase.'),meb(0)),X5c),JI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Qoe),Ape),'Shortness Priority'),'Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase.'),meb(0)),X5c),JI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Roe),Ape),'Straightness Priority'),'Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement.'),meb(0)),X5c),JI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Soe),Bpe),Ole),'Tries to further compact components (disconnected sub-graphs).'),false),T5c),wI),pqb(L5c))));o4c(a,Soe,zme,true);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Toe),Cpe),'Post Compaction Strategy'),Dpe),Ntc),V5c),OW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Uoe),Cpe),'Post Compaction Constraint Calculation'),Dpe),Ltc),V5c),FW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Voe),Epe),'High Degree Node Treatment'),'Makes room around high degree nodes to place leafs and trees.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Woe),Epe),'High Degree Node Threshold'),'Whether a node is considered to have a high degree.'),meb(16)),X5c),JI),pqb(L5c))));o4c(a,Woe,Voe,true);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Xoe),Epe),'High Degree Node Maximum Tree Height'),'Maximum height of a subtree connected to a high degree node to be moved to separate layers.'),meb(5)),X5c),JI),pqb(L5c))));o4c(a,Xoe,Voe,true);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Yoe),Fpe),'Graph Wrapping Strategy'),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),bwc),V5c),jX),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Zoe),Fpe),'Additional Wrapped Edges Spacing'),'To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing.'),10),U5c),BI),pqb(L5c))));o4c(a,Zoe,Yoe,Ivc);o4c(a,Zoe,Yoe,Jvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,$oe),Fpe),'Correction Factor for Wrapping'),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),U5c),BI),pqb(L5c))));o4c(a,$oe,Yoe,Lvc);o4c(a,$oe,Yoe,Mvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,_oe),Gpe),'Cutting Strategy'),'The strategy by which the layer indexes are determined at which the layering crumbles into chunks.'),Tvc),V5c),HW),pqb(L5c))));o4c(a,_oe,Yoe,Uvc);o4c(a,_oe,Yoe,Vvc);t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,ape),Gpe),'Manually Specified Cuts'),'Allows the user to specify her own cuts for a certain graph.'),Y5c),yK),pqb(L5c))));o4c(a,ape,_oe,Ovc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,bpe),'wrapping.cutting.msd'),'MSD Freedom'),'The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts.'),Qvc),X5c),JI),pqb(L5c))));o4c(a,bpe,_oe,Rvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,cpe),Hpe),'Validification Strategy'),'When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed.'),gwc),V5c),iX),pqb(L5c))));o4c(a,cpe,Yoe,hwc);o4c(a,cpe,Yoe,iwc);t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,dpe),Hpe),'Valid Indices for Wrapping'),null),Y5c),yK),pqb(L5c))));o4c(a,dpe,Yoe,dwc);o4c(a,dpe,Yoe,ewc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,epe),Ipe),'Improve Cuts'),'For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought.'),true),T5c),wI),pqb(L5c))));o4c(a,epe,Yoe,Zvc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,fpe),Ipe),'Distance Penalty When Improving Cuts'),null),2),U5c),BI),pqb(L5c))));o4c(a,fpe,Yoe,Xvc);o4c(a,fpe,epe,true);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,gpe),Ipe),'Improve Wrapped Edges'),'The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges.'),true),T5c),wI),pqb(L5c))));o4c(a,gpe,Yoe,_vc);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,hpe),Jpe),'Edge Label Side Selection'),'Method to decide on edge label sides.'),tuc),V5c),LW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ipe),Jpe),'Edge Center Label Placement Strategy'),'Determines in which layer center labels of long edges should be placed.'),ruc),V5c),EW),qqb(L5c,OC(GC(e1,1),Kie,175,0,[J5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,jpe),Kpe),'Consider Model Order'),'Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting.'),Wtc),V5c),bX),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,kpe),Kpe),'No Model Order'),'Set on a node to not set a model order for this node even though it is a real node.'),false),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,lpe),Kpe),'Consider Model Order for Components'),'If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected.'),Ptc),V5c),hQ),pqb(L5c))));o4c(a,lpe,zme,null);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,mpe),Kpe),'Long Edge Ordering Strategy'),'Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout.'),Ttc),V5c),ZW),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,npe),Kpe),'Crossing Counter Node Order Influence'),'Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0).'),0),U5c),BI),pqb(L5c))));o4c(a,npe,jpe,null);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ope),Kpe),'Crossing Counter Port Order Influence'),'Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0).'),0),U5c),BI),pqb(L5c))));o4c(a,ope,jpe,null);Oyc((new Pyc,a))};var Itc,Jtc,Ktc,Ltc,Mtc,Ntc,Otc,Ptc,Qtc,Rtc,Stc,Ttc,Utc,Vtc,Wtc,Xtc,Ytc,Ztc,$tc,_tc,auc,buc,cuc,duc,euc,fuc,guc,huc,iuc,juc,kuc,luc,muc,nuc,ouc,puc,quc,ruc,suc,tuc,uuc,vuc,wuc,xuc,yuc,zuc,Auc,Buc,Cuc,Duc,Euc,Fuc,Guc,Huc,Iuc,Juc,Kuc,Luc,Muc,Nuc,Ouc,Puc,Quc,Ruc,Suc,Tuc,Uuc,Vuc,Wuc,Xuc,Yuc,Zuc,$uc,_uc,avc,bvc,cvc,dvc,evc,fvc,gvc,hvc,ivc,jvc,kvc,lvc,mvc,nvc,ovc,pvc,qvc,rvc,svc,tvc,uvc,vvc,wvc,xvc,yvc,zvc,Avc,Bvc,Cvc,Dvc,Evc,Fvc,Gvc,Hvc,Ivc,Jvc,Kvc,Lvc,Mvc,Nvc,Ovc,Pvc,Qvc,Rvc,Svc,Tvc,Uvc,Vvc,Wvc,Xvc,Yvc,Zvc,$vc,_vc,awc,bwc,cwc,dwc,ewc,fwc,gwc,hwc,iwc;var UW=mdb(Sne,'LayeredMetaDataProvider',848);bcb(986,1,ale,Pyc);_.Qe=function Qyc(a){Oyc(a)};var mwc,nwc,owc,pwc,qwc,rwc,swc,twc,uwc,vwc,wwc,xwc,ywc,zwc,Awc,Bwc,Cwc,Dwc,Ewc,Fwc,Gwc,Hwc,Iwc,Jwc,Kwc,Lwc,Mwc,Nwc,Owc,Pwc,Qwc,Rwc,Swc,Twc,Uwc,Vwc,Wwc,Xwc,Ywc,Zwc,$wc,_wc,axc,bxc,cxc,dxc,exc,fxc,gxc,hxc,ixc,jxc,kxc,lxc,mxc,nxc,oxc,pxc,qxc,rxc,sxc,txc,uxc,vxc,wxc,xxc,yxc,zxc,Axc,Bxc,Cxc,Dxc,Exc,Fxc,Gxc,Hxc,Ixc,Jxc,Kxc,Lxc,Mxc,Nxc,Oxc,Pxc,Qxc,Rxc,Sxc,Txc,Uxc,Vxc,Wxc,Xxc,Yxc,Zxc,$xc,_xc,ayc,byc,cyc,dyc,eyc,fyc,gyc,hyc,iyc,jyc,kyc,lyc,myc,nyc,oyc,pyc,qyc,ryc,syc,tyc,uyc,vyc,wyc,xyc,yyc,zyc,Ayc,Byc,Cyc,Dyc,Eyc,Fyc,Gyc,Hyc,Iyc,Jyc,Kyc,Lyc,Myc;var WW=mdb(Sne,'LayeredOptions',986);bcb(987,1,{},Ryc);_.$e=function Syc(){var a;return a=new jUb,a};_._e=function Tyc(a){};var VW=mdb(Sne,'LayeredOptions/LayeredFactory',987);bcb(1372,1,{});_.a=0;var Uyc;var $1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder',1372);bcb(779,1372,{},ezc);var bzc,czc;var XW=mdb(Sne,'LayeredSpacings/LayeredSpacingsBuilder',779);bcb(313,22,{3:1,35:1,22:1,313:1,246:1,234:1},nzc);_.Kf=function pzc(){return mzc(this)};_.Xf=function ozc(){return mzc(this)};var fzc,gzc,hzc,izc,jzc,kzc;var YW=ndb(Sne,'LayeringStrategy',313,CI,rzc,qzc);var szc;bcb(378,22,{3:1,35:1,22:1,378:1},zzc);var uzc,vzc,wzc;var ZW=ndb(Sne,'LongEdgeOrderingStrategy',378,CI,Bzc,Azc);var Czc;bcb(197,22,{3:1,35:1,22:1,197:1},Kzc);var Ezc,Fzc,Gzc,Hzc;var $W=ndb(Sne,'NodeFlexibility',197,CI,Nzc,Mzc);var Ozc;bcb(315,22,{3:1,35:1,22:1,315:1,246:1,234:1},Xzc);_.Kf=function Zzc(){return Wzc(this)};_.Xf=function Yzc(){return Wzc(this)};var Qzc,Rzc,Szc,Tzc,Uzc;var _W=ndb(Sne,'NodePlacementStrategy',315,CI,_zc,$zc);var aAc;bcb(260,22,{3:1,35:1,22:1,260:1},lAc);var cAc,dAc,eAc,fAc,gAc,hAc,iAc,jAc;var aX=ndb(Sne,'NodePromotionStrategy',260,CI,nAc,mAc);var oAc;bcb(339,22,{3:1,35:1,22:1,339:1},uAc);var qAc,rAc,sAc;var bX=ndb(Sne,'OrderingStrategy',339,CI,wAc,vAc);var xAc;bcb(421,22,{3:1,35:1,22:1,421:1},CAc);var zAc,AAc;var cX=ndb(Sne,'PortSortingStrategy',421,CI,EAc,DAc);var FAc;bcb(452,22,{3:1,35:1,22:1,452:1},LAc);var HAc,IAc,JAc;var dX=ndb(Sne,'PortType',452,CI,NAc,MAc);var OAc;bcb(375,22,{3:1,35:1,22:1,375:1},UAc);var QAc,RAc,SAc;var eX=ndb(Sne,'SelfLoopDistributionStrategy',375,CI,WAc,VAc);var XAc;bcb(376,22,{3:1,35:1,22:1,376:1},aBc);var ZAc,$Ac;var fX=ndb(Sne,'SelfLoopOrderingStrategy',376,CI,cBc,bBc);var dBc;bcb(304,1,{304:1},oBc);var gX=mdb(Sne,'Spacings',304);bcb(336,22,{3:1,35:1,22:1,336:1},uBc);var qBc,rBc,sBc;var hX=ndb(Sne,'SplineRoutingMode',336,CI,wBc,vBc);var xBc;bcb(338,22,{3:1,35:1,22:1,338:1},DBc);var zBc,ABc,BBc;var iX=ndb(Sne,'ValidifyStrategy',338,CI,FBc,EBc);var GBc;bcb(377,22,{3:1,35:1,22:1,377:1},MBc);var IBc,JBc,KBc;var jX=ndb(Sne,'WrappingStrategy',377,CI,OBc,NBc);var PBc;bcb(1383,1,Bqe,VBc);_.Yf=function WBc(a){return BD(a,37),RBc};_.pf=function XBc(a,b){UBc(this,BD(a,37),b)};var RBc;var kX=mdb(Cqe,'DepthFirstCycleBreaker',1383);bcb(782,1,Bqe,aCc);_.Yf=function cCc(a){return BD(a,37),YBc};_.pf=function dCc(a,b){$Bc(this,BD(a,37),b)};_.Zf=function bCc(a){return BD(Ikb(a,Bub(this.d,a.c.length)),10)};var YBc;var lX=mdb(Cqe,'GreedyCycleBreaker',782);bcb(1386,782,Bqe,eCc);_.Zf=function fCc(a){var b,c,d,e;e=null;b=Ohe;for(d=new olb(a);d.a1){Ccb(DD(vNb(Q_b((tCb(0,a.c.length),BD(a.c[0],10))),(Nyc(),Awc))))?YGc(a,this.d,BD(this,660)):(mmb(),Okb(a,this.d));PEc(this.e,a)}};_.Sf=function DEc(a,b,c,d){var e,f,g,h,i,j,k;if(b!=sEc(c,a.length)){f=a[b-(c?1:-1)];UDc(this.f,f,c?(KAc(),IAc):(KAc(),HAc))}e=a[b][0];k=!d||e.k==(j0b(),e0b);j=Ou(a[b]);this.ag(j,k,false,c);g=0;for(i=new olb(j);i.a');a0?(RHc(this.a,a[b-1],a[b]),undefined):!c&&b1){Ccb(DD(vNb(Q_b((tCb(0,a.c.length),BD(a.c[0],10))),(Nyc(),Awc))))?YGc(a,this.d,this):(mmb(),Okb(a,this.d));Ccb(DD(vNb(Q_b((tCb(0,a.c.length),BD(a.c[0],10))),Awc)))||PEc(this.e,a)}};var YX=mdb(Gqe,'ModelOrderBarycenterHeuristic',660);bcb(1803,1,Dke,$Gc);_.ue=function _Gc(a,b){return VGc(this.a,BD(a,10),BD(b,10))};_.Fb=function aHc(a){return this===a};_.ve=function bHc(){return new tpb(this)};var XX=mdb(Gqe,'ModelOrderBarycenterHeuristic/lambda$0$Type',1803);bcb(1403,1,Bqe,fHc);_.Yf=function gHc(a){var b;return BD(a,37),b=k3c(cHc),e3c(b,(qUb(),nUb),(S8b(),H8b)),b};_.pf=function hHc(a,b){eHc((BD(a,37),b))};var cHc;var ZX=mdb(Gqe,'NoCrossingMinimizer',1403);bcb(796,402,Eqe,iHc);_.$f=function jHc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n;l=this.g;switch(c.g){case 1:{e=0;f=0;for(k=new olb(a.j);k.a1&&(e.j==(Ucd(),zcd)?(this.b[a]=true):e.j==Tcd&&a>0&&(this.b[a-1]=true))};_.f=0;var aY=mdb(Lne,'AllCrossingsCounter',1798);bcb(587,1,{},BHc);_.b=0;_.d=0;var bY=mdb(Lne,'BinaryIndexedTree',587);bcb(524,1,{},dIc);var DHc,EHc;var lY=mdb(Lne,'CrossingsCounter',524);bcb(1906,1,Dke,hIc);_.ue=function iIc(a,b){return YHc(this.a,BD(a,11),BD(b,11))};_.Fb=function jIc(a){return this===a};_.ve=function kIc(){return new tpb(this)};var cY=mdb(Lne,'CrossingsCounter/lambda$0$Type',1906);bcb(1907,1,Dke,lIc);_.ue=function mIc(a,b){return ZHc(this.a,BD(a,11),BD(b,11))};_.Fb=function nIc(a){return this===a};_.ve=function oIc(){return new tpb(this)};var dY=mdb(Lne,'CrossingsCounter/lambda$1$Type',1907);bcb(1908,1,Dke,pIc);_.ue=function qIc(a,b){return $Hc(this.a,BD(a,11),BD(b,11))};_.Fb=function rIc(a){return this===a};_.ve=function sIc(){return new tpb(this)};var eY=mdb(Lne,'CrossingsCounter/lambda$2$Type',1908);bcb(1909,1,Dke,tIc);_.ue=function uIc(a,b){return _Hc(this.a,BD(a,11),BD(b,11))};_.Fb=function vIc(a){return this===a};_.ve=function wIc(){return new tpb(this)};var fY=mdb(Lne,'CrossingsCounter/lambda$3$Type',1909);bcb(1910,1,qie,xIc);_.td=function yIc(a){eIc(this.a,BD(a,11))};var gY=mdb(Lne,'CrossingsCounter/lambda$4$Type',1910);bcb(1911,1,Oie,zIc);_.Mb=function AIc(a){return fIc(this.a,BD(a,11))};var hY=mdb(Lne,'CrossingsCounter/lambda$5$Type',1911);bcb(1912,1,qie,CIc);_.td=function DIc(a){BIc(this,a)};var iY=mdb(Lne,'CrossingsCounter/lambda$6$Type',1912);bcb(1913,1,qie,EIc);_.td=function FIc(a){var b;FHc();Wjb(this.b,(b=this.a,BD(a,11),b))};var jY=mdb(Lne,'CrossingsCounter/lambda$7$Type',1913);bcb(826,1,Vke,GIc);_.Lb=function HIc(a){return FHc(),wNb(BD(a,11),(wtc(),gtc))};_.Fb=function IIc(a){return this===a};_.Mb=function JIc(a){return FHc(),wNb(BD(a,11),(wtc(),gtc))};var kY=mdb(Lne,'CrossingsCounter/lambda$8$Type',826);bcb(1905,1,{},LIc);var pY=mdb(Lne,'HyperedgeCrossingsCounter',1905);bcb(467,1,{35:1,467:1},NIc);_.wd=function OIc(a){return MIc(this,BD(a,467))};_.b=0;_.c=0;_.e=0;_.f=0;var oY=mdb(Lne,'HyperedgeCrossingsCounter/Hyperedge',467);bcb(362,1,{35:1,362:1},QIc);_.wd=function RIc(a){return PIc(this,BD(a,362))};_.b=0;_.c=0;var nY=mdb(Lne,'HyperedgeCrossingsCounter/HyperedgeCorner',362);bcb(523,22,{3:1,35:1,22:1,523:1},VIc);var SIc,TIc;var mY=ndb(Lne,'HyperedgeCrossingsCounter/HyperedgeCorner/Type',523,CI,XIc,WIc);var YIc;bcb(1405,1,Bqe,dJc);_.Yf=function eJc(a){return BD(vNb(BD(a,37),(wtc(),Ksc)),21).Hc((Orc(),Hrc))?_Ic:null};_.pf=function fJc(a,b){cJc(this,BD(a,37),b)};var _Ic;var rY=mdb(Hqe,'InteractiveNodePlacer',1405);bcb(1406,1,Bqe,tJc);_.Yf=function uJc(a){return BD(vNb(BD(a,37),(wtc(),Ksc)),21).Hc((Orc(),Hrc))?gJc:null};_.pf=function vJc(a,b){rJc(this,BD(a,37),b)};var gJc,hJc,iJc;var tY=mdb(Hqe,'LinearSegmentsNodePlacer',1406);bcb(257,1,{35:1,257:1},zJc);_.wd=function AJc(a){return wJc(this,BD(a,257))};_.Fb=function BJc(a){var b;if(JD(a,257)){b=BD(a,257);return this.b==b.b}return false};_.Hb=function CJc(){return this.b};_.Ib=function DJc(){return 'ls'+Fe(this.e)};_.a=0;_.b=0;_.c=-1;_.d=-1;_.g=0;var sY=mdb(Hqe,'LinearSegmentsNodePlacer/LinearSegment',257);bcb(1408,1,Bqe,$Jc);_.Yf=function _Jc(a){return BD(vNb(BD(a,37),(wtc(),Ksc)),21).Hc((Orc(),Hrc))?EJc:null};_.pf=function hKc(a,b){WJc(this,BD(a,37),b)};_.b=0;_.g=0;var EJc;var dZ=mdb(Hqe,'NetworkSimplexPlacer',1408);bcb(1427,1,Dke,iKc);_.ue=function jKc(a,b){return beb(BD(a,19).a,BD(b,19).a)};_.Fb=function kKc(a){return this===a};_.ve=function lKc(){return new tpb(this)};var uY=mdb(Hqe,'NetworkSimplexPlacer/0methodref$compare$Type',1427);bcb(1429,1,Dke,mKc);_.ue=function nKc(a,b){return beb(BD(a,19).a,BD(b,19).a)};_.Fb=function oKc(a){return this===a};_.ve=function pKc(){return new tpb(this)};var vY=mdb(Hqe,'NetworkSimplexPlacer/1methodref$compare$Type',1429);bcb(649,1,{649:1},qKc);var wY=mdb(Hqe,'NetworkSimplexPlacer/EdgeRep',649);bcb(401,1,{401:1},rKc);_.b=false;var xY=mdb(Hqe,'NetworkSimplexPlacer/NodeRep',401);bcb(508,12,{3:1,4:1,20:1,28:1,52:1,12:1,14:1,15:1,54:1,508:1},vKc);var CY=mdb(Hqe,'NetworkSimplexPlacer/Path',508);bcb(1409,1,{},wKc);_.Kb=function xKc(a){return BD(a,17).d.i.k};var yY=mdb(Hqe,'NetworkSimplexPlacer/Path/lambda$0$Type',1409);bcb(1410,1,Oie,yKc);_.Mb=function zKc(a){return BD(a,267)==(j0b(),g0b)};var zY=mdb(Hqe,'NetworkSimplexPlacer/Path/lambda$1$Type',1410);bcb(1411,1,{},AKc);_.Kb=function BKc(a){return BD(a,17).d.i};var AY=mdb(Hqe,'NetworkSimplexPlacer/Path/lambda$2$Type',1411);bcb(1412,1,Oie,CKc);_.Mb=function DKc(a){return eLc(Lzc(BD(a,10)))};var BY=mdb(Hqe,'NetworkSimplexPlacer/Path/lambda$3$Type',1412);bcb(1413,1,Oie,EKc);_.Mb=function FKc(a){return dKc(BD(a,11))};var DY=mdb(Hqe,'NetworkSimplexPlacer/lambda$0$Type',1413);bcb(1414,1,qie,GKc);_.td=function HKc(a){LJc(this.a,this.b,BD(a,11))};var EY=mdb(Hqe,'NetworkSimplexPlacer/lambda$1$Type',1414);bcb(1423,1,qie,IKc);_.td=function JKc(a){MJc(this.a,BD(a,17))};var FY=mdb(Hqe,'NetworkSimplexPlacer/lambda$10$Type',1423);bcb(1424,1,{},KKc);_.Kb=function LKc(a){return FJc(),new YAb(null,new Kub(BD(a,29).a,16))};var GY=mdb(Hqe,'NetworkSimplexPlacer/lambda$11$Type',1424);bcb(1425,1,qie,MKc);_.td=function NKc(a){NJc(this.a,BD(a,10))};var HY=mdb(Hqe,'NetworkSimplexPlacer/lambda$12$Type',1425);bcb(1426,1,{},OKc);_.Kb=function PKc(a){return FJc(),meb(BD(a,121).e)};var IY=mdb(Hqe,'NetworkSimplexPlacer/lambda$13$Type',1426);bcb(1428,1,{},QKc);_.Kb=function RKc(a){return FJc(),meb(BD(a,121).e)};var JY=mdb(Hqe,'NetworkSimplexPlacer/lambda$15$Type',1428);bcb(1430,1,Oie,SKc);_.Mb=function TKc(a){return FJc(),BD(a,401).c.k==(j0b(),h0b)};var KY=mdb(Hqe,'NetworkSimplexPlacer/lambda$17$Type',1430);bcb(1431,1,Oie,UKc);_.Mb=function VKc(a){return FJc(),BD(a,401).c.j.c.length>1};var LY=mdb(Hqe,'NetworkSimplexPlacer/lambda$18$Type',1431);bcb(1432,1,qie,WKc);_.td=function XKc(a){eKc(this.c,this.b,this.d,this.a,BD(a,401))};_.c=0;_.d=0;var MY=mdb(Hqe,'NetworkSimplexPlacer/lambda$19$Type',1432);bcb(1415,1,{},YKc);_.Kb=function ZKc(a){return FJc(),new YAb(null,new Kub(BD(a,29).a,16))};var NY=mdb(Hqe,'NetworkSimplexPlacer/lambda$2$Type',1415);bcb(1433,1,qie,$Kc);_.td=function _Kc(a){fKc(this.a,BD(a,11))};_.a=0;var OY=mdb(Hqe,'NetworkSimplexPlacer/lambda$20$Type',1433);bcb(1434,1,{},aLc);_.Kb=function bLc(a){return FJc(),new YAb(null,new Kub(BD(a,29).a,16))};var PY=mdb(Hqe,'NetworkSimplexPlacer/lambda$21$Type',1434);bcb(1435,1,qie,cLc);_.td=function dLc(a){OJc(this.a,BD(a,10))};var QY=mdb(Hqe,'NetworkSimplexPlacer/lambda$22$Type',1435);bcb(1436,1,Oie,fLc);_.Mb=function gLc(a){return eLc(a)};var RY=mdb(Hqe,'NetworkSimplexPlacer/lambda$23$Type',1436);bcb(1437,1,{},hLc);_.Kb=function iLc(a){return FJc(),new YAb(null,new Kub(BD(a,29).a,16))};var SY=mdb(Hqe,'NetworkSimplexPlacer/lambda$24$Type',1437);bcb(1438,1,Oie,jLc);_.Mb=function kLc(a){return PJc(this.a,BD(a,10))};var TY=mdb(Hqe,'NetworkSimplexPlacer/lambda$25$Type',1438);bcb(1439,1,qie,lLc);_.td=function mLc(a){QJc(this.a,this.b,BD(a,10))};var UY=mdb(Hqe,'NetworkSimplexPlacer/lambda$26$Type',1439);bcb(1440,1,Oie,nLc);_.Mb=function oLc(a){return FJc(),!OZb(BD(a,17))};var VY=mdb(Hqe,'NetworkSimplexPlacer/lambda$27$Type',1440);bcb(1441,1,Oie,pLc);_.Mb=function qLc(a){return FJc(),!OZb(BD(a,17))};var WY=mdb(Hqe,'NetworkSimplexPlacer/lambda$28$Type',1441);bcb(1442,1,{},rLc);_.Ce=function sLc(a,b){return RJc(this.a,BD(a,29),BD(b,29))};var XY=mdb(Hqe,'NetworkSimplexPlacer/lambda$29$Type',1442);bcb(1416,1,{},tLc);_.Kb=function uLc(a){return FJc(),new YAb(null,new Lub(new Sr(ur(U_b(BD(a,10)).a.Kc(),new Sq))))};var YY=mdb(Hqe,'NetworkSimplexPlacer/lambda$3$Type',1416);bcb(1417,1,Oie,vLc);_.Mb=function wLc(a){return FJc(),cKc(BD(a,17))};var ZY=mdb(Hqe,'NetworkSimplexPlacer/lambda$4$Type',1417);bcb(1418,1,qie,xLc);_.td=function yLc(a){XJc(this.a,BD(a,17))};var $Y=mdb(Hqe,'NetworkSimplexPlacer/lambda$5$Type',1418);bcb(1419,1,{},zLc);_.Kb=function ALc(a){return FJc(),new YAb(null,new Kub(BD(a,29).a,16))};var _Y=mdb(Hqe,'NetworkSimplexPlacer/lambda$6$Type',1419);bcb(1420,1,Oie,BLc);_.Mb=function CLc(a){return FJc(),BD(a,10).k==(j0b(),h0b)};var aZ=mdb(Hqe,'NetworkSimplexPlacer/lambda$7$Type',1420);bcb(1421,1,{},DLc);_.Kb=function ELc(a){return FJc(),new YAb(null,new Lub(new Sr(ur(O_b(BD(a,10)).a.Kc(),new Sq))))};var bZ=mdb(Hqe,'NetworkSimplexPlacer/lambda$8$Type',1421);bcb(1422,1,Oie,FLc);_.Mb=function GLc(a){return FJc(),NZb(BD(a,17))};var cZ=mdb(Hqe,'NetworkSimplexPlacer/lambda$9$Type',1422);bcb(1404,1,Bqe,KLc);_.Yf=function LLc(a){return BD(vNb(BD(a,37),(wtc(),Ksc)),21).Hc((Orc(),Hrc))?HLc:null};_.pf=function MLc(a,b){JLc(BD(a,37),b)};var HLc;var eZ=mdb(Hqe,'SimpleNodePlacer',1404);bcb(180,1,{180:1},ULc);_.Ib=function VLc(){var a;a='';this.c==(YLc(),XLc)?(a+=kle):this.c==WLc&&(a+=jle);this.o==(eMc(),cMc)?(a+=vle):this.o==dMc?(a+='UP'):(a+='BALANCED');return a};var hZ=mdb(Kqe,'BKAlignedLayout',180);bcb(516,22,{3:1,35:1,22:1,516:1},ZLc);var WLc,XLc;var fZ=ndb(Kqe,'BKAlignedLayout/HDirection',516,CI,_Lc,$Lc);var aMc;bcb(515,22,{3:1,35:1,22:1,515:1},fMc);var cMc,dMc;var gZ=ndb(Kqe,'BKAlignedLayout/VDirection',515,CI,hMc,gMc);var iMc;bcb(1634,1,{},mMc);var iZ=mdb(Kqe,'BKAligner',1634);bcb(1637,1,{},rMc);var lZ=mdb(Kqe,'BKCompactor',1637);bcb(654,1,{654:1},sMc);_.a=0;var jZ=mdb(Kqe,'BKCompactor/ClassEdge',654);bcb(458,1,{458:1},uMc);_.a=null;_.b=0;var kZ=mdb(Kqe,'BKCompactor/ClassNode',458);bcb(1407,1,Bqe,CMc);_.Yf=function GMc(a){return BD(vNb(BD(a,37),(wtc(),Ksc)),21).Hc((Orc(),Hrc))?vMc:null};_.pf=function HMc(a,b){BMc(this,BD(a,37),b)};_.d=false;var vMc;var mZ=mdb(Kqe,'BKNodePlacer',1407);bcb(1635,1,{},JMc);_.d=0;var oZ=mdb(Kqe,'NeighborhoodInformation',1635);bcb(1636,1,Dke,OMc);_.ue=function PMc(a,b){return NMc(this,BD(a,46),BD(b,46))};_.Fb=function QMc(a){return this===a};_.ve=function RMc(){return new tpb(this)};var nZ=mdb(Kqe,'NeighborhoodInformation/NeighborComparator',1636);bcb(808,1,{});var sZ=mdb(Kqe,'ThresholdStrategy',808);bcb(1763,808,{},WMc);_.bg=function XMc(a,b,c){return this.a.o==(eMc(),dMc)?Pje:Qje};_.cg=function YMc(){};var pZ=mdb(Kqe,'ThresholdStrategy/NullThresholdStrategy',1763);bcb(579,1,{579:1},ZMc);_.c=false;_.d=false;var qZ=mdb(Kqe,'ThresholdStrategy/Postprocessable',579);bcb(1764,808,{},bNc);_.bg=function cNc(a,b,c){var d,e,f;e=b==c;d=this.a.a[c.p]==b;if(!(e||d)){return a}f=a;if(this.a.c==(YLc(),XLc)){e&&(f=$Mc(this,b,true));!isNaN(f)&&!isFinite(f)&&d&&(f=$Mc(this,c,false))}else{e&&(f=$Mc(this,b,true));!isNaN(f)&&!isFinite(f)&&d&&(f=$Mc(this,c,false))}return f};_.cg=function dNc(){var a,b,c,d,e;while(this.d.b!=0){e=BD(Ksb(this.d),579);d=_Mc(this,e);if(!d.a){continue}a=d.a;c=Ccb(this.a.f[this.a.g[e.b.p].p]);if(!c&&!OZb(a)&&a.c.i.c==a.d.i.c){continue}b=aNc(this,e);b||swb(this.e,e)}while(this.e.a.c.length!=0){aNc(this,BD(rwb(this.e),579))}};var rZ=mdb(Kqe,'ThresholdStrategy/SimpleThresholdStrategy',1764);bcb(635,1,{635:1,246:1,234:1},hNc);_.Kf=function jNc(){return gNc(this)};_.Xf=function iNc(){return gNc(this)};var eNc;var tZ=mdb(Lqe,'EdgeRouterFactory',635);bcb(1458,1,Bqe,wNc);_.Yf=function xNc(a){return uNc(BD(a,37))};_.pf=function yNc(a,b){vNc(BD(a,37),b)};var lNc,mNc,nNc,oNc,pNc,qNc,rNc,sNc;var uZ=mdb(Lqe,'OrthogonalEdgeRouter',1458);bcb(1451,1,Bqe,NNc);_.Yf=function ONc(a){return INc(BD(a,37))};_.pf=function PNc(a,b){KNc(this,BD(a,37),b)};var zNc,ANc,BNc,CNc,DNc,ENc;var wZ=mdb(Lqe,'PolylineEdgeRouter',1451);bcb(1452,1,Vke,RNc);_.Lb=function SNc(a){return QNc(BD(a,10))};_.Fb=function TNc(a){return this===a};_.Mb=function UNc(a){return QNc(BD(a,10))};var vZ=mdb(Lqe,'PolylineEdgeRouter/1',1452);bcb(1809,1,Oie,ZNc);_.Mb=function $Nc(a){return BD(a,129).c==(HOc(),FOc)};var xZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$0$Type',1809);bcb(1810,1,{},_Nc);_.Ge=function aOc(a){return BD(a,129).d};var yZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$1$Type',1810);bcb(1811,1,Oie,bOc);_.Mb=function cOc(a){return BD(a,129).c==(HOc(),FOc)};var zZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$2$Type',1811);bcb(1812,1,{},dOc);_.Ge=function eOc(a){return BD(a,129).d};var AZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$3$Type',1812);bcb(1813,1,{},fOc);_.Ge=function gOc(a){return BD(a,129).d};var BZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$4$Type',1813);bcb(1814,1,{},hOc);_.Ge=function iOc(a){return BD(a,129).d};var CZ=mdb(Mqe,'HyperEdgeCycleDetector/lambda$5$Type',1814);bcb(112,1,{35:1,112:1},uOc);_.wd=function vOc(a){return kOc(this,BD(a,112))};_.Fb=function wOc(a){var b;if(JD(a,112)){b=BD(a,112);return this.g==b.g}return false};_.Hb=function xOc(){return this.g};_.Ib=function zOc(){var a,b,c,d;a=new Wfb('{');d=new olb(this.n);while(d.a'+this.b+' ('+Yr(this.c)+')'};_.d=0;var EZ=mdb(Mqe,'HyperEdgeSegmentDependency',129);bcb(520,22,{3:1,35:1,22:1,520:1},IOc);var FOc,GOc;var DZ=ndb(Mqe,'HyperEdgeSegmentDependency/DependencyType',520,CI,KOc,JOc);var LOc;bcb(1815,1,{},ZOc);var MZ=mdb(Mqe,'HyperEdgeSegmentSplitter',1815);bcb(1816,1,{},aPc);_.a=0;_.b=0;var FZ=mdb(Mqe,'HyperEdgeSegmentSplitter/AreaRating',1816);bcb(329,1,{329:1},bPc);_.a=0;_.b=0;_.c=0;var GZ=mdb(Mqe,'HyperEdgeSegmentSplitter/FreeArea',329);bcb(1817,1,Dke,cPc);_.ue=function dPc(a,b){return _Oc(BD(a,112),BD(b,112))};_.Fb=function ePc(a){return this===a};_.ve=function fPc(){return new tpb(this)};var HZ=mdb(Mqe,'HyperEdgeSegmentSplitter/lambda$0$Type',1817);bcb(1818,1,qie,gPc);_.td=function hPc(a){TOc(this.a,this.d,this.c,this.b,BD(a,112))};_.b=0;var IZ=mdb(Mqe,'HyperEdgeSegmentSplitter/lambda$1$Type',1818);bcb(1819,1,{},iPc);_.Kb=function jPc(a){return new YAb(null,new Kub(BD(a,112).e,16))};var JZ=mdb(Mqe,'HyperEdgeSegmentSplitter/lambda$2$Type',1819);bcb(1820,1,{},kPc);_.Kb=function lPc(a){return new YAb(null,new Kub(BD(a,112).j,16))};var KZ=mdb(Mqe,'HyperEdgeSegmentSplitter/lambda$3$Type',1820);bcb(1821,1,{},mPc);_.Fe=function nPc(a){return Edb(ED(a))};var LZ=mdb(Mqe,'HyperEdgeSegmentSplitter/lambda$4$Type',1821);bcb(655,1,{},tPc);_.a=0;_.b=0;_.c=0;var QZ=mdb(Mqe,'OrthogonalRoutingGenerator',655);bcb(1638,1,{},xPc);_.Kb=function yPc(a){return new YAb(null,new Kub(BD(a,112).e,16))};var OZ=mdb(Mqe,'OrthogonalRoutingGenerator/lambda$0$Type',1638);bcb(1639,1,{},zPc);_.Kb=function APc(a){return new YAb(null,new Kub(BD(a,112).j,16))};var PZ=mdb(Mqe,'OrthogonalRoutingGenerator/lambda$1$Type',1639);bcb(661,1,{});var RZ=mdb(Nqe,'BaseRoutingDirectionStrategy',661);bcb(1807,661,{},EPc);_.dg=function FPc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b+a.o*c;for(j=new olb(a.n);j.aqme){f=k;e=a;d=new f7c(l,f);Dsb(g.a,d);BPc(this,g,e,d,false);m=a.r;if(m){n=Edb(ED(Ut(m.e,0)));d=new f7c(n,f);Dsb(g.a,d);BPc(this,g,e,d,false);f=b+m.o*c;e=m;d=new f7c(n,f);Dsb(g.a,d);BPc(this,g,e,d,false)}d=new f7c(p,f);Dsb(g.a,d);BPc(this,g,e,d,false)}}}}};_.eg=function GPc(a){return a.i.n.a+a.n.a+a.a.a};_.fg=function HPc(){return Ucd(),Rcd};_.gg=function IPc(){return Ucd(),Acd};var SZ=mdb(Nqe,'NorthToSouthRoutingStrategy',1807);bcb(1808,661,{},JPc);_.dg=function KPc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b-a.o*c;for(j=new olb(a.n);j.aqme){f=k;e=a;d=new f7c(l,f);Dsb(g.a,d);BPc(this,g,e,d,false);m=a.r;if(m){n=Edb(ED(Ut(m.e,0)));d=new f7c(n,f);Dsb(g.a,d);BPc(this,g,e,d,false);f=b-m.o*c;e=m;d=new f7c(n,f);Dsb(g.a,d);BPc(this,g,e,d,false)}d=new f7c(p,f);Dsb(g.a,d);BPc(this,g,e,d,false)}}}}};_.eg=function LPc(a){return a.i.n.a+a.n.a+a.a.a};_.fg=function MPc(){return Ucd(),Acd};_.gg=function NPc(){return Ucd(),Rcd};var TZ=mdb(Nqe,'SouthToNorthRoutingStrategy',1808);bcb(1806,661,{},OPc);_.dg=function PPc(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p;if(!!a.r&&!a.q){return}k=b+a.o*c;for(j=new olb(a.n);j.aqme){f=k;e=a;d=new f7c(f,l);Dsb(g.a,d);BPc(this,g,e,d,true);m=a.r;if(m){n=Edb(ED(Ut(m.e,0)));d=new f7c(f,n);Dsb(g.a,d);BPc(this,g,e,d,true);f=b+m.o*c;e=m;d=new f7c(f,n);Dsb(g.a,d);BPc(this,g,e,d,true)}d=new f7c(f,p);Dsb(g.a,d);BPc(this,g,e,d,true)}}}}};_.eg=function QPc(a){return a.i.n.b+a.n.b+a.a.b};_.fg=function RPc(){return Ucd(),zcd};_.gg=function SPc(){return Ucd(),Tcd};var UZ=mdb(Nqe,'WestToEastRoutingStrategy',1806);bcb(813,1,{},YPc);_.Ib=function ZPc(){return Fe(this.a)};_.b=0;_.c=false;_.d=false;_.f=0;var WZ=mdb(Pqe,'NubSpline',813);bcb(407,1,{407:1},aQc,bQc);var VZ=mdb(Pqe,'NubSpline/PolarCP',407);bcb(1453,1,Bqe,vQc);_.Yf=function xQc(a){return qQc(BD(a,37))};_.pf=function yQc(a,b){uQc(this,BD(a,37),b)};var cQc,dQc,eQc,fQc,gQc;var b$=mdb(Pqe,'SplineEdgeRouter',1453);bcb(268,1,{268:1},BQc);_.Ib=function CQc(){return this.a+' ->('+this.c+') '+this.b};_.c=0;var XZ=mdb(Pqe,'SplineEdgeRouter/Dependency',268);bcb(455,22,{3:1,35:1,22:1,455:1},GQc);var DQc,EQc;var YZ=ndb(Pqe,'SplineEdgeRouter/SideToProcess',455,CI,IQc,HQc);var JQc;bcb(1454,1,Oie,LQc);_.Mb=function MQc(a){return hQc(),!BD(a,128).o};var ZZ=mdb(Pqe,'SplineEdgeRouter/lambda$0$Type',1454);bcb(1455,1,{},NQc);_.Ge=function OQc(a){return hQc(),BD(a,128).v+1};var $Z=mdb(Pqe,'SplineEdgeRouter/lambda$1$Type',1455);bcb(1456,1,qie,PQc);_.td=function QQc(a){sQc(this.a,this.b,BD(a,46))};var _Z=mdb(Pqe,'SplineEdgeRouter/lambda$2$Type',1456);bcb(1457,1,qie,RQc);_.td=function SQc(a){tQc(this.a,this.b,BD(a,46))};var a$=mdb(Pqe,'SplineEdgeRouter/lambda$3$Type',1457);bcb(128,1,{35:1,128:1},YQc,ZQc);_.wd=function $Qc(a){return WQc(this,BD(a,128))};_.b=0;_.e=false;_.f=0;_.g=0;_.j=false;_.k=false;_.n=0;_.o=false;_.p=false;_.q=false;_.s=0;_.u=0;_.v=0;_.F=0;var d$=mdb(Pqe,'SplineSegment',128);bcb(459,1,{459:1},_Qc);_.a=0;_.b=false;_.c=false;_.d=false;_.e=false;_.f=0;var c$=mdb(Pqe,'SplineSegment/EdgeInformation',459);bcb(1234,1,{},hRc);var f$=mdb(Uqe,hme,1234);bcb(1235,1,Dke,jRc);_.ue=function kRc(a,b){return iRc(BD(a,135),BD(b,135))};_.Fb=function lRc(a){return this===a};_.ve=function mRc(){return new tpb(this)};var e$=mdb(Uqe,ime,1235);bcb(1233,1,{},tRc);var g$=mdb(Uqe,'MrTree',1233);bcb(393,22,{3:1,35:1,22:1,393:1,246:1,234:1},ARc);_.Kf=function CRc(){return zRc(this)};_.Xf=function BRc(){return zRc(this)};var uRc,vRc,wRc,xRc;var h$=ndb(Uqe,'TreeLayoutPhases',393,CI,ERc,DRc);var FRc;bcb(1130,209,Mle,HRc);_.Ze=function IRc(a,b){var c,d,e,f,g,h,i;Ccb(DD(hkd(a,(JTc(),ATc))))||$Cb((c=new _Cb((Pgd(),new bhd(a))),c));g=(h=new SRc,tNb(h,a),yNb(h,(mTc(),dTc),a),i=new Lqb,pRc(a,h,i),oRc(a,h,i),h);f=gRc(this.a,g);for(e=new olb(f);e.a'+WRc(this.c):'e_'+tb(this)};var l$=mdb(Vqe,'TEdge',188);bcb(135,134,{3:1,135:1,94:1,134:1},SRc);_.Ib=function TRc(){var a,b,c,d,e;e=null;for(d=Jsb(this.b,0);d.b!=d.d.c;){c=BD(Xsb(d),86);e+=(c.c==null||c.c.length==0?'n_'+c.g:'n_'+c.c)+'\n'}for(b=Jsb(this.a,0);b.b!=b.d.c;){a=BD(Xsb(b),188);e+=(!!a.b&&!!a.c?WRc(a.b)+'->'+WRc(a.c):'e_'+tb(a))+'\n'}return e};var n$=mdb(Vqe,'TGraph',135);bcb(633,502,{3:1,502:1,633:1,94:1,134:1});var r$=mdb(Vqe,'TShape',633);bcb(86,633,{3:1,502:1,86:1,633:1,94:1,134:1},XRc);_.Ib=function YRc(){return WRc(this)};var q$=mdb(Vqe,'TNode',86);bcb(255,1,vie,ZRc);_.Jc=function $Rc(a){reb(this,a)};_.Kc=function _Rc(){var a;return a=Jsb(this.a.d,0),new aSc(a)};var p$=mdb(Vqe,'TNode/2',255);bcb(358,1,aie,aSc);_.Nb=function bSc(a){Rrb(this,a)};_.Pb=function dSc(){return BD(Xsb(this.a),188).c};_.Ob=function cSc(){return Wsb(this.a)};_.Qb=function eSc(){Zsb(this.a)};var o$=mdb(Vqe,'TNode/2/1',358);bcb(1840,1,ene,hSc);_.pf=function jSc(a,b){gSc(this,BD(a,135),b)};var s$=mdb(Wqe,'FanProcessor',1840);bcb(327,22,{3:1,35:1,22:1,327:1,234:1},rSc);_.Kf=function sSc(){switch(this.g){case 0:return new QSc;case 1:return new hSc;case 2:return new GSc;case 3:return new zSc;case 4:return new NSc;case 5:return new TSc;default:throw vbb(new Wdb(Dne+(this.f!=null?this.f:''+this.g)));}};var kSc,lSc,mSc,nSc,oSc,pSc;var t$=ndb(Wqe,Ene,327,CI,uSc,tSc);var vSc;bcb(1843,1,ene,zSc);_.pf=function ASc(a,b){xSc(this,BD(a,135),b)};_.a=0;var v$=mdb(Wqe,'LevelHeightProcessor',1843);bcb(1844,1,vie,BSc);_.Jc=function CSc(a){reb(this,a)};_.Kc=function DSc(){return mmb(),Emb(),Dmb};var u$=mdb(Wqe,'LevelHeightProcessor/1',1844);bcb(1841,1,ene,GSc);_.pf=function HSc(a,b){ESc(this,BD(a,135),b)};_.a=0;var x$=mdb(Wqe,'NeighborsProcessor',1841);bcb(1842,1,vie,ISc);_.Jc=function JSc(a){reb(this,a)};_.Kc=function KSc(){return mmb(),Emb(),Dmb};var w$=mdb(Wqe,'NeighborsProcessor/1',1842);bcb(1845,1,ene,NSc);_.pf=function OSc(a,b){LSc(this,BD(a,135),b)};_.a=0;var y$=mdb(Wqe,'NodePositionProcessor',1845);bcb(1839,1,ene,QSc);_.pf=function RSc(a,b){PSc(this,BD(a,135))};var z$=mdb(Wqe,'RootProcessor',1839);bcb(1846,1,ene,TSc);_.pf=function USc(a,b){SSc(BD(a,135))};var A$=mdb(Wqe,'Untreeifyer',1846);var VSc,WSc,XSc,YSc,ZSc,$Sc,_Sc,aTc,bTc,cTc,dTc,eTc,fTc,gTc,hTc,iTc,jTc,kTc,lTc;bcb(851,1,ale,sTc);_.Qe=function tTc(a){t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Zqe),''),'Weighting of Nodes'),'Which weighting to use when computing a node order.'),qTc),(_5c(),V5c)),E$),pqb((N5c(),L5c)))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,$qe),''),'Search Order'),'Which search order to use when computing a spanning tree.'),oTc),V5c),F$),pqb(L5c))));KTc((new LTc,a))};var nTc,oTc,pTc,qTc;var B$=mdb(_qe,'MrTreeMetaDataProvider',851);bcb(994,1,ale,LTc);_.Qe=function MTc(a){KTc(a)};var uTc,vTc,wTc,xTc,yTc,zTc,ATc,BTc,CTc,DTc,ETc,FTc,GTc,HTc,ITc;var D$=mdb(_qe,'MrTreeOptions',994);bcb(995,1,{},NTc);_.$e=function OTc(){var a;return a=new HRc,a};_._e=function PTc(a){};var C$=mdb(_qe,'MrTreeOptions/MrtreeFactory',995);bcb(480,22,{3:1,35:1,22:1,480:1},TTc);var QTc,RTc;var E$=ndb(_qe,'OrderWeighting',480,CI,VTc,UTc);var WTc;bcb(425,22,{3:1,35:1,22:1,425:1},_Tc);var YTc,ZTc;var F$=ndb(_qe,'TreeifyingOrder',425,CI,bUc,aUc);var cUc;bcb(1459,1,Bqe,lUc);_.Yf=function mUc(a){return BD(a,135),eUc};_.pf=function nUc(a,b){kUc(this,BD(a,135),b)};var eUc;var G$=mdb('org.eclipse.elk.alg.mrtree.p1treeify','DFSTreeifyer',1459);bcb(1460,1,Bqe,sUc);_.Yf=function tUc(a){return BD(a,135),oUc};_.pf=function uUc(a,b){rUc(this,BD(a,135),b)};var oUc;var H$=mdb('org.eclipse.elk.alg.mrtree.p2order','NodeOrderer',1460);bcb(1461,1,Bqe,CUc);_.Yf=function DUc(a){return BD(a,135),vUc};_.pf=function EUc(a,b){AUc(this,BD(a,135),b)};_.a=0;var vUc;var I$=mdb('org.eclipse.elk.alg.mrtree.p3place','NodePlacer',1461);bcb(1462,1,Bqe,IUc);_.Yf=function JUc(a){return BD(a,135),FUc};_.pf=function KUc(a,b){HUc(BD(a,135),b)};var FUc;var J$=mdb('org.eclipse.elk.alg.mrtree.p4route','EdgeRouter',1462);var LUc;bcb(495,22,{3:1,35:1,22:1,495:1,246:1,234:1},RUc);_.Kf=function TUc(){return QUc(this)};_.Xf=function SUc(){return QUc(this)};var NUc,OUc;var K$=ndb(cre,'RadialLayoutPhases',495,CI,VUc,UUc);var WUc;bcb(1131,209,Mle,ZUc);_.Ze=function $Uc(a,b){var c,d,e,f,g,h;c=YUc(this,a);Odd(b,'Radial layout',c.c.length);Ccb(DD(hkd(a,(ZWc(),QWc))))||$Cb((d=new _Cb((Pgd(),new bhd(a))),d));h=aVc(a);jkd(a,(MUc(),LUc),h);if(!h){throw vbb(new Wdb('The given graph is not a tree!'))}e=Edb(ED(hkd(a,VWc)));e==0&&(e=_Uc(a));jkd(a,VWc,e);for(g=new olb(YUc(this,a));g.a0&&j7c((BCb(c-1,b.length),b.charCodeAt(c-1)),nne)){--c}if(e>=c){throw vbb(new Wdb('The given string does not contain any numbers.'))}f=mfb(b.substr(e,c-e),',|;|\r|\n');if(f.length!=2){throw vbb(new Wdb('Exactly two numbers are expected, '+f.length+' were found.'))}try{this.a=Hcb(ufb(f[0]));this.b=Hcb(ufb(f[1]))}catch(a){a=ubb(a);if(JD(a,127)){d=a;throw vbb(new Wdb(one+d))}else throw vbb(a)}};_.Ib=function m7c(){return '('+this.a+','+this.b+')'};_.a=0;_.b=0;var m1=mdb(pne,'KVector',8);bcb(74,68,{3:1,4:1,20:1,28:1,52:1,14:1,68:1,15:1,74:1,414:1},s7c,t7c,u7c);_.Pc=function x7c(){return r7c(this)};_.Jf=function v7c(b){var c,d,e,f,g,h;e=mfb(b,',|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n');Osb(this);try{d=0;g=0;f=0;h=0;while(d0){g%2==0?(f=Hcb(e[d])):(h=Hcb(e[d]));g>0&&g%2!=0&&Dsb(this,new f7c(f,h));++g}++d}}catch(a){a=ubb(a);if(JD(a,127)){c=a;throw vbb(new Wdb('The given string does not match the expected format for vectors.'+c))}else throw vbb(a)}};_.Ib=function y7c(){var a,b,c;a=new Wfb('(');b=Jsb(this,0);while(b.b!=b.d.c){c=BD(Xsb(b),8);Qfb(a,c.a+','+c.b);b.b!=b.d.c&&(a.a+='; ',a)}return (a.a+=')',a).a};var l1=mdb(pne,'KVectorChain',74);bcb(248,22,{3:1,35:1,22:1,248:1},G7c);var z7c,A7c,B7c,C7c,D7c,E7c;var o1=ndb(ose,'Alignment',248,CI,I7c,H7c);var J7c;bcb(979,1,ale,Z7c);_.Qe=function $7c(a){Y7c(a)};var L7c,M7c,N7c,O7c,P7c,Q7c,R7c,S7c,T7c,U7c,V7c,W7c;var q1=mdb(ose,'BoxLayouterOptions',979);bcb(980,1,{},_7c);_.$e=function a8c(){var a;return a=new ged,a};_._e=function b8c(a){};var p1=mdb(ose,'BoxLayouterOptions/BoxFactory',980);bcb(291,22,{3:1,35:1,22:1,291:1},j8c);var c8c,d8c,e8c,f8c,g8c,h8c;var r1=ndb(ose,'ContentAlignment',291,CI,l8c,k8c);var m8c;bcb(684,1,ale,Z9c);_.Qe=function $9c(a){t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,sse),''),'Layout Algorithm'),'Select a specific layout algorithm.'),(_5c(),Z5c)),ZI),pqb((N5c(),L5c)))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,tse),''),'Resolved Layout Algorithm'),'Meta data associated with the selected algorithm.'),Y5c),E0),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,$pe),''),'Alignment'),'Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm.'),q8c),V5c),o1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,_le),''),'Aspect Ratio'),'The desired aspect ratio of the drawing, that is the quotient of width by height.'),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,use),''),'Bend Points'),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),Y5c),l1),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,lqe),''),'Content Alignment'),'Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option.'),x8c),W5c),r1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Zpe),''),'Debug Mode'),'Whether additional debug information shall be generated.'),(Bcb(),false)),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,cqe),''),Cle),'Overall direction of edges: horizontal (right / left) or vertical (down / up).'),A8c),V5c),t1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ype),''),'Edge Routing'),'What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline.'),F8c),V5c),v1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Jre),''),'Expand Nodes'),'If active, nodes are expanded to fill the area of their parent.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,tpe),''),'Hierarchy Handling'),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),K8c),V5c),z1),qqb(L5c,OC(GC(e1,1),Kie,175,0,[K5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,ame),''),'Padding'),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),g9c),Y5c),j1),qqb(L5c,OC(GC(e1,1),Kie,175,0,[K5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ame),''),'Interactive'),'Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,xqe),''),'interactive Layout'),'Whether the graph should be changeable interactively and by setting constraints'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Dme),''),'Omit Node Micro Layout'),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Bme),''),'Port Constraints'),'Defines constraints of the position of the ports of a node.'),u9c),V5c),D1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,uqe),''),'Position'),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),Y5c),m1),qqb(K5c,OC(GC(e1,1),Kie,175,0,[M5c,J5c])))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,vme),''),'Priority'),'Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used.'),X5c),JI),qqb(K5c,OC(GC(e1,1),Kie,175,0,[I5c])))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,yme),''),'Randomization Seed'),'Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time).'),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,zme),''),'Separate Connected Components'),'Whether each connected component should be processed separately.'),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,mqe),''),'Junction Points'),'This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order.'),R8c),Y5c),l1),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,pqe),''),'Comment Box'),'Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related.'),false),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,qqe),''),'Hypernode'),'Whether the node should be handled as a hypernode.'),false),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,vse),''),'Label Manager'),"Label managers can shorten labels upon a layout algorithm's request."),Y5c),h1),qqb(L5c,OC(GC(e1,1),Kie,175,0,[J5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,vqe),''),'Margins'),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),T8c),Y5c),i1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Xpe),''),'No Layout'),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),false),T5c),wI),qqb(K5c,OC(GC(e1,1),Kie,175,0,[I5c,M5c,J5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,wse),''),'Scale Factor'),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),U5c),BI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,xse),''),'Animate'),'Whether the shift from the old layout to the new computed layout shall be animated.'),true),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,yse),''),'Animation Time Factor'),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),meb(100)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,zse),''),'Layout Ancestors'),'Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ase),''),'Maximal Animation Time'),'The maximal time for animations, in milliseconds.'),meb(4000)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Bse),''),'Minimal Animation Time'),'The minimal time for animations, in milliseconds.'),meb(400)),X5c),JI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Cse),''),'Progress Bar'),'Whether a progress bar shall be displayed during layout computations.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Dse),''),'Validate Graph'),'Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ese),''),'Validate Options'),'Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user.'),true),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Fse),''),'Zoom to Fit'),'Whether the zoom level shall be set to view the whole diagram after layout.'),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,rse),'box'),'Box Layout Mode'),'Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better.'),u8c),V5c),O1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Lpe),zpe),'Comment Comment Spacing'),'Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing.'),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Mpe),zpe),'Comment Node Spacing'),'Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing.'),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Zle),zpe),'Components Spacing'),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Npe),zpe),'Edge Spacing'),'Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines.'),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,xme),zpe),'Edge Label Spacing'),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ope),zpe),'Edge Node Spacing'),'Spacing to be preserved between nodes and edges.'),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ppe),zpe),'Label Spacing'),'Determines the amount of space to be left between two labels of the same graph element.'),0),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Spe),zpe),'Label Node Spacing'),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Qpe),zpe),'Horizontal spacing between Label and Port'),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Rpe),zpe),'Vertical spacing between Label and Port'),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,wme),zpe),'Node Spacing'),'The minimal distance to be preserved between each two nodes.'),20),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Tpe),zpe),'Node Self Loop Spacing'),'Spacing to be preserved between a node and its self loops.'),10),U5c),BI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Upe),zpe),'Port Spacing'),'Spacing between pairs of ports of the same node.'),10),U5c),BI),qqb(L5c,OC(GC(e1,1),Kie,175,0,[K5c])))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Vpe),zpe),'Individual Spacing'),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),Y5c),i2),qqb(K5c,OC(GC(e1,1),Kie,175,0,[I5c,M5c,J5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,wqe),zpe),'Additional Port Space'),'Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border.'),W9c),Y5c),i1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,tqe),Jse),'Layout Partition'),'Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction).'),X5c),JI),qqb(L5c,OC(GC(e1,1),Kie,175,0,[K5c])))));o4c(a,tqe,sqe,k9c);t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,sqe),Jse),'Layout Partitioning'),'Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle.'),i9c),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,dqe),Kse),'Node Label Padding'),'Define padding for node labels that are placed inside of a node.'),V8c),Y5c),j1),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Gme),Kse),'Node Label Placement'),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),X8c),W5c),B1),qqb(K5c,OC(GC(e1,1),Kie,175,0,[J5c])))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,gqe),Lse),'Port Alignment'),'Defines the default port distribution for a node. May be overridden for each side individually.'),m9c),V5c),C1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,hqe),Lse),'Port Alignment (North)'),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),V5c),C1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,iqe),Lse),'Port Alignment (South)'),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),V5c),C1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,jqe),Lse),'Port Alignment (West)'),"Defines how ports on the western side are placed, overriding the node's general port alignment."),V5c),C1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,kqe),Lse),'Port Alignment (East)'),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),V5c),C1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Fme),Mse),'Node Size Constraints'),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),Z8c),W5c),I1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Eme),Mse),'Node Size Options'),'Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications.'),c9c),W5c),J1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Tme),Mse),'Node Size Minimum'),'The minimal size to which a node can be reduced.'),a9c),Y5c),m1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,bqe),Mse),'Fixed Graph Size'),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),false),T5c),wI),pqb(L5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,nqe),Jpe),'Edge Label Placement'),'Gives a hint on where to put edge labels.'),D8c),V5c),u1),pqb(J5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Cme),Jpe),'Inline Edge Labels'),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),false),T5c),wI),pqb(J5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Gse),'font'),'Font Name'),'Font name used for a label.'),Z5c),ZI),pqb(J5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Hse),'font'),'Font Size'),'Font size used for a label.'),X5c),JI),pqb(J5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,rqe),Nse),'Port Anchor Offset'),'The offset to the port position where connections shall be attached.'),Y5c),m1),pqb(M5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,oqe),Nse),'Port Index'),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),X5c),JI),pqb(M5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ype),Nse),'Port Side'),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),B9c),V5c),F1),pqb(M5c))));t4c(a,new p5c(F5c(E5c(G5c(z5c(D5c(A5c(B5c(new H5c,Wpe),Nse),'Port Border Offset'),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),U5c),BI),pqb(M5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Hme),Ose),'Port Label Placement'),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),y9c),W5c),E1),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,eqe),Ose),'Port Labels Next to Port'),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),false),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,fqe),Ose),'Treat Port Labels as Group'),'If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port.'),true),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,_pe),Pse),'Activate Inside Self Loops'),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),false),T5c),wI),pqb(K5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,aqe),Pse),'Inside Self Loop'),'Whether a self loop should be routed inside a node instead of around that node.'),false),T5c),wI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,$le),'edge'),'Edge Thickness'),'The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it.'),1),U5c),BI),pqb(I5c))));t4c(a,new p5c(F5c(E5c(G5c(y5c(z5c(D5c(A5c(B5c(new H5c,Ise),'edge'),'Edge Type'),'The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations.'),H8c),V5c),w1),pqb(I5c))));s4c(a,new W3c(b4c(d4c(c4c(new e4c,sne),'Layered'),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,'org.eclipse.elk.orthogonal'),'Orthogonal'),'Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia \'86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,ume),'Force'),'Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,'org.eclipse.elk.circle'),'Circle'),'Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,bre),'Tree'),'Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,'org.eclipse.elk.planar'),'Planar'),'Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable.')));s4c(a,new W3c(b4c(d4c(c4c(new e4c,sre),'Radial'),'Radial layout algorithms usually position the nodes of the graph on concentric circles.')));$ad((new _ad,a));Y7c((new Z7c,a));jdd((new kdd,a))};var o8c,p8c,q8c,r8c,s8c,t8c,u8c,v8c,w8c,x8c,y8c,z8c,A8c,B8c,C8c,D8c,E8c,F8c,G8c,H8c,I8c,J8c,K8c,L8c,M8c,N8c,O8c,P8c,Q8c,R8c,S8c,T8c,U8c,V8c,W8c,X8c,Y8c,Z8c,$8c,_8c,a9c,b9c,c9c,d9c,e9c,f9c,g9c,h9c,i9c,j9c,k9c,l9c,m9c,n9c,o9c,p9c,q9c,r9c,s9c,t9c,u9c,v9c,w9c,x9c,y9c,z9c,A9c,B9c,C9c,D9c,E9c,F9c,G9c,H9c,I9c,J9c,K9c,L9c,M9c,N9c,O9c,P9c,Q9c,R9c,S9c,T9c,U9c,V9c,W9c,X9c;var s1=mdb(ose,'CoreOptions',684);bcb(103,22,{3:1,35:1,22:1,103:1},iad);var _9c,aad,bad,cad,dad;var t1=ndb(ose,Cle,103,CI,kad,jad);var lad;bcb(272,22,{3:1,35:1,22:1,272:1},rad);var nad,oad,pad;var u1=ndb(ose,'EdgeLabelPlacement',272,CI,tad,sad);var uad;bcb(218,22,{3:1,35:1,22:1,218:1},Bad);var wad,xad,yad,zad;var v1=ndb(ose,'EdgeRouting',218,CI,Dad,Cad);var Ead;bcb(312,22,{3:1,35:1,22:1,312:1},Nad);var Gad,Had,Iad,Jad,Kad,Lad;var w1=ndb(ose,'EdgeType',312,CI,Pad,Oad);var Qad;bcb(977,1,ale,_ad);_.Qe=function abd(a){$ad(a)};var Sad,Tad,Uad,Vad,Wad,Xad,Yad;var y1=mdb(ose,'FixedLayouterOptions',977);bcb(978,1,{},bbd);_.$e=function cbd(){var a;return a=new Zfd,a};_._e=function dbd(a){};var x1=mdb(ose,'FixedLayouterOptions/FixedFactory',978);bcb(334,22,{3:1,35:1,22:1,334:1},ibd);var ebd,fbd,gbd;var z1=ndb(ose,'HierarchyHandling',334,CI,kbd,jbd);var lbd;bcb(285,22,{3:1,35:1,22:1,285:1},tbd);var nbd,obd,pbd,qbd;var A1=ndb(ose,'LabelSide',285,CI,vbd,ubd);var wbd;bcb(93,22,{3:1,35:1,22:1,93:1},Ibd);var ybd,zbd,Abd,Bbd,Cbd,Dbd,Ebd,Fbd,Gbd;var B1=ndb(ose,'NodeLabelPlacement',93,CI,Lbd,Kbd);var Mbd;bcb(249,22,{3:1,35:1,22:1,249:1},Ubd);var Obd,Pbd,Qbd,Rbd,Sbd;var C1=ndb(ose,'PortAlignment',249,CI,Wbd,Vbd);var Xbd;bcb(98,22,{3:1,35:1,22:1,98:1},gcd);var Zbd,$bd,_bd,acd,bcd,ccd;var D1=ndb(ose,'PortConstraints',98,CI,icd,hcd);var jcd;bcb(273,22,{3:1,35:1,22:1,273:1},scd);var lcd,mcd,ncd,ocd,pcd,qcd;var E1=ndb(ose,'PortLabelPlacement',273,CI,wcd,vcd);var xcd;bcb(61,22,{3:1,35:1,22:1,61:1},Ycd);var zcd,Acd,Bcd,Ccd,Dcd,Ecd,Fcd,Gcd,Hcd,Icd,Jcd,Kcd,Lcd,Mcd,Ncd,Ocd,Pcd,Qcd,Rcd,Scd,Tcd;var F1=ndb(ose,'PortSide',61,CI,_cd,$cd);var bdd;bcb(981,1,ale,kdd);_.Qe=function ldd(a){jdd(a)};var ddd,edd,fdd,gdd,hdd;var H1=mdb(ose,'RandomLayouterOptions',981);bcb(982,1,{},mdd);_.$e=function ndd(){var a;return a=new Mgd,a};_._e=function odd(a){};var G1=mdb(ose,'RandomLayouterOptions/RandomFactory',982);bcb(374,22,{3:1,35:1,22:1,374:1},udd);var pdd,qdd,rdd,sdd;var I1=ndb(ose,'SizeConstraint',374,CI,wdd,vdd);var xdd;bcb(259,22,{3:1,35:1,22:1,259:1},Jdd);var zdd,Add,Bdd,Cdd,Ddd,Edd,Fdd,Gdd,Hdd;var J1=ndb(ose,'SizeOptions',259,CI,Ldd,Kdd);var Mdd;bcb(370,1,{1949:1},Zdd);_.b=false;_.c=0;_.d=-1;_.e=null;_.f=null;_.g=-1;_.j=false;_.k=false;_.n=false;_.o=0;_.q=0;_.r=0;var L1=mdb(yqe,'BasicProgressMonitor',370);bcb(972,209,Mle,ged);_.Ze=function ked(a,b){var c,d,e,f,g,h,i,j,k;Odd(b,'Box layout',2);e=Gdb(ED(hkd(a,(X7c(),W7c))));f=BD(hkd(a,T7c),116);c=Ccb(DD(hkd(a,O7c)));d=Ccb(DD(hkd(a,P7c)));switch(BD(hkd(a,M7c),311).g){case 0:g=(h=new Tkb((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a)),mmb(),Okb(h,new med(d)),h);i=rfd(a);j=ED(hkd(a,L7c));(j==null||(uCb(j),j)<=0)&&(j=1.3);k=ded(g,e,f,i.a,i.b,c,(uCb(j),j));Afd(a,k.a,k.b,false,true);break;default:eed(a,e,f,c);}Qdd(b)};var S1=mdb(yqe,'BoxLayoutProvider',972);bcb(973,1,Dke,med);_.ue=function ned(a,b){return led(this,BD(a,33),BD(b,33))};_.Fb=function oed(a){return this===a};_.ve=function ped(){return new tpb(this)};_.a=false;var M1=mdb(yqe,'BoxLayoutProvider/1',973);bcb(157,1,{157:1},wed,xed);_.Ib=function yed(){return this.c?_od(this.c):Fe(this.b)};var N1=mdb(yqe,'BoxLayoutProvider/Group',157);bcb(311,22,{3:1,35:1,22:1,311:1},Eed);var zed,Aed,Bed,Ced;var O1=ndb(yqe,'BoxLayoutProvider/PackingMode',311,CI,Ged,Fed);var Hed;bcb(974,1,Dke,Jed);_.ue=function Ked(a,b){return hed(BD(a,157),BD(b,157))};_.Fb=function Led(a){return this===a};_.ve=function Med(){return new tpb(this)};var P1=mdb(yqe,'BoxLayoutProvider/lambda$0$Type',974);bcb(975,1,Dke,Ned);_.ue=function Oed(a,b){return ied(BD(a,157),BD(b,157))};_.Fb=function Ped(a){return this===a};_.ve=function Qed(){return new tpb(this)};var Q1=mdb(yqe,'BoxLayoutProvider/lambda$1$Type',975);bcb(976,1,Dke,Red);_.ue=function Sed(a,b){return jed(BD(a,157),BD(b,157))};_.Fb=function Ted(a){return this===a};_.ve=function Ued(){return new tpb(this)};var R1=mdb(yqe,'BoxLayoutProvider/lambda$2$Type',976);bcb(1365,1,{831:1},Ved);_.qg=function Wed(a,b){return Vyc(),!JD(b,160)||h2c((Y1c(),X1c,BD(a,160)),b)};var T1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type',1365);bcb(1366,1,qie,Xed);_.td=function Yed(a){Yyc(this.a,BD(a,146))};var U1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type',1366);bcb(1367,1,qie,Zed);_.td=function $ed(a){BD(a,94);Vyc()};var V1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type',1367);bcb(1371,1,qie,_ed);_.td=function afd(a){Zyc(this.a,BD(a,94))};var W1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type',1371);bcb(1369,1,Oie,bfd);_.Mb=function cfd(a){return $yc(this.a,this.b,BD(a,146))};var X1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type',1369);bcb(1368,1,Oie,dfd);_.Mb=function efd(a){return azc(this.a,this.b,BD(a,831))};var Y1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type',1368);bcb(1370,1,qie,ffd);_.td=function gfd(a){_yc(this.a,this.b,BD(a,146))};var Z1=mdb(yqe,'ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type',1370);bcb(935,1,{},Hfd);_.Kb=function Ifd(a){return Gfd(a)};_.Fb=function Jfd(a){return this===a};var _1=mdb(yqe,'ElkUtil/lambda$0$Type',935);bcb(936,1,qie,Kfd);_.td=function Lfd(a){ufd(this.a,this.b,BD(a,79))};_.a=0;_.b=0;var a2=mdb(yqe,'ElkUtil/lambda$1$Type',936);bcb(937,1,qie,Mfd);_.td=function Nfd(a){vfd(this.a,this.b,BD(a,202))};_.a=0;_.b=0;var b2=mdb(yqe,'ElkUtil/lambda$2$Type',937);bcb(938,1,qie,Ofd);_.td=function Pfd(a){wfd(this.a,this.b,BD(a,137))};_.a=0;_.b=0;var c2=mdb(yqe,'ElkUtil/lambda$3$Type',938);bcb(939,1,qie,Qfd);_.td=function Rfd(a){xfd(this.a,BD(a,469))};var d2=mdb(yqe,'ElkUtil/lambda$4$Type',939);bcb(342,1,{35:1,342:1},Tfd);_.wd=function Ufd(a){return Sfd(this,BD(a,236))};_.Fb=function Vfd(a){var b;if(JD(a,342)){b=BD(a,342);return this.a==b.a}return false};_.Hb=function Wfd(){return QD(this.a)};_.Ib=function Xfd(){return this.a+' (exclusive)'};_.a=0;var e2=mdb(yqe,'ExclusiveBounds/ExclusiveLowerBound',342);bcb(1138,209,Mle,Zfd);_.Ze=function $fd(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,A,B;Odd(b,'Fixed Layout',1);f=BD(hkd(a,(Y9c(),E8c)),218);l=0;m=0;for(s=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));s.e!=s.i.gc();){q=BD(Dyd(s),33);B=BD(hkd(q,(Zad(),Yad)),8);if(B){bld(q,B.a,B.b);if(BD(hkd(q,Tad),174).Hc((tdd(),pdd))){n=BD(hkd(q,Vad),8);n.a>0&&n.b>0&&Afd(q,n.a,n.b,true,true)}}l=$wnd.Math.max(l,q.i+q.g);m=$wnd.Math.max(m,q.j+q.f);for(j=new Fyd((!q.n&&(q.n=new cUd(D2,q,1,7)),q.n));j.e!=j.i.gc();){h=BD(Dyd(j),137);B=BD(hkd(h,Yad),8);!!B&&bld(h,B.a,B.b);l=$wnd.Math.max(l,q.i+h.i+h.g);m=$wnd.Math.max(m,q.j+h.j+h.f)}for(v=new Fyd((!q.c&&(q.c=new cUd(F2,q,9,9)),q.c));v.e!=v.i.gc();){u=BD(Dyd(v),118);B=BD(hkd(u,Yad),8);!!B&&bld(u,B.a,B.b);w=q.i+u.i;A=q.j+u.j;l=$wnd.Math.max(l,w+u.g);m=$wnd.Math.max(m,A+u.f);for(i=new Fyd((!u.n&&(u.n=new cUd(D2,u,1,7)),u.n));i.e!=i.i.gc();){h=BD(Dyd(i),137);B=BD(hkd(h,Yad),8);!!B&&bld(h,B.a,B.b);l=$wnd.Math.max(l,w+h.i+h.g);m=$wnd.Math.max(m,A+h.j+h.f)}}for(e=new Sr(ur(_sd(q).a.Kc(),new Sq));Qr(e);){c=BD(Rr(e),79);k=Yfd(c);l=$wnd.Math.max(l,k.a);m=$wnd.Math.max(m,k.b)}for(d=new Sr(ur($sd(q).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),79);if(Xod(jtd(c))!=a){k=Yfd(c);l=$wnd.Math.max(l,k.a);m=$wnd.Math.max(m,k.b)}}}if(f==(Aad(),wad)){for(r=new Fyd((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a));r.e!=r.i.gc();){q=BD(Dyd(r),33);for(d=new Sr(ur(_sd(q).a.Kc(),new Sq));Qr(d);){c=BD(Rr(d),79);g=pfd(c);g.b==0?jkd(c,Q8c,null):jkd(c,Q8c,g)}}}if(!Ccb(DD(hkd(a,(Zad(),Uad))))){t=BD(hkd(a,Wad),116);p=l+t.b+t.c;o=m+t.d+t.a;Afd(a,p,o,true,true)}Qdd(b)};var f2=mdb(yqe,'FixedLayoutProvider',1138);bcb(373,134,{3:1,414:1,373:1,94:1,134:1},_fd,agd);_.Jf=function dgd(b){var c,d,e,f,g,h,i,j,k;if(!b){return}try{j=mfb(b,';,;');for(g=j,h=0,i=g.length;h>16&aje|b^d<<16};_.Kc=function zgd(){return new Bgd(this)};_.Ib=function Agd(){return this.a==null&&this.b==null?'pair(null,null)':this.a==null?'pair(null,'+fcb(this.b)+')':this.b==null?'pair('+fcb(this.a)+',null)':'pair('+fcb(this.a)+','+fcb(this.b)+')'};var n2=mdb(yqe,'Pair',46);bcb(983,1,aie,Bgd);_.Nb=function Cgd(a){Rrb(this,a)};_.Ob=function Dgd(){return !this.c&&(!this.b&&this.a.a!=null||this.a.b!=null)};_.Pb=function Egd(){if(!this.c&&!this.b&&this.a.a!=null){this.b=true;return this.a.a}else if(!this.c&&this.a.b!=null){this.c=true;return this.a.b}throw vbb(new utb)};_.Qb=function Fgd(){this.c&&this.a.b!=null?(this.a.b=null):this.b&&this.a.a!=null&&(this.a.a=null);throw vbb(new Ydb)};_.b=false;_.c=false;var m2=mdb(yqe,'Pair/1',983);bcb(448,1,{448:1},Ggd);_.Fb=function Hgd(a){return wtb(this.a,BD(a,448).a)&&wtb(this.c,BD(a,448).c)&&wtb(this.d,BD(a,448).d)&&wtb(this.b,BD(a,448).b)};_.Hb=function Igd(){return Hlb(OC(GC(SI,1),Uhe,1,5,[this.a,this.c,this.d,this.b]))};_.Ib=function Jgd(){return '('+this.a+She+this.c+She+this.d+She+this.b+')'};var o2=mdb(yqe,'Quadruple',448);bcb(1126,209,Mle,Mgd);_.Ze=function Ngd(a,b){var c,d,e,f,g;Odd(b,'Random Layout',1);if((!a.a&&(a.a=new cUd(E2,a,10,11)),a.a).i==0){Qdd(b);return}f=BD(hkd(a,(idd(),gdd)),19);!!f&&f.a!=0?(e=new Hub(f.a)):(e=new Gub);c=Gdb(ED(hkd(a,ddd)));g=Gdb(ED(hkd(a,hdd)));d=BD(hkd(a,edd),116);Lgd(a,e,c,g,d);Qdd(b)};var p2=mdb(yqe,'RandomLayoutProvider',1126);var Ogd;bcb(553,1,{});_.qf=function Sgd(){return new f7c(this.f.i,this.f.j)};_.We=function Tgd(a){if(Jsd(a,(Y9c(),s9c))){return hkd(this.f,Qgd)}return hkd(this.f,a)};_.rf=function Ugd(){return new f7c(this.f.g,this.f.f)};_.sf=function Vgd(){return this.g};_.Xe=function Wgd(a){return ikd(this.f,a)};_.tf=function Xgd(a){dld(this.f,a.a);eld(this.f,a.b)};_.uf=function Ygd(a){cld(this.f,a.a);ald(this.f,a.b)};_.vf=function Zgd(a){this.g=a};_.g=0;var Qgd;var q2=mdb(Use,'ElkGraphAdapters/AbstractElkGraphElementAdapter',553);bcb(554,1,{839:1},$gd);_.wf=function _gd(){var a,b;if(!this.b){this.b=Qu(Kkd(this.a).i);for(b=new Fyd(Kkd(this.a));b.e!=b.i.gc();){a=BD(Dyd(b),137);Ekb(this.b,new dhd(a))}}return this.b};_.b=null;var r2=mdb(Use,'ElkGraphAdapters/ElkEdgeAdapter',554);bcb(301,553,{},bhd);_.xf=function chd(){return ahd(this)};_.a=null;var s2=mdb(Use,'ElkGraphAdapters/ElkGraphAdapter',301);bcb(630,553,{181:1},dhd);var t2=mdb(Use,'ElkGraphAdapters/ElkLabelAdapter',630);bcb(629,553,{680:1},hhd);_.wf=function khd(){return ehd(this)};_.Af=function lhd(){var a;return a=BD(hkd(this.f,(Y9c(),S8c)),142),!a&&(a=new H_b),a};_.Cf=function nhd(){return fhd(this)};_.Ef=function phd(a){var b;b=new K_b(a);jkd(this.f,(Y9c(),S8c),b)};_.Ff=function qhd(a){jkd(this.f,(Y9c(),f9c),new r0b(a))};_.yf=function ihd(){return this.d};_.zf=function jhd(){var a,b;if(!this.a){this.a=new Rkb;for(b=new Sr(ur($sd(BD(this.f,33)).a.Kc(),new Sq));Qr(b);){a=BD(Rr(b),79);Ekb(this.a,new $gd(a))}}return this.a};_.Bf=function mhd(){var a,b;if(!this.c){this.c=new Rkb;for(b=new Sr(ur(_sd(BD(this.f,33)).a.Kc(),new Sq));Qr(b);){a=BD(Rr(b),79);Ekb(this.c,new $gd(a))}}return this.c};_.Df=function ohd(){return Vod(BD(this.f,33)).i!=0||Ccb(DD(BD(this.f,33).We((Y9c(),M8c))))};_.Gf=function rhd(){ghd(this,(Pgd(),Ogd))};_.a=null;_.b=null;_.c=null;_.d=null;_.e=null;var u2=mdb(Use,'ElkGraphAdapters/ElkNodeAdapter',629);bcb(1266,553,{838:1},thd);_.wf=function vhd(){return shd(this)};_.zf=function uhd(){var a,b;if(!this.a){this.a=Pu(BD(this.f,118).xg().i);for(b=new Fyd(BD(this.f,118).xg());b.e!=b.i.gc();){a=BD(Dyd(b),79);Ekb(this.a,new $gd(a))}}return this.a};_.Bf=function whd(){var a,b;if(!this.c){this.c=Pu(BD(this.f,118).yg().i);for(b=new Fyd(BD(this.f,118).yg());b.e!=b.i.gc();){a=BD(Dyd(b),79);Ekb(this.c,new $gd(a))}}return this.c};_.Hf=function xhd(){return BD(BD(this.f,118).We((Y9c(),A9c)),61)};_.If=function yhd(){var a,b,c,d,e,f,g,h;d=mpd(BD(this.f,118));for(c=new Fyd(BD(this.f,118).yg());c.e!=c.i.gc();){a=BD(Dyd(c),79);for(h=new Fyd((!a.c&&(a.c=new y5d(z2,a,5,8)),a.c));h.e!=h.i.gc();){g=BD(Dyd(h),82);if(ntd(atd(g),d)){return true}else if(atd(g)==d&&Ccb(DD(hkd(a,(Y9c(),N8c))))){return true}}}for(b=new Fyd(BD(this.f,118).xg());b.e!=b.i.gc();){a=BD(Dyd(b),79);for(f=new Fyd((!a.b&&(a.b=new y5d(z2,a,4,7)),a.b));f.e!=f.i.gc();){e=BD(Dyd(f),82);if(ntd(atd(e),d)){return true}}}return false};_.a=null;_.b=null;_.c=null;var v2=mdb(Use,'ElkGraphAdapters/ElkPortAdapter',1266);bcb(1267,1,Dke,Ahd);_.ue=function Bhd(a,b){return zhd(BD(a,118),BD(b,118))};_.Fb=function Chd(a){return this===a};_.ve=function Dhd(){return new tpb(this)};var w2=mdb(Use,'ElkGraphAdapters/PortComparator',1267);var m5=odb(Vse,'EObject');var x2=odb(Wse,Xse);var y2=odb(Wse,Yse);var C2=odb(Wse,Zse);var G2=odb(Wse,'ElkShape');var z2=odb(Wse,$se);var B2=odb(Wse,_se);var A2=odb(Wse,ate);var k5=odb(Vse,bte);var i5=odb(Vse,'EFactory');var Ehd;var l5=odb(Vse,cte);var o5=odb(Vse,'EPackage');var Ghd;var Ihd,Jhd,Khd,Lhd,Mhd,Nhd,Ohd,Phd,Qhd,Rhd,Shd;var D2=odb(Wse,dte);var E2=odb(Wse,ete);var F2=odb(Wse,fte);bcb(90,1,gte);_.Jg=function Vhd(){this.Kg();return null};_.Kg=function Whd(){return null};_.Lg=function Xhd(){return this.Kg(),false};_.Mg=function Yhd(){return false};_.Ng=function Zhd(a){Uhd(this,a)};var b4=mdb(hte,'BasicNotifierImpl',90);bcb(97,90,pte);_.nh=function fjd(){return oid(this)};_.Og=function Fid(a,b){return a};_.Pg=function Gid(){throw vbb(new bgb)};_.Qg=function Hid(a){var b;return b=zUd(BD(XKd(this.Tg(),this.Vg()),18)),this.eh().ih(this,b.n,b.f,a)};_.Rg=function Iid(a,b){throw vbb(new bgb)};_.Sg=function Jid(a,b,c){return _hd(this,a,b,c)};_.Tg=function Kid(){var a;if(this.Pg()){a=this.Pg().ck();if(a){return a}}return this.zh()};_.Ug=function Lid(){return aid(this)};_.Vg=function Mid(){throw vbb(new bgb)};_.Wg=function Oid(){var a,b;b=this.ph().dk();!b&&this.Pg().ik(b=(nRd(),a=pNd(TKd(this.Tg())),a==null?mRd:new qRd(this,a)));return b};_.Xg=function Qid(a,b){return a};_.Yg=function Rid(a){var b;b=a.Gj();return !b?bLd(this.Tg(),a):a.aj()};_.Zg=function Sid(){var a;a=this.Pg();return !a?null:a.fk()};_.$g=function Tid(){return !this.Pg()?null:this.Pg().ck()};_._g=function Uid(a,b,c){return fid(this,a,b,c)};_.ah=function Vid(a){return gid(this,a)};_.bh=function Wid(a,b){return hid(this,a,b)};_.dh=function Xid(){var a;a=this.Pg();return !!a&&a.gk()};_.eh=function Yid(){throw vbb(new bgb)};_.fh=function Zid(){return jid(this)};_.gh=function $id(a,b,c,d){return kid(this,a,b,d)};_.hh=function _id(a,b,c){var d;return d=BD(XKd(this.Tg(),b),66),d.Nj().Qj(this,this.yh(),b-this.Ah(),a,c)};_.ih=function ajd(a,b,c,d){return lid(this,a,b,d)};_.jh=function bjd(a,b,c){var d;return d=BD(XKd(this.Tg(),b),66),d.Nj().Rj(this,this.yh(),b-this.Ah(),a,c)};_.kh=function cjd(){return !!this.Pg()&&!!this.Pg().ek()};_.lh=function djd(a){return mid(this,a)};_.mh=function ejd(a){return nid(this,a)};_.oh=function gjd(a){return rid(this,a)};_.ph=function hjd(){throw vbb(new bgb)};_.qh=function ijd(){return !this.Pg()?null:this.Pg().ek()};_.rh=function jjd(){return jid(this)};_.sh=function kjd(a,b){yid(this,a,b)};_.th=function ljd(a){this.ph().hk(a)};_.uh=function mjd(a){this.ph().kk(a)};_.vh=function njd(a){this.ph().jk(a)};_.wh=function ojd(a,b){var c,d,e,f;f=this.Zg();if(!!f&&!!a){b=Txd(f.Vk(),this,b);f.Zk(this)}d=this.eh();if(d){if((Nid(this,this.eh(),this.Vg()).Bb&Tje)!=0){e=d.fh();!!e&&(!a?e.Yk(this):!f&&e.Zk(this))}else{b=(c=this.Vg(),c>=0?this.Qg(b):this.eh().ih(this,-1-c,null,b));b=this.Sg(null,-1,b)}}this.uh(a);return b};_.xh=function pjd(a){var b,c,d,e,f,g,h,i;c=this.Tg();f=bLd(c,a);b=this.Ah();if(f>=b){return BD(a,66).Nj().Uj(this,this.yh(),f-b)}else if(f<=-1){g=e1d((O6d(),M6d),c,a);if(g){Q6d();BD(g,66).Oj()||(g=_1d(q1d(M6d,g)));e=(d=this.Yg(g),BD(d>=0?this._g(d,true,true):sid(this,g,true),153));i=g.Zj();if(i>1||i==-1){return BD(BD(e,215).hl(a,false),76)}}else{throw vbb(new Wdb(ite+a.ne()+lte))}}else if(a.$j()){return d=this.Yg(a),BD(d>=0?this._g(d,false,true):sid(this,a,false),76)}h=new nGd(this,a);return h};_.yh=function qjd(){return Aid(this)};_.zh=function rjd(){return (NFd(),MFd).S};_.Ah=function sjd(){return aLd(this.zh())};_.Bh=function tjd(a){Cid(this,a)};_.Ib=function ujd(){return Eid(this)};var B5=mdb(qte,'BasicEObjectImpl',97);var zFd;bcb(114,97,{105:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1});_.Ch=function Djd(a){var b;b=xjd(this);return b[a]};_.Dh=function Ejd(a,b){var c;c=xjd(this);NC(c,a,b)};_.Eh=function Fjd(a){var b;b=xjd(this);NC(b,a,null)};_.Jg=function Gjd(){return BD(Ajd(this,4),126)};_.Kg=function Hjd(){throw vbb(new bgb)};_.Lg=function Ijd(){return (this.Db&4)!=0};_.Pg=function Jjd(){throw vbb(new bgb)};_.Fh=function Kjd(a){Cjd(this,2,a)};_.Rg=function Ljd(a,b){this.Db=b<<16|this.Db&255;this.Fh(a)};_.Tg=function Mjd(){return wjd(this)};_.Vg=function Njd(){return this.Db>>16};_.Wg=function Ojd(){var a,b;return nRd(),b=pNd(TKd((a=BD(Ajd(this,16),26),!a?this.zh():a))),b==null?(null,mRd):new qRd(this,b)};_.Mg=function Pjd(){return (this.Db&1)==0};_.Zg=function Qjd(){return BD(Ajd(this,128),1935)};_.$g=function Rjd(){return BD(Ajd(this,16),26)};_.dh=function Sjd(){return (this.Db&32)!=0};_.eh=function Tjd(){return BD(Ajd(this,2),49)};_.kh=function Ujd(){return (this.Db&64)!=0};_.ph=function Vjd(){throw vbb(new bgb)};_.qh=function Wjd(){return BD(Ajd(this,64),281)};_.th=function Xjd(a){Cjd(this,16,a)};_.uh=function Yjd(a){Cjd(this,128,a)};_.vh=function Zjd(a){Cjd(this,64,a)};_.yh=function $jd(){return yjd(this)};_.Db=0;var s8=mdb(qte,'MinimalEObjectImpl',114);bcb(115,114,{105:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1});_.Fh=function _jd(a){this.Cb=a};_.eh=function akd(){return this.Cb};var r8=mdb(qte,'MinimalEObjectImpl/Container',115);bcb(1985,115,{105:1,413:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1});_._g=function kkd(a,b,c){return bkd(this,a,b,c)};_.jh=function lkd(a,b,c){return ckd(this,a,b,c)};_.lh=function mkd(a){return dkd(this,a)};_.sh=function nkd(a,b){ekd(this,a,b)};_.zh=function okd(){return Thd(),Shd};_.Bh=function pkd(a){fkd(this,a)};_.Ve=function qkd(){return gkd(this)};_.We=function rkd(a){return hkd(this,a)};_.Xe=function skd(a){return ikd(this,a)};_.Ye=function tkd(a,b){return jkd(this,a,b)};var H2=mdb(rte,'EMapPropertyHolderImpl',1985);bcb(567,115,{105:1,469:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},xkd);_._g=function ykd(a,b,c){switch(a){case 0:return this.a;case 1:return this.b;}return fid(this,a,b,c)};_.lh=function zkd(a){switch(a){case 0:return this.a!=0;case 1:return this.b!=0;}return mid(this,a)};_.sh=function Akd(a,b){switch(a){case 0:vkd(this,Edb(ED(b)));return;case 1:wkd(this,Edb(ED(b)));return;}yid(this,a,b)};_.zh=function Bkd(){return Thd(),Ihd};_.Bh=function Ckd(a){switch(a){case 0:vkd(this,0);return;case 1:wkd(this,0);return;}Cid(this,a)};_.Ib=function Dkd(){var a;if((this.Db&64)!=0)return Eid(this);a=new Jfb(Eid(this));a.a+=' (x: ';Bfb(a,this.a);a.a+=', y: ';Bfb(a,this.b);a.a+=')';return a.a};_.a=0;_.b=0;var I2=mdb(rte,'ElkBendPointImpl',567);bcb(723,1985,{105:1,413:1,160:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1});_._g=function Nkd(a,b,c){return Ekd(this,a,b,c)};_.hh=function Okd(a,b,c){return Fkd(this,a,b,c)};_.jh=function Pkd(a,b,c){return Gkd(this,a,b,c)};_.lh=function Qkd(a){return Hkd(this,a)};_.sh=function Rkd(a,b){Ikd(this,a,b)};_.zh=function Skd(){return Thd(),Mhd};_.Bh=function Tkd(a){Jkd(this,a)};_.zg=function Ukd(){return this.k};_.Ag=function Vkd(){return Kkd(this)};_.Ib=function Wkd(){return Mkd(this)};_.k=null;var M2=mdb(rte,'ElkGraphElementImpl',723);bcb(724,723,{105:1,413:1,160:1,470:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1});_._g=function gld(a,b,c){return Xkd(this,a,b,c)};_.lh=function hld(a){return Ykd(this,a)};_.sh=function ild(a,b){Zkd(this,a,b)};_.zh=function jld(){return Thd(),Rhd};_.Bh=function kld(a){$kd(this,a)};_.Bg=function lld(){return this.f};_.Cg=function mld(){return this.g};_.Dg=function nld(){return this.i};_.Eg=function old(){return this.j};_.Fg=function pld(a,b){_kd(this,a,b)};_.Gg=function qld(a,b){bld(this,a,b)};_.Hg=function rld(a){dld(this,a)};_.Ig=function sld(a){eld(this,a)};_.Ib=function tld(){return fld(this)};_.f=0;_.g=0;_.i=0;_.j=0;var T2=mdb(rte,'ElkShapeImpl',724);bcb(725,724,{105:1,413:1,82:1,160:1,470:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1});_._g=function Bld(a,b,c){return uld(this,a,b,c)};_.hh=function Cld(a,b,c){return vld(this,a,b,c)};_.jh=function Dld(a,b,c){return wld(this,a,b,c)};_.lh=function Eld(a){return xld(this,a)};_.sh=function Fld(a,b){yld(this,a,b)};_.zh=function Gld(){return Thd(),Jhd};_.Bh=function Hld(a){zld(this,a)};_.xg=function Ild(){return !this.d&&(this.d=new y5d(B2,this,8,5)),this.d};_.yg=function Jld(){return !this.e&&(this.e=new y5d(B2,this,7,4)),this.e};var J2=mdb(rte,'ElkConnectableShapeImpl',725);bcb(352,723,{105:1,413:1,79:1,160:1,352:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},Tld);_.Qg=function Uld(a){return Lld(this,a)};_._g=function Vld(a,b,c){switch(a){case 3:return Mld(this);case 4:return !this.b&&(this.b=new y5d(z2,this,4,7)),this.b;case 5:return !this.c&&(this.c=new y5d(z2,this,5,8)),this.c;case 6:return !this.a&&(this.a=new cUd(A2,this,6,6)),this.a;case 7:return Bcb(),!this.b&&(this.b=new y5d(z2,this,4,7)),this.b.i<=1&&(!this.c&&(this.c=new y5d(z2,this,5,8)),this.c.i<=1)?false:true;case 8:return Bcb(),Pld(this)?true:false;case 9:return Bcb(),Qld(this)?true:false;case 10:return Bcb(),!this.b&&(this.b=new y5d(z2,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new y5d(z2,this,5,8)),this.c.i!=0)?true:false;}return Ekd(this,a,b,c)};_.hh=function Wld(a,b,c){var d;switch(b){case 3:!!this.Cb&&(c=(d=this.Db>>16,d>=0?Lld(this,c):this.Cb.ih(this,-1-d,null,c)));return Kld(this,BD(a,33),c);case 4:return !this.b&&(this.b=new y5d(z2,this,4,7)),Sxd(this.b,a,c);case 5:return !this.c&&(this.c=new y5d(z2,this,5,8)),Sxd(this.c,a,c);case 6:return !this.a&&(this.a=new cUd(A2,this,6,6)),Sxd(this.a,a,c);}return Fkd(this,a,b,c)};_.jh=function Xld(a,b,c){switch(b){case 3:return Kld(this,null,c);case 4:return !this.b&&(this.b=new y5d(z2,this,4,7)),Txd(this.b,a,c);case 5:return !this.c&&(this.c=new y5d(z2,this,5,8)),Txd(this.c,a,c);case 6:return !this.a&&(this.a=new cUd(A2,this,6,6)),Txd(this.a,a,c);}return Gkd(this,a,b,c)};_.lh=function Yld(a){switch(a){case 3:return !!Mld(this);case 4:return !!this.b&&this.b.i!=0;case 5:return !!this.c&&this.c.i!=0;case 6:return !!this.a&&this.a.i!=0;case 7:return !this.b&&(this.b=new y5d(z2,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new y5d(z2,this,5,8)),this.c.i<=1));case 8:return Pld(this);case 9:return Qld(this);case 10:return !this.b&&(this.b=new y5d(z2,this,4,7)),this.b.i!=0&&(!this.c&&(this.c=new y5d(z2,this,5,8)),this.c.i!=0);}return Hkd(this,a)};_.sh=function Zld(a,b){switch(a){case 3:Rld(this,BD(b,33));return;case 4:!this.b&&(this.b=new y5d(z2,this,4,7));Uxd(this.b);!this.b&&(this.b=new y5d(z2,this,4,7));ytd(this.b,BD(b,14));return;case 5:!this.c&&(this.c=new y5d(z2,this,5,8));Uxd(this.c);!this.c&&(this.c=new y5d(z2,this,5,8));ytd(this.c,BD(b,14));return;case 6:!this.a&&(this.a=new cUd(A2,this,6,6));Uxd(this.a);!this.a&&(this.a=new cUd(A2,this,6,6));ytd(this.a,BD(b,14));return;}Ikd(this,a,b)};_.zh=function $ld(){return Thd(),Khd};_.Bh=function _ld(a){switch(a){case 3:Rld(this,null);return;case 4:!this.b&&(this.b=new y5d(z2,this,4,7));Uxd(this.b);return;case 5:!this.c&&(this.c=new y5d(z2,this,5,8));Uxd(this.c);return;case 6:!this.a&&(this.a=new cUd(A2,this,6,6));Uxd(this.a);return;}Jkd(this,a)};_.Ib=function amd(){return Sld(this)};var K2=mdb(rte,'ElkEdgeImpl',352);bcb(439,1985,{105:1,413:1,202:1,439:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},rmd);_.Qg=function smd(a){return cmd(this,a)};_._g=function tmd(a,b,c){switch(a){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return !this.a&&(this.a=new xMd(y2,this,5)),this.a;case 6:return fmd(this);case 7:if(b)return emd(this);return this.i;case 8:if(b)return dmd(this);return this.f;case 9:return !this.g&&(this.g=new y5d(A2,this,9,10)),this.g;case 10:return !this.e&&(this.e=new y5d(A2,this,10,9)),this.e;case 11:return this.d;}return bkd(this,a,b,c)};_.hh=function umd(a,b,c){var d,e,f;switch(b){case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?cmd(this,c):this.Cb.ih(this,-1-e,null,c)));return bmd(this,BD(a,79),c);case 9:return !this.g&&(this.g=new y5d(A2,this,9,10)),Sxd(this.g,a,c);case 10:return !this.e&&(this.e=new y5d(A2,this,10,9)),Sxd(this.e,a,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(Thd(),Lhd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((Thd(),Lhd)),a,c)};_.jh=function vmd(a,b,c){switch(b){case 5:return !this.a&&(this.a=new xMd(y2,this,5)),Txd(this.a,a,c);case 6:return bmd(this,null,c);case 9:return !this.g&&(this.g=new y5d(A2,this,9,10)),Txd(this.g,a,c);case 10:return !this.e&&(this.e=new y5d(A2,this,10,9)),Txd(this.e,a,c);}return ckd(this,a,b,c)};_.lh=function wmd(a){switch(a){case 1:return this.j!=0;case 2:return this.k!=0;case 3:return this.b!=0;case 4:return this.c!=0;case 5:return !!this.a&&this.a.i!=0;case 6:return !!fmd(this);case 7:return !!this.i;case 8:return !!this.f;case 9:return !!this.g&&this.g.i!=0;case 10:return !!this.e&&this.e.i!=0;case 11:return this.d!=null;}return dkd(this,a)};_.sh=function xmd(a,b){switch(a){case 1:omd(this,Edb(ED(b)));return;case 2:pmd(this,Edb(ED(b)));return;case 3:hmd(this,Edb(ED(b)));return;case 4:imd(this,Edb(ED(b)));return;case 5:!this.a&&(this.a=new xMd(y2,this,5));Uxd(this.a);!this.a&&(this.a=new xMd(y2,this,5));ytd(this.a,BD(b,14));return;case 6:mmd(this,BD(b,79));return;case 7:lmd(this,BD(b,82));return;case 8:kmd(this,BD(b,82));return;case 9:!this.g&&(this.g=new y5d(A2,this,9,10));Uxd(this.g);!this.g&&(this.g=new y5d(A2,this,9,10));ytd(this.g,BD(b,14));return;case 10:!this.e&&(this.e=new y5d(A2,this,10,9));Uxd(this.e);!this.e&&(this.e=new y5d(A2,this,10,9));ytd(this.e,BD(b,14));return;case 11:jmd(this,GD(b));return;}ekd(this,a,b)};_.zh=function ymd(){return Thd(),Lhd};_.Bh=function zmd(a){switch(a){case 1:omd(this,0);return;case 2:pmd(this,0);return;case 3:hmd(this,0);return;case 4:imd(this,0);return;case 5:!this.a&&(this.a=new xMd(y2,this,5));Uxd(this.a);return;case 6:mmd(this,null);return;case 7:lmd(this,null);return;case 8:kmd(this,null);return;case 9:!this.g&&(this.g=new y5d(A2,this,9,10));Uxd(this.g);return;case 10:!this.e&&(this.e=new y5d(A2,this,10,9));Uxd(this.e);return;case 11:jmd(this,null);return;}fkd(this,a)};_.Ib=function Amd(){return qmd(this)};_.b=0;_.c=0;_.d=null;_.j=0;_.k=0;var L2=mdb(rte,'ElkEdgeSectionImpl',439);bcb(150,115,{105:1,92:1,90:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1});_._g=function Emd(a,b,c){var d;if(a==0){return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab}return bid(this,a-aLd(this.zh()),XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),a),b,c)};_.hh=function Fmd(a,b,c){var d,e;if(b==0){return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c)}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),e.Nj().Qj(this,yjd(this),b-aLd(this.zh()),a,c)};_.jh=function Gmd(a,b,c){var d,e;if(b==0){return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c)}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),e.Nj().Rj(this,yjd(this),b-aLd(this.zh()),a,c)};_.lh=function Hmd(a){var b;if(a==0){return !!this.Ab&&this.Ab.i!=0}return cid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.oh=function Imd(a){return Bmd(this,a)};_.sh=function Jmd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;}did(this,a-aLd(this.zh()),XKd((c=BD(Ajd(this,16),26),!c?this.zh():c),a),b)};_.uh=function Kmd(a){Cjd(this,128,a)};_.zh=function Lmd(){return jGd(),ZFd};_.Bh=function Mmd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;}eid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.Gh=function Nmd(){this.Bb|=1};_.Hh=function Omd(a){return Dmd(this,a)};_.Bb=0;var f6=mdb(qte,'EModelElementImpl',150);bcb(704,150,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1},$md);_.Ih=function _md(a,b){return Vmd(this,a,b)};_.Jh=function and(a){var b,c,d,e,f;if(this.a!=bKd(a)||(a.Bb&256)!=0){throw vbb(new Wdb(xte+a.zb+ute))}for(d=_Kd(a);VKd(d.a).i!=0;){c=BD(nOd(d,0,(b=BD(qud(VKd(d.a),0),87),f=b.c,JD(f,88)?BD(f,26):(jGd(),_Fd))),26);if(dKd(c)){e=bKd(c).Nh().Jh(c);BD(e,49).th(a);return e}d=_Kd(c)}return (a.D!=null?a.D:a.B)=='java.util.Map$Entry'?new lHd(a):new _Gd(a)};_.Kh=function bnd(a,b){return Wmd(this,a,b)};_._g=function cnd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.a;}return bid(this,a-aLd((jGd(),WFd)),XKd((d=BD(Ajd(this,16),26),!d?WFd:d),a),b,c)};_.hh=function dnd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 1:!!this.a&&(c=BD(this.a,49).ih(this,4,o5,c));return Tmd(this,BD(a,235),c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),WFd):d),b),66),e.Nj().Qj(this,yjd(this),b-aLd((jGd(),WFd)),a,c)};_.jh=function end(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 1:return Tmd(this,null,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),WFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),WFd)),a,c)};_.lh=function fnd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return !!this.a;}return cid(this,a-aLd((jGd(),WFd)),XKd((b=BD(Ajd(this,16),26),!b?WFd:b),a))};_.sh=function gnd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:Ymd(this,BD(b,235));return;}did(this,a-aLd((jGd(),WFd)),XKd((c=BD(Ajd(this,16),26),!c?WFd:c),a),b)};_.zh=function hnd(){return jGd(),WFd};_.Bh=function ind(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:Ymd(this,null);return;}eid(this,a-aLd((jGd(),WFd)),XKd((b=BD(Ajd(this,16),26),!b?WFd:b),a))};var Pmd,Qmd,Rmd;var d6=mdb(qte,'EFactoryImpl',704);bcb(zte,704,{105:1,2014:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1},knd);_.Ih=function lnd(a,b){switch(a.yj()){case 12:return BD(b,146).tg();case 13:return fcb(b);default:throw vbb(new Wdb(tte+a.ne()+ute));}};_.Jh=function mnd(a){var b,c,d,e,f,g,h,i;switch(a.G==-1&&(a.G=(b=bKd(a),b?HLd(b.Mh(),a):-1)),a.G){case 4:return f=new Jod,f;case 6:return g=new apd,g;case 7:return h=new ppd,h;case 8:return d=new Tld,d;case 9:return c=new xkd,c;case 10:return e=new rmd,e;case 11:return i=new Bpd,i;default:throw vbb(new Wdb(xte+a.zb+ute));}};_.Kh=function nnd(a,b){switch(a.yj()){case 13:case 12:return null;default:throw vbb(new Wdb(tte+a.ne()+ute));}};var N2=mdb(rte,'ElkGraphFactoryImpl',zte);bcb(438,150,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1});_.Wg=function rnd(){var a,b;b=(a=BD(Ajd(this,16),26),pNd(TKd(!a?this.zh():a)));return b==null?(nRd(),nRd(),mRd):new GRd(this,b)};_._g=function snd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.ne();}return bid(this,a-aLd(this.zh()),XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),a),b,c)};_.lh=function tnd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;}return cid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.sh=function und(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:this.Lh(GD(b));return;}did(this,a-aLd(this.zh()),XKd((c=BD(Ajd(this,16),26),!c?this.zh():c),a),b)};_.zh=function vnd(){return jGd(),$Fd};_.Bh=function wnd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:this.Lh(null);return;}eid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.ne=function xnd(){return this.zb};_.Lh=function ynd(a){pnd(this,a)};_.Ib=function znd(){return qnd(this)};_.zb=null;var j6=mdb(qte,'ENamedElementImpl',438);bcb(179,438,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1},eod);_.Qg=function god(a){return Snd(this,a)};_._g=function hod(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return !this.rb&&(this.rb=new jUd(this,d5,this)),this.rb;case 6:return !this.vb&&(this.vb=new gUd(o5,this,6,7)),this.vb;case 7:if(b)return this.Db>>16==7?BD(this.Cb,235):null;return Ind(this);}return bid(this,a-aLd((jGd(),cGd)),XKd((d=BD(Ajd(this,16),26),!d?cGd:d),a),b,c)};_.hh=function iod(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 4:!!this.sb&&(c=BD(this.sb,49).ih(this,1,i5,c));return Jnd(this,BD(a,471),c);case 5:return !this.rb&&(this.rb=new jUd(this,d5,this)),Sxd(this.rb,a,c);case 6:return !this.vb&&(this.vb=new gUd(o5,this,6,7)),Sxd(this.vb,a,c);case 7:!!this.Cb&&(c=(e=this.Db>>16,e>=0?Snd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,7,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),cGd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),cGd)),a,c)};_.jh=function jod(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 4:return Jnd(this,null,c);case 5:return !this.rb&&(this.rb=new jUd(this,d5,this)),Txd(this.rb,a,c);case 6:return !this.vb&&(this.vb=new gUd(o5,this,6,7)),Txd(this.vb,a,c);case 7:return _hd(this,null,7,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),cGd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),cGd)),a,c)};_.lh=function kod(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.yb!=null;case 3:return this.xb!=null;case 4:return !!this.sb;case 5:return !!this.rb&&this.rb.i!=0;case 6:return !!this.vb&&this.vb.i!=0;case 7:return !!Ind(this);}return cid(this,a-aLd((jGd(),cGd)),XKd((b=BD(Ajd(this,16),26),!b?cGd:b),a))};_.oh=function lod(a){var b;b=Und(this,a);return b?b:Bmd(this,a)};_.sh=function mod(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:pnd(this,GD(b));return;case 2:dod(this,GD(b));return;case 3:cod(this,GD(b));return;case 4:bod(this,BD(b,471));return;case 5:!this.rb&&(this.rb=new jUd(this,d5,this));Uxd(this.rb);!this.rb&&(this.rb=new jUd(this,d5,this));ytd(this.rb,BD(b,14));return;case 6:!this.vb&&(this.vb=new gUd(o5,this,6,7));Uxd(this.vb);!this.vb&&(this.vb=new gUd(o5,this,6,7));ytd(this.vb,BD(b,14));return;}did(this,a-aLd((jGd(),cGd)),XKd((c=BD(Ajd(this,16),26),!c?cGd:c),a),b)};_.vh=function nod(a){var b,c;if(!!a&&!!this.rb){for(c=new Fyd(this.rb);c.e!=c.i.gc();){b=Dyd(c);JD(b,351)&&(BD(b,351).w=null)}}Cjd(this,64,a)};_.zh=function ood(){return jGd(),cGd};_.Bh=function pod(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:pnd(this,null);return;case 2:dod(this,null);return;case 3:cod(this,null);return;case 4:bod(this,null);return;case 5:!this.rb&&(this.rb=new jUd(this,d5,this));Uxd(this.rb);return;case 6:!this.vb&&(this.vb=new gUd(o5,this,6,7));Uxd(this.vb);return;}eid(this,a-aLd((jGd(),cGd)),XKd((b=BD(Ajd(this,16),26),!b?cGd:b),a))};_.Gh=function qod(){Tnd(this)};_.Mh=function rod(){return !this.rb&&(this.rb=new jUd(this,d5,this)),this.rb};_.Nh=function sod(){return this.sb};_.Oh=function tod(){return this.ub};_.Ph=function uod(){return this.xb};_.Qh=function vod(){return this.yb};_.Rh=function wod(a){this.ub=a};_.Ib=function xod(){var a;if((this.Db&64)!=0)return qnd(this);a=new Jfb(qnd(this));a.a+=' (nsURI: ';Efb(a,this.yb);a.a+=', nsPrefix: ';Efb(a,this.xb);a.a+=')';return a.a};_.xb=null;_.yb=null;var And;var t6=mdb(qte,'EPackageImpl',179);bcb(555,179,{105:1,2016:1,555:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1},Bod);_.q=false;_.r=false;var yod=false;var O2=mdb(rte,'ElkGraphPackageImpl',555);bcb(354,724,{105:1,413:1,160:1,137:1,470:1,354:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},Jod);_.Qg=function Kod(a){return Eod(this,a)};_._g=function Lod(a,b,c){switch(a){case 7:return Fod(this);case 8:return this.a;}return Xkd(this,a,b,c)};_.hh=function Mod(a,b,c){var d;switch(b){case 7:!!this.Cb&&(c=(d=this.Db>>16,d>=0?Eod(this,c):this.Cb.ih(this,-1-d,null,c)));return Dod(this,BD(a,160),c);}return Fkd(this,a,b,c)};_.jh=function Nod(a,b,c){if(b==7){return Dod(this,null,c)}return Gkd(this,a,b,c)};_.lh=function Ood(a){switch(a){case 7:return !!Fod(this);case 8:return !dfb('',this.a);}return Ykd(this,a)};_.sh=function Pod(a,b){switch(a){case 7:God(this,BD(b,160));return;case 8:Hod(this,GD(b));return;}Zkd(this,a,b)};_.zh=function Qod(){return Thd(),Nhd};_.Bh=function Rod(a){switch(a){case 7:God(this,null);return;case 8:Hod(this,'');return;}$kd(this,a)};_.Ib=function Sod(){return Iod(this)};_.a='';var P2=mdb(rte,'ElkLabelImpl',354);bcb(239,725,{105:1,413:1,82:1,160:1,33:1,470:1,239:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},apd);_.Qg=function bpd(a){return Uod(this,a)};_._g=function cpd(a,b,c){switch(a){case 9:return !this.c&&(this.c=new cUd(F2,this,9,9)),this.c;case 10:return !this.a&&(this.a=new cUd(E2,this,10,11)),this.a;case 11:return Xod(this);case 12:return !this.b&&(this.b=new cUd(B2,this,12,3)),this.b;case 13:return Bcb(),!this.a&&(this.a=new cUd(E2,this,10,11)),this.a.i>0?true:false;}return uld(this,a,b,c)};_.hh=function dpd(a,b,c){var d;switch(b){case 9:return !this.c&&(this.c=new cUd(F2,this,9,9)),Sxd(this.c,a,c);case 10:return !this.a&&(this.a=new cUd(E2,this,10,11)),Sxd(this.a,a,c);case 11:!!this.Cb&&(c=(d=this.Db>>16,d>=0?Uod(this,c):this.Cb.ih(this,-1-d,null,c)));return Tod(this,BD(a,33),c);case 12:return !this.b&&(this.b=new cUd(B2,this,12,3)),Sxd(this.b,a,c);}return vld(this,a,b,c)};_.jh=function epd(a,b,c){switch(b){case 9:return !this.c&&(this.c=new cUd(F2,this,9,9)),Txd(this.c,a,c);case 10:return !this.a&&(this.a=new cUd(E2,this,10,11)),Txd(this.a,a,c);case 11:return Tod(this,null,c);case 12:return !this.b&&(this.b=new cUd(B2,this,12,3)),Txd(this.b,a,c);}return wld(this,a,b,c)};_.lh=function fpd(a){switch(a){case 9:return !!this.c&&this.c.i!=0;case 10:return !!this.a&&this.a.i!=0;case 11:return !!Xod(this);case 12:return !!this.b&&this.b.i!=0;case 13:return !this.a&&(this.a=new cUd(E2,this,10,11)),this.a.i>0;}return xld(this,a)};_.sh=function gpd(a,b){switch(a){case 9:!this.c&&(this.c=new cUd(F2,this,9,9));Uxd(this.c);!this.c&&(this.c=new cUd(F2,this,9,9));ytd(this.c,BD(b,14));return;case 10:!this.a&&(this.a=new cUd(E2,this,10,11));Uxd(this.a);!this.a&&(this.a=new cUd(E2,this,10,11));ytd(this.a,BD(b,14));return;case 11:$od(this,BD(b,33));return;case 12:!this.b&&(this.b=new cUd(B2,this,12,3));Uxd(this.b);!this.b&&(this.b=new cUd(B2,this,12,3));ytd(this.b,BD(b,14));return;}yld(this,a,b)};_.zh=function hpd(){return Thd(),Ohd};_.Bh=function ipd(a){switch(a){case 9:!this.c&&(this.c=new cUd(F2,this,9,9));Uxd(this.c);return;case 10:!this.a&&(this.a=new cUd(E2,this,10,11));Uxd(this.a);return;case 11:$od(this,null);return;case 12:!this.b&&(this.b=new cUd(B2,this,12,3));Uxd(this.b);return;}zld(this,a)};_.Ib=function jpd(){return _od(this)};var Q2=mdb(rte,'ElkNodeImpl',239);bcb(186,725,{105:1,413:1,82:1,160:1,118:1,470:1,186:1,94:1,92:1,90:1,56:1,108:1,49:1,97:1,114:1,115:1},ppd);_.Qg=function qpd(a){return lpd(this,a)};_._g=function rpd(a,b,c){if(a==9){return mpd(this)}return uld(this,a,b,c)};_.hh=function spd(a,b,c){var d;switch(b){case 9:!!this.Cb&&(c=(d=this.Db>>16,d>=0?lpd(this,c):this.Cb.ih(this,-1-d,null,c)));return kpd(this,BD(a,33),c);}return vld(this,a,b,c)};_.jh=function tpd(a,b,c){if(b==9){return kpd(this,null,c)}return wld(this,a,b,c)};_.lh=function upd(a){if(a==9){return !!mpd(this)}return xld(this,a)};_.sh=function vpd(a,b){switch(a){case 9:npd(this,BD(b,33));return;}yld(this,a,b)};_.zh=function wpd(){return Thd(),Phd};_.Bh=function xpd(a){switch(a){case 9:npd(this,null);return;}zld(this,a)};_.Ib=function ypd(){return opd(this)};var R2=mdb(rte,'ElkPortImpl',186);var J4=odb(Tte,'BasicEMap/Entry');bcb(1092,115,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1,114:1,115:1},Bpd);_.Fb=function Hpd(a){return this===a};_.cd=function Jpd(){return this.b};_.Hb=function Lpd(){return FCb(this)};_.Uh=function Npd(a){zpd(this,BD(a,146))};_._g=function Cpd(a,b,c){switch(a){case 0:return this.b;case 1:return this.c;}return fid(this,a,b,c)};_.lh=function Dpd(a){switch(a){case 0:return !!this.b;case 1:return this.c!=null;}return mid(this,a)};_.sh=function Epd(a,b){switch(a){case 0:zpd(this,BD(b,146));return;case 1:Apd(this,b);return;}yid(this,a,b)};_.zh=function Fpd(){return Thd(),Qhd};_.Bh=function Gpd(a){switch(a){case 0:zpd(this,null);return;case 1:Apd(this,null);return;}Cid(this,a)};_.Sh=function Ipd(){var a;if(this.a==-1){a=this.b;this.a=!a?0:tb(a)}return this.a};_.dd=function Kpd(){return this.c};_.Th=function Mpd(a){this.a=a};_.ed=function Opd(a){var b;b=this.c;Apd(this,a);return b};_.Ib=function Ppd(){var a;if((this.Db&64)!=0)return Eid(this);a=new Ufb;Qfb(Qfb(Qfb(a,this.b?this.b.tg():Xhe),gne),xfb(this.c));return a.a};_.a=-1;_.c=null;var S2=mdb(rte,'ElkPropertyToValueMapEntryImpl',1092);bcb(984,1,{},bqd);var U2=mdb(Wte,'JsonAdapter',984);bcb(210,60,Tie,cqd);var V2=mdb(Wte,'JsonImportException',210);bcb(857,1,{},ird);var J3=mdb(Wte,'JsonImporter',857);bcb(891,1,{},jrd);var W2=mdb(Wte,'JsonImporter/lambda$0$Type',891);bcb(892,1,{},krd);var X2=mdb(Wte,'JsonImporter/lambda$1$Type',892);bcb(900,1,{},lrd);var Y2=mdb(Wte,'JsonImporter/lambda$10$Type',900);bcb(902,1,{},mrd);var Z2=mdb(Wte,'JsonImporter/lambda$11$Type',902);bcb(903,1,{},nrd);var $2=mdb(Wte,'JsonImporter/lambda$12$Type',903);bcb(909,1,{},ord);var _2=mdb(Wte,'JsonImporter/lambda$13$Type',909);bcb(908,1,{},prd);var a3=mdb(Wte,'JsonImporter/lambda$14$Type',908);bcb(904,1,{},qrd);var b3=mdb(Wte,'JsonImporter/lambda$15$Type',904);bcb(905,1,{},rrd);var c3=mdb(Wte,'JsonImporter/lambda$16$Type',905);bcb(906,1,{},srd);var d3=mdb(Wte,'JsonImporter/lambda$17$Type',906);bcb(907,1,{},trd);var e3=mdb(Wte,'JsonImporter/lambda$18$Type',907);bcb(912,1,{},urd);var f3=mdb(Wte,'JsonImporter/lambda$19$Type',912);bcb(893,1,{},vrd);var g3=mdb(Wte,'JsonImporter/lambda$2$Type',893);bcb(910,1,{},wrd);var h3=mdb(Wte,'JsonImporter/lambda$20$Type',910);bcb(911,1,{},xrd);var i3=mdb(Wte,'JsonImporter/lambda$21$Type',911);bcb(915,1,{},yrd);var j3=mdb(Wte,'JsonImporter/lambda$22$Type',915);bcb(913,1,{},zrd);var k3=mdb(Wte,'JsonImporter/lambda$23$Type',913);bcb(914,1,{},Ard);var l3=mdb(Wte,'JsonImporter/lambda$24$Type',914);bcb(917,1,{},Brd);var m3=mdb(Wte,'JsonImporter/lambda$25$Type',917);bcb(916,1,{},Crd);var n3=mdb(Wte,'JsonImporter/lambda$26$Type',916);bcb(918,1,qie,Drd);_.td=function Erd(a){Bqd(this.b,this.a,GD(a))};var o3=mdb(Wte,'JsonImporter/lambda$27$Type',918);bcb(919,1,qie,Frd);_.td=function Grd(a){Cqd(this.b,this.a,GD(a))};var p3=mdb(Wte,'JsonImporter/lambda$28$Type',919);bcb(920,1,{},Hrd);var q3=mdb(Wte,'JsonImporter/lambda$29$Type',920);bcb(896,1,{},Ird);var r3=mdb(Wte,'JsonImporter/lambda$3$Type',896);bcb(921,1,{},Jrd);var s3=mdb(Wte,'JsonImporter/lambda$30$Type',921);bcb(922,1,{},Krd);var t3=mdb(Wte,'JsonImporter/lambda$31$Type',922);bcb(923,1,{},Lrd);var u3=mdb(Wte,'JsonImporter/lambda$32$Type',923);bcb(924,1,{},Mrd);var v3=mdb(Wte,'JsonImporter/lambda$33$Type',924);bcb(925,1,{},Nrd);var w3=mdb(Wte,'JsonImporter/lambda$34$Type',925);bcb(859,1,{},Prd);var x3=mdb(Wte,'JsonImporter/lambda$35$Type',859);bcb(929,1,{},Rrd);var y3=mdb(Wte,'JsonImporter/lambda$36$Type',929);bcb(926,1,qie,Srd);_.td=function Trd(a){Lqd(this.a,BD(a,469))};var z3=mdb(Wte,'JsonImporter/lambda$37$Type',926);bcb(927,1,qie,Urd);_.td=function Vrd(a){Mqd(this.a,this.b,BD(a,202))};var A3=mdb(Wte,'JsonImporter/lambda$38$Type',927);bcb(928,1,qie,Wrd);_.td=function Xrd(a){Nqd(this.a,this.b,BD(a,202))};var B3=mdb(Wte,'JsonImporter/lambda$39$Type',928);bcb(894,1,{},Yrd);var C3=mdb(Wte,'JsonImporter/lambda$4$Type',894);bcb(930,1,qie,Zrd);_.td=function $rd(a){Oqd(this.a,BD(a,8))};var D3=mdb(Wte,'JsonImporter/lambda$40$Type',930);bcb(895,1,{},_rd);var E3=mdb(Wte,'JsonImporter/lambda$5$Type',895);bcb(899,1,{},asd);var F3=mdb(Wte,'JsonImporter/lambda$6$Type',899);bcb(897,1,{},bsd);var G3=mdb(Wte,'JsonImporter/lambda$7$Type',897);bcb(898,1,{},csd);var H3=mdb(Wte,'JsonImporter/lambda$8$Type',898);bcb(901,1,{},dsd);var I3=mdb(Wte,'JsonImporter/lambda$9$Type',901);bcb(948,1,qie,msd);_.td=function nsd(a){Qpd(this.a,new yC(GD(a)))};var K3=mdb(Wte,'JsonMetaDataConverter/lambda$0$Type',948);bcb(949,1,qie,osd);_.td=function psd(a){isd(this.a,BD(a,237))};var L3=mdb(Wte,'JsonMetaDataConverter/lambda$1$Type',949);bcb(950,1,qie,qsd);_.td=function rsd(a){jsd(this.a,BD(a,149))};var M3=mdb(Wte,'JsonMetaDataConverter/lambda$2$Type',950);bcb(951,1,qie,ssd);_.td=function tsd(a){ksd(this.a,BD(a,175))};var N3=mdb(Wte,'JsonMetaDataConverter/lambda$3$Type',951);bcb(237,22,{3:1,35:1,22:1,237:1},Dsd);var usd,vsd,wsd,xsd,ysd,zsd,Asd,Bsd;var O3=ndb(Hle,'GraphFeature',237,CI,Fsd,Esd);var Gsd;bcb(13,1,{35:1,146:1},Lsd,Msd,Nsd,Osd);_.wd=function Psd(a){return Isd(this,BD(a,146))};_.Fb=function Qsd(a){return Jsd(this,a)};_.wg=function Rsd(){return Ksd(this)};_.tg=function Ssd(){return this.b};_.Hb=function Tsd(){return LCb(this.b)};_.Ib=function Usd(){return this.b};var T3=mdb(Hle,'Property',13);bcb(818,1,Dke,Wsd);_.ue=function Xsd(a,b){return Vsd(this,BD(a,94),BD(b,94))};_.Fb=function Ysd(a){return this===a};_.ve=function Zsd(){return new tpb(this)};var S3=mdb(Hle,'PropertyHolderComparator',818);bcb(695,1,aie,qtd);_.Nb=function rtd(a){Rrb(this,a)};_.Pb=function ttd(){return ptd(this)};_.Qb=function utd(){Srb()};_.Ob=function std(){return !!this.a};var U3=mdb(jue,'ElkGraphUtil/AncestorIterator',695);var T4=odb(Tte,'EList');bcb(67,52,{20:1,28:1,52:1,14:1,15:1,67:1,58:1});_.Vc=function Jtd(a,b){vtd(this,a,b)};_.Fc=function Ktd(a){return wtd(this,a)};_.Wc=function Ltd(a,b){return xtd(this,a,b)};_.Gc=function Mtd(a){return ytd(this,a)};_.Zh=function Ntd(){return new $yd(this)};_.$h=function Otd(){return new bzd(this)};_._h=function Ptd(a){return ztd(this,a)};_.ai=function Qtd(){return true};_.bi=function Rtd(a,b){};_.ci=function Std(){};_.di=function Ttd(a,b){Atd(this,a,b)};_.ei=function Utd(a,b,c){};_.fi=function Vtd(a,b){};_.gi=function Wtd(a,b,c){};_.Fb=function Xtd(a){return Btd(this,a)};_.Hb=function Ytd(){return Etd(this)};_.hi=function Ztd(){return false};_.Kc=function $td(){return new Fyd(this)};_.Yc=function _td(){return new Oyd(this)};_.Zc=function aud(a){var b;b=this.gc();if(a<0||a>b)throw vbb(new Cyd(a,b));return new Pyd(this,a)};_.ji=function bud(a,b){this.ii(a,this.Xc(b))};_.Mc=function cud(a){return Ftd(this,a)};_.li=function dud(a,b){return b};_._c=function eud(a,b){return Gtd(this,a,b)};_.Ib=function fud(){return Htd(this)};_.ni=function gud(){return true};_.oi=function hud(a,b){return Itd(this,b)};var p4=mdb(Tte,'AbstractEList',67);bcb(63,67,oue,yud,zud,Aud);_.Vh=function Bud(a,b){return iud(this,a,b)};_.Wh=function Cud(a){return jud(this,a)};_.Xh=function Dud(a,b){kud(this,a,b)};_.Yh=function Eud(a){lud(this,a)};_.pi=function Fud(a){return nud(this,a)};_.$b=function Gud(){oud(this)};_.Hc=function Hud(a){return pud(this,a)};_.Xb=function Iud(a){return qud(this,a)};_.qi=function Jud(a){var b,c,d;++this.j;c=this.g==null?0:this.g.length;if(a>c){d=this.g;b=c+(c/2|0)+4;b=0){this.$c(b);return true}else{return false}};_.mi=function lwd(a,b){return this.Ui(a,this.oi(a,b))};_.gc=function mwd(){return this.Vi()};_.Pc=function nwd(){return this.Wi()};_.Qc=function owd(a){return this.Xi(a)};_.Ib=function pwd(){return this.Yi()};var M4=mdb(Tte,'DelegatingEList',1995);bcb(1996,1995,eve);_.Vh=function xwd(a,b){return qwd(this,a,b)};_.Wh=function ywd(a){return this.Vh(this.Vi(),a)};_.Xh=function zwd(a,b){rwd(this,a,b)};_.Yh=function Awd(a){swd(this,a)};_.ai=function Bwd(){return !this.bj()};_.$b=function Cwd(){vwd(this)};_.Zi=function Dwd(a,b,c,d,e){return new Cxd(this,a,b,c,d,e)};_.$i=function Ewd(a){Uhd(this.Ai(),a)};_._i=function Fwd(){return null};_.aj=function Gwd(){return -1};_.Ai=function Hwd(){return null};_.bj=function Iwd(){return false};_.cj=function Jwd(a,b){return b};_.dj=function Kwd(a,b){return b};_.ej=function Lwd(){return false};_.fj=function Mwd(){return !this.Ri()};_.ii=function Nwd(a,b){var c,d;if(this.ej()){d=this.fj();c=Dvd(this,a,b);this.$i(this.Zi(7,meb(b),c,a,d));return c}else{return Dvd(this,a,b)}};_.$c=function Owd(a){var b,c,d,e;if(this.ej()){c=null;d=this.fj();b=this.Zi(4,e=Evd(this,a),null,a,d);if(this.bj()&&!!e){c=this.dj(e,c);if(!c){this.$i(b)}else{c.Ei(b);c.Fi()}}else{if(!c){this.$i(b)}else{c.Ei(b);c.Fi()}}return e}else{e=Evd(this,a);if(this.bj()&&!!e){c=this.dj(e,null);!!c&&c.Fi()}return e}};_.mi=function Pwd(a,b){return wwd(this,a,b)};var d4=mdb(hte,'DelegatingNotifyingListImpl',1996);bcb(143,1,fve);_.Ei=function pxd(a){return Qwd(this,a)};_.Fi=function qxd(){Rwd(this)};_.xi=function rxd(){return this.d};_._i=function sxd(){return null};_.gj=function txd(){return null};_.yi=function uxd(a){return -1};_.zi=function vxd(){return $wd(this)};_.Ai=function wxd(){return null};_.Bi=function xxd(){return hxd(this)};_.Ci=function yxd(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o};_.hj=function zxd(){return false};_.Di=function Axd(a){var b,c,d,e,f,g,h,i,j,k,l;switch(this.d){case 1:case 2:{e=a.xi();switch(e){case 1:case 2:{f=a.Ai();if(PD(f)===PD(this.Ai())&&this.yi(null)==a.yi(null)){this.g=a.zi();a.xi()==1&&(this.d=1);return true}}}}case 4:{e=a.xi();switch(e){case 4:{f=a.Ai();if(PD(f)===PD(this.Ai())&&this.yi(null)==a.yi(null)){j=jxd(this);i=this.o<0?this.o<-2?-2-this.o-1:-1:this.o;g=a.Ci();this.d=6;l=new zud(2);if(i<=g){wtd(l,this.n);wtd(l,a.Bi());this.g=OC(GC(WD,1),oje,25,15,[this.o=i,g+1])}else{wtd(l,a.Bi());wtd(l,this.n);this.g=OC(GC(WD,1),oje,25,15,[this.o=g,i])}this.n=l;j||(this.o=-2-this.o-1);return true}break}}break}case 6:{e=a.xi();switch(e){case 4:{f=a.Ai();if(PD(f)===PD(this.Ai())&&this.yi(null)==a.yi(null)){j=jxd(this);g=a.Ci();k=BD(this.g,48);d=KC(WD,oje,25,k.length+1,15,1);b=0;while(b>>0,b.toString(16)));d.a+=' (eventType: ';switch(this.d){case 1:{d.a+='SET';break}case 2:{d.a+='UNSET';break}case 3:{d.a+='ADD';break}case 5:{d.a+='ADD_MANY';break}case 4:{d.a+='REMOVE';break}case 6:{d.a+='REMOVE_MANY';break}case 7:{d.a+='MOVE';break}case 8:{d.a+='REMOVING_ADAPTER';break}case 9:{d.a+='RESOLVE';break}default:{Cfb(d,this.d);break}}ixd(this)&&(d.a+=', touch: true',d);d.a+=', position: ';Cfb(d,this.o<0?this.o<-2?-2-this.o-1:-1:this.o);d.a+=', notifier: ';Dfb(d,this.Ai());d.a+=', feature: ';Dfb(d,this._i());d.a+=', oldValue: ';Dfb(d,hxd(this));d.a+=', newValue: ';if(this.d==6&&JD(this.g,48)){c=BD(this.g,48);d.a+='[';for(a=0;a10){if(!this.b||this.c.j!=this.a){this.b=new Vqb(this);this.a=this.j}return Rqb(this.b,a)}else{return pud(this,a)}};_.ni=function Byd(){return true};_.a=0;var j4=mdb(Tte,'AbstractEList/1',953);bcb(295,73,Mje,Cyd);var k4=mdb(Tte,'AbstractEList/BasicIndexOutOfBoundsException',295);bcb(40,1,aie,Fyd);_.Nb=function Iyd(a){Rrb(this,a)};_.mj=function Gyd(){if(this.i.j!=this.f){throw vbb(new Apb)}};_.nj=function Hyd(){return Dyd(this)};_.Ob=function Jyd(){return this.e!=this.i.gc()};_.Pb=function Kyd(){return this.nj()};_.Qb=function Lyd(){Eyd(this)};_.e=0;_.f=0;_.g=-1;var l4=mdb(Tte,'AbstractEList/EIterator',40);bcb(278,40,jie,Oyd,Pyd);_.Qb=function Xyd(){Eyd(this)};_.Rb=function Qyd(a){Myd(this,a)};_.oj=function Ryd(){var b;try{b=this.d.Xb(--this.e);this.mj();this.g=this.e;return b}catch(a){a=ubb(a);if(JD(a,73)){this.mj();throw vbb(new utb)}else throw vbb(a)}};_.pj=function Syd(a){Nyd(this,a)};_.Sb=function Tyd(){return this.e!=0};_.Tb=function Uyd(){return this.e};_.Ub=function Vyd(){return this.oj()};_.Vb=function Wyd(){return this.e-1};_.Wb=function Yyd(a){this.pj(a)};var m4=mdb(Tte,'AbstractEList/EListIterator',278);bcb(341,40,aie,$yd);_.nj=function _yd(){return Zyd(this)};_.Qb=function azd(){throw vbb(new bgb)};var n4=mdb(Tte,'AbstractEList/NonResolvingEIterator',341);bcb(385,278,jie,bzd,czd);_.Rb=function dzd(a){throw vbb(new bgb)};_.nj=function ezd(){var b;try{b=this.c.ki(this.e);this.mj();this.g=this.e++;return b}catch(a){a=ubb(a);if(JD(a,73)){this.mj();throw vbb(new utb)}else throw vbb(a)}};_.oj=function fzd(){var b;try{b=this.c.ki(--this.e);this.mj();this.g=this.e;return b}catch(a){a=ubb(a);if(JD(a,73)){this.mj();throw vbb(new utb)}else throw vbb(a)}};_.Qb=function gzd(){throw vbb(new bgb)};_.Wb=function hzd(a){throw vbb(new bgb)};var o4=mdb(Tte,'AbstractEList/NonResolvingEListIterator',385);bcb(1982,67,ive);_.Vh=function pzd(a,b){var c,d,e,f,g,h,i,j,k,l,m;e=b.gc();if(e!=0){j=BD(Ajd(this.a,4),126);k=j==null?0:j.length;m=k+e;d=nzd(this,m);l=k-a;l>0&&$fb(j,a,d,a+e,l);i=b.Kc();for(g=0;gc)throw vbb(new Cyd(a,c));return new Yzd(this,a)};_.$b=function wzd(){var a,b;++this.j;a=BD(Ajd(this.a,4),126);b=a==null?0:a.length;b0d(this,null);Atd(this,b,a)};_.Hc=function xzd(a){var b,c,d,e,f;b=BD(Ajd(this.a,4),126);if(b!=null){if(a!=null){for(d=b,e=0,f=d.length;e=c)throw vbb(new Cyd(a,c));return b[a]};_.Xc=function zzd(a){var b,c,d;b=BD(Ajd(this.a,4),126);if(b!=null){if(a!=null){for(c=0,d=b.length;cc)throw vbb(new Cyd(a,c));return new Qzd(this,a)};_.ii=function Ezd(a,b){var c,d,e;c=mzd(this);e=c==null?0:c.length;if(a>=e)throw vbb(new qcb(lue+a+mue+e));if(b>=e)throw vbb(new qcb(nue+b+mue+e));d=c[b];if(a!=b){a0&&$fb(a,0,b,0,c);return b};_.Qc=function Kzd(a){var b,c,d;b=BD(Ajd(this.a,4),126);d=b==null?0:b.length;if(d>0){if(a.lengthd&&NC(a,d,null);return a};var jzd;var v4=mdb(Tte,'ArrayDelegatingEList',1982);bcb(1038,40,aie,Lzd);_.mj=function Mzd(){if(this.b.j!=this.f||PD(BD(Ajd(this.b.a,4),126))!==PD(this.a)){throw vbb(new Apb)}};_.Qb=function Nzd(){Eyd(this);this.a=BD(Ajd(this.b.a,4),126)};var r4=mdb(Tte,'ArrayDelegatingEList/EIterator',1038);bcb(706,278,jie,Pzd,Qzd);_.mj=function Rzd(){if(this.b.j!=this.f||PD(BD(Ajd(this.b.a,4),126))!==PD(this.a)){throw vbb(new Apb)}};_.pj=function Szd(a){Nyd(this,a);this.a=BD(Ajd(this.b.a,4),126)};_.Qb=function Tzd(){Eyd(this);this.a=BD(Ajd(this.b.a,4),126)};var s4=mdb(Tte,'ArrayDelegatingEList/EListIterator',706);bcb(1039,341,aie,Uzd);_.mj=function Vzd(){if(this.b.j!=this.f||PD(BD(Ajd(this.b.a,4),126))!==PD(this.a)){throw vbb(new Apb)}};var t4=mdb(Tte,'ArrayDelegatingEList/NonResolvingEIterator',1039);bcb(707,385,jie,Xzd,Yzd);_.mj=function Zzd(){if(this.b.j!=this.f||PD(BD(Ajd(this.b.a,4),126))!==PD(this.a)){throw vbb(new Apb)}};var u4=mdb(Tte,'ArrayDelegatingEList/NonResolvingEListIterator',707);bcb(606,295,Mje,$zd);var w4=mdb(Tte,'BasicEList/BasicIndexOutOfBoundsException',606);bcb(696,63,oue,_zd);_.Vc=function aAd(a,b){throw vbb(new bgb)};_.Fc=function bAd(a){throw vbb(new bgb)};_.Wc=function cAd(a,b){throw vbb(new bgb)};_.Gc=function dAd(a){throw vbb(new bgb)};_.$b=function eAd(){throw vbb(new bgb)};_.qi=function fAd(a){throw vbb(new bgb)};_.Kc=function gAd(){return this.Zh()};_.Yc=function hAd(){return this.$h()};_.Zc=function iAd(a){return this._h(a)};_.ii=function jAd(a,b){throw vbb(new bgb)};_.ji=function kAd(a,b){throw vbb(new bgb)};_.$c=function lAd(a){throw vbb(new bgb)};_.Mc=function mAd(a){throw vbb(new bgb)};_._c=function nAd(a,b){throw vbb(new bgb)};var x4=mdb(Tte,'BasicEList/UnmodifiableEList',696);bcb(705,1,{3:1,20:1,14:1,15:1,58:1,589:1});_.Vc=function OAd(a,b){oAd(this,a,BD(b,42))};_.Fc=function PAd(a){return pAd(this,BD(a,42))};_.Jc=function XAd(a){reb(this,a)};_.Xb=function YAd(a){return BD(qud(this.c,a),133)};_.ii=function fBd(a,b){return BD(this.c.ii(a,b),42)};_.ji=function gBd(a,b){GAd(this,a,BD(b,42))};_.Lc=function jBd(){return new YAb(null,new Kub(this,16))};_.$c=function kBd(a){return BD(this.c.$c(a),42)};_._c=function mBd(a,b){return MAd(this,a,BD(b,42))};_.ad=function oBd(a){ktb(this,a)};_.Nc=function pBd(){return new Kub(this,16)};_.Oc=function qBd(){return new YAb(null,new Kub(this,16))};_.Wc=function QAd(a,b){return this.c.Wc(a,b)};_.Gc=function RAd(a){return this.c.Gc(a)};_.$b=function SAd(){this.c.$b()};_.Hc=function TAd(a){return this.c.Hc(a)};_.Ic=function UAd(a){return Be(this.c,a)};_.qj=function VAd(){var a,b,c;if(this.d==null){this.d=KC(y4,jve,63,2*this.f+1,0,1);c=this.e;this.f=0;for(b=this.c.Kc();b.e!=b.i.gc();){a=BD(b.nj(),133);uAd(this,a)}this.e=c}};_.Fb=function WAd(a){return zAd(this,a)};_.Hb=function ZAd(){return Etd(this.c)};_.Xc=function $Ad(a){return this.c.Xc(a)};_.rj=function _Ad(){this.c=new yBd(this)};_.dc=function aBd(){return this.f==0};_.Kc=function bBd(){return this.c.Kc()};_.Yc=function cBd(){return this.c.Yc()};_.Zc=function dBd(a){return this.c.Zc(a)};_.sj=function eBd(){return FAd(this)};_.tj=function hBd(a,b,c){return new zCd(a,b,c)};_.uj=function iBd(){return new EBd};_.Mc=function lBd(a){return JAd(this,a)};_.gc=function nBd(){return this.f};_.bd=function rBd(a,b){return new Jib(this.c,a,b)};_.Pc=function sBd(){return this.c.Pc()};_.Qc=function tBd(a){return this.c.Qc(a)};_.Ib=function uBd(){return Htd(this.c)};_.e=0;_.f=0;var L4=mdb(Tte,'BasicEMap',705);bcb(1033,63,oue,yBd);_.bi=function zBd(a,b){vBd(this,BD(b,133))};_.ei=function BBd(a,b,c){var d;++(d=this,BD(b,133),d).a.e};_.fi=function CBd(a,b){wBd(this,BD(b,133))};_.gi=function DBd(a,b,c){xBd(this,BD(b,133),BD(c,133))};_.di=function ABd(a,b){tAd(this.a)};var z4=mdb(Tte,'BasicEMap/1',1033);bcb(1034,63,oue,EBd);_.ri=function FBd(a){return KC(I4,kve,612,a,0,1)};var A4=mdb(Tte,'BasicEMap/2',1034);bcb(1035,eie,fie,GBd);_.$b=function HBd(){this.a.c.$b()};_.Hc=function IBd(a){return qAd(this.a,a)};_.Kc=function JBd(){return this.a.f==0?(LCd(),KCd.a):new dCd(this.a)};_.Mc=function KBd(a){var b;b=this.a.f;LAd(this.a,a);return this.a.f!=b};_.gc=function LBd(){return this.a.f};var B4=mdb(Tte,'BasicEMap/3',1035);bcb(1036,28,die,MBd);_.$b=function NBd(){this.a.c.$b()};_.Hc=function OBd(a){return rAd(this.a,a)};_.Kc=function PBd(){return this.a.f==0?(LCd(),KCd.a):new fCd(this.a)};_.gc=function QBd(){return this.a.f};var C4=mdb(Tte,'BasicEMap/4',1036);bcb(1037,eie,fie,SBd);_.$b=function TBd(){this.a.c.$b()};_.Hc=function UBd(a){var b,c,d,e,f,g,h,i,j;if(this.a.f>0&&JD(a,42)){this.a.qj();i=BD(a,42);h=i.cd();e=h==null?0:tb(h);f=DAd(this.a,e);b=this.a.d[f];if(b){c=BD(b.g,367);j=b.i;for(g=0;g'+this.c};_.a=0;var I4=mdb(Tte,'BasicEMap/EntryImpl',612);bcb(536,1,{},JCd);var K4=mdb(Tte,'BasicEMap/View',536);var KCd;bcb(768,1,{});_.Fb=function ZCd(a){return At((mmb(),jmb),a)};_.Hb=function $Cd(){return qmb((mmb(),jmb))};_.Ib=function _Cd(){return Fe((mmb(),jmb))};var Q4=mdb(Tte,'ECollections/BasicEmptyUnmodifiableEList',768);bcb(1312,1,jie,aDd);_.Nb=function cDd(a){Rrb(this,a)};_.Rb=function bDd(a){throw vbb(new bgb)};_.Ob=function dDd(){return false};_.Sb=function eDd(){return false};_.Pb=function fDd(){throw vbb(new utb)};_.Tb=function gDd(){return 0};_.Ub=function hDd(){throw vbb(new utb)};_.Vb=function iDd(){return -1};_.Qb=function jDd(){throw vbb(new bgb)};_.Wb=function kDd(a){throw vbb(new bgb)};var P4=mdb(Tte,'ECollections/BasicEmptyUnmodifiableEList/1',1312);bcb(1310,768,{20:1,14:1,15:1,58:1},lDd);_.Vc=function mDd(a,b){OCd()};_.Fc=function nDd(a){return PCd()};_.Wc=function oDd(a,b){return QCd()};_.Gc=function pDd(a){return RCd()};_.$b=function qDd(){SCd()};_.Hc=function rDd(a){return false};_.Ic=function sDd(a){return false};_.Jc=function tDd(a){reb(this,a)};_.Xb=function uDd(a){return wmb((mmb(),jmb,a)),null};_.Xc=function vDd(a){return -1};_.dc=function wDd(){return true};_.Kc=function xDd(){return this.a};_.Yc=function yDd(){return this.a};_.Zc=function zDd(a){return this.a};_.ii=function ADd(a,b){return TCd()};_.ji=function BDd(a,b){UCd()};_.Lc=function CDd(){return new YAb(null,new Kub(this,16))};_.$c=function DDd(a){return VCd()};_.Mc=function EDd(a){return WCd()};_._c=function FDd(a,b){return XCd()};_.gc=function GDd(){return 0};_.ad=function HDd(a){ktb(this,a)};_.Nc=function IDd(){return new Kub(this,16)};_.Oc=function JDd(){return new YAb(null,new Kub(this,16))};_.bd=function KDd(a,b){return mmb(),new Jib(jmb,a,b)};_.Pc=function LDd(){return De((mmb(),jmb))};_.Qc=function MDd(a){return mmb(),Ee(jmb,a)};var R4=mdb(Tte,'ECollections/EmptyUnmodifiableEList',1310);bcb(1311,768,{20:1,14:1,15:1,58:1,589:1},NDd);_.Vc=function ODd(a,b){OCd()};_.Fc=function PDd(a){return PCd()};_.Wc=function QDd(a,b){return QCd()};_.Gc=function RDd(a){return RCd()};_.$b=function SDd(){SCd()};_.Hc=function TDd(a){return false};_.Ic=function UDd(a){return false};_.Jc=function VDd(a){reb(this,a)};_.Xb=function WDd(a){return wmb((mmb(),jmb,a)),null};_.Xc=function XDd(a){return -1};_.dc=function YDd(){return true};_.Kc=function ZDd(){return this.a};_.Yc=function $Dd(){return this.a};_.Zc=function _Dd(a){return this.a};_.ii=function bEd(a,b){return TCd()};_.ji=function cEd(a,b){UCd()};_.Lc=function dEd(){return new YAb(null,new Kub(this,16))};_.$c=function eEd(a){return VCd()};_.Mc=function fEd(a){return WCd()};_._c=function gEd(a,b){return XCd()};_.gc=function hEd(){return 0};_.ad=function iEd(a){ktb(this,a)};_.Nc=function jEd(){return new Kub(this,16)};_.Oc=function kEd(){return new YAb(null,new Kub(this,16))};_.bd=function lEd(a,b){return mmb(),new Jib(jmb,a,b)};_.Pc=function mEd(){return De((mmb(),jmb))};_.Qc=function nEd(a){return mmb(),Ee(jmb,a)};_.sj=function aEd(){return mmb(),mmb(),kmb};var S4=mdb(Tte,'ECollections/EmptyUnmodifiableEMap',1311);var U4=odb(Tte,'Enumerator');var oEd;bcb(281,1,{281:1},NEd);_.Fb=function REd(a){var b;if(this===a)return true;if(!JD(a,281))return false;b=BD(a,281);return this.f==b.f&&TEd(this.i,b.i)&&SEd(this.a,(this.f&256)!=0?(b.f&256)!=0?b.a:null:(b.f&256)!=0?null:b.a)&&SEd(this.d,b.d)&&SEd(this.g,b.g)&&SEd(this.e,b.e)&&KEd(this,b)};_.Hb=function WEd(){return this.f};_.Ib=function cFd(){return LEd(this)};_.f=0;var sEd=0,tEd=0,uEd=0,vEd=0,wEd=0,xEd=0,yEd=0,zEd=0,AEd=0,BEd,CEd=0,DEd=0,EEd=0,FEd=0,GEd,HEd;var Z4=mdb(Tte,'URI',281);bcb(1091,43,fke,mFd);_.zc=function nFd(a,b){return BD(Shb(this,GD(a),BD(b,281)),281)};var Y4=mdb(Tte,'URI/URICache',1091);bcb(497,63,oue,oFd,pFd);_.hi=function qFd(){return true};var $4=mdb(Tte,'UniqueEList',497);bcb(581,60,Tie,rFd);var _4=mdb(Tte,'WrappedException',581);var a5=odb(Vse,nve);var v5=odb(Vse,ove);var t5=odb(Vse,pve);var b5=odb(Vse,qve);var d5=odb(Vse,rve);var c5=odb(Vse,'EClass');var f5=odb(Vse,'EDataType');var sFd;bcb(1183,43,fke,vFd);_.xc=function wFd(a){return ND(a)?Phb(this,a):Wd(irb(this.f,a))};var e5=mdb(Vse,'EDataType/Internal/ConversionDelegate/Factory/Registry/Impl',1183);var h5=odb(Vse,'EEnum');var g5=odb(Vse,sve);var j5=odb(Vse,tve);var n5=odb(Vse,uve);var xFd;var p5=odb(Vse,vve);var q5=odb(Vse,wve);bcb(1029,1,{},BFd);_.Ib=function CFd(){return 'NIL'};var r5=mdb(Vse,'EStructuralFeature/Internal/DynamicValueHolder/1',1029);var DFd;bcb(1028,43,fke,GFd);_.xc=function HFd(a){return ND(a)?Phb(this,a):Wd(irb(this.f,a))};var s5=mdb(Vse,'EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl',1028);var u5=odb(Vse,xve);var w5=odb(Vse,'EValidator/PatternMatcher');var IFd;var KFd;var MFd;var OFd,PFd,QFd,RFd,SFd,TFd,UFd,VFd,WFd,XFd,YFd,ZFd,$Fd,_Fd,aGd,bGd,cGd,dGd,eGd,fGd,gGd,hGd,iGd;var E9=odb(yve,'FeatureMap/Entry');bcb(535,1,{72:1},kGd);_.ak=function lGd(){return this.a};_.dd=function mGd(){return this.b};var x5=mdb(qte,'BasicEObjectImpl/1',535);bcb(1027,1,zve,nGd);_.Wj=function oGd(a){return hid(this.a,this.b,a)};_.fj=function pGd(){return nid(this.a,this.b)};_.Wb=function qGd(a){zid(this.a,this.b,a)};_.Xj=function rGd(){Did(this.a,this.b)};var y5=mdb(qte,'BasicEObjectImpl/4',1027);bcb(1983,1,{108:1});_.bk=function uGd(a){this.e=a==0?sGd:KC(SI,Uhe,1,a,5,1)};_.Ch=function vGd(a){return this.e[a]};_.Dh=function wGd(a,b){this.e[a]=b};_.Eh=function xGd(a){this.e[a]=null};_.ck=function yGd(){return this.c};_.dk=function zGd(){throw vbb(new bgb)};_.ek=function AGd(){throw vbb(new bgb)};_.fk=function BGd(){return this.d};_.gk=function CGd(){return this.e!=null};_.hk=function DGd(a){this.c=a};_.ik=function EGd(a){throw vbb(new bgb)};_.jk=function FGd(a){throw vbb(new bgb)};_.kk=function GGd(a){this.d=a};var sGd;var z5=mdb(qte,'BasicEObjectImpl/EPropertiesHolderBaseImpl',1983);bcb(185,1983,{108:1},HGd);_.dk=function IGd(){return this.a};_.ek=function JGd(){return this.b};_.ik=function KGd(a){this.a=a};_.jk=function LGd(a){this.b=a};var A5=mdb(qte,'BasicEObjectImpl/EPropertiesHolderImpl',185);bcb(506,97,pte,MGd);_.Kg=function NGd(){return this.f};_.Pg=function OGd(){return this.k};_.Rg=function PGd(a,b){this.g=a;this.i=b};_.Tg=function QGd(){return (this.j&2)==0?this.zh():this.ph().ck()};_.Vg=function RGd(){return this.i};_.Mg=function SGd(){return (this.j&1)!=0};_.eh=function TGd(){return this.g};_.kh=function UGd(){return (this.j&4)!=0};_.ph=function VGd(){return !this.k&&(this.k=new HGd),this.k};_.th=function WGd(a){this.ph().hk(a);a?(this.j|=2):(this.j&=-3)};_.vh=function XGd(a){this.ph().jk(a);a?(this.j|=4):(this.j&=-5)};_.zh=function YGd(){return (NFd(),MFd).S};_.i=0;_.j=1;var l6=mdb(qte,'EObjectImpl',506);bcb(780,506,{105:1,92:1,90:1,56:1,108:1,49:1,97:1},_Gd);_.Ch=function aHd(a){return this.e[a]};_.Dh=function bHd(a,b){this.e[a]=b};_.Eh=function cHd(a){this.e[a]=null};_.Tg=function dHd(){return this.d};_.Yg=function eHd(a){return bLd(this.d,a)};_.$g=function fHd(){return this.d};_.dh=function gHd(){return this.e!=null};_.ph=function hHd(){!this.k&&(this.k=new vHd);return this.k};_.th=function iHd(a){this.d=a};_.yh=function jHd(){var a;if(this.e==null){a=aLd(this.d);this.e=a==0?ZGd:KC(SI,Uhe,1,a,5,1)}return this};_.Ah=function kHd(){return 0};var ZGd;var E5=mdb(qte,'DynamicEObjectImpl',780);bcb(1376,780,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1},lHd);_.Fb=function nHd(a){return this===a};_.Hb=function rHd(){return FCb(this)};_.th=function mHd(a){this.d=a;this.b=YKd(a,'key');this.c=YKd(a,Bte)};_.Sh=function oHd(){var a;if(this.a==-1){a=iid(this,this.b);this.a=a==null?0:tb(a)}return this.a};_.cd=function pHd(){return iid(this,this.b)};_.dd=function qHd(){return iid(this,this.c)};_.Th=function sHd(a){this.a=a};_.Uh=function tHd(a){zid(this,this.b,a)};_.ed=function uHd(a){var b;b=iid(this,this.c);zid(this,this.c,a);return b};_.a=0;var C5=mdb(qte,'DynamicEObjectImpl/BasicEMapEntry',1376);bcb(1377,1,{108:1},vHd);_.bk=function wHd(a){throw vbb(new bgb)};_.Ch=function xHd(a){throw vbb(new bgb)};_.Dh=function yHd(a,b){throw vbb(new bgb)};_.Eh=function zHd(a){throw vbb(new bgb)};_.ck=function AHd(){throw vbb(new bgb)};_.dk=function BHd(){return this.a};_.ek=function CHd(){return this.b};_.fk=function DHd(){return this.c};_.gk=function EHd(){throw vbb(new bgb)};_.hk=function FHd(a){throw vbb(new bgb)};_.ik=function GHd(a){this.a=a};_.jk=function HHd(a){this.b=a};_.kk=function IHd(a){this.c=a};var D5=mdb(qte,'DynamicEObjectImpl/DynamicEPropertiesHolderImpl',1377);bcb(510,150,{105:1,92:1,90:1,590:1,147:1,56:1,108:1,49:1,97:1,510:1,150:1,114:1,115:1},RHd);_.Qg=function SHd(a){return KHd(this,a)};_._g=function THd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.d;case 2:return c?(!this.b&&(this.b=new sId((jGd(),fGd),x6,this)),this.b):(!this.b&&(this.b=new sId((jGd(),fGd),x6,this)),FAd(this.b));case 3:return MHd(this);case 4:return !this.a&&(this.a=new xMd(m5,this,4)),this.a;case 5:return !this.c&&(this.c=new _4d(m5,this,5)),this.c;}return bid(this,a-aLd((jGd(),OFd)),XKd((d=BD(Ajd(this,16),26),!d?OFd:d),a),b,c)};_.hh=function UHd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 3:!!this.Cb&&(c=(e=this.Db>>16,e>=0?KHd(this,c):this.Cb.ih(this,-1-e,null,c)));return JHd(this,BD(a,147),c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),OFd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),OFd)),a,c)};_.jh=function VHd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 2:return !this.b&&(this.b=new sId((jGd(),fGd),x6,this)),bId(this.b,a,c);case 3:return JHd(this,null,c);case 4:return !this.a&&(this.a=new xMd(m5,this,4)),Txd(this.a,a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),OFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),OFd)),a,c)};_.lh=function WHd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.d!=null;case 2:return !!this.b&&this.b.f!=0;case 3:return !!MHd(this);case 4:return !!this.a&&this.a.i!=0;case 5:return !!this.c&&this.c.i!=0;}return cid(this,a-aLd((jGd(),OFd)),XKd((b=BD(Ajd(this,16),26),!b?OFd:b),a))};_.sh=function XHd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:OHd(this,GD(b));return;case 2:!this.b&&(this.b=new sId((jGd(),fGd),x6,this));cId(this.b,b);return;case 3:NHd(this,BD(b,147));return;case 4:!this.a&&(this.a=new xMd(m5,this,4));Uxd(this.a);!this.a&&(this.a=new xMd(m5,this,4));ytd(this.a,BD(b,14));return;case 5:!this.c&&(this.c=new _4d(m5,this,5));Uxd(this.c);!this.c&&(this.c=new _4d(m5,this,5));ytd(this.c,BD(b,14));return;}did(this,a-aLd((jGd(),OFd)),XKd((c=BD(Ajd(this,16),26),!c?OFd:c),a),b)};_.zh=function YHd(){return jGd(),OFd};_.Bh=function ZHd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:PHd(this,null);return;case 2:!this.b&&(this.b=new sId((jGd(),fGd),x6,this));this.b.c.$b();return;case 3:NHd(this,null);return;case 4:!this.a&&(this.a=new xMd(m5,this,4));Uxd(this.a);return;case 5:!this.c&&(this.c=new _4d(m5,this,5));Uxd(this.c);return;}eid(this,a-aLd((jGd(),OFd)),XKd((b=BD(Ajd(this,16),26),!b?OFd:b),a))};_.Ib=function $Hd(){return QHd(this)};_.d=null;var G5=mdb(qte,'EAnnotationImpl',510);bcb(151,705,Ave,dId);_.Xh=function eId(a,b){_Hd(this,a,BD(b,42))};_.lk=function fId(a,b){return aId(this,BD(a,42),b)};_.pi=function gId(a){return BD(BD(this.c,69).pi(a),133)};_.Zh=function hId(){return BD(this.c,69).Zh()};_.$h=function iId(){return BD(this.c,69).$h()};_._h=function jId(a){return BD(this.c,69)._h(a)};_.mk=function kId(a,b){return bId(this,a,b)};_.Wj=function lId(a){return BD(this.c,76).Wj(a)};_.rj=function mId(){};_.fj=function nId(){return BD(this.c,76).fj()};_.tj=function oId(a,b,c){var d;d=BD(bKd(this.b).Nh().Jh(this.b),133);d.Th(a);d.Uh(b);d.ed(c);return d};_.uj=function pId(){return new W5d(this)};_.Wb=function qId(a){cId(this,a)};_.Xj=function rId(){BD(this.c,76).Xj()};var y9=mdb(yve,'EcoreEMap',151);bcb(158,151,Ave,sId);_.qj=function tId(){var a,b,c,d,e,f;if(this.d==null){f=KC(y4,jve,63,2*this.f+1,0,1);for(c=this.c.Kc();c.e!=c.i.gc();){b=BD(c.nj(),133);d=b.Sh();e=(d&Ohe)%f.length;a=f[e];!a&&(a=f[e]=new W5d(this));a.Fc(b)}this.d=f}};var F5=mdb(qte,'EAnnotationImpl/1',158);bcb(284,438,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,472:1,49:1,97:1,150:1,284:1,114:1,115:1});_._g=function GId(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),this.$j()?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;}return bid(this,a-aLd(this.zh()),XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),a),b,c)};_.jh=function HId(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 9:return vId(this,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),e.Nj().Rj(this,yjd(this),b-aLd(this.zh()),a,c)};_.lh=function IId(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.$j();case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);}return cid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.sh=function JId(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:this.Lh(GD(b));return;case 2:BId(this,Ccb(DD(b)));return;case 3:CId(this,Ccb(DD(b)));return;case 4:AId(this,BD(b,19).a);return;case 5:this.ok(BD(b,19).a);return;case 8:yId(this,BD(b,138));return;case 9:d=xId(this,BD(b,87),null);!!d&&d.Fi();return;}did(this,a-aLd(this.zh()),XKd((c=BD(Ajd(this,16),26),!c?this.zh():c),a),b)};_.zh=function KId(){return jGd(),hGd};_.Bh=function LId(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:this.Lh(null);return;case 2:BId(this,true);return;case 3:CId(this,true);return;case 4:AId(this,0);return;case 5:this.ok(1);return;case 8:yId(this,null);return;case 9:c=xId(this,null,null);!!c&&c.Fi();return;}eid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.Gh=function MId(){wId(this);this.Bb|=1};_.Yj=function NId(){return wId(this)};_.Zj=function OId(){return this.t};_.$j=function PId(){var a;return a=this.t,a>1||a==-1};_.hi=function QId(){return (this.Bb&512)!=0};_.nk=function RId(a,b){return zId(this,a,b)};_.ok=function SId(a){DId(this,a)};_.Ib=function TId(){return EId(this)};_.s=0;_.t=1;var v7=mdb(qte,'ETypedElementImpl',284);bcb(449,284,{105:1,92:1,90:1,147:1,191:1,56:1,170:1,66:1,108:1,472:1,49:1,97:1,150:1,449:1,284:1,114:1,115:1,677:1});_.Qg=function iJd(a){return UId(this,a)};_._g=function jJd(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),this.$j()?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;case 10:return Bcb(),(this.Bb&zte)!=0?true:false;case 11:return Bcb(),(this.Bb&Dve)!=0?true:false;case 12:return Bcb(),(this.Bb&Rje)!=0?true:false;case 13:return this.j;case 14:return VId(this);case 15:return Bcb(),(this.Bb&Cve)!=0?true:false;case 16:return Bcb(),(this.Bb&oie)!=0?true:false;case 17:return WId(this);}return bid(this,a-aLd(this.zh()),XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),a),b,c)};_.hh=function kJd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 17:!!this.Cb&&(c=(e=this.Db>>16,e>=0?UId(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,17,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),f.Nj().Qj(this,yjd(this),b-aLd(this.zh()),a,c)};_.jh=function lJd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 9:return vId(this,c);case 17:return _hd(this,null,17,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),e.Nj().Rj(this,yjd(this),b-aLd(this.zh()),a,c)};_.lh=function mJd(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return this.$j();case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);case 10:return (this.Bb&zte)==0;case 11:return (this.Bb&Dve)!=0;case 12:return (this.Bb&Rje)!=0;case 13:return this.j!=null;case 14:return VId(this)!=null;case 15:return (this.Bb&Cve)!=0;case 16:return (this.Bb&oie)!=0;case 17:return !!WId(this);}return cid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.sh=function nJd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:cJd(this,GD(b));return;case 2:BId(this,Ccb(DD(b)));return;case 3:CId(this,Ccb(DD(b)));return;case 4:AId(this,BD(b,19).a);return;case 5:this.ok(BD(b,19).a);return;case 8:yId(this,BD(b,138));return;case 9:d=xId(this,BD(b,87),null);!!d&&d.Fi();return;case 10:ZId(this,Ccb(DD(b)));return;case 11:fJd(this,Ccb(DD(b)));return;case 12:dJd(this,Ccb(DD(b)));return;case 13:$Id(this,GD(b));return;case 15:eJd(this,Ccb(DD(b)));return;case 16:aJd(this,Ccb(DD(b)));return;}did(this,a-aLd(this.zh()),XKd((c=BD(Ajd(this,16),26),!c?this.zh():c),a),b)};_.zh=function oJd(){return jGd(),gGd};_.Bh=function pJd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,88)&&XMd($Kd(BD(this.Cb,88)),4);pnd(this,null);return;case 2:BId(this,true);return;case 3:CId(this,true);return;case 4:AId(this,0);return;case 5:this.ok(1);return;case 8:yId(this,null);return;case 9:c=xId(this,null,null);!!c&&c.Fi();return;case 10:ZId(this,true);return;case 11:fJd(this,false);return;case 12:dJd(this,false);return;case 13:this.i=null;_Id(this,null);return;case 15:eJd(this,false);return;case 16:aJd(this,false);return;}eid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.Gh=function qJd(){a2d(q1d((O6d(),M6d),this));wId(this);this.Bb|=1};_.Gj=function rJd(){return this.f};_.zj=function sJd(){return VId(this)};_.Hj=function tJd(){return WId(this)};_.Lj=function uJd(){return null};_.pk=function vJd(){return this.k};_.aj=function wJd(){return this.n};_.Mj=function xJd(){return XId(this)};_.Nj=function yJd(){var a,b,c,d,e,f,g,h,i;if(!this.p){c=WId(this);(c.i==null&&TKd(c),c.i).length;d=this.Lj();!!d&&aLd(WId(d));e=wId(this);g=e.Bj();a=!g?null:(g.i&1)!=0?g==sbb?wI:g==WD?JI:g==VD?FI:g==UD?BI:g==XD?MI:g==rbb?UI:g==SD?xI:yI:g;b=VId(this);h=e.zj();n6d(this);(this.Bb&oie)!=0&&(!!(f=t1d((O6d(),M6d),c))&&f!=this||!!(f=_1d(q1d(M6d,this))))?(this.p=new zVd(this,f)):this.$j()?this.rk()?!d?(this.Bb&Cve)!=0?!a?this.sk()?(this.p=new KVd(42,this)):(this.p=new KVd(0,this)):a==CK?(this.p=new IVd(50,J4,this)):this.sk()?(this.p=new IVd(43,a,this)):(this.p=new IVd(1,a,this)):!a?this.sk()?(this.p=new KVd(44,this)):(this.p=new KVd(2,this)):a==CK?(this.p=new IVd(41,J4,this)):this.sk()?(this.p=new IVd(45,a,this)):(this.p=new IVd(3,a,this)):(this.Bb&Cve)!=0?!a?this.sk()?(this.p=new LVd(46,this,d)):(this.p=new LVd(4,this,d)):this.sk()?(this.p=new JVd(47,a,this,d)):(this.p=new JVd(5,a,this,d)):!a?this.sk()?(this.p=new LVd(48,this,d)):(this.p=new LVd(6,this,d)):this.sk()?(this.p=new JVd(49,a,this,d)):(this.p=new JVd(7,a,this,d)):JD(e,148)?a==E9?(this.p=new KVd(40,this)):(this.Bb&512)!=0?(this.Bb&Cve)!=0?!a?(this.p=new KVd(8,this)):(this.p=new IVd(9,a,this)):!a?(this.p=new KVd(10,this)):(this.p=new IVd(11,a,this)):(this.Bb&Cve)!=0?!a?(this.p=new KVd(12,this)):(this.p=new IVd(13,a,this)):!a?(this.p=new KVd(14,this)):(this.p=new IVd(15,a,this)):!d?this.sk()?(this.Bb&Cve)!=0?!a?(this.p=new KVd(16,this)):(this.p=new IVd(17,a,this)):!a?(this.p=new KVd(18,this)):(this.p=new IVd(19,a,this)):(this.Bb&Cve)!=0?!a?(this.p=new KVd(20,this)):(this.p=new IVd(21,a,this)):!a?(this.p=new KVd(22,this)):(this.p=new IVd(23,a,this)):(i=d.t,i>1||i==-1?this.sk()?(this.Bb&Cve)!=0?!a?(this.p=new LVd(24,this,d)):(this.p=new JVd(25,a,this,d)):!a?(this.p=new LVd(26,this,d)):(this.p=new JVd(27,a,this,d)):(this.Bb&Cve)!=0?!a?(this.p=new LVd(28,this,d)):(this.p=new JVd(29,a,this,d)):!a?(this.p=new LVd(30,this,d)):(this.p=new JVd(31,a,this,d)):this.sk()?(this.Bb&Cve)!=0?!a?(this.p=new LVd(32,this,d)):(this.p=new JVd(33,a,this,d)):!a?(this.p=new LVd(34,this,d)):(this.p=new JVd(35,a,this,d)):(this.Bb&Cve)!=0?!a?(this.p=new LVd(36,this,d)):(this.p=new JVd(37,a,this,d)):!a?(this.p=new LVd(38,this,d)):(this.p=new JVd(39,a,this,d))):this.qk()?this.sk()?(this.p=new kWd(BD(e,26),this,d)):(this.p=new cWd(BD(e,26),this,d)):JD(e,148)?a==E9?(this.p=new KVd(40,this)):(this.Bb&Cve)!=0?!a?(this.p=new jXd(BD(e,148),b,h,this)):(this.p=new lXd(b,h,this,(CWd(),g==WD?yWd:g==sbb?tWd:g==XD?zWd:g==VD?xWd:g==UD?wWd:g==rbb?BWd:g==SD?uWd:g==TD?vWd:AWd))):!a?(this.p=new cXd(BD(e,148),b,h,this)):(this.p=new eXd(b,h,this,(CWd(),g==WD?yWd:g==sbb?tWd:g==XD?zWd:g==VD?xWd:g==UD?wWd:g==rbb?BWd:g==SD?uWd:g==TD?vWd:AWd))):this.rk()?!d?(this.Bb&Cve)!=0?this.sk()?(this.p=new FXd(BD(e,26),this)):(this.p=new DXd(BD(e,26),this)):this.sk()?(this.p=new BXd(BD(e,26),this)):(this.p=new zXd(BD(e,26),this)):(this.Bb&Cve)!=0?this.sk()?(this.p=new NXd(BD(e,26),this,d)):(this.p=new LXd(BD(e,26),this,d)):this.sk()?(this.p=new JXd(BD(e,26),this,d)):(this.p=new HXd(BD(e,26),this,d)):this.sk()?!d?(this.Bb&Cve)!=0?(this.p=new RXd(BD(e,26),this)):(this.p=new PXd(BD(e,26),this)):(this.Bb&Cve)!=0?(this.p=new VXd(BD(e,26),this,d)):(this.p=new TXd(BD(e,26),this,d)):!d?(this.Bb&Cve)!=0?(this.p=new XXd(BD(e,26),this)):(this.p=new nXd(BD(e,26),this)):(this.Bb&Cve)!=0?(this.p=new _Xd(BD(e,26),this,d)):(this.p=new ZXd(BD(e,26),this,d))}return this.p};_.Ij=function zJd(){return (this.Bb&zte)!=0};_.qk=function AJd(){return false};_.rk=function BJd(){return false};_.Jj=function CJd(){return (this.Bb&oie)!=0};_.Oj=function DJd(){return YId(this)};_.sk=function EJd(){return false};_.Kj=function FJd(){return (this.Bb&Cve)!=0};_.tk=function GJd(a){this.k=a};_.Lh=function HJd(a){cJd(this,a)};_.Ib=function IJd(){return gJd(this)};_.e=false;_.n=0;var n7=mdb(qte,'EStructuralFeatureImpl',449);bcb(322,449,{105:1,92:1,90:1,34:1,147:1,191:1,56:1,170:1,66:1,108:1,472:1,49:1,97:1,322:1,150:1,449:1,284:1,114:1,115:1,677:1},OJd);_._g=function PJd(a,b,c){var d,e;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),LJd(this)?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;case 10:return Bcb(),(this.Bb&zte)!=0?true:false;case 11:return Bcb(),(this.Bb&Dve)!=0?true:false;case 12:return Bcb(),(this.Bb&Rje)!=0?true:false;case 13:return this.j;case 14:return VId(this);case 15:return Bcb(),(this.Bb&Cve)!=0?true:false;case 16:return Bcb(),(this.Bb&oie)!=0?true:false;case 17:return WId(this);case 18:return Bcb(),(this.Bb&ote)!=0?true:false;case 19:if(b)return KJd(this);return JJd(this);}return bid(this,a-aLd((jGd(),PFd)),XKd((d=BD(Ajd(this,16),26),!d?PFd:d),a),b,c)};_.lh=function QJd(a){var b,c;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return LJd(this);case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);case 10:return (this.Bb&zte)==0;case 11:return (this.Bb&Dve)!=0;case 12:return (this.Bb&Rje)!=0;case 13:return this.j!=null;case 14:return VId(this)!=null;case 15:return (this.Bb&Cve)!=0;case 16:return (this.Bb&oie)!=0;case 17:return !!WId(this);case 18:return (this.Bb&ote)!=0;case 19:return !!JJd(this);}return cid(this,a-aLd((jGd(),PFd)),XKd((b=BD(Ajd(this,16),26),!b?PFd:b),a))};_.sh=function RJd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:cJd(this,GD(b));return;case 2:BId(this,Ccb(DD(b)));return;case 3:CId(this,Ccb(DD(b)));return;case 4:AId(this,BD(b,19).a);return;case 5:NJd(this,BD(b,19).a);return;case 8:yId(this,BD(b,138));return;case 9:d=xId(this,BD(b,87),null);!!d&&d.Fi();return;case 10:ZId(this,Ccb(DD(b)));return;case 11:fJd(this,Ccb(DD(b)));return;case 12:dJd(this,Ccb(DD(b)));return;case 13:$Id(this,GD(b));return;case 15:eJd(this,Ccb(DD(b)));return;case 16:aJd(this,Ccb(DD(b)));return;case 18:MJd(this,Ccb(DD(b)));return;}did(this,a-aLd((jGd(),PFd)),XKd((c=BD(Ajd(this,16),26),!c?PFd:c),a),b)};_.zh=function SJd(){return jGd(),PFd};_.Bh=function TJd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,88)&&XMd($Kd(BD(this.Cb,88)),4);pnd(this,null);return;case 2:BId(this,true);return;case 3:CId(this,true);return;case 4:AId(this,0);return;case 5:this.b=0;DId(this,1);return;case 8:yId(this,null);return;case 9:c=xId(this,null,null);!!c&&c.Fi();return;case 10:ZId(this,true);return;case 11:fJd(this,false);return;case 12:dJd(this,false);return;case 13:this.i=null;_Id(this,null);return;case 15:eJd(this,false);return;case 16:aJd(this,false);return;case 18:MJd(this,false);return;}eid(this,a-aLd((jGd(),PFd)),XKd((b=BD(Ajd(this,16),26),!b?PFd:b),a))};_.Gh=function UJd(){KJd(this);a2d(q1d((O6d(),M6d),this));wId(this);this.Bb|=1};_.$j=function VJd(){return LJd(this)};_.nk=function WJd(a,b){this.b=0;this.a=null;return zId(this,a,b)};_.ok=function XJd(a){NJd(this,a)};_.Ib=function YJd(){var a;if((this.Db&64)!=0)return gJd(this);a=new Jfb(gJd(this));a.a+=' (iD: ';Ffb(a,(this.Bb&ote)!=0);a.a+=')';return a.a};_.b=0;var H5=mdb(qte,'EAttributeImpl',322);bcb(351,438,{105:1,92:1,90:1,138:1,147:1,191:1,56:1,108:1,49:1,97:1,351:1,150:1,114:1,115:1,676:1});_.uk=function nKd(a){return a.Tg()==this};_.Qg=function oKd(a){return aKd(this,a)};_.Rg=function pKd(a,b){this.w=null;this.Db=b<<16|this.Db&255;this.Cb=a};_._g=function qKd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return dKd(this);case 4:return this.zj();case 5:return this.F;case 6:if(b)return bKd(this);return ZJd(this);case 7:return !this.A&&(this.A=new K4d(u5,this,7)),this.A;}return bid(this,a-aLd(this.zh()),XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),a),b,c)};_.hh=function rKd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?aKd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,6,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),f.Nj().Qj(this,yjd(this),b-aLd(this.zh()),a,c)};_.jh=function sKd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 6:return _hd(this,null,6,c);case 7:return !this.A&&(this.A=new K4d(u5,this,7)),Txd(this.A,a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?this.zh():d),b),66),e.Nj().Rj(this,yjd(this),b-aLd(this.zh()),a,c)};_.lh=function tKd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!dKd(this);case 4:return this.zj()!=null;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!ZJd(this);case 7:return !!this.A&&this.A.i!=0;}return cid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.sh=function uKd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:lKd(this,GD(b));return;case 2:iKd(this,GD(b));return;case 5:kKd(this,GD(b));return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);!this.A&&(this.A=new K4d(u5,this,7));ytd(this.A,BD(b,14));return;}did(this,a-aLd(this.zh()),XKd((c=BD(Ajd(this,16),26),!c?this.zh():c),a),b)};_.zh=function vKd(){return jGd(),RFd};_.Bh=function wKd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,179)&&(BD(this.Cb,179).tb=null);pnd(this,null);return;case 2:$Jd(this,null);_Jd(this,this.D);return;case 5:kKd(this,null);return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);return;}eid(this,a-aLd(this.zh()),XKd((b=BD(Ajd(this,16),26),!b?this.zh():b),a))};_.yj=function xKd(){var a;return this.G==-1&&(this.G=(a=bKd(this),a?HLd(a.Mh(),this):-1)),this.G};_.zj=function yKd(){return null};_.Aj=function zKd(){return bKd(this)};_.vk=function AKd(){return this.v};_.Bj=function BKd(){return dKd(this)};_.Cj=function CKd(){return this.D!=null?this.D:this.B};_.Dj=function DKd(){return this.F};_.wj=function EKd(a){return fKd(this,a)};_.wk=function FKd(a){this.v=a};_.xk=function GKd(a){gKd(this,a)};_.yk=function HKd(a){this.C=a};_.Lh=function IKd(a){lKd(this,a)};_.Ib=function JKd(){return mKd(this)};_.C=null;_.D=null;_.G=-1;var Z5=mdb(qte,'EClassifierImpl',351);bcb(88,351,{105:1,92:1,90:1,26:1,138:1,147:1,191:1,56:1,108:1,49:1,97:1,88:1,351:1,150:1,473:1,114:1,115:1,676:1},hLd);_.uk=function iLd(a){return dLd(this,a.Tg())};_._g=function jLd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.D!=null?this.D:this.B;case 3:return dKd(this);case 4:return null;case 5:return this.F;case 6:if(b)return bKd(this);return ZJd(this);case 7:return !this.A&&(this.A=new K4d(u5,this,7)),this.A;case 8:return Bcb(),(this.Bb&256)!=0?true:false;case 9:return Bcb(),(this.Bb&512)!=0?true:false;case 10:return _Kd(this);case 11:return !this.q&&(this.q=new cUd(n5,this,11,10)),this.q;case 12:return OKd(this);case 13:return SKd(this);case 14:return SKd(this),this.r;case 15:return OKd(this),this.k;case 16:return PKd(this);case 17:return RKd(this);case 18:return TKd(this);case 19:return UKd(this);case 20:return OKd(this),this.o;case 21:return !this.s&&(this.s=new cUd(t5,this,21,17)),this.s;case 22:return VKd(this);case 23:return QKd(this);}return bid(this,a-aLd((jGd(),QFd)),XKd((d=BD(Ajd(this,16),26),!d?QFd:d),a),b,c)};_.hh=function kLd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 6:!!this.Cb&&(c=(e=this.Db>>16,e>=0?aKd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,6,c);case 11:return !this.q&&(this.q=new cUd(n5,this,11,10)),Sxd(this.q,a,c);case 21:return !this.s&&(this.s=new cUd(t5,this,21,17)),Sxd(this.s,a,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),QFd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),QFd)),a,c)};_.jh=function lLd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 6:return _hd(this,null,6,c);case 7:return !this.A&&(this.A=new K4d(u5,this,7)),Txd(this.A,a,c);case 11:return !this.q&&(this.q=new cUd(n5,this,11,10)),Txd(this.q,a,c);case 21:return !this.s&&(this.s=new cUd(t5,this,21,17)),Txd(this.s,a,c);case 22:return Txd(VKd(this),a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),QFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),QFd)),a,c)};_.lh=function mLd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!dKd(this);case 4:return false;case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!ZJd(this);case 7:return !!this.A&&this.A.i!=0;case 8:return (this.Bb&256)!=0;case 9:return (this.Bb&512)!=0;case 10:return !!this.u&&VKd(this.u.a).i!=0&&!(!!this.n&&FMd(this.n));case 11:return !!this.q&&this.q.i!=0;case 12:return OKd(this).i!=0;case 13:return SKd(this).i!=0;case 14:return SKd(this),this.r.i!=0;case 15:return OKd(this),this.k.i!=0;case 16:return PKd(this).i!=0;case 17:return RKd(this).i!=0;case 18:return TKd(this).i!=0;case 19:return UKd(this).i!=0;case 20:return OKd(this),!!this.o;case 21:return !!this.s&&this.s.i!=0;case 22:return !!this.n&&FMd(this.n);case 23:return QKd(this).i!=0;}return cid(this,a-aLd((jGd(),QFd)),XKd((b=BD(Ajd(this,16),26),!b?QFd:b),a))};_.oh=function nLd(a){var b;b=this.i==null||!!this.q&&this.q.i!=0?null:YKd(this,a);return b?b:Bmd(this,a)};_.sh=function oLd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:lKd(this,GD(b));return;case 2:iKd(this,GD(b));return;case 5:kKd(this,GD(b));return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);!this.A&&(this.A=new K4d(u5,this,7));ytd(this.A,BD(b,14));return;case 8:eLd(this,Ccb(DD(b)));return;case 9:fLd(this,Ccb(DD(b)));return;case 10:vwd(_Kd(this));ytd(_Kd(this),BD(b,14));return;case 11:!this.q&&(this.q=new cUd(n5,this,11,10));Uxd(this.q);!this.q&&(this.q=new cUd(n5,this,11,10));ytd(this.q,BD(b,14));return;case 21:!this.s&&(this.s=new cUd(t5,this,21,17));Uxd(this.s);!this.s&&(this.s=new cUd(t5,this,21,17));ytd(this.s,BD(b,14));return;case 22:Uxd(VKd(this));ytd(VKd(this),BD(b,14));return;}did(this,a-aLd((jGd(),QFd)),XKd((c=BD(Ajd(this,16),26),!c?QFd:c),a),b)};_.zh=function pLd(){return jGd(),QFd};_.Bh=function qLd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,179)&&(BD(this.Cb,179).tb=null);pnd(this,null);return;case 2:$Jd(this,null);_Jd(this,this.D);return;case 5:kKd(this,null);return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);return;case 8:eLd(this,false);return;case 9:fLd(this,false);return;case 10:!!this.u&&vwd(this.u);return;case 11:!this.q&&(this.q=new cUd(n5,this,11,10));Uxd(this.q);return;case 21:!this.s&&(this.s=new cUd(t5,this,21,17));Uxd(this.s);return;case 22:!!this.n&&Uxd(this.n);return;}eid(this,a-aLd((jGd(),QFd)),XKd((b=BD(Ajd(this,16),26),!b?QFd:b),a))};_.Gh=function rLd(){var a,b;OKd(this);SKd(this);PKd(this);RKd(this);TKd(this);UKd(this);QKd(this);oud(SMd($Kd(this)));if(this.s){for(a=0,b=this.s.i;a=0;--b){qud(this,b)}}return xud(this,a)};_.Xj=function nMd(){Uxd(this)};_.oi=function oMd(a,b){return LLd(this,a,b)};var t9=mdb(yve,'EcoreEList',622);bcb(496,622,Pve,pMd);_.ai=function qMd(){return false};_.aj=function rMd(){return this.c};_.bj=function sMd(){return false};_.Fk=function tMd(){return true};_.hi=function uMd(){return true};_.li=function vMd(a,b){return b};_.ni=function wMd(){return false};_.c=0;var d9=mdb(yve,'EObjectEList',496);bcb(85,496,Pve,xMd);_.bj=function yMd(){return true};_.Dk=function zMd(){return false};_.rk=function AMd(){return true};var Z8=mdb(yve,'EObjectContainmentEList',85);bcb(545,85,Pve,BMd);_.ci=function CMd(){this.b=true};_.fj=function DMd(){return this.b};_.Xj=function EMd(){var a;Uxd(this);if(oid(this.e)){a=this.b;this.b=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.b=false}};_.b=false;var Y8=mdb(yve,'EObjectContainmentEList/Unsettable',545);bcb(1140,545,Pve,JMd);_.ii=function NMd(a,b){var c,d;return c=BD(Wxd(this,a,b),87),oid(this.e)&&GLd(this,new ESd(this.a,7,(jGd(),SFd),meb(b),(d=c.c,JD(d,88)?BD(d,26):_Fd),a)),c};_.jj=function OMd(a,b){return GMd(this,BD(a,87),b)};_.kj=function PMd(a,b){return HMd(this,BD(a,87),b)};_.lj=function QMd(a,b,c){return IMd(this,BD(a,87),BD(b,87),c)};_.Zi=function KMd(a,b,c,d,e){switch(a){case 3:{return FLd(this,a,b,c,d,this.i>1)}case 5:{return FLd(this,a,b,c,d,this.i-BD(c,15).gc()>0)}default:{return new pSd(this.e,a,this.c,b,c,d,true)}}};_.ij=function LMd(){return true};_.fj=function MMd(){return FMd(this)};_.Xj=function RMd(){Uxd(this)};var N5=mdb(qte,'EClassImpl/1',1140);bcb(1154,1153,dve);_.ui=function VMd(a){var b,c,d,e,f,g,h;c=a.xi();if(c!=8){d=UMd(a);if(d==0){switch(c){case 1:case 9:{h=a.Bi();if(h!=null){b=$Kd(BD(h,473));!b.c&&(b.c=new xYd);Ftd(b.c,a.Ai())}g=a.zi();if(g!=null){e=BD(g,473);if((e.Bb&1)==0){b=$Kd(e);!b.c&&(b.c=new xYd);wtd(b.c,BD(a.Ai(),26))}}break}case 3:{g=a.zi();if(g!=null){e=BD(g,473);if((e.Bb&1)==0){b=$Kd(e);!b.c&&(b.c=new xYd);wtd(b.c,BD(a.Ai(),26))}}break}case 5:{g=a.zi();if(g!=null){for(f=BD(g,14).Kc();f.Ob();){e=BD(f.Pb(),473);if((e.Bb&1)==0){b=$Kd(e);!b.c&&(b.c=new xYd);wtd(b.c,BD(a.Ai(),26))}}}break}case 4:{h=a.Bi();if(h!=null){e=BD(h,473);if((e.Bb&1)==0){b=$Kd(e);!b.c&&(b.c=new xYd);Ftd(b.c,a.Ai())}}break}case 6:{h=a.Bi();if(h!=null){for(f=BD(h,14).Kc();f.Ob();){e=BD(f.Pb(),473);if((e.Bb&1)==0){b=$Kd(e);!b.c&&(b.c=new xYd);Ftd(b.c,a.Ai())}}}break}}}this.Hk(d)}};_.Hk=function WMd(a){TMd(this,a)};_.b=63;var p7=mdb(qte,'ESuperAdapter',1154);bcb(1155,1154,dve,YMd);_.Hk=function ZMd(a){XMd(this,a)};var I5=mdb(qte,'EClassImpl/10',1155);bcb(1144,696,Pve);_.Vh=function $Md(a,b){return iud(this,a,b)};_.Wh=function _Md(a){return jud(this,a)};_.Xh=function aNd(a,b){kud(this,a,b)};_.Yh=function bNd(a){lud(this,a)};_.pi=function dNd(a){return nud(this,a)};_.mi=function lNd(a,b){return uud(this,a,b)};_.lk=function cNd(a,b){throw vbb(new bgb)};_.Zh=function eNd(){return new $yd(this)};_.$h=function fNd(){return new bzd(this)};_._h=function gNd(a){return ztd(this,a)};_.mk=function hNd(a,b){throw vbb(new bgb)};_.Wj=function iNd(a){return this};_.fj=function jNd(){return this.i!=0};_.Wb=function kNd(a){throw vbb(new bgb)};_.Xj=function mNd(){throw vbb(new bgb)};var s9=mdb(yve,'EcoreEList/UnmodifiableEList',1144);bcb(319,1144,Pve,nNd);_.ni=function oNd(){return false};var r9=mdb(yve,'EcoreEList/UnmodifiableEList/FastCompare',319);bcb(1147,319,Pve,rNd);_.Xc=function sNd(a){var b,c,d;if(JD(a,170)){b=BD(a,170);c=b.aj();if(c!=-1){for(d=this.i;c4){if(this.wj(a)){if(this.rk()){d=BD(a,49);c=d.Ug();h=c==this.b&&(this.Dk()?d.Og(d.Vg(),BD(XKd(wjd(this.b),this.aj()).Yj(),26).Bj())==zUd(BD(XKd(wjd(this.b),this.aj()),18)).n:-1-d.Vg()==this.aj());if(this.Ek()&&!h&&!c&&!!d.Zg()){for(e=0;e1||d==-1)}else{return false}};_.Dk=function COd(){var a,b,c;b=XKd(wjd(this.b),this.aj());if(JD(b,99)){a=BD(b,18);c=zUd(a);return !!c}else{return false}};_.Ek=function DOd(){var a,b;b=XKd(wjd(this.b),this.aj());if(JD(b,99)){a=BD(b,18);return (a.Bb&Tje)!=0}else{return false}};_.Xc=function EOd(a){var b,c,d,e;d=this.Qi(a);if(d>=0)return d;if(this.Fk()){for(c=0,e=this.Vi();c=0;--a){nOd(this,a,this.Oi(a))}}return this.Wi()};_.Qc=function QOd(a){var b;if(this.Ek()){for(b=this.Vi()-1;b>=0;--b){nOd(this,b,this.Oi(b))}}return this.Xi(a)};_.Xj=function ROd(){vwd(this)};_.oi=function SOd(a,b){return pOd(this,a,b)};var K8=mdb(yve,'DelegatingEcoreEList',742);bcb(1150,742,Uve,YOd);_.Hi=function _Od(a,b){TOd(this,a,BD(b,26))};_.Ii=function aPd(a){UOd(this,BD(a,26))};_.Oi=function gPd(a){var b,c;return b=BD(qud(VKd(this.a),a),87),c=b.c,JD(c,88)?BD(c,26):(jGd(),_Fd)};_.Ti=function lPd(a){var b,c;return b=BD(Xxd(VKd(this.a),a),87),c=b.c,JD(c,88)?BD(c,26):(jGd(),_Fd)};_.Ui=function mPd(a,b){return WOd(this,a,BD(b,26))};_.ai=function ZOd(){return false};_.Zi=function $Od(a,b,c,d,e){return null};_.Ji=function bPd(){return new EPd(this)};_.Ki=function cPd(){Uxd(VKd(this.a))};_.Li=function dPd(a){return VOd(this,a)};_.Mi=function ePd(a){var b,c;for(c=a.Kc();c.Ob();){b=c.Pb();if(!VOd(this,b)){return false}}return true};_.Ni=function fPd(a){var b,c,d;if(JD(a,15)){d=BD(a,15);if(d.gc()==VKd(this.a).i){for(b=d.Kc(),c=new Fyd(this);b.Ob();){if(PD(b.Pb())!==PD(Dyd(c))){return false}}return true}}return false};_.Pi=function hPd(){var a,b,c,d,e;c=1;for(b=new Fyd(VKd(this.a));b.e!=b.i.gc();){a=BD(Dyd(b),87);d=(e=a.c,JD(e,88)?BD(e,26):(jGd(),_Fd));c=31*c+(!d?0:FCb(d))}return c};_.Qi=function iPd(a){var b,c,d,e;d=0;for(c=new Fyd(VKd(this.a));c.e!=c.i.gc();){b=BD(Dyd(c),87);if(PD(a)===PD((e=b.c,JD(e,88)?BD(e,26):(jGd(),_Fd)))){return d}++d}return -1};_.Ri=function jPd(){return VKd(this.a).i==0};_.Si=function kPd(){return null};_.Vi=function nPd(){return VKd(this.a).i};_.Wi=function oPd(){var a,b,c,d,e,f;f=VKd(this.a).i;e=KC(SI,Uhe,1,f,5,1);c=0;for(b=new Fyd(VKd(this.a));b.e!=b.i.gc();){a=BD(Dyd(b),87);e[c++]=(d=a.c,JD(d,88)?BD(d,26):(jGd(),_Fd))}return e};_.Xi=function pPd(a){var b,c,d,e,f,g,h;h=VKd(this.a).i;if(a.lengthh&&NC(a,h,null);d=0;for(c=new Fyd(VKd(this.a));c.e!=c.i.gc();){b=BD(Dyd(c),87);f=(g=b.c,JD(g,88)?BD(g,26):(jGd(),_Fd));NC(a,d++,f)}return a};_.Yi=function qPd(){var a,b,c,d,e;e=new Hfb;e.a+='[';a=VKd(this.a);for(b=0,d=VKd(this.a).i;b>16,e>=0?aKd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,6,c);case 9:return !this.a&&(this.a=new cUd(g5,this,9,5)),Sxd(this.a,a,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),UFd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),UFd)),a,c)};_.jh=function dQd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 6:return _hd(this,null,6,c);case 7:return !this.A&&(this.A=new K4d(u5,this,7)),Txd(this.A,a,c);case 9:return !this.a&&(this.a=new cUd(g5,this,9,5)),Txd(this.a,a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),UFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),UFd)),a,c)};_.lh=function eQd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.D!=null&&this.D==this.F;case 3:return !!dKd(this);case 4:return !!$Pd(this);case 5:return this.F!=null&&this.F!=this.D&&this.F!=this.B;case 6:return !!ZJd(this);case 7:return !!this.A&&this.A.i!=0;case 8:return (this.Bb&256)==0;case 9:return !!this.a&&this.a.i!=0;}return cid(this,a-aLd((jGd(),UFd)),XKd((b=BD(Ajd(this,16),26),!b?UFd:b),a))};_.sh=function fQd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:lKd(this,GD(b));return;case 2:iKd(this,GD(b));return;case 5:kKd(this,GD(b));return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);!this.A&&(this.A=new K4d(u5,this,7));ytd(this.A,BD(b,14));return;case 8:LPd(this,Ccb(DD(b)));return;case 9:!this.a&&(this.a=new cUd(g5,this,9,5));Uxd(this.a);!this.a&&(this.a=new cUd(g5,this,9,5));ytd(this.a,BD(b,14));return;}did(this,a-aLd((jGd(),UFd)),XKd((c=BD(Ajd(this,16),26),!c?UFd:c),a),b)};_.zh=function gQd(){return jGd(),UFd};_.Bh=function hQd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,179)&&(BD(this.Cb,179).tb=null);pnd(this,null);return;case 2:$Jd(this,null);_Jd(this,this.D);return;case 5:kKd(this,null);return;case 7:!this.A&&(this.A=new K4d(u5,this,7));Uxd(this.A);return;case 8:LPd(this,true);return;case 9:!this.a&&(this.a=new cUd(g5,this,9,5));Uxd(this.a);return;}eid(this,a-aLd((jGd(),UFd)),XKd((b=BD(Ajd(this,16),26),!b?UFd:b),a))};_.Gh=function iQd(){var a,b;if(this.a){for(a=0,b=this.a.i;a>16==5?BD(this.Cb,671):null;}return bid(this,a-aLd((jGd(),VFd)),XKd((d=BD(Ajd(this,16),26),!d?VFd:d),a),b,c)};_.hh=function uQd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 5:!!this.Cb&&(c=(e=this.Db>>16,e>=0?mQd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,5,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),VFd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),VFd)),a,c)};_.jh=function vQd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 5:return _hd(this,null,5,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),VFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),VFd)),a,c)};_.lh=function wQd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return this.d!=0;case 3:return !!this.b;case 4:return this.c!=null;case 5:return !!(this.Db>>16==5?BD(this.Cb,671):null);}return cid(this,a-aLd((jGd(),VFd)),XKd((b=BD(Ajd(this,16),26),!b?VFd:b),a))};_.sh=function xQd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:pnd(this,GD(b));return;case 2:qQd(this,BD(b,19).a);return;case 3:oQd(this,BD(b,1940));return;case 4:pQd(this,GD(b));return;}did(this,a-aLd((jGd(),VFd)),XKd((c=BD(Ajd(this,16),26),!c?VFd:c),a),b)};_.zh=function yQd(){return jGd(),VFd};_.Bh=function zQd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:pnd(this,null);return;case 2:qQd(this,0);return;case 3:oQd(this,null);return;case 4:pQd(this,null);return;}eid(this,a-aLd((jGd(),VFd)),XKd((b=BD(Ajd(this,16),26),!b?VFd:b),a))};_.Ib=function BQd(){var a;return a=this.c,a==null?this.zb:a};_.b=null;_.c=null;_.d=0;var a6=mdb(qte,'EEnumLiteralImpl',573);var c6=odb(qte,'EFactoryImpl/InternalEDateTimeFormat');bcb(489,1,{2015:1},EQd);var b6=mdb(qte,'EFactoryImpl/1ClientInternalEDateTimeFormat',489);bcb(241,115,{105:1,92:1,90:1,87:1,56:1,108:1,49:1,97:1,241:1,114:1,115:1},UQd);_.Sg=function VQd(a,b,c){var d;c=_hd(this,a,b,c);if(!!this.e&&JD(a,170)){d=MQd(this,this.e);d!=this.c&&(c=QQd(this,d,c))}return c};_._g=function WQd(a,b,c){var d;switch(a){case 0:return this.f;case 1:return !this.d&&(this.d=new xMd(j5,this,1)),this.d;case 2:if(b)return KQd(this);return this.c;case 3:return this.b;case 4:return this.e;case 5:if(b)return JQd(this);return this.a;}return bid(this,a-aLd((jGd(),XFd)),XKd((d=BD(Ajd(this,16),26),!d?XFd:d),a),b,c)};_.jh=function XQd(a,b,c){var d,e;switch(b){case 0:return IQd(this,null,c);case 1:return !this.d&&(this.d=new xMd(j5,this,1)),Txd(this.d,a,c);case 3:return GQd(this,null,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),XFd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),XFd)),a,c)};_.lh=function YQd(a){var b;switch(a){case 0:return !!this.f;case 1:return !!this.d&&this.d.i!=0;case 2:return !!this.c;case 3:return !!this.b;case 4:return !!this.e;case 5:return !!this.a;}return cid(this,a-aLd((jGd(),XFd)),XKd((b=BD(Ajd(this,16),26),!b?XFd:b),a))};_.sh=function ZQd(a,b){var c;switch(a){case 0:SQd(this,BD(b,87));return;case 1:!this.d&&(this.d=new xMd(j5,this,1));Uxd(this.d);!this.d&&(this.d=new xMd(j5,this,1));ytd(this.d,BD(b,14));return;case 3:PQd(this,BD(b,87));return;case 4:RQd(this,BD(b,836));return;case 5:NQd(this,BD(b,138));return;}did(this,a-aLd((jGd(),XFd)),XKd((c=BD(Ajd(this,16),26),!c?XFd:c),a),b)};_.zh=function $Qd(){return jGd(),XFd};_.Bh=function _Qd(a){var b;switch(a){case 0:SQd(this,null);return;case 1:!this.d&&(this.d=new xMd(j5,this,1));Uxd(this.d);return;case 3:PQd(this,null);return;case 4:RQd(this,null);return;case 5:NQd(this,null);return;}eid(this,a-aLd((jGd(),XFd)),XKd((b=BD(Ajd(this,16),26),!b?XFd:b),a))};_.Ib=function aRd(){var a;a=new Wfb(Eid(this));a.a+=' (expression: ';TQd(this,a);a.a+=')';return a.a};var FQd;var e6=mdb(qte,'EGenericTypeImpl',241);bcb(1969,1964,Vve);_.Xh=function cRd(a,b){bRd(this,a,b)};_.lk=function dRd(a,b){bRd(this,this.gc(),a);return b};_.pi=function eRd(a){return Ut(this.Gi(),a)};_.Zh=function fRd(){return this.$h()};_.Gi=function gRd(){return new O0d(this)};_.$h=function hRd(){return this._h(0)};_._h=function iRd(a){return this.Gi().Zc(a)};_.mk=function jRd(a,b){ze(this,a,true);return b};_.ii=function kRd(a,b){var c,d;d=Vt(this,b);c=this.Zc(a);c.Rb(d);return d};_.ji=function lRd(a,b){var c;ze(this,b,true);c=this.Zc(a);c.Rb(b)};var B8=mdb(yve,'AbstractSequentialInternalEList',1969);bcb(486,1969,Vve,qRd);_.pi=function rRd(a){return Ut(this.Gi(),a)};_.Zh=function sRd(){if(this.b==null){return LRd(),LRd(),KRd}return this.Jk()};_.Gi=function tRd(){return new w4d(this.a,this.b)};_.$h=function uRd(){if(this.b==null){return LRd(),LRd(),KRd}return this.Jk()};_._h=function vRd(a){var b,c;if(this.b==null){if(a<0||a>1){throw vbb(new qcb(gve+a+', size=0'))}return LRd(),LRd(),KRd}c=this.Jk();for(b=0;b0){b=this.c[--this.d];if((!this.e||b.Gj()!=x2||b.aj()!=0)&&(!this.Mk()||this.b.mh(b))){f=this.b.bh(b,this.Lk());this.f=(Q6d(),BD(b,66).Oj());if(this.f||b.$j()){if(this.Lk()){d=BD(f,15);this.k=d}else{d=BD(f,69);this.k=this.j=d}if(JD(this.k,54)){this.o=this.k.gc();this.n=this.o}else{this.p=!this.j?this.k.Zc(this.k.gc()):this.j._h(this.k.gc())}if(!this.p?PRd(this):QRd(this,this.p)){e=!this.p?!this.j?this.k.Xb(--this.n):this.j.pi(--this.n):this.p.Ub();if(this.f){a=BD(e,72);a.ak();c=a.dd();this.i=c}else{c=e;this.i=c}this.g=-3;return true}}else if(f!=null){this.k=null;this.p=null;c=f;this.i=c;this.g=-2;return true}}}this.k=null;this.p=null;this.g=-1;return false}else{e=!this.p?!this.j?this.k.Xb(--this.n):this.j.pi(--this.n):this.p.Ub();if(this.f){a=BD(e,72);a.ak();c=a.dd();this.i=c}else{c=e;this.i=c}this.g=-3;return true}}}};_.Pb=function XRd(){return MRd(this)};_.Tb=function YRd(){return this.a};_.Ub=function ZRd(){var a;if(this.g<-1||this.Sb()){--this.a;this.g=0;a=this.i;this.Sb();return a}else{throw vbb(new utb)}};_.Vb=function $Rd(){return this.a-1};_.Qb=function _Rd(){throw vbb(new bgb)};_.Lk=function aSd(){return false};_.Wb=function bSd(a){throw vbb(new bgb)};_.Mk=function cSd(){return true};_.a=0;_.d=0;_.f=false;_.g=0;_.n=0;_.o=0;var KRd;var P8=mdb(yve,'EContentsEList/FeatureIteratorImpl',279);bcb(697,279,Wve,dSd);_.Lk=function eSd(){return true};var Q8=mdb(yve,'EContentsEList/ResolvingFeatureIteratorImpl',697);bcb(1157,697,Wve,fSd);_.Mk=function gSd(){return false};var g6=mdb(qte,'ENamedElementImpl/1/1',1157);bcb(1158,279,Wve,hSd);_.Mk=function iSd(){return false};var h6=mdb(qte,'ENamedElementImpl/1/2',1158);bcb(36,143,fve,lSd,mSd,nSd,oSd,pSd,qSd,rSd,sSd,tSd,uSd,vSd,wSd,xSd,ySd,zSd,ASd,BSd,CSd,DSd,ESd,FSd,GSd,HSd,ISd,JSd);_._i=function KSd(){return kSd(this)};_.gj=function LSd(){var a;a=kSd(this);if(a){return a.zj()}return null};_.yi=function MSd(a){this.b==-1&&!!this.a&&(this.b=this.c.Xg(this.a.aj(),this.a.Gj()));return this.c.Og(this.b,a)};_.Ai=function NSd(){return this.c};_.hj=function OSd(){var a;a=kSd(this);if(a){return a.Kj()}return false};_.b=-1;var k6=mdb(qte,'ENotificationImpl',36);bcb(399,284,{105:1,92:1,90:1,147:1,191:1,56:1,59:1,108:1,472:1,49:1,97:1,150:1,399:1,284:1,114:1,115:1},SSd);_.Qg=function TSd(a){return PSd(this,a)};_._g=function USd(a,b,c){var d,e,f;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),f=this.t,f>1||f==-1?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;case 10:return this.Db>>16==10?BD(this.Cb,26):null;case 11:return !this.d&&(this.d=new K4d(u5,this,11)),this.d;case 12:return !this.c&&(this.c=new cUd(p5,this,12,10)),this.c;case 13:return !this.a&&(this.a=new fTd(this,this)),this.a;case 14:return QSd(this);}return bid(this,a-aLd((jGd(),aGd)),XKd((d=BD(Ajd(this,16),26),!d?aGd:d),a),b,c)};_.hh=function VSd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 10:!!this.Cb&&(c=(e=this.Db>>16,e>=0?PSd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,10,c);case 12:return !this.c&&(this.c=new cUd(p5,this,12,10)),Sxd(this.c,a,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),aGd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),aGd)),a,c)};_.jh=function WSd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 9:return vId(this,c);case 10:return _hd(this,null,10,c);case 11:return !this.d&&(this.d=new K4d(u5,this,11)),Txd(this.d,a,c);case 12:return !this.c&&(this.c=new cUd(p5,this,12,10)),Txd(this.c,a,c);case 14:return Txd(QSd(this),a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),aGd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),aGd)),a,c)};_.lh=function XSd(a){var b,c,d;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return d=this.t,d>1||d==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);case 10:return !!(this.Db>>16==10?BD(this.Cb,26):null);case 11:return !!this.d&&this.d.i!=0;case 12:return !!this.c&&this.c.i!=0;case 13:return !!this.a&&QSd(this.a.a).i!=0&&!(!!this.b&&QTd(this.b));case 14:return !!this.b&&QTd(this.b);}return cid(this,a-aLd((jGd(),aGd)),XKd((b=BD(Ajd(this,16),26),!b?aGd:b),a))};_.sh=function YSd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:pnd(this,GD(b));return;case 2:BId(this,Ccb(DD(b)));return;case 3:CId(this,Ccb(DD(b)));return;case 4:AId(this,BD(b,19).a);return;case 5:DId(this,BD(b,19).a);return;case 8:yId(this,BD(b,138));return;case 9:d=xId(this,BD(b,87),null);!!d&&d.Fi();return;case 11:!this.d&&(this.d=new K4d(u5,this,11));Uxd(this.d);!this.d&&(this.d=new K4d(u5,this,11));ytd(this.d,BD(b,14));return;case 12:!this.c&&(this.c=new cUd(p5,this,12,10));Uxd(this.c);!this.c&&(this.c=new cUd(p5,this,12,10));ytd(this.c,BD(b,14));return;case 13:!this.a&&(this.a=new fTd(this,this));vwd(this.a);!this.a&&(this.a=new fTd(this,this));ytd(this.a,BD(b,14));return;case 14:Uxd(QSd(this));ytd(QSd(this),BD(b,14));return;}did(this,a-aLd((jGd(),aGd)),XKd((c=BD(Ajd(this,16),26),!c?aGd:c),a),b)};_.zh=function ZSd(){return jGd(),aGd};_.Bh=function $Sd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:pnd(this,null);return;case 2:BId(this,true);return;case 3:CId(this,true);return;case 4:AId(this,0);return;case 5:DId(this,1);return;case 8:yId(this,null);return;case 9:c=xId(this,null,null);!!c&&c.Fi();return;case 11:!this.d&&(this.d=new K4d(u5,this,11));Uxd(this.d);return;case 12:!this.c&&(this.c=new cUd(p5,this,12,10));Uxd(this.c);return;case 13:!!this.a&&vwd(this.a);return;case 14:!!this.b&&Uxd(this.b);return;}eid(this,a-aLd((jGd(),aGd)),XKd((b=BD(Ajd(this,16),26),!b?aGd:b),a))};_.Gh=function _Sd(){var a,b;if(this.c){for(a=0,b=this.c.i;ah&&NC(a,h,null);d=0;for(c=new Fyd(QSd(this.a));c.e!=c.i.gc();){b=BD(Dyd(c),87);f=(g=b.c,g?g:(jGd(),YFd));NC(a,d++,f)}return a};_.Yi=function zTd(){var a,b,c,d,e;e=new Hfb;e.a+='[';a=QSd(this.a);for(b=0,d=QSd(this.a).i;b1)}case 5:{return FLd(this,a,b,c,d,this.i-BD(c,15).gc()>0)}default:{return new pSd(this.e,a,this.c,b,c,d,true)}}};_.ij=function WTd(){return true};_.fj=function XTd(){return QTd(this)};_.Xj=function aUd(){Uxd(this)};var o6=mdb(qte,'EOperationImpl/2',1341);bcb(498,1,{1938:1,498:1},bUd);var q6=mdb(qte,'EPackageImpl/1',498);bcb(16,85,Pve,cUd);_.zk=function dUd(){return this.d};_.Ak=function eUd(){return this.b};_.Dk=function fUd(){return true};_.b=0;var b9=mdb(yve,'EObjectContainmentWithInverseEList',16);bcb(353,16,Pve,gUd);_.Ek=function hUd(){return true};_.li=function iUd(a,b){return ILd(this,a,BD(b,56))};var $8=mdb(yve,'EObjectContainmentWithInverseEList/Resolving',353);bcb(298,353,Pve,jUd);_.ci=function kUd(){this.a.tb=null};var r6=mdb(qte,'EPackageImpl/2',298);bcb(1228,1,{},lUd);var s6=mdb(qte,'EPackageImpl/3',1228);bcb(718,43,fke,oUd);_._b=function pUd(a){return ND(a)?Qhb(this,a):!!irb(this.f,a)};var u6=mdb(qte,'EPackageRegistryImpl',718);bcb(509,284,{105:1,92:1,90:1,147:1,191:1,56:1,2017:1,108:1,472:1,49:1,97:1,150:1,509:1,284:1,114:1,115:1},rUd);_.Qg=function sUd(a){return qUd(this,a)};_._g=function tUd(a,b,c){var d,e,f;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),f=this.t,f>1||f==-1?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;case 10:return this.Db>>16==10?BD(this.Cb,59):null;}return bid(this,a-aLd((jGd(),dGd)),XKd((d=BD(Ajd(this,16),26),!d?dGd:d),a),b,c)};_.hh=function uUd(a,b,c){var d,e,f;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Sxd(this.Ab,a,c);case 10:!!this.Cb&&(c=(e=this.Db>>16,e>=0?qUd(this,c):this.Cb.ih(this,-1-e,null,c)));return _hd(this,a,10,c);}return f=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),dGd):d),b),66),f.Nj().Qj(this,yjd(this),b-aLd((jGd(),dGd)),a,c)};_.jh=function vUd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 9:return vId(this,c);case 10:return _hd(this,null,10,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),dGd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),dGd)),a,c)};_.lh=function wUd(a){var b,c,d;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return d=this.t,d>1||d==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);case 10:return !!(this.Db>>16==10?BD(this.Cb,59):null);}return cid(this,a-aLd((jGd(),dGd)),XKd((b=BD(Ajd(this,16),26),!b?dGd:b),a))};_.zh=function xUd(){return jGd(),dGd};var v6=mdb(qte,'EParameterImpl',509);bcb(99,449,{105:1,92:1,90:1,147:1,191:1,56:1,18:1,170:1,66:1,108:1,472:1,49:1,97:1,150:1,99:1,449:1,284:1,114:1,115:1,677:1},FUd);_._g=function GUd(a,b,c){var d,e,f,g;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return Bcb(),(this.Bb&256)!=0?true:false;case 3:return Bcb(),(this.Bb&512)!=0?true:false;case 4:return meb(this.s);case 5:return meb(this.t);case 6:return Bcb(),g=this.t,g>1||g==-1?true:false;case 7:return Bcb(),e=this.s,e>=1?true:false;case 8:if(b)return wId(this);return this.r;case 9:return this.q;case 10:return Bcb(),(this.Bb&zte)!=0?true:false;case 11:return Bcb(),(this.Bb&Dve)!=0?true:false;case 12:return Bcb(),(this.Bb&Rje)!=0?true:false;case 13:return this.j;case 14:return VId(this);case 15:return Bcb(),(this.Bb&Cve)!=0?true:false;case 16:return Bcb(),(this.Bb&oie)!=0?true:false;case 17:return WId(this);case 18:return Bcb(),(this.Bb&ote)!=0?true:false;case 19:return Bcb(),f=zUd(this),!!f&&(f.Bb&ote)!=0?true:false;case 20:return Bcb(),(this.Bb&Tje)!=0?true:false;case 21:if(b)return zUd(this);return this.b;case 22:if(b)return AUd(this);return yUd(this);case 23:return !this.a&&(this.a=new _4d(b5,this,23)),this.a;}return bid(this,a-aLd((jGd(),eGd)),XKd((d=BD(Ajd(this,16),26),!d?eGd:d),a),b,c)};_.lh=function HUd(a){var b,c,d,e;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return (this.Bb&256)==0;case 3:return (this.Bb&512)==0;case 4:return this.s!=0;case 5:return this.t!=1;case 6:return e=this.t,e>1||e==-1;case 7:return c=this.s,c>=1;case 8:return !!this.r&&!this.q.e&&LQd(this.q).i==0;case 9:return !!this.q&&!(!!this.r&&!this.q.e&&LQd(this.q).i==0);case 10:return (this.Bb&zte)==0;case 11:return (this.Bb&Dve)!=0;case 12:return (this.Bb&Rje)!=0;case 13:return this.j!=null;case 14:return VId(this)!=null;case 15:return (this.Bb&Cve)!=0;case 16:return (this.Bb&oie)!=0;case 17:return !!WId(this);case 18:return (this.Bb&ote)!=0;case 19:return d=zUd(this),!!d&&(d.Bb&ote)!=0;case 20:return (this.Bb&Tje)==0;case 21:return !!this.b;case 22:return !!yUd(this);case 23:return !!this.a&&this.a.i!=0;}return cid(this,a-aLd((jGd(),eGd)),XKd((b=BD(Ajd(this,16),26),!b?eGd:b),a))};_.sh=function IUd(a,b){var c,d;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:cJd(this,GD(b));return;case 2:BId(this,Ccb(DD(b)));return;case 3:CId(this,Ccb(DD(b)));return;case 4:AId(this,BD(b,19).a);return;case 5:DId(this,BD(b,19).a);return;case 8:yId(this,BD(b,138));return;case 9:d=xId(this,BD(b,87),null);!!d&&d.Fi();return;case 10:ZId(this,Ccb(DD(b)));return;case 11:fJd(this,Ccb(DD(b)));return;case 12:dJd(this,Ccb(DD(b)));return;case 13:$Id(this,GD(b));return;case 15:eJd(this,Ccb(DD(b)));return;case 16:aJd(this,Ccb(DD(b)));return;case 18:BUd(this,Ccb(DD(b)));return;case 20:EUd(this,Ccb(DD(b)));return;case 21:DUd(this,BD(b,18));return;case 23:!this.a&&(this.a=new _4d(b5,this,23));Uxd(this.a);!this.a&&(this.a=new _4d(b5,this,23));ytd(this.a,BD(b,14));return;}did(this,a-aLd((jGd(),eGd)),XKd((c=BD(Ajd(this,16),26),!c?eGd:c),a),b)};_.zh=function JUd(){return jGd(),eGd};_.Bh=function KUd(a){var b,c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:JD(this.Cb,88)&&XMd($Kd(BD(this.Cb,88)),4);pnd(this,null);return;case 2:BId(this,true);return;case 3:CId(this,true);return;case 4:AId(this,0);return;case 5:DId(this,1);return;case 8:yId(this,null);return;case 9:c=xId(this,null,null);!!c&&c.Fi();return;case 10:ZId(this,true);return;case 11:fJd(this,false);return;case 12:dJd(this,false);return;case 13:this.i=null;_Id(this,null);return;case 15:eJd(this,false);return;case 16:aJd(this,false);return;case 18:CUd(this,false);JD(this.Cb,88)&&XMd($Kd(BD(this.Cb,88)),2);return;case 20:EUd(this,true);return;case 21:DUd(this,null);return;case 23:!this.a&&(this.a=new _4d(b5,this,23));Uxd(this.a);return;}eid(this,a-aLd((jGd(),eGd)),XKd((b=BD(Ajd(this,16),26),!b?eGd:b),a))};_.Gh=function LUd(){AUd(this);a2d(q1d((O6d(),M6d),this));wId(this);this.Bb|=1};_.Lj=function MUd(){return zUd(this)};_.qk=function NUd(){var a;return a=zUd(this),!!a&&(a.Bb&ote)!=0};_.rk=function OUd(){return (this.Bb&ote)!=0};_.sk=function PUd(){return (this.Bb&Tje)!=0};_.nk=function QUd(a,b){this.c=null;return zId(this,a,b)};_.Ib=function RUd(){var a;if((this.Db&64)!=0)return gJd(this);a=new Jfb(gJd(this));a.a+=' (containment: ';Ffb(a,(this.Bb&ote)!=0);a.a+=', resolveProxies: ';Ffb(a,(this.Bb&Tje)!=0);a.a+=')';return a.a};var w6=mdb(qte,'EReferenceImpl',99);bcb(548,115,{105:1,42:1,92:1,90:1,133:1,56:1,108:1,49:1,97:1,548:1,114:1,115:1},XUd);_.Fb=function bVd(a){return this===a};_.cd=function dVd(){return this.b};_.dd=function eVd(){return this.c};_.Hb=function fVd(){return FCb(this)};_.Uh=function hVd(a){SUd(this,GD(a))};_.ed=function iVd(a){return WUd(this,GD(a))};_._g=function YUd(a,b,c){var d;switch(a){case 0:return this.b;case 1:return this.c;}return bid(this,a-aLd((jGd(),fGd)),XKd((d=BD(Ajd(this,16),26),!d?fGd:d),a),b,c)};_.lh=function ZUd(a){var b;switch(a){case 0:return this.b!=null;case 1:return this.c!=null;}return cid(this,a-aLd((jGd(),fGd)),XKd((b=BD(Ajd(this,16),26),!b?fGd:b),a))};_.sh=function $Ud(a,b){var c;switch(a){case 0:TUd(this,GD(b));return;case 1:VUd(this,GD(b));return;}did(this,a-aLd((jGd(),fGd)),XKd((c=BD(Ajd(this,16),26),!c?fGd:c),a),b)};_.zh=function _Ud(){return jGd(),fGd};_.Bh=function aVd(a){var b;switch(a){case 0:UUd(this,null);return;case 1:VUd(this,null);return;}eid(this,a-aLd((jGd(),fGd)),XKd((b=BD(Ajd(this,16),26),!b?fGd:b),a))};_.Sh=function cVd(){var a;if(this.a==-1){a=this.b;this.a=a==null?0:LCb(a)}return this.a};_.Th=function gVd(a){this.a=a};_.Ib=function jVd(){var a;if((this.Db&64)!=0)return Eid(this);a=new Jfb(Eid(this));a.a+=' (key: ';Efb(a,this.b);a.a+=', value: ';Efb(a,this.c);a.a+=')';return a.a};_.a=-1;_.b=null;_.c=null;var x6=mdb(qte,'EStringToStringMapEntryImpl',548);var D9=odb(yve,'FeatureMap/Entry/Internal');bcb(565,1,Xve);_.Ok=function mVd(a){return this.Pk(BD(a,49))};_.Pk=function nVd(a){return this.Ok(a)};_.Fb=function oVd(a){var b,c;if(this===a){return true}else if(JD(a,72)){b=BD(a,72);if(b.ak()==this.c){c=this.dd();return c==null?b.dd()==null:pb(c,b.dd())}else{return false}}else{return false}};_.ak=function pVd(){return this.c};_.Hb=function qVd(){var a;a=this.dd();return tb(this.c)^(a==null?0:tb(a))};_.Ib=function rVd(){var a,b;a=this.c;b=bKd(a.Hj()).Ph();a.ne();return (b!=null&&b.length!=0?b+':'+a.ne():a.ne())+'='+this.dd()};var y6=mdb(qte,'EStructuralFeatureImpl/BasicFeatureMapEntry',565);bcb(776,565,Xve,uVd);_.Pk=function vVd(a){return new uVd(this.c,a)};_.dd=function wVd(){return this.a};_.Qk=function xVd(a,b,c){return sVd(this,a,this.a,b,c)};_.Rk=function yVd(a,b,c){return tVd(this,a,this.a,b,c)};var z6=mdb(qte,'EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry',776);bcb(1314,1,{},zVd);_.Pj=function AVd(a,b,c,d,e){var f;f=BD(gid(a,this.b),215);return f.nl(this.a).Wj(d)};_.Qj=function BVd(a,b,c,d,e){var f;f=BD(gid(a,this.b),215);return f.el(this.a,d,e)};_.Rj=function CVd(a,b,c,d,e){var f;f=BD(gid(a,this.b),215);return f.fl(this.a,d,e)};_.Sj=function DVd(a,b,c){var d;d=BD(gid(a,this.b),215);return d.nl(this.a).fj()};_.Tj=function EVd(a,b,c,d){var e;e=BD(gid(a,this.b),215);e.nl(this.a).Wb(d)};_.Uj=function FVd(a,b,c){return BD(gid(a,this.b),215).nl(this.a)};_.Vj=function GVd(a,b,c){var d;d=BD(gid(a,this.b),215);d.nl(this.a).Xj()};var A6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator',1314);bcb(89,1,{},IVd,JVd,KVd,LVd);_.Pj=function MVd(a,b,c,d,e){var f;f=b.Ch(c);f==null&&b.Dh(c,f=HVd(this,a));if(!e){switch(this.e){case 50:case 41:return BD(f,589).sj();case 40:return BD(f,215).kl();}}return f};_.Qj=function NVd(a,b,c,d,e){var f,g;g=b.Ch(c);g==null&&b.Dh(c,g=HVd(this,a));f=BD(g,69).lk(d,e);return f};_.Rj=function OVd(a,b,c,d,e){var f;f=b.Ch(c);f!=null&&(e=BD(f,69).mk(d,e));return e};_.Sj=function PVd(a,b,c){var d;d=b.Ch(c);return d!=null&&BD(d,76).fj()};_.Tj=function QVd(a,b,c,d){var e;e=BD(b.Ch(c),76);!e&&b.Dh(c,e=HVd(this,a));e.Wb(d)};_.Uj=function RVd(a,b,c){var d,e;e=b.Ch(c);e==null&&b.Dh(c,e=HVd(this,a));if(JD(e,76)){return BD(e,76)}else{d=BD(b.Ch(c),15);return new iYd(d)}};_.Vj=function SVd(a,b,c){var d;d=BD(b.Ch(c),76);!d&&b.Dh(c,d=HVd(this,a));d.Xj()};_.b=0;_.e=0;var B6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateMany',89);bcb(504,1,{});_.Qj=function WVd(a,b,c,d,e){throw vbb(new bgb)};_.Rj=function XVd(a,b,c,d,e){throw vbb(new bgb)};_.Uj=function YVd(a,b,c){return new ZVd(this,a,b,c)};var TVd;var i7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingle',504);bcb(1331,1,zve,ZVd);_.Wj=function $Vd(a){return this.a.Pj(this.c,this.d,this.b,a,true)};_.fj=function _Vd(){return this.a.Sj(this.c,this.d,this.b)};_.Wb=function aWd(a){this.a.Tj(this.c,this.d,this.b,a)};_.Xj=function bWd(){this.a.Vj(this.c,this.d,this.b)};_.b=0;var C6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingle/1',1331);bcb(769,504,{},cWd);_.Pj=function dWd(a,b,c,d,e){return Nid(a,a.eh(),a.Vg())==this.b?this.sk()&&d?aid(a):a.eh():null};_.Qj=function eWd(a,b,c,d,e){var f,g;!!a.eh()&&(e=(f=a.Vg(),f>=0?a.Qg(e):a.eh().ih(a,-1-f,null,e)));g=bLd(a.Tg(),this.e);return a.Sg(d,g,e)};_.Rj=function fWd(a,b,c,d,e){var f;f=bLd(a.Tg(),this.e);return a.Sg(null,f,e)};_.Sj=function gWd(a,b,c){var d;d=bLd(a.Tg(),this.e);return !!a.eh()&&a.Vg()==d};_.Tj=function hWd(a,b,c,d){var e,f,g,h,i;if(d!=null&&!fKd(this.a,d)){throw vbb(new Cdb(Yve+(JD(d,56)?gLd(BD(d,56).Tg()):idb(rb(d)))+Zve+this.a+"'"))}e=a.eh();g=bLd(a.Tg(),this.e);if(PD(d)!==PD(e)||a.Vg()!=g&&d!=null){if(p6d(a,BD(d,56)))throw vbb(new Wdb(ste+a.Ib()));i=null;!!e&&(i=(f=a.Vg(),f>=0?a.Qg(i):a.eh().ih(a,-1-f,null,i)));h=BD(d,49);!!h&&(i=h.gh(a,bLd(h.Tg(),this.b),null,i));i=a.Sg(h,g,i);!!i&&i.Fi()}else{a.Lg()&&a.Mg()&&Uhd(a,new nSd(a,1,g,d,d))}};_.Vj=function iWd(a,b,c){var d,e,f,g;d=a.eh();if(d){g=(e=a.Vg(),e>=0?a.Qg(null):a.eh().ih(a,-1-e,null,null));f=bLd(a.Tg(),this.e);g=a.Sg(null,f,g);!!g&&g.Fi()}else{a.Lg()&&a.Mg()&&Uhd(a,new DSd(a,1,this.e,null,null))}};_.sk=function jWd(){return false};var E6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleContainer',769);bcb(1315,769,{},kWd);_.sk=function lWd(){return true};var D6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving',1315);bcb(563,504,{});_.Pj=function oWd(a,b,c,d,e){var f;return f=b.Ch(c),f==null?this.b:PD(f)===PD(TVd)?null:f};_.Sj=function pWd(a,b,c){var d;d=b.Ch(c);return d!=null&&(PD(d)===PD(TVd)||!pb(d,this.b))};_.Tj=function qWd(a,b,c,d){var e,f;if(a.Lg()&&a.Mg()){e=(f=b.Ch(c),f==null?this.b:PD(f)===PD(TVd)?null:f);if(d==null){if(this.c!=null){b.Dh(c,null);d=this.b}else this.b!=null?b.Dh(c,TVd):b.Dh(c,null)}else{this.Sk(d);b.Dh(c,d)}Uhd(a,this.d.Tk(a,1,this.e,e,d))}else{if(d==null){this.c!=null?b.Dh(c,null):this.b!=null?b.Dh(c,TVd):b.Dh(c,null)}else{this.Sk(d);b.Dh(c,d)}}};_.Vj=function rWd(a,b,c){var d,e;if(a.Lg()&&a.Mg()){d=(e=b.Ch(c),e==null?this.b:PD(e)===PD(TVd)?null:e);b.Eh(c);Uhd(a,this.d.Tk(a,1,this.e,d,this.b))}else{b.Eh(c)}};_.Sk=function sWd(a){throw vbb(new Bdb)};var T6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData',563);bcb($ve,1,{},DWd);_.Tk=function EWd(a,b,c,d,e){return new DSd(a,b,c,d,e)};_.Uk=function FWd(a,b,c,d,e,f){return new FSd(a,b,c,d,e,f)};var tWd,uWd,vWd,wWd,xWd,yWd,zWd,AWd,BWd;var N6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator',$ve);bcb(1332,$ve,{},GWd);_.Tk=function HWd(a,b,c,d,e){return new ISd(a,b,c,Ccb(DD(d)),Ccb(DD(e)))};_.Uk=function IWd(a,b,c,d,e,f){return new JSd(a,b,c,Ccb(DD(d)),Ccb(DD(e)),f)};var F6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1',1332);bcb(1333,$ve,{},JWd);_.Tk=function KWd(a,b,c,d,e){return new rSd(a,b,c,BD(d,217).a,BD(e,217).a)};_.Uk=function LWd(a,b,c,d,e,f){return new sSd(a,b,c,BD(d,217).a,BD(e,217).a,f)};var G6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2',1333);bcb(1334,$ve,{},MWd);_.Tk=function NWd(a,b,c,d,e){return new tSd(a,b,c,BD(d,172).a,BD(e,172).a)};_.Uk=function OWd(a,b,c,d,e,f){return new uSd(a,b,c,BD(d,172).a,BD(e,172).a,f)};var H6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3',1334);bcb(1335,$ve,{},PWd);_.Tk=function QWd(a,b,c,d,e){return new vSd(a,b,c,Edb(ED(d)),Edb(ED(e)))};_.Uk=function RWd(a,b,c,d,e,f){return new wSd(a,b,c,Edb(ED(d)),Edb(ED(e)),f)};var I6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4',1335);bcb(1336,$ve,{},SWd);_.Tk=function TWd(a,b,c,d,e){return new xSd(a,b,c,BD(d,155).a,BD(e,155).a)};_.Uk=function UWd(a,b,c,d,e,f){return new ySd(a,b,c,BD(d,155).a,BD(e,155).a,f)};var J6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5',1336);bcb(1337,$ve,{},VWd);_.Tk=function WWd(a,b,c,d,e){return new zSd(a,b,c,BD(d,19).a,BD(e,19).a)};_.Uk=function XWd(a,b,c,d,e,f){return new ASd(a,b,c,BD(d,19).a,BD(e,19).a,f)};var K6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6',1337);bcb(1338,$ve,{},YWd);_.Tk=function ZWd(a,b,c,d,e){return new BSd(a,b,c,BD(d,162).a,BD(e,162).a)};_.Uk=function $Wd(a,b,c,d,e,f){return new CSd(a,b,c,BD(d,162).a,BD(e,162).a,f)};var L6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7',1338);bcb(1339,$ve,{},_Wd);_.Tk=function aXd(a,b,c,d,e){return new GSd(a,b,c,BD(d,184).a,BD(e,184).a)};_.Uk=function bXd(a,b,c,d,e,f){return new HSd(a,b,c,BD(d,184).a,BD(e,184).a,f)};var M6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8',1339);bcb(1317,563,{},cXd);_.Sk=function dXd(a){if(!this.a.wj(a)){throw vbb(new Cdb(Yve+rb(a)+Zve+this.a+"'"))}};var O6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic',1317);bcb(1318,563,{},eXd);_.Sk=function fXd(a){};var P6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic',1318);bcb(770,563,{});_.Sj=function gXd(a,b,c){var d;d=b.Ch(c);return d!=null};_.Tj=function hXd(a,b,c,d){var e,f;if(a.Lg()&&a.Mg()){e=true;f=b.Ch(c);if(f==null){e=false;f=this.b}else PD(f)===PD(TVd)&&(f=null);if(d==null){if(this.c!=null){b.Dh(c,null);d=this.b}else{b.Dh(c,TVd)}}else{this.Sk(d);b.Dh(c,d)}Uhd(a,this.d.Uk(a,1,this.e,f,d,!e))}else{if(d==null){this.c!=null?b.Dh(c,null):b.Dh(c,TVd)}else{this.Sk(d);b.Dh(c,d)}}};_.Vj=function iXd(a,b,c){var d,e;if(a.Lg()&&a.Mg()){d=true;e=b.Ch(c);if(e==null){d=false;e=this.b}else PD(e)===PD(TVd)&&(e=null);b.Eh(c);Uhd(a,this.d.Uk(a,2,this.e,e,this.b,d))}else{b.Eh(c)}};var S6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable',770);bcb(1319,770,{},jXd);_.Sk=function kXd(a){if(!this.a.wj(a)){throw vbb(new Cdb(Yve+rb(a)+Zve+this.a+"'"))}};var Q6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic',1319);bcb(1320,770,{},lXd);_.Sk=function mXd(a){};var R6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic',1320);bcb(398,504,{},nXd);_.Pj=function pXd(a,b,c,d,e){var f,g,h,i,j;j=b.Ch(c);if(this.Kj()&&PD(j)===PD(TVd)){return null}else if(this.sk()&&d&&j!=null){h=BD(j,49);if(h.kh()){i=xid(a,h);if(h!=i){if(!fKd(this.a,i)){throw vbb(new Cdb(Yve+rb(i)+Zve+this.a+"'"))}b.Dh(c,j=i);if(this.rk()){f=BD(i,49);g=h.ih(a,!this.b?-1-bLd(a.Tg(),this.e):bLd(h.Tg(),this.b),null,null);!f.eh()&&(g=f.gh(a,!this.b?-1-bLd(a.Tg(),this.e):bLd(f.Tg(),this.b),null,g));!!g&&g.Fi()}a.Lg()&&a.Mg()&&Uhd(a,new DSd(a,9,this.e,h,i))}}return j}else{return j}};_.Qj=function qXd(a,b,c,d,e){var f,g;g=b.Ch(c);PD(g)===PD(TVd)&&(g=null);b.Dh(c,d);if(this.bj()){if(PD(g)!==PD(d)&&g!=null){f=BD(g,49);e=f.ih(a,bLd(f.Tg(),this.b),null,e)}}else this.rk()&&g!=null&&(e=BD(g,49).ih(a,-1-bLd(a.Tg(),this.e),null,e));if(a.Lg()&&a.Mg()){!e&&(e=new Ixd(4));e.Ei(new DSd(a,1,this.e,g,d))}return e};_.Rj=function rXd(a,b,c,d,e){var f;f=b.Ch(c);PD(f)===PD(TVd)&&(f=null);b.Eh(c);if(a.Lg()&&a.Mg()){!e&&(e=new Ixd(4));this.Kj()?e.Ei(new DSd(a,2,this.e,f,null)):e.Ei(new DSd(a,1,this.e,f,null))}return e};_.Sj=function sXd(a,b,c){var d;d=b.Ch(c);return d!=null};_.Tj=function tXd(a,b,c,d){var e,f,g,h,i;if(d!=null&&!fKd(this.a,d)){throw vbb(new Cdb(Yve+(JD(d,56)?gLd(BD(d,56).Tg()):idb(rb(d)))+Zve+this.a+"'"))}i=b.Ch(c);h=i!=null;this.Kj()&&PD(i)===PD(TVd)&&(i=null);g=null;if(this.bj()){if(PD(i)!==PD(d)){if(i!=null){e=BD(i,49);g=e.ih(a,bLd(e.Tg(),this.b),null,g)}if(d!=null){e=BD(d,49);g=e.gh(a,bLd(e.Tg(),this.b),null,g)}}}else if(this.rk()){if(PD(i)!==PD(d)){i!=null&&(g=BD(i,49).ih(a,-1-bLd(a.Tg(),this.e),null,g));d!=null&&(g=BD(d,49).gh(a,-1-bLd(a.Tg(),this.e),null,g))}}d==null&&this.Kj()?b.Dh(c,TVd):b.Dh(c,d);if(a.Lg()&&a.Mg()){f=new FSd(a,1,this.e,i,d,this.Kj()&&!h);if(!g){Uhd(a,f)}else{g.Ei(f);g.Fi()}}else !!g&&g.Fi()};_.Vj=function uXd(a,b,c){var d,e,f,g,h;h=b.Ch(c);g=h!=null;this.Kj()&&PD(h)===PD(TVd)&&(h=null);f=null;if(h!=null){if(this.bj()){d=BD(h,49);f=d.ih(a,bLd(d.Tg(),this.b),null,f)}else this.rk()&&(f=BD(h,49).ih(a,-1-bLd(a.Tg(),this.e),null,f))}b.Eh(c);if(a.Lg()&&a.Mg()){e=new FSd(a,this.Kj()?2:1,this.e,h,null,g);if(!f){Uhd(a,e)}else{f.Ei(e);f.Fi()}}else !!f&&f.Fi()};_.bj=function vXd(){return false};_.rk=function wXd(){return false};_.sk=function xXd(){return false};_.Kj=function yXd(){return false};var h7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObject',398);bcb(564,398,{},zXd);_.rk=function AXd(){return true};var _6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment',564);bcb(1323,564,{},BXd);_.sk=function CXd(){return true};var U6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving',1323);bcb(772,564,{},DXd);_.Kj=function EXd(){return true};var W6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable',772);bcb(1325,772,{},FXd);_.sk=function GXd(){return true};var V6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving',1325);bcb(640,564,{},HXd);_.bj=function IXd(){return true};var $6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse',640);bcb(1324,640,{},JXd);_.sk=function KXd(){return true};var X6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving',1324);bcb(773,640,{},LXd);_.Kj=function MXd(){return true};var Z6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable',773);bcb(1326,773,{},NXd);_.sk=function OXd(){return true};var Y6=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving',1326);bcb(641,398,{},PXd);_.sk=function QXd(){return true};var d7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving',641);bcb(1327,641,{},RXd);_.Kj=function SXd(){return true};var a7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable',1327);bcb(774,641,{},TXd);_.bj=function UXd(){return true};var c7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse',774);bcb(1328,774,{},VXd);_.Kj=function WXd(){return true};var b7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable',1328);bcb(1321,398,{},XXd);_.Kj=function YXd(){return true};var e7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable',1321);bcb(771,398,{},ZXd);_.bj=function $Xd(){return true};var g7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse',771);bcb(1322,771,{},_Xd);_.Kj=function aYd(){return true};var f7=mdb(qte,'EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable',1322);bcb(775,565,Xve,dYd);_.Pk=function eYd(a){return new dYd(this.a,this.c,a)};_.dd=function fYd(){return this.b};_.Qk=function gYd(a,b,c){return bYd(this,a,this.b,c)};_.Rk=function hYd(a,b,c){return cYd(this,a,this.b,c)};var j7=mdb(qte,'EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry',775);bcb(1329,1,zve,iYd);_.Wj=function jYd(a){return this.a};_.fj=function kYd(){return JD(this.a,95)?BD(this.a,95).fj():!this.a.dc()};_.Wb=function lYd(a){this.a.$b();this.a.Gc(BD(a,15))};_.Xj=function mYd(){JD(this.a,95)?BD(this.a,95).Xj():this.a.$b()};var k7=mdb(qte,'EStructuralFeatureImpl/SettingMany',1329);bcb(1330,565,Xve,nYd);_.Ok=function oYd(a){return new sYd((Q8d(),P8d),this.b.Ih(this.a,a))};_.dd=function pYd(){return null};_.Qk=function qYd(a,b,c){return c};_.Rk=function rYd(a,b,c){return c};var l7=mdb(qte,'EStructuralFeatureImpl/SimpleContentFeatureMapEntry',1330);bcb(642,565,Xve,sYd);_.Ok=function tYd(a){return new sYd(this.c,a)};_.dd=function uYd(){return this.a};_.Qk=function vYd(a,b,c){return c};_.Rk=function wYd(a,b,c){return c};var m7=mdb(qte,'EStructuralFeatureImpl/SimpleFeatureMapEntry',642);bcb(391,497,oue,xYd);_.ri=function yYd(a){return KC(c5,Uhe,26,a,0,1)};_.ni=function zYd(){return false};var o7=mdb(qte,'ESuperAdapter/1',391);bcb(444,438,{105:1,92:1,90:1,147:1,191:1,56:1,108:1,836:1,49:1,97:1,150:1,444:1,114:1,115:1},BYd);_._g=function CYd(a,b,c){var d;switch(a){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),this.Ab;case 1:return this.zb;case 2:return !this.a&&(this.a=new KYd(this,j5,this)),this.a;}return bid(this,a-aLd((jGd(),iGd)),XKd((d=BD(Ajd(this,16),26),!d?iGd:d),a),b,c)};_.jh=function DYd(a,b,c){var d,e;switch(b){case 0:return !this.Ab&&(this.Ab=new cUd(a5,this,0,3)),Txd(this.Ab,a,c);case 2:return !this.a&&(this.a=new KYd(this,j5,this)),Txd(this.a,a,c);}return e=BD(XKd((d=BD(Ajd(this,16),26),!d?(jGd(),iGd):d),b),66),e.Nj().Rj(this,yjd(this),b-aLd((jGd(),iGd)),a,c)};_.lh=function EYd(a){var b;switch(a){case 0:return !!this.Ab&&this.Ab.i!=0;case 1:return this.zb!=null;case 2:return !!this.a&&this.a.i!=0;}return cid(this,a-aLd((jGd(),iGd)),XKd((b=BD(Ajd(this,16),26),!b?iGd:b),a))};_.sh=function FYd(a,b){var c;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);!this.Ab&&(this.Ab=new cUd(a5,this,0,3));ytd(this.Ab,BD(b,14));return;case 1:pnd(this,GD(b));return;case 2:!this.a&&(this.a=new KYd(this,j5,this));Uxd(this.a);!this.a&&(this.a=new KYd(this,j5,this));ytd(this.a,BD(b,14));return;}did(this,a-aLd((jGd(),iGd)),XKd((c=BD(Ajd(this,16),26),!c?iGd:c),a),b)};_.zh=function GYd(){return jGd(),iGd};_.Bh=function HYd(a){var b;switch(a){case 0:!this.Ab&&(this.Ab=new cUd(a5,this,0,3));Uxd(this.Ab);return;case 1:pnd(this,null);return;case 2:!this.a&&(this.a=new KYd(this,j5,this));Uxd(this.a);return;}eid(this,a-aLd((jGd(),iGd)),XKd((b=BD(Ajd(this,16),26),!b?iGd:b),a))};var u7=mdb(qte,'ETypeParameterImpl',444);bcb(445,85,Pve,KYd);_.cj=function LYd(a,b){return IYd(this,BD(a,87),b)};_.dj=function MYd(a,b){return JYd(this,BD(a,87),b)};var q7=mdb(qte,'ETypeParameterImpl/1',445);bcb(634,43,fke,NYd);_.ec=function OYd(){return new RYd(this)};var t7=mdb(qte,'ETypeParameterImpl/2',634);bcb(556,eie,fie,RYd);_.Fc=function SYd(a){return PYd(this,BD(a,87))};_.Gc=function TYd(a){var b,c,d;d=false;for(c=a.Kc();c.Ob();){b=BD(c.Pb(),87);Rhb(this.a,b,'')==null&&(d=true)}return d};_.$b=function UYd(){Uhb(this.a)};_.Hc=function VYd(a){return Mhb(this.a,a)};_.Kc=function WYd(){var a;return a=new nib((new eib(this.a)).a),new ZYd(a)};_.Mc=function XYd(a){return QYd(this,a)};_.gc=function YYd(){return Vhb(this.a)};var s7=mdb(qte,'ETypeParameterImpl/2/1',556);bcb(557,1,aie,ZYd);_.Nb=function $Yd(a){Rrb(this,a)};_.Pb=function aZd(){return BD(lib(this.a).cd(),87)};_.Ob=function _Yd(){return this.a.b};_.Qb=function bZd(){mib(this.a)};var r7=mdb(qte,'ETypeParameterImpl/2/1/1',557);bcb(1276,43,fke,cZd);_._b=function dZd(a){return ND(a)?Qhb(this,a):!!irb(this.f,a)};_.xc=function eZd(a){var b,c;b=ND(a)?Phb(this,a):Wd(irb(this.f,a));if(JD(b,837)){c=BD(b,837);b=c._j();Rhb(this,BD(a,235),b);return b}else return b!=null?b:a==null?(g5d(),f5d):null};var w7=mdb(qte,'EValidatorRegistryImpl',1276);bcb(1313,704,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,1941:1,49:1,97:1,150:1,114:1,115:1},mZd);_.Ih=function nZd(a,b){switch(a.yj()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return b==null?null:fcb(b);case 25:return gZd(b);case 27:return hZd(b);case 28:return iZd(b);case 29:return b==null?null:CQd(Pmd[0],BD(b,199));case 41:return b==null?'':hdb(BD(b,290));case 42:return fcb(b);case 50:return GD(b);default:throw vbb(new Wdb(tte+a.ne()+ute));}};_.Jh=function oZd(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;switch(a.G==-1&&(a.G=(m=bKd(a),m?HLd(m.Mh(),a):-1)),a.G){case 0:return c=new OJd,c;case 1:return b=new RHd,b;case 2:return d=new hLd,d;case 4:return e=new MPd,e;case 5:return f=new aQd,f;case 6:return g=new rQd,g;case 7:return h=new $md,h;case 10:return j=new MGd,j;case 11:return k=new SSd,k;case 12:return l=new eod,l;case 13:return n=new rUd,n;case 14:return o=new FUd,o;case 17:return p=new XUd,p;case 18:return i=new UQd,i;case 19:return q=new BYd,q;default:throw vbb(new Wdb(xte+a.zb+ute));}};_.Kh=function pZd(a,b){switch(a.yj()){case 20:return b==null?null:new tgb(b);case 21:return b==null?null:new Ygb(b);case 23:case 22:return b==null?null:fZd(b);case 26:case 24:return b==null?null:Scb(Icb(b,-128,127)<<24>>24);case 25:return Xmd(b);case 27:return jZd(b);case 28:return kZd(b);case 29:return lZd(b);case 32:case 31:return b==null?null:Hcb(b);case 38:case 37:return b==null?null:new Odb(b);case 40:case 39:return b==null?null:meb(Icb(b,Rie,Ohe));case 41:return null;case 42:return b==null?null:null;case 44:case 43:return b==null?null:Aeb(Jcb(b));case 49:case 48:return b==null?null:Web(Icb(b,awe,32767)<<16>>16);case 50:return b;default:throw vbb(new Wdb(tte+a.ne()+ute));}};var x7=mdb(qte,'EcoreFactoryImpl',1313);bcb(547,179,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,1939:1,49:1,97:1,150:1,179:1,547:1,114:1,115:1,675:1},AZd);_.gb=false;_.hb=false;var rZd,sZd=false;var o8=mdb(qte,'EcorePackageImpl',547);bcb(1184,1,{837:1},EZd);_._j=function FZd(){return I6d(),H6d};var I7=mdb(qte,'EcorePackageImpl/1',1184);bcb(1193,1,nwe,GZd);_.wj=function HZd(a){return JD(a,147)};_.xj=function IZd(a){return KC(k5,Uhe,147,a,0,1)};var y7=mdb(qte,'EcorePackageImpl/10',1193);bcb(1194,1,nwe,JZd);_.wj=function KZd(a){return JD(a,191)};_.xj=function LZd(a){return KC(l5,Uhe,191,a,0,1)};var z7=mdb(qte,'EcorePackageImpl/11',1194);bcb(1195,1,nwe,MZd);_.wj=function NZd(a){return JD(a,56)};_.xj=function OZd(a){return KC(m5,Uhe,56,a,0,1)};var A7=mdb(qte,'EcorePackageImpl/12',1195);bcb(1196,1,nwe,PZd);_.wj=function QZd(a){return JD(a,399)};_.xj=function RZd(a){return KC(n5,Nve,59,a,0,1)};var B7=mdb(qte,'EcorePackageImpl/13',1196);bcb(1197,1,nwe,SZd);_.wj=function TZd(a){return JD(a,235)};_.xj=function UZd(a){return KC(o5,Uhe,235,a,0,1)};var C7=mdb(qte,'EcorePackageImpl/14',1197);bcb(1198,1,nwe,VZd);_.wj=function WZd(a){return JD(a,509)};_.xj=function XZd(a){return KC(p5,Uhe,2017,a,0,1)};var D7=mdb(qte,'EcorePackageImpl/15',1198);bcb(1199,1,nwe,YZd);_.wj=function ZZd(a){return JD(a,99)};_.xj=function $Zd(a){return KC(q5,Mve,18,a,0,1)};var E7=mdb(qte,'EcorePackageImpl/16',1199);bcb(1200,1,nwe,_Zd);_.wj=function a$d(a){return JD(a,170)};_.xj=function b$d(a){return KC(t5,Mve,170,a,0,1)};var F7=mdb(qte,'EcorePackageImpl/17',1200);bcb(1201,1,nwe,c$d);_.wj=function d$d(a){return JD(a,472)};_.xj=function e$d(a){return KC(v5,Uhe,472,a,0,1)};var G7=mdb(qte,'EcorePackageImpl/18',1201);bcb(1202,1,nwe,f$d);_.wj=function g$d(a){return JD(a,548)};_.xj=function h$d(a){return KC(x6,kve,548,a,0,1)};var H7=mdb(qte,'EcorePackageImpl/19',1202);bcb(1185,1,nwe,i$d);_.wj=function j$d(a){return JD(a,322)};_.xj=function k$d(a){return KC(b5,Mve,34,a,0,1)};var T7=mdb(qte,'EcorePackageImpl/2',1185);bcb(1203,1,nwe,l$d);_.wj=function m$d(a){return JD(a,241)};_.xj=function n$d(a){return KC(j5,Tve,87,a,0,1)};var J7=mdb(qte,'EcorePackageImpl/20',1203);bcb(1204,1,nwe,o$d);_.wj=function p$d(a){return JD(a,444)};_.xj=function q$d(a){return KC(u5,Uhe,836,a,0,1)};var K7=mdb(qte,'EcorePackageImpl/21',1204);bcb(1205,1,nwe,r$d);_.wj=function s$d(a){return KD(a)};_.xj=function t$d(a){return KC(wI,nie,476,a,8,1)};var L7=mdb(qte,'EcorePackageImpl/22',1205);bcb(1206,1,nwe,u$d);_.wj=function v$d(a){return JD(a,190)};_.xj=function w$d(a){return KC(SD,nie,190,a,0,2)};var M7=mdb(qte,'EcorePackageImpl/23',1206);bcb(1207,1,nwe,x$d);_.wj=function y$d(a){return JD(a,217)};_.xj=function z$d(a){return KC(xI,nie,217,a,0,1)};var N7=mdb(qte,'EcorePackageImpl/24',1207);bcb(1208,1,nwe,A$d);_.wj=function B$d(a){return JD(a,172)};_.xj=function C$d(a){return KC(yI,nie,172,a,0,1)};var O7=mdb(qte,'EcorePackageImpl/25',1208);bcb(1209,1,nwe,D$d);_.wj=function E$d(a){return JD(a,199)};_.xj=function F$d(a){return KC($J,nie,199,a,0,1)};var P7=mdb(qte,'EcorePackageImpl/26',1209);bcb(1210,1,nwe,G$d);_.wj=function H$d(a){return false};_.xj=function I$d(a){return KC(O4,Uhe,2110,a,0,1)};var Q7=mdb(qte,'EcorePackageImpl/27',1210);bcb(1211,1,nwe,J$d);_.wj=function K$d(a){return LD(a)};_.xj=function L$d(a){return KC(BI,nie,333,a,7,1)};var R7=mdb(qte,'EcorePackageImpl/28',1211);bcb(1212,1,nwe,M$d);_.wj=function N$d(a){return JD(a,58)};_.xj=function O$d(a){return KC(T4,eme,58,a,0,1)};var S7=mdb(qte,'EcorePackageImpl/29',1212);bcb(1186,1,nwe,P$d);_.wj=function Q$d(a){return JD(a,510)};_.xj=function R$d(a){return KC(a5,{3:1,4:1,5:1,1934:1},590,a,0,1)};var c8=mdb(qte,'EcorePackageImpl/3',1186);bcb(1213,1,nwe,S$d);_.wj=function T$d(a){return JD(a,573)};_.xj=function U$d(a){return KC(U4,Uhe,1940,a,0,1)};var U7=mdb(qte,'EcorePackageImpl/30',1213);bcb(1214,1,nwe,V$d);_.wj=function W$d(a){return JD(a,153)};_.xj=function X$d(a){return KC(O9,eme,153,a,0,1)};var V7=mdb(qte,'EcorePackageImpl/31',1214);bcb(1215,1,nwe,Y$d);_.wj=function Z$d(a){return JD(a,72)};_.xj=function $$d(a){return KC(E9,owe,72,a,0,1)};var W7=mdb(qte,'EcorePackageImpl/32',1215);bcb(1216,1,nwe,_$d);_.wj=function a_d(a){return JD(a,155)};_.xj=function b_d(a){return KC(FI,nie,155,a,0,1)};var X7=mdb(qte,'EcorePackageImpl/33',1216);bcb(1217,1,nwe,c_d);_.wj=function d_d(a){return JD(a,19)};_.xj=function e_d(a){return KC(JI,nie,19,a,0,1)};var Y7=mdb(qte,'EcorePackageImpl/34',1217);bcb(1218,1,nwe,f_d);_.wj=function g_d(a){return JD(a,290)};_.xj=function h_d(a){return KC(AI,Uhe,290,a,0,1)};var Z7=mdb(qte,'EcorePackageImpl/35',1218);bcb(1219,1,nwe,i_d);_.wj=function j_d(a){return JD(a,162)};_.xj=function k_d(a){return KC(MI,nie,162,a,0,1)};var $7=mdb(qte,'EcorePackageImpl/36',1219);bcb(1220,1,nwe,l_d);_.wj=function m_d(a){return JD(a,83)};_.xj=function n_d(a){return KC(DK,Uhe,83,a,0,1)};var _7=mdb(qte,'EcorePackageImpl/37',1220);bcb(1221,1,nwe,o_d);_.wj=function p_d(a){return JD(a,591)};_.xj=function q_d(a){return KC(v8,Uhe,591,a,0,1)};var a8=mdb(qte,'EcorePackageImpl/38',1221);bcb(1222,1,nwe,r_d);_.wj=function s_d(a){return false};_.xj=function t_d(a){return KC(u8,Uhe,2111,a,0,1)};var b8=mdb(qte,'EcorePackageImpl/39',1222);bcb(1187,1,nwe,u_d);_.wj=function v_d(a){return JD(a,88)};_.xj=function w_d(a){return KC(c5,Uhe,26,a,0,1)};var i8=mdb(qte,'EcorePackageImpl/4',1187);bcb(1223,1,nwe,x_d);_.wj=function y_d(a){return JD(a,184)};_.xj=function z_d(a){return KC(UI,nie,184,a,0,1)};var d8=mdb(qte,'EcorePackageImpl/40',1223);bcb(1224,1,nwe,A_d);_.wj=function B_d(a){return ND(a)};_.xj=function C_d(a){return KC(ZI,nie,2,a,6,1)};var e8=mdb(qte,'EcorePackageImpl/41',1224);bcb(1225,1,nwe,D_d);_.wj=function E_d(a){return JD(a,588)};_.xj=function F_d(a){return KC(X4,Uhe,588,a,0,1)};var f8=mdb(qte,'EcorePackageImpl/42',1225);bcb(1226,1,nwe,G_d);_.wj=function H_d(a){return false};_.xj=function I_d(a){return KC(V4,nie,2112,a,0,1)};var g8=mdb(qte,'EcorePackageImpl/43',1226);bcb(1227,1,nwe,J_d);_.wj=function K_d(a){return JD(a,42)};_.xj=function L_d(a){return KC(CK,zie,42,a,0,1)};var h8=mdb(qte,'EcorePackageImpl/44',1227);bcb(1188,1,nwe,M_d);_.wj=function N_d(a){return JD(a,138)};_.xj=function O_d(a){return KC(d5,Uhe,138,a,0,1)};var j8=mdb(qte,'EcorePackageImpl/5',1188);bcb(1189,1,nwe,P_d);_.wj=function Q_d(a){return JD(a,148)};_.xj=function R_d(a){return KC(f5,Uhe,148,a,0,1)};var k8=mdb(qte,'EcorePackageImpl/6',1189);bcb(1190,1,nwe,S_d);_.wj=function T_d(a){return JD(a,457)};_.xj=function U_d(a){return KC(h5,Uhe,671,a,0,1)};var l8=mdb(qte,'EcorePackageImpl/7',1190);bcb(1191,1,nwe,V_d);_.wj=function W_d(a){return JD(a,573)};_.xj=function X_d(a){return KC(g5,Uhe,678,a,0,1)};var m8=mdb(qte,'EcorePackageImpl/8',1191);bcb(1192,1,nwe,Y_d);_.wj=function Z_d(a){return JD(a,471)};_.xj=function $_d(a){return KC(i5,Uhe,471,a,0,1)};var n8=mdb(qte,'EcorePackageImpl/9',1192);bcb(1025,1982,ive,c0d);_.bi=function d0d(a,b){__d(this,BD(b,415))};_.fi=function e0d(a,b){a0d(this,a,BD(b,415))};var q8=mdb(qte,'MinimalEObjectImpl/1ArrayDelegatingAdapterList',1025);bcb(1026,143,fve,f0d);_.Ai=function g0d(){return this.a.a};var p8=mdb(qte,'MinimalEObjectImpl/1ArrayDelegatingAdapterList/1',1026);bcb(1053,1052,{},i0d);var t8=mdb('org.eclipse.emf.ecore.plugin','EcorePlugin',1053);var v8=odb(pwe,'Resource');bcb(781,1378,qwe);_.Yk=function m0d(a){};_.Zk=function n0d(a){};_.Vk=function o0d(){return !this.a&&(this.a=new z0d(this)),this.a};_.Wk=function p0d(a){var b,c,d,e,f;d=a.length;if(d>0){BCb(0,a.length);if(a.charCodeAt(0)==47){f=new Skb(4);e=1;for(b=1;b0&&(a=a.substr(0,c))}}}return k0d(this,a)};_.Xk=function q0d(){return this.c};_.Ib=function r0d(){var a;return hdb(this.gm)+'@'+(a=tb(this)>>>0,a.toString(16))+" uri='"+this.d+"'"};_.b=false;var z8=mdb(rwe,'ResourceImpl',781);bcb(1379,781,qwe,s0d);var w8=mdb(rwe,'BinaryResourceImpl',1379);bcb(1169,694,pue);_.si=function v0d(a){return JD(a,56)?t0d(this,BD(a,56)):JD(a,591)?new Fyd(BD(a,591).Vk()):PD(a)===PD(this.f)?BD(a,14).Kc():(LCd(),KCd.a)};_.Ob=function w0d(){return u0d(this)};_.a=false;var z9=mdb(yve,'EcoreUtil/ContentTreeIterator',1169);bcb(1380,1169,pue,x0d);_.si=function y0d(a){return PD(a)===PD(this.f)?BD(a,15).Kc():new C6d(BD(a,56))};var x8=mdb(rwe,'ResourceImpl/5',1380);bcb(648,1994,Ove,z0d);_.Hc=function A0d(a){return this.i<=4?pud(this,a):JD(a,49)&&BD(a,49).Zg()==this.a};_.bi=function B0d(a,b){a==this.i-1&&(this.a.b||(this.a.b=true,null))};_.di=function C0d(a,b){a==0?this.a.b||(this.a.b=true,null):Atd(this,a,b)};_.fi=function D0d(a,b){};_.gi=function E0d(a,b,c){};_.aj=function F0d(){return 2};_.Ai=function G0d(){return this.a};_.bj=function H0d(){return true};_.cj=function I0d(a,b){var c;c=BD(a,49);b=c.wh(this.a,b);return b};_.dj=function J0d(a,b){var c;c=BD(a,49);return c.wh(null,b)};_.ej=function K0d(){return false};_.hi=function L0d(){return true};_.ri=function M0d(a){return KC(m5,Uhe,56,a,0,1)};_.ni=function N0d(){return false};var y8=mdb(rwe,'ResourceImpl/ContentsEList',648);bcb(957,1964,Lie,O0d);_.Zc=function P0d(a){return this.a._h(a)};_.gc=function Q0d(){return this.a.gc()};var A8=mdb(yve,'AbstractSequentialInternalEList/1',957);var K6d,L6d,M6d,N6d;bcb(624,1,{},y1d);var R0d,S0d;var G8=mdb(yve,'BasicExtendedMetaData',624);bcb(1160,1,{},C1d);_.$k=function D1d(){return null};_._k=function E1d(){this.a==-2&&A1d(this,W0d(this.d,this.b));return this.a};_.al=function F1d(){return null};_.bl=function G1d(){return mmb(),mmb(),jmb};_.ne=function H1d(){this.c==Gwe&&B1d(this,_0d(this.d,this.b));return this.c};_.cl=function I1d(){return 0};_.a=-2;_.c=Gwe;var C8=mdb(yve,'BasicExtendedMetaData/EClassExtendedMetaDataImpl',1160);bcb(1161,1,{},O1d);_.$k=function P1d(){this.a==(T0d(),R0d)&&J1d(this,V0d(this.f,this.b));return this.a};_._k=function Q1d(){return 0};_.al=function R1d(){this.c==(T0d(),R0d)&&K1d(this,Z0d(this.f,this.b));return this.c};_.bl=function S1d(){!this.d&&L1d(this,$0d(this.f,this.b));return this.d};_.ne=function T1d(){this.e==Gwe&&M1d(this,_0d(this.f,this.b));return this.e};_.cl=function U1d(){this.g==-2&&N1d(this,c1d(this.f,this.b));return this.g};_.e=Gwe;_.g=-2;var D8=mdb(yve,'BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl',1161);bcb(1159,1,{},Y1d);_.b=false;_.c=false;var E8=mdb(yve,'BasicExtendedMetaData/EPackageExtendedMetaDataImpl',1159);bcb(1162,1,{},j2d);_.c=-2;_.e=Gwe;_.f=Gwe;var F8=mdb(yve,'BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl',1162);bcb(585,622,Pve,k2d);_.aj=function l2d(){return this.c};_.Fk=function m2d(){return false};_.li=function n2d(a,b){return b};_.c=0;var T8=mdb(yve,'EDataTypeEList',585);var O9=odb(yve,'FeatureMap');bcb(75,585,{3:1,4:1,20:1,28:1,52:1,14:1,15:1,54:1,67:1,63:1,58:1,76:1,153:1,215:1,1937:1,69:1,95:1},u3d);_.Vc=function v3d(a,b){o2d(this,a,BD(b,72))};_.Fc=function w3d(a){return r2d(this,BD(a,72))};_.Yh=function B3d(a){w2d(this,BD(a,72))};_.cj=function M3d(a,b){return O2d(this,BD(a,72),b)};_.dj=function N3d(a,b){return Q2d(this,BD(a,72),b)};_.ii=function P3d(a,b){return W2d(this,a,b)};_.li=function R3d(a,b){return _2d(this,a,BD(b,72))};_._c=function T3d(a,b){return c3d(this,a,BD(b,72))};_.jj=function X3d(a,b){return i3d(this,BD(a,72),b)};_.kj=function Y3d(a,b){return k3d(this,BD(a,72),b)};_.lj=function Z3d(a,b,c){return l3d(this,BD(a,72),BD(b,72),c)};_.oi=function _3d(a,b){return t3d(this,a,BD(b,72))};_.dl=function x3d(a,b){return q2d(this,a,b)};_.Wc=function y3d(a,b){var c,d,e,f,g,h,i,j,k;j=new zud(b.gc());for(e=b.Kc();e.Ob();){d=BD(e.Pb(),72);f=d.ak();if(T6d(this.e,f)){(!f.hi()||!E2d(this,f,d.dd())&&!pud(j,d))&&wtd(j,d)}else{k=S6d(this.e.Tg(),f);c=BD(this.g,119);g=true;for(h=0;h=0){b=a[this.c];if(this.k.rl(b.ak())){this.j=this.f?b:b.dd();this.i=-2;return true}}this.i=-1;this.g=-1;return false};var H8=mdb(yve,'BasicFeatureMap/FeatureEIterator',410);bcb(662,410,jie,s4d);_.Lk=function t4d(){return true};var I8=mdb(yve,'BasicFeatureMap/ResolvingFeatureEIterator',662);bcb(955,486,Vve,u4d);_.Gi=function v4d(){return this};var M8=mdb(yve,'EContentsEList/1',955);bcb(956,486,Vve,w4d);_.Lk=function x4d(){return false};var N8=mdb(yve,'EContentsEList/2',956);bcb(954,279,Wve,y4d);_.Nk=function z4d(a){};_.Ob=function A4d(){return false};_.Sb=function B4d(){return false};var O8=mdb(yve,'EContentsEList/FeatureIteratorImpl/1',954);bcb(825,585,Pve,C4d);_.ci=function D4d(){this.a=true};_.fj=function E4d(){return this.a};_.Xj=function F4d(){var a;Uxd(this);if(oid(this.e)){a=this.a;this.a=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var S8=mdb(yve,'EDataTypeEList/Unsettable',825);bcb(1849,585,Pve,G4d);_.hi=function H4d(){return true};var V8=mdb(yve,'EDataTypeUniqueEList',1849);bcb(1850,825,Pve,I4d);_.hi=function J4d(){return true};var U8=mdb(yve,'EDataTypeUniqueEList/Unsettable',1850);bcb(139,85,Pve,K4d);_.Ek=function L4d(){return true};_.li=function M4d(a,b){return ILd(this,a,BD(b,56))};var W8=mdb(yve,'EObjectContainmentEList/Resolving',139);bcb(1163,545,Pve,N4d);_.Ek=function O4d(){return true};_.li=function P4d(a,b){return ILd(this,a,BD(b,56))};var X8=mdb(yve,'EObjectContainmentEList/Unsettable/Resolving',1163);bcb(748,16,Pve,Q4d);_.ci=function R4d(){this.a=true};_.fj=function S4d(){return this.a};_.Xj=function T4d(){var a;Uxd(this);if(oid(this.e)){a=this.a;this.a=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var a9=mdb(yve,'EObjectContainmentWithInverseEList/Unsettable',748);bcb(1173,748,Pve,U4d);_.Ek=function V4d(){return true};_.li=function W4d(a,b){return ILd(this,a,BD(b,56))};var _8=mdb(yve,'EObjectContainmentWithInverseEList/Unsettable/Resolving',1173);bcb(743,496,Pve,X4d);_.ci=function Y4d(){this.a=true};_.fj=function Z4d(){return this.a};_.Xj=function $4d(){var a;Uxd(this);if(oid(this.e)){a=this.a;this.a=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var c9=mdb(yve,'EObjectEList/Unsettable',743);bcb(328,496,Pve,_4d);_.Ek=function a5d(){return true};_.li=function b5d(a,b){return ILd(this,a,BD(b,56))};var f9=mdb(yve,'EObjectResolvingEList',328);bcb(1641,743,Pve,c5d);_.Ek=function d5d(){return true};_.li=function e5d(a,b){return ILd(this,a,BD(b,56))};var e9=mdb(yve,'EObjectResolvingEList/Unsettable',1641);bcb(1381,1,{},h5d);var f5d;var g9=mdb(yve,'EObjectValidator',1381);bcb(546,496,Pve,i5d);_.zk=function j5d(){return this.d};_.Ak=function k5d(){return this.b};_.bj=function l5d(){return true};_.Dk=function m5d(){return true};_.b=0;var k9=mdb(yve,'EObjectWithInverseEList',546);bcb(1176,546,Pve,n5d);_.Ck=function o5d(){return true};var h9=mdb(yve,'EObjectWithInverseEList/ManyInverse',1176);bcb(625,546,Pve,p5d);_.ci=function q5d(){this.a=true};_.fj=function r5d(){return this.a};_.Xj=function s5d(){var a;Uxd(this);if(oid(this.e)){a=this.a;this.a=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var j9=mdb(yve,'EObjectWithInverseEList/Unsettable',625);bcb(1175,625,Pve,t5d);_.Ck=function u5d(){return true};var i9=mdb(yve,'EObjectWithInverseEList/Unsettable/ManyInverse',1175);bcb(749,546,Pve,v5d);_.Ek=function w5d(){return true};_.li=function x5d(a,b){return ILd(this,a,BD(b,56))};var o9=mdb(yve,'EObjectWithInverseResolvingEList',749);bcb(31,749,Pve,y5d);_.Ck=function z5d(){return true};var l9=mdb(yve,'EObjectWithInverseResolvingEList/ManyInverse',31);bcb(750,625,Pve,A5d);_.Ek=function B5d(){return true};_.li=function C5d(a,b){return ILd(this,a,BD(b,56))};var n9=mdb(yve,'EObjectWithInverseResolvingEList/Unsettable',750);bcb(1174,750,Pve,D5d);_.Ck=function E5d(){return true};var m9=mdb(yve,'EObjectWithInverseResolvingEList/Unsettable/ManyInverse',1174);bcb(1164,622,Pve);_.ai=function F5d(){return (this.b&1792)==0};_.ci=function G5d(){this.b|=1};_.Bk=function H5d(){return (this.b&4)!=0};_.bj=function I5d(){return (this.b&40)!=0};_.Ck=function J5d(){return (this.b&16)!=0};_.Dk=function K5d(){return (this.b&8)!=0};_.Ek=function L5d(){return (this.b&Dve)!=0};_.rk=function M5d(){return (this.b&32)!=0};_.Fk=function N5d(){return (this.b&zte)!=0};_.wj=function O5d(a){return !this.d?this.ak().Yj().wj(a):qEd(this.d,a)};_.fj=function P5d(){return (this.b&2)!=0?(this.b&1)!=0:this.i!=0};_.hi=function Q5d(){return (this.b&128)!=0};_.Xj=function S5d(){var a;Uxd(this);if((this.b&2)!=0){if(oid(this.e)){a=(this.b&1)!=0;this.b&=-2;GLd(this,new qSd(this.e,2,bLd(this.e.Tg(),this.ak()),a,false))}else{this.b&=-2}}};_.ni=function T5d(){return (this.b&1536)==0};_.b=0;var q9=mdb(yve,'EcoreEList/Generic',1164);bcb(1165,1164,Pve,U5d);_.ak=function V5d(){return this.a};var p9=mdb(yve,'EcoreEList/Dynamic',1165);bcb(747,63,oue,W5d);_.ri=function X5d(a){return izd(this.a.a,a)};var u9=mdb(yve,'EcoreEMap/1',747);bcb(746,85,Pve,Y5d);_.bi=function Z5d(a,b){uAd(this.b,BD(b,133))};_.di=function $5d(a,b){tAd(this.b)};_.ei=function _5d(a,b,c){var d;++(d=this.b,BD(b,133),d).e};_.fi=function a6d(a,b){vAd(this.b,BD(b,133))};_.gi=function b6d(a,b,c){vAd(this.b,BD(c,133));PD(c)===PD(b)&&BD(c,133).Th(CAd(BD(b,133).cd()));uAd(this.b,BD(b,133))};var v9=mdb(yve,'EcoreEMap/DelegateEObjectContainmentEList',746);bcb(1171,151,Ave,c6d);var x9=mdb(yve,'EcoreEMap/Unsettable',1171);bcb(1172,746,Pve,d6d);_.ci=function e6d(){this.a=true};_.fj=function f6d(){return this.a};_.Xj=function g6d(){var a;Uxd(this);if(oid(this.e)){a=this.a;this.a=false;Uhd(this.e,new qSd(this.e,2,this.c,a,false))}else{this.a=false}};_.a=false;var w9=mdb(yve,'EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList',1172);bcb(1168,228,fke,A6d);_.a=false;_.b=false;var A9=mdb(yve,'EcoreUtil/Copier',1168);bcb(745,1,aie,C6d);_.Nb=function D6d(a){Rrb(this,a)};_.Ob=function E6d(){return B6d(this)};_.Pb=function F6d(){var a;B6d(this);a=this.b;this.b=null;return a};_.Qb=function G6d(){this.a.Qb()};var B9=mdb(yve,'EcoreUtil/ProperContentIterator',745);bcb(1382,1381,{},J6d);var H6d;var C9=mdb(yve,'EcoreValidator',1382);var P6d;var N9=odb(yve,'FeatureMapUtil/Validator');bcb(1260,1,{1942:1},U6d);_.rl=function V6d(a){return true};var F9=mdb(yve,'FeatureMapUtil/1',1260);bcb(757,1,{1942:1},Z6d);_.rl=function $6d(a){var b;if(this.c==a)return true;b=DD(Ohb(this.a,a));if(b==null){if(Y6d(this,a)){_6d(this.a,a,(Bcb(),Acb));return true}else{_6d(this.a,a,(Bcb(),zcb));return false}}else{return b==(Bcb(),Acb)}};_.e=false;var W6d;var I9=mdb(yve,'FeatureMapUtil/BasicValidator',757);bcb(758,43,fke,a7d);var H9=mdb(yve,'FeatureMapUtil/BasicValidator/Cache',758);bcb(501,52,{20:1,28:1,52:1,14:1,15:1,58:1,76:1,69:1,95:1},f7d);_.Vc=function g7d(a,b){p2d(this.c,this.b,a,b)};_.Fc=function h7d(a){return q2d(this.c,this.b,a)};_.Wc=function i7d(a,b){return s2d(this.c,this.b,a,b)};_.Gc=function j7d(a){return b7d(this,a)};_.Xh=function k7d(a,b){u2d(this.c,this.b,a,b)};_.lk=function l7d(a,b){return x2d(this.c,this.b,a,b)};_.pi=function m7d(a){return J2d(this.c,this.b,a,false)};_.Zh=function n7d(){return y2d(this.c,this.b)};_.$h=function o7d(){return z2d(this.c,this.b)};_._h=function p7d(a){return A2d(this.c,this.b,a)};_.mk=function q7d(a,b){return c7d(this,a,b)};_.$b=function r7d(){d7d(this)};_.Hc=function s7d(a){return E2d(this.c,this.b,a)};_.Ic=function t7d(a){return G2d(this.c,this.b,a)};_.Xb=function u7d(a){return J2d(this.c,this.b,a,true)};_.Wj=function v7d(a){return this};_.Xc=function w7d(a){return L2d(this.c,this.b,a)};_.dc=function x7d(){return e7d(this)};_.fj=function y7d(){return !R2d(this.c,this.b)};_.Kc=function z7d(){return S2d(this.c,this.b)};_.Yc=function A7d(){return U2d(this.c,this.b)};_.Zc=function B7d(a){return V2d(this.c,this.b,a)};_.ii=function C7d(a,b){return X2d(this.c,this.b,a,b)};_.ji=function D7d(a,b){Y2d(this.c,this.b,a,b)};_.$c=function E7d(a){return Z2d(this.c,this.b,a)};_.Mc=function F7d(a){return $2d(this.c,this.b,a)};_._c=function G7d(a,b){return e3d(this.c,this.b,a,b)};_.Wb=function H7d(a){D2d(this.c,this.b);b7d(this,BD(a,15))};_.gc=function I7d(){return n3d(this.c,this.b)};_.Pc=function J7d(){return o3d(this.c,this.b)};_.Qc=function K7d(a){return q3d(this.c,this.b,a)};_.Ib=function L7d(){var a,b;b=new Hfb;b.a+='[';for(a=y2d(this.c,this.b);b4d(a);){Efb(b,xfb(d4d(a)));b4d(a)&&(b.a+=She,b)}b.a+=']';return b.a};_.Xj=function M7d(){D2d(this.c,this.b)};var J9=mdb(yve,'FeatureMapUtil/FeatureEList',501);bcb(627,36,fve,O7d);_.yi=function P7d(a){return N7d(this,a)};_.Di=function Q7d(a){var b,c,d,e,f,g,h;switch(this.d){case 1:case 2:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){this.g=a.zi();a.xi()==1&&(this.d=1);return true}break}case 3:{e=a.xi();switch(e){case 3:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){this.d=5;b=new zud(2);wtd(b,this.g);wtd(b,a.zi());this.g=b;return true}break}}break}case 5:{e=a.xi();switch(e){case 3:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){c=BD(this.g,14);c.Fc(a.zi());return true}break}}break}case 4:{e=a.xi();switch(e){case 3:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){this.d=1;this.g=a.zi();return true}break}case 4:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){this.d=6;h=new zud(2);wtd(h,this.n);wtd(h,a.Bi());this.n=h;g=OC(GC(WD,1),oje,25,15,[this.o,a.Ci()]);this.g=g;return true}break}}break}case 6:{e=a.xi();switch(e){case 4:{f=a.Ai();if(PD(f)===PD(this.c)&&N7d(this,null)==a.yi(null)){c=BD(this.n,14);c.Fc(a.Bi());g=BD(this.g,48);d=KC(WD,oje,25,g.length+1,15,1);$fb(g,0,d,0,g.length);d[g.length]=a.Ci();this.g=d;return true}break}}break}}return false};var K9=mdb(yve,'FeatureMapUtil/FeatureENotificationImpl',627);bcb(552,501,{20:1,28:1,52:1,14:1,15:1,58:1,76:1,153:1,215:1,1937:1,69:1,95:1},R7d);_.dl=function S7d(a,b){return q2d(this.c,a,b)};_.el=function T7d(a,b,c){return x2d(this.c,a,b,c)};_.fl=function U7d(a,b,c){return C2d(this.c,a,b,c)};_.gl=function V7d(){return this};_.hl=function W7d(a,b){return K2d(this.c,a,b)};_.il=function X7d(a){return BD(J2d(this.c,this.b,a,false),72).ak()};_.jl=function Y7d(a){return BD(J2d(this.c,this.b,a,false),72).dd()};_.kl=function Z7d(){return this.a};_.ll=function $7d(a){return !R2d(this.c,a)};_.ml=function _7d(a,b){f3d(this.c,a,b)};_.nl=function a8d(a){return g3d(this.c,a)};_.ol=function b8d(a){s3d(this.c,a)};var L9=mdb(yve,'FeatureMapUtil/FeatureFeatureMap',552);bcb(1259,1,zve,c8d);_.Wj=function d8d(a){return J2d(this.b,this.a,-1,a)};_.fj=function e8d(){return !R2d(this.b,this.a)};_.Wb=function f8d(a){f3d(this.b,this.a,a)};_.Xj=function g8d(){D2d(this.b,this.a)};var M9=mdb(yve,'FeatureMapUtil/FeatureValue',1259);var h8d,i8d,j8d,k8d,l8d;var Q9=odb(Iwe,'AnyType');bcb(666,60,Tie,n8d);var R9=mdb(Iwe,'InvalidDatatypeValueException',666);var S9=odb(Iwe,Jwe);var T9=odb(Iwe,Kwe);var U9=odb(Iwe,Lwe);var o8d;var q8d;var s8d,t8d,u8d,v8d,w8d,x8d,y8d,z8d,A8d,B8d,C8d,D8d,E8d,F8d,G8d,H8d,I8d,J8d,K8d,L8d,M8d,N8d,O8d,P8d;bcb(830,506,{105:1,92:1,90:1,56:1,49:1,97:1,843:1},R8d);_._g=function S8d(a,b,c){switch(a){case 0:if(c)return !this.c&&(this.c=new u3d(this,0)),this.c;return !this.c&&(this.c=new u3d(this,0)),this.c.b;case 1:if(c)return !this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153);return (!this.c&&(this.c=new u3d(this,0)),BD(BD(T2d(this.c,(Q8d(),t8d)),153),215)).kl();case 2:if(c)return !this.b&&(this.b=new u3d(this,2)),this.b;return !this.b&&(this.b=new u3d(this,2)),this.b.b;}return bid(this,a-aLd(this.zh()),XKd((this.j&2)==0?this.zh():(!this.k&&(this.k=new HGd),this.k).ck(),a),b,c)};_.jh=function T8d(a,b,c){var d;switch(b){case 0:return !this.c&&(this.c=new u3d(this,0)),B2d(this.c,a,c);case 1:return (!this.c&&(this.c=new u3d(this,0)),BD(BD(T2d(this.c,(Q8d(),t8d)),153),69)).mk(a,c);case 2:return !this.b&&(this.b=new u3d(this,2)),B2d(this.b,a,c);}return d=BD(XKd((this.j&2)==0?this.zh():(!this.k&&(this.k=new HGd),this.k).ck(),b),66),d.Nj().Rj(this,Aid(this),b-aLd(this.zh()),a,c)};_.lh=function U8d(a){switch(a){case 0:return !!this.c&&this.c.i!=0;case 1:return !(!this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153)).dc();case 2:return !!this.b&&this.b.i!=0;}return cid(this,a-aLd(this.zh()),XKd((this.j&2)==0?this.zh():(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.sh=function V8d(a,b){switch(a){case 0:!this.c&&(this.c=new u3d(this,0));d3d(this.c,b);return;case 1:(!this.c&&(this.c=new u3d(this,0)),BD(BD(T2d(this.c,(Q8d(),t8d)),153),215)).Wb(b);return;case 2:!this.b&&(this.b=new u3d(this,2));d3d(this.b,b);return;}did(this,a-aLd(this.zh()),XKd((this.j&2)==0?this.zh():(!this.k&&(this.k=new HGd),this.k).ck(),a),b)};_.zh=function W8d(){return Q8d(),s8d};_.Bh=function X8d(a){switch(a){case 0:!this.c&&(this.c=new u3d(this,0));Uxd(this.c);return;case 1:(!this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153)).$b();return;case 2:!this.b&&(this.b=new u3d(this,2));Uxd(this.b);return;}eid(this,a-aLd(this.zh()),XKd((this.j&2)==0?this.zh():(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.Ib=function Y8d(){var a;if((this.j&4)!=0)return Eid(this);a=new Jfb(Eid(this));a.a+=' (mixed: ';Dfb(a,this.c);a.a+=', anyAttribute: ';Dfb(a,this.b);a.a+=')';return a.a};var V9=mdb(Mwe,'AnyTypeImpl',830);bcb(667,506,{105:1,92:1,90:1,56:1,49:1,97:1,2021:1,667:1},_8d);_._g=function a9d(a,b,c){switch(a){case 0:return this.a;case 1:return this.b;}return bid(this,a-aLd((Q8d(),F8d)),XKd((this.j&2)==0?F8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b,c)};_.lh=function b9d(a){switch(a){case 0:return this.a!=null;case 1:return this.b!=null;}return cid(this,a-aLd((Q8d(),F8d)),XKd((this.j&2)==0?F8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.sh=function c9d(a,b){switch(a){case 0:Z8d(this,GD(b));return;case 1:$8d(this,GD(b));return;}did(this,a-aLd((Q8d(),F8d)),XKd((this.j&2)==0?F8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b)};_.zh=function d9d(){return Q8d(),F8d};_.Bh=function e9d(a){switch(a){case 0:this.a=null;return;case 1:this.b=null;return;}eid(this,a-aLd((Q8d(),F8d)),XKd((this.j&2)==0?F8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.Ib=function f9d(){var a;if((this.j&4)!=0)return Eid(this);a=new Jfb(Eid(this));a.a+=' (data: ';Efb(a,this.a);a.a+=', target: ';Efb(a,this.b);a.a+=')';return a.a};_.a=null;_.b=null;var W9=mdb(Mwe,'ProcessingInstructionImpl',667);bcb(668,830,{105:1,92:1,90:1,56:1,49:1,97:1,843:1,2022:1,668:1},i9d);_._g=function j9d(a,b,c){switch(a){case 0:if(c)return !this.c&&(this.c=new u3d(this,0)),this.c;return !this.c&&(this.c=new u3d(this,0)),this.c.b;case 1:if(c)return !this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153);return (!this.c&&(this.c=new u3d(this,0)),BD(BD(T2d(this.c,(Q8d(),t8d)),153),215)).kl();case 2:if(c)return !this.b&&(this.b=new u3d(this,2)),this.b;return !this.b&&(this.b=new u3d(this,2)),this.b.b;case 3:return !this.c&&(this.c=new u3d(this,0)),GD(K2d(this.c,(Q8d(),I8d),true));case 4:return j6d(this.a,(!this.c&&(this.c=new u3d(this,0)),GD(K2d(this.c,(Q8d(),I8d),true))));case 5:return this.a;}return bid(this,a-aLd((Q8d(),H8d)),XKd((this.j&2)==0?H8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b,c)};_.lh=function k9d(a){switch(a){case 0:return !!this.c&&this.c.i!=0;case 1:return !(!this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153)).dc();case 2:return !!this.b&&this.b.i!=0;case 3:return !this.c&&(this.c=new u3d(this,0)),GD(K2d(this.c,(Q8d(),I8d),true))!=null;case 4:return j6d(this.a,(!this.c&&(this.c=new u3d(this,0)),GD(K2d(this.c,(Q8d(),I8d),true))))!=null;case 5:return !!this.a;}return cid(this,a-aLd((Q8d(),H8d)),XKd((this.j&2)==0?H8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.sh=function l9d(a,b){switch(a){case 0:!this.c&&(this.c=new u3d(this,0));d3d(this.c,b);return;case 1:(!this.c&&(this.c=new u3d(this,0)),BD(BD(T2d(this.c,(Q8d(),t8d)),153),215)).Wb(b);return;case 2:!this.b&&(this.b=new u3d(this,2));d3d(this.b,b);return;case 3:h9d(this,GD(b));return;case 4:h9d(this,h6d(this.a,b));return;case 5:g9d(this,BD(b,148));return;}did(this,a-aLd((Q8d(),H8d)),XKd((this.j&2)==0?H8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b)};_.zh=function m9d(){return Q8d(),H8d};_.Bh=function n9d(a){switch(a){case 0:!this.c&&(this.c=new u3d(this,0));Uxd(this.c);return;case 1:(!this.c&&(this.c=new u3d(this,0)),BD(T2d(this.c,(Q8d(),t8d)),153)).$b();return;case 2:!this.b&&(this.b=new u3d(this,2));Uxd(this.b);return;case 3:!this.c&&(this.c=new u3d(this,0));f3d(this.c,(Q8d(),I8d),null);return;case 4:h9d(this,h6d(this.a,null));return;case 5:this.a=null;return;}eid(this,a-aLd((Q8d(),H8d)),XKd((this.j&2)==0?H8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};var X9=mdb(Mwe,'SimpleAnyTypeImpl',668);bcb(669,506,{105:1,92:1,90:1,56:1,49:1,97:1,2023:1,669:1},o9d);_._g=function p9d(a,b,c){switch(a){case 0:if(c)return !this.a&&(this.a=new u3d(this,0)),this.a;return !this.a&&(this.a=new u3d(this,0)),this.a.b;case 1:return c?(!this.b&&(this.b=new dId((jGd(),fGd),x6,this,1)),this.b):(!this.b&&(this.b=new dId((jGd(),fGd),x6,this,1)),FAd(this.b));case 2:return c?(!this.c&&(this.c=new dId((jGd(),fGd),x6,this,2)),this.c):(!this.c&&(this.c=new dId((jGd(),fGd),x6,this,2)),FAd(this.c));case 3:return !this.a&&(this.a=new u3d(this,0)),T2d(this.a,(Q8d(),L8d));case 4:return !this.a&&(this.a=new u3d(this,0)),T2d(this.a,(Q8d(),M8d));case 5:return !this.a&&(this.a=new u3d(this,0)),T2d(this.a,(Q8d(),O8d));case 6:return !this.a&&(this.a=new u3d(this,0)),T2d(this.a,(Q8d(),P8d));}return bid(this,a-aLd((Q8d(),K8d)),XKd((this.j&2)==0?K8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b,c)};_.jh=function q9d(a,b,c){var d;switch(b){case 0:return !this.a&&(this.a=new u3d(this,0)),B2d(this.a,a,c);case 1:return !this.b&&(this.b=new dId((jGd(),fGd),x6,this,1)),bId(this.b,a,c);case 2:return !this.c&&(this.c=new dId((jGd(),fGd),x6,this,2)),bId(this.c,a,c);case 5:return !this.a&&(this.a=new u3d(this,0)),c7d(T2d(this.a,(Q8d(),O8d)),a,c);}return d=BD(XKd((this.j&2)==0?(Q8d(),K8d):(!this.k&&(this.k=new HGd),this.k).ck(),b),66),d.Nj().Rj(this,Aid(this),b-aLd((Q8d(),K8d)),a,c)};_.lh=function r9d(a){switch(a){case 0:return !!this.a&&this.a.i!=0;case 1:return !!this.b&&this.b.f!=0;case 2:return !!this.c&&this.c.f!=0;case 3:return !this.a&&(this.a=new u3d(this,0)),!e7d(T2d(this.a,(Q8d(),L8d)));case 4:return !this.a&&(this.a=new u3d(this,0)),!e7d(T2d(this.a,(Q8d(),M8d)));case 5:return !this.a&&(this.a=new u3d(this,0)),!e7d(T2d(this.a,(Q8d(),O8d)));case 6:return !this.a&&(this.a=new u3d(this,0)),!e7d(T2d(this.a,(Q8d(),P8d)));}return cid(this,a-aLd((Q8d(),K8d)),XKd((this.j&2)==0?K8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.sh=function s9d(a,b){switch(a){case 0:!this.a&&(this.a=new u3d(this,0));d3d(this.a,b);return;case 1:!this.b&&(this.b=new dId((jGd(),fGd),x6,this,1));cId(this.b,b);return;case 2:!this.c&&(this.c=new dId((jGd(),fGd),x6,this,2));cId(this.c,b);return;case 3:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),L8d)));!this.a&&(this.a=new u3d(this,0));b7d(T2d(this.a,L8d),BD(b,14));return;case 4:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),M8d)));!this.a&&(this.a=new u3d(this,0));b7d(T2d(this.a,M8d),BD(b,14));return;case 5:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),O8d)));!this.a&&(this.a=new u3d(this,0));b7d(T2d(this.a,O8d),BD(b,14));return;case 6:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),P8d)));!this.a&&(this.a=new u3d(this,0));b7d(T2d(this.a,P8d),BD(b,14));return;}did(this,a-aLd((Q8d(),K8d)),XKd((this.j&2)==0?K8d:(!this.k&&(this.k=new HGd),this.k).ck(),a),b)};_.zh=function t9d(){return Q8d(),K8d};_.Bh=function u9d(a){switch(a){case 0:!this.a&&(this.a=new u3d(this,0));Uxd(this.a);return;case 1:!this.b&&(this.b=new dId((jGd(),fGd),x6,this,1));this.b.c.$b();return;case 2:!this.c&&(this.c=new dId((jGd(),fGd),x6,this,2));this.c.c.$b();return;case 3:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),L8d)));return;case 4:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),M8d)));return;case 5:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),O8d)));return;case 6:!this.a&&(this.a=new u3d(this,0));d7d(T2d(this.a,(Q8d(),P8d)));return;}eid(this,a-aLd((Q8d(),K8d)),XKd((this.j&2)==0?K8d:(!this.k&&(this.k=new HGd),this.k).ck(),a))};_.Ib=function v9d(){var a;if((this.j&4)!=0)return Eid(this);a=new Jfb(Eid(this));a.a+=' (mixed: ';Dfb(a,this.a);a.a+=')';return a.a};var Y9=mdb(Mwe,'XMLTypeDocumentRootImpl',669);bcb(1919,704,{105:1,92:1,90:1,471:1,147:1,56:1,108:1,49:1,97:1,150:1,114:1,115:1,2024:1},U9d);_.Ih=function V9d(a,b){switch(a.yj()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return b==null?null:fcb(b);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return GD(b);case 6:return C9d(BD(b,190));case 12:case 47:case 49:case 11:return Vmd(this,a,b);case 13:return b==null?null:qgb(BD(b,240));case 15:case 14:return b==null?null:D9d(Edb(ED(b)));case 17:return E9d((Q8d(),b));case 18:return E9d(b);case 21:case 20:return b==null?null:F9d(BD(b,155).a);case 27:return G9d(BD(b,190));case 30:return H9d((Q8d(),BD(b,15)));case 31:return H9d(BD(b,15));case 40:return K9d((Q8d(),b));case 42:return I9d((Q8d(),b));case 43:return I9d(b);case 59:case 48:return J9d((Q8d(),b));default:throw vbb(new Wdb(tte+a.ne()+ute));}};_.Jh=function W9d(a){var b,c,d,e,f;switch(a.G==-1&&(a.G=(c=bKd(a),c?HLd(c.Mh(),a):-1)),a.G){case 0:return b=new R8d,b;case 1:return d=new _8d,d;case 2:return e=new i9d,e;case 3:return f=new o9d,f;default:throw vbb(new Wdb(xte+a.zb+ute));}};_.Kh=function X9d(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;switch(a.yj()){case 5:case 52:case 4:return b;case 6:return L9d(b);case 8:case 7:return b==null?null:B9d(b);case 9:return b==null?null:Scb(Icb((d=Qge(b,true),d.length>0&&(BCb(0,d.length),d.charCodeAt(0)==43)?d.substr(1):d),-128,127)<<24>>24);case 10:return b==null?null:Scb(Icb((e=Qge(b,true),e.length>0&&(BCb(0,e.length),e.charCodeAt(0)==43)?e.substr(1):e),-128,127)<<24>>24);case 11:return GD(Wmd(this,(Q8d(),w8d),b));case 12:return GD(Wmd(this,(Q8d(),x8d),b));case 13:return b==null?null:new tgb(Qge(b,true));case 15:case 14:return M9d(b);case 16:return GD(Wmd(this,(Q8d(),y8d),b));case 17:return N9d((Q8d(),b));case 18:return N9d(b);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return Qge(b,true);case 21:case 20:return O9d(b);case 22:return GD(Wmd(this,(Q8d(),z8d),b));case 23:return GD(Wmd(this,(Q8d(),A8d),b));case 24:return GD(Wmd(this,(Q8d(),B8d),b));case 25:return GD(Wmd(this,(Q8d(),C8d),b));case 26:return GD(Wmd(this,(Q8d(),D8d),b));case 27:return P9d(b);case 30:return Q9d((Q8d(),b));case 31:return Q9d(b);case 32:return b==null?null:meb(Icb((k=Qge(b,true),k.length>0&&(BCb(0,k.length),k.charCodeAt(0)==43)?k.substr(1):k),Rie,Ohe));case 33:return b==null?null:new Ygb((l=Qge(b,true),l.length>0&&(BCb(0,l.length),l.charCodeAt(0)==43)?l.substr(1):l));case 34:return b==null?null:meb(Icb((m=Qge(b,true),m.length>0&&(BCb(0,m.length),m.charCodeAt(0)==43)?m.substr(1):m),Rie,Ohe));case 36:return b==null?null:Aeb(Jcb((n=Qge(b,true),n.length>0&&(BCb(0,n.length),n.charCodeAt(0)==43)?n.substr(1):n)));case 37:return b==null?null:Aeb(Jcb((o=Qge(b,true),o.length>0&&(BCb(0,o.length),o.charCodeAt(0)==43)?o.substr(1):o)));case 40:return T9d((Q8d(),b));case 42:return R9d((Q8d(),b));case 43:return R9d(b);case 44:return b==null?null:new Ygb((p=Qge(b,true),p.length>0&&(BCb(0,p.length),p.charCodeAt(0)==43)?p.substr(1):p));case 45:return b==null?null:new Ygb((q=Qge(b,true),q.length>0&&(BCb(0,q.length),q.charCodeAt(0)==43)?q.substr(1):q));case 46:return Qge(b,false);case 47:return GD(Wmd(this,(Q8d(),E8d),b));case 59:case 48:return S9d((Q8d(),b));case 49:return GD(Wmd(this,(Q8d(),G8d),b));case 50:return b==null?null:Web(Icb((r=Qge(b,true),r.length>0&&(BCb(0,r.length),r.charCodeAt(0)==43)?r.substr(1):r),awe,32767)<<16>>16);case 51:return b==null?null:Web(Icb((f=Qge(b,true),f.length>0&&(BCb(0,f.length),f.charCodeAt(0)==43)?f.substr(1):f),awe,32767)<<16>>16);case 53:return GD(Wmd(this,(Q8d(),J8d),b));case 55:return b==null?null:Web(Icb((g=Qge(b,true),g.length>0&&(BCb(0,g.length),g.charCodeAt(0)==43)?g.substr(1):g),awe,32767)<<16>>16);case 56:return b==null?null:Web(Icb((h=Qge(b,true),h.length>0&&(BCb(0,h.length),h.charCodeAt(0)==43)?h.substr(1):h),awe,32767)<<16>>16);case 57:return b==null?null:Aeb(Jcb((i=Qge(b,true),i.length>0&&(BCb(0,i.length),i.charCodeAt(0)==43)?i.substr(1):i)));case 58:return b==null?null:Aeb(Jcb((j=Qge(b,true),j.length>0&&(BCb(0,j.length),j.charCodeAt(0)==43)?j.substr(1):j)));case 60:return b==null?null:meb(Icb((c=Qge(b,true),c.length>0&&(BCb(0,c.length),c.charCodeAt(0)==43)?c.substr(1):c),Rie,Ohe));case 61:return b==null?null:meb(Icb(Qge(b,true),Rie,Ohe));default:throw vbb(new Wdb(tte+a.ne()+ute));}};var w9d,x9d,y9d,z9d;var Z9=mdb(Mwe,'XMLTypeFactoryImpl',1919);bcb(586,179,{105:1,92:1,90:1,147:1,191:1,56:1,235:1,108:1,49:1,97:1,150:1,179:1,114:1,115:1,675:1,1945:1,586:1},cae);_.N=false;_.O=false;var Z9d=false;var Yab=mdb(Mwe,'XMLTypePackageImpl',586);bcb(1852,1,{837:1},fae);_._j=function gae(){return Uge(),Tge};var iab=mdb(Mwe,'XMLTypePackageImpl/1',1852);bcb(1861,1,nwe,hae);_.wj=function iae(a){return ND(a)};_.xj=function jae(a){return KC(ZI,nie,2,a,6,1)};var $9=mdb(Mwe,'XMLTypePackageImpl/10',1861);bcb(1862,1,nwe,kae);_.wj=function lae(a){return ND(a)};_.xj=function mae(a){return KC(ZI,nie,2,a,6,1)};var _9=mdb(Mwe,'XMLTypePackageImpl/11',1862);bcb(1863,1,nwe,nae);_.wj=function oae(a){return ND(a)};_.xj=function pae(a){return KC(ZI,nie,2,a,6,1)};var aab=mdb(Mwe,'XMLTypePackageImpl/12',1863);bcb(1864,1,nwe,qae);_.wj=function rae(a){return LD(a)};_.xj=function sae(a){return KC(BI,nie,333,a,7,1)};var bab=mdb(Mwe,'XMLTypePackageImpl/13',1864);bcb(1865,1,nwe,tae);_.wj=function uae(a){return ND(a)};_.xj=function vae(a){return KC(ZI,nie,2,a,6,1)};var cab=mdb(Mwe,'XMLTypePackageImpl/14',1865);bcb(1866,1,nwe,wae);_.wj=function xae(a){return JD(a,15)};_.xj=function yae(a){return KC(yK,eme,15,a,0,1)};var dab=mdb(Mwe,'XMLTypePackageImpl/15',1866);bcb(1867,1,nwe,zae);_.wj=function Aae(a){return JD(a,15)};_.xj=function Bae(a){return KC(yK,eme,15,a,0,1)};var eab=mdb(Mwe,'XMLTypePackageImpl/16',1867);bcb(1868,1,nwe,Cae);_.wj=function Dae(a){return ND(a)};_.xj=function Eae(a){return KC(ZI,nie,2,a,6,1)};var fab=mdb(Mwe,'XMLTypePackageImpl/17',1868);bcb(1869,1,nwe,Fae);_.wj=function Gae(a){return JD(a,155)};_.xj=function Hae(a){return KC(FI,nie,155,a,0,1)};var gab=mdb(Mwe,'XMLTypePackageImpl/18',1869);bcb(1870,1,nwe,Iae);_.wj=function Jae(a){return ND(a)};_.xj=function Kae(a){return KC(ZI,nie,2,a,6,1)};var hab=mdb(Mwe,'XMLTypePackageImpl/19',1870);bcb(1853,1,nwe,Lae);_.wj=function Mae(a){return JD(a,843)};_.xj=function Nae(a){return KC(Q9,Uhe,843,a,0,1)};var tab=mdb(Mwe,'XMLTypePackageImpl/2',1853);bcb(1871,1,nwe,Oae);_.wj=function Pae(a){return ND(a)};_.xj=function Qae(a){return KC(ZI,nie,2,a,6,1)};var jab=mdb(Mwe,'XMLTypePackageImpl/20',1871);bcb(1872,1,nwe,Rae);_.wj=function Sae(a){return ND(a)};_.xj=function Tae(a){return KC(ZI,nie,2,a,6,1)};var kab=mdb(Mwe,'XMLTypePackageImpl/21',1872);bcb(1873,1,nwe,Uae);_.wj=function Vae(a){return ND(a)};_.xj=function Wae(a){return KC(ZI,nie,2,a,6,1)};var lab=mdb(Mwe,'XMLTypePackageImpl/22',1873);bcb(1874,1,nwe,Xae);_.wj=function Yae(a){return ND(a)};_.xj=function Zae(a){return KC(ZI,nie,2,a,6,1)};var mab=mdb(Mwe,'XMLTypePackageImpl/23',1874);bcb(1875,1,nwe,$ae);_.wj=function _ae(a){return JD(a,190)};_.xj=function abe(a){return KC(SD,nie,190,a,0,2)};var nab=mdb(Mwe,'XMLTypePackageImpl/24',1875);bcb(1876,1,nwe,bbe);_.wj=function cbe(a){return ND(a)};_.xj=function dbe(a){return KC(ZI,nie,2,a,6,1)};var oab=mdb(Mwe,'XMLTypePackageImpl/25',1876);bcb(1877,1,nwe,ebe);_.wj=function fbe(a){return ND(a)};_.xj=function gbe(a){return KC(ZI,nie,2,a,6,1)};var pab=mdb(Mwe,'XMLTypePackageImpl/26',1877);bcb(1878,1,nwe,hbe);_.wj=function ibe(a){return JD(a,15)};_.xj=function jbe(a){return KC(yK,eme,15,a,0,1)};var qab=mdb(Mwe,'XMLTypePackageImpl/27',1878);bcb(1879,1,nwe,kbe);_.wj=function lbe(a){return JD(a,15)};_.xj=function mbe(a){return KC(yK,eme,15,a,0,1)};var rab=mdb(Mwe,'XMLTypePackageImpl/28',1879);bcb(1880,1,nwe,nbe);_.wj=function obe(a){return ND(a)};_.xj=function pbe(a){return KC(ZI,nie,2,a,6,1)};var sab=mdb(Mwe,'XMLTypePackageImpl/29',1880);bcb(1854,1,nwe,qbe);_.wj=function rbe(a){return JD(a,667)};_.xj=function sbe(a){return KC(S9,Uhe,2021,a,0,1)};var Eab=mdb(Mwe,'XMLTypePackageImpl/3',1854);bcb(1881,1,nwe,tbe);_.wj=function ube(a){return JD(a,19)};_.xj=function vbe(a){return KC(JI,nie,19,a,0,1)};var uab=mdb(Mwe,'XMLTypePackageImpl/30',1881);bcb(1882,1,nwe,wbe);_.wj=function xbe(a){return ND(a)};_.xj=function ybe(a){return KC(ZI,nie,2,a,6,1)};var vab=mdb(Mwe,'XMLTypePackageImpl/31',1882);bcb(1883,1,nwe,zbe);_.wj=function Abe(a){return JD(a,162)};_.xj=function Bbe(a){return KC(MI,nie,162,a,0,1)};var wab=mdb(Mwe,'XMLTypePackageImpl/32',1883);bcb(1884,1,nwe,Cbe);_.wj=function Dbe(a){return ND(a)};_.xj=function Ebe(a){return KC(ZI,nie,2,a,6,1)};var xab=mdb(Mwe,'XMLTypePackageImpl/33',1884);bcb(1885,1,nwe,Fbe);_.wj=function Gbe(a){return ND(a)};_.xj=function Hbe(a){return KC(ZI,nie,2,a,6,1)};var yab=mdb(Mwe,'XMLTypePackageImpl/34',1885);bcb(1886,1,nwe,Ibe);_.wj=function Jbe(a){return ND(a)};_.xj=function Kbe(a){return KC(ZI,nie,2,a,6,1)};var zab=mdb(Mwe,'XMLTypePackageImpl/35',1886);bcb(1887,1,nwe,Lbe);_.wj=function Mbe(a){return ND(a)};_.xj=function Nbe(a){return KC(ZI,nie,2,a,6,1)};var Aab=mdb(Mwe,'XMLTypePackageImpl/36',1887);bcb(1888,1,nwe,Obe);_.wj=function Pbe(a){return JD(a,15)};_.xj=function Qbe(a){return KC(yK,eme,15,a,0,1)};var Bab=mdb(Mwe,'XMLTypePackageImpl/37',1888);bcb(1889,1,nwe,Rbe);_.wj=function Sbe(a){return JD(a,15)};_.xj=function Tbe(a){return KC(yK,eme,15,a,0,1)};var Cab=mdb(Mwe,'XMLTypePackageImpl/38',1889);bcb(1890,1,nwe,Ube);_.wj=function Vbe(a){return ND(a)};_.xj=function Wbe(a){return KC(ZI,nie,2,a,6,1)};var Dab=mdb(Mwe,'XMLTypePackageImpl/39',1890);bcb(1855,1,nwe,Xbe);_.wj=function Ybe(a){return JD(a,668)};_.xj=function Zbe(a){return KC(T9,Uhe,2022,a,0,1)};var Pab=mdb(Mwe,'XMLTypePackageImpl/4',1855);bcb(1891,1,nwe,$be);_.wj=function _be(a){return ND(a)};_.xj=function ace(a){return KC(ZI,nie,2,a,6,1)};var Fab=mdb(Mwe,'XMLTypePackageImpl/40',1891);bcb(1892,1,nwe,bce);_.wj=function cce(a){return ND(a)};_.xj=function dce(a){return KC(ZI,nie,2,a,6,1)};var Gab=mdb(Mwe,'XMLTypePackageImpl/41',1892);bcb(1893,1,nwe,ece);_.wj=function fce(a){return ND(a)};_.xj=function gce(a){return KC(ZI,nie,2,a,6,1)};var Hab=mdb(Mwe,'XMLTypePackageImpl/42',1893);bcb(1894,1,nwe,hce);_.wj=function ice(a){return ND(a)};_.xj=function jce(a){return KC(ZI,nie,2,a,6,1)};var Iab=mdb(Mwe,'XMLTypePackageImpl/43',1894);bcb(1895,1,nwe,kce);_.wj=function lce(a){return ND(a)};_.xj=function mce(a){return KC(ZI,nie,2,a,6,1)};var Jab=mdb(Mwe,'XMLTypePackageImpl/44',1895);bcb(1896,1,nwe,nce);_.wj=function oce(a){return JD(a,184)};_.xj=function pce(a){return KC(UI,nie,184,a,0,1)};var Kab=mdb(Mwe,'XMLTypePackageImpl/45',1896);bcb(1897,1,nwe,qce);_.wj=function rce(a){return ND(a)};_.xj=function sce(a){return KC(ZI,nie,2,a,6,1)};var Lab=mdb(Mwe,'XMLTypePackageImpl/46',1897);bcb(1898,1,nwe,tce);_.wj=function uce(a){return ND(a)};_.xj=function vce(a){return KC(ZI,nie,2,a,6,1)};var Mab=mdb(Mwe,'XMLTypePackageImpl/47',1898);bcb(1899,1,nwe,wce);_.wj=function xce(a){return ND(a)};_.xj=function yce(a){return KC(ZI,nie,2,a,6,1)};var Nab=mdb(Mwe,'XMLTypePackageImpl/48',1899);bcb(nje,1,nwe,zce);_.wj=function Ace(a){return JD(a,184)};_.xj=function Bce(a){return KC(UI,nie,184,a,0,1)};var Oab=mdb(Mwe,'XMLTypePackageImpl/49',nje);bcb(1856,1,nwe,Cce);_.wj=function Dce(a){return JD(a,669)};_.xj=function Ece(a){return KC(U9,Uhe,2023,a,0,1)};var Tab=mdb(Mwe,'XMLTypePackageImpl/5',1856);bcb(1901,1,nwe,Fce);_.wj=function Gce(a){return JD(a,162)};_.xj=function Hce(a){return KC(MI,nie,162,a,0,1)};var Qab=mdb(Mwe,'XMLTypePackageImpl/50',1901);bcb(1902,1,nwe,Ice);_.wj=function Jce(a){return ND(a)};_.xj=function Kce(a){return KC(ZI,nie,2,a,6,1)};var Rab=mdb(Mwe,'XMLTypePackageImpl/51',1902);bcb(1903,1,nwe,Lce);_.wj=function Mce(a){return JD(a,19)};_.xj=function Nce(a){return KC(JI,nie,19,a,0,1)};var Sab=mdb(Mwe,'XMLTypePackageImpl/52',1903);bcb(1857,1,nwe,Oce);_.wj=function Pce(a){return ND(a)};_.xj=function Qce(a){return KC(ZI,nie,2,a,6,1)};var Uab=mdb(Mwe,'XMLTypePackageImpl/6',1857);bcb(1858,1,nwe,Rce);_.wj=function Sce(a){return JD(a,190)};_.xj=function Tce(a){return KC(SD,nie,190,a,0,2)};var Vab=mdb(Mwe,'XMLTypePackageImpl/7',1858);bcb(1859,1,nwe,Uce);_.wj=function Vce(a){return KD(a)};_.xj=function Wce(a){return KC(wI,nie,476,a,8,1)};var Wab=mdb(Mwe,'XMLTypePackageImpl/8',1859);bcb(1860,1,nwe,Xce);_.wj=function Yce(a){return JD(a,217)};_.xj=function Zce(a){return KC(xI,nie,217,a,0,1)};var Xab=mdb(Mwe,'XMLTypePackageImpl/9',1860);var $ce,_ce;var fde,gde;var kde;bcb(50,60,Tie,mde);var Zab=mdb(kxe,'RegEx/ParseException',50);bcb(820,1,{},ude);_.sl=function vde(a){return ac*16)throw vbb(new mde(tvd((h0d(),Uue))));c=c*16+e}while(true);if(this.a!=125)throw vbb(new mde(tvd((h0d(),Vue))));if(c>lxe)throw vbb(new mde(tvd((h0d(),Wue))));a=c}else{e=0;if(this.c!=0||(e=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));c=e;nde(this);if(this.c!=0||(e=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));c=c*16+e;a=c}break;case 117:d=0;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;a=b;break;case 118:nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;nde(this);if(this.c!=0||(d=yde(this.a))<0)throw vbb(new mde(tvd((h0d(),Tue))));b=b*16+d;if(b>lxe)throw vbb(new mde(tvd((h0d(),'parser.descappe.4'))));a=b;break;case 65:case 90:case 122:throw vbb(new mde(tvd((h0d(),Xue))));}return a};_.ul=function xde(a){var b,c;switch(a){case 100:c=(this.e&32)==32?Kfe('Nd',true):(wfe(),cfe);break;case 68:c=(this.e&32)==32?Kfe('Nd',false):(wfe(),jfe);break;case 119:c=(this.e&32)==32?Kfe('IsWord',true):(wfe(),sfe);break;case 87:c=(this.e&32)==32?Kfe('IsWord',false):(wfe(),lfe);break;case 115:c=(this.e&32)==32?Kfe('IsSpace',true):(wfe(),nfe);break;case 83:c=(this.e&32)==32?Kfe('IsSpace',false):(wfe(),kfe);break;default:throw vbb(new hz((b=a,mxe+b.toString(16))));}return c};_.vl=function zde(a){var b,c,d,e,f,g,h,i,j,k,l,m;this.b=1;nde(this);b=null;if(this.c==0&&this.a==94){nde(this);if(a){k=(wfe(),wfe(),++vfe,new $fe(5))}else{b=(wfe(),wfe(),++vfe,new $fe(4));Ufe(b,0,lxe);k=(null,++vfe,new $fe(4))}}else{k=(wfe(),wfe(),++vfe,new $fe(4))}e=true;while((m=this.c)!=1){if(m==0&&this.a==93&&!e)break;e=false;c=this.a;d=false;if(m==10){switch(c){case 100:case 68:case 119:case 87:case 115:case 83:Xfe(k,this.ul(c));d=true;break;case 105:case 73:case 99:case 67:c=this.Ll(k,c);c<0&&(d=true);break;case 112:case 80:l=tde(this,c);if(!l)throw vbb(new mde(tvd((h0d(),Iue))));Xfe(k,l);d=true;break;default:c=this.tl();}}else if(m==20){g=gfb(this.i,58,this.d);if(g<0)throw vbb(new mde(tvd((h0d(),Jue))));h=true;if(bfb(this.i,this.d)==94){++this.d;h=false}f=qfb(this.i,this.d,g);i=Lfe(f,h,(this.e&512)==512);if(!i)throw vbb(new mde(tvd((h0d(),Lue))));Xfe(k,i);d=true;if(g+1>=this.j||bfb(this.i,g+1)!=93)throw vbb(new mde(tvd((h0d(),Jue))));this.d=g+2}nde(this);if(!d){if(this.c!=0||this.a!=45){Ufe(k,c,c)}else{nde(this);if((m=this.c)==1)throw vbb(new mde(tvd((h0d(),Kue))));if(m==0&&this.a==93){Ufe(k,c,c);Ufe(k,45,45)}else{j=this.a;m==10&&(j=this.tl());nde(this);Ufe(k,c,j)}}}(this.e&zte)==zte&&this.c==0&&this.a==44&&nde(this)}if(this.c==1)throw vbb(new mde(tvd((h0d(),Kue))));if(b){Zfe(b,k);k=b}Yfe(k);Vfe(k);this.b=0;nde(this);return k};_.wl=function Ade(){var a,b,c,d;c=this.vl(false);while((d=this.c)!=7){a=this.a;if(d==0&&(a==45||a==38)||d==4){nde(this);if(this.c!=9)throw vbb(new mde(tvd((h0d(),Que))));b=this.vl(false);if(d==4)Xfe(c,b);else if(a==45)Zfe(c,b);else if(a==38)Wfe(c,b);else throw vbb(new hz('ASSERT'))}else{throw vbb(new mde(tvd((h0d(),Rue))))}}nde(this);return c};_.xl=function Bde(){var a,b;a=this.a-48;b=(wfe(),wfe(),++vfe,new Hge(12,null,a));!this.g&&(this.g=new Wvb);Tvb(this.g,new cge(a));nde(this);return b};_.yl=function Cde(){nde(this);return wfe(),ofe};_.zl=function Dde(){nde(this);return wfe(),mfe};_.Al=function Ede(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Bl=function Fde(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Cl=function Gde(){nde(this);return Ife()};_.Dl=function Hde(){nde(this);return wfe(),qfe};_.El=function Ide(){nde(this);return wfe(),tfe};_.Fl=function Jde(){var a;if(this.d>=this.j||((a=bfb(this.i,this.d++))&65504)!=64)throw vbb(new mde(tvd((h0d(),Eue))));nde(this);return wfe(),wfe(),++vfe,new ige(0,a-64)};_.Gl=function Kde(){nde(this);return Jfe()};_.Hl=function Lde(){nde(this);return wfe(),ufe};_.Il=function Mde(){var a;a=(wfe(),wfe(),++vfe,new ige(0,105));nde(this);return a};_.Jl=function Nde(){nde(this);return wfe(),rfe};_.Kl=function Ode(){nde(this);return wfe(),pfe};_.Ll=function Pde(a,b){return this.tl()};_.Ml=function Qde(){nde(this);return wfe(),hfe};_.Nl=function Rde(){var a,b,c,d,e;if(this.d+1>=this.j)throw vbb(new mde(tvd((h0d(),Bue))));d=-1;b=null;a=bfb(this.i,this.d);if(49<=a&&a<=57){d=a-48;!this.g&&(this.g=new Wvb);Tvb(this.g,new cge(d));++this.d;if(bfb(this.i,this.d)!=41)throw vbb(new mde(tvd((h0d(),yue))));++this.d}else{a==63&&--this.d;nde(this);b=qde(this);switch(b.e){case 20:case 21:case 22:case 23:break;case 8:if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));break;default:throw vbb(new mde(tvd((h0d(),Cue))));}}nde(this);e=rde(this);c=null;if(e.e==2){if(e.em()!=2)throw vbb(new mde(tvd((h0d(),Due))));c=e.am(1);e=e.am(0)}if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return wfe(),wfe(),++vfe,new vge(d,b,e,c)};_.Ol=function Sde(){nde(this);return wfe(),ife};_.Pl=function Tde(){var a;nde(this);a=Cfe(24,rde(this));if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Ql=function Ude(){var a;nde(this);a=Cfe(20,rde(this));if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Rl=function Vde(){var a;nde(this);a=Cfe(22,rde(this));if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Sl=function Wde(){var a,b,c,d,e;a=0;c=0;b=-1;while(this.d=this.j)throw vbb(new mde(tvd((h0d(),zue))));if(b==45){++this.d;while(this.d=this.j)throw vbb(new mde(tvd((h0d(),zue))))}if(b==58){++this.d;nde(this);d=Dfe(rde(this),a,c);if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this)}else if(b==41){++this.d;nde(this);d=Dfe(rde(this),a,c)}else throw vbb(new mde(tvd((h0d(),Aue))));return d};_.Tl=function Xde(){var a;nde(this);a=Cfe(21,rde(this));if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Ul=function Yde(){var a;nde(this);a=Cfe(23,rde(this));if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Vl=function Zde(){var a,b;nde(this);a=this.f++;b=Efe(rde(this),a);if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return b};_.Wl=function $de(){var a;nde(this);a=Efe(rde(this),0);if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Xl=function _de(a){nde(this);if(this.c==5){nde(this);return Bfe(a,(wfe(),wfe(),++vfe,new lge(9,a)))}else return Bfe(a,(wfe(),wfe(),++vfe,new lge(3,a)))};_.Yl=function aee(a){var b;nde(this);b=(wfe(),wfe(),++vfe,new Lge(2));if(this.c==5){nde(this);Kge(b,(null,ffe));Kge(b,a)}else{Kge(b,a);Kge(b,(null,ffe))}return b};_.Zl=function bee(a){nde(this);if(this.c==5){nde(this);return wfe(),wfe(),++vfe,new lge(9,a)}else return wfe(),wfe(),++vfe,new lge(3,a)};_.a=0;_.b=0;_.c=0;_.d=0;_.e=0;_.f=1;_.g=null;_.j=0;var bbb=mdb(kxe,'RegEx/RegexParser',820);bcb(1824,820,{},hee);_.sl=function iee(a){return false};_.tl=function jee(){return eee(this)};_.ul=function lee(a){return fee(a)};_.vl=function mee(a){return gee(this)};_.wl=function nee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.xl=function oee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.yl=function pee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.zl=function qee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Al=function ree(){nde(this);return fee(67)};_.Bl=function see(){nde(this);return fee(73)};_.Cl=function tee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Dl=function uee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.El=function vee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Fl=function wee(){nde(this);return fee(99)};_.Gl=function xee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Hl=function yee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Il=function zee(){nde(this);return fee(105)};_.Jl=function Aee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Kl=function Bee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Ll=function Cee(a,b){return Xfe(a,fee(b)),-1};_.Ml=function Dee(){nde(this);return wfe(),wfe(),++vfe,new ige(0,94)};_.Nl=function Eee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Ol=function Fee(){nde(this);return wfe(),wfe(),++vfe,new ige(0,36)};_.Pl=function Gee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Ql=function Hee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Rl=function Iee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Sl=function Jee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Tl=function Kee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Ul=function Lee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Vl=function Mee(){var a;nde(this);a=Efe(rde(this),0);if(this.c!=7)throw vbb(new mde(tvd((h0d(),yue))));nde(this);return a};_.Wl=function Nee(){throw vbb(new mde(tvd((h0d(),Yue))))};_.Xl=function Oee(a){nde(this);return Bfe(a,(wfe(),wfe(),++vfe,new lge(3,a)))};_.Yl=function Pee(a){var b;nde(this);b=(wfe(),wfe(),++vfe,new Lge(2));Kge(b,a);Kge(b,(null,ffe));return b};_.Zl=function Qee(a){nde(this);return wfe(),wfe(),++vfe,new lge(3,a)};var cee=null,dee=null;var $ab=mdb(kxe,'RegEx/ParserForXMLSchema',1824);bcb(117,1,yxe,xfe);_.$l=function yfe(a){throw vbb(new hz('Not supported.'))};_._l=function Gfe(){return -1};_.am=function Hfe(a){return null};_.bm=function Mfe(){return null};_.cm=function Pfe(a){};_.dm=function Qfe(a){};_.em=function Rfe(){return 0};_.Ib=function Sfe(){return this.fm(0)};_.fm=function Tfe(a){return this.e==11?'.':''};_.e=0;var Yee,Zee,$ee,_ee,afe,bfe=null,cfe,dfe=null,efe,ffe,gfe=null,hfe,ife,jfe,kfe,lfe,mfe,nfe,ofe,pfe,qfe,rfe,sfe,tfe,ufe,vfe=0;var lbb=mdb(kxe,'RegEx/Token',117);bcb(136,117,{3:1,136:1,117:1},$fe);_.fm=function bge(a){var b,c,d;if(this.e==4){if(this==efe)c='.';else if(this==cfe)c='\\d';else if(this==sfe)c='\\w';else if(this==nfe)c='\\s';else{d=new Hfb;d.a+='[';for(b=0;b0&&(d.a+=',',d);if(this.b[b]===this.b[b+1]){Efb(d,age(this.b[b]))}else{Efb(d,age(this.b[b]));d.a+='-';Efb(d,age(this.b[b+1]))}}d.a+=']';c=d.a}}else{if(this==jfe)c='\\D';else if(this==lfe)c='\\W';else if(this==kfe)c='\\S';else{d=new Hfb;d.a+='[^';for(b=0;b0&&(d.a+=',',d);if(this.b[b]===this.b[b+1]){Efb(d,age(this.b[b]))}else{Efb(d,age(this.b[b]));d.a+='-';Efb(d,age(this.b[b+1]))}}d.a+=']';c=d.a}}return c};_.a=false;_.c=false;var _ab=mdb(kxe,'RegEx/RangeToken',136);bcb(584,1,{584:1},cge);_.a=0;var abb=mdb(kxe,'RegEx/RegexParser/ReferencePosition',584);bcb(583,1,{3:1,583:1},ege);_.Fb=function fge(a){var b;if(a==null)return false;if(!JD(a,583))return false;b=BD(a,583);return dfb(this.b,b.b)&&this.a==b.a};_.Hb=function gge(){return LCb(this.b+'/'+See(this.a))};_.Ib=function hge(){return this.c.fm(this.a)};_.a=0;var cbb=mdb(kxe,'RegEx/RegularExpression',583);bcb(223,117,yxe,ige);_._l=function jge(){return this.a};_.fm=function kge(a){var b,c,d;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:d='\\'+HD(this.a&aje);break;case 12:d='\\f';break;case 10:d='\\n';break;case 13:d='\\r';break;case 9:d='\\t';break;case 27:d='\\e';break;default:if(this.a>=Tje){c=(b=this.a>>>0,'0'+b.toString(16));d='\\v'+qfb(c,c.length-6,c.length)}else d=''+HD(this.a&aje);}break;case 8:this==hfe||this==ife?(d=''+HD(this.a&aje)):(d='\\'+HD(this.a&aje));break;default:d=null;}return d};_.a=0;var dbb=mdb(kxe,'RegEx/Token/CharToken',223);bcb(309,117,yxe,lge);_.am=function mge(a){return this.a};_.cm=function nge(a){this.b=a};_.dm=function oge(a){this.c=a};_.em=function pge(){return 1};_.fm=function qge(a){var b;if(this.e==3){if(this.c<0&&this.b<0){b=this.a.fm(a)+'*'}else if(this.c==this.b){b=this.a.fm(a)+'{'+this.c+'}'}else if(this.c>=0&&this.b>=0){b=this.a.fm(a)+'{'+this.c+','+this.b+'}'}else if(this.c>=0&&this.b<0){b=this.a.fm(a)+'{'+this.c+',}'}else throw vbb(new hz('Token#toString(): CLOSURE '+this.c+She+this.b))}else{if(this.c<0&&this.b<0){b=this.a.fm(a)+'*?'}else if(this.c==this.b){b=this.a.fm(a)+'{'+this.c+'}?'}else if(this.c>=0&&this.b>=0){b=this.a.fm(a)+'{'+this.c+','+this.b+'}?'}else if(this.c>=0&&this.b<0){b=this.a.fm(a)+'{'+this.c+',}?'}else throw vbb(new hz('Token#toString(): NONGREEDYCLOSURE '+this.c+She+this.b))}return b};_.b=0;_.c=0;var ebb=mdb(kxe,'RegEx/Token/ClosureToken',309);bcb(821,117,yxe,rge);_.am=function sge(a){return a==0?this.a:this.b};_.em=function tge(){return 2};_.fm=function uge(a){var b;this.b.e==3&&this.b.am(0)==this.a?(b=this.a.fm(a)+'+'):this.b.e==9&&this.b.am(0)==this.a?(b=this.a.fm(a)+'+?'):(b=this.a.fm(a)+(''+this.b.fm(a)));return b};var fbb=mdb(kxe,'RegEx/Token/ConcatToken',821);bcb(1822,117,yxe,vge);_.am=function wge(a){if(a==0)return this.d;if(a==1)return this.b;throw vbb(new hz('Internal Error: '+a))};_.em=function xge(){return !this.b?1:2};_.fm=function yge(a){var b;this.c>0?(b='(?('+this.c+')'):this.a.e==8?(b='(?('+this.a+')'):(b='(?'+this.a);!this.b?(b+=this.d+')'):(b+=this.d+'|'+this.b+')');return b};_.c=0;var gbb=mdb(kxe,'RegEx/Token/ConditionToken',1822);bcb(1823,117,yxe,zge);_.am=function Age(a){return this.b};_.em=function Bge(){return 1};_.fm=function Cge(a){return '(?'+(this.a==0?'':See(this.a))+(this.c==0?'':See(this.c))+':'+this.b.fm(a)+')'};_.a=0;_.c=0;var hbb=mdb(kxe,'RegEx/Token/ModifierToken',1823);bcb(822,117,yxe,Dge);_.am=function Ege(a){return this.a};_.em=function Fge(){return 1};_.fm=function Gge(a){var b;b=null;switch(this.e){case 6:this.b==0?(b='(?:'+this.a.fm(a)+')'):(b='('+this.a.fm(a)+')');break;case 20:b='(?='+this.a.fm(a)+')';break;case 21:b='(?!'+this.a.fm(a)+')';break;case 22:b='(?<='+this.a.fm(a)+')';break;case 23:b='(?'+this.a.fm(a)+')';}return b};_.b=0;var ibb=mdb(kxe,'RegEx/Token/ParenToken',822);bcb(521,117,{3:1,117:1,521:1},Hge);_.bm=function Ige(){return this.b};_.fm=function Jge(a){return this.e==12?'\\'+this.a:Wee(this.b)};_.a=0;var jbb=mdb(kxe,'RegEx/Token/StringToken',521);bcb(465,117,yxe,Lge);_.$l=function Mge(a){Kge(this,a)};_.am=function Nge(a){return BD(Uvb(this.a,a),117)};_.em=function Oge(){return !this.a?0:this.a.a.c.length};_.fm=function Pge(a){var b,c,d,e,f;if(this.e==1){if(this.a.a.c.length==2){b=BD(Uvb(this.a,0),117);c=BD(Uvb(this.a,1),117);c.e==3&&c.am(0)==b?(e=b.fm(a)+'+'):c.e==9&&c.am(0)==b?(e=b.fm(a)+'+?'):(e=b.fm(a)+(''+c.fm(a)))}else{f=new Hfb;for(d=0;d=this.c.b:this.a<=this.c.b};_.Sb=function whe(){return this.b>0};_.Tb=function yhe(){return this.b};_.Vb=function Ahe(){return this.b-1};_.Qb=function Bhe(){throw vbb(new cgb(Exe))};_.a=0;_.b=0;var pbb=mdb(Bxe,'ExclusiveRange/RangeIterator',254);var TD=pdb(Fve,'C');var WD=pdb(Ive,'I');var sbb=pdb(Khe,'Z');var XD=pdb(Jve,'J');var SD=pdb(Eve,'B');var UD=pdb(Gve,'D');var VD=pdb(Hve,'F');var rbb=pdb(Kve,'S');var h1=odb('org.eclipse.elk.core.labels','ILabelManager');var O4=odb(Tte,'DiagnosticChain');var u8=odb(pwe,'ResourceSet');var V4=mdb(Tte,'InvocationTargetException',null);var Ihe=(Az(),Dz);var gwtOnLoad=gwtOnLoad=Zbb;Xbb(hcb);$bb('permProps',[[[Fxe,Gxe],[Hxe,'gecko1_8']],[[Fxe,Gxe],[Hxe,'ie10']],[[Fxe,Gxe],[Hxe,'ie8']],[[Fxe,Gxe],[Hxe,'ie9']],[[Fxe,Gxe],[Hxe,'safari']]]); +// -------------- RUN GWT INITIALIZATION CODE -------------- +gwtOnLoad(null, 'elk', null); + +}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],3:[function(require,module,exports){ +'use strict'; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +/******************************************************************************* + * Copyright (c) 2021 Kiel University and others. + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +var ELK = require('./elk-api.js').default; + +var ELKNode = function (_ELK) { + _inherits(ELKNode, _ELK); + + function ELKNode() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + _classCallCheck(this, ELKNode); + + var optionsClone = Object.assign({}, options); + + var workerThreadsExist = false; + try { + require.resolve('web-worker'); + workerThreadsExist = true; + } catch (e) {} + + // user requested a worker + if (options.workerUrl) { + if (workerThreadsExist) { + var Worker = require('web-worker'); + optionsClone.workerFactory = function (url) { + return new Worker(url); + }; + } else { + console.warn('Web worker requested but \'web-worker\' package not installed. \nConsider installing the package or pass your own \'workerFactory\' to ELK\'s constructor.\n... Falling back to non-web worker version.'); + } + } + + // unless no other workerFactory is registered, use the fake worker + if (!optionsClone.workerFactory) { + var _require = require('./elk-worker.min.js'), + _Worker = _require.Worker; + + optionsClone.workerFactory = function (url) { + return new _Worker(url); + }; + } + + return _possibleConstructorReturn(this, (ELKNode.__proto__ || Object.getPrototypeOf(ELKNode)).call(this, optionsClone)); + } + + return ELKNode; +}(ELK); + +Object.defineProperty(module.exports, "__esModule", { + value: true +}); +module.exports = ELKNode; +ELKNode.default = ELKNode; +},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(require,module,exports){ +/** + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +module.exports = Worker; +},{}]},{},[3])(3) +}); + + +/***/ }), + +/***/ 11848: +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ diagram: () => (/* binding */ diagram) +/* harmony export */ }); +/* harmony import */ var _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(99968); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2588); +/* harmony import */ var dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(53128); +/* harmony import */ var elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61707); +/* harmony import */ var elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62264); +/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(86208); +/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66296); +/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1488); +/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(95536); +/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58408); +/* harmony import */ var dagre_d3_es__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(128); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(18268); +/* harmony import */ var dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_isoWeek_js__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(75816); +/* harmony import */ var dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_customParseFormat_js__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(27280); +/* harmony import */ var dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(dayjs_plugin_advancedFormat_js__WEBPACK_IMPORTED_MODULE_11__); + + + + + + + + + + + + + + + + + + + + + + + +const findCommonAncestor = (id1, id2, treeData) => { + const { parentById } = treeData; + const visited = /* @__PURE__ */ new Set(); + let currentId = id1; + while (currentId) { + visited.add(currentId); + if (currentId === id2) { + return currentId; + } + currentId = parentById[currentId]; + } + currentId = id2; + while (currentId) { + if (visited.has(currentId)) { + return currentId; + } + currentId = parentById[currentId]; + } + return "root"; +}; +const elk = new (elkjs_lib_elk_bundled_js__WEBPACK_IMPORTED_MODULE_1___default())(); +const portPos = {}; +const conf = {}; +let nodeDb = {}; +const addVertices = function(vert, svgId, root, doc, diagObj, parentLookupDb, graph) { + const svg = root.select(`[id="${svgId}"]`); + const nodes = svg.insert("g").attr("class", "nodes"); + const keys = Object.keys(vert); + keys.forEach(function(id) { + const vertex = vert[id]; + let classStr = "default"; + if (vertex.classes.length > 0) { + classStr = vertex.classes.join(" "); + } + const styles2 = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.a)(vertex.styles); + let vertexText = vertex.text !== void 0 ? vertex.text : vertex.id; + let vertexNode; + const labelData = { width: 0, height: 0 }; + if ((0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.e)((0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.g)().flowchart.htmlLabels)) { + const node2 = { + label: vertexText.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ) + }; + vertexNode = (0,dagre_d3_es_src_dagre_js_label_add_html_label_js__WEBPACK_IMPORTED_MODULE_13__/* .addHtmlLabel */ .m)(svg, node2).node(); + const bbox = vertexNode.getBBox(); + labelData.width = bbox.width; + labelData.height = bbox.height; + labelData.labelNode = vertexNode; + vertexNode.parentNode.removeChild(vertexNode); + } else { + const svgLabel = doc.createElementNS("http://www.w3.org/2000/svg", "text"); + svgLabel.setAttribute("style", styles2.labelStyle.replace("color:", "fill:")); + const rows = vertexText.split(_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.c.lineBreakRegex); + for (const row of rows) { + const tspan = doc.createElementNS("http://www.w3.org/2000/svg", "tspan"); + tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"); + tspan.setAttribute("dy", "1em"); + tspan.setAttribute("x", "1"); + tspan.textContent = row; + svgLabel.appendChild(tspan); + } + vertexNode = svgLabel; + const bbox = vertexNode.getBBox(); + labelData.width = bbox.width; + labelData.height = bbox.height; + labelData.labelNode = vertexNode; + } + const ports = [ + { + id: vertex.id + "-west", + layoutOptions: { + "port.side": "WEST" + } + }, + { + id: vertex.id + "-east", + layoutOptions: { + "port.side": "EAST" + } + }, + { + id: vertex.id + "-south", + layoutOptions: { + "port.side": "SOUTH" + } + }, + { + id: vertex.id + "-north", + layoutOptions: { + "port.side": "NORTH" + } + } + ]; + let radious = 0; + let _shape = ""; + let layoutOptions = {}; + switch (vertex.type) { + case "round": + radious = 5; + _shape = "rect"; + break; + case "square": + _shape = "rect"; + break; + case "diamond": + _shape = "question"; + layoutOptions = { + portConstraints: "FIXED_SIDE" + }; + break; + case "hexagon": + _shape = "hexagon"; + break; + case "odd": + _shape = "rect_left_inv_arrow"; + break; + case "lean_right": + _shape = "lean_right"; + break; + case "lean_left": + _shape = "lean_left"; + break; + case "trapezoid": + _shape = "trapezoid"; + break; + case "inv_trapezoid": + _shape = "inv_trapezoid"; + break; + case "odd_right": + _shape = "rect_left_inv_arrow"; + break; + case "circle": + _shape = "circle"; + break; + case "ellipse": + _shape = "ellipse"; + break; + case "stadium": + _shape = "stadium"; + break; + case "subroutine": + _shape = "subroutine"; + break; + case "cylinder": + _shape = "cylinder"; + break; + case "group": + _shape = "rect"; + break; + case "doublecircle": + _shape = "doublecircle"; + break; + default: + _shape = "rect"; + } + const node = { + labelStyle: styles2.labelStyle, + shape: _shape, + labelText: vertexText, + rx: radious, + ry: radious, + class: classStr, + style: styles2.style, + id: vertex.id, + link: vertex.link, + linkTarget: vertex.linkTarget, + tooltip: diagObj.db.getTooltip(vertex.id) || "", + domId: diagObj.db.lookUpDomId(vertex.id), + haveCallback: vertex.haveCallback, + width: vertex.type === "group" ? 500 : void 0, + dir: vertex.dir, + type: vertex.type, + props: vertex.props, + padding: (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.g)().flowchart.padding + }; + let boundingBox; + let nodeEl; + if (node.type !== "group") { + nodeEl = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.b)(nodes, node, vertex.dir); + boundingBox = nodeEl.node().getBBox(); + } + const data = { + id: vertex.id, + ports: vertex.type === "diamond" ? ports : [], + // labelStyle: styles.labelStyle, + // shape: _shape, + layoutOptions, + labelText: vertexText, + labelData, + // labels: [{ text: vertexText }], + // rx: radius, + // ry: radius, + // class: classStr, + // style: styles.style, + // link: vertex.link, + // linkTarget: vertex.linkTarget, + // tooltip: diagObj.db.getTooltip(vertex.id) || '', + domId: diagObj.db.lookUpDomId(vertex.id), + // haveCallback: vertex.haveCallback, + width: boundingBox == null ? void 0 : boundingBox.width, + height: boundingBox == null ? void 0 : boundingBox.height, + // dir: vertex.dir, + type: vertex.type, + // props: vertex.props, + // padding: getConfig().flowchart.padding, + // boundingBox, + el: nodeEl, + parent: parentLookupDb.parentById[vertex.id] + }; + nodeDb[node.id] = data; + }); + return graph; +}; +const getNextPosition = (position, edgeDirection, graphDirection) => { + const portPos2 = { + TB: { + in: { + north: "north" + }, + out: { + south: "west", + west: "east", + east: "south" + } + }, + LR: { + in: { + west: "west" + }, + out: { + east: "south", + south: "north", + north: "east" + } + }, + RL: { + in: { + east: "east" + }, + out: { + west: "north", + north: "south", + south: "west" + } + }, + BT: { + in: { + south: "south" + }, + out: { + north: "east", + east: "west", + west: "north" + } + } + }; + portPos2.TD = portPos2.TB; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("abc88", graphDirection, edgeDirection, position); + return portPos2[graphDirection][edgeDirection][position]; +}; +const getNextPort = (node, edgeDirection, graphDirection) => { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("getNextPort abc88", { node, edgeDirection, graphDirection }); + if (!portPos[node]) { + switch (graphDirection) { + case "TB": + case "TD": + portPos[node] = { + inPosition: "north", + outPosition: "south" + }; + break; + case "BT": + portPos[node] = { + inPosition: "south", + outPosition: "north" + }; + break; + case "RL": + portPos[node] = { + inPosition: "east", + outPosition: "west" + }; + break; + case "LR": + portPos[node] = { + inPosition: "west", + outPosition: "east" + }; + break; + } + } + const result = edgeDirection === "in" ? portPos[node].inPosition : portPos[node].outPosition; + if (edgeDirection === "in") { + portPos[node].inPosition = getNextPosition( + portPos[node].inPosition, + edgeDirection, + graphDirection + ); + } else { + portPos[node].outPosition = getNextPosition( + portPos[node].outPosition, + edgeDirection, + graphDirection + ); + } + return result; +}; +const getEdgeStartEndPoint = (edge, dir) => { + let source = edge.start; + let target = edge.end; + const startNode = nodeDb[source]; + const endNode = nodeDb[target]; + if (!startNode || !endNode) { + return { source, target }; + } + if (startNode.type === "diamond") { + source = `${source}-${getNextPort(source, "out", dir)}`; + } + if (endNode.type === "diamond") { + target = `${target}-${getNextPort(target, "in", dir)}`; + } + return { source, target }; +}; +const addEdges = function(edges, diagObj, graph, svg) { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("abc78 edges = ", edges); + const labelsEl = svg.insert("g").attr("class", "edgeLabels"); + let linkIdCnt = {}; + let dir = diagObj.db.getDirection(); + let defaultStyle; + let defaultLabelStyle; + if (edges.defaultStyle !== void 0) { + const defaultStyles = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.a)(edges.defaultStyle); + defaultStyle = defaultStyles.style; + defaultLabelStyle = defaultStyles.labelStyle; + } + edges.forEach(function(edge) { + var linkIdBase = "L-" + edge.start + "-" + edge.end; + if (linkIdCnt[linkIdBase] === void 0) { + linkIdCnt[linkIdBase] = 0; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } else { + linkIdCnt[linkIdBase]++; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("abc78 new entry", linkIdBase, linkIdCnt[linkIdBase]); + } + let linkId = linkIdBase + "-" + linkIdCnt[linkIdBase]; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("abc78 new link id to be used is", linkIdBase, linkId, linkIdCnt[linkIdBase]); + var linkNameStart = "LS-" + edge.start; + var linkNameEnd = "LE-" + edge.end; + const edgeData = { style: "", labelStyle: "" }; + edgeData.minlen = edge.length || 1; + if (edge.type === "arrow_open") { + edgeData.arrowhead = "none"; + } else { + edgeData.arrowhead = "normal"; + } + edgeData.arrowTypeStart = "arrow_open"; + edgeData.arrowTypeEnd = "arrow_open"; + switch (edge.type) { + case "double_arrow_cross": + edgeData.arrowTypeStart = "arrow_cross"; + case "arrow_cross": + edgeData.arrowTypeEnd = "arrow_cross"; + break; + case "double_arrow_point": + edgeData.arrowTypeStart = "arrow_point"; + case "arrow_point": + edgeData.arrowTypeEnd = "arrow_point"; + break; + case "double_arrow_circle": + edgeData.arrowTypeStart = "arrow_circle"; + case "arrow_circle": + edgeData.arrowTypeEnd = "arrow_circle"; + break; + } + let style = ""; + let labelStyle = ""; + switch (edge.stroke) { + case "normal": + style = "fill:none;"; + if (defaultStyle !== void 0) { + style = defaultStyle; + } + if (defaultLabelStyle !== void 0) { + labelStyle = defaultLabelStyle; + } + edgeData.thickness = "normal"; + edgeData.pattern = "solid"; + break; + case "dotted": + edgeData.thickness = "normal"; + edgeData.pattern = "dotted"; + edgeData.style = "fill:none;stroke-width:2px;stroke-dasharray:3;"; + break; + case "thick": + edgeData.thickness = "thick"; + edgeData.pattern = "solid"; + edgeData.style = "stroke-width: 3.5px;fill:none;"; + break; + } + if (edge.style !== void 0) { + const styles2 = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.a)(edge.style); + style = styles2.style; + labelStyle = styles2.labelStyle; + } + edgeData.style = edgeData.style += style; + edgeData.labelStyle = edgeData.labelStyle += labelStyle; + if (edge.interpolate !== void 0) { + edgeData.curve = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.d)(edge.interpolate, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .qGi); + } else if (edges.defaultInterpolate !== void 0) { + edgeData.curve = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.d)(edges.defaultInterpolate, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .qGi); + } else { + edgeData.curve = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.d)(conf.curve, d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .qGi); + } + if (edge.text === void 0) { + if (edge.style !== void 0) { + edgeData.arrowheadStyle = "fill: #333"; + } + } else { + edgeData.arrowheadStyle = "fill: #333"; + edgeData.labelpos = "c"; + } + edgeData.labelType = "text"; + edgeData.label = edge.text.replace(_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.c.lineBreakRegex, "\n"); + if (edge.style === void 0) { + edgeData.style = edgeData.style || "stroke: #333; stroke-width: 1.5px;fill:none;"; + } + edgeData.labelStyle = edgeData.labelStyle.replace("color:", "fill:"); + edgeData.id = linkId; + edgeData.classes = "flowchart-link " + linkNameStart + " " + linkNameEnd; + const labelEl = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.f)(labelsEl, edgeData); + const { source, target } = getEdgeStartEndPoint(edge, dir); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.debug("abc78 source and target", source, target); + graph.edges.push({ + id: "e" + edge.start + edge.end, + sources: [source], + targets: [target], + labelEl, + labels: [ + { + width: edgeData.width, + height: edgeData.height, + orgWidth: edgeData.width, + orgHeight: edgeData.height, + text: edgeData.label, + layoutOptions: { + "edgeLabels.inline": "true", + "edgeLabels.placement": "CENTER" + } + } + ], + edgeData + }); + }); + return graph; +}; +const addMarkersToEdge = function(svgPath, edgeData, diagramType, arrowMarkerAbsolute) { + let url = ""; + if (arrowMarkerAbsolute) { + url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search; + url = url.replace(/\(/g, "\\("); + url = url.replace(/\)/g, "\\)"); + } + switch (edgeData.arrowTypeStart) { + case "arrow_cross": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-crossStart)"); + break; + case "arrow_point": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-pointStart)"); + break; + case "arrow_barb": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-barbStart)"); + break; + case "arrow_circle": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-circleStart)"); + break; + case "aggregation": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-aggregationStart)"); + break; + case "extension": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-extensionStart)"); + break; + case "composition": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-compositionStart)"); + break; + case "dependency": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-dependencyStart)"); + break; + case "lollipop": + svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-lollipopStart)"); + break; + } + switch (edgeData.arrowTypeEnd) { + case "arrow_cross": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-crossEnd)"); + break; + case "arrow_point": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-pointEnd)"); + break; + case "arrow_barb": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-barbEnd)"); + break; + case "arrow_circle": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-circleEnd)"); + break; + case "aggregation": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-aggregationEnd)"); + break; + case "extension": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-extensionEnd)"); + break; + case "composition": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-compositionEnd)"); + break; + case "dependency": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-dependencyEnd)"); + break; + case "lollipop": + svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-lollipopEnd)"); + break; + } +}; +const getClasses = function(text, diagObj) { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Extracting classes"); + diagObj.db.clear("ver-2"); + try { + diagObj.parse(text); + return diagObj.db.getClasses(); + } catch (e) { + return {}; + } +}; +const addSubGraphs = function(db2) { + const parentLookupDb = { parentById: {}, childrenById: {} }; + const subgraphs = db2.getSubGraphs(); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Subgraphs - ", subgraphs); + subgraphs.forEach(function(subgraph) { + subgraph.nodes.forEach(function(node) { + parentLookupDb.parentById[node] = subgraph.id; + if (parentLookupDb.childrenById[subgraph.id] === void 0) { + parentLookupDb.childrenById[subgraph.id] = []; + } + parentLookupDb.childrenById[subgraph.id].push(node); + }); + }); + subgraphs.forEach(function(subgraph) { + ({ id: subgraph.id }); + if (parentLookupDb.parentById[subgraph.id] !== void 0) { + parentLookupDb.parentById[subgraph.id]; + } + }); + return parentLookupDb; +}; +const calcOffset = function(src, dest, parentLookupDb) { + const ancestor = findCommonAncestor(src, dest, parentLookupDb); + if (ancestor === void 0 || ancestor === "root") { + return { x: 0, y: 0 }; + } + const ancestorOffset = nodeDb[ancestor].offset; + return { x: ancestorOffset.posX, y: ancestorOffset.posY }; +}; +const insertEdge = function(edgesEl, edge, edgeData, diagObj, parentLookupDb) { + const offset = calcOffset(edge.sources[0], edge.targets[0], parentLookupDb); + const src = edge.sections[0].startPoint; + const dest = edge.sections[0].endPoint; + const segments = edge.sections[0].bendPoints ? edge.sections[0].bendPoints : []; + const segPoints = segments.map((segment) => [segment.x + offset.x, segment.y + offset.y]); + const points = [ + [src.x + offset.x, src.y + offset.y], + ...segPoints, + [dest.x + offset.x, dest.y + offset.y] + ]; + const curve = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .cFK)().curve(d3__WEBPACK_IMPORTED_MODULE_0__/* .curveLinear */ .qGi); + const edgePath = edgesEl.insert("path").attr("d", curve(points)).attr("class", "path").attr("fill", "none"); + const edgeG = edgesEl.insert("g").attr("class", "edgeLabel"); + const edgeWithLabel = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)(edgeG.node().appendChild(edge.labelEl)); + const box = edgeWithLabel.node().firstChild.getBoundingClientRect(); + edgeWithLabel.attr("width", box.width); + edgeWithLabel.attr("height", box.height); + edgeG.attr( + "transform", + `translate(${edge.labels[0].x + offset.x}, ${edge.labels[0].y + offset.y})` + ); + addMarkersToEdge(edgePath, edgeData, diagObj.type, diagObj.arrowMarkerAbsolute); +}; +const insertChildren = (nodeArray, parentLookupDb) => { + nodeArray.forEach((node) => { + if (!node.children) { + node.children = []; + } + const childIds = parentLookupDb.childrenById[node.id]; + if (childIds) { + childIds.forEach((childId) => { + node.children.push(nodeDb[childId]); + }); + } + insertChildren(node.children, parentLookupDb); + }); +}; +const draw = async function(text, id, _version, diagObj) { + var _a; + diagObj.db.clear(); + nodeDb = {}; + diagObj.db.setGen("gen-2"); + diagObj.parser.parse(text); + const renderEl = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)("body").append("div").attr("style", "height:400px").attr("id", "cy"); + let graph = { + id: "root", + layoutOptions: { + "elk.hierarchyHandling": "INCLUDE_CHILDREN", + "org.eclipse.elk.padding": "[top=100, left=100, bottom=110, right=110]", + "elk.layered.spacing.edgeNodeBetweenLayers": "30", + // 'elk.layered.mergeEdges': 'true', + "elk.direction": "DOWN" + // 'elk.ports.sameLayerEdges': true, + // 'nodePlacement.strategy': 'SIMPLE', + }, + children: [], + edges: [] + }; + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Drawing flowchart using v3 renderer", elk); + let dir = diagObj.db.getDirection(); + switch (dir) { + case "BT": + graph.layoutOptions["elk.direction"] = "UP"; + break; + case "TB": + graph.layoutOptions["elk.direction"] = "DOWN"; + break; + case "LR": + graph.layoutOptions["elk.direction"] = "RIGHT"; + break; + case "RL": + graph.layoutOptions["elk.direction"] = "LEFT"; + break; + } + const { securityLevel, flowchart: conf2 } = (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.g)(); + let sandboxElement; + if (securityLevel === "sandbox") { + sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)("#i" + id); + } + const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .MlD)("body"); + const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document; + const svg = root.select(`[id="${id}"]`); + const markers = ["point", "circle", "cross"]; + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.i)(svg, markers, diagObj.type, diagObj.arrowMarkerAbsolute); + const vert = diagObj.db.getVertices(); + let subG; + const subGraphs = diagObj.db.getSubGraphs(); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Subgraphs - ", subGraphs); + for (let i = subGraphs.length - 1; i >= 0; i--) { + subG = subGraphs[i]; + diagObj.db.addVertex(subG.id, subG.title, "group", void 0, subG.classes, subG.dir); + } + const subGraphsEl = svg.insert("g").attr("class", "subgraphs"); + const parentLookupDb = addSubGraphs(diagObj.db); + graph = addVertices(vert, id, root, doc, diagObj, parentLookupDb, graph); + const edgesEl = svg.insert("g").attr("class", "edges edgePath"); + const edges = diagObj.db.getEdges(); + graph = addEdges(edges, diagObj, graph, svg); + const nodes = Object.keys(nodeDb); + nodes.forEach((nodeId) => { + const node = nodeDb[nodeId]; + if (!node.parent) { + graph.children.push(node); + } + if (parentLookupDb.childrenById[nodeId] !== void 0) { + node.labels = [ + { + text: node.labelText, + layoutOptions: { + "nodeLabels.placement": "[H_CENTER, V_TOP, INSIDE]" + }, + width: node.labelData.width, + height: node.labelData.height + } + ]; + delete node.x; + delete node.y; + delete node.width; + delete node.height; + } + }); + insertChildren(graph.children, parentLookupDb); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("after layout", JSON.stringify(graph, null, 2)); + const g = await elk.layout(graph); + drawNodes(0, 0, g.children, svg, subGraphsEl, diagObj, 0); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("after layout", g); + (_a = g.edges) == null ? void 0 : _a.map((edge) => { + insertEdge(edgesEl, edge, edge.edgeData, diagObj, parentLookupDb); + }); + (0,_mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.s)({}, svg, conf2.diagramPadding, conf2.useMaxWidth); + renderEl.remove(); +}; +const drawNodes = (relX, relY, nodeArray, svg, subgraphsEl, diagObj, depth) => { + nodeArray.forEach(function(node) { + if (node) { + nodeDb[node.id].offset = { + posX: node.x + relX, + posY: node.y + relY, + x: relX, + y: relY, + depth, + width: node.width, + height: node.height + }; + if (node.type === "group") { + const subgraphEl = subgraphsEl.insert("g").attr("class", "subgraph"); + subgraphEl.insert("rect").attr("class", "subgraph subgraph-lvl-" + depth % 5 + " node").attr("x", node.x + relX).attr("y", node.y + relY).attr("width", node.width).attr("height", node.height); + const label = subgraphEl.insert("g").attr("class", "label"); + label.attr( + "transform", + `translate(${node.labels[0].x + relX + node.x}, ${node.labels[0].y + relY + node.y})` + ); + label.node().appendChild(node.labelData.labelNode); + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Id (UGH)= ", node.type, node.labels); + } else { + _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.l.info("Id (UGH)= ", node.id); + node.el.attr( + "transform", + `translate(${node.x + relX + node.width / 2}, ${node.y + relY + node.height / 2})` + ); + } + } + }); + nodeArray.forEach(function(node) { + if (node && node.type === "group") { + drawNodes(relX + node.x, relY + node.y, node.children, svg, subgraphsEl, diagObj, depth + 1); + } + }); +}; +const renderer = { + getClasses, + draw +}; +const genSections = (options) => { + let sections = ""; + for (let i = 0; i < 5; i++) { + sections += ` + .subgraph-lvl-${i} { + fill: ${options[`surface${i}`]}; + stroke: ${options[`surfacePeer${i}`]}; + } + `; + } + return sections; +}; +const getStyles = (options) => `.label { + font-family: ${options.fontFamily}; + color: ${options.nodeTextColor || options.textColor}; + } + .cluster-label text { + fill: ${options.titleColor}; + } + .cluster-label span { + color: ${options.titleColor}; + } + + .label text,span { + fill: ${options.nodeTextColor || options.textColor}; + color: ${options.nodeTextColor || options.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${options.mainBkg}; + stroke: ${options.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${options.arrowheadColor}; + } + + .edgePath .path { + stroke: ${options.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${options.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${options.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${options.edgeLabelBackground}; + fill: ${options.edgeLabelBackground}; + } + text-align: center; + } + + .cluster rect { + fill: ${options.clusterBkg}; + stroke: ${options.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${options.titleColor}; + } + + .cluster span { + color: ${options.titleColor}; + } + /* .cluster div { + color: ${options.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${options.fontFamily}; + font-size: 12px; + background: ${options.tertiaryColor}; + border: 1px solid ${options.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${options.textColor}; + } + .subgraph { + stroke-width:2; + rx:3; + } + // .subgraph-lvl-1 { + // fill:#ccc; + // // stroke:black; + // } + ${genSections(options)} +`; +const styles = getStyles; +const diagram = { + db: _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.h, + renderer, + parser: _mermaid_ae477ddf_js__WEBPACK_IMPORTED_MODULE_12__.p, + styles +}; + +//# sourceMappingURL=flowchart-elk-definition-170a3958.js.map + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/assets/js/864.62503e7f.js b/assets/js/864.62503e7f.js new file mode 100644 index 00000000..967af473 --- /dev/null +++ b/assets/js/864.62503e7f.js @@ -0,0 +1,2 @@ +/*! For license information please see 864.62503e7f.js.LICENSE.txt */ +(self.webpackChunkwaku_docusaurus_template=self.webpackChunkwaku_docusaurus_template||[]).push([[864],{86208:(t,e)=>{"use strict";e.oR=e.eI=void 0;var n=/^([^\w]*)(javascript|data|vbscript)/im,i=/&#(\w+)(^\w|;)?/g,r=/&(newline|tab);/gi,a=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|:)/gim,o=[".","/"];e.eI="about:blank",e.oR=function(t){if(!t)return e.eI;var c,l=(c=t,c.replace(a,"").replace(i,(function(t,e){return String.fromCharCode(e)}))).replace(r,"").replace(a,"").trim();if(!l)return e.eI;if(function(t){return o.indexOf(t[0])>-1}(l))return l;var h=l.match(s);if(!h)return l;var u=h[0];return n.test(u)?e.eI:l}},95788:(t,e,n)=>{"use strict";n.d(e,{Iu:()=>h,yg:()=>f});var i=n(11504);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var c=i.createContext({}),l=function(t){var e=i.useContext(c),n=e;return t&&(n="function"==typeof t?t(e):s(s({},e),t)),n},h=function(t){var e=l(t.components);return i.createElement(c.Provider,{value:e},t.children)},u="mdxType",d={inlineCode:"code",wrapper:function(t){var e=t.children;return i.createElement(i.Fragment,{},e)}},p=i.forwardRef((function(t,e){var n=t.components,r=t.mdxType,a=t.originalType,c=t.parentName,h=o(t,["components","mdxType","originalType","parentName"]),u=l(n),p=r,f=u["".concat(c,".").concat(p)]||u[p]||d[p]||a;return n?i.createElement(f,s(s({ref:e},h),{},{components:n})):i.createElement(f,s({ref:e},h))}));function f(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var a=n.length,s=new Array(a);s[0]=p;var o={};for(var c in e)hasOwnProperty.call(e,c)&&(o[c]=e[c]);o.originalType=t,o[u]="string"==typeof t?t:r,s[1]=o;for(var l=2;l{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.useMDXEnhancementElements=e.MDXEnhancementContext=void 0;const i=n(81316).__importStar(n(11504));e.MDXEnhancementContext=i.default.createContext({items:[]});e.useMDXEnhancementElements=(t,n,r)=>{const a=(0,i.useContext)(e.MDXEnhancementContext);return a?(0,i.useMemo)((()=>a.items.filter((e=>e.component===t&&e.position===n)).map((t=>t.render(r)))),[t,n,r]):[]}},37808:(t,e,n)=>{"use strict";const i=n(81316),r=n(81595),a=n(77956),s=i.__importDefault(n(84357)),o=i.__importDefault(n(14971)),c=i.__importDefault(n(11504)),l=i.__importDefault(n(36224));const h={note:{infimaClassName:"secondary",iconComponent:function(){return c.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},c.default.createElement("path",{d:"M8.00004 11.3333C8.18893 11.3333 8.34737 11.2693 8.47537 11.1413C8.60337 11.0133 8.66715 10.8551 8.66671 10.6667C8.66671 10.4778 8.60271 10.3193 8.47471 10.1913C8.34671 10.0633 8.18849 9.99957 8.00004 10C7.81115 10 7.65271 10.064 7.52471 10.192C7.39671 10.32 7.33293 10.4782 7.33337 10.6667C7.33337 10.8556 7.39737 11.014 7.52537 11.142C7.65337 11.27 7.8116 11.3338 8.00004 11.3333ZM7.33337 8.66668H8.66671V4.66668H7.33337V8.66668ZM8.00004 14.6667C7.07782 14.6667 6.21115 14.4916 5.40004 14.1413C4.58893 13.7911 3.88337 13.3162 3.28337 12.7167C2.68337 12.1167 2.20849 11.4111 1.85871 10.6C1.50893 9.7889 1.33382 8.92223 1.33337 8.00001C1.33337 7.07779 1.50849 6.21112 1.85871 5.40001C2.20893 4.5889 2.68382 3.88334 3.28337 3.28334C3.88337 2.68334 4.58893 2.20845 5.40004 1.85868C6.21115 1.5089 7.07782 1.33379 8.00004 1.33334C8.92226 1.33334 9.78893 1.50845 10.6 1.85868C11.4112 2.2089 12.1167 2.68379 12.7167 3.28334C13.3167 3.88334 13.7918 4.5889 14.142 5.40001C14.4923 6.21112 14.6672 7.07779 14.6667 8.00001C14.6667 8.92223 14.4916 9.7889 14.1414 10.6C13.7912 11.4111 13.3163 12.1167 12.7167 12.7167C12.1167 13.3167 11.4112 13.7918 10.6 14.142C9.78893 14.4922 8.92226 14.6671 8.00004 14.6667ZM8.00004 13.3333C9.48893 13.3333 10.75 12.8167 11.7834 11.7833C12.8167 10.75 13.3334 9.4889 13.3334 8.00001C13.3334 6.51112 12.8167 5.25001 11.7834 4.21668C10.75 3.18334 9.48893 2.66668 8.00004 2.66668C6.51115 2.66668 5.25004 3.18334 4.21671 4.21668C3.18337 5.25001 2.66671 6.51112 2.66671 8.00001C2.66671 9.4889 3.18337 10.75 4.21671 11.7833C5.25004 12.8167 6.51115 13.3333 8.00004 13.3333Z",fill:"currentColor"}))},label:c.default.createElement(s.default,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return c.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},c.default.createElement("path",{d:"M8 14.6666C7.63333 14.6666 7.31933 14.536 7.058 14.2746C6.79667 14.0133 6.66622 13.6995 6.66667 13.3333H9.33333C9.33333 13.7 9.20267 14.014 8.94133 14.2753C8.68 14.5366 8.36622 14.6671 8 14.6666ZM5.33333 12.6666V11.3333H10.6667V12.6666H5.33333ZM5.5 10.6666C4.73333 10.2111 4.12489 9.59998 3.67467 8.83331C3.22445 8.06665 2.99956 7.23331 3 6.33331C3 4.94442 3.48622 3.76376 4.45867 2.79131C5.43111 1.81887 6.61156 1.33287 8 1.33331C9.38889 1.33331 10.5696 1.81954 11.542 2.79198C12.5144 3.76442 13.0004 4.94487 13 6.33331C13 7.23331 12.7751 8.06665 12.3253 8.83331C11.8756 9.59998 11.2671 10.2111 10.5 10.6666H5.5ZM5.9 9.33331H10.1C10.6 8.97776 10.9862 8.53887 11.2587 8.01665C11.5311 7.49442 11.6671 6.93331 11.6667 6.33331C11.6667 5.31109 11.3111 4.44442 10.6 3.73331C9.88889 3.0222 9.02222 2.66665 8 2.66665C6.97778 2.66665 6.11111 3.0222 5.4 3.73331C4.68889 4.44442 4.33333 5.31109 4.33333 6.33331C4.33333 6.93331 4.46956 7.49442 4.742 8.01665C5.01444 8.53887 5.40045 8.97776 5.9 9.33331Z",fill:"currentColor"}))},label:c.default.createElement(s.default,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return c.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.default.createElement("path",{d:"M5.5 14L2 10.5V5.5L5.5 2H10.5L14 5.5V10.5L10.5 14H5.5ZM6.1 10.8333L8 8.93333L9.9 10.8333L10.8333 9.9L8.93333 8L10.8333 6.1L9.9 5.16667L8 7.06667L6.1 5.16667L5.16667 6.1L7.06667 8L5.16667 9.9L6.1 10.8333ZM6.06667 12.6667H9.93333L12.6667 9.93333V6.06667L9.93333 3.33333H6.06667L3.33333 6.06667V9.93333L6.06667 12.6667Z",fill:"currentColor"}))},label:c.default.createElement(s.default,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return c.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.default.createElement("path",{d:"M7.33334 11.3333H8.66668V7.33331H7.33334V11.3333ZM8.00001 5.99998C8.1889 5.99998 8.34734 5.93598 8.47534 5.80798C8.60334 5.67998 8.66712 5.52176 8.66668 5.33331C8.66668 5.14442 8.60268 4.98598 8.47468 4.85798C8.34668 4.72998 8.18845 4.6662 8.00001 4.66665C7.81112 4.66665 7.65268 4.73065 7.52468 4.85865C7.39668 4.98665 7.3329 5.14487 7.33334 5.33331C7.33334 5.5222 7.39734 5.68065 7.52534 5.80865C7.65334 5.93665 7.81157 6.00042 8.00001 5.99998ZM8.00001 14.6666C7.07779 14.6666 6.21112 14.4915 5.40001 14.1413C4.5889 13.7911 3.88334 13.3162 3.28334 12.7166C2.68334 12.1166 2.20845 11.4111 1.85868 10.6C1.5089 9.78887 1.33379 8.9222 1.33334 7.99998C1.33334 7.07776 1.50845 6.21109 1.85868 5.39998C2.2089 4.58887 2.68379 3.88331 3.28334 3.28331C3.88334 2.68331 4.5889 2.20842 5.40001 1.85865C6.21112 1.50887 7.07779 1.33376 8.00001 1.33331C8.92223 1.33331 9.7889 1.50842 10.6 1.85865C11.4111 2.20887 12.1167 2.68376 12.7167 3.28331C13.3167 3.88331 13.7918 4.58887 14.142 5.39998C14.4922 6.21109 14.6671 7.07776 14.6667 7.99998C14.6667 8.9222 14.4916 9.78887 14.1413 10.6C13.7911 11.4111 13.3162 12.1166 12.7167 12.7166C12.1167 13.3166 11.4111 13.7918 10.6 14.142C9.7889 14.4922 8.92223 14.6671 8.00001 14.6666ZM8.00001 13.3333C9.4889 13.3333 10.75 12.8166 11.7833 11.7833C12.8167 10.75 13.3333 9.48887 13.3333 7.99998C13.3333 6.51109 12.8167 5.24998 11.7833 4.21665C10.75 3.18331 9.4889 2.66665 8.00001 2.66665C6.51112 2.66665 5.25001 3.18331 4.21668 4.21665C3.18334 5.24998 2.66668 6.51109 2.66668 7.99998C2.66668 9.48887 3.18334 10.75 4.21668 11.7833C5.25001 12.8166 6.51112 13.3333 8.00001 13.3333Z",fill:"currentColor"}))},label:c.default.createElement(s.default,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return c.default.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c.default.createElement("path",{d:"M8.00001 14.6833C7.82224 14.6833 7.65268 14.65 7.49135 14.5833C7.33001 14.5167 7.1829 14.4222 7.05001 14.3L1.70001 8.94999C1.57779 8.81666 1.48335 8.66932 1.41668 8.50799C1.35001 8.34666 1.31668 8.17732 1.31668 7.99999C1.31668 7.82221 1.35001 7.64999 1.41668 7.48332C1.48335 7.31666 1.57779 7.17221 1.70001 7.04999L7.05001 1.69999C7.18335 1.56666 7.33068 1.46932 7.49201 1.40799C7.65335 1.34666 7.82268 1.31621 8.00001 1.31666C8.17779 1.31666 8.35001 1.34732 8.51668 1.40866C8.68335 1.46999 8.82779 1.5671 8.95001 1.69999L14.3 7.04999C14.4333 7.17221 14.5307 7.31666 14.592 7.48332C14.6533 7.64999 14.6838 7.82221 14.6833 7.99999C14.6833 8.17777 14.6529 8.34732 14.592 8.50866C14.5311 8.66999 14.4338 8.8171 14.3 8.94999L8.95001 14.3C8.82779 14.4222 8.68335 14.5167 8.51668 14.5833C8.35001 14.65 8.17779 14.6833 8.00001 14.6833ZM8.00001 13.35L13.35 7.99999L8.00001 2.64999L2.65001 7.99999L8.00001 13.35ZM7.33335 8.66666H8.66668V4.66666H7.33335V8.66666ZM8.00001 10.6667C8.1889 10.6667 8.34735 10.6027 8.47535 10.4747C8.60335 10.3467 8.66713 10.1884 8.66668 9.99999C8.66668 9.8111 8.60268 9.65266 8.47468 9.52466C8.34668 9.39666 8.18846 9.33288 8.00001 9.33332C7.81113 9.33332 7.65268 9.39732 7.52468 9.52532C7.39668 9.65332 7.3329 9.81154 7.33335 9.99999C7.33335 10.1889 7.39735 10.3473 7.52535 10.4753C7.65335 10.6033 7.81157 10.6671 8.00001 10.6667Z",fill:"currentColor"}))},label:c.default.createElement(s.default,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},u={secondary:"note",important:"info",success:"tip",warning:"danger"};function d(t){const{mdxAdmonitionTitle:e,rest:n}=function(t){const e=c.default.Children.toArray(t),n=e.find((t=>c.default.isValidElement(t)&&"mdxAdmonitionTitle"===t.props?.mdxType)),i=c.default.createElement(c.default.Fragment,null,e.filter((t=>t!==n)));return{mdxAdmonitionTitle:n,rest:i}}(t.children);return{...t,title:t.title??e,children:n}}e.c=function(t){const{children:e,type:n,title:i,icon:s}=d(t),p=function(t){const e=u[t]??t,n=h[e];return n||(console.warn(`No admonition config found for admonition type "${e}". Using Info as fallback.`),h.info)}(n),f=i??p.label,{iconComponent:g}=p,y=s??c.default.createElement(g,null);return c.default.createElement("div",{className:(0,o.default)(a.ThemeClassNames.common.admonition,a.ThemeClassNames.common.admonitionType(t.type),`alert--${p.infimaClassName}`,l.default.admonition)},c.default.createElement("span",{className:l.default.admonitionIcon},y),c.default.createElement("div",null,c.default.createElement(r.Typography,{variant:"body1",className:l.default.admonitionHeading},f),c.default.createElement(r.Typography,{variant:"body1",className:l.default.admonitionContent},e)))}},38348:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(81316),r=i.__importDefault(n(95180)),a=i.__importDefault(n(14971)),s=i.__importDefault(n(11504)),o=i.__importDefault(n(89124));e.default=function(t){return s.default.createElement(s.default.Fragment,null,s.default.createElement(r.default,{...t,className:(0,a.default)(t.className,o.default.codeBlockContainer)}))}},57728:(t,e,n)=>{"use strict";const i=n(81316),r=i.__importDefault(n(11504)),a=i.__importDefault(n(14971)),s=n(77956),o=n(49784),c=i.__importStar(n(11373)),l=i.__importDefault(n(68640)),h=i.__importDefault(n(44368)),u=i.__importDefault(n(76071)),d=i.__importDefault(n(38348)),p=i.__importDefault(n(29732)),f=n(81595);e.c=function(t){let{children:e,className:n="",metastring:i,title:g,showLineNumbers:y,language:m}=t;const{prism:{defaultLanguage:b,magicComments:_}}=(0,s.useThemeConfig)(),x=m??(0,o.parseLanguage)(n)??b,v=(0,s.usePrismTheme)(),k=(0,o.useCodeWordWrap)(),C=(0,o.parseCodeBlockTitle)(i)||g,{lineClassNames:w,code:T}=(0,o.parseLines)(e,{metastring:i,language:x,magicComments:_}),E=y??(0,o.containsLineNumbers)(i);return r.default.createElement(d.default,{as:"div",className:(0,a.default)(n,x&&!n.includes(`language-${x}`)&&`language-${x}`)},C&&r.default.createElement("div",{className:p.default.codeBlockTitle},r.default.createElement(f.Typography,{variant:"subtitle1"},C)),r.default.createElement("div",{className:p.default.codeBlockContent},r.default.createElement(c.default,{...c.defaultProps,theme:v,code:T,language:x??"text"},(t=>{let{className:e,tokens:n,getLineProps:i,getTokenProps:s}=t;return r.default.createElement("pre",{tabIndex:0,ref:k.codeBlockRef,className:(0,a.default)(e,p.default.codeBlock,"thin-scrollbar")},r.default.createElement("code",{className:(0,a.default)(p.default.codeBlockLines,E&&p.default.codeBlockLinesWithNumbering)},n.map(((t,e)=>r.default.createElement(l.default,{key:e,line:t,getLineProps:i,getTokenProps:s,classNames:w[e],showLineNumbers:E})))))})),r.default.createElement("div",{className:p.default.buttonGroup},(k.isEnabled||k.isCodeScrollable)&&r.default.createElement(u.default,{className:p.default.codeButton,onClick:()=>k.toggle(),isEnabled:k.isEnabled}),r.default.createElement(h.default,{className:p.default.codeButton,code:T}))))}},44368:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(81316),r=i.__importStar(n(11504)),a=i.__importDefault(n(14971)),s=i.__importDefault(n(13816)),o=n(84357),c=i.__importDefault(n(50584)),l=i.__importDefault(n(25646)),h=n(34640);e.default=function(t){let{code:e,className:n}=t;const[i,u]=(0,r.useState)(!1),d=(0,r.useRef)(void 0),p=(0,r.useCallback)((()=>{(0,s.default)(e),u(!0),d.current=window.setTimeout((()=>{u(!1)}),1e3)}),[e]);return(0,r.useEffect)((()=>()=>window.clearTimeout(d.current)),[]),r.default.createElement("button",{type:"button","aria-label":i?(0,o.translate)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,o.translate)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,o.translate)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,a.default)("clean-btn",n,l.default.copyButton,i&&l.default.copyButtonCopied),onClick:p},r.default.createElement("span",{className:l.default.copyButtonIcons,"aria-hidden":"true"},i?r.default.createElement(c.default,{className:l.default.copyButtonSuccessIcon}):r.default.createElement(h.IconCopy,{className:l.default.copyButtonIcon})))}},25292:(t,e,n)=>{"use strict";const i=n(81316),r=i.__importDefault(n(47528)),a=i.__importDefault(n(11504));e.c=function(t){return a.default.createElement(a.default.Fragment,null,a.default.createElement(r.default,{...t}))}},58456:(t,e,n)=>{"use strict";const i=n(81316),r=i.__importStar(n(11504)),a=i.__importDefault(n(77200)),s=n(81595);e.c=function(t){const e=r.default.Children.toArray(t.children),[n,i]=(0,r.useState)(!0),o=e.find((t=>r.default.isValidElement(t)&&"summary"===t.props?.mdxType)),c=r.default.createElement(r.default.Fragment,null,e.filter((t=>t!==o)));return r.default.createElement(s.Collapse,{...t,open:n,onChange:t=>i(t),label:o,className:a.default.collapse},c)}},57484:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const i=n(81316),r=i.__importDefault(n(73516)),a=i.__importDefault(n(11504)),s=n(14720);e.default=function(t){const e=(0,s.useMDXEnhancementElements)("heading","after",t);return a.default.createElement(a.default.Fragment,null,a.default.createElement(r.default,{...t}),e)}},85372:(t,e,n)=>{"use strict";const i=n(81316),r=i.__importDefault(n(26448)),a=i.__importDefault(n(11504)),s=n(74392);e.c=function(t){return a.default.createElement(s.LightBoxWrapper,null,a.default.createElement(r.default,{...t}))}},38432:(t,e,n)=>{"use strict";const i=n(81316),r=i.__importDefault(n(98280)),a=i.__importDefault(n(11504)),s=n(74392);e.c=function(t){return a.default.createElement(s.LightBoxWrapper,null,a.default.createElement(r.default,{...t}))}},95180:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>h});var i=n(45072),r=n(11504),a=n(14971),s=n(32984),o=n(45864),c=n(12512);const l={codeBlockContainer:"codeBlockContainer_Ckt0"};function h(t){let{as:e,...n}=t;const h=(0,s.i)(),u=(0,c.gj)(h);return r.createElement(e,(0,i.c)({},n,{style:u,className:(0,a.default)(n.className,l.codeBlockContainer,o.W.common.codeBlock)}))}},68640:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var i=n(45072),r=n(11504),a=n(14971);const s={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function o(t){let{line:e,classNames:n,showLineNumbers:o,getLineProps:c,getTokenProps:l}=t;1===e.length&&"\n"===e[0].content&&(e[0].content="");const h=c({line:e,className:(0,a.default)(n,o&&s.codeLine)}),u=e.map(((t,e)=>r.createElement("span",(0,i.c)({key:e},l({token:t,key:e})))));return r.createElement("span",h,o?r.createElement(r.Fragment,null,r.createElement("span",{className:s.codeLineNumber}),r.createElement("span",{className:s.codeLineContent},u)):u,r.createElement("br",null))}},76071:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>l});var i=n(11504),r=n(14971),a=n(84357),s=n(45072);function o(t){return i.createElement("svg",(0,s.c)({viewBox:"0 0 24 24"},t),i.createElement("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}))}const c={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function l(t){let{className:e,onClick:n,isEnabled:s}=t;const l=(0,a.translate)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return i.createElement("button",{type:"button",onClick:n,className:(0,r.default)("clean-btn",e,s&&c.wordWrapButtonEnabled),"aria-label":l,title:l},i.createElement(o,{className:c.wordWrapButtonIcon,"aria-hidden":"true"}))}},47528:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>u});var i=n(45072),r=n(11504),a=n(93664),s=n(14971),o=n(38348);const c={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function l(t){let{children:e,className:n}=t;return r.createElement(o.default,{as:"pre",tabIndex:0,className:(0,s.default)(c.codeBlockStandalone,"thin-scrollbar",n)},r.createElement("code",{className:c.codeBlockLines},e))}var h=n(57728);function u(t){let{children:e,...n}=t;const s=(0,a.default)(),o=function(t){return r.Children.toArray(t).some((t=>(0,r.isValidElement)(t)))?t:Array.isArray(t)?t.join(""):t}(e),c="string"==typeof o?h.c:l;return r.createElement(c,(0,i.c)({key:String(s)},n),o)}},50584:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var i=n(45072),r=n(11504);function a(t){return r.createElement("svg",(0,i.c)({viewBox:"0 0 24 24"},t),r.createElement("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},73516:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>u});var i=n(11504),r=n(45072),a=n(14971),s=n(84357),o=n(21824),c=n(76016);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};function h(t){let{as:e,id:n,...h}=t;const{navbar:{hideOnScroll:u}}=(0,o.y)();if("h1"===e||!n)return i.createElement(e,(0,r.c)({},h,{id:void 0}));const d=(0,s.translate)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof h.children?h.children:n});return i.createElement(e,(0,r.c)({},h,{className:(0,a.default)("anchor",u?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,h.className),id:n}),h.children,i.createElement(c.default,{className:"hash-link",to:`#${n}`,"aria-label":d,title:d},"\u200b"))}function u(t){return i.createElement(h,t)}},26448:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var i=n(45072),r=n(11504),a=n(14971);const s={img:"img_ev3q"};function o(t){return r.createElement("img",(0,i.c)({loading:"lazy"},t,{className:(e=t.className,(0,a.default)(e,s.img))}));var e}},2616:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>b});var i=n(11504),r=n(95788),a=n(45072),s=n(56952);var o=n(25292);var c=n(76016);var l=n(58456),h=n(57484),u=n(14971);const d={containsTaskList:"containsTaskList_mC6p"};function p(t){if(void 0!==t)return(0,u.default)(t,t?.includes("contains-task-list")&&d.containsTaskList)}var f=n(85372),g=n(37808),y=n(38432);const m={head:function(t){const e=i.Children.map(t.children,(t=>i.isValidElement(t)?function(t){if(t.props?.mdxType&&t.props.originalType){const{mdxType:e,originalType:n,...r}=t.props;return i.createElement(t.props.originalType,r)}return t}(t):t));return i.createElement(s.c,t,e)},code:function(t){const e=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return i.Children.toArray(t.children).every((t=>"string"==typeof t&&!t.includes("\n")||(0,i.isValidElement)(t)&&e.includes(t.props?.mdxType)))?i.createElement("code",t):i.createElement(o.c,t)},a:function(t){return i.createElement(c.default,t)},pre:function(t){return i.createElement(o.c,(0,i.isValidElement)(t.children)&&"code"===t.children.props?.originalType?t.children.props:{...t})},details:l.c,ul:function(t){return i.createElement("ul",(0,a.c)({},t,{className:p(t.className)}))},img:f.c,h1:t=>i.createElement(h.default,(0,a.c)({as:"h1"},t)),h2:t=>i.createElement(h.default,(0,a.c)({as:"h2"},t)),h3:t=>i.createElement(h.default,(0,a.c)({as:"h3"},t)),h4:t=>i.createElement(h.default,(0,a.c)({as:"h4"},t)),h5:t=>i.createElement(h.default,(0,a.c)({as:"h5"},t)),h6:t=>i.createElement(h.default,(0,a.c)({as:"h6"},t)),admonition:g.c,mermaid:y.c};function b(t){let{children:e}=t;return i.createElement(r.Iu,{components:m},e)}},75124:(t,e,n)=>{"use strict";n.d(e,{c:()=>h});var i=n(45072),r=n(11504),a=n(14971),s=n(39176);const o={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},c="table-of-contents__link toc-highlight",l="table-of-contents__link--active";function h(t){let{className:e,...n}=t;return r.createElement("div",{className:(0,a.default)(o.tableOfContents,"thin-scrollbar",e)},r.createElement(s.default,(0,i.c)({},n,{linkClassName:c,linkActiveClassName:l})))}},39176:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>h});var i=n(45072),r=n(11504),a=n(21824),s=n(62172),o=n(60080);function c(t){let{toc:e,className:n,linkClassName:i,isChild:a}=t;return e.length?r.createElement("ul",{className:a?void 0:n},e.map((t=>r.createElement("li",{key:t.id},r.createElement("a",{href:`#${t.id}`,className:i??void 0,dangerouslySetInnerHTML:{__html:t.value}}),r.createElement(c,{isChild:!0,toc:t.children,className:n,linkClassName:i}))))):null}const l=r.memo(c);function h(t){let{toc:e,className:n="table-of-contents table-of-contents__left-border",linkClassName:c="table-of-contents__link",linkActiveClassName:h,minHeadingLevel:u,maxHeadingLevel:d,...p}=t;const f=(0,a.y)(),g=u??f.tableOfContents.minHeadingLevel,y=d??f.tableOfContents.maxHeadingLevel,m=(0,s.y)({toc:e,minHeadingLevel:g,maxHeadingLevel:y}),b=(0,r.useMemo)((()=>{if(c&&h)return{linkClassName:c,linkActiveClassName:h,minHeadingLevel:g,maxHeadingLevel:y}}),[c,h,g,y]);return(0,o.e)(b),r.createElement(l,(0,i.c)({toc:m,className:n,linkClassName:c},p))}},98280:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>p});var i=n(11504),r=n(93664);function a(t){let{children:e,fallback:n}=t;return(0,r.default)()?i.createElement(i.Fragment,null,e?.()):n??null}var s=n(21824),o=n(66528),c=n(43900);const l="docusaurus-mermaid-container";function h(){const{colorMode:t}=(0,o.U)(),e=(0,s.y)().mermaid,n=e.theme[t],{options:r}=e;return(0,i.useMemo)((()=>({startOnLoad:!1,...r,theme:n})),[n,r])}const u={container:"container_lyt7"};function d(t){let{value:e}=t;const n=function(t,e){const n=h(),r=e??n;return(0,i.useMemo)((()=>{c.o.mermaidAPI.initialize(r);const e=`mermaid-svg-${Math.round(1e7*Math.random())}`;return c.o.render(e,t)}),[t,r])}(e);return i.createElement("div",{className:`${l} ${u.container}`,dangerouslySetInnerHTML:{__html:n}})}function p(t){return i.createElement(a,null,(()=>i.createElement(d,t)))}},62264:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,n=36e5,i="millisecond",r="second",a="minute",s="hour",o="day",c="week",l="month",h="quarter",u="year",d="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(n)+t},b={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(r,2,"0")},m:function t(e,n){if(e.date()1)return t(s[0])}else{var o=e.name;x[o]=e,r=o}return!i&&r&&(_=r),r||!i&&_},w=function(t,e){if(k(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new E(n)},T=b;T.l=C,T.i=k,T.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var E=function(){function y(t){this.$L=C(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[v]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(T.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(f);if(i){var r=i[2]-1||0,a=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return T},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)68?1900:2e3)},o=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],l=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},h=function(t,e){var n,i=a.meridiem;if(i){for(var r=1;r<=24;r+=1)if(t.indexOf(i(r,0,e))>-1){n=r>12;break}}else n=t===(e?"pm":"PM");return n},u={A:[r,function(t){this.afternoon=h(t,!1)}],a:[r,function(t){this.afternoon=h(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,o("seconds")],ss:[i,o("seconds")],m:[i,o("minutes")],mm:[i,o("minutes")],H:[i,o("hours")],h:[i,o("hours")],HH:[i,o("hours")],hh:[i,o("hours")],D:[i,o("day")],DD:[n,o("day")],Do:[r,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],M:[i,o("month")],MM:[n,o("month")],MMM:[r,function(t){var e=l("months"),n=(l("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=l("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,o("year")],YY:[n,function(t){this.year=s(t)}],YYYY:[/\d{4}/,o("year")],Z:c,ZZ:c};function d(n){var i,r;i=n,r=a&&a.formats;for(var s=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var a=i&&i.toUpperCase();return n||r[i]||t[i]||r[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=s.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var i=d(e)(t),r=i.year,a=i.month,s=i.day,o=i.hours,c=i.minutes,l=i.seconds,h=i.milliseconds,u=i.zone,p=new Date,f=s||(r||a?1:p.getDate()),g=r||p.getFullYear(),y=0;r&&!a||(y=a>0?a-1:p.getMonth());var m=o||0,b=c||0,_=l||0,x=h||0;return u?new Date(Date.UTC(g,y,f,m,b,_,x+60*u.offset*1e3)):n?new Date(Date.UTC(g,y,f,m,b,_,x)):new Date(g,y,f,m,b,_,x)}catch(t){return new Date("")}}(e,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),h&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var p=o.length,f=1;f<=p;f+=1){s[1]=o[f-1];var g=n.apply(this,s);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}f===p&&(this.$d=new Date(""))}else r.call(this,t)}}}()},18268:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var r=function(e){return e.add(4-e.isoWeekday(),t)},a=n.prototype;a.isoWeekYear=function(){return r(this).year()},a.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,a,s,o=r(this),c=(n=this.isoWeekYear(),s=4-(a=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),a.isoWeekday()>4&&(s+=7),a.add(s,t));return o.diff(c,"week")+1},a.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var s=a.startOf;a.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):s.bind(this)(t,e)}}}()},24300:function(t){t.exports=function(){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,n){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function i(t,r,a){return i=n()?Reflect.construct:function(t,n,i){var r=[null];r.push.apply(r,n);var a=new(Function.bind.apply(t,r));return i&&e(a,i.prototype),a},i.apply(null,arguments)}function r(t){return a(t)||s(t)||o(t)||l()}function a(t){if(Array.isArray(t))return c(t)}function s(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function o(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n1?n-1:0),r=1;r/gm),Z=y(/\${[\w\W]*}/gm),K=y(/^data-[\-\w.\u00B7-\uFFFF]/),Q=y(/^aria-[\-\w]+$/),J=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tt=y(/^(?:\w+script|data):/i),et=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nt=y(/^html$/i),it=function(){return"undefined"==typeof window?null:window},rt=function(e,n){if("object"!==t(e)||"function"!=typeof e.createPolicy)return null;var i=null,r="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(r)&&(i=n.currentScript.getAttribute(r));var a="dompurify"+(i?"#"+i:"");try{return e.createPolicy(a,{createHTML:function(t){return t},createScriptURL:function(t){return t}})}catch(s){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function at(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:it(),n=function(t){return at(t)};if(n.version="2.4.3",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var i=e.document,a=e.document,s=e.DocumentFragment,o=e.HTMLTemplateElement,c=e.Node,l=e.Element,h=e.NodeFilter,u=e.NamedNodeMap,d=void 0===u?e.NamedNodeMap||e.MozNamedAttrMap:u,p=e.HTMLFormElement,f=e.DOMParser,y=e.trustedTypes,m=l.prototype,b=F(m,"cloneNode"),_=F(m,"nextSibling"),x=F(m,"childNodes"),M=F(m,"parentNode");if("function"==typeof o){var N=a.createElement("template");N.content&&N.content.ownerDocument&&(a=N.content.ownerDocument)}var st=rt(y,i),ot=st?st.createHTML(""):"",ct=a,lt=ct.implementation,ht=ct.createNodeIterator,ut=ct.createDocumentFragment,dt=ct.getElementsByTagName,pt=i.importNode,ft={};try{ft=I(a).documentMode?a.documentMode:{}}catch(Me){}var gt={};n.isSupported="function"==typeof M&<&&void 0!==lt.createHTMLDocument&&9!==ft;var yt,mt,bt=G,_t=X,xt=Z,vt=K,kt=Q,Ct=tt,wt=et,Tt=J,Et=null,St=O({},[].concat(r($),r(R),r(P),r(z),r(U))),At=null,Lt=O({},[].concat(r(W),r(q),r(H),r(V))),Bt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Dt=null,Mt=null,Nt=!0,Ot=!0,It=!1,Ft=!1,$t=!1,Rt=!1,Pt=!1,jt=!1,zt=!1,Yt=!1,Ut=!0,Wt=!1,qt="user-content-",Ht=!0,Vt=!1,Gt={},Xt=null,Zt=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Kt=null,Qt=O({},["audio","video","img","source","image","track"]),Jt=null,te=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ee="http://www.w3.org/1998/Math/MathML",ne="http://www.w3.org/2000/svg",ie="http://www.w3.org/1999/xhtml",re=ie,ae=!1,se=null,oe=O({},[ee,ne,ie],T),ce=["application/xhtml+xml","text/html"],le="text/html",he=null,ue=a.createElement("form"),de=function(t){return t instanceof RegExp||t instanceof Function},pe=function(e){he&&he===e||(e&&"object"===t(e)||(e={}),e=I(e),yt=yt=-1===ce.indexOf(e.PARSER_MEDIA_TYPE)?le:e.PARSER_MEDIA_TYPE,mt="application/xhtml+xml"===yt?T:w,Et="ALLOWED_TAGS"in e?O({},e.ALLOWED_TAGS,mt):St,At="ALLOWED_ATTR"in e?O({},e.ALLOWED_ATTR,mt):Lt,se="ALLOWED_NAMESPACES"in e?O({},e.ALLOWED_NAMESPACES,T):oe,Jt="ADD_URI_SAFE_ATTR"in e?O(I(te),e.ADD_URI_SAFE_ATTR,mt):te,Kt="ADD_DATA_URI_TAGS"in e?O(I(Qt),e.ADD_DATA_URI_TAGS,mt):Qt,Xt="FORBID_CONTENTS"in e?O({},e.FORBID_CONTENTS,mt):Zt,Dt="FORBID_TAGS"in e?O({},e.FORBID_TAGS,mt):{},Mt="FORBID_ATTR"in e?O({},e.FORBID_ATTR,mt):{},Gt="USE_PROFILES"in e&&e.USE_PROFILES,Nt=!1!==e.ALLOW_ARIA_ATTR,Ot=!1!==e.ALLOW_DATA_ATTR,It=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ft=e.SAFE_FOR_TEMPLATES||!1,$t=e.WHOLE_DOCUMENT||!1,jt=e.RETURN_DOM||!1,zt=e.RETURN_DOM_FRAGMENT||!1,Yt=e.RETURN_TRUSTED_TYPE||!1,Pt=e.FORCE_BODY||!1,Ut=!1!==e.SANITIZE_DOM,Wt=e.SANITIZE_NAMED_PROPS||!1,Ht=!1!==e.KEEP_CONTENT,Vt=e.IN_PLACE||!1,Tt=e.ALLOWED_URI_REGEXP||Tt,re=e.NAMESPACE||ie,e.CUSTOM_ELEMENT_HANDLING&&de(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Bt.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&de(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Bt.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Bt.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ft&&(Ot=!1),zt&&(jt=!0),Gt&&(Et=O({},r(U)),At=[],!0===Gt.html&&(O(Et,$),O(At,W)),!0===Gt.svg&&(O(Et,R),O(At,q),O(At,V)),!0===Gt.svgFilters&&(O(Et,P),O(At,q),O(At,V)),!0===Gt.mathMl&&(O(Et,z),O(At,H),O(At,V))),e.ADD_TAGS&&(Et===St&&(Et=I(Et)),O(Et,e.ADD_TAGS,mt)),e.ADD_ATTR&&(At===Lt&&(At=I(At)),O(At,e.ADD_ATTR,mt)),e.ADD_URI_SAFE_ATTR&&O(Jt,e.ADD_URI_SAFE_ATTR,mt),e.FORBID_CONTENTS&&(Xt===Zt&&(Xt=I(Xt)),O(Xt,e.FORBID_CONTENTS,mt)),Ht&&(Et["#text"]=!0),$t&&O(Et,["html","head","body"]),Et.table&&(O(Et,["tbody"]),delete Dt.tbody),g&&g(e),he=e)},fe=O({},["mi","mo","mn","ms","mtext"]),ge=O({},["foreignobject","desc","title","annotation-xml"]),ye=O({},["title","style","font","a","script"]),me=O({},R);O(me,P),O(me,j);var be=O({},z);O(be,Y);var _e=function(t){var e=M(t);e&&e.tagName||(e={namespaceURI:re,tagName:"template"});var n=w(t.tagName),i=w(e.tagName);return!!se[t.namespaceURI]&&(t.namespaceURI===ne?e.namespaceURI===ie?"svg"===n:e.namespaceURI===ee?"svg"===n&&("annotation-xml"===i||fe[i]):Boolean(me[n]):t.namespaceURI===ee?e.namespaceURI===ie?"math"===n:e.namespaceURI===ne?"math"===n&&ge[i]:Boolean(be[n]):t.namespaceURI===ie?!(e.namespaceURI===ne&&!ge[i])&&!(e.namespaceURI===ee&&!fe[i])&&!be[n]&&(ye[n]||!me[n]):!("application/xhtml+xml"!==yt||!se[t.namespaceURI]))},xe=function(t){C(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(Me){try{t.outerHTML=ot}catch(Me){t.remove()}}},ve=function(t,e){try{C(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(Me){C(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!At[t])if(jt||zt)try{xe(e)}catch(Me){}else try{e.setAttribute(t,"")}catch(Me){}},ke=function(t){var e,n;if(Pt)t=""+t;else{var i=E(t,/^[\r\n\t ]+/);n=i&&i[0]}"application/xhtml+xml"===yt&&re===ie&&(t=''+t+"");var r=st?st.createHTML(t):t;if(re===ie)try{e=(new f).parseFromString(r,yt)}catch(Me){}if(!e||!e.documentElement){e=lt.createDocument(re,"template",null);try{e.documentElement.innerHTML=ae?ot:r}catch(Me){}}var s=e.body||e.documentElement;return t&&n&&s.insertBefore(a.createTextNode(n),s.childNodes[0]||null),re===ie?dt.call(e,$t?"html":"body")[0]:$t?e.documentElement:s},Ce=function(t){return ht.call(t.ownerDocument||t,t,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},we=function(t){return t instanceof p&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof d)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Te=function(e){return"object"===t(c)?e instanceof c:e&&"object"===t(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Ee=function(t,e,i){gt[t]&&v(gt[t],(function(t){t.call(n,e,i,he)}))},Se=function(t){var e;if(Ee("beforeSanitizeElements",t,null),we(t))return xe(t),!0;if(B(/[\u0080-\uFFFF]/,t.nodeName))return xe(t),!0;var i=mt(t.nodeName);if(Ee("uponSanitizeElement",t,{tagName:i,allowedTags:Et}),t.hasChildNodes()&&!Te(t.firstElementChild)&&(!Te(t.content)||!Te(t.content.firstElementChild))&&B(/<[/\w]/g,t.innerHTML)&&B(/<[/\w]/g,t.textContent))return xe(t),!0;if("select"===i&&B(/